File tree 1 file changed +18
-1
lines changed
1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,24 @@ function createRow(name, size) {
55
55
showConfirmDialog ( name ) . then ( function ( result ) {
56
56
if ( ! result )
57
57
return ;
58
- alert ( "Yeah, not implementing you yet." ) ;
58
+
59
+ // Kludge: the API wants short names, but gives back long
60
+ // names.
61
+ var locker = getCurrentLocker ( ) ;
62
+ if ( name . substring ( 0 , locker . length + 1 ) != locker + "+" )
63
+ throw new Error ( "Locker/DB name mismatch!" ) ;
64
+ var shortName = name . substring ( locker . length + 1 ) ;
65
+
66
+ clearAlerts ( "manage-alert" ) ;
67
+ showAlert ( "manage-alert" , "Dropping database..." , "Please wait." ) ;
68
+ sqlCommand ( [ "database" , "drop" , locker , shortName ] ) . finally ( function ( ) {
69
+ clearAlerts ( "manage-alert" ) ;
70
+ } ) . then ( function ( ) {
71
+ refreshInfo ( ) ;
72
+ } , function ( err ) {
73
+ // TODO(davidben): Distinguish UserError from others.
74
+ showAlert ( "manage-alert" , "Error" , err , "alert-error" ) ;
75
+ } ) ;
59
76
} ) . done ( ) ;
60
77
} ) ;
61
78
tr . append ( $ ( "<td>" ) . append ( button ) ) ;
You can’t perform that action at this time.
0 commit comments