2016-06-03 13:34:14 +02:00
|
|
|
<!--
|
|
|
|
Special container to show hash in hash
|
|
|
|
-->
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h3 class="panel-title">{{translateTitle(currentNode)}}</h3>
|
|
|
|
</div>
|
2016-06-03 18:28:52 +02:00
|
|
|
<div class="panel-body" ng-repeat="(n,h) in currentNode.data">
|
2016-06-03 13:34:14 +02:00
|
|
|
<div class="input-group">
|
|
|
|
<span class="input-group-addon" trspan="hostname"></span>
|
2016-06-03 18:28:52 +02:00
|
|
|
<input type="text" class="form-control" ng-model="n"/>
|
2016-06-03 13:34:14 +02:00
|
|
|
</div>
|
|
|
|
<table class="table table-striped">
|
|
|
|
<thead>
|
|
|
|
<tr><th width="40%" trspan="keys"></th><th width="40%" trspan="values"></th><th></th></tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2016-06-03 18:28:52 +02:00
|
|
|
<tr ng-repeat="(k,v) in h.data">
|
2016-06-03 13:34:14 +02:00
|
|
|
<td><input class="form-control" ng-model="k"/></td>
|
|
|
|
<td><input class="form-control" ng-model="v"/></td>
|
2016-06-03 18:28:52 +02:00
|
|
|
<td><span class="link text-success glyphicon glyphicon-plus-sign" ng-click="h.new='new'"/></td>
|
2016-06-03 13:34:14 +02:00
|
|
|
<td>
|
2016-06-03 18:28:52 +02:00
|
|
|
<span class="link text-danger glyphicon glyphicon-minus-sign" ng-click="h.delete(k)"/>
|
2016-06-03 13:34:14 +02:00
|
|
|
<span ng-if="$last" class="link text-success glyphicon glyphicon-plus-sign" ng-click="h.push({'new':'new'})"/>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
2016-06-03 18:28:52 +02:00
|
|
|
<pre>{{currentNode|json}}</pre>
|
2016-06-03 13:34:14 +02:00
|
|
|
</div>
|
|
|
|
<script type="text/menu">
|
|
|
|
[{
|
|
|
|
'title': 'newHost',
|
|
|
|
'action': function(cn,scope){
|
2016-06-03 18:28:52 +02:00
|
|
|
console.log(cn);
|
|
|
|
if(!cn.data) cn.data={};
|
|
|
|
cn.data["newHost"]={"new":"value"};
|
2016-06-03 13:34:14 +02:00
|
|
|
},
|
|
|
|
'icon': 'plus-sign'
|
|
|
|
}]
|
|
|
|
</script>
|