Skip to content
Snippets Groups Projects
Commit 71e04f66 authored by Allen Gilliland's avatar Allen Gilliland
Browse files

make the database delete button work on the connection details side panel. (fixes #730)

parent eb2b7ff2
Branches
Tags
No related merge requests found
......@@ -121,6 +121,16 @@ DatabasesControllers.controller('DatabaseEdit', ['$scope', '$routeParams', '$loc
return call.$promise;
};
$scope.delete = function() {
Metabase.db_delete({
'dbId': $scope.database.id
}, function(result) {
$location.path('/admin/databases/');
}, function(error) {
console.log('error deleting database', error);
});
};
// load our form input data
Metabase.db_form_input(function(form_input) {
$scope.form_input = form_input;
......
......@@ -24,7 +24,7 @@
<div class="Actions-group Actions--dangerZone">
<label class="Actions-groupLabel block">Danger Zone:</label>
<!-- TODO: this doesn't do anything because its unclear if its really safe to delete dbs -->
<button class="Button Button--danger">Remove this database</button>
<button class="Button Button--danger" ng-click="delete()" delete-confirm>Remove this database</button>
</div>
</div>
</div>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment