Commit f56df483 authored by wenmo's avatar wenmo

k8s配置优化

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