Commit c0a65352 authored by Alain Takoudjou's avatar Alain Takoudjou Committed by Alain Takoudjou

Basic import/export for monitoring settings

parent 559ac68f
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
CACHE MANIFEST\n CACHE MANIFEST\n
# generated on Fri, 25 Mars 2016 11:45:33 +0000\n # generated on Fri, 30 Mars 2016 11:45:33 +0000\n
# XXX + fonts\n # XXX + fonts\n
# images/ajax-loader.gif\n # images/ajax-loader.gif\n
CACHE:\n CACHE:\n
...@@ -129,11 +129,12 @@ gadget_translate.js\n ...@@ -129,11 +129,12 @@ gadget_translate.js\n
handlebars.js\n handlebars.js\n
i18next.js\n i18next.js\n
jiodev.js\n jiodev.js\n
jio_dev_rssfeed_storage.js\n
jquery.js\n jquery.js\n
jquery.magnific-popup.min.js\n jquery.magnific-popup.min.js\n
jquerymobile.css\n jquerymobile.css\n
jquerymobile.js\n jquerymobile.js\n
jio_dev_rssfeed_storage.js\n jsen.min.js\n
magnific-popup.css\n magnific-popup.css\n
renderjs.js\n renderjs.js\n
rsvp.js\n rsvp.js\n
...@@ -143,6 +144,7 @@ gadget_monitoring_chart.html\n ...@@ -143,6 +144,7 @@ gadget_monitoring_chart.html\n
gadget_monitoring_document_edit.html\n gadget_monitoring_document_edit.html\n
gadget_monitoring_header.html\n gadget_monitoring_header.html\n
gadget_monitoring_hosting_overview.html\n gadget_monitoring_hosting_overview.html\n
gadget_monitoring_import_export.html\n
gadget_monitoring_jio.html\n gadget_monitoring_jio.html\n
gadget_monitoring_login.html\n gadget_monitoring_login.html\n
gadget_monitoring_login_widget.html\n gadget_monitoring_login_widget.html\n
...@@ -165,6 +167,7 @@ gadget_monitoring_chart.js\n ...@@ -165,6 +167,7 @@ gadget_monitoring_chart.js\n
gadget_monitoring_document_edit.js\n gadget_monitoring_document_edit.js\n
gadget_monitoring_header.js\n gadget_monitoring_header.js\n
gadget_monitoring_hosting_overview.js\n gadget_monitoring_hosting_overview.js\n
gadget_monitoring_import_export.js\n
gadget_monitoring_jio.js\n gadget_monitoring_jio.js\n
gadget_monitoring_login.js\n gadget_monitoring_login.js\n
gadget_monitoring_login_widget.js\n gadget_monitoring_login_widget.js\n
...@@ -323,7 +326,7 @@ NETWORK:\n ...@@ -323,7 +326,7 @@ NETWORK:\n
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>950.4056.16865.34099</string> </value> <value> <string>950.11734.46994.47240</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -341,7 +344,7 @@ NETWORK:\n ...@@ -341,7 +344,7 @@ NETWORK:\n
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1458896288.17</float> <float>1459356896.12</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -151,10 +151,11 @@ ...@@ -151,10 +151,11 @@
<script id="panel-template-body" type="text/x-handlebars-template">\n <script id="panel-template-body" type="text/x-handlebars-template">\n
<div class="ui-content">\n <div class="ui-content">\n
<ul data-role="listview" class="ui-listview">\n <ul data-role="listview" class="ui-listview">\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=overview"><i class="fa fa-cube"></i><span data-i18n="Instances Overview">Instances Overview</span></a></li>\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=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=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 </ul>\n
</div>\n </div>\n
</script>\n </script>\n
...@@ -303,7 +304,7 @@ ...@@ -303,7 +304,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.63903.8246.8413</string> </value> <value> <string>950.11404.26472.10461</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -321,7 +322,7 @@ ...@@ -321,7 +322,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1458554861.74</float> <float>1459508166.41</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -208,6 +208,11 @@ html.ui-mobile .ui-grid-container.ui-responsive > ul > li, html.ui-mobile .ui-gr ...@@ -208,6 +208,11 @@ html.ui-mobile .ui-grid-container.ui-responsive > ul > li, html.ui-mobile .ui-gr
color: rgba(128, 128, 128, 0.66);\n color: rgba(128, 128, 128, 0.66);\n
}\n }\n
\n \n
.text-data {\n
height: 120px;\n
color: #596167;\n
}\n
\n
.text-overview {\n .text-overview {\n
max-width: 200px;\n max-width: 200px;\n
white-space: nowrap;\n white-space: nowrap;\n
...@@ -330,6 +335,18 @@ table tr.line-edit {\n ...@@ -330,6 +335,18 @@ table tr.line-edit {\n
border: 1px solid #A2A2A2;\n border: 1px solid #A2A2A2;\n
}\n }\n
\n \n
html head + body h2.section-title {\n
margin: 0;\n
margin-top: 40px;\n
color: #557186;\n
margin-left: 2px;\n
}\n
\n
html head + body h2.section-title > span {\n
font-size: 22px;\n
padding-left: 10px;\n
}\n
\n
html head + body .ui-panel-overview > h2 {\n html head + body .ui-panel-overview > h2 {\n
font-weight: bold;\n font-weight: bold;\n
font-size: 105%;\n font-size: 105%;\n
...@@ -592,7 +609,7 @@ html .custom-grid-wrap table thead tr th {\n ...@@ -592,7 +609,7 @@ html .custom-grid-wrap table thead tr th {\n
vertical-align: middle;\n vertical-align: middle;\n
text-align: left;\n text-align: left;\n
position: relative;\n position: relative;\n
cursor: pointer;\n /*cursor: pointer;*/\n
}\n }\n
.infobox:hover {\n .infobox:hover {\n
background: rgba(128, 128, 128, .1);\n background: rgba(128, 128, 128, .1);\n
...@@ -951,7 +968,7 @@ html table.instance-overview td:first-child > a, html table.instance-overview td ...@@ -951,7 +968,7 @@ html table.instance-overview td:first-child > a, html table.instance-overview td
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.64125.34749.34235</string> </value> <value> <string>950.11464.24567.15445</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -969,7 +986,7 @@ html table.instance-overview td:first-child > a, html table.instance-overview td ...@@ -969,7 +986,7 @@ html table.instance-overview td:first-child > a, html table.instance-overview td
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1458581200.97</float> <float>1459341758.63</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -224,7 +224,6 @@ ...@@ -224,7 +224,6 @@
promise_list = [];\n promise_list = [];\n
gadget.props.opml_dict = url_description_dict;\n gadget.props.opml_dict = url_description_dict;\n
opml_tmp_key_list = [];\n opml_tmp_key_list = [];\n
console.log(url_description_dict);\n
for (key in url_description_dict) {\n for (key in url_description_dict) {\n
opml_tmp_key_list.push(key);\n opml_tmp_key_list.push(key);\n
promise_list.push(gadget.props.jio_gadget.getMonitorUrlListFromOpml(\n promise_list.push(gadget.props.jio_gadget.getMonitorUrlListFromOpml(\n
...@@ -741,7 +740,7 @@ ...@@ -741,7 +740,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>950.3039.1259.9813</string> </value> <value> <string>950.3039.65061.43776</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -759,7 +758,7 @@ ...@@ -759,7 +758,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1458835199.54</float> <float>1459761305.99</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -110,9 +110,9 @@ ...@@ -110,9 +110,9 @@
<key> <string>text_content</string> </key> <key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
/*global document, window, rJS */\n /*global document, window, rJS, Rusha, btoa */\n
/*jslint nomen: true, indent: 2, maxerr: 3*/\n /*jslint nomen: true, indent: 2, maxerr: 3*/\n
(function (window, document, rJS) {\n (function (window, document, rJS, Rusha, btoa) {\n
"use strict";\n "use strict";\n
\n \n
var gadget_klass = rJS(window),\n var gadget_klass = rJS(window),\n
...@@ -121,11 +121,7 @@ ...@@ -121,11 +121,7 @@
llogin_tooltip_template = Handlebars.compile(\n llogin_tooltip_template = Handlebars.compile(\n
templater.getElementById("login-toltip-template").innerHTML\n templater.getElementById("login-toltip-template").innerHTML\n
),\n ),\n
hashCode;\n hashCode = new Rusha().digestFromString;\n
\n
hashCode = function (s) {\n
return s.split("").reduce(function(a,b){a=((a<<5)-a)+b.charCodeAt(0);return a&a},0); \n
};\n
\n \n
gadget_klass\n gadget_klass\n
.ready(function (g) {\n .ready(function (g) {\n
...@@ -246,7 +242,7 @@ ...@@ -246,7 +242,7 @@
});\n });\n
});\n });\n
\n \n
}(window, document, rJS)); }(window, document, rJS, Rusha, btoa));
]]></string> </value> ]]></string> </value>
</item> </item>
...@@ -383,7 +379,7 @@ ...@@ -383,7 +379,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.54056.59252.46080</string> </value> <value> <string>950.13111.28749.20002</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -401,7 +397,7 @@ ...@@ -401,7 +397,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1457966675.88</float> <float>1459439547.16</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -108,19 +108,13 @@ ...@@ -108,19 +108,13 @@
</item> </item>
<item> <item>
<key> <string>text_content</string> </key> <key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string>/*global document, window, rJS, Rusha, btoa */\n
/*global document, window, rJS */\n
/*jslint nomen: true, indent: 2, maxerr: 3*/\n /*jslint nomen: true, indent: 2, maxerr: 3*/\n
(function (window, document, rJS) {\n (function (window, document, rJS, Rusha, btoa) {\n
"use strict";\n "use strict";\n
\n \n
var gadget_klass = rJS(window),\n var gadget_klass = rJS(window),\n
hashCode;\n hashCode = new Rusha().digestFromString;\n
\n
hashCode = function (s) {\n
return s.split("").reduce(function(a,b){a=((a<<5)-a)+b.charCodeAt(0);return a&a},0); \n
};\n
\n \n
\n \n
function getUrlInfo(gadget, key, default_value) {\n function getUrlInfo(gadget, key, default_value) {\n
...@@ -337,9 +331,7 @@ ...@@ -337,9 +331,7 @@
return updateUrlValue(gadget, url, login, password);\n return updateUrlValue(gadget, url, login, password);\n
});\n });\n
\n \n
}(window, document, rJS)); }(window, document, rJS, Rusha, btoa));</string> </value>
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
...@@ -474,7 +466,7 @@ ...@@ -474,7 +466,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.54052.60822.44663</string> </value> <value> <string>949.54108.24790.65006</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -492,7 +484,7 @@ ...@@ -492,7 +484,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1457967142.65</float> <float>1459439672.87</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -332,9 +332,11 @@ ...@@ -332,9 +332,11 @@
var i,\n var i,\n
history_list = [];\n history_list = [];\n
\n \n
if (result_list) {\n
for (i = 0; i < result_list.data.rows.length; i += 1) {\n for (i = 0; i < result_list.data.rows.length; i += 1) {\n
history_list.push(result_list.data.rows[i].value);\n history_list.push(result_list.data.rows[i].value);\n
}\n }\n
}\n
history_content = history_widget_template({history_list: history_list});\n history_content = history_widget_template({history_list: history_list});\n
gadget.property_dict.element.querySelector("#promise-overview .ui-block-a")\n gadget.property_dict.element.querySelector("#promise-overview .ui-block-a")\n
.innerHTML += history_content;\n .innerHTML += history_content;\n
...@@ -640,7 +642,7 @@ ...@@ -640,7 +642,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1458124466.18</float> <float>1458901454.83</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -273,6 +273,9 @@ ...@@ -273,6 +273,9 @@
<i class="fa fa-spinner fa-2x fa-spin"></i>\n <i class="fa fa-spinner fa-2x fa-spin"></i>\n
</span>\n </span>\n
</div>\n </div>\n
<div class="padding-5">\n
<a href="#page=hosting_overview">Access Applications</a>\n
</div>\n
</div>\n </div>\n
</div>\n </div>\n
</div>\n </div>\n
...@@ -420,7 +423,7 @@ ...@@ -420,7 +423,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.65333.22535.21930</string> </value> <value> <string>950.14227.11651.3003</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -438,7 +441,7 @@ ...@@ -438,7 +441,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1458641047.48</float> <float>1459506471.61</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -110,9 +110,9 @@ ...@@ -110,9 +110,9 @@
<key> <string>text_content</string> </key> <key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
/*global window, rJS, btoa, RSVP, $ */\n /*global window, rJS, btoa, RSVP, $, Rusha */\n
/*jslint nomen: true, indent: 2, maxerr: 3*/\n /*jslint nomen: true, indent: 2, maxerr: 3*/\n
(function (window, rJS, RSVP, $, btoa) {\n (function (window, rJS, RSVP, $, btoa, Rusha) {\n
"use strict";\n "use strict";\n
\n \n
function validateHttpUrl(value) {\n function validateHttpUrl(value) {\n
...@@ -168,10 +168,6 @@ ...@@ -168,10 +168,6 @@
});\n });\n
});\n });\n
}\n }\n
\n
function hashCode (s) {\n
return s.split("").reduce(function(a,b){a=((a<<5)-a)+b.charCodeAt(0);return a&a},0); \n
}\n
\n \n
function setUrlConfiguration(gadget, url, title) {\n function setUrlConfiguration(gadget, url, title) {\n
return gadget.getSetting(\'monitor_url_description\')\n return gadget.getSetting(\'monitor_url_description\')\n
...@@ -184,29 +180,8 @@ ...@@ -184,29 +180,8 @@
url_description_dict = {};\n url_description_dict = {};\n
}\n }\n
\n \n
// url will be saved by group (hosting subscription) identified by their id\n tmp = hashCode(url);\n
tmp = hashCode(url) + \'\';\n
/*if (url_description_dict.hasOwnProperty(tmp)) {\n
// this entry will be overridden\n
}*/\n
url_description_dict[tmp] = {href: url, title: title};\n url_description_dict[tmp] = {href: url, title: title};\n
/*\n
tmp_dict = {};\n
tmp_dict.root_title = group_name;\n
if (tmp_dict.urls === undefined) {\n
tmp_dict.urls = [];\n
}\n
for (i = 0; i < description_list.length; i += 1) {\n
\n
if (description_list[i].htmlurl) {\n
tmp_dict.urls.push({\n
url: description_list[i].htmlurl,\n
title: description_list[i].title,\n
root_title: description_list[i].opml_title\n
});\n
}\n
}\n
url_description_dict[tmp] = tmp_dict;*/\n
return gadget.setSetting(\'monitor_url_description\', url_description_dict);\n return gadget.setSetting(\'monitor_url_description\', url_description_dict);\n
});\n });\n
}\n }\n
...@@ -358,7 +333,8 @@ ...@@ -358,7 +333,8 @@
\n \n
opml_url_template = Handlebars.compile(\n opml_url_template = Handlebars.compile(\n
templater.getElementById("template-opmlurl-list").innerHTML\n templater.getElementById("template-opmlurl-list").innerHTML\n
);\n ),\n
hashCode = new Rusha().digestFromString;\n
\n \n
gadget_klass\n gadget_klass\n
.ready(function (g) {\n .ready(function (g) {\n
...@@ -720,7 +696,7 @@ ...@@ -720,7 +696,7 @@
parent_url: gadget.props.opml_url\n parent_url: gadget.props.opml_url\n
//parent_title: root_name\n //parent_title: root_name\n
};\n };\n
credential_dict[ hashCode( tmp.url ) + \'\' ] = tmp;\n credential_dict[ hashCode( tmp.url ) ] = tmp;\n
}\n }\n
}\n }\n
if (credential_dict) {\n if (credential_dict) {\n
...@@ -779,7 +755,9 @@ ...@@ -779,7 +755,9 @@
});\n });\n
});\n });\n
\n \n
}(window, rJS, RSVP, $, btoa)); }(window, rJS, RSVP, $, btoa, Rusha));\n
\n
]]></string> </value> ]]></string> </value>
</item> </item>
...@@ -916,7 +894,7 @@ ...@@ -916,7 +894,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.65344.30338.29747</string> </value> <value> <string>950.11430.27817.60057</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -934,7 +912,7 @@ ...@@ -934,7 +912,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1458641325.56</float> <float>1459439866.36</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -586,7 +586,7 @@ ...@@ -586,7 +586,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.59889.7208.51251</string> </value> <value> <string>950.12978.57403.22323</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -604,7 +604,7 @@ ...@@ -604,7 +604,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1458314048.86</float> <float>1459432097.87</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
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