Skip to content

Commit

Permalink
fix(console): add cluster version is empty case (tkestack#957)
Browse files Browse the repository at this point in the history
* fix(console): add cluster version is empty case

* fix(console): add comment
  • Loading branch information
jo-hnny committed Dec 1, 2020
1 parent a33d9cc commit 6a4002e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions web/console/src/webApi/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,20 @@ export const checkClusterIsNeedUpdate = async ({
clusterName: string;
clusterVersion: string;
}) => {
// 如果version不存在,说明集群在创建中
if (!clusterVersion) {
return {
master: {
isNeed: false,
message: '集群创建中!'
},

worker: {
isNeed: false,
message: '集群创建中!'
}
};
}
// check machin
const { items } = await Request.get<any, { items: Array<any> }>('/apis/platform.tkestack.io/v1/machines', {
params: {
Expand Down

0 comments on commit 6a4002e

Please sign in to comment.