@@ -1536,6 +1536,7 @@ module openflow {
15361536 public message : string = "Hi mom" ;
15371537 public noderedurl : string = "" ;
15381538 public instance : any = null ;
1539+ public instancestatus : string = "" ;
15391540 constructor (
15401541 public $scope : ng . IScope ,
15411542 public $location : ng . ILocationService ,
@@ -1556,14 +1557,22 @@ module openflow {
15561557 }
15571558 async GetNoderedInstance ( ) {
15581559 try {
1560+ this . instancestatus = "fetching status" ;
1561+
15591562 this . instance = await this . api . GetNoderedInstance ( ) ;
15601563 console . log ( "GetNoderedInstance:" ) ;
15611564 console . log ( this . instance ) ;
15621565 if ( this . instance !== null && this . instance !== undefined ) {
1563- this . messages += "GetNoderedInstance completed, status " + this . instance . status . phase + "\n" ;
1566+ if ( this . instance . metadata . deletionTimestamp !== undefined ) {
1567+ this . instancestatus = "pending deletion (" + this . instance . status . phase + ")" ;
1568+ } else {
1569+ this . instancestatus = this . instance . status . phase ;
1570+ }
15641571 } else {
1565- this . messages += "GetNoderedInstance completed, status unknown/non existent" + "\n" ;
1572+ this . instancestatus = "non existent" ;
1573+ // this.messages += "GetNoderedInstance completed, status unknown/non existent" + "\n";
15661574 }
1575+ this . messages += "GetNoderedInstance completed, status " + this . instancestatus + "\n" ;
15671576 } catch ( error ) {
15681577 this . messages += error + "\n" ;
15691578 console . error ( error ) ;
0 commit comments