Commit 52fe76f1 authored by Alain Takoudjou's avatar Alain Takoudjou

migrate slapos_monitoring bt to new format

parent 16f3fc25
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>ERP5 Graph</title>
<!-- custom css -->
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<!-- custom script -->
<script src="dygraph.js" type="text/javascript"></script>
<script src="gadget_erp5_graph.js" type="text/javascript"></script>
</head>
<body>
<div class="custom-grid-wrap">
<div class="custom-grid ui-corner-all ui-body-inherit ui-shadow ui-corner-all"></div>
</div>
</body>
</html>
\ No newline at end of file
...@@ -101,36 +101,6 @@ ...@@ -101,36 +101,6 @@
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
<!DOCTYPE html>\n
<html>\n
<head>\n
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />\n
<meta name="viewport" content="width=device-width, user-scalable=no" />\n
<title>ERP5 Graph</title>\n
<!-- custom css -->\n
\n
<!-- renderjs -->\n
<script src="rsvp.js" type="text/javascript"></script>\n
<script src="renderjs.js" type="text/javascript"></script>\n
\n
<!-- custom script -->\n
<script src="dygraph.js" type="text/javascript"></script>\n
<script src="gadget_erp5_graph.js" type="text/javascript"></script>\n
\n
</head>\n
<body>\n
<div class="custom-grid-wrap">\n
<div class="custom-grid ui-corner-all ui-body-inherit ui-shadow ui-corner-all"></div>\n
</div>\n
</body>\n
</html>
]]></string> </value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Gadget ERP5 Graph HTML</string> </value> <value> <string>Gadget ERP5 Graph HTML</string> </value>
......
/*global window, rJS, console, RSVP, Dygraph */
/*jslint indent: 2, maxerr: 3 */
(function(rJS) {
"use strict";
// Custom Interaction Model for synchronised graphs
var customInteractionModel = Dygraph.Interaction.defaultModel;
customInteractionModel.touchend = function(event, g, context) {
Dygraph.Interaction.endTouch(event, g, context);
var viewWindow = g.xAxisRange();
g.getFunctionOption("zoomCallback").call(g, viewWindow[0], viewWindow[1], g.yAxisRanges());
};
/*customInteractionModel.touchmove = function(event, g, context) {
Dygraph.Interaction.moveTouch(event, g, context);
var viewWindow = g.xAxisRange();
g.getFunctionOption("zoomCallback").call(g, viewWindow[0], viewWindow[1], g.yAxisRanges());
};
customInteractionModel.mousemove = function(event, g, context) {
if (context.isPanning) {
var viewWindow = g.xAxisRange();
g.getFunctionOption("zoomCallback").call(g, viewWindow[0], viewWindow[1], g.yAxisRanges());
}
}*/
customInteractionModel.mouseup = function(event, g, context) {
if (context.isPanning) {
var viewWindow = g.xAxisRange();
g.getFunctionOption("zoomCallback").call(g, viewWindow[0], viewWindow[1], g.yAxisRanges());
}
};
rJS(window)
/////////////////////////////////////////////////////////////////
// ready
/////////////////////////////////////////////////////////////////
.ready(function(gadget) {
gadget.property_dict = {};
return gadget.getElement()
.push(function(element) {
gadget.property_dict.element = element;
});
})
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod('getColors', function() {
var gadget = this;
return new RSVP.Queue()
.push(function () {
return gadget.property_dict.graph.getColors();
});
})
.declareMethod('setVisibility', function(num, value) {
var gadget = this;
return new RSVP.Queue()
.push(function () {
return gadget.property_dict.graph.setVisibility(num, value);
});
})
.declareMethod('updateOptions', function(options, ndarray) {
var gadget = this;
return new RSVP.Queue()
.push(function () {
gadget.property_dict.graph.ndarray = ndarray;
return gadget.property_dict.graph.updateOptions(options);
});
})
.declareMethod('resize', function(width, height) {
var gadget = this;
return new RSVP.Queue()
.push(function () {
return gadget.property_dict.graph.resize(width, height);
});
})
// render gadget
.declareMethod('render', function(data, option_dict, interactionModel) {
var gadget = this;
if (interactionModel === "customInteractionModel") {
option_dict.interactionModel = customInteractionModel;
}
return new RSVP.Queue()
.push(function () {
gadget.property_dict.graph = new Dygraph(
gadget.property_dict.element,
data,
option_dict
);
return gadget;
});
});
}(rJS));
\ No newline at end of file
...@@ -97,114 +97,6 @@ ...@@ -97,114 +97,6 @@
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>text_content</string> </key>
<value> <string>/*global window, rJS, console, RSVP, Dygraph */\n
/*jslint indent: 2, maxerr: 3 */\n
(function(rJS) {\n
"use strict";\n
\n
// Custom Interaction Model for synchronised graphs\n
var customInteractionModel = Dygraph.Interaction.defaultModel;\n
\n
customInteractionModel.touchend = function(event, g, context) {\n
Dygraph.Interaction.endTouch(event, g, context);\n
var viewWindow = g.xAxisRange();\n
g.getFunctionOption("zoomCallback").call(g, viewWindow[0], viewWindow[1], g.yAxisRanges());\n
\n
};\n
\n
/*customInteractionModel.touchmove = function(event, g, context) {\n
Dygraph.Interaction.moveTouch(event, g, context);\n
var viewWindow = g.xAxisRange();\n
g.getFunctionOption("zoomCallback").call(g, viewWindow[0], viewWindow[1], g.yAxisRanges());\n
\n
};\n
\n
customInteractionModel.mousemove = function(event, g, context) {\n
if (context.isPanning) {\n
var viewWindow = g.xAxisRange();\n
g.getFunctionOption("zoomCallback").call(g, viewWindow[0], viewWindow[1], g.yAxisRanges());\n
}\n
}*/\n
\n
customInteractionModel.mouseup = function(event, g, context) {\n
if (context.isPanning) {\n
var viewWindow = g.xAxisRange();\n
g.getFunctionOption("zoomCallback").call(g, viewWindow[0], viewWindow[1], g.yAxisRanges());\n
}\n
};\n
\n
rJS(window)\n
\n
/////////////////////////////////////////////////////////////////\n
// ready\n
/////////////////////////////////////////////////////////////////\n
\n
.ready(function(gadget) {\n
gadget.property_dict = {};\n
return gadget.getElement()\n
.push(function(element) {\n
gadget.property_dict.element = element;\n
});\n
})\n
\n
/////////////////////////////////////////////////////////////////\n
// declared methods\n
/////////////////////////////////////////////////////////////////\n
\n
.declareMethod(\'getColors\', function() {\n
var gadget = this;\n
return new RSVP.Queue()\n
.push(function () {\n
return gadget.property_dict.graph.getColors();\n
});\n
})\n
\n
.declareMethod(\'setVisibility\', function(num, value) {\n
var gadget = this;\n
return new RSVP.Queue()\n
.push(function () {\n
return gadget.property_dict.graph.setVisibility(num, value);\n
});\n
})\n
\n
.declareMethod(\'updateOptions\', function(options, ndarray) {\n
var gadget = this;\n
return new RSVP.Queue()\n
.push(function () {\n
gadget.property_dict.graph.ndarray = ndarray;\n
return gadget.property_dict.graph.updateOptions(options);\n
});\n
})\n
\n
.declareMethod(\'resize\', function(width, height) {\n
var gadget = this;\n
return new RSVP.Queue()\n
.push(function () {\n
return gadget.property_dict.graph.resize(width, height);\n
});\n
})\n
\n
// render gadget\n
.declareMethod(\'render\', function(data, option_dict, interactionModel) {\n
var gadget = this;\n
if (interactionModel === "customInteractionModel") {\n
option_dict.interactionModel = customInteractionModel;\n
}\n
return new RSVP.Queue()\n
.push(function () {\n
gadget.property_dict.graph = new Dygraph(\n
gadget.property_dict.element,\n
data,\n
option_dict\n
);\n
return gadget;\n
});\n
});\n
\n
}(rJS));</string> </value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Gadget ERP5 Graph JS</string> </value> <value> <string>Gadget ERP5 Graph JS</string> </value>
......
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>Monitoring Panel Gadget</title>
<link rel="stylesheet" href="magnific-popup.css">
<link rel="stylesheet" href="gadget_monitoring_tooltipster.css">
<link href="gadget_monitoring_custom.css" rel="stylesheet" type="text/css"/>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="handlebars.js" type="text/javascript"></script>
<script src="gadget_global.js" type="text/javascript"></script>
<script src="jquery.js" type="text/javascript"></script>
<script src="jquerymobile.js" type="text/javascript"></script>
<!-- magnific-popup -->
<script src="jquery.magnific-popup.min.js" type="text/javascript"></script>
<script src="gadget_monitoring_tooltipster.min.js" type="text/javascript"></script>
<script id="panel-template-header" type="text/x-handlebars-template">
<div data-role="header" class="ui-bar-inherit">
<div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-left">
<div class="ui-controlgroup-controls">
<form action="#" method="post">
<input type="submit" data-i18n="[value]Close" data-icon="delete" data-iconpos="notext" value="Close" />
</form>
</div>
</div>
<img class="ui-title" alt="SlapOS Monitoring" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAB2klEQVRIS62V8TkDURDEZyughKhAVEAqQAXoICoQFaACOkAFkgpEB1EBKhjf7+zL90SORG7/SXLZN7M7s/su1BK2tyUdSupVKTNJk4jgc6WIxSzbAF5JOvoF4UHSZURM/2L5RmD7VNJtHvqQtAWQpAtJj9lReU7aWUTc/UYyJ7A9zMpfJEH0JOkmIka2LWkgqZ9kfAd4NzsZtZE0BLaR414S4AeSIDuNiJ5tQJ9LtbbR/y6Jx5L2JR1HBLL9iELAIUwFjANUVJu7eJB8ciaS8OEtInaWElS6kwgoRATaU+F7dnCeYBTBEBD8BxnPlvoRttHyRBLmIQ0HniKi9geiYZka283vBMYvYoxsi11AUCrvM9+2SWr0/2sEV/kfAiaEVstMA8xIXqc0RbJV8EoOeHsUXAiQpyagbaaJ+ceLdYICkZxFHEGA5ixUw5gSoXFDUHuxCottzrFDc4JiMm1h3GsCdUZQlgxg9KYbNrUbgtzkspEAoyG/8WFziZKgXAcYzcJM04tuCJKk3KTNiHXaQZmOnAAuLXzpzoN6/PJNxiMmij2AaJ1Abpb0a0zbTlbzvA54nTuIiHErQWX+f66KWXlvLyWwTYu8rTaNSRsBF2An0UbAFGHWpjH9BL0Y7d/fY0bVAAAAAElFTkSuQmCC"/>
<div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-right">
<div class="ui-controlgroup-controls">
<a href="#" class="ui-btn ui-btn-icon-notext ui-icon-home" data-i18n="Home">Home</a>
</div>
</div>
</div>
</script>
<script id="panel-template-body" type="text/x-handlebars-template">
<div class="ui-content">
<ul data-role="listview" class="ui-listview">
<li><a href="#page=hosting_overview"><i class="fa fa-globe"></i><span data-i18n="Applications Overview">Applications Overview</span></a></li>
<li><a href="#page=overview"><i class="fa fa-cube"></i><span data-i18n="Instances Overview">Instances Overview</span></a></li>
<li><a href="#page=status_list"><i class="fa fa-th-list"></i><span data-i18n="Promises Overview">Promises Overview</span></a></li>
<li><a href="#page=settings_configurator"><i class="fa fa-cog"></i><span data-i18n="Monitoring Configuration">Monitoring Configuration</span></a></li>
<li><a href="#page=import_export"><i class="fa fa-exchange"></i><span data-i18n="Import / Export">Import / Export</span></a></li>
</ul>
</div>
</script>
<!-- custom script -->
<script src="gadget_monitoring_application_panel.js" type="text/javascript"></script>
</head>
<body>
<div class="jqm-navmenu-panel"></div>
</body>
</html>
\ No newline at end of file
...@@ -104,73 +104,6 @@ ...@@ -104,73 +104,6 @@
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
<!DOCTYPE html>\n
<html>\n
<head>\n
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />\n
<meta name="viewport" content="width=device-width, user-scalable=no" />\n
<title>Monitoring Panel Gadget</title>\n
\n
<link rel="stylesheet" href="magnific-popup.css">\n
<link rel="stylesheet" href="gadget_monitoring_tooltipster.css">\n
<link href="gadget_monitoring_custom.css" rel="stylesheet" type="text/css"/>\n
<!-- renderjs -->\n
<script src="rsvp.js" type="text/javascript"></script>\n
<script src="renderjs.js" type="text/javascript"></script>\n
<script src="handlebars.js" type="text/javascript"></script>\n
<script src="gadget_global.js" type="text/javascript"></script>\n
<script src="jquery.js" type="text/javascript"></script>\n
<script src="jquerymobile.js" type="text/javascript"></script>\n
<!-- magnific-popup -->\n
<script src="jquery.magnific-popup.min.js" type="text/javascript"></script>\n
<script src="gadget_monitoring_tooltipster.min.js" type="text/javascript"></script>\n
\n
<script id="panel-template-header" type="text/x-handlebars-template">\n
<div data-role="header" class="ui-bar-inherit">\n
<div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-left">\n
<div class="ui-controlgroup-controls">\n
<form action="#" method="post">\n
<input type="submit" data-i18n="[value]Close" data-icon="delete" data-iconpos="notext" value="Close" />\n
</form>\n
</div>\n
</div>\n
<img class="ui-title" alt="SlapOS Monitoring" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAB2klEQVRIS62V8TkDURDEZyughKhAVEAqQAXoICoQFaACOkAFkgpEB1EBKhjf7+zL90SORG7/SXLZN7M7s/su1BK2tyUdSupVKTNJk4jgc6WIxSzbAF5JOvoF4UHSZURM/2L5RmD7VNJtHvqQtAWQpAtJj9lReU7aWUTc/UYyJ7A9zMpfJEH0JOkmIka2LWkgqZ9kfAd4NzsZtZE0BLaR414S4AeSIDuNiJ5tQJ9LtbbR/y6Jx5L2JR1HBLL9iELAIUwFjANUVJu7eJB8ciaS8OEtInaWElS6kwgoRATaU+F7dnCeYBTBEBD8BxnPlvoRttHyRBLmIQ0HniKi9geiYZka283vBMYvYoxsi11AUCrvM9+2SWr0/2sEV/kfAiaEVstMA8xIXqc0RbJV8EoOeHsUXAiQpyagbaaJ+ceLdYICkZxFHEGA5ixUw5gSoXFDUHuxCottzrFDc4JiMm1h3GsCdUZQlgxg9KYbNrUbgtzkspEAoyG/8WFziZKgXAcYzcJM04tuCJKk3KTNiHXaQZmOnAAuLXzpzoN6/PJNxiMmij2AaJ1Abpb0a0zbTlbzvA54nTuIiHErQWX+f66KWXlvLyWwTYu8rTaNSRsBF2An0UbAFGHWpjH9BL0Y7d/fY0bVAAAAAElFTkSuQmCC"/>\n
<div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-right">\n
<div class="ui-controlgroup-controls">\n
<a href="#" class="ui-btn ui-btn-icon-notext ui-icon-home" data-i18n="Home">Home</a>\n
</div>\n
</div>\n
</div>\n
</script>\n
\n
\n
<script id="panel-template-body" type="text/x-handlebars-template">\n
<div class="ui-content">\n
<ul data-role="listview" class="ui-listview">\n
<li><a href="#page=hosting_overview"><i class="fa fa-globe"></i><span data-i18n="Applications Overview">Applications Overview</span></a></li>\n
<li><a href="#page=overview"><i class="fa fa-cube"></i><span data-i18n="Instances Overview">Instances Overview</span></a></li>\n
<li><a href="#page=status_list"><i class="fa fa-th-list"></i><span data-i18n="Promises Overview">Promises Overview</span></a></li>\n
<li><a href="#page=settings_configurator"><i class="fa fa-cog"></i><span data-i18n="Monitoring Configuration">Monitoring Configuration</span></a></li>\n
<li><a href="#page=import_export"><i class="fa fa-exchange"></i><span data-i18n="Import / Export">Import / Export</span></a></li>\n
</ul>\n
</div>\n
</script>\n
\n
<!-- custom script -->\n
<script src="gadget_monitoring_application_panel.js" type="text/javascript"></script>\n
\n
</head>\n
<body>\n
<div class="jqm-navmenu-panel"></div>\n
</body>\n
</html>
]]></string> </value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Monitoring Application Panel Gadget</string> </value> <value> <string>Monitoring Application Panel Gadget</string> </value>
......
/*jslint nomen: true, indent: 2, maxerr: 3 */
/*global window, rJS, Handlebars, jQuery, RSVP, loopEventListener */
(function (window, rJS, Handlebars, $, RSVP, loopEventListener) {
"use strict";
var gadget_klass = rJS(window),
source_header = gadget_klass.__template_element
.getElementById("panel-template-header")
.innerHTML,
panel_template_header = Handlebars.compile(source_header),
source_body = gadget_klass.__template_element
.getElementById("panel-template-body")
.innerHTML,
panel_template_body = Handlebars.compile(source_body);
gadget_klass
.declareAcquiredMethod("translateHtml", "translateHtml")
// Assign the element to a variable
// Init local properties
.ready(function (g) {
g.props = {};
})
.ready(function (g) {
return g.getElement()
.push(function (element) {
g.props.element = element;
g.props.jelement = $(element.querySelector("div"));
});
})
.ready(function (g) {
g.props.jelement.panel({
display: "overlay",
position: "left",
theme: "b"
// animate: false
});
})
.ready(function (g) {
return g.translateHtml(panel_template_header() + panel_template_body())
.push(function (my_translated_or_plain_html) {
g.props.jelement.html(my_translated_or_plain_html);
g.props.jelement.trigger("create");
});
})
.declareMethod('toggle', function () {
this.props.jelement.panel("toggle");
})
.declareMethod('close', function () {
this.props.jelement.panel("close");
})
.declareMethod('render', function () {
return;
})
/////////////////////////////////////////////////////////////////
// declared services
/////////////////////////////////////////////////////////////////
.declareService(function () {
var panel_gadget,
form_list,
event_list,
i,
len;
function formSubmit() {
panel_gadget.toggle();
}
panel_gadget = this;
form_list = panel_gadget.props.element.querySelectorAll('form');
event_list = [];
// XXX: not robust - Will break when search field is active
for (i = 0, len = form_list.length; i < len; i += 1) {
event_list[i] = loopEventListener(
form_list[i],
'submit',
false,
formSubmit
);
}
return new RSVP.Queue()
.push(function () {
return RSVP.all(event_list);
});
});
}(window, rJS, Handlebars, jQuery, RSVP, loopEventListener));
\ No newline at end of file
...@@ -102,114 +102,6 @@ ...@@ -102,114 +102,6 @@
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
/*jslint nomen: true, indent: 2, maxerr: 3 */\n
/*global window, rJS, Handlebars, jQuery, RSVP, loopEventListener */\n
(function (window, rJS, Handlebars, $, RSVP, loopEventListener) {\n
"use strict";\n
\n
var gadget_klass = rJS(window),\n
source_header = gadget_klass.__template_element\n
.getElementById("panel-template-header")\n
.innerHTML,\n
panel_template_header = Handlebars.compile(source_header),\n
source_body = gadget_klass.__template_element\n
.getElementById("panel-template-body")\n
.innerHTML,\n
panel_template_body = Handlebars.compile(source_body);\n
\n
gadget_klass\n
\n
.declareAcquiredMethod("translateHtml", "translateHtml")\n
\n
// Assign the element to a variable\n
// Init local properties\n
.ready(function (g) {\n
g.props = {};\n
})\n
\n
\n
.ready(function (g) {\n
return g.getElement()\n
.push(function (element) {\n
g.props.element = element;\n
g.props.jelement = $(element.querySelector("div"));\n
});\n
})\n
\n
.ready(function (g) {\n
g.props.jelement.panel({\n
display: "overlay",\n
position: "left",\n
theme: "b"\n
// animate: false\n
});\n
})\n
\n
\n
.ready(function (g) {\n
return g.translateHtml(panel_template_header() + panel_template_body())\n
.push(function (my_translated_or_plain_html) {\n
g.props.jelement.html(my_translated_or_plain_html);\n
g.props.jelement.trigger("create");\n
});\n
})\n
\n
.declareMethod(\'toggle\', function () {\n
this.props.jelement.panel("toggle");\n
})\n
\n
.declareMethod(\'close\', function () {\n
this.props.jelement.panel("close");\n
})\n
\n
.declareMethod(\'render\', function () {\n
return;\n
})\n
\n
/////////////////////////////////////////////////////////////////\n
// declared services\n
/////////////////////////////////////////////////////////////////\n
.declareService(function () {\n
var panel_gadget,\n
form_list,\n
event_list,\n
i,\n
len;\n
\n
\n
function formSubmit() {\n
panel_gadget.toggle();\n
}\n
\n
panel_gadget = this;\n
form_list = panel_gadget.props.element.querySelectorAll(\'form\');\n
event_list = [];\n
\n
// XXX: not robust - Will break when search field is active\n
for (i = 0, len = form_list.length; i < len; i += 1) {\n
event_list[i] = loopEventListener(\n
form_list[i],\n
\'submit\',\n
false,\n
formSubmit\n
);\n
}\n
\n
return new RSVP.Queue()\n
.push(function () {\n
return RSVP.all(event_list);\n
});\n
});\n
\n
\n
}(window, rJS, Handlebars, jQuery, RSVP, loopEventListener));
]]></string> </value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Monitoring Application Panel Gadget JS</string> </value> <value> <string>Monitoring Application Panel Gadget JS</string> </value>
......
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>Chart Gadget</title>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="Chart.min.js"></script>
<!-- custom script -->
<script src="gadget_monitoring_chart.js" type="text/javascript"></script>
</head>
<body>
<canvas height="450" width="600"></canvas>
<div class='legend'></div>
</body>
</html>
\ No newline at end of file
...@@ -104,34 +104,6 @@ ...@@ -104,34 +104,6 @@
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
<!DOCTYPE html>\n
<html>\n
<head>\n
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />\n
<meta name="viewport" content="width=device-width, user-scalable=no" />\n
<title>Chart Gadget</title>\n
\n
<!-- renderjs -->\n
<script src="rsvp.js" type="text/javascript"></script>\n
<script src="renderjs.js" type="text/javascript"></script>\n
<script src="Chart.min.js"></script>\n
\n
<!-- custom script -->\n
<script src="gadget_monitoring_chart.js" type="text/javascript"></script>\n
\n
</head>\n
<body>\n
<canvas height="450" width="600"></canvas>\n
<div class=\'legend\'></div>\n
</body>\n
</html>
]]></string> </value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Monitoring Jio Chart</string> </value> <value> <string>Monitoring Jio Chart</string> </value>
......
/*global window, rJS, Chart, RSVP */
/*jslint nomen: true, indent: 2, maxerr: 3*/
(function (window, rJS, RSVP, Chart) {
"use strict";
rJS(window)
.ready(function (gadget) {
return gadget.getElement()
.push(function (element) {
gadget.property_dict = {
element: element,
render_deferred: RSVP.defer()
};
});
})
.ready(function (gadget) {
// Initialize the gadget local parameters
gadget.property_dict.ctx = gadget.property_dict.element.querySelector('canvas').getContext("2d");
Chart.defaults.global = {
// Boolean - Whether to animate the chart
animation: true,
// Number - Number of animation steps
animationSteps: 60,
// String - Animation easing effect
// Possible effects are:
// [easeInOutQuart, linear, easeOutBounce, easeInBack, easeInOutQuad,
// easeOutQuart, easeOutQuad, easeInOutBounce, easeOutSine, easeInOutCubic,
// easeInExpo, easeInOutBack, easeInCirc, easeInOutElastic, easeOutBack,
// easeInQuad, easeInOutExpo, easeInQuart, easeOutQuint, easeInOutCirc,
// easeInSine, easeOutExpo, easeOutCirc, easeOutCubic, easeInQuint,
// easeInElastic, easeInOutSine, easeInOutQuint, easeInBounce,
// easeOutElastic, easeInCubic]
animationEasing: "easeOutQuart",
// Boolean - If we should show the scale at all
showScale: true,
// Boolean - If we want to override with a hard coded scale
scaleOverride: false,
// ** Required if scaleOverride is true **
// Number - The number of steps in a hard coded scale
scaleSteps: null,
// Number - The value jump in the hard coded scale
scaleStepWidth: null,
// Number - The scale starting value
scaleStartValue: null,
// String - Colour of the scale line
scaleLineColor: "rgba(0,0,0,.1)",
// Number - Pixel width of the scale line
scaleLineWidth: 1,
// Boolean - Whether to show labels on the scale
scaleShowLabels: true,
// Interpolated JS string - can access value
scaleLabel: "<%=value%>",
// Boolean - Whether the scale should stick to integers, not floats even if drawing space is there
scaleIntegersOnly: true,
// Boolean - Whether the scale should start at zero, or an order of magnitude down from the lowest value
scaleBeginAtZero: false,
// String - Scale label font declaration for the scale label
scaleFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
// Number - Scale label font size in pixels
scaleFontSize: 12,
// String - Scale label font weight style
scaleFontStyle: "normal",
// String - Scale label font colour
scaleFontColor: "#666",
// Boolean - whether or not the chart should be responsive and resize when the browser does.
responsive: true,
// Boolean - whether to maintain the starting aspect ratio or not when responsive, if set to false, will take up entire container
maintainAspectRatio: true,
// Boolean - Determines whether to draw tooltips on the canvas or not
showTooltips: true,
// Function - Determines whether to execute the customTooltips function instead of drawing the built in tooltips (See [Advanced - External Tooltips](#advanced-usage-custom-tooltips))
customTooltips: false,
// Array - Array of string names to attach tooltip events
tooltipEvents: ["mousemove", "touchstart", "touchmove"],
// String - Tooltip background colour
tooltipFillColor: "rgba(0,0,0,0.8)",
// String - Tooltip label font declaration for the scale label
tooltipFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
// Number - Tooltip label font size in pixels
tooltipFontSize: 14,
// String - Tooltip font weight style
tooltipFontStyle: "normal",
// String - Tooltip label font colour
tooltipFontColor: "#fff",
// String - Tooltip title font declaration for the scale label
tooltipTitleFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
// Number - Tooltip title font size in pixels
tooltipTitleFontSize: 14,
// String - Tooltip title font weight style
tooltipTitleFontStyle: "bold",
// String - Tooltip title font colour
tooltipTitleFontColor: "#fff",
// Number - pixel width of padding around tooltip text
tooltipYPadding: 6,
// Number - pixel width of padding around tooltip text
tooltipXPadding: 6,
// Number - Size of the caret on the tooltip
tooltipCaretSize: 8,
// Number - Pixel radius of the tooltip border
tooltipCornerRadius: 6,
// Number - Pixel offset from point x to tooltip edge
tooltipXOffset: 10,
// String - Template string for single tooltips
tooltipTemplate: "<%if (label){%><%=label%>: <%}%><%= value %>",
// String - Template string for multiple tooltips
multiTooltipTemplate: "<%= value %>",
// Function - Will fire on animation progression.
onAnimationProgress: function(){},
// Function - Will fire on animation completion.
onAnimationComplete: function(){}
};
})
.declareMethod('render', function (options) {
var gadget = this;
gadget.property_dict.options = options;
})
.declareMethod('addData', function (valuesArray, label) {
return gadget.property_dict.chart.addData(valuesArray, label);
})
.declareMethod('removeData', function () {
return gadget.property_dict.chart.removeData();
})
.declareMethod('addDataIndex', function (segmentData, index) {
return gadget.property_dict.chart.addData(segmentData, index);
})
.declareMethod('removeDataIndex', function (index) {
return gadget.property_dict.chart.removeData(index);
})
.declareMethod('update', function () {
return gadget.property_dict.chart.update();
})
.declareMethod('clear', function () {
return gadget.property_dict.chart.clear();
})
.declareMethod('stop', function () {
return gadget.property_dict.chart.stop();
})
.declareMethod('redraw', function () {
return gadget.property_dict.chart.render();
})
.declareMethod('resize', function () {
return gadget.property_dict.chart.resize();
})
.declareMethod('toBase64Image', function () {
return gadget.property_dict.chart.toBase64Image();
})
.declareMethod('destroy', function () {
return gadget.property_dict.chart.destroy();
})
.declareMethod('generateLegend', function () {
return gadget.property_dict.chart.generateLegend();
})
.declareService(function () {
var gadget = this;
return new RSVP.Queue()
.push(function () {
var options = gadget.property_dict.options,
promise_list = [];
switch (options.type) {
case "line": promise_list.push(
new Chart(gadget.property_dict.ctx).Line(options.data, options.config)
);
break;
case "bar": promise_list.push(
new Chart(gadget.property_dict.ctx).Bar(options.data, options.config)
);
break;
case "pie": promise_list.push(
new Chart(gadget.property_dict.ctx).Pie(options.data, options.config)
);
break;
case "doughnut": promise_list.push(
new Chart(gadget.property_dict.ctx).Doughnut(options.data, options.config)
);
break;
default: return [];
}
return new RSVP.Queue()
.push(function () {
return RSVP.all(promise_list);
})
.push(function (result_list) {
gadget.property_dict.chart = result_list[0];
gadget.property_dict.element.querySelector('.legend')
.innerHTML += gadget.property_dict.chart.generateLegend();
return gadget.property_dict.chart.render();
});
})
.push(function () {
var promise_list = [];
promise_list.push(window.addEventListener("load", function () {
console.log(gadget.property_dict.chart.generateLegend());
return gadget.property_dict.chart.render();
}));
return RSVP.all(promise_list);
});
});
}(window, rJS, RSVP, Chart));
...@@ -102,256 +102,6 @@ ...@@ -102,256 +102,6 @@
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
/*global window, rJS, Chart, RSVP */\n
/*jslint nomen: true, indent: 2, maxerr: 3*/\n
(function (window, rJS, RSVP, Chart) {\n
"use strict";\n
\n
rJS(window)\n
\n
.ready(function (gadget) {\n
return gadget.getElement()\n
.push(function (element) {\n
gadget.property_dict = {\n
element: element,\n
render_deferred: RSVP.defer()\n
};\n
});\n
})\n
.ready(function (gadget) {\n
// Initialize the gadget local parameters\n
gadget.property_dict.ctx = gadget.property_dict.element.querySelector(\'canvas\').getContext("2d");\n
Chart.defaults.global = {\n
// Boolean - Whether to animate the chart\n
animation: true,\n
\n
// Number - Number of animation steps\n
animationSteps: 60,\n
\n
// String - Animation easing effect\n
// Possible effects are:\n
// [easeInOutQuart, linear, easeOutBounce, easeInBack, easeInOutQuad,\n
// easeOutQuart, easeOutQuad, easeInOutBounce, easeOutSine, easeInOutCubic,\n
// easeInExpo, easeInOutBack, easeInCirc, easeInOutElastic, easeOutBack,\n
// easeInQuad, easeInOutExpo, easeInQuart, easeOutQuint, easeInOutCirc,\n
// easeInSine, easeOutExpo, easeOutCirc, easeOutCubic, easeInQuint,\n
// easeInElastic, easeInOutSine, easeInOutQuint, easeInBounce,\n
// easeOutElastic, easeInCubic]\n
animationEasing: "easeOutQuart",\n
\n
// Boolean - If we should show the scale at all\n
showScale: true,\n
\n
// Boolean - If we want to override with a hard coded scale\n
scaleOverride: false,\n
\n
// ** Required if scaleOverride is true **\n
// Number - The number of steps in a hard coded scale\n
scaleSteps: null,\n
// Number - The value jump in the hard coded scale\n
scaleStepWidth: null,\n
// Number - The scale starting value\n
scaleStartValue: null,\n
\n
// String - Colour of the scale line\n
scaleLineColor: "rgba(0,0,0,.1)",\n
\n
// Number - Pixel width of the scale line\n
scaleLineWidth: 1,\n
\n
// Boolean - Whether to show labels on the scale\n
scaleShowLabels: true,\n
\n
// Interpolated JS string - can access value\n
scaleLabel: "<%=value%>",\n
\n
// Boolean - Whether the scale should stick to integers, not floats even if drawing space is there\n
scaleIntegersOnly: true,\n
\n
// Boolean - Whether the scale should start at zero, or an order of magnitude down from the lowest value\n
scaleBeginAtZero: false,\n
\n
// String - Scale label font declaration for the scale label\n
scaleFontFamily: "\'Helvetica Neue\', \'Helvetica\', \'Arial\', sans-serif",\n
\n
// Number - Scale label font size in pixels\n
scaleFontSize: 12,\n
\n
// String - Scale label font weight style\n
scaleFontStyle: "normal",\n
\n
// String - Scale label font colour\n
scaleFontColor: "#666",\n
\n
// Boolean - whether or not the chart should be responsive and resize when the browser does.\n
responsive: true,\n
\n
// Boolean - whether to maintain the starting aspect ratio or not when responsive, if set to false, will take up entire container\n
maintainAspectRatio: true,\n
\n
// Boolean - Determines whether to draw tooltips on the canvas or not\n
showTooltips: true,\n
\n
// Function - Determines whether to execute the customTooltips function instead of drawing the built in tooltips (See [Advanced - External Tooltips](#advanced-usage-custom-tooltips))\n
customTooltips: false,\n
\n
// Array - Array of string names to attach tooltip events\n
tooltipEvents: ["mousemove", "touchstart", "touchmove"],\n
\n
// String - Tooltip background colour\n
tooltipFillColor: "rgba(0,0,0,0.8)",\n
\n
// String - Tooltip label font declaration for the scale label\n
tooltipFontFamily: "\'Helvetica Neue\', \'Helvetica\', \'Arial\', sans-serif",\n
\n
// Number - Tooltip label font size in pixels\n
tooltipFontSize: 14,\n
\n
// String - Tooltip font weight style\n
tooltipFontStyle: "normal",\n
\n
// String - Tooltip label font colour\n
tooltipFontColor: "#fff",\n
\n
// String - Tooltip title font declaration for the scale label\n
tooltipTitleFontFamily: "\'Helvetica Neue\', \'Helvetica\', \'Arial\', sans-serif",\n
\n
// Number - Tooltip title font size in pixels\n
tooltipTitleFontSize: 14,\n
\n
// String - Tooltip title font weight style\n
tooltipTitleFontStyle: "bold",\n
\n
// String - Tooltip title font colour\n
tooltipTitleFontColor: "#fff",\n
\n
// Number - pixel width of padding around tooltip text\n
tooltipYPadding: 6,\n
\n
// Number - pixel width of padding around tooltip text\n
tooltipXPadding: 6,\n
\n
// Number - Size of the caret on the tooltip\n
tooltipCaretSize: 8,\n
\n
// Number - Pixel radius of the tooltip border\n
tooltipCornerRadius: 6,\n
\n
// Number - Pixel offset from point x to tooltip edge\n
tooltipXOffset: 10,\n
\n
// String - Template string for single tooltips\n
tooltipTemplate: "<%if (label){%><%=label%>: <%}%><%= value %>",\n
\n
// String - Template string for multiple tooltips\n
multiTooltipTemplate: "<%= value %>",\n
\n
// Function - Will fire on animation progression.\n
onAnimationProgress: function(){},\n
\n
// Function - Will fire on animation completion.\n
onAnimationComplete: function(){}\n
};\n
})\n
\n
.declareMethod(\'render\', function (options) {\n
var gadget = this;\n
gadget.property_dict.options = options;\n
\n
})\n
.declareMethod(\'addData\', function (valuesArray, label) {\n
return gadget.property_dict.chart.addData(valuesArray, label);\n
})\n
.declareMethod(\'removeData\', function () {\n
return gadget.property_dict.chart.removeData();\n
})\n
.declareMethod(\'addDataIndex\', function (segmentData, index) {\n
return gadget.property_dict.chart.addData(segmentData, index);\n
})\n
.declareMethod(\'removeDataIndex\', function (index) {\n
return gadget.property_dict.chart.removeData(index);\n
})\n
.declareMethod(\'update\', function () {\n
return gadget.property_dict.chart.update();\n
})\n
.declareMethod(\'clear\', function () {\n
return gadget.property_dict.chart.clear();\n
})\n
.declareMethod(\'stop\', function () {\n
return gadget.property_dict.chart.stop();\n
})\n
.declareMethod(\'redraw\', function () {\n
return gadget.property_dict.chart.render();\n
})\n
.declareMethod(\'resize\', function () {\n
return gadget.property_dict.chart.resize();\n
})\n
.declareMethod(\'toBase64Image\', function () {\n
return gadget.property_dict.chart.toBase64Image();\n
})\n
.declareMethod(\'destroy\', function () {\n
return gadget.property_dict.chart.destroy();\n
})\n
.declareMethod(\'generateLegend\', function () {\n
return gadget.property_dict.chart.generateLegend();\n
})\n
\n
.declareService(function () {\n
var gadget = this;\n
return new RSVP.Queue()\n
.push(function () {\n
var options = gadget.property_dict.options,\n
promise_list = [];\n
switch (options.type) {\n
case "line": promise_list.push(\n
new Chart(gadget.property_dict.ctx).Line(options.data, options.config)\n
);\n
break;\n
case "bar": promise_list.push(\n
new Chart(gadget.property_dict.ctx).Bar(options.data, options.config)\n
);\n
break;\n
case "pie": promise_list.push(\n
new Chart(gadget.property_dict.ctx).Pie(options.data, options.config)\n
);\n
break;\n
case "doughnut": promise_list.push(\n
new Chart(gadget.property_dict.ctx).Doughnut(options.data, options.config)\n
);\n
break;\n
default: return [];\n
}\n
return new RSVP.Queue()\n
.push(function () {\n
return RSVP.all(promise_list);\n
})\n
.push(function (result_list) {\n
gadget.property_dict.chart = result_list[0];\n
gadget.property_dict.element.querySelector(\'.legend\')\n
.innerHTML += gadget.property_dict.chart.generateLegend();\n
return gadget.property_dict.chart.render();\n
});\n
})\n
.push(function () {\n
var promise_list = [];\n
promise_list.push(window.addEventListener("load", function () {\n
console.log(gadget.property_dict.chart.generateLegend());\n
return gadget.property_dict.chart.render();\n
}));\n
return RSVP.all(promise_list);\n
});\n
});\n
\n
\n
}(window, rJS, RSVP, Chart));\n
]]></string> </value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Monitoring Chart Gadget JS</string> </value> <value> <string>Monitoring Chart Gadget JS</string> </value>
......
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>Monitoring Document Edit Page</title>
<link rel="stylesheet" href="magnific-popup.css">
<link href="gadget_monitoring_custom.css" rel="stylesheet" type="text/css"/>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script id="login-toltip-template" type="text/x-handlebars-template">
</script>
<!-- magnific-popup -->
<script src="jquery.magnific-popup.min.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_monitoring_document_edit.js" type="text/javascript"></script>
</head>
<body>
<div data-gadget-url="gadget_monitoring_jio.html" data-gadget-scope="jio_gadget" data-gadget-sandbox="public"></div>
<div data-gadget-url="gadget_monitoring_login_widget.html" data-gadget-scope="login_gadget" data-gadget-sandbox="public"></div>
<div class="white-popup mfp-hide">
<div class="ui-promise-title"><h2 style="font-size: 1.1em;"></h2></div>
<form>
<div data-role="content">
<div class="form-controlgroup">
</div>
</div>
<div class="padding-5">
<span class="ui-text-error"></span>
</div>
<div>
<button type="button" class="ui-btn ui-corner-all ui-btn-inline cancel"><i class="fa fa-times"></i> Cancel</button>
<button type="submit" class="ui-btn ui-corner-all ui-btn-inline save"><i class="fa fa-floppy-o"></i> Save</button>
<div class="ui-content-hidden spinner">
<i class="fa fa-spinner fa-spin"></i>
</div>
</div>
</form>
</div>
</body>
</html>
\ No newline at end of file
...@@ -104,60 +104,6 @@ ...@@ -104,60 +104,6 @@
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
<!DOCTYPE html>\n
<html>\n
<head>\n
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />\n
<meta name="viewport" content="width=device-width, user-scalable=no" />\n
<title>Monitoring Document Edit Page</title>\n
\n
<link rel="stylesheet" href="magnific-popup.css">\n
<link href="gadget_monitoring_custom.css" rel="stylesheet" type="text/css"/>\n
<!-- renderjs -->\n
<script src="rsvp.js" type="text/javascript"></script>\n
<script src="renderjs.js" type="text/javascript"></script>\n
\n
<script id="login-toltip-template" type="text/x-handlebars-template">\n
</script>\n
\n
<!-- magnific-popup -->\n
<script src="jquery.magnific-popup.min.js" type="text/javascript"></script>\n
<!-- custom script -->\n
<script src="gadget_monitoring_document_edit.js" type="text/javascript"></script>\n
\n
</head>\n
<body>\n
<div data-gadget-url="gadget_monitoring_jio.html" data-gadget-scope="jio_gadget" data-gadget-sandbox="public"></div>\n
<div data-gadget-url="gadget_monitoring_login_widget.html" data-gadget-scope="login_gadget" data-gadget-sandbox="public"></div>\n
<div class="white-popup mfp-hide">\n
<div class="ui-promise-title"><h2 style="font-size: 1.1em;"></h2></div>\n
<form>\n
<div data-role="content">\n
<div class="form-controlgroup">\n
\n
</div>\n
</div>\n
<div class="padding-5">\n
<span class="ui-text-error"></span>\n
</div>\n
<div>\n
<button type="button" class="ui-btn ui-corner-all ui-btn-inline cancel"><i class="fa fa-times"></i> Cancel</button>\n
<button type="submit" class="ui-btn ui-corner-all ui-btn-inline save"><i class="fa fa-floppy-o"></i> Save</button>\n
<div class="ui-content-hidden spinner">\n
<i class="fa fa-spinner fa-spin"></i>\n
</div>\n
</div>\n
</form>\n
</div>\n
</body>\n
</html>
]]></string> </value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Monitoring Document Edit widget</string> </value> <value> <string>Monitoring Document Edit widget</string> </value>
......
/*global document, window, rJS, $ */
/*jslint nomen: true, indent: 2, maxerr: 3*/
(function (window, document, rJS, $) {
"use strict";
var gadget_klass = rJS(window),
templater = gadget_klass.__template_element;
function getHtmlFromJson(parameter_list) {
var i,
html_content = '';
for (i = 0; i < parameter_list.length; i += 1) {
html_content += '<span class="label-text">' + parameter_list[i].title + ':</span>\n';
if (parameter_list[i].key) {
html_content += '<input type="text" name="' + parameter_list[i].key +
'" placeholder="' + parameter_list[i].title + '" value="' +
parameter_list[i].value +'" data-mini="true">\n';
} else {
html_content += '<input type="text" name="' + parameter_list[i].key +
'" placeholder="' + parameter_list[i].title + '" value="'+
parameter_list[i].value +'" data-mini="true" disabled="disabled">\n';
}
}
return html_content;
}
function getFormDataList(formElement, parameter_list) {
var i,
formData_list = [];
for (i = 0; i < parameter_list.length; i += 1) {
formData_list.push(parameter_list[i]);
if (parameter_list[i].key) {
// Editable fields
if (formElement.querySelector('input[name="' + parameter_list[i].key + '"]').value !== undefined) {
formData_list[i].value = formElement.querySelector('input[name="' + parameter_list[i].key + '"]').value;
}
}
}
return formData_list;
}
function saveDocument(gadget, jio_document) {
// Authenticate before save
// Normally password should already exists otherwise will redirect to login box and edited data will be lost!!!
return gadget.props.login_gadget.loginRedirect(
gadget.props.options.url,
gadget.props.options.page_options,
gadget.props.options.title,
gadget.props.options.root_title
)
.push(function (cred) {
var url = gadget.props.options.url;
if (gadget.props.options.path) {
url += (url.endsWith('/') ? '':'/') + gadget.props.options.path;
}
gadget.props.jio_gadget.createJio({
type: "query",
sub_storage: {
type: "drivetojiomapping",
sub_storage: {
type: "dav",
url: url,
basic_login: cred.hash
}
}
});
return gadget.props.jio_gadget.put(gadget.props.options.key, jio_document);
})
.push(function (result) {
return {status: 'OK'};
}, function (error) {
console.log(error);
return {status: 'ERROR', code: error.target.status};
});
}
gadget_klass
.ready(function (g) {
g.props = {};
return g.getElement()
.push(function (element) {
g.props.element = element;
g.props.deferred = RSVP.defer();
});
})
.ready(function (gadget) {
return gadget.getDeclaredGadget("jio_gadget")
.push(function (jio_gadget) {
gadget.props.jio_gadget = jio_gadget;
});
})
.ready(function (gadget) {
return gadget.getDeclaredGadget("login_gadget")
.push(function (login_gadget) {
gadget.props.login_gadget = login_gadget;
});
})
.declareMethod("render", function (options) {
var gadget = this;
return new RSVP.Queue()
.push(function () {
return gadget.props.deferred.resolve();
});
})
.declareMethod("popupEdit", function (options, updateMethod) {
var gadget = this,
title = 'Edit ' + (options.title || 'Monitoring Parameters'),
html_form = '';
gadget.props.options = options;
html_form = getHtmlFromJson(options.parameters || []);
gadget.props.element.querySelector('.form-controlgroup')
.innerHTML = html_form;
gadget.props.element.querySelector('.ui-promise-title h2')
.innerHTML = title;
return new RSVP.Queue()
.push(function () {
return $.magnificPopup.open({
items: {
src: '.white-popup',
type: 'inline'
},
closeBtnInside: true,
callbacks: {
open: function() {
return new RSVP.Queue()
.push(function () {
return $('.white-popup form').trigger("create");
})
.push(function () {
var promise_list = [];
promise_list.push(loopEventListener(
document.querySelector('.mfp-content form .cancel'),
'click',
false,
function (evt) {
return $.magnificPopup.close();
}
));
promise_list.push(loopEventListener(
document.querySelector('.mfp-content form .save'),
'click',
false,
function (evt) {
var data = getFormDataList(document.querySelector('.mfp-content form'), options.parameters);
return new RSVP.Queue()
.push(function () {
$(document.querySelector('.mfp-content spinner')).toggleClass('ui-content-hidden');
return RSVP.all([saveDocument(gadget, data)]);
})
.push(function (result) {
if (result[0].status === 'ERROR') {
document.querySelector('.mfp-content .ui-text-error')
.innerHTML = 'ERROR ' + result[0].code + ': Failed to save your document!';
} else {
$.magnificPopup.close();
return updateMethod(data);}
})
.push(function () {
$(document.querySelector('.mfp-content spinner')).toggleClass('ui-content-hidden');
});
}
));
return RSVP.all(promise_list);
});
},
close: function() {
// Will fire when popup is closed
$('.white-popup').remove();
}
}
});
})
.push(function () {
return gadget.props.deferred.resolve();
});
})
.declareService(function () {
var gadget = this;
return new RSVP.Queue()
.push(function () {
return gadget.props.deferred.promise;
})
.push(function () {
});
});
}(window, document, rJS, $));
...@@ -106,213 +106,6 @@ ...@@ -106,213 +106,6 @@
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
/*global document, window, rJS, $ */\n
/*jslint nomen: true, indent: 2, maxerr: 3*/\n
(function (window, document, rJS, $) {\n
"use strict";\n
\n
var gadget_klass = rJS(window),\n
templater = gadget_klass.__template_element;\n
\n
function getHtmlFromJson(parameter_list) {\n
var i,\n
html_content = \'\';\n
\n
for (i = 0; i < parameter_list.length; i += 1) {\n
html_content += \'<span class="label-text">\' + parameter_list[i].title + \':</span>\\n\';\n
if (parameter_list[i].key) {\n
html_content += \'<input type="text" name="\' + parameter_list[i].key +\n
\'" placeholder="\' + parameter_list[i].title + \'" value="\' +\n
parameter_list[i].value +\'" data-mini="true">\\n\';\n
} else {\n
html_content += \'<input type="text" name="\' + parameter_list[i].key +\n
\'" placeholder="\' + parameter_list[i].title + \'" value="\'+\n
parameter_list[i].value +\'" data-mini="true" disabled="disabled">\\n\';\n
}\n
}\n
return html_content;\n
}\n
\n
function getFormDataList(formElement, parameter_list) {\n
var i,\n
formData_list = [];\n
for (i = 0; i < parameter_list.length; i += 1) {\n
formData_list.push(parameter_list[i]);\n
if (parameter_list[i].key) {\n
// Editable fields\n
if (formElement.querySelector(\'input[name="\' + parameter_list[i].key + \'"]\').value !== undefined) {\n
formData_list[i].value = formElement.querySelector(\'input[name="\' + parameter_list[i].key + \'"]\').value;\n
}\n
}\n
}\n
return formData_list;\n
}\n
\n
function saveDocument(gadget, jio_document) {\n
// Authenticate before save\n
// Normally password should already exists otherwise will redirect to login box and edited data will be lost!!!\n
return gadget.props.login_gadget.loginRedirect(\n
gadget.props.options.url,\n
gadget.props.options.page_options,\n
gadget.props.options.title,\n
gadget.props.options.root_title\n
)\n
.push(function (cred) {\n
var url = gadget.props.options.url;\n
if (gadget.props.options.path) {\n
url += (url.endsWith(\'/\') ? \'\':\'/\') + gadget.props.options.path;\n
}\n
gadget.props.jio_gadget.createJio({\n
type: "query",\n
sub_storage: {\n
type: "drivetojiomapping",\n
sub_storage: {\n
type: "dav",\n
url: url,\n
basic_login: cred.hash\n
}\n
}\n
});\n
return gadget.props.jio_gadget.put(gadget.props.options.key, jio_document);\n
})\n
.push(function (result) {\n
return {status: \'OK\'};\n
}, function (error) {\n
console.log(error);\n
return {status: \'ERROR\', code: error.target.status};\n
});\n
\n
}\n
\n
gadget_klass\n
.ready(function (g) {\n
g.props = {};\n
\n
return g.getElement()\n
.push(function (element) {\n
g.props.element = element;\n
g.props.deferred = RSVP.defer();\n
});\n
})\n
.ready(function (gadget) {\n
return gadget.getDeclaredGadget("jio_gadget")\n
.push(function (jio_gadget) {\n
gadget.props.jio_gadget = jio_gadget;\n
});\n
})\n
.ready(function (gadget) {\n
return gadget.getDeclaredGadget("login_gadget")\n
.push(function (login_gadget) {\n
gadget.props.login_gadget = login_gadget;\n
});\n
})\n
.declareMethod("render", function (options) {\n
var gadget = this;\n
return new RSVP.Queue()\n
.push(function () {\n
return gadget.props.deferred.resolve();\n
});\n
})\n
.declareMethod("popupEdit", function (options, updateMethod) {\n
var gadget = this,\n
title = \'Edit \' + (options.title || \'Monitoring Parameters\'),\n
html_form = \'\';\n
\n
gadget.props.options = options;\n
html_form = getHtmlFromJson(options.parameters || []);\n
\n
gadget.props.element.querySelector(\'.form-controlgroup\')\n
.innerHTML = html_form;\n
gadget.props.element.querySelector(\'.ui-promise-title h2\')\n
.innerHTML = title;\n
\n
return new RSVP.Queue()\n
.push(function () {\n
return $.magnificPopup.open({\n
items: {\n
src: \'.white-popup\',\n
type: \'inline\'\n
},\n
closeBtnInside: true,\n
callbacks: {\n
open: function() {\n
return new RSVP.Queue()\n
.push(function () {\n
return $(\'.white-popup form\').trigger("create");\n
})\n
.push(function () {\n
var promise_list = [];\n
\n
promise_list.push(loopEventListener(\n
document.querySelector(\'.mfp-content form .cancel\'),\n
\'click\',\n
false,\n
function (evt) {\n
return $.magnificPopup.close();\n
}\n
));\n
promise_list.push(loopEventListener(\n
document.querySelector(\'.mfp-content form .save\'),\n
\'click\',\n
false,\n
function (evt) {\n
var data = getFormDataList(document.querySelector(\'.mfp-content form\'), options.parameters);\n
return new RSVP.Queue()\n
.push(function () {\n
$(document.querySelector(\'.mfp-content spinner\')).toggleClass(\'ui-content-hidden\');\n
return RSVP.all([saveDocument(gadget, data)]);\n
})\n
.push(function (result) {\n
if (result[0].status === \'ERROR\') {\n
document.querySelector(\'.mfp-content .ui-text-error\')\n
.innerHTML = \'ERROR \' + result[0].code + \': Failed to save your document!\';\n
} else {\n
$.magnificPopup.close();\n
return updateMethod(data);}\n
})\n
.push(function () {\n
$(document.querySelector(\'.mfp-content spinner\')).toggleClass(\'ui-content-hidden\');\n
});\n
}\n
));\n
return RSVP.all(promise_list);\n
});\n
},\n
close: function() {\n
// Will fire when popup is closed\n
$(\'.white-popup\').remove();\n
}\n
}\n
});\n
})\n
.push(function () {\n
return gadget.props.deferred.resolve();\n
});\n
})\n
\n
\n
.declareService(function () {\n
var gadget = this;\n
\n
return new RSVP.Queue()\n
.push(function () {\n
return gadget.props.deferred.promise;\n
})\n
.push(function () {\n
\n
});\n
});\n
\n
}(window, document, rJS, $));\n
\n
]]></string> </value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Monitoring Document Edit Widget JS</string> </value> <value> <string>Monitoring Document Edit Widget JS</string> </value>
......
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>OfficeJS Header</title>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="handlebars.js" type="text/javascript"></script>
<script src="gadget_global.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_monitoring_header.js" type="text/javascript"></script>
<script id="header-title-link-template" type="text/x-handlebars-template"><a data-i18n="{{title}}" class="ui-btn ui-btn-icon-left ui-icon-arrow-down" href="{{url}}">{{title}}</a></script>
<script id="header-title-template" type="text/x-handlebars-template"><span data-i18n="{{title}}">{{title}}</span></script>
<script id="header-link-template" type="text/x-handlebars-template">
<a role="button" data-i18n="{{title}}" href="{{url}}" class="responsive ui-btn ui-icon-{{icon}} ui-btn-icon-left ui-first-child ui-last-child {{class}}">{{title}}</a>
</script>
<script id="header-button-template" type="text/x-handlebars-template">
<form><button name='{{name}}' data-i18n="{{title}}" type='submit' class='responsive ui-btn ui-icon-{{icon}} ui-btn-icon-left ui-first-child ui-last-child {{class}}'>{{title}}</button></form>
</script>
</head>
<body>
<!--div data-role="header" data-theme="a" class="ui-header ui-bar-a" data-position="fixed" data-tap-toggle="false"-->
<div data-role="header" data-position="fixed" data-theme="a" class="ui-header ui-bar-a" data-tap-toggle="false">
<div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-left">
<div class="ui-controlgroup-controls">
</div>
</div>
<h1 class="ui-title"></h1>
<div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-right">
<div class="ui-controlgroup-controls">
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
...@@ -106,62 +106,6 @@ ...@@ -106,62 +106,6 @@
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
<!DOCTYPE html>\n
<html>\n
<head>\n
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />\n
<meta name="viewport" content="width=device-width, user-scalable=no" />\n
<title>OfficeJS Header</title>\n
\n
<!-- renderjs -->\n
<script src="rsvp.js" type="text/javascript"></script>\n
<script src="renderjs.js" type="text/javascript"></script>\n
<script src="handlebars.js" type="text/javascript"></script>\n
<script src="gadget_global.js" type="text/javascript"></script>\n
\n
<!-- custom script -->\n
<script src="gadget_monitoring_header.js" type="text/javascript"></script>\n
\n
<script id="header-title-link-template" type="text/x-handlebars-template"><a data-i18n="{{title}}" class="ui-btn ui-btn-icon-left ui-icon-arrow-down" href="{{url}}">{{title}}</a></script>\n
<script id="header-title-template" type="text/x-handlebars-template"><span data-i18n="{{title}}">{{title}}</span></script>\n
\n
<script id="header-link-template" type="text/x-handlebars-template">\n
<a role="button" data-i18n="{{title}}" href="{{url}}" class="responsive ui-btn ui-icon-{{icon}} ui-btn-icon-left ui-first-child ui-last-child {{class}}">{{title}}</a>\n
</script>\n
\n
<script id="header-button-template" type="text/x-handlebars-template">\n
<form><button name=\'{{name}}\' data-i18n="{{title}}" type=\'submit\' class=\'responsive ui-btn ui-icon-{{icon}} ui-btn-icon-left ui-first-child ui-last-child {{class}}\'>{{title}}</button></form>\n
</script>\n
\n
</head>\n
<body>\n
\n
<!--div data-role="header" data-theme="a" class="ui-header ui-bar-a" data-position="fixed" data-tap-toggle="false"-->\n
<div data-role="header" data-position="fixed" data-theme="a" class="ui-header ui-bar-a" data-tap-toggle="false">\n
\n
<div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-left">\n
<div class="ui-controlgroup-controls">\n
</div>\n
</div>\n
\n
<h1 class="ui-title"></h1>\n
\n
<div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-right">\n
<div class="ui-controlgroup-controls">\n
</div>\n
</div>\n
\n
</div>\n
\n
</body>\n
</html>
]]></string> </value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Gadget Monitoring Header</string> </value> <value> <string>Gadget Monitoring Header</string> </value>
......
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Monitoring Hosting Subscription</title>
<link href="gadget_monitoring_custom.css" rel="stylesheet" type="text/css"/>
<script src="rsvp.js"></script>
<script src="renderjs.js"></script>
<script id="template-hostings-list" type="text/x-handlebars-template">
{{#each hosting_list}}
<tr rel={{index}}>
<td>
<a class="ui-link" href="#{{status}}"><span class="label label-{{status}}">{{status}}</span></a>
</td>
<td>
<a class="ui-link" href="">{{title}}</a>
</td>
<td>
<a class="ui-link" href="">{{date}}</a>
</td>
</tr>
{{/each}}
</script>
<script id="instance-details-widget-overview" type="text/x-handlebars-template">
{{#if status_list_url}}
<div data-role="controlgroup">
<a class="ui-btn ui-corner-all" href="{{status_list_url}}" title="Public"><i class="fa fa-check-square"></i> View Promises Status</a>
</div>
{{/if}}
<div class="ui-listview-container">
<ul data-role="listview" class="ui-listview-outer" data-inset="true">
{{#each instance_list}}
<li>
<a href="#" class="ui-btn ui-btn-icon-right ui-icon-plus">
<span class="ui-status-icon ui-status-{{status}}"></span>
<span class="ui-status-text">{{title}}</span>
</a>
<div class="ui-collapse-content ui-content-hidden">
<fieldset>
<div class="ui-field-contain">
<fieldset data-role="controlgroup" data-type="horizontal">
{{#if resource_url }}
<a href="{{resource_url}}" class="ui-btn ui-corner-all ui-btn-inline ui-mini"><i class="fa fa-pie-chart"></i> Resources</a>
{{/if}}
{{#if process_url }}
<a href="{{process_url}}" class="ui-btn ui-corner-all ui-btn-inline ui-mini"><i class="fa fa-list-alt"></i> Processes</a>
{{/if}}
{{#if rss_url}}
<a class="ui-btn ui-corner-all ui-btn-inline ui-mini" target='_blank' href="{{rss_url}}" title="RSS"><i class="fa fa-rss-square"></i> RSS</a>
{{/if}}
<!--
{{#if public_url}}
<a class="ui-btn ui-corner-all ui-btn-inline ui-mini" target='_blank' href="{{public_url}}" title="Public"><i class="fa fa-folder-open-o"></i> Public</a>
{{/if}}
{{#if private_url}}
<a class="ui-btn ui-corner-all ui-btn-inline ui-mini" target='_blank' href="{{private_url}}" title="Private"><i class="fa fa-lock"></i> Private</a>
{{/if}}
-->
</fieldset>
</div>
<table data-role="table" data-mode="columntoggle" class="ui-responsive table-stroke">
<tr>
<th><i class="fa fa-tachometer"></i> <strong>Status</strong></th>
<td><span class="label label-{{status}}">{{status}}</span></td>
<td>{{date}}</td>
</tr>
{{#with instance}}
<tr>
<th><i class="fa fa-desktop"></i> <strong>Computer</strong></th>
<td>{{computer}}</td>
<td>{{partition}}</td>
</tr>
<tr>
<th><i class="fa fa-globe"></i> <strong>IP Address</strong></th>
<td>{{ipv4}}</td>
<td>{{ipv6}}</td>
</tr>
{{/with}}
</table>
</fieldset>
</div>
</li>
{{/each}}
</ul>
</div>
</script>
<script id="parameters-widget-template" type="text/x-handlebars-template">
{{#if parameter_list}}
{{#each parameter_list}}
{{#if parameters}}
<h3 class="margin-0 padding-tb-10">{{title}} <i class="fa fa-angle-up"></i></h3>
<table data-role="table" data-mode="columntoggle" class="table-stroke" title="{{title}}">
{{#each parameters}}
<tr {{#if key}} class="line-edit" rel="{{../../index}}"{{/if}}>
<td><strong>{{title}}</strong></td>
{{#if key}}
<td class="v-{{key}}">{{value}}</td>
{{else}}
<td>{{value}}</td>
{{/if}}
<td class="ui-text-center">
{{#if key}}
<a rel="{{../../index}}" class="prop-edit" title='Edit this value'><i class="fa fa-pencil"></i></a>
{{else}}
<a><span class="ui-text-desabled" title='Edit this value'><i class="fa fa-pencil"></i></sapn></a>
{{/if}}
</td>
</tr>
{{/each}}
</table>
{{/if}}
{{/each}}
{{else}}
<h2>No parameters.</h2>
{{/if}}
</script>
<script src="gadget_monitoring_hosting_overview.js"></script>
</head>
<body>
<div data-gadget-url="gadget_monitoring_jio.html" data-gadget-scope="jio_gadget" data-gadget-sandbox="public"></div>
<div data-gadget-url="gadget_monitoring_login_widget.html" data-gadget-scope="login_gadget" data-gadget-sandbox="public"></div>
<!--<div data-gadget-url="gadget_monitoring_document_edit.html" data-gadget-scope="config_gadget" data-gadget-sandbox="public"></div>-->
<div class="ui-grid-a ui-responsive">
<div class="ui-block-a">
<div class="ui-panel-overview" style="min-height: 450px;">
<div class="overview-header">
<div class='content-title ui-instance-title'>
<div class="overview-title">
<i class="fa fa-globe"></i> <span>Monitoring Applications</span>
</div>
<div class="commands">
</div>
</div>
</div>
<div class="overview-content">
<div class="ui-listview-container">
<table class="ui-responsive ui-body-c ui-table-inset instance-overview">
<thead class="ui-bar-inherit">
<tr>
<th class="padding-10"></th>
<th>Name</th>
<th>Status Date</th>
</tr>
</thead>
<tbody>
</tbody>
<tfoot class="ui-bar-inherit"></tfoot>
</table>
</div>
</div>
</div>
</div>
<div class="ui-block-b">
<div class="ui-panel-overview ui-content-hidden">
<div class="overview-header">
<div class='content-title ui-instance-title'>
<div class="overview-title">
<i class="fa fa-share-alt"></i> <span></span>
</div>
<div class="commands">
</div>
</div>
</div>
<div class="content-details">
<h2><i class="fa fa-wrench"></i> <strong>Instances Parameters</strong></h2>
<div style="overflow: auto;" class="padding-lr-10 instances-parameters">
</div>
<div class="padding-5"></div>
<h2><i class="fa fa-cubes"></i> <strong>Instances State List</strong></h2>
<div class="instances-status">
</div>
</div>
</div>
</div>
</div>
</body>
</html>
...@@ -108,209 +108,6 @@ ...@@ -108,209 +108,6 @@
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
<!doctype html>\n
<html>\n
<head>\n
<meta charset="utf-8">\n
<meta name="viewport" content="width=device-width, initial-scale=1">\n
\n
<title>Monitoring Hosting Subscription</title>\n
\n
<link href="gadget_monitoring_custom.css" rel="stylesheet" type="text/css"/>\n
\n
<script src="rsvp.js"></script>\n
<script src="renderjs.js"></script>\n
\n
<script id="template-hostings-list" type="text/x-handlebars-template">\n
{{#each hosting_list}}\n
<tr rel={{index}}>\n
<td>\n
<a class="ui-link" href="#{{status}}"><span class="label label-{{status}}">{{status}}</span></a>\n
</td>\n
<td>\n
<a class="ui-link" href="">{{title}}</a>\n
</td>\n
<td>\n
<a class="ui-link" href="">{{date}}</a>\n
</td>\n
</tr>\n
{{/each}}\n
</script>\n
\n
<script id="instance-details-widget-overview" type="text/x-handlebars-template">\n
{{#if status_list_url}}\n
<div data-role="controlgroup">\n
<a class="ui-btn ui-corner-all" href="{{status_list_url}}" title="Public"><i class="fa fa-check-square"></i> View Promises Status</a>\n
</div>\n
{{/if}}\n
<div class="ui-listview-container">\n
<ul data-role="listview" class="ui-listview-outer" data-inset="true">\n
{{#each instance_list}}\n
<li>\n
<a href="#" class="ui-btn ui-btn-icon-right ui-icon-plus">\n
<span class="ui-status-icon ui-status-{{status}}"></span>\n
<span class="ui-status-text">{{title}}</span>\n
</a>\n
<div class="ui-collapse-content ui-content-hidden">\n
<fieldset>\n
<div class="ui-field-contain">\n
<fieldset data-role="controlgroup" data-type="horizontal">\n
{{#if resource_url }}\n
<a href="{{resource_url}}" class="ui-btn ui-corner-all ui-btn-inline ui-mini"><i class="fa fa-pie-chart"></i> Resources</a>\n
{{/if}}\n
{{#if process_url }}\n
<a href="{{process_url}}" class="ui-btn ui-corner-all ui-btn-inline ui-mini"><i class="fa fa-list-alt"></i> Processes</a>\n
{{/if}}\n
{{#if rss_url}}\n
<a class="ui-btn ui-corner-all ui-btn-inline ui-mini" target=\'_blank\' href="{{rss_url}}" title="RSS"><i class="fa fa-rss-square"></i> RSS</a>\n
{{/if}}\n
<!--\n
{{#if public_url}}\n
<a class="ui-btn ui-corner-all ui-btn-inline ui-mini" target=\'_blank\' href="{{public_url}}" title="Public"><i class="fa fa-folder-open-o"></i> Public</a>\n
{{/if}}\n
{{#if private_url}}\n
<a class="ui-btn ui-corner-all ui-btn-inline ui-mini" target=\'_blank\' href="{{private_url}}" title="Private"><i class="fa fa-lock"></i> Private</a>\n
{{/if}}\n
-->\n
</fieldset>\n
</div>\n
<table data-role="table" data-mode="columntoggle" class="ui-responsive table-stroke">\n
<tr>\n
<th><i class="fa fa-tachometer"></i> <strong>Status</strong></th>\n
<td><span class="label label-{{status}}">{{status}}</span></td>\n
<td>{{date}}</td>\n
</tr>\n
\n
{{#with instance}}\n
<tr>\n
<th><i class="fa fa-desktop"></i> <strong>Computer</strong></th>\n
<td>{{computer}}</td>\n
<td>{{partition}}</td>\n
</tr>\n
<tr>\n
<th><i class="fa fa-globe"></i> <strong>IP Address</strong></th>\n
<td>{{ipv4}}</td>\n
<td>{{ipv6}}</td>\n
</tr>\n
{{/with}}\n
</table>\n
</fieldset>\n
</div>\n
</li>\n
{{/each}}\n
</ul>\n
</div>\n
</script>\n
\n
<script id="parameters-widget-template" type="text/x-handlebars-template">\n
{{#if parameter_list}}\n
{{#each parameter_list}}\n
{{#if parameters}}\n
<h3 class="margin-0 padding-tb-10">{{title}} <i class="fa fa-angle-up"></i></h3>\n
<table data-role="table" data-mode="columntoggle" class="table-stroke" title="{{title}}">\n
{{#each parameters}}\n
<tr {{#if key}} class="line-edit" rel="{{../../index}}"{{/if}}>\n
<td><strong>{{title}}</strong></td>\n
{{#if key}}\n
<td class="v-{{key}}">{{value}}</td>\n
{{else}}\n
<td>{{value}}</td>\n
{{/if}}\n
<td class="ui-text-center">\n
{{#if key}}\n
<a rel="{{../../index}}" class="prop-edit" title=\'Edit this value\'><i class="fa fa-pencil"></i></a>\n
{{else}}\n
<a><span class="ui-text-desabled" title=\'Edit this value\'><i class="fa fa-pencil"></i></sapn></a>\n
{{/if}}\n
</td>\n
</tr>\n
{{/each}}\n
</table>\n
{{/if}}\n
{{/each}}\n
{{else}}\n
<h2>No parameters.</h2>\n
{{/if}}\n
</script>\n
\n
<script src="gadget_monitoring_hosting_overview.js"></script>\n
\n
</head>\n
\n
<body>\n
<div data-gadget-url="gadget_monitoring_jio.html" data-gadget-scope="jio_gadget" data-gadget-sandbox="public"></div>\n
<div data-gadget-url="gadget_monitoring_login_widget.html" data-gadget-scope="login_gadget" data-gadget-sandbox="public"></div>\n
<!--<div data-gadget-url="gadget_monitoring_document_edit.html" data-gadget-scope="config_gadget" data-gadget-sandbox="public"></div>-->\n
<div class="ui-grid-a ui-responsive">\n
<div class="ui-block-a">\n
\n
<div class="ui-panel-overview" style="min-height: 450px;">\n
<div class="overview-header">\n
<div class=\'content-title ui-instance-title\'>\n
<div class="overview-title">\n
<i class="fa fa-globe"></i> <span>Monitoring Applications</span>\n
</div>\n
<div class="commands">\n
</div>\n
</div>\n
</div>\n
<div class="overview-content">\n
\n
<div class="ui-listview-container">\n
<table class="ui-responsive ui-body-c ui-table-inset instance-overview">\n
<thead class="ui-bar-inherit">\n
<tr>\n
<th class="padding-10"></th>\n
<th>Name</th>\n
<th>Status Date</th>\n
</tr>\n
</thead>\n
<tbody>\n
\n
</tbody>\n
<tfoot class="ui-bar-inherit"></tfoot>\n
</table>\n
</div>\n
\n
</div>\n
</div>\n
\n
</div>\n
<div class="ui-block-b">\n
<div class="ui-panel-overview ui-content-hidden">\n
<div class="overview-header">\n
<div class=\'content-title ui-instance-title\'>\n
<div class="overview-title">\n
<i class="fa fa-share-alt"></i> <span></span>\n
</div>\n
<div class="commands">\n
</div>\n
</div>\n
</div>\n
<div class="content-details">\n
<h2><i class="fa fa-wrench"></i> <strong>Instances Parameters</strong></h2>\n
<div style="overflow: auto;" class="padding-lr-10 instances-parameters">\n
</div>\n
<div class="padding-5"></div>\n
<h2><i class="fa fa-cubes"></i> <strong>Instances State List</strong></h2>\n
<div class="instances-status">\n
</div>\n
</div>\n
</div>\n
</div>\n
</div>\n
\n
\n
</body>\n
</html>\n
]]></string> </value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Monitoring Hosting Subscription Overview</string> </value> <value> <string>Monitoring Hosting Subscription Overview</string> </value>
......
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>Monitoring Configurator</title>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="jsen.min.js" type="text/javascript"></script>
<script src="gadget_monitoring_import_export.js" type="text/javascript"></script>
</head>
<body>
<div data-gadget-url="gadget_monitoring_jio.html" data-gadget-scope="jio_gadget" data-gadget-sandbox="public"></div>
<div data-gadget-url="gadget_monitoring_login_widget.html" data-gadget-scope="login_gadget" data-gadget-sandbox="public"></div>
<div data-role="tabs" class="config-tabs">
<div data-role="navbar">
<ul>
<li><a href="#config-export" data-ajax="false">Export Settings</a></li>
<li><a href="#config-import" data-ajax="false">Import Settings</a></li>
</ul>
</div>
<div id="config-export" class="ui-body-c ui-content">
<h2 class="section-title"><i class="fa fa-download fa-2x"></i><span data-i18n="">Save Monitoring Configuration</span></h2>
<div class="ui-body-c ui-content-sections">
<div class="ui-field-contain">
<label data-i18n="Setting Content:">Settings Content (json format):</label>
<textarea name="settings-data" class="text-data"></textarea>
</div>
</div>
<div class="select-storage ui-controlgroup ui-controlgroup-horizontal">
<div class="ui-grid-b ui-responsive">
<div class="ui-block-a"></div>
<div class="ui-block-b">
</div>
<div class="ui-block-c">
<button data-i18n="Reload Settings" class="ui-btn-btn-right btn-reload">Reload Settings</button>
</div>
</div>
</div>
</div>
<div id="config-import" class="ui-body-c ui-content">
<h2 class="section-title"><i class="fa fa-upload fa-2x"></i><span data-i18n="">Load Your Monitoring Configuration</span></h2>
<div class="ui-body-c ui-content-sections">
<div class="ui-field-contain">
<label data-i18n="Setting Content:">Settings Content (json format):</label>
<textarea name="settings-data-input" class="text-data"></textarea>
</div>
</div>
<div class="ui-text-right padding-5">
<span class="ui-text-error"></span>
</div>
<div class="select-storage ui-controlgroup ui-controlgroup-horizontal">
<div class="ui-grid-b ui-responsive">
<div class="ui-block-a"></div>
<div class="ui-block-b">
</div>
<div class="ui-block-c">
<button data-i18n="Reload Settings" class="ui-btn-btn-right btn-save">Import Settings</button>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
...@@ -106,83 +106,6 @@ ...@@ -106,83 +106,6 @@
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
<!DOCTYPE html>\n
<html>\n
<head>\n
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />\n
<meta name="viewport" content="width=device-width, user-scalable=no" />\n
<title>Monitoring Configurator</title>\n
\n
<!-- renderjs -->\n
<script src="rsvp.js" type="text/javascript"></script>\n
<script src="renderjs.js" type="text/javascript"></script>\n
<script src="jsen.min.js" type="text/javascript"></script>\n
\n
<script src="gadget_monitoring_import_export.js" type="text/javascript"></script>\n
</head>\n
<body>\n
<div data-gadget-url="gadget_monitoring_jio.html" data-gadget-scope="jio_gadget" data-gadget-sandbox="public"></div>\n
<div data-gadget-url="gadget_monitoring_login_widget.html" data-gadget-scope="login_gadget" data-gadget-sandbox="public"></div>\n
\n
<div data-role="tabs" class="config-tabs">\n
<div data-role="navbar">\n
<ul>\n
<li><a href="#config-export" data-ajax="false">Export Settings</a></li>\n
<li><a href="#config-import" data-ajax="false">Import Settings</a></li>\n
</ul>\n
</div>\n
<div id="config-export" class="ui-body-c ui-content">\n
<h2 class="section-title"><i class="fa fa-download fa-2x"></i><span data-i18n="">Save Monitoring Configuration</span></h2>\n
<div class="ui-body-c ui-content-sections">\n
<div class="ui-field-contain">\n
<label data-i18n="Setting Content:">Settings Content (json format):</label>\n
<textarea name="settings-data" class="text-data"></textarea>\n
</div>\n
</div>\n
<div class="select-storage ui-controlgroup ui-controlgroup-horizontal">\n
<div class="ui-grid-b ui-responsive">\n
<div class="ui-block-a"></div>\n
<div class="ui-block-b">\n
</div>\n
<div class="ui-block-c">\n
<button data-i18n="Reload Settings" class="ui-btn-btn-right btn-reload">Reload Settings</button>\n
</div>\n
</div>\n
</div>\n
</div>\n
<div id="config-import" class="ui-body-c ui-content">\n
<h2 class="section-title"><i class="fa fa-upload fa-2x"></i><span data-i18n="">Load Your Monitoring Configuration</span></h2>\n
<div class="ui-body-c ui-content-sections">\n
<div class="ui-field-contain">\n
<label data-i18n="Setting Content:">Settings Content (json format):</label>\n
<textarea name="settings-data-input" class="text-data"></textarea>\n
</div>\n
</div>\n
<div class="ui-text-right padding-5">\n
<span class="ui-text-error"></span>\n
</div>\n
<div class="select-storage ui-controlgroup ui-controlgroup-horizontal">\n
<div class="ui-grid-b ui-responsive">\n
<div class="ui-block-a"></div>\n
<div class="ui-block-b">\n
</div>\n
<div class="ui-block-c">\n
<button data-i18n="Reload Settings" class="ui-btn-btn-right btn-save">Import Settings</button>\n
</div>\n
</div>\n
</div>\n
</div>\n
</div>\n
\n
</body>\n
</html>
]]></string> </value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Monitoring Import Export</string> </value> <value> <string>Monitoring Import Export</string> </value>
......
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>Jio Gadget</title>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="jiodev.js" type="text/javascript"></script>
<script src="jio_dev_rssfeed_storage.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_monitoring_jio.js" type="text/javascript"></script>
</head>
<body>
</body>
</html>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment