diff options
author | Simon Rettberg | 2020-11-17 13:07:09 +0100 |
---|---|---|
committer | Simon Rettberg | 2020-11-17 13:07:09 +0100 |
commit | 9c2c64312771673012b3143a073bb6c227f4745f (patch) | |
tree | a9ac2e401217be2fecc0328e41bbf26eab7413f6 /modules-available/sysconfig/templates/list-configs.html | |
parent | [style/default.css] Fix margin/padding of slx-ellipsis hack (diff) | |
download | slx-admin-9c2c64312771673012b3143a073bb6c227f4745f.tar.gz slx-admin-9c2c64312771673012b3143a073bb6c227f4745f.tar.xz slx-admin-9c2c64312771673012b3143a073bb6c227f4745f.zip |
[sysconfig] Dynamically update warnings button
As we use AJAX to query build state for configs that don't have
state === 'OK', the warnings list might be out of date. Hide the
warnings button for all modules that aren't up to date, and dynamically
load their warnings. The warnings button will be shown when the module
finished building, assuming any warnings were generated.
Diffstat (limited to 'modules-available/sysconfig/templates/list-configs.html')
-rw-r--r-- | modules-available/sysconfig/templates/list-configs.html | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/modules-available/sysconfig/templates/list-configs.html b/modules-available/sysconfig/templates/list-configs.html index b5367f8b..1370155f 100644 --- a/modules-available/sysconfig/templates/list-configs.html +++ b/modules-available/sysconfig/templates/list-configs.html @@ -20,21 +20,17 @@ <input type="hidden" name="locationid" value="{{locationid}}"> <table id="conftable" class="slx-table table-hover" style="width:100%"> {{#configs}} - <tr> - <td data-id="{{configid}}" data-modlist="{{modlist}}" class="confrow slx-pointer" width="100%" title="{{dateline_s}}"> + <tr data-id="{{configid}}" data-modlist="{{modlist}}" class="confrow"> + <td class="title slx-pointer" width="100%" title="{{dateline_s}}"> <table class="slx-ellipsis"><tr><td> - {{#warnings}} - <button type="button" class="btn btn-xs btn-default" data-confirm="#confirm-mod-{{configid}}"> + <button type="button" class="btn btn-xs btn-default btn-warnings {{warnings_hidden}}" data-confirm="#confirm-mod-{{configid}}"> <span class="glyphicon glyphicon-exclamation-sign text-danger"></span> </button> - {{/warnings}} {{config}} </td></tr></table> </td> <td> - {{#warnings}} - <pre id="confirm-mod-{{configid}}" class="hidden">{{.}}</pre> - {{/warnings}} + <pre id="confirm-mod-{{configid}}" class="hidden row-warnings">{{warnings}}</pre> {{^current}} <button class="btn btn-primary btn-xs" name="activate" value="{{configid}}" {{perms.config.assign.disabled}}> <span class="glyphicon glyphicon-flag"></span> @@ -59,10 +55,10 @@ {{^locationid}} <button {{#needrebuild}} - class="refconf btn btn-primary btn-xs" + class="btn-rebuild btn btn-primary btn-xs" {{/needrebuild}} {{^needrebuild}} - class="refconf btn btn-default btn-xs" + class="btn-rebuild btn btn-default btn-xs" {{/needrebuild}} name="rebuild" value="{{configid}}" title="{{lang_rebuild}}" {{perms.config.edit.disabled}}> |