hal/hal-core/resource/resource/web/plugin_config.tmpl

86 lines
3.5 KiB
Cheetah
Raw Normal View History

2020-11-11 01:48:09 +01:00
<h1 class="page-header">Plugins</h1>
<div class="col-md-12">
<div class="panel panel-default drop-shadow">
2021-06-08 23:51:28 +02:00
<div class="panel-heading">Detected Plugins</div>
2020-11-11 01:48:09 +01:00
<div class="panel-body">
<table class="table table-hover table-condensed">
<thead>
<th class="col-md-3">Name</th>
2020-12-05 00:03:12 +01:00
<th class="col-md-1">Version</th>
<th class="col-md-7">Description</th>
2020-12-05 01:00:08 +01:00
<th class="col-md-1 text-right">Enable</th>
2020-11-11 01:48:09 +01:00
</thead>
{{#plugins}}
<tr>
<td>{{.getName()}}</td>
<td>{{.getVersion()}}</td>
2021-06-08 23:34:44 +02:00
<td>{{#.getDescription()}}{{.getDescription()}}{{/.getDescription()}}</td>
2020-11-11 01:48:09 +01:00
<td>
<form method="POST">
<input type="hidden" name="action" value="plugin_enable">
<input type="hidden" name="plugin_name" value="{{.getName()}}">
2020-11-11 01:48:09 +01:00
<div class="btn-toolbar pull-right">
<input class="toggle-switch" type="checkbox" name="enabled"
data-size="mini" data-on-color="danger"
{{#.isEnabled()}}checked{{/.isEnabled()}} >
</div>
</form>
</td>
</tr>
{{/plugins}}
</table>
</div>
</div>
</div>
<div class="col-md-12">
<div class="panel panel-default drop-shadow">
<div class="panel-heading">Active Controllers</div>
<div class="panel-body">
<table class="table table-hover table-condensed">
<thead>
<th class="col-md-3">Name</th>
<th class="col-md-1 text-right">Actions</th>
2020-11-11 01:48:09 +01:00
</thead>
{{#controllers}}
<tr>
<td>{{.getClass().getName()}}</td>
<td>
{{#.isScannable()}}
<div class="btn-toolbar pull-right">
<form method="POST">
<input type="hidden" name="action" value="controller_scan">
<input type="hidden" name="controller" value="{{.getClass().getName()}}">
{{#.isScanning()}}
<button type="submit" class="btn btn-primary btn-xs" style="padding: 1px 20px;" disabled>
<span class="glyphicon glyphicon-refresh anim-spin"></span>
</button>
{{/.isScanning()}}
{{^.isScanning()}}
<button type="submit" class="btn btn-primary btn-xs" style="padding: 1px 20px;">
<span class="glyphicon glyphicon-search"></span>
</button>
{{/.isScanning()}}
</form>
{{/.isScannable()}}
</div>
</td>
2020-11-11 01:48:09 +01:00
</tr>
{{/controllers}}
</table>
</div>
</div>
</div>
<script>
$(function (){
$(".toggle-switch").on("switchChange.bootstrapSwitch", function (event, state) {
$(this).closest('form').submit();
});
});
</script>