File tree Expand file tree Collapse file tree
src/main/resources/static/js Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,10 +39,22 @@ Shiny.instances = {
3939 clearInterval ( Shiny . instances . _refreshIntervalId ) ;
4040 } ,
4141 onDeleteInstance : function ( instanceName ) {
42+ // this function can be called with one of:
43+ // - no argument (i.e. undefined) -> the current instance
44+ // - `_` or `Default` -> both represent the default instance
45+ // - any other name of an instance
46+
4247 if ( instanceName === undefined ) {
4348 instanceName = Shiny . app . staticState . appInstanceName ;
4449 }
45- if ( confirm ( "Are you sure you want to delete instance \"" + instanceName + "\"?" ) ) {
50+
51+ // show `_` as `Default` in the confirmation message
52+ var displayName = instanceName ;
53+ if ( displayName === "_" ) {
54+ displayName = "Default" ;
55+ }
56+
57+ if ( confirm ( "Are you sure you want to delete instance \"" + displayName + "\"?" ) ) {
4658 Shiny . instances . _deleteInstance ( instanceName , function ( ) {
4759 if ( instanceName === "Default" ) {
4860 instanceName = "_" ;
You can’t perform that action at this time.
0 commit comments