159 lines
10 KiB
HTML
159 lines
10 KiB
HTML
<!-- modal volume add -->
|
|
<div class="modal fade" id="volumeConfigureModal" tabindex="-1" role="dialog">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h4 class="modal-title" ng-show="volumeConfigure.adding">{{ 'volumes.addVolumeDialog.title' | tr }}</h4>
|
|
<h4 class="modal-title" ng-hide="volumeConfigure.adding">{{ 'volumes.updateVolumeDialog.title' | tr:{ volume: volumeConfigure.volume.name } }}</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<form name="volumeConfigureForm" role="form" novalidate ng-submit="volumeConfigure.submit()" autocomplete="off">
|
|
<fieldset>
|
|
<p class="has-error text-center" ng-show="volumeConfigure.error">{{ volumeConfigure.error }}</p>
|
|
|
|
<div class="form-group" ng-show="volumeConfigure.adding">
|
|
<label class="control-label">{{ 'volumes.name' | tr }}</label>
|
|
<p class="small text-info" ng-bind-html="'volumes.addVolumeDialog.nameWarning' | tr"></p>
|
|
<input type="text" class="form-control" ng-model="volumeConfigure.name" name="name" ng-disabled="volumeConfigure.busy" autofocus>
|
|
</div>
|
|
|
|
<div class="form-group" ng-hide="volumeConfigure.adding">
|
|
<label class="control-label">{{ 'volumes.mountStatus' | tr }}</label>
|
|
<p ng-class="volumeConfigure.volume.status.state === 'active' ? 'text-success' : 'text-danger'">{{ volumeConfigure.volume.status.message }} ({{ volumeConfigure.volume.status.state }})</p>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="control-label" for="mountType">{{ 'volumes.mountType' | tr }}</label>
|
|
<select class="form-control" id="mountType" ng-model="volumeConfigure.mountType" ng-options="a.value as a.name for a in mountTypes"></select>
|
|
<p class="small text-info" ng-show="volumeConfigure.mountType === 'noop'" ng-bind-html="'volumes.addVolumeDialog.noopWarning' | tr"></p>
|
|
<p class="small text-info" ng-hide="volumeConfigure.mountType === 'noop'" ng-bind-html="'volumes.addVolumeDialog.mountTypeInfo' | tr"></p>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="control-label">{{ 'volumes.hostPath' | tr }}</label>
|
|
<input type="text" class="form-control" ng-model="volumeConfigure.hostPath" name="hostPath" ng-show="volumeConfigure.adding" ng-disabled="volumeConfigure.busy" placeholder="/mnt/data" autofocus>
|
|
<p ng-hide="volumeConfigure.adding">{{ volumeConfigure.volume.hostPath }}</p>
|
|
</div>
|
|
|
|
<div uib-collapse="volumeConfigure.mountType === 'noop'">
|
|
<div class="form-group" ng-show="volumeConfigure.mountType === 'ext4'">
|
|
<label class="control-label" for="volumeConfigureHost">{{ 'volumes.addVolumeDialog.diskPath' | tr }}</label>
|
|
<input type="text" class="form-control" ng-model="volumeConfigure.diskPath" id="volumeConfigureDiskPath" name="diskPath" ng-disabled="volumeConfigure.busy" placeholder="/dev/disk/by-uuid/uuid">
|
|
</div>
|
|
|
|
<div class="form-group" ng-show="volumeConfigure.mountType === 'cifs' || volumeConfigure.mountType === 'nfs' || volumeConfigure.mountType === 'sshfs'">
|
|
<label class="control-label" for="volumeConfigureHost">{{ 'volumes.addVolumeDialog.server' | tr }}</label>
|
|
<input type="text" class="form-control" ng-model="volumeConfigure.host" id="volumeConfigureHost" name="host" ng-disabled="volumeConfigure.busy" placeholder="Server IP or hostname">
|
|
</div>
|
|
|
|
<div class="form-group" ng-show="volumeConfigure.mountType === 'cifs' || volumeConfigure.mountType === 'nfs' || volumeConfigure.mountType === 'sshfs'">
|
|
<label class="control-label" for="volumeConfigureRemoteDir">{{ 'volumes.addVolumeDialog.remoteDirectory' | tr }}</label>
|
|
<input type="text" class="form-control" ng-model="volumeConfigure.remoteDir" id="volumeConfigureRemoteDir" name="remoteDir" ng-disabled="volumeConfigure.busy" placeholder="/share">
|
|
</div>
|
|
|
|
<div class="form-group" ng-show="volumeConfigure.mountType === 'cifs'">
|
|
<label class="control-label" for="volumeConfigureUsername">{{ 'volumes.addVolumeDialog.username' | tr }}</label>
|
|
<input type="text" class="form-control" ng-model="volumeConfigure.username" id="volumeConfigureUsername" name="username" ng-disabled="volumeConfigure.busy">
|
|
</div>
|
|
|
|
<div class="form-group" ng-show="volumeConfigure.mountType === 'cifs'">
|
|
<label class="control-label" for="volumeConfigurePassword">{{ 'volumes.addVolumeDialog.password' | tr }}</label>
|
|
<input type="password" class="form-control" ng-model="volumeConfigure.password" id="volumeConfigurePassword" name="password" ng-disabled="volumeConfigure.busy">
|
|
</div>
|
|
|
|
<div class="form-group" ng-show="volumeConfigure.mountType === 'sshfs'">
|
|
<label class="control-label" for="volumeConfigurePort">{{ 'volumes.addVolumeDialog.port' | tr }}</label>
|
|
<input type="number" class="form-control" ng-model="volumeConfigure.port" id="volumeConfigurePort" name="port" ng-disabled="volumeConfigure.busy">
|
|
</div>
|
|
|
|
<div class="form-group" ng-show="volumeConfigure.mountType === 'sshfs'">
|
|
<label class="control-label" for="volumeConfigureUser">{{ 'volumes.addVolumeDialog.user' | tr }}</label>
|
|
<input type="text" class="form-control" ng-model="volumeConfigure.user" id="volumeConfigureUser" name="user" ng-disabled="volumeConfigure.busy">
|
|
</div>
|
|
|
|
<div class="form-group" ng-show="volumeConfigure.mountType === 'sshfs'">
|
|
<label class="control-label" for="volumeConfigurePrivateKey">{{ 'volumes.addVolumeDialog.privateKey' | tr }}</label>
|
|
<textarea class="form-control" ng-model="volumeConfigure.privateKey" id="volumeConfigurePrivateKey" name="privateKey" ng-disabled="volumeConfigure.busy"></textarea>
|
|
</div>
|
|
</div>
|
|
|
|
<input class="ng-hide" type="submit" ng-disabled="volumeConfigureForm.$invalid || volumeConfigure.busy"/>
|
|
</fieldset>
|
|
</form>
|
|
</div>
|
|
<div class="modal-footer ">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.cancel' | tr }}</button>
|
|
<button type="submit" class="btn btn-outline btn-success pull-right" ng-click="volumeConfigure.submit()" ng-disabled="volumeConfigureForm.$invalid || volumeConfigure.busy"><i class="fa fa-circle-notch fa-spin" ng-show="volumeConfigure.busy"></i> {{ 'main.dialog.save' | tr }}</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Modal volume remove -->
|
|
<div class="modal fade" id="volumeRemoveModal" tabindex="-1" role="dialog">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h4 class="modal-title">{{ 'volumes.removeVolumeDialog.title' | tr:{ volume:volumeRemove.volume.name } }}</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<p ng-bind-html="'volumes.removeVolumeDialog.description' | tr:{ volume:volumeRemove.volume.name }"></p>
|
|
<p class="has-error" ng-show="volumeRemove.error">{{ volumeRemove.error }}</p>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.cancel' | tr }}</button>
|
|
<button type="button" class="btn btn-danger" ng-click="volumeRemove.submit()" ng-disabled="volumeRemove.busy"><i class="fa fa-circle-notch fa-spin" ng-show="volumeRemove.busy"></i> {{ 'volumes.removeVolumeDialog.removeAction' | tr }}</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="content">
|
|
<div class="text-left">
|
|
<h1>{{ 'volumes.title' | tr }} <button class="btn btn-primary btn-outline pull-right" ng-click="volumeConfigure.show()"><i class="fa fa-plus"></i> {{ 'volumes.addVolumeAction' | tr }}</button></h1>
|
|
</div>
|
|
|
|
<div class="card card-large">
|
|
<p ng-bind-html="'volumes.description' | tr"></p>
|
|
<p class="text-warning text-bold" ng-bind-html="'volumes.backupWarning' | tr"></p>
|
|
|
|
<div class="row ng-hide" ng-show="!ready">
|
|
<div class="col-lg-12 text-center">
|
|
<h2><i class="fa fa-circle-notch fa-spin"></i></h2>
|
|
</div>
|
|
</div>
|
|
<div class="row animateMeOpacity ng-hide" ng-show="ready">
|
|
<div class="col-lg-12">
|
|
<table class="table table-hover" style="margin-top: 10px;">
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 5%"></th>
|
|
<th style="width: 30%" class="text-left">{{ 'volumes.name' | tr }}</th>
|
|
<th style="width: 60%" class="text-left">{{ 'volumes.hostPath' | tr }}</th>
|
|
<th style="width: 10%" class="text-right">{{ 'main.actions' | tr }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr ng-repeat="volume in volumes">
|
|
<td>
|
|
<i class="fa fa-circle" ng-style="{ color: volume.status.state === 'active' ? '#27CE65' : '#d9534f' }" ng-show="volume.status" uib-tooltip="{{ volume.status.message }}"></i>
|
|
<i class="fa fa-circle-notch fa-spin" ng-hide="volume.status"></i>
|
|
</td>
|
|
<td class="elide-table-cell hand" ng-click="volumeConfigure.show(volume)">
|
|
{{ volume.name }}
|
|
</td>
|
|
<td class="text-left elide-table-cell hidden-xs hidden-sm hand" ng-click="volumeConfigure.show(volume)">
|
|
{{ volume.hostPath }} ({{ volume.mountType }})
|
|
</td>
|
|
<td class="text-right no-wrap" style="vertical-align: bottom">
|
|
<button class="btn btn-xs btn-default" ng-click="volumeConfigure.show(volume)" title="{{ 'volumes.tooltipEdit' | tr }}"><i class="fa fa-pencil-alt"></i></button>
|
|
<a class="btn btn-xs btn-default" ng-href="{{ '/filemanager.html?volumeId=' + volume.id }}" target="_blank" uib-tooltip="{{ 'volumes.openFileManagerActionTooltip' | tr }}"><i class="fas fa-folder"></i></a>
|
|
<button class="btn btn-xs btn-danger" ng-click="volumeRemove.show(volume)" uib-tooltip="{{ 'volumes.removeVolumeActionTooltip' | tr }}"><i class="far fa-trash-alt"></i></button>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div> |