Unverified Commit 6b4dd627 authored by zhu-mingye's avatar zhu-mingye Committed by GitHub

[Optimization] Optimization right silder layout (#2181)

* op op-right-layout * modify code
parent 2da857a7
......@@ -17,7 +17,7 @@
import {
LogoutOutlined,
TeamOutlined,
TeamOutlined, UserOutlined,
UserSwitchOutlined
} from '@ant-design/icons';
import { setAlpha } from '@ant-design/pro-components';
......@@ -57,7 +57,7 @@ const Name = () => {
};
});
return <span className={`${nameClassName} anticon`}>{currentUser?.user.username} ({currentUser?.currentTenant.tenantCode})</span>;
return <span className={`${nameClassName} anticon`}>{currentUser?.user.username}</span>;
};
const AvatarLogo = () => {
......@@ -193,9 +193,17 @@ const AvatarDropdown = () => {
const menuItems = [
{
key: 'currentTenant',
icon: <TeamOutlined />,
label: l('menu.account.tenant','', {tenantCode: currentUser?.currentTenant.tenantCode}),
},
{
type: 'divider' as const,
},
{
key: 'center',
icon: <TeamOutlined />,
icon: <UserOutlined />,
label: l('menu.account.center'),
onClick: () => history.push('/account/center'),
},
......
......@@ -427,3 +427,7 @@ h5 {
}
}
.ant-pro-form-list-item {
display: flex!important;
align-items: baseline!important;
}
\ No newline at end of file
......@@ -27,6 +27,7 @@ export default {
'menu.login': 'Login',
'menu.account.settings': 'Account Settings',
'menu.account.tenant': 'Tenant: {tenantCode}',
'menu.account.center': 'Account Center',
'menu.account.logout': 'Logout',
'menu.account.changePassword': 'Change Password',
......
......@@ -1009,4 +1009,16 @@ export default {
'pages.datastudio.footer.codeEncoding': "File Encoding: ",
'pages.datastudio.footer.codePosition': "Ln {Ln}:Col {Col} ",
'datastudio.middle.qg': 'Quick Guide',
'datastudio.middle.qg.clusterInstance': 'Register Session Cluster',
'datastudio.middle.qg.clusterConfiguration': 'Register Cluster Configuration',
'datastudio.middle.qg.database': 'Register DataSource',
'datastudio.middle.qg.alertInstance': 'Register Alert Instance',
'datastudio.middle.qg.alertGroup': 'Register Alert Group',
'datastudio.middle.qg.fragment': 'Global Variables',
'datastudio.middle.qg.document': 'Document',
'datastudio.middle.qg.gitprojects': 'Git Projects',
'datastudio.middle.qg.udf': 'UDF',
'datastudio.middle.qg.resource': 'Resource',
};
......@@ -27,6 +27,7 @@ export default {
'menu.login': '登录',
'menu.account.center': '个人中心',
'menu.account.tenant': '租户: {tenantCode}',
'menu.account.settings': '个人设置',
'menu.account.logout': '退出登录',
'menu.account.changePassword': '修改密码',
......
......@@ -1020,4 +1020,17 @@ export default {
'pages.datastudio.footer.lineSeparator': "行分隔符:",
'pages.datastudio.footer.codeEncoding': "文件编码:",
'pages.datastudio.footer.codePosition': "行{Ln}:列{Col} ",
'datastudio.middle.qg': '快捷引导',
'datastudio.middle.qg.clusterInstance': '注册 Session 集群',
'datastudio.middle.qg.clusterConfiguration': '注册集群配置',
'datastudio.middle.qg.database': '注册数据源',
'datastudio.middle.qg.alertInstance': '注册告警实例',
'datastudio.middle.qg.alertGroup': '注册告警组',
'datastudio.middle.qg.fragment': '全局变量',
'datastudio.middle.qg.document': '文档',
'datastudio.middle.qg.gitprojects': 'Git 项目',
'datastudio.middle.qg.udf': 'UDF',
'datastudio.middle.qg.resource': '资源',
};
const escape2Html = (str: string) => {
let arrEntities:Record<string, string> = {'lt': '<', 'gt': '>', 'nbsp': ' ', 'amp': '&', 'quot': '"'};
return str.replace(/&(lt|gt|nbsp|amp|quot);/ig, function (all, t) {
return arrEntities[t];
});
}
const getRangeText = (str: string) => {
str = escape2Html(str);
// @ts-ignore
const canvas = getRangeText.canvas || (getRangeText.canvas = document.createElement("canvas"));
const context = canvas.getContext("2d");
context.font = "10px sans-serif";
let result = '';
let count = 1;
for (let i = 0, len = str.length; i < len; i++) {
result += str[i];
let width = context.measureText(result).width;
if (width >= 110 * count) {
result += '\r\n';
count++;
}
}
return result;
};
export const buildGraphData = (data:any) => {
const edges = [];
for (const i in data.nodes) {
......@@ -28,27 +54,3 @@ export const buildGraphData = (data:any) => {
data.edges = edges;
return data;
};
const getRangeText = (str: string) => {
str = escape2Html(str);
// @ts-ignore
const canvas = getRangeText.canvas || (getRangeText.canvas = document.createElement("canvas"));
const context = canvas.getContext("2d");
context.font = "10px sans-serif";
let result = '';
let count = 1;
for (let i = 0, len = str.length; i < len; i++) {
result += str[i];
let width = context.measureText(result).width;
if (width >= 110 * count) {
result += '\r\n';
count++;
}
}
return result;
};
const escape2Html = (str: string) => {
let arrEntities:Record<string, string> = {'lt': '<', 'gt': '>', 'nbsp': ' ', 'amp': '&', 'quot': '"'};
return str.replace(/&(lt|gt|nbsp|amp|quot);/ig, function (all, t) {
return arrEntities[t];
});
}
......@@ -141,7 +141,8 @@ const HeaderContainer = (props: any) => {
title: l('button.save'),
click: () => {
const current = getCurrentData(panes, activeKey);
handlePutDataJson("/api/task", current)
current.configJson = JSON.stringify(current.config)
handlePutDataJson("/api/task", current).then(()=>saveTabs({...props.tabs}))
},
hotKey: (e: KeyboardEvent) => e.ctrlKey && e.key === 's',
hotKeyDesc: "Ctrl+S",
......
......@@ -3,7 +3,7 @@ import { StateType} from "../../model";
import {Spin, Tag} from "antd";
import React, {useEffect, useState} from "react";
import {
DatabaseOutlined, ReloadOutlined,
DatabaseOutlined,
TableOutlined
} from "@ant-design/icons";
import {clearMetaDataTable, showMetaDataTable} from "./service";
......@@ -12,7 +12,6 @@ import {Key, ProForm, ProFormSelect} from "@ant-design/pro-components";
import {TagAlignLeft} from "@/components/StyledComponents";
import SchemaTree from "@/pages/RegCenter/DataSource/components/DataSourceDetail/SchemaTree";
import {DataSources} from "@/types/RegCenter/data";
import ContentScroll from "@/components/Scroll/ContentScroll";
import {BtnRoute} from "@/pages/DataStudio/route";
const MetaData = (props: any) => {
......@@ -26,16 +25,16 @@ const MetaData = (props: any) => {
* @description: 刷新树数据
* @param {number} databaseId
*/
const onRefreshTreeData = (databaseId: number) => {
const onRefreshTreeData = async (databaseId: number) => {
if (!databaseId) {
setIsLoadingDatabase(false);
return;
}
setIsLoadingDatabase(true);
const res = showMetaDataTable(databaseId);
res.then((tables) => {
await showMetaDataTable(databaseId).then(res => {
setIsLoadingDatabase(false);
const {datas: tables} = res;
if (!tables) return;
for (let table of tables) {
table.title = table.name;
......
......@@ -19,7 +19,7 @@
import {l} from "@/utils/intl";
export const KEY_BOARD = [
export const KEY_BOARD_MIDDLE = [
{
key: 'ctrls',
label: 'Ctrl + S',
......@@ -45,6 +45,9 @@ export const KEY_BOARD = [
label: 'Esc',
description: l('shortcut.key.fullscreenClose'),
},
]
export const KEY_BOARD_RIGHT_SLIDER = [
{
key: 'f1',
label: 'F1',
......
......@@ -18,7 +18,7 @@
*/
import {Divider, Typography} from "antd";
import {KEY_BOARD} from "@/pages/DataStudio/MiddleContainer/KeyBoard/constant";
import {KEY_BOARD_MIDDLE} from "@/pages/DataStudio/MiddleContainer/KeyBoard/constant";
import {l} from "@/utils/intl";
import React from "react";
......@@ -29,9 +29,9 @@ const KeyBoard = () => {
const buildKeyBoard = () => {
return KEY_BOARD.map((item,index) => {
return KEY_BOARD_MIDDLE.map((item,index) => {
return <>
{index % 6 === 0 ? <>
{index % 5 === 0 ? <>
<Divider plain orientationMargin={0}/>
<Text keyboard>{item.label}</Text>{item.description}<Divider type="vertical"/>
</>: <>
......
......@@ -18,55 +18,57 @@
*/
import {l} from "@/utils/intl";
export const QUICK_GUIDE = [
{
key: 'clusterInstance',
label: '注册 Session 集群',
label: l('datastudio.middle.qg.clusterInstance'),
link: '/registration/cluster/instance'
},
{
key: 'clusterConfiguration',
label: '注册集群配置',
label: l('datastudio.middle.qg.clusterConfiguration'),
link: '/registration/cluster/configuration'
},
{
key: 'database',
label: '注册数据源',
label: l('datastudio.middle.qg.database'),
link: '/registration/database'
},
{
key: 'alertInstance',
label: '注册告警实例',
label: l('datastudio.middle.qg.alertInstance'),
link: '/registration/alert/instance'
},
{
key: 'alertGroup',
label: '注册告警组',
label: l('datastudio.middle.qg.alertGroup'),
link: '/registration/alert/group'
},
{
key: 'fragment',
label: '全局变量',
label: l('datastudio.middle.qg.fragment'),
link: '/registration/fragment'
},
{
key: 'document',
label: '文档',
label: l('datastudio.middle.qg.document'),
link: '/registration/document'
},
{
key: 'gitprojects',
label: 'Git 项目',
label: l('datastudio.middle.qg.gitprojects'),
link: '/registration/gitprojects'
},
{
key: 'udf',
label: 'UDF',
label: l('datastudio.middle.qg.udf'),
link: '/registration/udf'
},
{
key: 'resource',
label: '资源',
label: l('datastudio.middle.qg.resource'),
link: '/registration/resource'
}
];
\ No newline at end of file
......@@ -21,6 +21,7 @@ import {Divider, Typography} from "antd";
import React from "react";
import {QUICK_GUIDE} from "@/pages/DataStudio/MiddleContainer/QuickGuide/constant";
import { Link } from "@umijs/max";
import { l } from "@/utils/intl";
const {Title, Paragraph} = Typography;
......@@ -31,7 +32,7 @@ const QuickGuide = () => {
const buildQuickGuide = () => {
return QUICK_GUIDE.map((item,index) => {
return <>
{index % 10 === 0 ? <>
{index % 5 === 0 ? <>
<Divider plain orientationMargin={0}/>
<Link to={item.link} key={item.key}>{item.label}</Link>
</> : <>
......@@ -44,7 +45,7 @@ const QuickGuide = () => {
return <>
<Typography style={{padding: '2px', textAlign: 'center', border: 'salmon'}}>
<Title level={4}>快捷引导</Title>
<Title level={4}>{l('datastudio.middle.qg')}</Title>
<Paragraph style={{padding: 0, margin: 0, textAlign: 'center', border: 'salmon'}} >
{buildQuickGuide()}
</Paragraph>
......
......@@ -262,7 +262,7 @@ const MiddleContainer = (props: any) => {
if (tabItems?.length === 0) {
return <>
<KeyBoard/>
<Divider/>
<Divider/><br/><br/><br/>
<QuickGuide/>
</>
} else {
......
......@@ -17,7 +17,6 @@
*
*/
import {Form, InputNumber, Space, Switch} from "antd";
import {InfoCircleOutlined} from "@ant-design/icons";
import {l} from "@/utils/intl";
import {connect} from "umi";
......@@ -25,75 +24,81 @@ import {StateType} from "@/pages/DataStudio/model";
import {useForm} from "antd/es/form/Form";
import {getCurrentData} from "@/pages/DataStudio/function";
import {SWITCH_OPTIONS} from "@/services/constants";
import {ProForm, ProFormDigit, ProFormGroup, ProFormSwitch} from "@ant-design/pro-components";
const ExecuteConfig = (props: any) => {
const { dispatch, tabs:{panes, activeKey}} = props;
const [form] = useForm();
const current = getCurrentData(panes, activeKey);
const {dispatch, tabs: {panes, activeKey}} = props;
const [form] = useForm();
const current = getCurrentData(panes, activeKey);
form.setFieldsValue(current);
const onValuesChange = (change: any, all: any) => {
for (let i = 0; i < panes.length; i++) {
if (panes[i].key === activeKey) {
for (const key in change) {
panes[i].params.taskData[key] = all[key];
form.setFieldsValue(current);
const onValuesChange = (change: any, all: any) => {
for (let i = 0; i < panes.length; i++) {
if (panes[i].key === activeKey) {
for (const key in change) {
panes[i].params.taskData[key] = all[key];
}
break;
}
}
break;
}
}
dispatch({
type: "Studio/saveTabs",
payload: {...props.tabs},
});
};
dispatch({
type: "Studio/saveTabs",
payload: {...props.tabs},
});
};
return (
<>
<Form
initialValues={{
maxRowNum:"100"
}}
style={{padding: "10px"}}
form={form}
layout="vertical"
onValuesChange={onValuesChange}
>
<Space size={[50, 16]} wrap>
<Form.Item
label={l('pages.datastudio.label.execConfig.preview.result')} name="useResult" valuePropName="checked"
tooltip={{title: l('pages.datastudio.label.execConfig.preview.result.tip'), icon: <InfoCircleOutlined/>}}
>
<Switch defaultChecked {...SWITCH_OPTIONS()}/>
</Form.Item>
<Form.Item
label={l('pages.datastudio.label.execConfig.changelog')} name="useChangeLog" valuePropName="checked"
tooltip={{
title: l('pages.datastudio.label.execConfig.changelog.tip'),
icon: <InfoCircleOutlined/>
}}
>
<Switch {...SWITCH_OPTIONS()}/>
</Form.Item>
<Form.Item
label={l('pages.datastudio.label.execConfig.maxrow')} name="maxRowNum"
tooltip={l('pages.datastudio.label.execConfig.maxrow.tip')}
>
<InputNumber min={1} max={9999}/>
</Form.Item>
<Form.Item
label={l('pages.datastudio.label.execConfig.autostop')} name="useAutoCancel" valuePropName="checked"
tooltip={{title: l('pages.datastudio.label.execConfig.autostop.tip'), icon: <InfoCircleOutlined/>}}
>
<Switch {...SWITCH_OPTIONS()}/>
</Form.Item>
</Space>
</Form>
</>
);
return (
<>
<ProForm
initialValues={{
maxRowNum: 100,
}}
style={{padding: "10px"}}
form={form}
submitter={false}
layout="vertical"
onValuesChange={onValuesChange}
>
<ProFormGroup>
<ProFormSwitch
label={l('pages.datastudio.label.execConfig.preview.result')} name="useResult"
tooltip={{
title: l('pages.datastudio.label.execConfig.preview.result.tip'),
icon: <InfoCircleOutlined/>
}}
{...SWITCH_OPTIONS()}
/>
<ProFormSwitch
label={l('pages.datastudio.label.execConfig.changelog')} name="useChangeLog"
tooltip={{
title: l('pages.datastudio.label.execConfig.changelog.tip'),
icon: <InfoCircleOutlined/>
}}
{...SWITCH_OPTIONS()}
/>
</ProFormGroup>
<ProFormGroup>
<ProFormSwitch
label={l('pages.datastudio.label.execConfig.autostop')} name="useAutoCancel"
tooltip={{title: l('pages.datastudio.label.execConfig.autostop.tip'), icon: <InfoCircleOutlined/>}}
{...SWITCH_OPTIONS()}
/>
<ProFormDigit
width={'xs'}
label={l('pages.datastudio.label.execConfig.maxrow')} name="maxRowNum"
tooltip={l('pages.datastudio.label.execConfig.maxrow.tip')}
min={1} max={9999}
/>
</ProFormGroup>
</ProForm>
</>
);
};
export default connect(({Studio}: { Studio: StateType }) => ({
tabs: Studio.tabs,
tabs: Studio.tabs,
}))(ExecuteConfig);
......@@ -89,7 +89,6 @@ const HistoryVersion = (props: any) => {
</Tag>
</div>
<br/>
{/*<Scrollbars style={{height: "98%"}}>*/}
<React.StrictMode>
<DiffEditor height={"95%"} options={{
readOnly: true,
......@@ -99,12 +98,28 @@ const HistoryVersion = (props: any) => {
automaticLayout:true,
}} language={"sql"} theme={"vs-dark"} original={originalValue} modified={currentValue}/>
</React.StrictMode>
{/*</Scrollbars>*/}
</Modal>
</>
)
}
const onRollBackVersion = async (row: TaskHistoryTableListItem) => {
Modal.confirm({
title: l('pages.datastudio.label.version.rollback.flinksql'),
content: l('pages.datastudio.label.version.rollback.flinksqlConfirm','',{versionId: row.versionId }),
okText: l('button.confirm'),
cancelText: l('button.cancel'),
onOk: async () => {
const TaskHistoryRollbackItem = {
id: current.key, versionId: row.versionId
}
await handleOption('api/task/rollbackTask', l('pages.datastudio.label.version.rollback.flinksql'), TaskHistoryRollbackItem);
actionRef.current?.reloadAndRest?.();
}
});
};
const columns: ProColumns<TaskHistoryTableListItem>[] = [
{
title: l('pages.datastudio.label.version.id'),
......@@ -126,7 +141,7 @@ const HistoryVersion = (props: any) => {
valueType: 'option',
render: (text, record) => (
<>
<Button type="link" onClick={() => onRollBackVersion(record)}>{l('pages.datastudio.label.version.rollback')}</Button>
<Button type="link" onClick={async () => onRollBackVersion(record)}>{l('pages.datastudio.label.version.rollback')}</Button>
<Button type="link" title={l('pages.datastudio.label.version.diff.tip')} onClick={() => {
setVersionDiffRow(record)
setVersionDiffVisible(true)
......@@ -138,21 +153,6 @@ const HistoryVersion = (props: any) => {
];
const onRollBackVersion = (row: TaskHistoryTableListItem) => {
Modal.confirm({
title: l('pages.datastudio.label.version.rollback.flinksql'),
content: l('pages.datastudio.label.version.rollback.flinksqlConfirm','',{versionId: row.versionId }),
okText: l('button.confirm'),
cancelText: l('button.cancel'),
onOk: async () => {
const TaskHistoryRollbackItem = {
id: current.key, versionId: row.versionId
}
await handleOption('api/task/rollbackTask', l('pages.datastudio.label.version.rollback.flinksql'), TaskHistoryRollbackItem);
actionRef.current?.reloadAndRest?.();
}
});
};
return (
<>
......
/*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
import {TagAlignLeft} from "@/components/StyledComponents";
import {Badge, Tag} from "antd";
import {Alert, Cluster} from "@/types/RegCenter/data";
import {PaperClipOutlined} from "@ant-design/icons";
import {l} from "@/utils/intl";
import {DefaultOptionType} from "antd/es/select";
import {RUN_MODE} from "@/services/constants";
/**
* build job run model
* @returns {DefaultOptionType[]}
*/
export const buildRunModelOptions = () => {
let resultReturn: DefaultOptionType[] = [];
resultReturn.push(
{
label: 'Local',
value: RUN_MODE.LOCAL,
},
{
label: 'Standalone',
value: RUN_MODE.STANDALONE,
},
{
label: 'Yarn Session',
value: RUN_MODE.YARN_SESSION,
},
{
label: 'Yarn Per-Job',
value: RUN_MODE.YARN_PER_JOB,
},
{
label: 'Yarn Application',
value: RUN_MODE.YARN_APPLICATION,
},
{
label: 'Kubernetes Session',
value: RUN_MODE.KUBERNETES_SESSION,
},
{
label: 'Kubernetes Application',
value: RUN_MODE.KUBERNETES_APPLICATION,
},
{
label: 'Kubernetes Operator Application',
value: RUN_MODE.KUBERNETES_APPLICATION_OPERATOR,
}
);
return resultReturn;
}
/**
* build cluster options
* @param {Cluster.Instance[]} sessionCluster
* @returns {any[]}
*/
export const buildClusterOptions = (sessionCluster: Cluster.Instance[]) => {
const sessionClusterOptions: DefaultOptionType[] = [];
for (const item of sessionCluster) {
const tag = (
<TagAlignLeft>
<Tag color={item.enabled ? "processing" : "error"}>{item.type}</Tag>{item.name}
</TagAlignLeft>
);
sessionClusterOptions.push({
label: tag,
value: item.id,
key: item.id,
})
}
return sessionClusterOptions;
};
/**
* build cluster config options
* @param current
* @param {Cluster.Config[]} clusterConfiguration
* @returns {any[]}
*/
export const buildClusterConfigOptions = (current: any, clusterConfiguration: Cluster.Config[]) => {
const clusterConfigOptions: DefaultOptionType[] = [];
for (const item of clusterConfiguration) {
if (current.type.search(item.type.toLowerCase()) === -1) {
continue;
}
const tag = (
<TagAlignLeft>
<Tag color={item.enabled ? "processing" : "error"}>{item.type}</Tag>{item.name}
</TagAlignLeft>
);
clusterConfigOptions.push({
label: tag,
value: item.id,
key: item.id,
})
}
return clusterConfigOptions;
};
/**
* build env options
* @param {any[]} env
* @returns {JSX.Element[]}
*/
export const buildEnvOptions = (env: any[]) => {
const envList:DefaultOptionType[] = [
{
label: l('button.disable'),
value: 0,
key: 0,
}
];
for (const item of env) {
const tag = (
<>
<TagAlignLeft>
{item.enabled ? <Badge status="success"/> : <Badge status="error"/>}{item.fragment ?
<PaperClipOutlined/> : undefined}{item.name}
</TagAlignLeft>
</>
);
envList.push({
label: tag,
value: item.id,
key: item.id,
})
}
return envList;
};
/**
* build job alert groups
* @param {Alert.AlertGroup[]} alertGroups
* @returns {JSX.Element[]}
*/
export const buildAlertGroupOptions = (alertGroups: Alert.AlertGroup[]) => {
const alertGroupOptions:DefaultOptionType[] = [{
label: l('button.disable'),
value: 0,
}];
for (const item of alertGroups) {
alertGroupOptions.push({
label: item.name,
value: item.id,
key: item.id,
})
}
return alertGroupOptions;
};
\ No newline at end of file
import {Col, Descriptions, Form, Row } from "antd";
import TextArea from "antd/es/input/TextArea";
import {l} from "@/utils/intl";
import Paragraph from "antd/es/typography/Paragraph";
import {connect} from "umi";
import {DataStudioParams, StateType, TabsItemType, TabsPageType} from "@/pages/DataStudio/model";
import Editor from "@/pages/DataStudio/MiddleContainer/Editor";
import React from "react";
import {getCurrentData} from "@/pages/DataStudio/function";
import {useForm} from "antd/es/form/Form";
import {c} from "@umijs/utils/compiled/tar";
/*
*
......@@ -28,6 +17,17 @@ import {c} from "@umijs/utils/compiled/tar";
* limitations under the License.
*
*/
import {Col, Descriptions, Form, Row } from "antd";
import TextArea from "antd/es/input/TextArea";
import {l} from "@/utils/intl";
import Paragraph from "antd/es/typography/Paragraph";
import {connect} from "umi";
import { StateType } from "@/pages/DataStudio/model";
import React from "react";
import {getCurrentData} from "@/pages/DataStudio/function";
import {useForm} from "antd/es/form/Form";
const JobInfo = (props: any) => {
const { dispatch, tabs: {panes, activeKey}} = props;
const current = getCurrentData(panes, activeKey);
......
......@@ -19,6 +19,8 @@
import {MenuItemType} from "rc-menu/lib/interface";
import {l} from "@/utils/intl";
import {Select} from "antd";
import {DefaultOptionType} from "antd/es/select";
export const STUDIO_TAG_RIGHT_CONTEXT_MENU: MenuItemType[] = [
{
......@@ -30,3 +32,23 @@ export const STUDIO_TAG_RIGHT_CONTEXT_MENU: MenuItemType[] = [
label: l('right.menu.closeOther'),
}
]
export const SAVE_POINT_TYPE :DefaultOptionType[] = [
{
label: l('global.savepoint.strategy.disabled'),
value: 0,
},
{
label: l('global.savepoint.strategy.latest'),
value: 1,
},
{
label: l('global.savepoint.strategy.earliest'),
value: 2,
},
{
label: l('global.savepoint.strategy.custom'),
value: 3,
}
];
\ No newline at end of file
......@@ -24,7 +24,7 @@ import {getDataBase} from "@/pages/DataStudio/LeftContainer/MetaData/service";
import MiddleContainer from "@/pages/DataStudio/MiddleContainer";
import LeftContainer from "@/pages/DataStudio/LeftContainer";
import {LeftBottomMoreTabs, LeftBottomSide, LeftSide, RightSide} from "@/pages/DataStudio/route";
import {getCurrentData, getCurrentTab, mapDispatchToProps} from "@/pages/DataStudio/function";
import {getCurrentTab, mapDispatchToProps} from "@/pages/DataStudio/function";
import BottomContainer from "@/pages/DataStudio/BottomContainer";
import HeaderContainer from "@/pages/DataStudio/HeaderContainer";
import RightContainer from "@/pages/DataStudio/RightContainer";
......
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