diff options
author | Simon Rettberg | 2019-07-31 16:58:14 +0200 |
---|---|---|
committer | Simon Rettberg | 2019-07-31 16:58:14 +0200 |
commit | 7c539fd8736b0ff9acafe32d857b2a2021d778e6 (patch) | |
tree | b6a44076cba8443b2840340256b9829451214229 /modules-available/locations/templates | |
parent | [locations] Optimize some functions in Location class (diff) | |
download | slx-admin-7c539fd8736b0ff9acafe32d857b2a2021d778e6.tar.gz slx-admin-7c539fd8736b0ff9acafe32d857b2a2021d778e6.tar.xz slx-admin-7c539fd8736b0ff9acafe32d857b2a2021d778e6.zip |
[locations] Add warnings/cleanup for bad machine to roomplan mappings
Diffstat (limited to 'modules-available/locations/templates')
4 files changed, 89 insertions, 5 deletions
diff --git a/modules-available/locations/templates/location-subnets.html b/modules-available/locations/templates/location-subnets.html index 78ef99a0..6062b559 100644 --- a/modules-available/locations/templates/location-subnets.html +++ b/modules-available/locations/templates/location-subnets.html @@ -2,6 +2,7 @@ <div class="slx-bold">{{lang_locationSettings}}</div> <form id="locationForm{{locationid}}" method="post" action="?do=Locations"> <input type="hidden" name="token" value="{{token}}"> + <input type="hidden" name="page" value="details"> <input type="hidden" name="action" value="updatelocation"> <input type="hidden" name="locationid" value="{{locationid}}"> <div style="display:none"> diff --git a/modules-available/locations/templates/locations.html b/modules-available/locations/templates/locations.html index 7bdf3038..a63e3b8c 100644 --- a/modules-available/locations/templates/locations.html +++ b/modules-available/locations/templates/locations.html @@ -1,10 +1,10 @@ <div> <div class="btn-group pull-right"> - <a href="?do=Locations&action=showlocations" class="btn btn-default active"> + <a href="?do=Locations&page=locations" class="btn btn-default active"> <span class="glyphicon glyphicon-home"></span> {{lang_thisListByLocation}} </a> - <a href="?do=Locations&action=showsubnets" class="btn btn-default {{perms.subnets.edit.disabled}}"> + <a href="?do=Locations&page=subnets" class="btn btn-default {{perms.subnets.edit.disabled}}"> <span class="glyphicon glyphicon-list-alt"></span> {{lang_thisListBySubnet}} </a> @@ -21,6 +21,12 @@ {{lang_locationOtherOverlap}}: <b>{{name1}}</b> – <b>{{name2}}</b> </div> {{/overlapOther}} + {{#mismatchMachines}} + <div class="alert alert-danger"> + <div class="pull-right"><a href="?do=locations&page=cleanup&locationid={{locationid}}">{{lang_fixMachineAssign}} »</a></div> + {{lang_locationMismatch}}: <b>{{locationname}}</b> ({{lang_machineCount}}: <b>{{count}}</b>) + </div> + {{/mismatchMachines}} <table class="table table-condensed locations" style="margin-bottom:0"> <tr> @@ -121,6 +127,7 @@ </table> <form method="post" action="?do=Locations"> <input type="hidden" name="token" value="{{token}}"> + <input type="hidden" name="page" value="locations"> <input type="hidden" name="action" value="addlocations"> <table class="table table-condensed"> <tr id="lasttr"> @@ -187,7 +194,7 @@ function slxOpenLocation(e, lid) { var tr = $('<tr>').attr('id', 'location-details-' + lid); tr.append(td); $(e).closest('tr').addClass('active slx-bold').after(tr); - td.load('?do=Locations&action=showlocation&locationid=' + lid, function() { + td.load('?do=Locations&page=details&action=showlocation&locationid=' + lid, function() { slxAttachCidr(); scollIntoView(tr); }); diff --git a/modules-available/locations/templates/mismatch-cleanup.html b/modules-available/locations/templates/mismatch-cleanup.html new file mode 100644 index 00000000..a6f45d27 --- /dev/null +++ b/modules-available/locations/templates/mismatch-cleanup.html @@ -0,0 +1,69 @@ + +<div class="btn-group pull-right"> + <a href="?do=Locations&page=locations" class="btn btn-default {{perms.location.view.disabled}}"> + <span class="glyphicon glyphicon-home"></span> + {{lang_thisListByLocation}} + </a> + <a href="?do=Locations&page=subnets" class="btn btn-default {{perms.subnets.edit.disabled}}"> + <span class="glyphicon glyphicon-list-alt"></span> + {{lang_thisListBySubnet}} + </a> +</div> +<h1>{{lang_mismatchHeading}}</h1> +<h2>{{locationname}}</h2> + +<p>{{lang_mismatchIntroText}}</p> + +<form method="post" action="?do=locations"> + <input type="hidden" name="token" value="{{token}}"> + <input type="hidden" name="page" value="cleanup"> + <input type="hidden" name="locationid" value="{{locationid}}"> + <table class="table"> + <thead> + <tr> + <th>{{lang_machine}}</th> + <th>{{lang_ip}}</th> + <th class="slx-smallcol">{{lang_moveable}}</th> + <th>{{lang_locationBySubnet}}</th> + </tr> + </thead> + <tbody> + {{#clients}} + <tr> + <td> + <div class="checkbox checkbox-inline"> + <input id="machine-{{machineuuid}}" type="checkbox" name="machines[]" value="{{machineuuid}}" {{disabled}}> + <label for="machine-{{machineuuid}}">{{hostname}}{{^hostname}}{{clientip}}{{/hostname}}</label> + </div> + </td> + <td> + {{clientip}} + </td> + <td> + {{#canmove}} + <span class="glyphicon glyphicon-ok"></span> + {{/canmove}} + {{^canmove}} + <span class="glyphicon glyphicon-remove text-danger"></span> + {{/canmove}} + </td> + <td> + {{iplocationname}} + </td> + </tr> + {{/clients}} + </tbody> + </table> + + <div class="buttonbar pull-right"> + <button type="submit" class="btn btn-primary" name="action" value="resetmachines"> + <span class="glyphicon glyphicon-repeat"></span> + {{lang_resetMachines}} + </button> + <button type="submit" class="btn btn-success" name="action" value="movemachines"> + <span class="glyphicon glyphicon-arrow-right"></span> + {{lang_moveMachines}} + </button> + </div> +</form> +<div class="clearfix"></div>
\ No newline at end of file diff --git a/modules-available/locations/templates/subnets.html b/modules-available/locations/templates/subnets.html index d027d800..59acf212 100644 --- a/modules-available/locations/templates/subnets.html +++ b/modules-available/locations/templates/subnets.html @@ -1,11 +1,18 @@ <div> <div class="btn-group pull-right"> - <a href="?do=Locations&action=showlocations" class="btn btn-default"><span class="glyphicon glyphicon-home"></span> {{lang_thisListByLocation}}</a> - <a href="?do=Locations&action=showsubnets" class="btn btn-default active"><span class="glyphicon glyphicon-list-alt"></span> {{lang_thisListBySubnet}}</a> + <a href="?do=Locations&page=locations" class="btn btn-default {{perms.location.view.disabled}}"> + <span class="glyphicon glyphicon-home"></span> + {{lang_thisListByLocation}} + </a> + <a href="?do=Locations&page=subnets" class="btn btn-default active"> + <span class="glyphicon glyphicon-list-alt"></span> + {{lang_thisListBySubnet}} + </a> </div> <h1>{{lang_listOfSubnets}}</h1> <form method="post" action="?do=Locations"> <input type="hidden" name="token" value="{{token}}"> + <input type="hidden" name="page" value="subnets"> <input type="hidden" name="action" value="updatesubnets"> <table class="table table-condensed table-striped"> <tr> |