Commit 34a9ea28 authored by kaychen's avatar kaychen Committed by tke-robot
Browse files

feat: installer fix bug

parent 1d237d5b
Showing with 31 additions and 30 deletions
+31 -30
......@@ -475,6 +475,7 @@ export class Wrapper extends React.Component<ConsoleWrapperProps, ConsoleWrapper
userType,
projects
});
let isInBlankPage = window.location.pathname.indexOf('tkestack/blank') !== -1;
if (userType === UserType.member && this.props.platformType === PlatformTypeEnum.Manager) {
location.href = location.origin + '/tkestack-project/application';
} else if (
......@@ -483,8 +484,14 @@ export class Wrapper extends React.Component<ConsoleWrapperProps, ConsoleWrapper
this.props.platformType === PlatformTypeEnum.Business
) {
location.href = location.origin + '/tkestack';
} else if (userType === UserType.other && window.location.pathname.indexOf('tkestack/blank') === -1) {
} else if (userType === UserType.other && !isInBlankPage) {
window.location.pathname = 'tkestack/blank';
} else if (isInBlankPage) {
if (userType === UserType.admin) {
location.href = location.origin + '/tkestack';
} else if (userType === UserType.member) {
location.href = location.origin + '/tkestack-project/application';
}
}
}
} catch (error) {}
......
......@@ -701,14 +701,8 @@ export const validateActions = {
if (editState.openAudit) {
result =
validateActions._validateESUrl(editState.auditEsUrl, 'es').status === 1 &&
validateActions._validateESUsername(
editState.auditEsUsername,
editState.auditEsUsername || editState.auditEsPassword ? 'es' : null
).status === 1 &&
validateActions._validateESPassword(
editState.auditEsPassword,
editState.auditEsUsername || editState.auditEsPassword ? 'es' : null
).status === 1;
validateActions._validateESUsername(editState.auditEsUsername, 'es').status === 1 &&
validateActions._validateESPassword(editState.auditEsPassword, 'es').status === 1;
}
return result;
......@@ -717,14 +711,8 @@ export const validateActions = {
validateStep6(editState: EditState) {
return dispatch => {
const v_auditEsUrl = validateActions._validateESUrl(editState.auditEsUrl, 'es'),
v_auditEsUsername = validateActions._validateESUsername(
editState.auditEsUsername,
editState.auditEsUsername || editState.auditEsPassword ? 'es' : null
),
v_auditEsPassword = validateActions._validateESPassword(
editState.auditEsPassword,
editState.auditEsUsername || editState.auditEsPassword ? 'es' : null
);
v_auditEsUsername = validateActions._validateESUsername(editState.auditEsUsername, 'es'),
v_auditEsPassword = validateActions._validateESPassword(editState.auditEsPassword, 'es');
dispatch(
installerActions.updateEdit({
......
......@@ -111,7 +111,9 @@ export class Step3 extends React.Component<RootProps> {
<>
平台会自动为集群安装
<ExternalLink
href={'https://github.com/tkestack/tke/blob/master/docs/guide/zh-CN/features/gpumanager.md'}
href={
'https://github.com/tkestack/docs/blob/master/docs/zh/%E4%BA%A7%E5%93%81%E7%89%B9%E8%89%B2%E5%8A%9F%E8%83%BD/GPUManager.md'
}
>
GPUManager
</ExternalLink>
......@@ -120,9 +122,7 @@ export class Step3 extends React.Component<RootProps> {
) : (
<>
平台会自动为集群安装
<ExternalLink href={'https://github.com/NVIDIA/k8s-device-plugin%EF%BC%89'}>
nvidia-k8s-plugin
</ExternalLink>
<ExternalLink href={'https://github.com/NVIDIA/k8s-device-plugin'}>nvidia-k8s-plugin</ExternalLink>
</>
)
}
......
import * as React from 'react';
import { Button, Form, Switch, Input, InputNumber } from '@tencent/tea-component';
import { Button, Form, Switch, Input, InputNumber, InputAdorment } from '@tencent/tea-component';
import { RootProps } from './InstallerApp';
import { getValidateStatus } from '../../common/utils';
......@@ -41,11 +41,14 @@ export class Step6 extends React.Component<RootProps> {
onChange={value => actions.installer.updateEdit({ auditEsUrl: value })}
/>
</Form.Item>
<Form.Item label="保留数据时间" required>
<InputNumber
value={editState.auditEsReserveDays}
onChange={value => actions.installer.updateEdit({ auditEsReserveDays: value })}
/>
<Form.Item label="保留数据时间" required align={'middle'}>
<InputAdorment after={''} appearence={'pure'}>
<InputNumber
min={1}
value={editState.auditEsReserveDays}
onChange={value => actions.installer.updateEdit({ auditEsReserveDays: value })}
/>
</InputAdorment>
</Form.Item>
<Form.Item
label="用户名"
......
......@@ -124,9 +124,12 @@ export class Step9 extends React.Component<RootProps> {
<Form.Item label="是否开启">
<Form.Text>{editState.openAudit ? '' : ''}</Form.Text>
</Form.Item>
<Form.Item label="ES地址">
<Form.Text>{editState.auditEsUrl}</Form.Text>
</Form.Item>
{editState.openAudit && (
<Form.Item label="ES地址">
<Form.Text>{editState.auditEsUrl}</Form.Text>
</Form.Item>
)}
{(editState.auditEsUsername || editState.auditEsPassword) && (
<>
<Form.Item label="用户名">
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment