Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 51d854e

Browse files
committed
webui: Allow live databases to be deleted from the profile page
1 parent 8927192 commit 51d854e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

webui/templates/profile.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,12 @@ <h4 style="vertical-align: middle;"><a class="blackLink" href="https://api.dbhub
262262
<div class="col-md-6">
263263
<table class="table table-striped table-responsive profileTable" data-cy="livedbstbl">
264264
<tr ng-repeat="row in livedbs">
265-
<td>
265+
<td style="border: 1px solid #ddd">
266266
<h4>{{ row.owner_name }}/{{ row.database_name }}</h4>
267267
</td>
268+
<td>
269+
<button type="button" class="btn btn-danger" ng-click="confirmDelete(row.database_name)" data-cy="delbtn">Delete database</button>
270+
</td>
268271
</tr>
269272
</table>
270273
</div>
@@ -287,6 +290,12 @@ <h4>{{ row.owner_name }}/{{ row.database_name }}</h4>
287290
$scope.stars = { Stars: [[ .Stars ]] };
288291
$scope.watching = [[ .Watching ]];
289292

293+
// Bounce to the database deletion page
294+
$scope.confirmDelete = function(path) {
295+
//console.log(path);
296+
window.location = '/confirmdelete/[[ .Meta.Owner ]]/' + path;
297+
};
298+
290299
// Returns a nicely presented "time elapsed" string
291300
$scope.getTimePeriodTxt = function(date1, includeOn) {
292301
return getTimePeriod(date1, includeOn)

0 commit comments

Comments
 (0)