fix: pool's label editable
This commit is contained in:
@@ -23,38 +23,10 @@ const Container = styled.div`
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const Nav = styled.div`
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 20px;
|
|
||||||
color: var(--ant-color-text-tertiary);
|
|
||||||
.level-2 {
|
|
||||||
color: var(--ant-color-text);
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
||||||
const Content = styled.div`
|
const Content = styled.div`
|
||||||
width: 600px;
|
width: 600px;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const HeaderContainer = styled.div`
|
|
||||||
position: relative;
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr;
|
|
||||||
align-items: center;
|
|
||||||
padding-inline: var(--layout-content-header-inlinepadding);
|
|
||||||
.text {
|
|
||||||
margin-right: 16px;
|
|
||||||
padding-right: 16px;
|
|
||||||
border-right: 1px solid var(--ant-color-split);
|
|
||||||
font-weight: 600;
|
|
||||||
font-size: 20px;
|
|
||||||
margin-right: 32px;
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
||||||
const ClusterCreate = () => {
|
const ClusterCreate = () => {
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
const startStep = 0;
|
const startStep = 0;
|
||||||
@@ -110,11 +82,6 @@ const ClusterCreate = () => {
|
|||||||
}));
|
}));
|
||||||
}, [action, extraData.provider, stepList]);
|
}, [action, extraData.provider, stepList]);
|
||||||
|
|
||||||
const handleStepChange = (newStep: number) => {
|
|
||||||
setCurrentStep(newStep);
|
|
||||||
console.log('step========', newStep);
|
|
||||||
};
|
|
||||||
|
|
||||||
const getFormFieldsValue = () => {
|
const getFormFieldsValue = () => {
|
||||||
setFormValues((prev) => {
|
setFormValues((prev) => {
|
||||||
const newFormValues = _.cloneDeep(prev);
|
const newFormValues = _.cloneDeep(prev);
|
||||||
@@ -141,8 +108,6 @@ const ClusterCreate = () => {
|
|||||||
formKeys.map((key) => formRefs[key].current?.validateFields())
|
formKeys.map((key) => formRefs[key].current?.validateFields())
|
||||||
);
|
);
|
||||||
|
|
||||||
console.log('results========', results);
|
|
||||||
|
|
||||||
const resultsMap = new Map<string, any>();
|
const resultsMap = new Map<string, any>();
|
||||||
results.forEach((result, index) => {
|
results.forEach((result, index) => {
|
||||||
if (result.status === 'rejected') {
|
if (result.status === 'rejected') {
|
||||||
@@ -168,7 +133,6 @@ const ClusterCreate = () => {
|
|||||||
const onNext = async (callback?: (values: ClusterFormData) => void) => {
|
const onNext = async (callback?: (values: ClusterFormData) => void) => {
|
||||||
try {
|
try {
|
||||||
const result = await validateForms();
|
const result = await validateForms();
|
||||||
console.log('results========2', result);
|
|
||||||
if (result) {
|
if (result) {
|
||||||
await callback?.(result as ClusterFormData);
|
await callback?.(result as ClusterFormData);
|
||||||
const step = steps[currentStep];
|
const step = steps[currentStep];
|
||||||
@@ -306,11 +270,7 @@ const ClusterCreate = () => {
|
|||||||
title: <PageBreadcrumb items={breadcrumbItems} />
|
title: <PageBreadcrumb items={breadcrumbItems} />
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<ClusterSteps
|
<ClusterSteps steps={steps} currentStep={currentStep}></ClusterSteps>
|
||||||
steps={steps}
|
|
||||||
currentStep={currentStep}
|
|
||||||
onChange={handleStepChange}
|
|
||||||
></ClusterSteps>
|
|
||||||
{currentStep === startStep && (
|
{currentStep === startStep && (
|
||||||
<ProviderCatalog
|
<ProviderCatalog
|
||||||
dataList={providerList}
|
dataList={providerList}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ const Wrapper = styled.div`
|
|||||||
|
|
||||||
const ClusterSteps: React.FC<{
|
const ClusterSteps: React.FC<{
|
||||||
currentStep: number;
|
currentStep: number;
|
||||||
onChange: (step: number) => void;
|
onChange?: (step: number) => void;
|
||||||
steps: any[];
|
steps: any[];
|
||||||
}> = (props) => {
|
}> = (props) => {
|
||||||
const { steps, currentStep, onChange } = props;
|
const { steps, currentStep, onChange } = props;
|
||||||
@@ -27,7 +27,6 @@ const ClusterSteps: React.FC<{
|
|||||||
<Steps current={currentStep} size="small" onChange={onChange} progressDot>
|
<Steps current={currentStep} size="small" onChange={onChange} progressDot>
|
||||||
{steps.map((step) => (
|
{steps.map((step) => (
|
||||||
<Step
|
<Step
|
||||||
disabled={step.disabled}
|
|
||||||
key={step.title}
|
key={step.title}
|
||||||
title={step.title}
|
title={step.title}
|
||||||
description={step.content}
|
description={step.content}
|
||||||
|
|||||||
@@ -456,7 +456,6 @@ const PoolForm: React.FC<AddModalProps> = forwardRef((props, ref) => {
|
|||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<LabelSelector
|
<LabelSelector
|
||||||
disabled={action === PageAction.EDIT}
|
|
||||||
label={intl.formatMessage({ id: 'resources.table.labels' })}
|
label={intl.formatMessage({ id: 'resources.table.labels' })}
|
||||||
labels={labels || {}}
|
labels={labels || {}}
|
||||||
btnText={intl.formatMessage({ id: 'common.button.addLabel' })}
|
btnText={intl.formatMessage({ id: 'common.button.addLabel' })}
|
||||||
|
|||||||
Reference in New Issue
Block a user