Add applink removal UI

This commit is contained in:
Johannes Zellner
2022-07-07 16:25:04 +02:00
parent 2cbb23a8d6
commit 0474208208
3 changed files with 70 additions and 1 deletions

View File

@@ -115,6 +115,38 @@ angular.module('Application').controller('AppsController', ['$scope', '$translat
}
};
$scope.applinksEdit = {
error: {},
busy: false,
id: '',
upstreamUri: '',
show: function (applink) {
$scope.applinksEdit.error = {};
$scope.applinksEdit.busy = false;
$scope.applinksEdit.id = applink.id;
$scope.applinksEdit.upstreamUri = applink.upstreamUri;
$('#applinksEditModal').modal('show');
return false; // prevent propagation and default
},
submit: function () {
$('#applinksEditModal').modal('hide');
},
remove: function () {
Client.removeApplink($scope.applinksEdit.id, function (error) {
if (error) return console.error('Failed to remove applink', error);
Client.refreshInstalledApps();
$('#applinksEditModal').modal('hide');
});
}
};
$scope.showAppConfigure = function (app, view) {
$location.path('/app/' + app.id + '/' + view);
};