hostgroup-edit.html 2.95 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>
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" />
25
        <span class="help-inline" ng-bind="getError('name')"></span>
26 27 28 29
      </div>
    </div>
  </div>
  <div class="span5">
30
    <div class="control-group" ng-class="hasError('owner')">
31 32 33
      <label class="control-label" for="owner">Owner</label>
      <div class="controls">
        <input type="text" autocomplete="off" id="owner" ng-model="entity.owner.name" />
34
        <span class="help-inline" ng-bind="getError('owner')"></span>
35 36
      </div>
    </div>
37
    <div class="control-group" ng-class="hasError('description')">
38 39 40
      <label class="control-label" for="description">Description</label>
      <div class="controls">
        <textarea rows="4" id="description" ng-model="entity.description">
41
          <span class="help-inline" ng-bind="getError('description')"></span>
42 43 44 45 46
        </textarea>
      </div>
    </div>
    <div class="control-group">
      <div class="controls">
47
        <button type="submit" class="btn" ng-click="save()">Save</button>
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
      </div>
    </div>
  </div>
</form>
<div class="span12">
  <h3>Rules belonging to this hostgroup</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>
79 80 81 82 83 84 85 86
<div class="span12">
  <h3>Hosts belonging to this hostgroup</h3>
  <div class="well well-small">
    <span class="label label-info" ng-repeat="host in entity.hosts">
      <a href="#/hosts/{{host.id}}">{{host.name}}</a>
    </span>
  </div>
</div>