2020-07-30 22:41:35 +08:00
|
|
|
Tea.context(function () {
|
|
|
|
|
this.clusterId = 0;
|
|
|
|
|
if (this.node.cluster != null && this.node.cluster.id > 0) {
|
|
|
|
|
this.clusterId = this.node.cluster.id;
|
|
|
|
|
}
|
|
|
|
|
|
2020-09-06 16:19:34 +08:00
|
|
|
this.success = NotifySuccess("保存成功", "/clusters/cluster/node?clusterId=" + this.clusterId + "&nodeId=" + this.node.id);
|
2020-08-21 21:09:42 +08:00
|
|
|
|
|
|
|
|
// IP地址相关
|
|
|
|
|
this.ipAddresses = this.node.ipAddresses;
|
|
|
|
|
|
|
|
|
|
// 认证相关
|
|
|
|
|
this.grant = null;
|
|
|
|
|
|
2020-07-30 22:41:35 +08:00
|
|
|
this.sshHost = "";
|
|
|
|
|
this.sshPort = "";
|
|
|
|
|
this.loginId = 0;
|
|
|
|
|
if (this.node.login != null) {
|
|
|
|
|
this.loginId = this.node.login.id;
|
|
|
|
|
|
|
|
|
|
if (this.node.login.params != null) {
|
|
|
|
|
this.sshHost = this.node.login.params.host;
|
2020-09-06 16:19:34 +08:00
|
|
|
if (this.node.login.params.port > 0) {
|
|
|
|
|
this.sshPort = this.node.login.params.port;
|
|
|
|
|
}
|
2020-07-30 22:41:35 +08:00
|
|
|
}
|
|
|
|
|
|
2020-09-06 16:19:34 +08:00
|
|
|
if (this.node.login.grant != null && typeof this.node.login.grant.id != "undefined") {
|
2020-07-30 22:41:35 +08:00
|
|
|
this.grant = {
|
|
|
|
|
id: this.node.login.grant.id,
|
|
|
|
|
name: this.node.login.grant.name,
|
|
|
|
|
method: this.node.login.grant.method,
|
|
|
|
|
methodName: this.node.login.grant.methodName
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|