dashboard: initial UI to attach devices to apps

This commit is contained in:
Johannes Zellner
2024-12-05 14:49:36 +01:00
parent 8493022f75
commit 25fb467c02
2 changed files with 43 additions and 0 deletions

View File

@@ -1154,6 +1154,25 @@
<button class="btn btn-outline btn-primary pull-right" ng-click="resources.submitCpuQuota()" ng-disabled="resources.cpuQuota === resources.currentCpuQuota || resourcesForm.$invalid || resources.busy || app.error || app.taskId" tooltip-enable="app.error || app.taskId" uib-tooltip="{{ app.error ? 'App is in error state' : 'App is busy' }}">{{ 'app.resources.cpu.setAction' | tr }}</button>
</div>
</div>
<hr/>
<div class="row">
<div class="col-md-12">
<form role="form" name="devicesForm" ng-submit="resources.submitDevices()" autocomplete="off">
<fieldset>
<div class="form-group">
<label class="control-label" for="devicesInput">Devices <sup><a ng-href="https://docs.cloudron.io/apps/#devices" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></sup></label>
<p>Comma serparated list of devices mounted into the app</p>
<input type="text" class="form-control" id="devicesInput" ng-model="resources.devices" placeholder="/dev/ttyUSB, /dev/hidraw0, ..." ng-disabled="resources.busy"/>
</div>
</fieldset>
</form>
</div>
</div>
<div class="row">
<div class="col-md-12 text-right">
<button class="btn btn-outline btn-primary pull-right" ng-click="resources.submitDevices()" ng-disabled="devicesForm.$invalid || resources.busy || app.error || app.taskId" tooltip-enable="app.error || app.taskId" uib-tooltip="{{ app.error ? 'App is in error state' : 'App is busy' }}">Set Devices</button>
</div>
</div>
</div>
<div class="card" ng-show="view === 'services'">