Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
17
Merge Requests
17
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
d78f3520
Commit
d78f3520
authored
Mar 31, 2016
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Basic import/export for monitoring settings
parent
2aa455b7
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1033 additions
and
78 deletions
+1033
-78
master/bt5/slapos_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_appcache.xml
...mplateItem/web_page_module/gadget_monitoring_appcache.xml
+7
-4
master/bt5/slapos_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_application_panel_html.xml
..._page_module/gadget_monitoring_application_panel_html.xml
+5
-4
master/bt5/slapos_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_custom_css.xml
...lateItem/web_page_module/gadget_monitoring_custom_css.xml
+20
-3
master/bt5/slapos_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_hosting_overview_js.xml
...web_page_module/gadget_monitoring_hosting_overview_js.xml
+2
-3
master/bt5/slapos_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_import_export_html.xml
.../web_page_module/gadget_monitoring_import_export_html.xml
+406
-0
master/bt5/slapos_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_import_export_js.xml
...em/web_page_module/gadget_monitoring_import_export_js.xml
+558
-0
master/bt5/slapos_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_login_js.xml
...mplateItem/web_page_module/gadget_monitoring_login_js.xml
+6
-10
master/bt5/slapos_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_login_widget_js.xml
...tem/web_page_module/gadget_monitoring_login_widget_js.xml
+6
-14
master/bt5/slapos_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_promise_interface_js.xml
...eb_page_module/gadget_monitoring_promise_interface_js.xml
+5
-3
master/bt5/slapos_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_settings_configurator_html.xml
...e_module/gadget_monitoring_settings_configurator_html.xml
+5
-2
master/bt5/slapos_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_static_js.xml
...plateItem/web_page_module/gadget_monitoring_static_js.xml
+11
-33
master/bt5/slapos_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_widget_listbox_js.xml
...m/web_page_module/gadget_monitoring_widget_listbox_js.xml
+2
-2
No files found.
master/bt5/slapos_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_appcache.xml
View file @
d78f3520
...
...
@@ -107,7 +107,7 @@
<value>
<string
encoding=
"cdata"
>
<![CDATA[
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
# images/ajax-loader.gif\n
CACHE:\n
...
...
@@ -129,11 +129,12 @@ gadget_translate.js\n
handlebars.js\n
i18next.js\n
jiodev.js\n
jio_dev_rssfeed_storage.js\n
jquery.js\n
jquery.magnific-popup.min.js\n
jquerymobile.css\n
jquerymobile.js\n
j
io_dev_rssfeed_storage
.js\n
j
sen.min
.js\n
magnific-popup.css\n
renderjs.js\n
rsvp.js\n
...
...
@@ -143,6 +144,7 @@ gadget_monitoring_chart.html\n
gadget_monitoring_document_edit.html\n
gadget_monitoring_header.html\n
gadget_monitoring_hosting_overview.html\n
gadget_monitoring_import_export.html\n
gadget_monitoring_jio.html\n
gadget_monitoring_login.html\n
gadget_monitoring_login_widget.html\n
...
...
@@ -165,6 +167,7 @@ gadget_monitoring_chart.js\n
gadget_monitoring_document_edit.js\n
gadget_monitoring_header.js\n
gadget_monitoring_hosting_overview.js\n
gadget_monitoring_import_export.js\n
gadget_monitoring_jio.js\n
gadget_monitoring_login.js\n
gadget_monitoring_login_widget.js\n
...
...
@@ -323,7 +326,7 @@ NETWORK:\n
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
950.
4056.16865.34099
</string>
</value>
<value>
<string>
950.
11734.46994.47240
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -341,7 +344,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>
145
8896288.17
</float>
<float>
145
9356896.12
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_application_panel_html.xml
View file @
d78f3520
...
...
@@ -151,10 +151,11 @@
<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=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=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
...
...
@@ -303,7 +304,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
49.63903.8246.8413
</string>
</value>
<value>
<string>
9
50.11404.26472.10461
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -321,7 +322,7 @@
</tuple>
<state>
<tuple>
<float>
145
8554861.74
</float>
<float>
145
9508166.41
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_custom_css.xml
View file @
d78f3520
...
...
@@ -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
}\n
\n
.text-data {\n
height: 120px;\n
color: #596167;\n
}\n
\n
.text-overview {\n
max-width: 200px;\n
white-space: nowrap;\n
...
...
@@ -330,6 +335,18 @@ table tr.line-edit {\n
border: 1px solid #A2A2A2;\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
font-weight: bold;\n
font-size: 105%;\n
...
...
@@ -592,7 +609,7 @@ html .custom-grid-wrap table thead tr th {\n
vertical-align: middle;\n
text-align: left;\n
position: relative;\n
cursor: pointer;
\n
/*cursor: pointer;*/
\n
}\n
.infobox:hover {\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
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
49.64125.34749.3423
5
</string>
</value>
<value>
<string>
9
50.11464.24567.1544
5
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -969,7 +986,7 @@ html table.instance-overview td:first-child > a, html table.instance-overview td
</tuple>
<state>
<tuple>
<float>
145
8581200.97
</float>
<float>
145
9341758.63
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_hosting_overview_js.xml
View file @
d78f3520
...
...
@@ -224,7 +224,6 @@
promise_list =
[];\n
gadget.props.opml_dict =
url_description_dict;\n
opml_tmp_key_list =
[];\n
console.log(url_description_dict);\n
for
(key
in
url_description_dict)
{\n
opml_tmp_key_list.push(key);\n
promise_list.push(gadget.props.jio_gadget.getMonitorUrlListFromOpml(\n
...
...
@@ -741,7 +740,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
950.3039.
1259.9813
</string>
</value>
<value>
<string>
950.3039.
65061.43776
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -759,7 +758,7 @@
</tuple>
<state>
<tuple>
<float>
145
8835199.54
</float>
<float>
145
9761305.99
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_import_export_html.xml
0 → 100644
View file @
d78f3520
This diff is collapsed.
Click to expand it.
master/bt5/slapos_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_import_export_js.xml
0 → 100644
View file @
d78f3520
This diff is collapsed.
Click to expand it.
master/bt5/slapos_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_login_js.xml
View file @
d78f3520
...
...
@@ -110,9 +110,9 @@
<key>
<string>
text_content
</string>
</key>
<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
(function (window, document, rJS) {\n
(function (window, document, rJS
, Rusha, btoa
) {\n
"use strict";\n
\n
var gadget_klass = rJS(window),\n
...
...
@@ -121,11 +121,7 @@
llogin_tooltip_template = Handlebars.compile(\n
templater.getElementById("login-toltip-template").innerHTML\n
),\n
hashCode;\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
hashCode = new Rusha().digestFromString;\n
\n
gadget_klass\n
.ready(function (g) {\n
...
...
@@ -246,7 +242,7 @@
});\n
});\n
\n
}(window, document, rJS));
}(window, document, rJS
, Rusha, btoa
));
]]>
</string>
</value>
</item>
...
...
@@ -383,7 +379,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
49.54056.59252.46080
</string>
</value>
<value>
<string>
9
50.13111.28749.20002
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -401,7 +397,7 @@
</tuple>
<state>
<tuple>
<float>
145
7966675.88
</float>
<float>
145
9439547.16
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_login_widget_js.xml
View file @
d78f3520
...
...
@@ -108,19 +108,13 @@
</item>
<item>
<key>
<string>
text_content
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
/*global document, window, rJS */\n
<value>
<string>
/*global document, window, rJS, Rusha, btoa */\n
/*jslint nomen: true, indent: 2, maxerr: 3*/\n
(function (window, document, rJS) {\n
(function (window, document, rJS
, Rusha, btoa
) {\n
"use strict";\n
\n
var gadget_klass = rJS(window),\n
hashCode;\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
hashCode = new Rusha().digestFromString;\n
\n
\n
function getUrlInfo(gadget, key, default_value) {\n
...
...
@@ -337,9 +331,7 @@
return updateUrlValue(gadget, url, login, password);\n
});\n
\n
}(window, document, rJS));
]]>
</string>
</value>
}(window, document, rJS, Rusha, btoa));
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
...
...
@@ -474,7 +466,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
949.54
052.60822.44663
</string>
</value>
<value>
<string>
949.54
108.24790.65006
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -492,7 +484,7 @@
</tuple>
<state>
<tuple>
<float>
145
7967142.65
</float>
<float>
145
9439672.87
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_promise_interface_js.xml
View file @
d78f3520
...
...
@@ -332,8 +332,10 @@
var i,\n
history_list = [];\n
\n
for (i = 0; i < result_list.data.rows.length; i += 1) {\n
history_list.push(result_list.data.rows[i].value);\n
if (result_list) {\n
for (i = 0; i < result_list.data.rows.length; i += 1) {\n
history_list.push(result_list.data.rows[i].value);\n
}\n
}\n
history_content = history_widget_template({history_list: history_list});\n
gadget.property_dict.element.querySelector("#promise-overview .ui-block-a")\n
...
...
@@ -640,7 +642,7 @@
</tuple>
<state>
<tuple>
<float>
1458
124466.18
</float>
<float>
1458
901454.83
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_settings_configurator_html.xml
View file @
d78f3520
...
...
@@ -273,6 +273,9 @@
<i
class=
"fa fa-spinner fa-2x fa-spin"
></i>
\n
</span>
\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
...
...
@@ -420,7 +423,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
49.65333.22535.21930
</string>
</value>
<value>
<string>
9
50.14227.11651.3003
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -438,7 +441,7 @@
</tuple>
<state>
<tuple>
<float>
145
8641047.48
</float>
<float>
145
9506471.61
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_static_js.xml
View file @
d78f3520
...
...
@@ -110,9 +110,9 @@
<key>
<string>
text_content
</string>
</key>
<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
(function (window, rJS, RSVP, $, btoa) {\n
(function (window, rJS, RSVP, $, btoa
, Rusha
) {\n
"use strict";\n
\n
function validateHttpUrl(value) {\n
...
...
@@ -168,10 +168,6 @@
});\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
function setUrlConfiguration(gadget, url, title) {\n
return gadget.getSetting(\'monitor_url_description\')\n
...
...
@@ -184,29 +180,8 @@
url_description_dict = {};\n
}\n
\n
// url will be saved by group (hosting subscription) identified by their id\n
tmp = hashCode(url) + \'\';\n
/*if (url_description_dict.hasOwnProperty(tmp)) {\n
// this entry will be overridden\n
}*/\n
tmp = hashCode(url);\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
});\n
}\n
...
...
@@ -358,7 +333,8 @@
\n
opml_url_template = Handlebars.compile(\n
templater.getElementById("template-opmlurl-list").innerHTML\n
);\n
),\n
hashCode = new Rusha().digestFromString;\n
\n
gadget_klass\n
.ready(function (g) {\n
...
...
@@ -720,7 +696,7 @@
parent_url:
gadget.props.opml_url\n
//parent_title:
root_name\n
};\n
credential_dict[
hashCode(
tmp.url
)
+
\'\'
]
=
tmp;\n
credential_dict[
hashCode(
tmp.url
)
]
=
tmp;\n
}\n
}\n
if
(credential_dict)
{\n
...
...
@@ -779,7 +755,9 @@
});\n
});\n
\n
}(window,
rJS,
RSVP,
$,
btoa));
}(window,
rJS,
RSVP,
$,
btoa,
Rusha));\n
\n
]]
></string>
</value>
</item>
...
...
@@ -916,7 +894,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
49.65344.30338.2974
7
</string>
</value>
<value>
<string>
9
50.11430.27817.6005
7
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -934,7 +912,7 @@
</tuple>
<state>
<tuple>
<float>
145
8641325.5
6
</float>
<float>
145
9439866.3
6
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_widget_listbox_js.xml
View file @
d78f3520
...
...
@@ -586,7 +586,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
49.59889.7208.51251
</string>
</value>
<value>
<string>
9
50.12978.57403.22323
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -604,7 +604,7 @@
</tuple>
<state>
<tuple>
<float>
145
8314048.86
</float>
<float>
145
9432097.87
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment