Don't show restore button for noop backend
This commit is contained in:
@@ -415,7 +415,7 @@
|
||||
<div class="grid-item-bottom-mobile" ng-show="user.admin">
|
||||
<div class="row">
|
||||
<div class="col-xs-4 text-left">
|
||||
<a href="" ng-click="showRestore(app)">
|
||||
<a href="" ng-click="showRestore(app)" ng-show="backupConfig.provider !== 'noop'">
|
||||
<i class="fa fa-undo scale"></i>
|
||||
</a>
|
||||
|
||||
@@ -438,7 +438,7 @@
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a href="" ng-click="showRestore(app)" title="Restore App"><i class="fa fa-undo scale"></i></a>
|
||||
<a href="" ng-click="showRestore(app)" ng-show="backupConfig.provider !== 'noop'" title="Restore App"><i class="fa fa-undo scale"></i></a>
|
||||
</div>
|
||||
|
||||
<div ng-show="(app.installationState === 'installed' || app.installationState === 'pending_configure') && !(app | installError)">
|
||||
|
||||
@@ -12,6 +12,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
|
||||
$scope.users = [];
|
||||
$scope.restartAppBusy = false;
|
||||
$scope.mailConfig = {};
|
||||
$scope.backupConfig = {};
|
||||
|
||||
$scope.appConfigure = {
|
||||
busy: false,
|
||||
@@ -611,6 +612,14 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
|
||||
});
|
||||
}
|
||||
|
||||
function getBackupConfig() {
|
||||
Client.getBackupConfig(function (error, backupConfig) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
$scope.backupConfig = backupConfig;
|
||||
});
|
||||
}
|
||||
|
||||
Client.onReady(function () {
|
||||
Client.refreshUserInfo(function (error) {
|
||||
if (error) return console.error(error);
|
||||
@@ -620,6 +629,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
|
||||
fetchGroups();
|
||||
fetchDnsConfig();
|
||||
getMailConfig();
|
||||
getBackupConfig();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user