Skip to content

Commit

Permalink
Synchronizes
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrdo committed Nov 16, 2019
1 parent 0e07050 commit 6594c93
Show file tree
Hide file tree
Showing 11 changed files with 236 additions and 76 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ queue.render();
if (!("queue" in window)) { window["queue"] = queue; }

// To call public methods from the JavaScript console of a browser's Dev Tools:
window.queue.toggleDebug(true);
window.queueLegacy.toggleDebug(true);

// The COMPS implementation exposes the "WorkItems" chart as "queueFlows", so:
window.queueFlows.toggleDebug(true); // addresses "WorkItems" chart.
Expand Down Expand Up @@ -253,20 +253,20 @@ When testing this system with runtime API Response data, it can be helpful to ca
At any time, the current collection of internalized data can be gotten from the chart via a command into the JavaScript console of a browser's Dev Tools (*f12*):
```javascript
// to peruse the data in its native object structure:
window.queue.getCollection();
window.queueLegacy.getCollection();

// to capture the data as a string for transfer to repro.json:
JSON.stringify(window.queue.getCollection());
JSON.stringify(window.queueLegacy.getCollection());

// to automatically print collection data to the Dev Tool's console upon every rendering:
window.queue.toggleDebug(true);
window.queueLegacy.toggleDebug(true);
```
See [public API method](#public-methods-api) for how to expose the chart instance to access from the browser's Dev Tools (*f12*).

The [data/repro.js](demo/data/repro.json) is expected to be at the root of the data/ path and will therefore be copied into the appropriate location at build time. This file must be valid JSON, so anything captured via JSON.stringify() should be stripped of the outermost quotation marks (which would make the contents a string rather than object). Copy-and-paste the captured data into this file or save the capture, place it at this location, and name it "repro.json".

Finally, when running the application with the newly-built repro data, set the chart to render it:
```javascript
window.queue.toggleRepro();
window.queueLegacy.toggleRepro();
```
It is important to toggle this state off when expecting normal functionality from the charting system.
58 changes: 54 additions & 4 deletions demo/build/css/idm-dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,13 @@ html[data-useragent*="MSIE 10"]
cursor: pointer;
}

#dashboard .userMetric .highcharts-legend-item.highcharts-series-0 > span
{
/* emphasize the current Owner's name */
font-weight: bold !important;
color: black !important;
}


/* VISUALIZATION-QUEUE */
#dashboard .queue {
Expand Down Expand Up @@ -1116,14 +1123,57 @@ body:not(.touch) #dashboard [itemid^=QueueView].queue.chart ol > li:hover dfn.to
display: none;
}

#dashboard [itemid^=QueueView].queue.chart ol > li dfn.tooltip dl {
margin-left: 16px;
}
#dashboard [itemid^=QueueView].queue.chart ol > li dfn.tooltip dl
{
margin-left: 16px;
}

body.touch #dashboard [itemid^=QueueView].queue.chart ol > li dfn.tooltip dl {
body.touch #dashboard [itemid^=QueueView].queue.chart ol > li dfn.tooltip dl
{
margin-left: 24px;
}

/* TOOLTIP ACTION */

#dashboard [itemid=QueueView].queue.chart ol > li dfn.tooltip dl dd[itemprop=Action]
{
height: 0;
}

#dashboard [itemid=QueueView].queue.chart ol > li dfn.tooltip dl dd[itemprop=Action] button
{
display: none;
}

#dashboard [itemid=QueueView].queue.chart ol > li.active dfn.tooltip dl dd[itemprop=Action]
{
height: auto;
}

#dashboard [itemid=QueueView].queue.chart ol > li.active dfn.tooltip dl dd[itemprop=Action] button
{
display: inline-block;
width: 100%;
margin-top: 12px;
padding: 5px 0 7px 0;
border: none;
background: hotpink;
border: 1px solid deeppink;
color: white;
font-variant: all-small-caps;
letter-spacing: 1px;
cursor: pointer;
}

#dashboard [itemid=QueueView].queue.chart ol > li.active dfn.tooltip dl dd[itemprop=Action] button:hover
{
background: #ff8fc7;
}

#dashboard [itemid=QueueView].queue.chart ol > li.active dfn.tooltip dl dd[itemprop=Action] button:active
{
background: deeppink;
}

/* DISABLED */

Expand Down
2 changes: 1 addition & 1 deletion demo/data/Simulations/1/Queue.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"QueueState": {
"Normal": [{
"ExperimentId": "8115b4cb-432a-e911-a2bf-c4346bcb1554",
"Owner": "allee",
"Owner": "psylwester",
"SimulationCount": 100,
"FirstCreateTime": "2019-02-06T19:17:27.8070000Z",
"LastCreateTime": "2019-02-06T19:17:36.6970000Z",
Expand Down
2 changes: 1 addition & 1 deletion demo/data/Simulations/1/Stats.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"Experiments": [
{
"Id": "8115b4cb-432a-e911-a2bf-c4346bcb1554",
"Owner": "allee",
"Owner": "psylwester",
"Name": "BCSweep4ExtendEvalC_NoStore2",
"DateCreated": "2019-02-06T19:17:09.0230000Z",
"LastModified": "2019-02-06T19:17:09.0230000Z"
Expand Down
54 changes: 40 additions & 14 deletions demo/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,28 @@ class Index {
useMockData: true,
mockPath: "Simulations/1/",
modeEntity: "Simulations",
api: function(mode,refresh) {
if (!!mode) {
this.modeEntity = /sim/i.test(mode) ? "Simulations" : "WorkItems";
}
if (!!refresh) {
// refreshMetric("QueueView", true);
alert("There is no controller to GET this data!");
isCancelable: true,
api: function(intent,...args) {
switch (intent) {
case "mode":
this.modeEntity = /sim/i.test(mode) ? "Simulations" : "WorkItems";
return true;
case "refresh":
alert("There is no controller to GET this data!");
return true;
case "cancel":
// applyItemAction(...args);
confirm(...args);
return true;
case "notify":
if (Postette) {
_.invoke(Postette, "notifier.notify", ...args);
} else {
alert(...args);
}
return true;
default:
return false;
}
}
},
Expand All @@ -54,13 +69,24 @@ class Index {
useMockData: true,
mockPath: "WorkItems/1/",
modeEntity: "WorkItems",
api: function(mode,refresh) {
if (!!mode) {
this.modeEntity = /sim/i.test(mode) ? "Simulations" : "WorkItems";
}
if (!!refresh) {
// refreshMetric("QueueViewFlows", true);
alert("There is no controller to GET this data!");
isCancelable: false,
api: function(intent,...args) {
switch (intent) {
case "mode":
this.modeEntity = /sim/i.test(mode) ? "Simulations" : "WorkItems";
return true;
case "refresh":
alert("There is no controller to GET this data!");
return true;
case "notify":
if (Postette) {
_.invoke(Postette, "notifier.notify", ...args);
} else {
alert(...args);
}
return true;
default:
return false;
}
}
}
Expand Down
14 changes: 7 additions & 7 deletions demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@
"hpc"
],
"devDependencies": {
"@babel/core": "^7.5.5",
"@babel/core": "^7.7.2",
"babel-loader": "^8.0.6",
"copy-webpack-plugin": "^5.0.4",
"webpack": "^4.39.2",
"webpack-cli": "^3.3.7",
"webpack-dev-server": "^3.8.0"
"copy-webpack-plugin": "^5.0.5",
"webpack": "^4.41.2",
"webpack-cli": "^3.3.10",
"webpack-dev-server": "^3.9.0"
},
"dependencies": {
"microdata-template": "^2.1.0",
"microdata-template": "^2.2.2",
"postette": "^0.4.0",
"highcharts": "^6.1.1",
"highcharts": "^6.2.0",
"jquery": "^3.4.1"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions queue.js → queue-legacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/


var queue = function (instantiations) {
var queueLegacy = function (instantiations) {

var instance = function (settings) {

Expand Down Expand Up @@ -1739,4 +1739,4 @@ var queue = function (instantiations) {
};


export default queue;
export default queueLegacy;
Loading

0 comments on commit 6594c93

Please sign in to comment.