vlangroup-edit.html 4.22 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 17 18 19
      </div>
    </div>
    <div class="control-group">
      <label class="control-label" for="created_at">Created at</label>
      <div class="controls">
20 21 22 23 24 25 26 27
        <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>
28 29 30 31 32
      </div>
    </div>
    <div class="control-group">
      <label class="control-label" for="modified_at">Modified at</label>
      <div class="controls">
33 34 35 36 37 38 39 40
        <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>
41 42
      </div>
    </div>
43
    <div class="control-group" ng-class="hasError('name')">
44 45
      <label class="control-label" for="name">Name</label>
      <div class="controls">
46 47 48 49 50
        <input
          type="text"
          id="name"
          ng-model="entity.name"
          title="Name for this Vlangroup" />
51
        <span class="help-inline" ng-bind="getError('name')"></span>
52 53
      </div>
    </div>
54
    <div class="control-group" ng-class="hasError('owner')">
55 56
      <label class="control-label" for="owner">Owner</label>
      <div class="controls">
57 58 59 60 61 62 63
        <input
          type="text"
          class="owner"
          autocomplete="off"
          id="owner"
          ng-model="entity.owner.name"
          title="Owners name" />
64
        <span class="help-inline" ng-bind="getError('owner')"></span>
65 66 67 68
      </div>
    </div>
  </div>
  <div class="span5">
69
    <div class="control-group" ng-class="hasError('description')">
70 71
      <label class="control-label" for="description">Description</label>
      <div class="controls">
72 73 74 75
        <textarea id="description"
          rows="2"
          ng-model="entity.description"
          title="Short description">
76
        </textarea>
77
        <span class="help-inline" ng-bind="getError('description')"></span>
78 79
      </div>
    </div>
80 81
    <div class="control-group" ng-class="hasError('vlans')">
      <label class="control-label" for="vlans">Vlans</label>
82
      <div class="controls">
83
        <div class="well well-small">
84
          <span class="label label-info" ng-repeat="vlan in entity.vlans | filter: destroyed">
85
            <a href="#/vlans/{{vlan.id}}">{{vlan.name}}</a>
86
            <a href ng-click="removeVlan(vlan)"><i class="icon-remove"></i></a>
87 88
          </span>
        </div>
89 90 91 92 93 94
        <div class="input-append has-tooltip" title="Vlan members of this group">
          <input
            class="span2 vlan"
            id="vlans"
            type="text"
            ng-model="newVlan">
95
          <button class="btn" type="button" ng-click="addVlan(newVlan)">Add</button>
96
        </div>
97
        <span class="help-inline" ng-bind="getError('vlans')"></span>
98 99 100 101
      </div>
    </div>
    <div class="control-group">
      <div class="controls">
102
        <button type="submit" class="btn" ng-click="save()">Save</button>
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
      </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>