summaryrefslogtreecommitdiffstats
path: root/app/server-control/controllers/virtual-media-controller.html
blob: e756986434616cc88ec4fc60f2f420dd189140a6 (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
<primary>
  <h1>Virtual media</h1>
  <p class="vm__page-description"  ng-if="devices.length >= 1">Specify image file location to start session.</p>
  <p ng-if="devices.length < 1">
    There are no Virtual Media devices available.
  </primary>
  <div ng-repeat="device in devices track by $index" class="vm__upload">
    <h2 class="h3">{{device.deviceName}}</h2>
    <div class="vm__upload-chooser">
      <!-- name and error message -->
      <div class="vm__upload-content">
        <div class="vm__upload-controls">
          <!-- Button -->
          <label class="vm__upload-choose-label">
            <input id="file-upload" type="file" file="device.file" class="hide" ng-disabled="device.isActive"/>
            <span class="vm__upload-choose-button btn btn-secondary" ng-class="{disabled:device.isActive}">Choose file</span>
          </label>
          <div class="vm__upload-name">
            <span ng-if="!device.file">No file selected</span>
            <span ng-if="device.file.name !== undefined">{{device.file.name}}</span>
            <span class="icon__exit" ng-if="device.file && !device.isActive" ng-click="resetFile($index);">
              <icon file="icon-close.svg"></icon>
            </span>
          </div>
        </div>
        <div class="vm__active-text vm__active-border" ng-if="device.isActive">
          <span>Active Session</span>
        </div>
        <div class="vm__active-text vm__error-border" ng-if="device.hasError">
          <span>Error in connecting to the selected file</span>
        </div>
      </div>
      <div class="vm__upload-start">
        <input type="button" ng-value="device.isActive ? 'Stop' : 'Start'" ng-class="{disabled:!device.file}" class="btn btn-primary" ng-click="device.isActive? stopVM($index) : startVM($index)"/>
      </div>
    </div>
  </div>
</div>
OpenPOWER on IntegriCloud