Add a restart button in recovery section

This commit is contained in:
Girish Ramakrishnan
2019-12-20 11:18:48 -08:00
parent 3f3ec9ef9a
commit adc078a5cb
5 changed files with 47 additions and 38 deletions

View File

@@ -129,7 +129,7 @@
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-success" ng-click="repair.submit()" ng-disabled="repair.busy"><i class="fa fa-circle-notch fa-spin" ng-show="repair.busy"></i> Repair</button>
<button type="button" class="btn btn-success" ng-click="repair.submit()" ng-disabled="repair.retryBusy"><i class="fa fa-circle-notch fa-spin" ng-show="repair.retryBusy"></i> Repair</button>
</div>
</div>
</div>
@@ -731,7 +731,7 @@
<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 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="{{ '/terminal.html?id=' + app.id }}" ng-disabled="app.health !== 'healthy'" tooltip-enable="app.health !== 'healthy'" uib-tooltip="App is not running. If app is constantly restarting, Repair it first." target="_blank">Terminal</a>
<a class="btn btn-primary pull-right" ng-href="{{ '/logs.html?appId=' + app.id }}" target="_blank">Logs</a>
</div>
</div>
@@ -754,19 +754,25 @@
<div class="row">
<div class="col-md-12">
<label class="control-label">Crash Recovery</label>
<p>If the app is constantly restarting because of a broken plugin or misconfiguration, place the app in recovery mode.
<p>
If the app is not responding, try restarting the app. If the app is constantly restarting because of a broken plugin or misconfiguration,
place the app in recovery mode in order to access the console.
Use the following <a target="_blank" ng-href="{{ config.webServerOrigin }}/documentation/troubleshooting/#unresponsive-app">instructions</a>
to get the app running again.
</p>
<button class="btn btn-primary pull-right" ng-click="repair.pauseAppBegin()" ng-show="!app.debugMode" ng-disabled="repair.pauseBusy || app.error">Enable Recovery Mode</button>
<button class="btn btn-primary pull-right" ng-click="repair.pauseAppDone()" ng-show="app.debugMode" ng-disabled="repair.pauseBusy || app.error">Disable Recovery Mode</button>
<button class="btn btn-primary pull-right" ng-click="repair.restartApp()" ng-disabled="repair.restartBusy || app.error">
<i ng-show="repair.restartBusy" class="fa fa-circle-notch fa-spin"></i>
Restart App
</button>
</div>
</div>
<hr/>
<div class="row">
<div class="col-md-12">
<label class="control-label">Task Error</label>
<p>If a task (configuration, update, restore, backup) resulted in the app ending up in an error state, you can retry the operation.</p>
<p>If a configuration, update, restore or backup action resulted in an error, you can retry the task.</p>
<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>
<button class="btn btn-primary pull-right" ng-click="repair.confirm()" ng-disabled="app.taskId">Retry {{ app.error.installationState | taskName }}</button>