summaryrefslogtreecommitdiffstats
path: root/app/server-health/directives/remote-logging-server-modal.html
blob: eba57af4c1f15b76a6d7a9c0c48929402d917c59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<div role="dialog" class="uib-modal__content  remote-logging-server__modal">
  <button type="button" class="icon  icon__close  float-right" ng-click="$close()"></button>
  <div class="modal-header">
    <h2 class="modal-title" id="dialog_label">{{activeModalProps.title}}</h2>
  </div>
  <form name="form">
    <div ng-if="activeModal !== 2" class="modal-body">
      <label for="remoteServerIP">Hostname or IP Address</label>
      <input id="remoteServerIP" type="text" required name="hostname"
        ng-model="remoteServerForm.hostname" />
      <div ng-if="form.hostname.$invalid && form.hostname.$dirty"
        class="form__validation-message">
        <span ng-show="form.hostname.$error.required">Field is required</span>
      </div>
      <label for="remoteServerPort">Port</label>
      <p class="label__helper-text">Value must be between 0 – 65535</p>
      <input id="remoteServerPort" type="number" required name="port"
        min="0" max="65535" ng-model="remoteServerForm.port"/>
      <div ng-if="form.port.$invalid && form.port.$dirty"
        class="form__validation-message">
        <span ng-show="form.port.$error.required">Field is required</span>
        <span ng-show="form.port.$error.min || form.port.$error.max">
          Value must be between 0 – 65535
        </span>
      </div>
    </div>
    <div ng-if="activeModal === 2" class="modal-body">
      <p>Are you sure you want to remove remote logging server
      {{remoteServer.hostname}}?</p>
    </div>
    <div class="modal-footer">
      <button class="button btn-secondary" ng-click="$close()" type="button">
        Cancel
      </button>
      <button class="button btn-primary" type="submit"
        ng-click="$close(activeModal)" ng-disabled="form.$invalid"
        ng-class="{'disabled': form.$invalid}">
        {{activeModalProps.actionLabel}}
      </button>
    </div>
  </form>
</div>
OpenPOWER on IntegriCloud