Working on Exchange config
This commit is contained in:
parent
b7e35731c8
commit
4db1f866f3
16 changed files with 226 additions and 28 deletions
98
src/main/resources/web/exchange_config.tmpl
Normal file
98
src/main/resources/web/exchange_config.tmpl
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
<div class="col-md-12 d-flex">
|
||||
|
||||
<div class="card flex-fill w-100">
|
||||
<div class="card-header">
|
||||
<div class="card-actions float-end">
|
||||
<div class="btn-group float-end" role="group">
|
||||
<button type="button" class="btn btn-success"
|
||||
data-toggle="modal" data-target="#exchangeModal" data-action="create_exchange">
|
||||
<i class="bi bi-plus-square"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<h5 class="card-title mb-0">Exchange Instances</h5>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Configuration</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#exchanges}}
|
||||
<tr>
|
||||
<td>{{.getName()}}</td>
|
||||
<td>{{.getClass().getSimpleName()}}</td>
|
||||
<td>{{.getDeviceConfig()}}</td>
|
||||
<td>
|
||||
<form method="POST">
|
||||
<input type="hidden" name="id" value="{{.getId()}}">
|
||||
|
||||
<div class="btn-toolbar pull-right">
|
||||
<button type="button" class="btn btn-default btn-xs" data-toggle="modal"
|
||||
data-target="#exchangeModal"
|
||||
data-action="modify_exchange"
|
||||
data-id="{{.getId()}}"
|
||||
data-name="{{.getName()}}"
|
||||
data-type="{{.getType()}}"
|
||||
{{#.getDeviceConfigurator().getConfiguration()}}
|
||||
data-{{.getName()}}="{{.getString()}}"
|
||||
{{/.getDeviceConfigurator().getConfiguration()}}
|
||||
>
|
||||
<span class="glyphicon glyphicon-pencil"></span>
|
||||
</button>
|
||||
|
||||
<button type="submit" class="btn btn-danger btn-xs" name="action" value="remove_exchange">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{{/exchanges}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!------------- MODALS --------------->
|
||||
<script>
|
||||
$(function(){
|
||||
initDynamicModalForm("exchangeModal");
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="modal fade" id="exchangeModal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><span>×</span></button>
|
||||
<h4 class="modal-title">Exchange</h4>
|
||||
</div>
|
||||
<form method="POST">
|
||||
<div class="modal-body">
|
||||
<input type="hidden" id="action" name="action">
|
||||
<input type="hidden" id="id" name="id">
|
||||
<div class="form-group">
|
||||
<label class="control-label">Name:</label>
|
||||
<input type="text" class="form-control" name="name">
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="reset" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
||||
<button type="submit" class="btn btn-primary">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -1,12 +1,27 @@
|
|||
<h1 class="page-header">Symbol Configuration</h1>
|
||||
<div class="col-md-12 d-flex">
|
||||
<div class="card flex-fill w-100">
|
||||
<div class="card-header">
|
||||
<div class="card-actions float-end">
|
||||
<div class="dropdown show">
|
||||
<a href="#" data-bs-toggle="dropdown" data-bs-display="static">
|
||||
<i class="align-middle" data-feather="more-horizontal"></i>
|
||||
</a>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default drop-shadow">
|
||||
<div class="panel-heading"></div>
|
||||
<div class="panel-body">
|
||||
<div class="dropdown-menu dropdown-menu-end">
|
||||
<a class="dropdown-item" href="#">Action</a>
|
||||
<a class="dropdown-item" href="#">Another action</a>
|
||||
<a class="dropdown-item" href="#">Something else here</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h5 class="card-title mb-0">Recent Movement</h5>
|
||||
</div>
|
||||
|
||||
<table class="table table-hover table-condensed">
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Configuration</th>
|
||||
|
|
@ -17,7 +32,9 @@
|
|||
<span class="glyphicon glyphicon-plus"></span>
|
||||
</button>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#symbols}}
|
||||
<tr>
|
||||
<td>{{.getName()}}</td>
|
||||
|
|
@ -37,8 +54,8 @@
|
|||
{{#.getDeviceConfigurator().getConfiguration()}}
|
||||
data-{{.getName()}}="{{.getString()}}"
|
||||
{{/.getDeviceConfigurator().getConfiguration()}}
|
||||
>
|
||||
<span class="glyphicon glyphicon-pencil"></span>
|
||||
>
|
||||
<span class="glyphicon glyphicon-pencil"></span>
|
||||
</button>
|
||||
|
||||
<button type="submit" class="btn btn-danger btn-xs" name="action" value="remove_symbol">
|
||||
|
|
@ -49,11 +66,12 @@
|
|||
</td>
|
||||
</tr>
|
||||
{{/symbols}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!------------- MODALS --------------->
|
||||
<script>
|
||||
|
|
|
|||
|
|
@ -43,4 +43,5 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue