diff options
author | Christian Klinger | 2016-08-08 15:30:23 +0200 |
---|---|---|
committer | Christian Klinger | 2016-08-08 15:30:23 +0200 |
commit | d3423cb05b719eb416d39f33e803be79b21065c1 (patch) | |
tree | 5b2e9da00816c4adf24b33c4c8db0eed575093bf | |
parent | subnet select. (diff) | |
parent | [baseconfig] Disable selectize.js for shadow feature; set shadow status on load (diff) | |
download | slx-admin-d3423cb05b719eb416d39f33e803be79b21065c1.tar.gz slx-admin-d3423cb05b719eb416d39f33e803be79b21065c1.tar.xz slx-admin-d3423cb05b719eb416d39f33e803be79b21065c1.zip |
Merge branch 'modularization' of git.openslx.org:openslx-ng/slx-admin into modularization
7 files changed, 61 insertions, 68 deletions
diff --git a/modules-available/baseconfig/templates/_page.html b/modules-available/baseconfig/templates/_page.html index 8bfd1b6a..7bd5f6c9 100644 --- a/modules-available/baseconfig/templates/_page.html +++ b/modules-available/baseconfig/templates/_page.html @@ -70,35 +70,41 @@ <script type="text/javascript"> function updateShadows(e) { - var shadowStr = $(e.target).data('shadows'); - var currentValue = $(e.target).val(); + var shadowStr = $(e).data('shadows'); + var currentValue = $(e).val(); var rules = shadowStr.split(','); rules.forEach(function(rule) { var rule_parts = rule.split('->'); var triggerVal = rule_parts[0].trim(); var target = rule_parts[1].trim(); + var inp = $('#' + target); + var selitem = inp.data('selitem'); - if (currentValue == triggerVal) { - $('#' + target).prop('disabled', true); + if (currentValue === triggerVal) { + inp.prop('disabled', true); + if (selitem) selitem.disable(); $('#' + target + '.multilist').multiselect('disable'); } else { - $('#' + target).prop('disabled', false); + inp.prop('disabled', false); + if (selitem) selitem.enable(); $('#' + target + '.multilist').multiselect('enable'); + } }); - console.log(shadowStr); } document.addEventListener("DOMContentLoaded", function () { /* apply selectize on all multiinput-selectize inputs */ - var $multiinputs = $("input.multiinput"); - $multiinputs.selectize({ - delimiter: ' ', - create: true, - plugins: ['restore_on_backspace', 'remove_button'], - maxItems: 10000 + $("input.multiinput").each(function (idx, elem) { + var e = $(elem); + e.data('selitem', e.selectize({ + delimiter: ' ', + create: true, + plugins: ['restore_on_backspace', 'remove_button'], + maxItems: 10000 + })[0].selectize); }); var $multilists = $("select.multilist"); @@ -110,7 +116,7 @@ document.addEventListener("DOMContentLoaded", function () { /* data-shadowing bindings */ $allShadowingFields = $('[data-shadows]'); - $allShadowingFields.on('change', updateShadows); - + $allShadowingFields.on('change', function (event) { updateShadows(event.target); }); + $allShadowingFields.each(function (idx, elem) { updateShadows(elem); }); }); </script> diff --git a/modules-available/baseconfig_bwlp/baseconfig/settings.json b/modules-available/baseconfig_bwlp/baseconfig/settings.json index d10e2a9e..5b76eb3f 100644 --- a/modules-available/baseconfig_bwlp/baseconfig/settings.json +++ b/modules-available/baseconfig_bwlp/baseconfig/settings.json @@ -45,7 +45,8 @@ "catid": "networking", "defaultvalue": "off", "permissions": "2", - "validator": "list:off|on|auto" + "validator": "list:off|on|auto", + "shadows": "off -> SLX_PROXY_PORT, off -> SLX_PROXY_TYPE, off -> SLX_PROXY_IP, off -> SLX_PROXY_BLACKLIST" }, "SLX_PROXY_PORT": { "catid": "networking", @@ -91,15 +92,15 @@ }, "SLX_SHUTDOWN_TIMEOUT": { "catid": "power", - "defaultvalue": "1200", + "defaultvalue": "1800", "permissions": "2", "validator": "regex:\/^\\d*$\/" }, - "SLX_BENCHMARK_VM": { - "catid": "other", - "defaultvalue": "", + "SLX_SCREEN_STANDBY_TIMEOUT": { + "catid": "power", + "defaultvalue": "600", "permissions": "2", - "validator": "" + "validator": "regex:\/^\\d*$\/" }, "SLX_VMCHOOSER_TAB": { "catid": "vmchooser", @@ -118,24 +119,5 @@ "defaultvalue": "BUMP", "permissions": "2", "validator": "list:IGNORE|BUMP|EXCLUSIVE" - }, - "SLX_VMCHOOSER_DUMMYSETTING1": { - "catid": "vmchooser", - "defaultvalue": "", - "permissions": "2", - "validator": "list:ON|OFF", - "shadows": "OFF -> SLX_LOGOUT_TIMEOUT, OFF -> SLX_VMCHOOSER_DUMMYSETTING2" - }, - "SLX_VMCHOOSER_DUMMYSETTING2": { - "catid": "vmchooser", - "defaultvalue": "", - "permissions": "2", - "validator": "multilist:Apples|Bananas|Pears" - }, - "SLX_VMCHOOSER_DUMMYSETTING3": { - "catid": "vmchooser", - "defaultvalue": "", - "permissions": "2", - "validator": "multiinput" } } diff --git a/modules-available/statistics/lang/de/template-tags.json b/modules-available/statistics/lang/de/template-tags.json index 85229a49..1c893e2a 100644 --- a/modules-available/statistics/lang/de/template-tags.json +++ b/modules-available/statistics/lang/de/template-tags.json @@ -9,7 +9,9 @@ "lang_cpuModel": "CPU", "lang_details": "Details", "lang_devices": "Ger\u00e4te", + "lang_duration": "Dauer", "lang_event": "Ereignis", + "lang_eventType": "Typ", "lang_firstSeen": "Erste Aktivit\u00e4t", "lang_gbRam": "RAM", "lang_hardwareSummary": "Hardware", @@ -57,7 +59,6 @@ "lang_ramSlots": "Speicher-Slots", "lang_realCores": "Kerne", "lang_reallocatedSectors": "Defekte Sektoren", - "lang_refresh": "Ansicht aktualisieren", "lang_serialNo": "Serien-Nr", "lang_showList": "Liste", "lang_showVisualization": "Visualisierung", @@ -73,4 +74,4 @@ "lang_virtualCores": "Virtuelle Kerne", "lang_when": "Wann", "lang_withBadSectors": "Clients mit potentiell defekten Festplatten (mehr als 10 defekte Sektoren)" -} +}
\ No newline at end of file diff --git a/modules-available/statistics/lang/en/template-tags.json b/modules-available/statistics/lang/en/template-tags.json index 6178d4c3..e11073ae 100644 --- a/modules-available/statistics/lang/en/template-tags.json +++ b/modules-available/statistics/lang/en/template-tags.json @@ -9,7 +9,9 @@ "lang_cpuModel": "CPU", "lang_details": "Details", "lang_devices": "Devices", + "lang_duration": "Duration", "lang_event": "Event", + "lang_eventType": "Type", "lang_firstSeen": "First seen", "lang_gbRam": "RAM", "lang_hardwareSummary": "Hardware", @@ -57,8 +59,9 @@ "lang_ramSlots": "Memory slots", "lang_realCores": "Cores", "lang_reallocatedSectors": "Bad sectors", - "lang_refresh": "Refresh", "lang_serialNo": "Serial no", + "lang_showList": "Show list", + "lang_showVisualization": "Show visualization", "lang_sockets": "Sockets", "lang_tempPart": "Temp. partition", "lang_tempPartStats": "Temporary partition", @@ -71,4 +74,4 @@ "lang_virtualCores": "Virtual cores", "lang_when": "When", "lang_withBadSectors": "Clients with potentially bad HDDs (more than 10 reallocated sectors)" -} +}
\ No newline at end of file diff --git a/modules-available/statistics/templates/cpumodels.html b/modules-available/statistics/templates/cpumodels.html index 0ab5286f..20da4697 100644 --- a/modules-available/statistics/templates/cpumodels.html +++ b/modules-available/statistics/templates/cpumodels.html @@ -6,17 +6,18 @@ <div class="panel-body"> <div class="row"> <div class="col-md-8"> - <table class="table table-condensed table-striped table-responsive" - style="table-layout: fixed;"> + <table class="table table-condensed table-striped table-responsive"> <tr> <th>{{lang_modelName}}</th> - <th class="text-right">{{lang_cpuCores}}</th> - <th class="text-right">{{lang_modelCount}}</th> + <th class="text-right text-nowrap">{{lang_cpuCores}}</th> + <th class="text-right text-nowrap">{{lang_modelCount}}</th> </tr> {{#rows}} <tr id="{{id}}"> - <td class="text-left text-nowrap filter-col" data-filter-col="systemmodel" style="overflow:hidden;text-overflow: ellipsis;"> + <td class="text-left text-nowrap filter-col" data-filter-col="systemmodel"> + <table style="width:100%; table-layout: fixed;"><tr><td style="overflow:hidden;text-overflow: ellipsis;"> <a class="filter-val" data-filter-val="{{systemmodel}}" href="?do=Statistics&show=stat&filters={{query}}~,~systemmodel={{urlsystemmodel}}">{{systemmodel}}</a> + </td></tr></table> </td> <td class="text-right filter-col" data-filter-col="realcores"> <a class="filter-val" data-filter-val="{{cores}}" href="?do=Statistics&show=stat&filters={{query}}~,~realcores={{cores}}">{{cores}}</a> diff --git a/modules-available/statistics/templates/machine-main.html b/modules-available/statistics/templates/machine-main.html index f76b5770..333af1ec 100644 --- a/modules-available/statistics/templates/machine-main.html +++ b/modules-available/statistics/templates/machine-main.html @@ -18,37 +18,37 @@ <div class="panel-body"> <table class="table table-condensed"> <tr> - <td>{{lang_uuid}}</td> + <td class="text-nowrap">{{lang_uuid}}</td> <td>{{machineuuid}}</td> </tr> <tr> - <td>{{lang_macAddr}}</td> + <td class="text-nowrap">{{lang_macAddr}}</td> <td>{{macaddr}}</td> </tr> <tr> - <td>{{lang_ip}}</td> + <td class="text-nowrap">{{lang_ip}}</td> <td>{{clientip}}</td> </tr> {{#hostname}} <tr> - <td>{{lang_hostname}}</td> + <td class="text-nowrap">{{lang_hostname}}</td> <td>{{hostname}}</td> </tr> {{/hostname}} <tr> - <td>{{lang_firstSeen}}</td> + <td class="text-nowrap">{{lang_firstSeen}}</td> <td>{{firstseen_s}}</td> </tr> <tr> - <td>{{lang_lastBoot}}</td> + <td class="text-nowrap">{{lang_lastBoot}}</td> <td>{{lastboot_s}}</td> </tr> <tr> - <td>{{lang_lastSeen}}</td> + <td class="text-nowrap">{{lang_lastSeen}}</td> <td>{{lastseen_s}}</td> </tr> <tr> - <td>{{lang_usageState}}</td> + <td class="text-nowrap">{{lang_usageState}}</td> <td> {{#state_off}} <span class="glyphicon glyphicon-off"></span> {{lang_machineOff}} @@ -82,7 +82,7 @@ <div class="panel-body"> <table class="table table-condensed"> <tr> - <td>{{lang_cpuModel}}</td> + <td class="text-nowrap">{{lang_cpuModel}}</td> <td> {{cpumodel}} {{#Sockets}} @@ -93,11 +93,11 @@ </td> </tr> <tr> - <td>{{lang_model}}</td> + <td class="text-nowrap">{{lang_model}}</td> <td>{{pcmodel}} ({{manufacturer}})</td> </tr> <tr class="{{ramclass}}"> - <td>{{lang_ram}}</td> + <td class="text-nowrap">{{lang_ram}}</td> <td> {{gbram}} GiB {{#maxram}}({{lang_maximumAbbrev}} {{maxram}}){{/maxram}} @@ -106,7 +106,7 @@ </tr> {{#extram}} <tr> - <td>{{lang_ramSlots}}</td> + <td class="text-nowrap">{{lang_ramSlots}}</td> <td> {{ramslotcount}}: {{#ramslot}} @@ -116,11 +116,11 @@ </tr> {{/extram}} <tr class="{{hddclass}}"> - <td>{{lang_tempPart}}</td> + <td class="text-nowrap">{{lang_tempPart}}</td> <td>{{gbtmp}} GiB</td> </tr> <tr class="{{kvmclass}}"> - <td>{{lang_64bitSupport}}</td> + <td class="text-nowrap">{{lang_64bitSupport}}</td> <td>{{kvmstate}}</td> </tr> </table> diff --git a/modules-available/statistics/templates/machine-usage.html b/modules-available/statistics/templates/machine-usage.html index ffaa747b..ef969fc6 100644 --- a/modules-available/statistics/templates/machine-usage.html +++ b/modules-available/statistics/templates/machine-usage.html @@ -9,9 +9,9 @@ <div class="col-sm-6"> <table class="table table-condensed"> <tr> - <th>Type</th> - <th>When</th> - <th>Length</th> + <th>{{lang_eventType}}</th> + <th>{{lang_when}}</th> + <th>{{lang_duration}}</th> </tr> {{#rows}} <tr> @@ -26,9 +26,9 @@ <table class="table table-condensed"> {{#hasrows2}} <tr> - <th>Type</th> - <th>When</th> - <th>Length</th> + <th>{{lang_eventType}}</th> + <th>{{lang_when}}</th> + <th>{{lang_duration}}</th> </tr> {{/hasrows2}} {{#rows2}} |