Skip to content

Commit

Permalink
Change and syntax-fix up only the functionally appropriate lines in s…
Browse files Browse the repository at this point in the history
…tats.js
  • Loading branch information
jsperhac committed Apr 11, 2017
1 parent a1ef93c commit 1bbe21d
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions html/internal_dashboard/supremm/js/stats.js
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
Ext.ns('XDMoD');

Ext.ns('XDMoD');
jsPlumb.ready(function() {

var common = {
endpoints: ["Blank", "Blank" ],
endpoints:["Blank", "Blank" ],
overlays: [ [ "PlainArrow", { location: 1.0 } ] ],
paintStyle: { strokeStyle: "#216477", lineWidth: 5 }
paintStyle: { strokeStyle:"#216477", lineWidth:5 }
};

jsPlumb.setContainer($("#flowchart"));

jsPlumb.connect({
source: $("#remote_machine"),
source:$("#remote_machine"),
target: $("#local_mirror"),
connector: "Straight",
anchor: "AutoDefault"
}, common);

jsPlumb.connect({
source: $("#local_mirror"),
source:$("#local_mirror"),
target: $("#accountfact"),
anchors: [ "BottomCenter", "TopCenter" ]
anchors:[ "BottomCenter", "TopCenter" ]
}, common);

jsPlumb.connect({
source: $("#local_mirror"),
source:$("#local_mirror"),
target: $("#mongo"),
anchors: [ "BottomCenter", "TopCenter" ]
anchors:[ "BottomCenter", "TopCenter" ]
}, common);

jsPlumb.connect({
source: $("#accountfact"),
source:$("#accountfact"),
target: $("#mongo"),
anchors: [ "BottomCenter", "TopCenter" ]
anchors:[ "BottomCenter", "TopCenter" ]
}, common);

jsPlumb.connect({
source: $("#mongo"),
source:$("#mongo"),
target: $("#jobfact"),
anchor: "AutoDefault"
}, common);

jsPlumb.connect({
source: $("#jobfact"),
source:$("#jobfact"),
target: $("#aggregates"),
connector: "Straight",
anchor: "AutoDefault"
Expand All @@ -64,22 +64,22 @@
var print_list = function(data, selector) {
var h = "<ul>";
var d = data.data;
for ( var k in d ) {
if ( d.hasOwnProperty(k) ) {
h = h + "<li>" + k + ": " + d[k] + "</li>";
for (var k in d) {
if (d.hasOwnProperty(k)) {
h = h + '<li>' + k + ': ' + d[k] + '</li>';
}
}
h = h + "</ul>";
$(selector).html(h);
};

$.getJSON( XDMoD.REST.url + "/supremm_dataflow/dbstats", { token: XDMoD.REST.token, resource_id: resource_id, db_id: "accountdb" },
$.getJSON(XDMoD.REST.url + '/supremm_dataflow/dbstats', { token: XDMoD.REST.token, resource_id: resource_id, db_id: 'accountdb' },
function(data) { print_list(data.data, "#accountfact_content"); });
$.getJSON( XDMoD.REST.url + "/supremm_dataflow/dbstats", { token: XDMoD.REST.token, resource_id: resource_id, db_id: "summarydb" },
$.getJSON(XDMoD.REST.url + '/supremm_dataflow/dbstats', { token: XDMoD.REST.token, resource_id: resource_id, db_id: 'summarydb' },
function(data) { print_list(data.data, "#mongo_content"); });
$.getJSON( XDMoD.REST.url + "/supremm_dataflow/dbstats", { token: XDMoD.REST.token, resource_id: resource_id, db_id: "jobfact" },
$.getJSON(XDMoD.REST.url + '/supremm_dataflow/dbstats', { token: XDMoD.REST.token, resource_id: resource_id, db_id: 'jobfact' },
function(data) { print_list(data.data, "#jobfact_content"); });
$.getJSON( XDMoD.REST.url + "/supremm_dataflow/dbstats", { token: XDMoD.REST.token, resource_id: resource_id, db_id: "aggregates" },
$.getJSON(XDMoD.REST.url + '/supremm_dataflow/dbstats', { token: XDMoD.REST.token, resource_id: resource_id, db_id: 'aggregates' },
function(data) { print_list(data.data, "#aggregates_content"); });

$("#pagetitle").text("Data flow information for " + resource_map[resource_id] );
Expand All @@ -92,10 +92,10 @@
loadstats( $("#resourceselect").val() );
});

$.getJSON(XDMoD.REST.url + "/supremm_dataflow/resources", {token: XDMoD.REST.token}, function(data) {
$.getJSON(XDMoD.REST.url + '/supremm_dataflow/resources', {token: XDMoD.REST.token}, function(data) {
var select = document.getElementById("resourceselect");

for (var i = 0; i < data.data.length; i++) {
for (var i = 0; i < data.data.length ; i++) {
var element = data.data[i];
var tmp = document.createElement("option");
tmp.text = element.name;
Expand Down

0 comments on commit 1bbe21d

Please sign in to comment.