From 41612c4481111969367d1a228ad4875d781558a2 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 30 Nov 2021 15:27:59 +0100 Subject: [locations] Modularize additional column handling Additional columns are now added through a hook, moving specialized code where it belongs. --- .../locations/templates/locations.html | 107 ++++----------------- 1 file changed, 21 insertions(+), 86 deletions(-) (limited to 'modules-available/locations/templates/locations.html') diff --git a/modules-available/locations/templates/locations.html b/modules-available/locations/templates/locations.html index 125c101a..efd48216 100644 --- a/modules-available/locations/templates/locations.html +++ b/modules-available/locations/templates/locations.html @@ -31,21 +31,11 @@ - - - + {{#plugins}} - + {{/plugins}} {{#list}} @@ -61,85 +51,30 @@ {{/show-only}} - - - - - + {{/plugins}} {{/list}} - {{#unassignedCount}} - - - - + {{/plugins}} - {{/unassignedCount}}
{{lang_locationName}} - {{#havestatistics}}{{lang_machineCount}}{{/havestatistics}} - - {{#havestatistics}}{{lang_machineLoad}}{{/havestatistics}} - - {{#havebaseconfig}}{{lang_editConfigVariables}}{{/havebaseconfig}} - - {{#havesysconfig}}{{lang_sysConfig}}{{/havesysconfig}} - - {{#haveipxe}}{{lang_bootMenu}}{{/haveipxe}} + {{header}}
- {{#havestatistics}} -  {{clientCount}}  - - {{#hasChild}} - (↓{{clientCountSum}}) - {{/hasChild}} - - {{/havestatistics}} - - {{#clientCount}} - {{clientLoad}} % - {{/clientCount}} - - {{#havebaseconfig}} -
- -
- {{#overriddenVars}} - - {{.}} - - {{/overriddenVars}} - {{#machineVarsOverrideCount}} - - {{.}} - - {{/machineVarsOverrideCount}} -    - {{/havebaseconfig}} -
- {{#havesysconfig}} -
- -
- - {{configName}}   - - {{/havesysconfig}} -
- {{#haveipxe}} -
- -
- - {{customMenu}}   - - {{/haveipxe}} + {{#plugins}} +
+ + + {{#url}} + + {{/url}} +
{{{html}}} + + + +
{{lang_unassignedMachines}} - -  {{unassignedCount}}  - - - - {{#unassignedCount}} - {{unassignedLoad}} % - {{/unassignedCount}} - - {{#unassignedOverrides}} - - {{.}} - - {{/unassignedOverrides}} + {{#plugins}} + + {{{propagateDefaultHtml}}} {{defaultConfig}}
@@ -214,7 +149,7 @@ function slxOpenLocation(e, lid) { } return; } - var td = $('').attr('colspan', '6').css('padding', '0px 0px 12px'); + var td = $('').attr('colspan', '{{colspan}}').css('padding', '0px 0px 12px'); var tr = $('').attr('id', 'location-details-' + lid); tr.append(td); $(e).closest('tr').addClass('active slx-bold').after(tr); -- cgit v1.2.3-55-g7522