Skip to content

Commit 2c6c5d0

Browse files
committed
11
1 parent 69301f1 commit 2c6c5d0

4 files changed

Lines changed: 16 additions & 5 deletions

File tree

OpenFlow/src/Messages/Message.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ export class Message {
566566
}
567567
await KubeUtil.instance().CoreV1Api.createNamespacedService(namespace, _service);
568568
}
569-
var ingress = await KubeUtil.instance().GetIngress(namespace, "ingress");
569+
var ingress = await KubeUtil.instance().GetIngress(namespace, "useringress");
570570
// console.log(ingress);
571571
var rule = null;
572572
for (var i = 0; i < ingress.spec.rules.length; i++) {
@@ -590,7 +590,7 @@ export class Message {
590590
delete ingress.metadata.creationTimestamp;
591591
delete ingress.status;
592592
ingress.spec.rules.push(rule);
593-
await KubeUtil.instance().ExtensionsV1beta1Api.replaceNamespacedIngress("ingress", namespace, ingress);
593+
await KubeUtil.instance().ExtensionsV1beta1Api.replaceNamespacedIngress("useringress", namespace, ingress);
594594
}
595595
} catch (error) {
596596
msg.error = JSON.stringify(error, null, 2);
@@ -625,7 +625,7 @@ export class Message {
625625
if (service != null) {
626626
await KubeUtil.instance().CoreV1Api.deleteNamespacedService(name, namespace);
627627
}
628-
var ingress = await KubeUtil.instance().GetIngress(namespace, "ingress");
628+
var ingress = await KubeUtil.instance().GetIngress(namespace, "useringress");
629629
var updated = false;
630630
for (var i = ingress.spec.rules.length - 1; i >= 0; i--) {
631631
if (ingress.spec.rules[i].host == hostname) {
@@ -635,7 +635,7 @@ export class Message {
635635
}
636636
if (updated) {
637637
delete ingress.metadata.creationTimestamp;
638-
await KubeUtil.instance().ExtensionsV1beta1Api.replaceNamespacedIngress("ingress", namespace, ingress);
638+
await KubeUtil.instance().ExtensionsV1beta1Api.replaceNamespacedIngress("useringress", namespace, ingress);
639639
}
640640
} catch (error) {
641641
msg.error = JSON.stringify(error, null, 2);

OpenFlow/src/public/Controllers.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -949,6 +949,16 @@ module openflow {
949949
}
950950
if (!this.$scope.$$phase) { this.$scope.$apply(); }
951951
}
952+
async RestartNoderedInstance() {
953+
try {
954+
await this.api.RestartNoderedInstance();
955+
this.messages += "RestartNoderedInstance completed" + "\n";
956+
} catch (error) {
957+
this.messages += error + "\n";
958+
console.error(error);
959+
}
960+
if (!this.$scope.$$phase) { this.$scope.$apply(); }
961+
}
952962
async StartNoderedInstance() {
953963
try {
954964
await this.api.StartNoderedInstance();

OpenFlow/src/public/Socket.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ <h1 translate lib="web">sockets</h1>
3232
<div class="form-group">
3333
<div class="col-sm-offset-2 col-sm-10">
3434
<button type="button" class="btn btn-secondary" ng-click="ctrl.EnsureNoderedInstance()">Ensure</button>
35+
<button type="button" class="btn btn-secondary" ng-click="ctrl.RestartNoderedInstance()">Restart</button>
3536
<button type="button" class="btn btn-secondary" ng-click="ctrl.DeleteNoderedInstance()">Delete</button>
3637
</div>
3738
</div>

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.185
1+
0.0.186

0 commit comments

Comments
 (0)