diff options
Diffstat (limited to 'modules-available/locations/templates/locations.html')
-rw-r--r-- | modules-available/locations/templates/locations.html | 126 |
1 files changed, 38 insertions, 88 deletions
diff --git a/modules-available/locations/templates/locations.html b/modules-available/locations/templates/locations.html index 7adfe2fc..efd48216 100644 --- a/modules-available/locations/templates/locations.html +++ b/modules-available/locations/templates/locations.html @@ -28,24 +28,14 @@ </div> {{/mismatchMachines}} - <table class="table table-condensed locations" style="margin-bottom:0"> + <table class="table table-condensed table-hover locations" style="margin-bottom:0"> <tr> <th width="100%">{{lang_locationName}}</th> - <th> - {{#havestatistics}}{{lang_machineCount}}{{/havestatistics}} - </th> - <th> - {{#havestatistics}}{{lang_machineLoad}}{{/havestatistics}} - </th> - <th class="text-nowrap"> - {{#havebaseconfig}}{{lang_editConfigVariables}}{{/havebaseconfig}} - </th> - <th class="text-nowrap"> - {{#havesysconfig}}{{lang_sysConfig}}{{/havesysconfig}} - </th> + {{#plugins}} <th class="text-nowrap"> - {{#haveipxe}}{{lang_bootMenu}}{{/haveipxe}} + {{header}} </th> + {{/plugins}} </tr> {{#list}} <tr> @@ -55,91 +45,36 @@ <span>{{locationname}}</span> {{/show-only}} {{^show-only}} - <a href="#" onclick="slxOpenLocation(this, {{locationid}}); return false"> + <a id="loc-{{locationid}}" href="#" onclick="slxOpenLocation(this, {{locationid}}); return false"> {{locationname}} <b class="caret"></b> </a> {{/show-only}} </td> - <td class="text-nowrap" align="right"> - {{#havestatistics}} - <a href="?do=Statistics&show=list&filters=location={{locationid}}"> {{clientCount}} </a> - <span style="display:inline-block;width:5ex"> - {{#hasChild}} - (<a href="?do=Statistics&show=list&filters=location~{{locationid}}">↓{{clientCountSum}}</a>) - {{/hasChild}} - </span> - {{/havestatistics}} - </td> - <td class="text-nowrap load-col" {{#clientCount}} style="background:linear-gradient(to right, #f97, #f97 {{clientLoad}}%, #6fa {{clientLoad}}%, #6fa {{clientIdle}}%, #eee {{clientIdle}}%)"{{/clientCount}}> - {{#clientCount}} - {{clientLoad}} % - {{/clientCount}} - </td> - <td class="text-nowrap {{overriddenClass}}"> - {{#havebaseconfig}} - <div class="pull-right" style="z-index:-1"> - <a class="btn btn-default btn-xs" href="?do=baseconfig&module=locations&locationid={{locationid}}"><span class="glyphicon glyphicon-edit"></span></a> - </div> - {{#overriddenVars}} - <span class="badge" title="{{lang_overridenVarsForLocation}}"> - <span class="glyphicon glyphicon-home"></span> {{.}} - </span> - {{/overriddenVars}} - {{#machineVarsOverrideCount}} - <span class="badge" title="{{lang_numMachinesWithOverrides}}"> - <span class="glyphicon glyphicon-tasks"></span> {{.}} - </span> - {{/machineVarsOverrideCount}} -    - {{/havebaseconfig}} - </td> - <td class="text-nowrap"> - {{#havesysconfig}} - <div class="pull-right"> - <a class="btn btn-default btn-xs" href="?do=sysconfig&locationid={{locationid}}"><span class="glyphicon glyphicon-edit"></span></a> - </div> - <span class="{{configClass}}"> - {{configName}}   - </span> - {{/havesysconfig}} - </td> - <td class="text-nowrap"> - {{#haveipxe}} - <div class="pull-right"> - <a class="btn btn-default btn-xs" href="?do=serversetup&show=assignlocation&locationid={{locationid}}"><span class="glyphicon glyphicon-edit"></span></a> - </div> - <span class="{{customMenuClass}}"> - {{customMenu}}   - </span> - {{/haveipxe}} + {{#plugins}} + <td> + <table width="100%"><tr> + <td class="text-nowrap {{class}}">{{{html}}}</td> + {{#url}} + <td class="edit-btn"> + <a class="btn btn-default btn-xs" href="{{.}}"> + <span class="glyphicon glyphicon-edit"></span> + </a> + </td> + {{/url}} + </tr></table> </td> + {{/plugins}} </tr> {{/list}} - {{#unassignedCount}} <tr> <td>{{lang_unassignedMachines}}</td> - <td class="text-nowrap" align="right"> - <a href="?do=Statistics&show=list&filters=location=0"> - {{unassignedCount}} - </a> - <span style="display:inline-block;width:5ex"></span> - </td> - <td class="text-nowrap load-col"{{#unassignedCount}} style="background:linear-gradient(to right, #f97, #f97 {{unassignedLoad}}%, #6fa {{unassignedLoad}}%, #6fa {{unassignedIdle}}%, #eee {{unassignedIdle}}%)"{{/unassignedCount}}> - {{#unassignedCount}} - {{unassignedLoad}} % - {{/unassignedCount}} + {{#plugins}} + <td class="text-nowrap"> + {{{propagateDefaultHtml}}} </td> - <td> - {{#unassignedOverrides}} - <span class="badge" title="{{lang_numMachinesWithOverrides}}"> - <span class="glyphicon glyphicon-tasks"></span> {{.}} - </span> - {{/unassignedOverrides}} - </td> - <td>{{defaultConfig}}</td> + {{/plugins}} </tr> - {{/unassignedCount}} </table> <form method="post" action="?do=Locations"> <input type="hidden" name="token" value="{{token}}"> @@ -167,6 +102,14 @@ var slxLastLocation = false; var newRowCounter = 0; +document.addEventListener("DOMContentLoaded", function() { + var id = window.location.hash.substring(1); + if (id !== "") { + var loc_dom = document.getElementById("loc-" + id); + slxOpenLocation(loc_dom, id); + } +}); + function slxAddLocationRow() { $("#saveLocationRows").show(); var tr = $('#lasttr'); @@ -206,7 +149,7 @@ function slxOpenLocation(e, lid) { } return; } - var td = $('<td>').attr('colspan', '6').css('padding', '0px 0px 12px'); + var td = $('<td>').attr('colspan', '{{colspan}}').css('padding', '0px 0px 12px'); var tr = $('<tr>').attr('id', 'location-details-' + lid); tr.append(td); $(e).closest('tr').addClass('active slx-bold').after(tr); @@ -250,5 +193,12 @@ function deleteSubnetWarning(locid) { form.submit(); } } + +function loadOpeningTimes(locid) { + var $e = $("#openingTimesModal" + locid).find('.modal-body'); + if (!$e.is(':empty')) return; + $e.load("?do=Locations&page=details&action=getOpeningtimes&locid=" + locid) +} + // --> </script> |