host-edit.html 5.61 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
<form class="form-horizontal">
  <div class="span5">
    <div class="control-group">
      <label class="control-label" for="ID">ID</label>
      <div class="controls">
        <input class="input-mini" type="text" id="ID" placeholder="ID" value="{{entity.id}}" disabled="disabled">
      </div>
    </div>
    <div class="control-group">
      <label class="control-label" for="created_at">Created at</label>
      <div class="controls">
        <input class="input" type="text" id="created_at" ng-model="entity.created_at" disabled="disabled">
      </div>
    </div>
    <div class="control-group">
      <label class="control-label" for="modified_at">Modified at</label>
      <div class="controls">
        <input class="input" type="text" id="modified_at" ng-model="entity.modified_at" disabled="disabled">
      </div>
    </div>
Bence Dányi committed
21
    <div class="control-group" ng-class="hasError('name')">
22 23 24
      <label class="control-label" for="name">Name</label>
      <div class="controls">
        <input type="text" id="name" ng-model="entity.name" />
Bence Dányi committed
25
        <span class="help-inline" ng-bind="getError('name')"></span>
26 27
      </div>
    </div>
Bence Dányi committed
28
    <div class="control-group" ng-class="hasError('mac')">
29 30 31
      <label class="control-label" for="mac">MAC</label>
      <div class="controls">
        <input type="text" id="mac" ng-model="entity.mac" />
Bence Dányi committed
32
        <span class="help-inline" ng-bind="getError('mac')"></span>
33 34
      </div>
    </div>
Bence Dányi committed
35
    <div class="control-group" ng-class="hasError('ipv4')">
36 37 38
      <label class="control-label" for="ipv4">IPv4</label>
      <div class="controls">
        <input type="text" id="ipv4" ng-model="entity.ipv4" />
Bence Dányi committed
39
        <span class="help-inline" ng-bind="getError('ipv4')"></span>
40 41
      </div>
    </div>
Bence Dányi committed
42
    <div class="control-group" ng-class="hasError('pub_ipv4')">
43 44 45
      <label class="control-label" for="pub_ipv4">Public IPv4</label>
      <div class="controls">
        <input type="text" id="pub_ipv4" ng-model="entity.pub_ipv4" />
Bence Dányi committed
46
        <span class="help-inline" ng-bind="getError('pub_ipv4')"></span>
47 48
      </div>
    </div>
Bence Dányi committed
49
    <div class="control-group" ng-class="hasError('ipv6')">
50 51
      <label class="control-label" for="ipv6">IPv6</label>
      <div class="controls">
52
        <input type="text" class="input-xlarge" id="ipv6" ng-model="entity.ipv6" />
Bence Dányi committed
53
        <span class="help-inline" ng-bind="getError('ipv6')"></span>
54 55
      </div>
    </div>
Bence Dányi committed
56
    <div class="control-group" ng-class="hasError('owner')">
57 58 59
      <label class="control-label" for="owner">Owner</label>
      <div class="controls">
        <input type="text" autocomplete="off" id="owner" ng-model="entity.owner.name" />
Bence Dányi committed
60
        <span class="help-inline" ng-bind="getError('owner')"></span>
61 62
      </div>
    </div>
Bence Dányi committed
63
    <div class="control-group" ng-class="hasError('vlan')">
64 65
      <label class="control-label" for="vlan">Vlan</label>
      <div class="controls">
66
        <input type="text" data-provide="typeahead" autocomplete="off" class="vlan" id="vlan" ng-model="entity.vlan.name" />
Bence Dányi committed
67
        <span class="help-inline" ng-bind="getError('vlan')"></span>
68 69
      </div>
    </div>
70 71
  </div>
  <div class="span5">
Bence Dányi committed
72
    <div class="control-group" ng-class="hasError('description')">
73 74 75 76
      <label class="control-label" for="description">Description</label>
      <div class="controls">
        <textarea rows="4" id="description" ng-model="entity.description">
        </textarea>
Bence Dányi committed
77
        <span class="help-inline" ng-bind="getError('description')"></span>
78 79 80 81 82 83 84 85 86
      </div>
    </div>
    <div class="control-group">
      <div class="controls">
        <label class="checkbox">
          <input type="checkbox" ng-model="entity.shared_ip"> Shared IP
        </label>
      </div>
    </div>
Bence Dányi committed
87
    <div class="control-group" ng-class="hasError('comment')">
88 89 90 91
      <label class="control-label" for="comment">Comment</label>
      <div class="controls">
        <textarea rows="2" id="comment" ng-model="entity.comment">
        </textarea>
Bence Dányi committed
92
        <span class="help-inline" ng-bind="getError('comment')"></span>
93 94
      </div>
    </div>
Bence Dányi committed
95
    <div class="control-group" ng-class="hasError('groups')">
96 97 98
      <label class="control-label" for="hostgroups">Host groups</label>
      <div class="controls">
        <div class="well well-small">
99
          <span class="label label-info" ng-repeat="group in entity.groups | filter: destroyed">
100
            <a href="#/hostgroups/{{group.id}}">{{group.name}}</a>
101
            <a href ng-click="removeHostGroup(group)"><i class="icon-remove"></i></a>
102 103 104
          </span>
        </div>
        <div class="input-append">
105 106
          <input class="span2 hostgroup" id="hostgroup" type="text" ng-model="newGroup">
          <button class="btn" type="button" ng-click="addHostGroup(newGroup)">Add</button>
Bence Dányi committed
107
          <span class="help-inline" ng-bind="getError('groups')"></span>
108 109 110 111
        </div>
      </div>
    </div>
    <div class="control-group">
112
      <div class="controls">
Bence Dányi committed
113
        <button type="submit" class="btn" ng-click="save()">Save</button>
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
      </div>
    </div>
  </div>
</form>
<div class="span12">
  <h3>Rules belonging to this host</h3>
  <table class="table table-striped">
    <thead>
      <tr>
        <th>Direction</th>
        <th>Protocol</th>
        <th>Accept</th>
        <th>NAT</th>
        <th colspan="2">Owner</th>
      </tr>
    </thead>
    <tbody>
      <tr ng-repeat="rule in entity.rules">
        <td>{{rule.direction}}</td>
        <td>{{rule.proto}}</td>
        <td>{{rule.accept}}</td>
        <td>{{rule.nat}}</td>
        <td>{{rule.owner.name}}</td>
        <td>
          <a class="btn" href="#/rules/{{rule.id}}/">Edit</a>
          <a class="btn btn-danger" href="#/rules/{{rule.id}}/delete/">Delete</a>
        </td>
      </tr>
    </tbody>
  </table>
</div>