app: add console section

This commit is contained in:
Girish Ramakrishnan
2019-12-16 13:30:51 -08:00
parent bcb6182be3
commit 580556cab6
2 changed files with 25 additions and 33 deletions

View File

@@ -321,7 +321,8 @@
<div ng-click="setView('email')" ng-class="{ 'active': view === 'email', 'disabled': app.error }" ng-show="app.manifest.addons.sendmail || app.manifest.addons.recvmail">Email</div>
<div ng-click="setView('updates')" ng-class="{ 'active': view === 'updates', 'disabled': app.error }">Updates</div>
<div ng-click="setView('backups')" ng-class="{ 'active': view === 'backups', 'disabled': app.error }">Backups</div>
<div ng-click="setView('debug')" ng-class="{ 'active': view === 'debug' }">Debug</div>
<div ng-click="setView('console')" ng-class="{ 'active': view === 'console' }">Console</div>
<div ng-click="setView('repair')" ng-class="{ 'active': view === 'repair' }">Repair</div>
<div ng-click="setView('uninstall')" ng-class="{ 'active': view === 'uninstall' }">Uninstall</div>
</div>
</div>
@@ -730,24 +731,11 @@
</div>
</div>
<div class="card" ng-show="view === 'debug'">
<div class="row" ng-hide="true">
<div class="col-md-12">
<label class="control-label">Status</label>
<div>
Version
<span class="app-info-meta text-small">{{ app.manifest.title }} {{ app.upstreamVersion }} (Package <a ng-href="/#/appstore/{{app.manifest.id}}?version={{app.manifest.version}}">v{{ app.manifest.version }}</a>) </span>
<br/>
App ID <span class="app-info-meta text-small">{{ app.id }}</a> </span>
<br/>
Installed <span class="app-info-meta text-small">{{ app.creationTime | prettyDate }}</a> </span>
</div>
</div>
</div>
<div class="card" ng-show="view === 'console'">
<div class="row">
<div class="col-md-12">
<label class="control-label">Console Access</label>
<p>This will open a console connection to the app. The terminal is sandboxed and only provides access to the app container's filesystem.</p>
<p>This will open a console connection to the app. The terminal is sandboxed and only provides access to this app container's filesystem.</p>
<a class="btn btn-primary pull-right" ng-href="{{ '/terminal.html?id=' + app.id }}" target="_blank">Terminal</a>
<a class="btn btn-primary pull-right" ng-href="{{ '/logs.html?appId=' + app.id }}" target="_blank">Logs</a>
</div>
@@ -756,13 +744,15 @@
<div class="row">
<div class="col-md-12">
<label class="control-label">Start / Stop</label>
<p>If the app is not responding, try restarting the app.</p>
<button class="btn btn-success pull-right" ng-class="{ 'btn-danger': app.runState === 'running' }" ng-click="debug.toggleRunState()" ng-disabled="app.taskId || app.error || debug.busyRunState"><i ng-show="debug.busyRunState" class="fa fa-circle-notch fa-spin"></i>
<p>Apps can be stopped to conserve server resources. They will continue to be backed up but won't be updated.</p>
<button class="btn btn-success pull-right" ng-class="{ 'btn-danger': app.runState === 'running' }" ng-click="console.toggleRunState()" ng-disabled="app.taskId || app.error || console.busyRunState"><i ng-show="console.busyRunState" class="fa fa-circle-notch fa-spin"></i>
{{ app.runState === 'running' ? 'Stop App' : 'Start App' }}
</button>
</div>
</div>
<hr/>
</div>
<div class="card" ng-show="view === 'repair'">
<div class="row">
<div class="col-md-12">
<label class="control-label">Repair</label>
@@ -773,9 +763,9 @@
<p ng-show="app.error">An error occurred during the <b>{{ app.error.installationState | taskName }}</b> operation: <span class="text-danger"><b>{{ app.error.reason + ': ' + app.error.message }}</b></span></p>
<!--<p ng-show="app.error" class="text-info"><b>{{ app.error | errorSuggestion }}</b></p>-->
<button class="btn btn-success pull-right" ng-click="repair.show()" ng-disabled="app.taskId">Repair</button>
<button class="btn btn-success pull-right" ng-click="repair.confirm()" ng-disabled="app.taskId">Repair</button>
<button class="btn btn-danger pull-right" ng-click="debug.stopAppTask(app.taskId)" ng-show="app.taskId">Cancel Current Task</button>
<button class="btn btn-danger pull-right" ng-click="repair.stopAppTask(app.taskId)" ng-show="app.taskId">Cancel Current Task</button>
</div>
</div>
</div>