Skip to content

Commit

Permalink
[Feature][web]Add project (#2164)
Browse files Browse the repository at this point in the history
* add project

* add project

* add project

* fix icon

* fix icon

* fix icon

* change switch
  • Loading branch information
zackyoungh authored Aug 4, 2023
1 parent 9cb0708 commit dc7f1bf
Show file tree
Hide file tree
Showing 46 changed files with 3,162 additions and 739 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/docker_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ jobs:
FLINK_BIG_VERSION: 1.17
steps:
- uses: actions/checkout@v3
- name: Move Dockerfile
run: |
cp ./docker/Dockerfile* ./
- uses: actions/checkout@v3
- name: set the flink_big_version
run: |
echo FLINK_BIG_VERSION=${FLINK_VERSION%.*} >> $GITHUB_ENV
Expand Down
11 changes: 5 additions & 6 deletions dinky-web/src/components/CallBackButton/CircleBtn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,21 @@

import React from "react";
import {Button} from "antd";
import {MinusOutlined, UserSwitchOutlined} from "@ant-design/icons";
import {l} from "@/utils/intl";

type CircleButtonProps = {
// key: string;
export type CircleButtonProps = {
icon: React.ReactNode;
loading?: boolean;
onClick?: () => void;
title?: string;
key?: string;
};

export const CircleBtn: React.FC<CircleButtonProps> = (props) => {
const {onClick,title,icon} = props;
const {onClick,title,icon,loading} = props;

return (
<Button title={title}
// key={key}
loading={loading}
icon={icon} block type={"text"}
shape={"circle"}
onClick={onClick}/>
Expand Down
1 change: 1 addition & 0 deletions dinky-web/src/components/CustomEditor/CodeEdit/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ const CodeEdit = (props: CodeEditFormProps) => {
autoDetectHighContrast: true,
lineNumbers,
}}
className={"editor-develop"}
onMount={editorDidMount}
onChange={onChange}
theme={theme ? theme : convertCodeEditTheme()}
Expand Down
35 changes: 35 additions & 0 deletions dinky-web/src/components/Icons/CodeLanguageIcon.tsx

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dinky-web/src/components/Icons/DBIcons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ export const PhoenixIcons = (props: any) => {
<Icon style={style} component={() => (
<svg className="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
width={size} height={size}>
<path
d="M896 1024H128C57.6 1024 0 966.4 0 896V128C0 57.6 57.6 0 128 0h768c70.4 0 128 57.6 128 128v768c0 70.4-57.6 128-128 128z"
fill="#CAD0D1"></path>
{/*<path*/}
{/* d="M896 1024H128C57.6 1024 0 966.4 0 896V128C0 57.6 57.6 0 128 0h768c70.4 0 128 57.6 128 128v768c0 70.4-57.6 128-128 128z"*/}
{/* fill="#CAD0D1"></path>*/}
<path
d="M726.4 216.533c39.467-129.066 55.467-141.866 55.467-141.866s-107.734 38.4-141.867 147.2C605.867 331.733 663.467 464 675.2 508.8c10.667 44.8 76.8 304-145.067 318.933C369.067 838.4 323.2 670.933 339.2 596.267c4.267-19.2 21.333-90.667 52.267-141.867C422.4 403.2 435.2 324.267 435.2 324.267s25.6 5.333 37.333-14.934c0 0-23.466 0-8.533-11.733 13.867-11.733 8.533-25.6 8.533-25.6s-25.6 17.067-52.266 3.2c-25.6-13.867-84.267-52.267-124.8 8.533 0 0-43.734 7.467-64 35.2 0 0 43.733-17.066 64-5.333 21.333 11.733 54.4 37.333 20.266 118.4C281.6 513.067 190.933 577.067 240 724.267c49.067 147.2 160 205.866 304 205.866S792.533 784 792.533 641.067c0-142.934-105.6-295.467-66.133-424.534zM487.467 541.867c-51.2-43.734-52.267-150.4-52.267-150.4-17.067 120.533-8.533 194.133 72.533 240C588.8 678.4 612.267 736 612.267 736c3.2-32-72.534-150.4-124.8-194.133z m145.066 179.2s32-109.867 0-208c-28.8-87.467-53.333-117.334-52.266-179.2 1.066-61.867 29.866-182.4 45.866-197.334 0 0-100.266 89.6-101.333 185.6-1.067 96 39.467 141.867 64 182.4 24.533 40.534 57.6 110.934 43.733 216.534zM522.667 214.4s-80 118.4-60.8 228.267C464 461.867 476.8 498.133 528 552.533c51.2 54.4 92.8 148.267 96 167.467 0 0-2.133-104.533-40.533-173.867C545.067 476.8 478.933 388.267 502.4 294.4c4.267-23.467 20.267-80 20.267-80z"
fill="#EC4C2E"></path>
Expand Down
3 changes: 1 addition & 2 deletions dinky-web/src/components/Sidebar/MovableSidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export type MovableSidebarProps = {
children?: React.ReactNode;
handlerMinimize?: () => void;
handlerMaxsize?: () => void;
btnGroup?: React.ReactNode[];
btnGroup?: React.ReactNode[];
onResize?: ResizeCallback;
style?: React.CSSProperties;
tagList?: TabPaneProps[];
Expand Down Expand Up @@ -76,7 +76,6 @@ const MovableSidebar: React.FC<MovableSidebarProps> = (props) => {
<>
<div style={{backgroundColor:token.colorBgBase,borderBlockColor:themeValue.borderColor}} className={"container-header"}>
<div>{title}</div>
{/*<div style={{display:showBtn?"block":"none",animation: (showBtn?"show-anim":"hide-anim")+" 2s"}}>*/}
<div className={showBtn?"show":"hide"}>
<Space size={5}>
{props.btnGroup}
Expand Down
32 changes: 32 additions & 0 deletions dinky-web/src/global.less
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,13 @@ ol {
}
}
}
.ant-tree-node-content-wrapper {
display: flex;

:hover {
color: #1eef07;
}
}
.gitCodeTree {
max-height: 70vh;
min-height: 70vh;
Expand Down Expand Up @@ -392,3 +398,29 @@ h5 {
scrollbar-color: #d4aa70 #e4e4e4;
scrollbar-width: thin;
}
.monaco-float{
height: 100%;
}

.data-studio-tabs{
.ant-tabs-nav{
.ant-tabs-nav-wrap{
.ant-tabs-tab{
padding: 4px 8px;
}
.ant-tabs-tab-active{
border-block-end: 3px solid #8db7fd;
box-sizing:content-box;
padding-block-end: 3px;
}
}
}

}

.data-studio-form{
.ant-form-item{
margin-bottom: 5px!important;
}
}

2 changes: 2 additions & 0 deletions dinky-web/src/locales/en-US/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ export default {
'button.heartbeat': 'Heartbeat',
'button.recycle': 'Recycle',
'button.refresh': 'Refresh',
'button.expand-all': 'Expand All',
'button.collapse-all': 'Collapse All',
'button.test': 'Test',
'button.clear': 'Clear',
'button.copy': 'Copy',
Expand Down
154 changes: 154 additions & 0 deletions dinky-web/src/locales/en-US/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -813,4 +813,158 @@ export default {
'pages.metadata.catalogRefresh': 'Refresh Catalog',
'pages.metadata.catalogRefreshSuccess': 'Refresh Catalog Success',
'pages.metadata.selectDatabase': 'Select Database',


// data-studio
'pages.datastudio.label.jobConfig': 'Job Config',
'pages.datastudio.label.jobConfig.cluster': 'Flink cluster',
'pages.datastudio.label.jobConfig.cluster.tip': 'Select Flink cluster',
'pages.datastudio.label.jobConfig.clusterConfig': 'Flink cluster Config',
'pages.datastudio.label.jobConfig.clusterConfig.tip1': 'Select Flink cluster Config for remote submission tasks in [{type}] mode',
'pages.datastudio.label.jobConfig.clusterConfig.tip2': 'Select Flink cluster Config',
'pages.datastudio.label.jobConfig.jar': 'Executable Jar',
'pages.datastudio.label.jobConfig.jar.tip1': 'Select executable Jar for remote submission of Jar tasks in [{type}] mode. When the parameter item has a value, only the executable Jar will be submitted.',
'pages.datastudio.label.jobConfig.jar.tip2': 'Select executable Jar, not required',
'pages.datastudio.label.jobConfig.execmode.tip': 'Specify the execution mode of the Flink task, the default is Local',
'pages.datastudio.label.jobConfig.execmode.k8s.tip': 'Specify the execution mode of the Flink task, the default is KUBERNETES_APPLICATION',
'pages.datastudio.label.jobConfig.flinksql.env': 'FlinkSQL environment',
'pages.datastudio.label.jobConfig.flinksql.env.tip1': 'Select the FlinkSQL execution environment of the current task, and the environment statement will be executed in advance. The default is none. ',
'pages.datastudio.label.jobConfig.flinksql.env.tip2': 'Select FlinkSQL environment, optional',
'pages.datastudio.label.jobConfig.parallelism': 'Parallelism',
'pages.datastudio.label.jobConfig.parallelism.tip': 'Set the parallelism of Flink tasks, the minimum is 1',
'pages.datastudio.label.jobConfig.insert': 'Insert StatementSet',
'pages.datastudio.label.jobConfig.insert.tip': '[Enhanced Features] Enable the statement set mechanism, multiple Insert statements will be combined into one JobGraph before submission, and the Select statement is invalid',
'pages.datastudio.label.jobConfig.fragment': 'Global variables',
'pages.datastudio.label.jobConfig.fragment.tip': '[Enhanced Features] Enable FlinkSql global variables, use ":=" to define (end with ";"), to call',
'pages.datastudio.label.jobConfig.batchmode': 'Batch Mode',
'pages.datastudio.label.jobConfig.batchmode.tip': 'Use batch mode',
'pages.datastudio.label.jobConfig.checkPoint': 'Checkpoint interval',
'pages.datastudio.label.jobConfig.checkPoint.tip': 'Set the checkpoint step size of the Flink task, 0 means not enabled',
'pages.datastudio.label.jobConfig.savePointStrategy': 'SavePointStrategy',
'pages.datastudio.label.jobConfig.savePointStrategy.tip': 'Specify the SavePoint strategy, the default is disabled',
'pages.datastudio.label.jobConfig.savePointpath': 'SavePointpath',
'pages.datastudio.label.jobConfig.savePointpath.tip1': 'Restore Flink task from SavePointPath',
'pages.datastudio.label.jobConfig.savePointpath.tip2': 'hdfs://...',
'pages.datastudio.label.jobConfig.alertGroup': 'Alarm Group',
'pages.datastudio.label.jobConfig.alertGroup.tip': 'Select alert group',
'pages.datastudio.label.jobConfig.other': 'Other Config',
'pages.datastudio.label.jobConfig.other.tip': 'Other Config items will be applied to the execution environment, such as pipeline.name',
'pages.datastudio.label.jobConfig.addConfig': 'Add Config item',
'pages.datastudio.label.jobConfig.addConfig.params': 'parameters',
'pages.datastudio.label.jobConfig.addConfig.value': 'value',

'pages.datastudio.label.jobInfo.id': 'Job ID',
'pages.datastudio.label.jobInfo.name': 'job name',
'pages.datastudio.label.jobInfo.dialect': 'Dialect',
'pages.datastudio.label.jobInfo.versionId': 'version number',

'pages.datastudio.label.execConfig': 'Execution Config',
'pages.datastudio.label.execConfig.selectDatabase': 'Select DataSource',
'pages.datastudio.label.execConfig.selectDatabase.tip': 'Select the data source for Sql statement execution',
'pages.datastudio.label.execConfig.preview.result': 'Preview Result',
'pages.datastudio.label.execConfig.preview.result.tip': 'Open the preview result, it will run synchronously and return the data result',
'pages.datastudio.label.execConfig.changelog': 'Print ChangeLog',
'pages.datastudio.label.execConfig.changelog.tip': 'Open the print stream, it will run synchronously and return the ChangeLog containing op information, it is not enabled by default and returns the final result Table',
'pages.datastudio.label.execConfig.maxrow': 'Maximum number of rows',
'pages.datastudio.label.execConfig.maxrow.tip': 'The maximum number of rows of preview data',
'pages.datastudio.label.execConfig.autostop': 'AutoStop',
'pages.datastudio.label.execConfig.autostop.tip': 'Enable autostop, it will automatically stop the task after capturing the maximum number of records',

'pages.datastudio.label.savepoint': 'Savepoint',
'pages.task.savePointPath' : 'SavePoint Path',

'pages.datastudio.label.version': 'Version History',
'pages.datastudio.label.version.id': 'Version ID',
'pages.datastudio.label.version.diff': 'Version Diff',
'pages.datastudio.label.version.rollback': 'Rollback',
'pages.datastudio.label.version.rollback.flinksql': 'Rollback Flink SQL Version',
'pages.datastudio.label.version.rollback.flinksqlConfirm': 'Are you sure to RollBack the Flink SQL version to [{versionId}]? ',
'pages.datastudio.label.version.diff.tip': 'Only compare with the content in the current editor',
'pages.datastudio.label.version.leftTitle': 'Version number: [{versionId}] Creation time: [{createTime}]',
'pages.datastudio.label.version.rightTitle': 'Version number: [current edited version] creation time: [{createTime}] last update time: [{updateTime}]',

'pages.datastudio.editor.execute.warn': 'The execution mode of this task is [{type}], which does not support SQL query, please save it manually and use the button on the right - job submission',
'pages.datastudio.editor.submiting': 'The new task [{jobName}] is executing',
'pages.datastudio.editor.exec.success': 'Execution succeeded',
'pages.datastudio.editor.exec.error': 'Task [jobName}] execution failed',
'pages.datastudio.editor.async.submit': 'Submit jobs asynchronously',
'pages.datastudio.editor.async.submiting': 'The task [{jobName}] is submitting asynchronously',
'pages.datastudio.editor.async.submitConfirm': 'Are you sure to asynchronously submit the job [{jobName}] to its configured cluster? Please make sure your work has been saved! ',
'pages.datastudio.editor.async.success': 'Asynchronous submission succeeded',
'pages.datastudio.editor.async.error': 'Asynchronous submission failed',
'pages.datastudio.editor.query.explan.error': 'Failed to get job execution plan, reason:\n{msg}',
'pages.datastudio.editor.query.ds.error': 'Failed to get dolphin data, reason:\n{msg}',
'pages.datastudio.editor.release.job': 'Release job',
'pages.datastudio.editor.release.jobConfirm': 'Are you sure to release the job [{jobName}]? Please make sure your work has been saved! ',
'pages.datastudio.editor.release.job.success': 'Release job [{jobName}] succeeded',
'pages.datastudio.editor.release.job.error': 'Publish job [{jobName}] failed',
'pages.datastudio.editor.edit.job': 'Maintenance job',
'pages.datastudio.editor.edit.jobConfirm': 'Confirm the maintenance job [{jobName}]? ',
'pages.datastudio.editor.edit.job.success': 'Maintenance job [{jobName}] succeeded',
'pages.datastudio.editor.online.job': 'Online job',
'pages.datastudio.editor.online.jobConfirm': 'Are you sure you want to go online with [{jobName}]? ',
'pages.datastudio.editor.online.job.success': 'Online job [{jobName}] succeeded',
'pages.datastudio.editor.online.job.error': 'Online job [{jobName}] failed, reason:\n {msg}',
'pages.datastudio.editor.stop.job': 'Stop job',
'pages.datastudio.editor.stop.jobConfirm': 'Are you sure to stop the job [{jobName}]? ',
'pages.datastudio.editor.stop.job.success': 'Stop job [{jobName}] successfully',
'pages.datastudio.editor.stop.job.error': 'Stop job [{jobName}] failed, reason:\n {msg}',
'pages.datastudio.editor.offline.job': 'Offline job',
'pages.datastudio.editor.offline.jobConfirm': 'Are you sure about offline job [{jobName}]? ',
'pages.datastudio.editor.offline.job.success': 'Offline job [{jobName}] succeeded',
'pages.datastudio.editor.offline.job.error': 'Offline job [{jobName}] failed, reason:\n {msg}',
'pages.datastudio.editor.delete.job': 'Delete job',
'pages.datastudio.editor.delete.jobConfirm': 'Are you sure to cancel the job [{jobName}]? ',
'pages.datastudio.editor.delete.job.success': 'Logout job [{jobName}] succeeded',
'pages.datastudio.editor.delete.job.error': 'Delete job [{jobName}] failed, reason:\n {msg}',
'pages.datastudio.editor.recovery.job': 'Recovery Job',
'pages.datastudio.editor.recovery.jobConfirm': 'Are you sure to restore job [{jobName}]? ',
'pages.datastudio.editor.recovery.job.success': 'The recovery job [{jobName}] succeeded',
'pages.datastudio.editor.api.doc': 'API Manual',
'pages.datastudio.editor.usehelp': 'Use help',
'pages.datastudio.editor.clearConsole': 'Clear Console',
'pages.datastudio.editor.fullScreen': 'FullScreen Development',
'pages.datastudio.editor.fullScreen.exit': 'Exit FullScreen',
'pages.datastudio.editor.save': 'Save the current FlinkSql and Config',
'pages.datastudio.editor.export': 'Export the current Sql and Config',
'pages.datastudio.editor.check': 'Check current FlinkSql',
'pages.datastudio.editor.explan': 'Get the current FlinkSql execution graph',
'pages.datastudio.editor.explan.tip': 'JobPlan for FlinkSQL',
'pages.datastudio.editor.exec': 'Execute',
'pages.datastudio.editor.exec.tip': 'Submit the current job to the cluster, please save it manually before submitting',
'pages.datastudio.editor.push.ds': 'Push to dolphin scheduler',
'pages.datastudio.editor.push.ds.query.error': 'Failed to get dolphin task definition set, reason:\n{msg}',
'pages.datastudio.editor.push.ds.timeout.strategy': 'Timeout strategy',
'pages.datastudio.editor.push.ds.timeout.alarm': 'Timeout warning',
'pages.datastudio.editor.push.ds.timeout.error': 'Timeout failed',
'pages.datastudio.editor.push.ds.timeout.strategy.tip': 'A timeout strategy must be selected',
'pages.datastudio.editor.push.ds.add.job.error': 'Failed to create job, reason:\n{msg}',
'pages.datastudio.editor.push.ds.prejob': 'Pre-job',
'pages.datastudio.editor.push.ds.prejob.tip': 'Select prejob task',
'pages.datastudio.editor.push.ds.job.priority': 'Priority',
'pages.datastudio.editor.push.ds.errortry.count': 'Number of failed retries',
'pages.datastudio.editor.push.ds.errortry.min': 'Failure retry interval (minutes)',
'pages.datastudio.editor.push.ds.delayed.time': 'Delayed execution time (minutes)',
'pages.datastudio.editor.push.ds.timeout.min': 'Timeout alarm duration (minutes)',
'pages.datastudio.editor.push.ds.running.tag': 'running flag',
'pages.datastudio.editor.stop': 'Stop',
'pages.datastudio.editor.release': 'Release, will not be able to modify after release',
'pages.datastudio.editor.edit': 'Maintenance, click to enter the editing state',
'pages.datastudio.editor.online': 'Online, automatic recovery, alarms, etc. will take effect after online',
'pages.datastudio.editor.offline': 'Offline, will enter the latest release status',
'pages.datastudio.editor.delete': 'Logout, will enter the recycle bin',
'pages.datastudio.editor.recovery': 'Recovery, will enter maintenance mode',
'pages.datastudio.editor.api': 'View API',
'pages.datastudio.editor.help': 'View usage help',
'pages.datastudio.sql.query': 'SQL query',
'pages.datastudio.submit.job': 'Submit job',

'pages.datastudio.explain.validate.msg': 'FlinkSql Syntax and logic check',
'pages.datastudio.explain.validate': 'Validating...',
'pages.datastudio.explain.validate.allright': 'All Right',
'pages.datastudio.explain.validate.error': 'There are errors, a total of {errorCount}',
'pages.datastudio.explain.validate.grammar.right': 'Grammar Right',
'pages.datastudio.explain.validate.grammar.error': 'Grammar Error',
'pages.datastudio.explain.validate.logic.right': 'Logical Right',
'pages.datastudio.explain.validate.logic.error': 'Logical Error',
};
8 changes: 5 additions & 3 deletions dinky-web/src/locales/zh-CN/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
*/

export default {
'global.max':'max',
'button.check':'检查',
'button.graph':'图',
'global.max': 'max',
'button.check': '检查',
'button.graph': '图',
'button.create': '新建',
'button.close': '关闭',
'button.confirm': '确定',
Expand Down Expand Up @@ -53,6 +53,8 @@ export default {
'button.heartbeat': '心跳',
'button.recycle': '回收',
'button.refresh': '刷新',
'button.expand-all': '全部展开',
'button.collapse-all': '全部折叠',
'button.test': '测试',
'button.clear': '清除',
'button.copy': '复制',
Expand Down
Loading

0 comments on commit dc7f1bf

Please sign in to comment.