Commit f56df483 authored by wenmo's avatar wenmo

k8s配置优化

parent c10ec655
...@@ -2,6 +2,7 @@ import React, {useEffect, useState} from 'react'; ...@@ -2,6 +2,7 @@ import React, {useEffect, useState} from 'react';
import {Form, Button, Input, Modal, Select, Switch} from 'antd'; import {Form, Button, Input, Modal, Select, Switch} from 'antd';
import {ClusterTableListItem} from "@/pages/Cluster/data"; import {ClusterTableListItem} from "@/pages/Cluster/data";
import {RUN_MODE} from "@/components/Studio/conf";
export type ClusterFormProps = { export type ClusterFormProps = {
onCancel: (flag?: boolean) => void; onCancel: (flag?: boolean) => void;
...@@ -62,11 +63,13 @@ const ClusterForm: React.FC<ClusterFormProps> = (props) => { ...@@ -62,11 +63,13 @@ const ClusterForm: React.FC<ClusterFormProps> = (props) => {
name="type" name="type"
label="类型" label="类型"
> >
<Select defaultValue="yarn-session" allowClear> <Select defaultValue={RUN_MODE.YARN_SESSION} allowClear>
<Option value="standalone">Standalone</Option> <Option value={RUN_MODE.STANDALONE}>Standalone</Option>
<Option value="yarn-session">Yarn Session</Option> <Option value={RUN_MODE.YARN_SESSION}>Yarn Session</Option>
<Option value="yarn-per-job">Yarn Per-Job</Option> <Option value={RUN_MODE.YARN_PER_JOB}>Yarn Per-Job</Option>
<Option value="yarn-application">Yarn Application</Option> <Option value={RUN_MODE.YARN_SESSION}>Yarn Application</Option>
<Option value={RUN_MODE.KUBERNETES_SESSION}>Kubernetes Session</Option>
<Option value={RUN_MODE.KUBERNETES_APPLICATION}>Kubernetes Application</Option>
</Select> </Select>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
......
...@@ -4,6 +4,7 @@ import {Form, Button, Input, Modal, Select} from 'antd'; ...@@ -4,6 +4,7 @@ import {Form, Button, Input, Modal, Select} from 'antd';
import Switch from "antd/es/switch"; import Switch from "antd/es/switch";
import TextArea from "antd/es/input/TextArea"; import TextArea from "antd/es/input/TextArea";
import {ClusterTableListItem} from "@/pages/Cluster/data"; import {ClusterTableListItem} from "@/pages/Cluster/data";
import {RUN_MODE} from "@/components/Studio/conf";
export type UpdateFormProps = { export type UpdateFormProps = {
onCancel: (flag?: boolean, formVals?: Partial<ClusterTableListItem>) => void; onCancel: (flag?: boolean, formVals?: Partial<ClusterTableListItem>) => void;
...@@ -63,11 +64,13 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => { ...@@ -63,11 +64,13 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
name="type" name="type"
label="类型" label="类型"
> >
<Select defaultValue="yarn-session" allowClear> <Select defaultValue={RUN_MODE.YARN_SESSION} allowClear>
<Option value="standalone">Standalone</Option> <Option value={RUN_MODE.STANDALONE}>Standalone</Option>
<Option value="yarn-session">Yarn Session</Option> <Option value={RUN_MODE.YARN_SESSION}>Yarn Session</Option>
<Option value="yarn-per-job">Yarn Per-Job</Option> <Option value={RUN_MODE.YARN_PER_JOB}>Yarn Per-Job</Option>
<Option value="yarn-application">Yarn Application</Option> <Option value={RUN_MODE.YARN_SESSION}>Yarn Application</Option>
<Option value={RUN_MODE.KUBERNETES_SESSION}>Kubernetes Session</Option>
<Option value={RUN_MODE.KUBERNETES_APPLICATION}>Kubernetes Application</Option>
</Select> </Select>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
......
...@@ -18,6 +18,7 @@ import { ...@@ -18,6 +18,7 @@ import {
updateEnabled,getData updateEnabled,getData
} from "@/components/Common/crud"; } from "@/components/Common/crud";
import {showCluster,showSessionCluster} from "@/components/Studio/StudioEvent/DDL"; import {showCluster,showSessionCluster} from "@/components/Studio/StudioEvent/DDL";
import {RUN_MODE} from "@/components/Studio/conf";
const TextArea = Input.TextArea; const TextArea = Input.TextArea;
const url = '/api/cluster'; const url = '/api/cluster';
...@@ -127,19 +128,27 @@ const ClusterTableList: React.FC<{}> = (props: any) => { ...@@ -127,19 +128,27 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
filters: [ filters: [
{ {
text: 'Yarn Session', text: 'Yarn Session',
value: 'yarn-session', value: RUN_MODE.YARN_SESSION,
}, },
{ {
text: 'Standalone', text: 'Standalone',
value: 'standalone', value: RUN_MODE.STANDALONE,
}, },
{ {
text: 'Yarn Per-Job', text: 'Yarn Per-Job',
value: 'yarn-per-job', value: RUN_MODE.YARN_PER_JOB,
}, },
{ {
text: 'Yarn Application', text: 'Yarn Application',
value: 'yarn-application', value: RUN_MODE.YARN_APPLICATION,
},
{
text: 'Kubernetes Session',
value: RUN_MODE.KUBERNETES_SESSION,
},
{
text: 'Kubernetes Application',
value: RUN_MODE.KUBERNETES_APPLICATION,
}, },
], ],
filterMultiple: false, filterMultiple: false,
...@@ -148,6 +157,8 @@ const ClusterTableList: React.FC<{}> = (props: any) => { ...@@ -148,6 +157,8 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
'standalone': {text: 'Standalone'}, 'standalone': {text: 'Standalone'},
'yarn-per-job': {text: 'Yarn Per-Job'}, 'yarn-per-job': {text: 'Yarn Per-Job'},
'yarn-application': {text: 'Yarn Application'}, 'yarn-application': {text: 'Yarn Application'},
'kubernetes-session': {text: 'Kubernetes Session'},
'kubernetes-application': {text: 'Kubernetes Application'},
}, },
}, },
{ {
......
...@@ -168,6 +168,7 @@ const ClusterConfigurationForm: React.FC<ClusterConfigurationFormProps> = (props ...@@ -168,6 +168,7 @@ const ClusterConfigurationForm: React.FC<ClusterConfigurationFormProps> = (props
</Form.Item> </Form.Item>
</>:undefined} </>:undefined}
<Divider>Flink 配置</Divider> <Divider>Flink 配置</Divider>
{formValsPara.type=='Yarn'?<>
<Form.Item <Form.Item
name="flinkLibPath" name="flinkLibPath"
label="lib 路径" label="lib 路径"
...@@ -176,6 +177,7 @@ const ClusterConfigurationForm: React.FC<ClusterConfigurationFormProps> = (props ...@@ -176,6 +177,7 @@ const ClusterConfigurationForm: React.FC<ClusterConfigurationFormProps> = (props
> >
<Input placeholder="值如 hdfs:///flink/lib"/> <Input placeholder="值如 hdfs:///flink/lib"/>
</Form.Item> </Form.Item>
</>:undefined}
<Form.Item <Form.Item
name="flinkConfigPath" name="flinkConfigPath"
label="配置文件路径" label="配置文件路径"
......
Markdown is supported
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