-
Notifications
You must be signed in to change notification settings - Fork 558
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f7bb4b6
commit cdb6d1a
Showing
24 changed files
with
1,124 additions
and
1,030 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,8 +49,11 @@ jobs: | |
- name: Build Web Console | ||
run: | | ||
set -e | ||
make console | ||
- name: Build command-line tool | ||
run: | | ||
make kk |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
console/build/static/media/kubekey-logo.953aed6d9c1c243565265d037e993403.svg
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,56 @@ | ||
import React, {useEffect} from 'react'; | ||
import {Link, useParams} from "react-router-dom"; | ||
import {Button, Column, Columns} from "@kube-design/components"; | ||
import AddNodeProgressBar from "./AddNodeProgressBar"; | ||
import AddNodeForm from "./AddNodeForm"; | ||
import useClusterTableContext from "../../hooks/useClusterTableContext"; | ||
import { Button, Column, Columns } from "@kube-design/components"; | ||
import React, { useEffect } from "react"; | ||
import { Link, useParams } from "react-router-dom"; | ||
import useAddNodeFormContext from "../../hooks/useAddNodeFormContext"; | ||
import useClusterTableContext from "../../hooks/useClusterTableContext"; | ||
import AddNodeForm from "./AddNodeForm"; | ||
import AddNodeProgressBar from "./AddNodeProgressBar"; | ||
|
||
const AddNode = () => { | ||
const {clusterName} = useParams() | ||
const {clusterData} = useClusterTableContext() | ||
const {setCurCluster,canToHome} = useAddNodeFormContext() | ||
useEffect(() => { | ||
if (clusterData.length > 0) { | ||
setCurCluster(clusterData.find(item=>item.metadata.name===clusterName)) | ||
} | ||
}, [clusterData]); | ||
return ( | ||
<> | ||
<Columns> | ||
<Column className="is-1"></Column> | ||
<Column className="is-2"> | ||
<h2>新增节点</h2> | ||
</Column> | ||
<Column className={'is-8'}> | ||
<Columns> | ||
<Column className={'is-10'}> | ||
</Column> | ||
<Column> | ||
{canToHome ? ( | ||
<Link to='/'> | ||
<Button disabled={!canToHome}>集群列表</Button> | ||
</Link> | ||
) : ( | ||
<Button disabled={!canToHome}>集群列表</Button> | ||
)} | ||
</Column> | ||
</Columns> | ||
</Column> | ||
</Columns> | ||
<Columns> | ||
<Column className={'is-1'}></Column> | ||
<Column className={'is-2'}> | ||
<AddNodeProgressBar></AddNodeProgressBar> | ||
</Column> | ||
<Column className={'is-8'}> | ||
<AddNodeForm/> | ||
</Column> | ||
</Columns> | ||
</> | ||
); | ||
const { clusterName } = useParams(); | ||
const { clusterData } = useClusterTableContext(); | ||
const { setCurCluster, canToHome } = useAddNodeFormContext(); | ||
useEffect(() => { | ||
if (clusterData.length > 0) { | ||
setCurCluster( | ||
clusterData.find((item) => item.metadata.name === clusterName) | ||
); | ||
} | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
}, [clusterData]); | ||
return ( | ||
<> | ||
<Columns> | ||
<Column className="is-1"></Column> | ||
<Column className="is-2"> | ||
<h2>新增节点</h2> | ||
</Column> | ||
<Column className={"is-8"}> | ||
<Columns> | ||
<Column className={"is-10"}></Column> | ||
<Column> | ||
{canToHome ? ( | ||
<Link to="/"> | ||
<Button disabled={!canToHome}>集群列表</Button> | ||
</Link> | ||
) : ( | ||
<Button disabled={!canToHome}>集群列表</Button> | ||
)} | ||
</Column> | ||
</Columns> | ||
</Column> | ||
</Columns> | ||
<Columns> | ||
<Column className={"is-1"}></Column> | ||
<Column className={"is-2"}> | ||
<AddNodeProgressBar></AddNodeProgressBar> | ||
</Column> | ||
<Column className={"is-8"}> | ||
<AddNodeForm /> | ||
</Column> | ||
</Columns> | ||
</> | ||
); | ||
}; | ||
|
||
export default AddNode; |
Oops, something went wrong.