Skip to content

Commit

Permalink
Added changes for Master Item Manager December 2019
Browse files Browse the repository at this point in the history
Updated UI features: Including MI validation, popover for MI details, ability to select from Extension 
Combined sync function from Create/Update features
Added automatic Master Item tag for all Master items created through extension
  • Loading branch information
maxwellginqo authored Dec 17, 2019
1 parent ee3920c commit a4be647
Show file tree
Hide file tree
Showing 11 changed files with 1,464 additions and 1,418 deletions.
2,337 changes: 926 additions & 1,411 deletions GINQO_MasterItemManager.js

Large diffs are not rendered by default.

18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# GINQO MasterItemManager
Our intention was to create an application that would help with efficiency with development, especially around Master Items. Since Master Items are frequently reused across applications, we felt a governed approach would fit best. Using our template file, Master Items can be saved for later creation. Master Items can be selected using a Qlik table then updated or deleted using this application. Finally, by default, the MasterItemManager won't affect your manually created Master Items unless specifically requested, making it a safe tool to use with in conjunction with previously defined apps.
Our intention was to create an application that would help with efficiency with development, especially around Master Items. Since Master Items are frequently reused across applications, we felt a governed approach would fit best. Using our template file, Master Items can be saved for later creation. Master Items can then be selected using a Qlik table and syncronized or deleted using The Master Item Manager. Finally, by default, the application won't affect your manually created Master Items unless specifically requested, making it a safe tool to use with in conjunction with previously defined apps & master items.

![](demo.gif)

# Prerequisites
Qlik Sense Enterprise >= 3.0
Qlik Sense Enterprise >= June 2018
(Desktop not supported)

# Installation
1. Download this extension on a zip file using the 'Clone or Download' button
2. Access navigate to 'Extensions' under the QMC (Qlik Management Console)
2. Navigate to the 'Extensions' directory under the Qlik Management Console (QMC)
3. Import the zip file

# Getting Started
1. Navigate to the Data Load Editor
2. Create a Data Connection to the template excel file (it is provided in the zip file)
3. Insert the scripts for your Dimensions and Measures tables (add REPLACE LOADs if you want to enable partial reload)
4. Back in your Qlik Sense Application, create one table for the template file's Dimensions and another for template file's Measures (Highly recommend [Quick Table Viewer](https://developer.qlik.com/garden/5bd1f3373e4dd400115204b0) from ChristofSchwarz and Ralf Becher for this)
5. You can now use the [Actions](#actions) on the Master Items to create your Master Items from the template file.
2. Create a Data Connection to the template excel file(it is provided in the zip file), dropbox and box.com both work well for this step
3. Insert the scripts for your Dimensions and Measures tables (add REPLACE LOADs if you want to enable partial reloads for larger applications)
4. Back in your Qlik Sense Application, create one table for the template file's Dimensions and another for template file's Measures (Highly recommend qsQuickTableViewer from ChristofSchwarz and Ralf Becher for this https://github.com/ChristofSchwarz/qsQuickTableViewer)
5. You can now use the Master Item Manager to create your Dimensions and Measures from the provided template file.

# Using the Template file
1. Dimensions and Measures must have unique ID's
Expand All @@ -38,6 +38,10 @@ Qlik Sense Enterprise >= 3.0
GINQO

# Change Log
2019-12-17: Combined update and create functionality into syncronize option
2019-12-17: Added preview section after syncronizing to show which Dimensions and Measures will be created
2019-12-17: Added December 2019 release

# Known Issues and Limitations
> Exporting of Master Items will sometimes add an additional single quote to the end of a complex expression. Just make sure to remove it when copying back to your template spreadsheet
> Exporting Measures with Segmented Colors will cause the export to fail during this release.
75 changes: 75 additions & 0 deletions dimModalConfirm.ng.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<lui-dialog style="max-width: 1200px;">
<lui-dialog-header>
<lui-dialog-title>Confirm Selected Dimensions</lui-dialog-title>
</lui-dialog-header>
<lui-dialog-body>

<button type="button" class="lui-fade-button" ng-click="selState.clearAll()" aria-label="Clear">
Clear Selections <span class="lui-icon lui-icon--remove" aria-hidden="true"></span>
</button><br>


<ul style="height:200px" class="lui-list assets-n-minutes__list ng-scope">
<h1 style="font-size:10px">**The following dimensions will be affected**</h1>
<table style="width:250px">
<tr>
<th>
<li class="lui-list__header">
<span class="lui-list__text">Dimension Name</span>
</li>
<li ng-repeat="row in dimensionvalues.qHyperCube.qDataPages[0].qMatrix" class="lui-list__item" >
<span style="font-weight:300;" class="lui-list__text popover" ng-click="openPopover($index, row)">
<div style="font-size:12px; color:#595959">{{row[0].qText}}</div>
<div style="font-size:11px; color:#A6A6A6">{{row[2].qText}}</div>
</span>
</li>
</th>
<!--
-->
</tr>

</table>
</ul>



</lui-dialog-body>
<lui-dialog-footer>
<button class="lui-button lui-dialog__footer-button" ng-click="close();">Close</button>
<button class="lui-button lui-button--success lui-dialog__footer-button" ng-click="createdimension();">Accept</button>
</lui-dialog-footer>
</lui-dialog>
<!--
<button type="button" class="btn btn-default btn-xs" ng-click="field.rows[0].select()" aria-label="Lock">
<span class="lui-icon lui-icon--remove" aria-hidden="true"></span>
</button>
-->



<!--
<table>
<tr class="header">
<th>Measure Name</th>
<th>Measure Description</th>
<th>Measure Label Expression</th>
<th>Measure Expression</th>
<th>Measure Tags</th>
<th>Measure Color</th>
<th>Measure Id</th>
</tr>
<tr ng-repeat="row in measurevalues.qHyperCube.qDataPages[0].qMatrix">
<td class="data" ng-repeat="col in row">
{{col.qText}}
</td>
</tr>
</table>
<!-->



<!-- <li>Import your metrics using <a href="https://ginqo.box.com/s/altga7hukg16bnzqb7tn1k7i7biqd0jf" target="_blank">this template</a> or the provided excel file</li> -->
68 changes: 68 additions & 0 deletions dimModalConfirmPopover.ng.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<lui-popover style="max-width: 450px;">
<lui-popover-header>
<lui-popover-title>Dimension Profile</lui-popover-title>
</lui-popover-header>
<lui-popover-body style="font-size:11px;">

<div style="margin-top: 15px">
<b>Dimension Name:</b><br />
{{DimensionName}}
</div>
<div style="margin-top: 15px">
<b>Dimension Label Expression:</b><br />

<table>
<tr>
<td style="width:20px; padding: 5px">Unevaluated</td>
<td style="width:100px; padding: 5px">{{DimensionLabelExpression}}</td>
</tr>
<tr>
<td style="width:20px; padding: 5px">Evaluated</td>
<td style="width:100px; padding: 5px">{{DimensionLabelExpressionEvaluated}}</td>
</tr>
</table>
</div>
<div style="margin-top: 15px">
<b>Dimension Description:</b><br />
<table>
<tr>
<td style="width:20px; padding: 5px">Unevaluated</td>
<td style="width:100px; padding: 5px">{{DimensionDescription}}</td>
</tr>
<tr>
<td style="width:20px; padding: 5px">Evaluated</td>
<td style="width:100px; padding: 5px">{{DimensionDescriptionEvaluated}}</td>
</tr>
</table>
</div>

<div style="margin-top: 15px">
<b>Dimension Field:</b><br />
{{DimensionField}}
</div>
<div style="margin-top: 15px">
<b>Dimension Tags:</b><br />
{{DimensionTags}}
</div>
<div style="margin-top: 15px">
<b>Dimension Color:</b><br />
{{DimensionColor}}
<div ng-style="{'background-color':DimensionColor}" style="width:100px; height:10px"></div>
</div>
<div style="margin-top: 15px">
<b>Dimension ID:</b><br />
{{DimensionID}}
</div>


<span style="font-weight:300;" class="lui-list__text">
<div style="font-size:12px; color:#595959">{{row[0].qText}}</div>
<div style="font-size:11px; color:#A6A6A6">{{row[1].qText}}</div>
</span>

</lui-popover-body>
<lui-popover-footer>
<button class="lui-button lui-popover__footer-button" ng-click="close();">Close</button>
<button class="lui-button lui-button--info lui-popover__footer-button" ng-click="SelectValue()">Toggle Select</button>
</lui-popover-footer>
</lui-popover>
52 changes: 52 additions & 0 deletions dimModalMain.ng.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<style>

th,
td,
table,
tr {
color: inherit;
vertical-align: top;
border: 1px solid #f2f2f2;
background-color: inherit;
padding-top: .23076923em;
padding-bottom: .23076923em;
}

tr,
td,
th {
width: 200px;
}
</style>

<lui-dialog style="max-width: 1200px;">
<lui-dialog-header>
<lui-dialog-title>Dimension Functions</lui-dialog-title>
</lui-dialog-header>
<lui-dialog-body>

<div class="lui-popover__body lui-nopad">
<ul class="lui-list">
<li ng-click="CreateDimension();" class="lui-list__item">
<span class="lui-list__text lui-list__action">Syncronize</span>
</li>
<li ng-click="DestroyDimension();" class="lui-list__item">
<span class="lui-list__text lui-list__action">Delete</span>
</li>
</ul>
</div>
<div class="lui-popover__footer lui-nopad" style="display: flex; justify-content: space-around;">

<button title="Delete all Dimension Items" ng-click="DestroyAllMeasures();" class="lui-fade-button lui-fade-button--large">
<span class="lui-fade-button__icon lui-icon lui-icon--bin"></span>
</button>
<button title="Download Dimension Schemas" ng-click="ExportDimensions()" class="lui-fade-button lui-fade-button--large">
<span class="lui-fade-button__icon lui-icon lui-icon--download"></span>
</button>
</div>

</lui-dialog-body>
<lui-dialog-footer>
<button class="lui-button lui-dialog__footer-button" ng-click="close();">Close</button>
</lui-dialog-footer>
</lui-dialog>
40 changes: 40 additions & 0 deletions helpModal.ng.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<style>
th,
td,
table,
tr {
color: inherit;
vertical-align: top;
border: 1px solid #f2f2f2;
background-color: inherit;
padding-top: .23076923em;
padding-bottom: .23076923em;
}

tr,
td,
th {
width: 200px;
}
</style>

<lui-dialog style="max-width: 1200px;">
<lui-dialog-header>
<lui-dialog-title>Help</lui-dialog-title>
</lui-dialog-header>
<lui-dialog-body>
<h1>Extension Instructions: </h1><br>
<ol>
<li>Import your metrics using the provided excel file.</li>
<li>In your Sense application create 2 Tables: One that contains the Measures and one that contains Dimensions from the imported excel file.</li>
<li>Selecting a subset of Dimensions or Measures from the Table will allow the Manager app to only perform actions on those selected (No selections means everything is selected)</li>
<li>Actions will only be performed on the Master Items defined in the template sheet (Self defined metrics will be unaffected).</li>
</ol>

</lui-dialog-body>
<lui-dialog-footer>
<button class="lui-button lui-dialog__footer-button" ng-click="close();">Close</button>
</lui-dialog-footer>
</lui-dialog>

<!-- <li>Import your metrics using <a href="https://ginqo.box.com/s/altga7hukg16bnzqb7tn1k7i7biqd0jf" target="_blank">this template</a> or the provided excel file</li> -->
77 changes: 77 additions & 0 deletions mainModal.ng.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<style>
.content-center {
position: absolute;
left: 50%;
top: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
font-size: 12px;
}
a {
color: maroon;
text-decoration: none; /* no underline */
}
</style>
<div qv-extension>
<div style="float:right">
<button class="lui-button" ng-click="PartialReload()">Partial Reload <span class="lui-fade-button__icon lui-icon lui-icon--small lui-icon--reload"></span></button>
</div>
<div qv-extension class="ng-scope">
<button class="lui-button lui-button--rounded" ng-click="openHelpModal()"><span class="lui-button__icon lui-icon lui-icon--info"></span></button>
</div>
</div>

<!-- Create Instructions and Title -->
<div class="content-center">

<br><br>
<div style="text-align: center">
<div style="color: #707070; font-weight:600; font-size:12px; padding:5px">GIN<span style="color:green">Q</span>O Master Item Manager <img src="http://static1.squarespace.com/static/57e6f5d9d482e9a8f58af132/t/57e70458893fc04435852460/1474757722592/ginqo_1000px.png?format=1500w" style="width:30px"></div>
<ul class="lui-tabset lui-tabset--fill" style="border-top: 1px solid rgba(0, 0, 0, 0.1); border-bottom: 1px solid rgba(0, 0, 0, 0.1);">

<li ng-click="openDimModalMain()" class="lui-tab" title="Dimensions">
<span>
<span style="font-size:12px; font-weight:400">Edit Dimensions</span>
<span class="lui-button__icon lui-icon lui-icon--small lui-icon--book"></span>
</span>
</li>
<li ng-click="openMeasModalMain()" class="lui-tab" title="Measures">
<span>
<span style="font-size:12px; font-weight:400">Edit Measures</span>
<span class="lui-button__icon lui-icon lui-icon--small lui-icon--measure"></span>
</span>
</li>


</ul>
<!-- <button class="instructions lui-button" ng-click="openDialog()">Instructions: </button> -->

</div>
<br>

<span style="font-size:9px; font-weight:200; bottom:0">Version info: December 2019, Build 1.0</span><br><br>
<span style="font-size:9px; font-weight:200; bottom:0"><a href="https://ginqo.com" target="_blank"><img src="http://static1.squarespace.com/static/57e6f5d9d482e9a8f58af132/t/57e70458893fc04435852460/1474757722592/ginqo_1000px.png?format=1500w" style="width:15px">GINQO Consulting Ltd</span><br>
<span style="font-size:9px; font-weight:200; bottom:0"><a style="font-size:9px; font-weight:200; bottom:0" href="https://www.linkedin.com/company/ginqo/?originalSubdomain=ca" target="_blank"><img src="https://external-content.duckduckgo.com/iu/?u=http%3A%2F%2Flofrev.net%2Fwp-content%2Fphotos%2F2017%2F04%2Flinkedin_logo-1007x1007.jpg&f=1&nofb=1" style="width:15px">LinkedIn</span><br>
<span style="font-size:9px; font-weight:200; bottom:0"><a style="font-size:9px; font-weight:200; bottom:0" href="https://github.com/ginqo" target="_blank"><img src="https://external-content.duckduckgo.com/iu/?u=http%3A%2F%2Fstatic.movingpackets.net%2F2013%2F12%2Fgithub-logo-transparent.jpg&f=1&nofb=1" style="width:15px">Github</span>
</div>



</div>


<!--
<button class="masteritemdelete lui-button lui-button--large" ng-click="openDialogDim()">Dimensions <span class="lui-fade-button__icon lui-icon lui-icon--menu"></span></button>
<button class="masteritemdelete lui-button lui-button--large" ng-click="openDialogMeas()">Measures <span class="lui-fade-button__icon lui-icon lui-icon--menu"></span></button>
-->


<!--
Master Item Overview and Export Variables
<button title="Master Item Overview" style="left: 0%" ng-click="openDialog2()" class="extras lui-button lui-button--default">
<span class="lui-fade-button__icon lui-icon lui-icon--table"></span>
</button>
<button title="Export Variables" style="left: 0%" ng-click="ExportVariables()" class="extras lui-button lui-button--default">
<span class="lui-fade-button__icon lui-icon lui-icon--variables"></span>
</button>
-->
Loading

0 comments on commit a4be647

Please sign in to comment.