@@ -2772,11 +2772,11 @@ export class NoderedCtrl {
27722772 }
27732773 }
27742774 this . loading = true ;
2775- this . messages + = 'Updating ' + this . user . name + "\n" ;
2775+ this . messages = 'Updating ' + this . user . name + "\n" + this . messages ;
27762776 if ( ! this . $scope . $$phase ) { this . $scope . $apply ( ) ; }
27772777 await NoderedUtil . UpdateOne ( "users" , null , this . user , 1 , false , null ) ;
27782778 this . loading = false ;
2779- this . messages + = 'update complete\n' ;
2779+ this . messages = 'update complete\n' + this . messages ;
27802780 this . EnsureNoderedInstance ( ) ;
27812781 } catch ( error ) {
27822782 this . errormessage = error ;
@@ -2803,13 +2803,24 @@ export class NoderedCtrl {
28032803 }
28042804 } else {
28052805 this . instancestatus = "non existent" ;
2806- // this.messages + = "GetNoderedInstance completed, status unknown/non existent" + "\n";
2806+ // this.messages = "GetNoderedInstance completed, status unknown/non existent" + "\n" + this.messages ;
28072807 }
2808+ let reload : boolean = false ;
2809+ this . instances . forEach ( instance => {
2810+ if ( this . instance . metadata . deletionTimestamp != null ) reload = true ;
2811+ if ( instance . status . phase == "deleting" || instance . status . phase == "Pending" ) reload = true ;
2812+ } ) ;
2813+
2814+ this . messages = "GetNoderedInstance completed, status " + this . instancestatus + "\n" + this . messages ;
28082815
2809- this . messages += "GetNoderedInstance completed, status " + this . instancestatus + "\n" ;
2816+ if ( reload ) {
2817+ setTimeout ( ( ) => {
2818+ this . GetNoderedInstance ( ) ;
2819+ } , 2000 ) ;
2820+ }
28102821 } catch ( error ) {
28112822 this . errormessage = error ;
2812- this . messages + = error + "\n" ;
2823+ this . messages = error + "\n" + this . messages ;
28132824 this . instancestatus = "" ;
28142825 console . error ( error ) ;
28152826 }
@@ -2823,11 +2834,11 @@ export class NoderedCtrl {
28232834 console . debug ( "GetNoderedInstanceLog:" ) ;
28242835 this . instancelog = await NoderedUtil . GetNoderedInstanceLog ( this . userid , instancename , null ) ;
28252836 this . instancelog = this . instancelog . split ( "\n" ) . reverse ( ) . join ( "\n" ) ;
2826- this . messages + = "GetNoderedInstanceLog completed\n" ;
2837+ this . messages = "GetNoderedInstanceLog completed\n" + this . messages ;
28272838 this . instancestatus = "" ;
28282839 } catch ( error ) {
28292840 this . errormessage = error ;
2830- this . messages + = error + "\n" ;
2841+ this . messages = error + "\n" + this . messages ;
28312842 this . instancestatus = "" ;
28322843 console . error ( error ) ;
28332844 }
@@ -2837,11 +2848,11 @@ export class NoderedCtrl {
28372848 try {
28382849 this . errormessage = "" ;
28392850 await NoderedUtil . EnsureNoderedInstance ( this . userid , false , null ) ;
2840- this . messages + = "EnsureNoderedInstance completed" + "\n" ;
2851+ this . messages = "EnsureNoderedInstance completed" + "\n" + this . messages ;
28412852 this . GetNoderedInstance ( ) ;
28422853 } catch ( error ) {
28432854 this . errormessage = error ;
2844- this . messages + = error + "\n" ;
2855+ this . messages = error + "\n" + this . messages ;
28452856 console . error ( error ) ;
28462857 }
28472858 if ( ! this . $scope . $$phase ) { this . $scope . $apply ( ) ; }
@@ -2850,11 +2861,11 @@ export class NoderedCtrl {
28502861 try {
28512862 this . errormessage = "" ;
28522863 await NoderedUtil . DeleteNoderedInstance ( this . userid , null ) ;
2853- this . messages + = "DeleteNoderedInstance completed" + "\n" ;
2864+ this . messages = "DeleteNoderedInstance completed" + "\n" + this . messages ;
28542865 this . GetNoderedInstance ( ) ;
28552866 } catch ( error ) {
28562867 this . errormessage = error ;
2857- this . messages + = error + "\n" ;
2868+ this . messages = error + "\n" + this . messages ;
28582869 console . error ( error ) ;
28592870 }
28602871 if ( ! this . $scope . $$phase ) { this . $scope . $apply ( ) ; }
@@ -2863,11 +2874,11 @@ export class NoderedCtrl {
28632874 try {
28642875 this . errormessage = "" ;
28652876 await NoderedUtil . DeleteNoderedPod ( this . userid , instancename , null ) ;
2866- this . messages + = "DeleteNoderedPod completed" + "\n" ;
2877+ this . messages = "DeleteNoderedPod completed" + "\n" + this . messages ;
28672878 this . GetNoderedInstance ( ) ;
28682879 } catch ( error ) {
28692880 this . errormessage = error ;
2870- this . messages + = error + "\n" ;
2881+ this . messages = error + "\n" + this . messages ;
28712882 console . error ( error ) ;
28722883 }
28732884 if ( ! this . $scope . $$phase ) { this . $scope . $apply ( ) ; }
@@ -2876,11 +2887,11 @@ export class NoderedCtrl {
28762887 try {
28772888 this . errormessage = "" ;
28782889 await NoderedUtil . RestartNoderedInstance ( this . userid , null ) ;
2879- this . messages + = "RestartNoderedInstance completed" + "\n" ;
2890+ this . messages = "RestartNoderedInstance completed" + "\n" + this . messages ;
28802891 this . GetNoderedInstance ( ) ;
28812892 } catch ( error ) {
28822893 this . errormessage = error ;
2883- this . messages + = error + "\n" ;
2894+ this . messages = error + "\n" + this . messages ;
28842895 console . error ( error ) ;
28852896 }
28862897 if ( ! this . $scope . $$phase ) { this . $scope . $apply ( ) ; }
@@ -2889,11 +2900,11 @@ export class NoderedCtrl {
28892900 try {
28902901 this . errormessage = "" ;
28912902 await NoderedUtil . StartNoderedInstance ( this . userid , null ) ;
2892- this . messages + = "StartNoderedInstance completed" + "\n" ;
2903+ this . messages = "StartNoderedInstance completed" + "\n" + this . messages ;
28932904 this . GetNoderedInstance ( ) ;
28942905 } catch ( error ) {
28952906 this . errormessage = error ;
2896- this . messages + = error + "\n" ;
2907+ this . messages = error + "\n" + this . messages ;
28972908 console . error ( error ) ;
28982909 }
28992910 if ( ! this . $scope . $$phase ) { this . $scope . $apply ( ) ; }
@@ -2902,11 +2913,11 @@ export class NoderedCtrl {
29022913 try {
29032914 this . errormessage = "" ;
29042915 await NoderedUtil . StopNoderedInstance ( this . userid , null ) ;
2905- this . messages + = "StopNoderedInstance completed" + "\n" ;
2916+ this . messages = "StopNoderedInstance completed" + "\n" + this . messages ;
29062917 this . GetNoderedInstance ( ) ;
29072918 } catch ( error ) {
29082919 this . errormessage = error ;
2909- this . messages + = error + "\n" ;
2920+ this . messages = error + "\n" + this . messages ;
29102921 console . error ( error ) ;
29112922 }
29122923 if ( ! this . $scope . $$phase ) { this . $scope . $apply ( ) ; }
0 commit comments