Skip to content

Commit 4a01af7

Browse files
committed
232
1 parent 4c22f4a commit 4a01af7

3 files changed

Lines changed: 13 additions & 5 deletions

File tree

OpenFlow/src/public/Controllers.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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);

OpenFlow/src/public/Nodered.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ <h1 translate lib="web">sockets</h1>
2020
<div class="form-group">
2121
<label class="col-sm-3 control-label"><span translate lib="web">status</span>: </label>
2222
<div class="col-sm-9">
23-
<span ng-show="ctrl.instance==null">unknown/non existent</span>
24-
<span ng-show="ctrl.instance!=null">{{ ctrl.instance.status.phase }}</span>
23+
<span ng-show="ctrl.instance!=null">{{ ctrl.instancestatus }}</span>
2524
</div>
2625
</div>
2726
</section>

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.231
1+
0.0.232

0 commit comments

Comments
 (0)