vlan-edit.html 8.7 KB
Newer Older
1 2 3 4 5
<form class="form-horizontal">
  <div class="span5">
    <div class="control-group">
      <label class="control-label" for="ID">ID</label>
      <div class="controls">
6 7 8 9 10 11 12 13 14
        <span class="has-tooltip" title="Built in ID, do not change this">
          <input
            class="input-mini"
            type="text"
            id="ID"
            placeholder="ID"
            value="{{entity.id}}"
            disabled="disabled" />
        </span>
15 16
      </div>
    </div>
17
    <div class="control-group" ng-class="hasError('vid')">
18 19
      <label class="control-label" for="VID">VID</label>
      <div class="controls">
20 21 22 23 24 25 26
        <input
          class="input-mini"
          type="text"
          id="VID"
          placeholder="ID"
          ng-model="entity.vid"
          title="Vlan ID, you can change this" />
27
        <span class="help-inline" ng-bind="getError('vid')"></span>
28 29 30 31 32
      </div>
    </div>
    <div class="control-group">
      <label class="control-label" for="created_at">Created at</label>
      <div class="controls">
33 34 35 36 37 38 39 40
        <span class="has-tooltip" title="The entity was created at this date">
          <input
            class="input"
            type="text"
            id="created_at"
            ng-model="entity.created_at"
            disabled="disabled" />
        </span>
41 42 43 44 45
      </div>
    </div>
    <div class="control-group">
      <label class="control-label" for="modified_at">Modified at</label>
      <div class="controls">
46 47 48 49 50 51 52 53
        <span class="has-tooltip" title="The entity was last modified at this date">
          <input
            class="input"
            type="text"
            id="modified_at"
            ng-model="entity.modified_at"
            disabled="disabled" />
        </span>
54 55
      </div>
    </div>
56
    <div class="control-group" ng-class="hasError('name')">
57 58
      <label class="control-label" for="name">Name</label>
      <div class="controls">
59 60 61 62 63
        <input
          type="text"
          id="name"
          ng-model="entity.name"
          title="Name of this Vlan" />
64
        <span class="help-inline" ng-bind="getError('name')"></span>
65 66
      </div>
    </div>
67
    <div class="control-group" ng-class="hasError('ipv4')">
68 69
      <label class="control-label" for="ipv4">IPv4</label>
      <div class="controls">
70 71 72 73 74
        <input
          type="text"
          id="ipv4"
          ng-model="entity.ipv4"
          title="IPv4 address of this Vlan (with subnet mask)" />
75
        <span class="help-inline" ng-bind="getError('ipv4')"></span>
76 77
      </div>
    </div>
78
    <div class="control-group" ng-class="hasError('ipv6')">
79 80
      <label class="control-label" for="ipv6">IPv6</label>
      <div class="controls">
81 82 83 84 85 86
        <input
          type="text"
          class="input-xlarge"
          id="ipv6"
          ng-model="entity.ipv6"
          title="IPv6 address of this Vlan (with subnet mask)" />
87
        <span class="help-inline" ng-bind="getError('ipv6')"></span>
88 89
      </div>
    </div>
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
    <div class="control-group" ng-class="hasError('net4')">
      <label class="control-label" for="net4">Net4</label>
      <div class="controls">
        <input
          type="text"
          id="net4"
          ng-model="entity.net4"
          title="Net4 address of this Vlan (with subnet mask)" />
        <span class="help-inline" ng-bind="getError('net4')"></span>
      </div>
    </div>
    <div class="control-group" ng-class="hasError('net6')">
      <label class="control-label" for="net6">Net6</label>
      <div class="controls">
        <input
          type="text"
          class="input-xlarge"
          id="net6"
          ng-model="entity.net6"
          title="Net6 address of this Vlan (with subnet mask)" />
        <span class="help-inline" ng-bind="getError('net6')"></span>
      </div>
    </div>
113 114
    <div class="control-group" ng-class="hasError('snat_ip')">
      <label class="control-label" for="snat_ip">NAT</label>
115
      <div class="controls">
116 117 118 119 120
        <input
          type="text"
          id="snat_ip"
          ng-model="entity.nat"
          title="NAT IP for this Vlan" />
121
        <span class="help-inline" ng-bind="getError('snat_ip')"></span>
122 123
      </div>
    </div>
124 125
  </div>
  <div class="span5">
126
    <div class="control-group" ng-class="hasError('owner')">
127 128
      <label class="control-label" for="owner">Owner</label>
      <div class="controls">
129 130 131 132 133 134 135
        <input
          type="text"
          class="owner"
          autocomplete="off"
          id="owner"
          ng-model="entity.owner.name"
          title="Owners name" />
136
        <span class="help-inline" ng-bind="getError('owner')"></span>
137 138
      </div>
    </div>
139
    <div class="control-group" ng-class="hasError('interface')">
140 141
      <label class="control-label" for="interface">Interface</label>
      <div class="controls">
142 143 144 145 146 147
        <input
          type="text"
          autocomplete="off"
          id="interface"
          ng-model="entity.interface"
          title="#TODO" />
148
        <span class="help-inline" ng-bind="getError('interface')"></span>
149 150
      </div>
    </div>
151
    <div class="control-group" ng-class="hasError('domain')">
152 153
      <label class="control-label" for="domain">Domain</label>
      <div class="controls">
154 155 156 157 158 159 160 161
        <input
          type="text"
          class="domain"
          data-provide="typeahead"
          autocomplete="off"
          id="domain"
          ng-model="entity.domain.name"
          title="Domain name" />
162
        <span class="help-inline" ng-bind="getError('domain')"></span>
163 164
      </div>
    </div>
165
    <div class="control-group" ng-class="hasError('reverse_domain')">
166 167
      <label class="control-label" for="reverse_domain">Reverse domain</label>
      <div class="controls">
168 169 170 171 172 173
        <input
          type="text"
          autocomplete="off"
          id="reverse_domain"
          ng-model="entity.reverse_domain"
          title="Reverse domain name" />
174
        <span class="help-inline" ng-bind="getError('reverse_domain')"></span>
175 176
      </div>
    </div>
177
    <div class="control-group" ng-class="hasError('description')">
178 179
      <label class="control-label" for="description">Description</label>
      <div class="controls">
180 181 182 183
        <textarea id="description"
          rows="2"
          ng-model="entity.description"
          title="Short description">
184
        </textarea>
185
        <span class="help-inline" ng-bind="getError('description')"></span>
186 187
      </div>
    </div>
188
    <div class="control-group" ng-class="hasError('comment')">
189 190
      <label class="control-label" for="comment">Comment</label>
      <div class="controls">
191 192 193 194
        <textarea id="comment"
          rows="2"
          ng-model="entity.comment"
          title="Some comments... #TODO">
195
        </textarea>
196
        <span class="help-inline" ng-bind="getError('comment')"></span>
197 198
      </div>
    </div>
199
    <div class="control-group" ng-class="hasError('dhcp_pool')">
200 201
      <label class="control-label" for="dhcp_pool">DHCP Pool</label>
      <div class="controls">
202 203 204 205
        <textarea id="dhcp_pool"
          rows="2"
          ng-model="entity.dhcp_pool"
          title="Some DHCP Pool related thing... #TODO">
206
        </textarea>
207
        <span class="help-inline" ng-bind="getError('dhcp_pool')"></span>
208 209
      </div>
    </div>
210
    <div class="control-group" ng-class="hasError('vlans')">
211
      <label class="control-label" for="vlans">NAT to (?)</label>
212 213 214 215 216 217 218
      <div class="controls">
        <div class="well well-small">
          <span class="label label-info" ng-repeat="vlan in entity.vlans | filter: destroyed">
            <a href="#/vlans/{{vlan.id}}">{{vlan.name}}</a>
            <a href ng-click="removeVlan(vlan)"><i class="icon-remove"></i></a>
          </span>
        </div>
219
        <div class="input-append has-tooltip" title="#TODO">
220
          <input class="span2 vlan" id="vlans" type="text" ng-model="newVlan">
221 222
          <button class="btn" type="button" ng-click="addVlan(newVlan)">Add</button>
        </div>
223
        <span class="help-inline" ng-bind="getError('vlans')"></span>
224 225
      </div>
    </div>
226 227
    <div class="control-group">
      <div class="controls">
228
        <button type="submit" class="btn" ng-click="save()">Save</button>
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259
      </div>
    </div>
  </div>
</form>
<div class="span12">
  <h3>Rules belonging to this vlan</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>