You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@paimon.apache.org by ni...@apache.org on 2024/01/26 05:26:34 UTC
(incubator-paimon-webui) branch main updated: [Improvement] Replace paimon-web-ui with paimon-web-ui-new (#163)
This is an automated email from the ASF dual-hosted git repository.
nicholasjiang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-paimon-webui.git
The following commit(s) were added to refs/heads/main by this push:
new d57608d [Improvement] Replace paimon-web-ui with paimon-web-ui-new (#163)
d57608d is described below
commit d57608d7418f229b68c2955a8041742ad0d00521
Author: xiaomo <we...@gmail.com>
AuthorDate: Fri Jan 26 13:26:30 2024 +0800
[Improvement] Replace paimon-web-ui with paimon-web-ui-new (#163)
---
paimon-web-ui-new/.eslintrc.cjs | 33 --
paimon-web-ui-new/index.html | 32 --
paimon-web-ui-new/package.json | 63 ----
paimon-web-ui-new/public/favicon_blue.svg | 16 -
paimon-web-ui-new/tsconfig.json | 11 -
paimon-web-ui-new/tsconfig.node.json | 16 -
paimon-web-ui-new/vite.config.ts | 82 -----
{paimon-web-ui-new => paimon-web-ui}/.eslintignore | 0
.../.eslintrc-auto-import.json | 0
paimon-web-ui/.eslintrc.cjs | 39 +-
.../.prettierrc.json | 0
{paimon-web-ui-new => paimon-web-ui}/README.md | 0
paimon-web-ui/apiWeb.json | 4 +
paimon-web-ui/auto-imports.d.ts | 94 +++++
.../components.d.ts | 0
{paimon-web-ui-new => paimon-web-ui}/env.d.ts | 0
paimon-web-ui/httpData/.gitignore | 6 +
paimon-web-ui/httpData/apiWeb.json | 4 +
paimon-web-ui/index.html | 8 +-
.../mock/mm.config.js | 0
.../mock/modules/index.js | 0
.../mock/modules/metadata.js | 0
paimon-web-ui/package.json | 98 ++---
.../pnpm-lock.yaml | 0
paimon-web-ui/pom.xml | 98 -----
.../postcss.config.js | 0
{paimon-web-ui-new => paimon-web-ui}/src/App.tsx | 0
paimon-web-ui/src/api/api.ts | 92 -----
paimon-web-ui/src/api/data.d.ts | 52 ---
paimon-web-ui/src/api/endpoints.ts | 37 --
paimon-web-ui/src/api/http.ts | 120 -------
.../src/api/index.ts | 0
.../src/api/message.ts | 0
.../src/api/models/catalog/index.ts | 0
.../src/api/models/catalog/types/catalog.ts | 0
.../src/api/models/catalog/types/database.ts | 0
.../src/api/models/catalog/types/datafile.ts | 0
.../src/api/models/catalog/types/index.ts | 0
.../src/api/models/catalog/types/manifest.ts | 0
.../src/api/models/catalog/types/schema.ts | 0
.../src/api/models/catalog/types/snapshot.ts | 0
.../src/api/models/catalog/types/table.ts | 0
.../src/api/models/cdc/index.ts | 0
.../src/api/models/cdc/interface.ts | 0
.../src/api/models/login/index.ts | 0
.../src/api/models/login/types/login_options.ts | 0
.../src/api/models/role/index.ts | 0
.../src/api/models/role/types/role.ts | 0
.../src/api/request.ts | 0
.../src/api/types.ts | 0
paimon-web-ui/src/app/App.less | 33 --
paimon-web-ui/src/app/App.tsx | 29 --
paimon-web-ui/src/assets/img/empty.png | Bin 3354 -> 0 bytes
.../src/assets/logo.svg | 0
paimon-web-ui/src/assets/logo/favicon.svg | 21 --
paimon-web-ui/src/assets/logo/favicon_blue.svg | 16 -
paimon-web-ui/src/assets/logo/favicon_white.svg | 16 -
.../src/assets/styles/main.scss | 0
.../src/components/Btn/ChangeI18nBtn/index.tsx | 74 ----
.../src/components/Btn/GithubLogoButton/index.tsx | 49 ---
.../src/components/Btn/ThemeSwitcherBtn/index.tsx | 51 ---
.../src/components/Dropdown/CatalogDropdown.tsx | 76 ----
paimon-web-ui/src/components/Editor/index.tsx | 56 ---
.../CatalogIconMoreDropdown/index.tsx | 40 ---
.../DatabaseIconMoreDropdown/index.tsx | 40 ---
.../TableIconMoreDropdown/index.tsx | 41 ---
paimon-web-ui/src/components/Search/index.tsx | 29 --
.../src/components/context-menu/index.module.scss | 0
.../src/components/context-menu/index.tsx | 0
.../src/components/dynamic-form/fields/checkbox.ts | 0
.../components/dynamic-form/fields/get-field.ts | 0
.../src/components/dynamic-form/fields/index.ts | 0
.../src/components/dynamic-form/fields/input.ts | 0
.../src/components/dynamic-form/fields/radio.ts | 0
.../src/components/dynamic-form/fields/select.ts | 0
.../src/components/dynamic-form/fields/switch.ts | 0
.../dynamic-form/get-elements-by-json.ts | 0
.../src/components/dynamic-form/index.tsx | 0
.../src/components/dynamic-form/types.ts | 0
.../src/components/dynamic-form/use-form.ts | 0
.../src/components/modal/index.tsx | 0
.../src/components/modal/use-task.ts | 0
.../src/components/monaco-editor/index.tsx | 0
.../src/components/monaco-editor/type.ts | 0
.../src/components/table-action/index.tsx | 0
.../src/composables/locales.ts | 0
.../src/config/index.ts | 0
paimon-web-ui/src/config/menu.tsx | 55 ---
.../src/form-lib/cdc/use-cdc-list.ts | 0
.../src/form-lib/cdc/use-mysql.ts | 0
.../src/form-lib/cdc/use-paimon.ts | 0
.../src/form-lib/index.ts | 0
.../src/form-lib/metadata/use-database.ts | 0
.../src/form-lib/metadata/use-options.ts | 0
paimon-web-ui/src/hooks/localStorage/index.tsx | 49 ---
paimon-web-ui/src/index.less | 22 --
.../layouts/content/components/menubar/index.tsx | 0
.../layouts/content/components/sidebar/index.tsx | 0
.../layouts/content/components/toolbar/index.tsx | 0
.../content/components/topbar/index.module.scss | 0
.../layouts/content/components/topbar/index.tsx | 0
.../src/layouts/content/index.module.scss | 0
.../src/layouts/content/index.tsx | 0
.../src/layouts/content/use-data.ts | 0
.../src/locales/en/index.ts | 0
.../src/locales/en/modules/cdc.ts | 0
.../src/locales/en/modules/common.ts | 0
.../src/locales/en/modules/job.ts | 0
.../src/locales/en/modules/layout.ts | 0
.../src/locales/en/modules/login.ts | 0
.../src/locales/en/modules/metadata.ts | 0
.../src/locales/en/modules/playground.ts | 0
.../src/locales/en/modules/system.ts | 0
paimon-web-ui/src/locales/en/translation.json | 54 ---
paimon-web-ui/src/locales/i18n.ts | 63 ----
.../src/locales/index.ts | 0
paimon-web-ui/src/locales/zh-CN/translation.json | 54 ---
.../src/locales/zh/index.ts | 0
.../src/locales/zh/modules/cdc.ts | 0
.../src/locales/zh/modules/common.ts | 0
.../src/locales/zh/modules/job.ts | 0
.../src/locales/zh/modules/layout.ts | 0
.../src/locales/zh/modules/login.ts | 0
.../src/locales/zh/modules/metadata.ts | 0
.../src/locales/zh/modules/playground.ts | 0
.../src/locales/zh/modules/system.ts | 0
{paimon-web-ui-new => paimon-web-ui}/src/main.ts | 0
paimon-web-ui/src/main.tsx | 29 --
paimon-web-ui/src/pages/Abnormal/Dev/index.tsx | 30 --
.../src/pages/Layout/Header/header.module.less | 28 --
paimon-web-ui/src/pages/Layout/Header/index.tsx | 125 -------
paimon-web-ui/src/pages/Layout/index.tsx | 38 --
paimon-web-ui/src/pages/Layout/layout.module.less | 20 --
.../CatalogModalForm/CatalogForm/index.tsx | 111 ------
.../components/CatalogModalForm/index.tsx | 61 ----
.../CatalogTree/catalog-tree.module.less | 82 -----
.../LeftContent/components/CatalogTree/index.tsx | 396 ---------------------
.../DatabaseModalForm/DatabaseForm/index.tsx | 74 ----
.../components/DatabaseModalForm/index.tsx | 60 ----
.../components/TableModalForm/TableForm/index.tsx | 244 -------------
.../components/TableModalForm/index.tsx | 67 ----
.../Metadata/components/LeftContent/index.tsx | 100 ------
.../LeftContent/left-content.module.less | 39 --
.../components/MainContent/Table/index.tsx | 53 ---
.../Metadata/components/RightContent/index.tsx | 52 ---
.../RightContent/right-content.module.less | 35 --
paimon-web-ui/src/pages/Metadata/index.tsx | 34 --
.../src/pages/Metadata/metadata.module.less | 26 --
paimon-web-ui/src/pages/Other/Login/index.tsx | 146 --------
.../RightContent/components/BottomPanel/index.tsx | 26 --
.../RightContent/components/TopPanel/Tab/index.tsx | 51 ---
.../RightContent/components/TopPanel/index.tsx | 30 --
.../Playground/components/RightContent/index.tsx | 33 --
.../RightContent/right-content.module.less | 22 --
.../TabMenuSidebar/components/SiderTab/index.tsx | 149 --------
.../components/SiderTab/siderbar.module.less | 26 --
.../components/TreeComponent/index.tsx | 179 ----------
.../TreeComponent/tree-component.module.less | 28 --
.../Playground/components/TabMenuSidebar/index.tsx | 29 --
.../TabMenuSidebar/tab-menu-sidebar.module.less | 24 --
paimon-web-ui/src/pages/Playground/index.tsx | 31 --
.../src/pages/Playground/playground.module.less | 27 --
.../src/router/index.ts | 0
paimon-web-ui/src/router/index.tsx | 68 ----
.../src/router/modules/cdc_ingestion.ts | 0
.../src/router/modules/job.ts | 0
.../src/router/modules/metadata.ts | 0
.../src/router/modules/playground.ts | 0
.../src/router/modules/system.ts | 0
.../src/router/routes.ts | 0
.../src/store/catalog/index.ts | 0
paimon-web-ui/src/store/catalogStore.ts | 94 -----
.../src/store/cdc/index.ts | 0
.../src/store/config/index.ts | 0
.../src/store/config/type.ts | 0
paimon-web-ui/src/store/databaseStore.ts | 66 ----
paimon-web-ui/src/store/tableStore.ts | 83 -----
.../src/themes/index.ts | 0
.../src/themes/modules/dark.ts | 0
.../src/themes/modules/light.ts | 0
paimon-web-ui/src/types/Catalog/data.d.ts | 30 --
paimon-web-ui/src/types/Database/data.d.ts | 22 --
paimon-web-ui/src/types/Public/data.d.ts | 45 ---
paimon-web-ui/src/types/Table/data.d.ts | 34 --
paimon-web-ui/src/types/User/data.d.ts | 104 ------
paimon-web-ui/src/utils/mode.ts | 50 ---
.../src/views/cdc/components/dag/context-menu.tsx | 0
.../src/views/cdc/components/dag/custom-node.tsx | 0
.../src/views/cdc/components/dag/dag-canvas.tsx | 0
.../src/views/cdc/components/dag/dag-slider.tsx | 0
.../src/views/cdc/components/dag/drawer.tsx | 0
.../src/views/cdc/components/dag/index.module.scss | 0
.../src/views/cdc/components/dag/index.tsx | 0
.../src/views/cdc/components/dag/node-config.ts | 0
.../views/cdc/components/dag/use-canvas-init.ts | 0
.../views/cdc/components/list/index.module.scss | 0
.../src/views/cdc/components/list/index.tsx | 0
.../src/views/cdc/components/list/use-table.ts | 0
.../src/views/cdc/index.module.scss | 0
.../src/views/cdc/index.tsx | 0
.../components/statistic-card/index.module.scss | 0
.../views/job/components/statistic-card/index.tsx | 0
.../src/views/job/components/status-tag/index.tsx | 0
.../src/views/job/constant.tsx | 0
.../src/views/job/index.module.scss | 0
.../src/views/job/index.tsx | 0
.../src/views/login/index.module.scss | 0
.../src/views/login/index.tsx | 0
.../src/views/login/use-form.ts | 0
.../views/metadata/components/breadcrumb/index.tsx | 0
.../metadata/components/catalog-form/index.tsx | 0
.../metadata/components/columns-form/index.tsx | 0
.../metadata/components/database-form/index.tsx | 0
.../views/metadata/components/datafile/index.tsx | 0
.../views/metadata/components/manifest/index.tsx | 0
.../components/menu-tree/index.module.scss | 0
.../views/metadata/components/menu-tree/index.tsx | 0
.../components/metadata-tabs/index.module.scss | 0
.../metadata/components/metadata-tabs/index.tsx | 0
.../components/options-form-content/index.tsx | 0
.../metadata/components/options-form/edit.tsx | 0
.../metadata/components/options-form/index.tsx | 0
.../views/metadata/components/options/index.tsx | 0
.../views/metadata/components/schema/columns.ts | 0
.../metadata/components/schema/index.module.scss | 0
.../src/views/metadata/components/schema/index.tsx | 0
.../views/metadata/components/snapshot/index.tsx | 0
.../components/table-column-content/constant.ts | 0
.../components/table-column-content/index.tsx | 0
.../components/table-form/index.module.scss | 0
.../views/metadata/components/table-form/index.tsx | 0
.../src/views/metadata/components/table/index.tsx | 0
.../src/views/metadata/constant.ts | 0
.../src/views/metadata/index.module.scss | 0
.../src/views/metadata/index.tsx | 0
.../query/components/console/index.module.scss | 0
.../components/query/components/console/index.tsx | 0
.../query/components/debugger/index.module.scss | 0
.../components/query/components/debugger/index.tsx | 0
.../query/components/menu-tree/index.module.scss | 0
.../query/components/menu-tree/index.tsx | 0
.../query/components/tabs/index.module.scss | 0
.../components/query/components/tabs/index.tsx | 0
.../playground/components/query/index.module.scss | 0
.../views/playground/components/query/index.tsx | 0
.../playground/components/slider/index.module.scss | 0
.../views/playground/components/slider/index.tsx | 0
.../workbench/components/console/index.module.scss | 0
.../workbench/components/console/index.tsx | 0
.../components/debugger/index.module.scss | 0
.../workbench/components/debugger/index.tsx | 0
.../components/menu-tree/index.module.scss | 0
.../workbench/components/menu-tree/index.tsx | 0
.../workbench/components/tabs/index.module.scss | 0
.../components/workbench/components/tabs/index.tsx | 0
.../components/workbench/index.module.scss | 0
.../playground/components/workbench/index.tsx | 0
.../src/views/playground/index.module.scss | 0
.../src/views/playground/index.tsx | 0
.../src/views/system/index.module.scss | 0
.../src/views/system/index.tsx | 0
.../src/views/system/role/index.module.scss | 0
.../src/views/system/role/index.tsx | 0
.../src/views/system/role/use-constants.ts | 0
.../src/views/system/role/use-table.ts | 0
.../src/views/system/user/index.module.scss | 0
.../src/views/system/user/index.tsx | 0
paimon-web-ui/src/vite-env.d.ts | 18 -
.../tsconfig.app.json | 0
paimon-web-ui/tsconfig.json | 41 +--
paimon-web-ui/tsconfig.node.json | 16 +-
paimon-web-ui/vite.config.ts | 78 ++--
272 files changed, 269 insertions(+), 4758 deletions(-)
diff --git a/paimon-web-ui-new/.eslintrc.cjs b/paimon-web-ui-new/.eslintrc.cjs
deleted file mode 100644
index b8df889..0000000
--- a/paimon-web-ui-new/.eslintrc.cjs
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * 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.
- */
-
-/* eslint-env node */
-require('@rushstack/eslint-patch/modern-module-resolution')
-
-module.exports = {
- root: true,
- 'extends': [
- 'plugin:vue/vue3-essential',
- 'eslint:recommended',
- '@vue/eslint-config-typescript',
- '@vue/eslint-config-prettier/skip-formatting',
- './.eslintrc-auto-import.json'
- ],
- parserOptions: {
- ecmaVersion: 'latest'
- }
-}
diff --git a/paimon-web-ui-new/index.html b/paimon-web-ui-new/index.html
deleted file mode 100644
index dd2ddba..0000000
--- a/paimon-web-ui-new/index.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!--
-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.
--->
-
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta charset="UTF-8">
- <link rel="icon" type="image/svg+xml" href="/favicon_blue.svg" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Apache Paimon</title>
- </head>
- <body>
- <div id="app"></div>
- <script type="module" src="/src/main.ts"></script>
- </body>
-</html>
diff --git a/paimon-web-ui-new/package.json b/paimon-web-ui-new/package.json
deleted file mode 100644
index e5105cc..0000000
--- a/paimon-web-ui-new/package.json
+++ /dev/null
@@ -1,63 +0,0 @@
-{
- "name": "paimon-web-ui-new",
- "version": "0.0.0",
- "private": true,
- "scripts": {
- "dev": "vite",
- "dev:mock": "vite --mode mock",
- "mock": "mm --config=mock/mm.config.js",
- "build": "run-p type-check build-only",
- "preview": "vite preview",
- "build-only": "vite build",
- "type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false",
- "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
- "format": "prettier --write src/"
- },
- "dependencies": {
- "@antv/x6": "^2.15.3",
- "@antv/x6-plugin-dnd": "^2.1.1",
- "@antv/x6-vue-shape": "^2.1.1",
- "dart-sass": "^1.25.0",
- "dayjs": "^1.11.10",
- "lodash": "^4.17.21",
- "mitt": "^3.0.1",
- "monaco-editor": "^0.43.0",
- "pinia": "^2.1.6",
- "pinia-plugin-persistedstate": "^3.2.0",
- "sass": "^1.66.1",
- "sass-loader": "^13.3.2",
- "sql-formatter": "^13.0.0",
- "vue": "^3.3.4",
- "vue-draggable-plus": "^0.3.5",
- "vue-i18n": "^9.4.0",
- "vue-router": "^4.2.4"
- },
- "devDependencies": {
- "@rushstack/eslint-patch": "^1.3.3",
- "@tsconfig/node18": "^18.2.2",
- "@types/lodash": "^4.14.200",
- "@types/node": "^18.17.15",
- "@varlet/axle": "^0.2.5",
- "@vicons/antd": "^0.12.0",
- "@vicons/carbon": "^0.12.0",
- "@vicons/ionicons5": "^0.12.0",
- "@vitejs/plugin-vue": "^4.3.4",
- "@vitejs/plugin-vue-jsx": "^3.0.2",
- "@vue/eslint-config-prettier": "^8.0.0",
- "@vue/eslint-config-typescript": "^11.0.3",
- "@vue/tsconfig": "^0.4.0",
- "autoprefixer": "^10.4.15",
- "eslint": "^8.49.0",
- "eslint-plugin-vue": "^9.17.0",
- "mockm": "1.1.27-alpha.2",
- "naive-ui": "^2.36.0",
- "npm-run-all": "^4.1.5",
- "postcss": "^8.4.29",
- "prettier": "^3.0.3",
- "typescript": "~5.1.6",
- "unplugin-auto-import": "^0.16.6",
- "unplugin-vue-components": "^0.25.2",
- "vite": "^4.4.9",
- "vue-tsc": "^1.8.11"
- }
-}
\ No newline at end of file
diff --git a/paimon-web-ui-new/public/favicon_blue.svg b/paimon-web-ui-new/public/favicon_blue.svg
deleted file mode 100644
index 73c311a..0000000
--- a/paimon-web-ui-new/public/favicon_blue.svg
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg id="_图层_2" data-name="图层 2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 307.34 218.61">
- <defs>
- <style>
- .cls-1 {
- fill: #0666ff;
- }
- </style>
- </defs>
- <g id="_图层_1-2" data-name="图层 1">
- <path class="cls-1" d="m307.34,46.55l-50.19,14.1c.47.94.92,1.89,1.36,2.84l48.83-16.94Z"/>
- <path class="cls-1" d="m62.72,170.47l-12.62,25.69H0l22.99,4.72c7.55,1.55,14.28,5.8,18.93,11.96l20.16-23.6c3.71-4.16,7.5-8.23,11.36-12.24-2.97-3.76-5.69-7.71-8.15-11.84-.86,1.74-1.72,3.51-2.56,5.31Z"/>
- <path class="cls-1" d="m105.58,111.28c-3.51-10.04-11.49-18.15-21.95-21.65l-12.74-4.26h80.4c19.85-7.47,43.6-13.02,72.56-17.39l19.6-3.48,13.7-3.85C239.25,24.7,202.14,0,159.25,0,98.89,0,49.95,48.94,49.95,109.3c0,20.41,5.6,39.51,15.34,55.85,11.13-22.5,23.81-40.04,40.29-53.88Z"/>
- <path class="cls-1" d="m232.35,72.57c-60.11,22.53-114.4,58.22-158.92,104.43,20.02,25.34,51.02,41.61,85.82,41.61,60.37,0,109.3-48.94,109.3-109.3,0-16.36-3.6-31.88-10.04-45.81l-26.17,9.08Z"/>
- </g>
-</svg>
\ No newline at end of file
diff --git a/paimon-web-ui-new/tsconfig.json b/paimon-web-ui-new/tsconfig.json
deleted file mode 100644
index 78f134a..0000000
--- a/paimon-web-ui-new/tsconfig.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "files": [],
- "references": [
- {
- "path": "./tsconfig.node.json"
- },
- {
- "path": "./tsconfig.app.json"
- }
- ],
-}
diff --git a/paimon-web-ui-new/tsconfig.node.json b/paimon-web-ui-new/tsconfig.node.json
deleted file mode 100644
index dee96be..0000000
--- a/paimon-web-ui-new/tsconfig.node.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "extends": "@tsconfig/node18/tsconfig.json",
- "include": [
- "vite.config.*",
- "vitest.config.*",
- "cypress.config.*",
- "nightwatch.conf.*",
- "playwright.config.*"
- ],
- "compilerOptions": {
- "composite": true,
- "module": "ESNext",
- "moduleResolution": "Bundler",
- "types": ["node"]
- }
-}
diff --git a/paimon-web-ui-new/vite.config.ts b/paimon-web-ui-new/vite.config.ts
deleted file mode 100644
index 859f6c5..0000000
--- a/paimon-web-ui-new/vite.config.ts
+++ /dev/null
@@ -1,82 +0,0 @@
-/* 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 { fileURLToPath, URL } from 'node:url'
-
-import { defineConfig } from 'vite'
-import vue from '@vitejs/plugin-vue'
-import vueJsx from '@vitejs/plugin-vue-jsx'
-import AutoImport from 'unplugin-auto-import/vite'
-import Components from 'unplugin-vue-components/vite'
-import { NaiveUiResolver } from 'unplugin-vue-components/resolvers'
-
-// https://vitejs.dev/config/
-export default defineConfig({
- server: {
- proxy: {
- '/mock': {
- target: 'http://127.0.0.1:10088',
- changeOrigin: true,
- },
- '/api': {
- target: 'http://127.0.0.1:10088',
- changeOrigin: true,
- }
- }
- },
- plugins: [
- vue(),
- vueJsx(),
- AutoImport({
- imports: [
- 'vue',
- 'vue-router',
- 'pinia',
- {
- 'naive-ui': [
- 'useDialog',
- 'useMessage',
- 'useNotification',
- 'useLoadingBar'
- ]
- }
- ],
- dts: './auto-imports.d.ts',
- dirs: [
- './src/composables',
- ],
- eslintrc: {
- enabled: false
- }
- }),
- Components({
- resolvers: [NaiveUiResolver()]
- })
- ],
- css: {
- postcss: {
- plugins: [
- require("autoprefixer")
- ]
- }
- },
- resolve: {
- alias: {
- '@': fileURLToPath(new URL('./src', import.meta.url))
- }
- }
-})
diff --git a/paimon-web-ui-new/.eslintignore b/paimon-web-ui/.eslintignore
similarity index 100%
rename from paimon-web-ui-new/.eslintignore
rename to paimon-web-ui/.eslintignore
diff --git a/paimon-web-ui-new/.eslintrc-auto-import.json b/paimon-web-ui/.eslintrc-auto-import.json
similarity index 100%
rename from paimon-web-ui-new/.eslintrc-auto-import.json
rename to paimon-web-ui/.eslintrc-auto-import.json
diff --git a/paimon-web-ui/.eslintrc.cjs b/paimon-web-ui/.eslintrc.cjs
index 4020bcb..b8df889 100644
--- a/paimon-web-ui/.eslintrc.cjs
+++ b/paimon-web-ui/.eslintrc.cjs
@@ -1,14 +1,33 @@
+/**
+ * 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.
+ */
+
+/* eslint-env node */
+require('@rushstack/eslint-patch/modern-module-resolution')
+
module.exports = {
- env: { browser: true, es2020: true },
- extends: [
+ root: true,
+ 'extends': [
+ 'plugin:vue/vue3-essential',
'eslint:recommended',
- 'plugin:@typescript-eslint/recommended',
- 'plugin:react-hooks/recommended',
+ '@vue/eslint-config-typescript',
+ '@vue/eslint-config-prettier/skip-formatting',
+ './.eslintrc-auto-import.json'
],
- parser: '@typescript-eslint/parser',
- parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
- plugins: ['react-refresh'],
- rules: {
- 'react-refresh/only-export-components': 'warn',
- },
+ parserOptions: {
+ ecmaVersion: 'latest'
+ }
}
diff --git a/paimon-web-ui-new/.prettierrc.json b/paimon-web-ui/.prettierrc.json
similarity index 100%
rename from paimon-web-ui-new/.prettierrc.json
rename to paimon-web-ui/.prettierrc.json
diff --git a/paimon-web-ui-new/README.md b/paimon-web-ui/README.md
similarity index 100%
rename from paimon-web-ui-new/README.md
rename to paimon-web-ui/README.md
diff --git a/paimon-web-ui/apiWeb.json b/paimon-web-ui/apiWeb.json
new file mode 100644
index 0000000..b576de9
--- /dev/null
+++ b/paimon-web-ui/apiWeb.json
@@ -0,0 +1,4 @@
+{
+ "paths": {},
+ "disable": []
+}
\ No newline at end of file
diff --git a/paimon-web-ui/auto-imports.d.ts b/paimon-web-ui/auto-imports.d.ts
new file mode 100644
index 0000000..92e4ec9
--- /dev/null
+++ b/paimon-web-ui/auto-imports.d.ts
@@ -0,0 +1,94 @@
+/* eslint-disable */
+/* prettier-ignore */
+// @ts-nocheck
+// noinspection JSUnusedGlobalSymbols
+// Generated by unplugin-auto-import
+export {}
+declare global {
+ const EffectScope: typeof import('vue')['EffectScope']
+ const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate']
+ const computed: typeof import('vue')['computed']
+ const createApp: typeof import('vue')['createApp']
+ const createNewCatalog: typeof import('./src/api/models/catalog/index')['createNewCatalog']
+ const createPinia: typeof import('pinia')['createPinia']
+ const customRef: typeof import('vue')['customRef']
+ const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
+ const defineComponent: typeof import('vue')['defineComponent']
+ const defineStore: typeof import('pinia')['defineStore']
+ const effectScope: typeof import('vue')['effectScope']
+ const getActivePinia: typeof import('pinia')['getActivePinia']
+ const getAllCatalogs: typeof import('./src/api/models/catalog/index')['getAllCatalogs']
+ const getCurrentInstance: typeof import('vue')['getCurrentInstance']
+ const getCurrentScope: typeof import('vue')['getCurrentScope']
+ const getDatabasesByCatalogId: typeof import('./src/api/models/catalog/index')['getDatabasesByCatalogId']
+ const h: typeof import('vue')['h']
+ const inject: typeof import('vue')['inject']
+ const isProxy: typeof import('vue')['isProxy']
+ const isReactive: typeof import('vue')['isReactive']
+ const isReadonly: typeof import('vue')['isReadonly']
+ const isRef: typeof import('vue')['isRef']
+ const mapActions: typeof import('pinia')['mapActions']
+ const mapGetters: typeof import('pinia')['mapGetters']
+ const mapState: typeof import('pinia')['mapState']
+ const mapStores: typeof import('pinia')['mapStores']
+ const mapWritableState: typeof import('pinia')['mapWritableState']
+ const markRaw: typeof import('vue')['markRaw']
+ const nextTick: typeof import('vue')['nextTick']
+ const onActivated: typeof import('vue')['onActivated']
+ const onBeforeMount: typeof import('vue')['onBeforeMount']
+ const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave']
+ const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate']
+ const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
+ const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
+ const onDeactivated: typeof import('vue')['onDeactivated']
+ const onErrorCaptured: typeof import('vue')['onErrorCaptured']
+ const onLogin: typeof import('./src/api/models/login/index')['onLogin']
+ const onLogout: typeof import('./src/api/models/login/index')['onLogout']
+ const onMounted: typeof import('vue')['onMounted']
+ const onRenderTracked: typeof import('vue')['onRenderTracked']
+ const onRenderTriggered: typeof import('vue')['onRenderTriggered']
+ const onScopeDispose: typeof import('vue')['onScopeDispose']
+ const onServerPrefetch: typeof import('vue')['onServerPrefetch']
+ const onUnmounted: typeof import('vue')['onUnmounted']
+ const onUpdated: typeof import('vue')['onUpdated']
+ const provide: typeof import('vue')['provide']
+ const reactive: typeof import('vue')['reactive']
+ const readonly: typeof import('vue')['readonly']
+ const ref: typeof import('vue')['ref']
+ const request: typeof import('./src/api/request')['default']
+ const resolveComponent: typeof import('vue')['resolveComponent']
+ const setActivePinia: typeof import('pinia')['setActivePinia']
+ const setMapStoreSuffix: typeof import('pinia')['setMapStoreSuffix']
+ const shallowReactive: typeof import('vue')['shallowReactive']
+ const shallowReadonly: typeof import('vue')['shallowReadonly']
+ const shallowRef: typeof import('vue')['shallowRef']
+ const storeToRefs: typeof import('pinia')['storeToRefs']
+ const toRaw: typeof import('vue')['toRaw']
+ const toRef: typeof import('vue')['toRef']
+ const toRefs: typeof import('vue')['toRefs']
+ const toValue: typeof import('vue')['toValue']
+ const triggerRef: typeof import('vue')['triggerRef']
+ const types: typeof import('./src/api/types')['default']
+ const unref: typeof import('vue')['unref']
+ const useAttrs: typeof import('vue')['useAttrs']
+ const useCssModule: typeof import('vue')['useCssModule']
+ const useCssVars: typeof import('vue')['useCssVars']
+ const useDialog: typeof import('naive-ui')['useDialog']
+ const useLink: typeof import('vue-router')['useLink']
+ const useLoadingBar: typeof import('naive-ui')['useLoadingBar']
+ const useLocaleHooks: typeof import('./src/composables/locales')['useLocaleHooks']
+ const useMessage: typeof import('naive-ui')['useMessage']
+ const useNotification: typeof import('naive-ui')['useNotification']
+ const useRoute: typeof import('vue-router')['useRoute']
+ const useRouter: typeof import('vue-router')['useRouter']
+ const useSlots: typeof import('vue')['useSlots']
+ const watch: typeof import('vue')['watch']
+ const watchEffect: typeof import('vue')['watchEffect']
+ const watchPostEffect: typeof import('vue')['watchPostEffect']
+ const watchSyncEffect: typeof import('vue')['watchSyncEffect']
+}
+// for type re-export
+declare global {
+ // @ts-ignore
+ export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
+}
diff --git a/paimon-web-ui-new/components.d.ts b/paimon-web-ui/components.d.ts
similarity index 100%
rename from paimon-web-ui-new/components.d.ts
rename to paimon-web-ui/components.d.ts
diff --git a/paimon-web-ui-new/env.d.ts b/paimon-web-ui/env.d.ts
similarity index 100%
rename from paimon-web-ui-new/env.d.ts
rename to paimon-web-ui/env.d.ts
diff --git a/paimon-web-ui/httpData/.gitignore b/paimon-web-ui/httpData/.gitignore
new file mode 100644
index 0000000..fb1e814
--- /dev/null
+++ b/paimon-web-ui/httpData/.gitignore
@@ -0,0 +1,6 @@
+openApiHistory/
+request/
+db.json
+httpHistory.json
+log.err.txt
+store.json
\ No newline at end of file
diff --git a/paimon-web-ui/httpData/apiWeb.json b/paimon-web-ui/httpData/apiWeb.json
new file mode 100644
index 0000000..b576de9
--- /dev/null
+++ b/paimon-web-ui/httpData/apiWeb.json
@@ -0,0 +1,4 @@
+{
+ "paths": {},
+ "disable": []
+}
\ No newline at end of file
diff --git a/paimon-web-ui/index.html b/paimon-web-ui/index.html
index 6d0b55b..dd2ddba 100644
--- a/paimon-web-ui/index.html
+++ b/paimon-web-ui/index.html
@@ -20,13 +20,13 @@ under the License.
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="UTF-8">
<link rel="icon" type="image/svg+xml" href="/favicon_blue.svg" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Apache Paimon</title>
</head>
<body>
- <div id="root"></div>
- <script type="module" src="/src/main.tsx"></script>
+ <div id="app"></div>
+ <script type="module" src="/src/main.ts"></script>
</body>
</html>
diff --git a/paimon-web-ui-new/mock/mm.config.js b/paimon-web-ui/mock/mm.config.js
similarity index 100%
rename from paimon-web-ui-new/mock/mm.config.js
rename to paimon-web-ui/mock/mm.config.js
diff --git a/paimon-web-ui-new/mock/modules/index.js b/paimon-web-ui/mock/modules/index.js
similarity index 100%
rename from paimon-web-ui-new/mock/modules/index.js
rename to paimon-web-ui/mock/modules/index.js
diff --git a/paimon-web-ui-new/mock/modules/metadata.js b/paimon-web-ui/mock/modules/metadata.js
similarity index 100%
rename from paimon-web-ui-new/mock/modules/metadata.js
rename to paimon-web-ui/mock/modules/metadata.js
diff --git a/paimon-web-ui/package.json b/paimon-web-ui/package.json
index 2faecbb..e5105cc 100644
--- a/paimon-web-ui/package.json
+++ b/paimon-web-ui/package.json
@@ -1,53 +1,63 @@
{
- "name": "vite-project",
- "private": true,
+ "name": "paimon-web-ui-new",
"version": "0.0.0",
- "type": "module",
+ "private": true,
"scripts": {
"dev": "vite",
- "build": "tsc && vite build",
- "lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
- "preview": "vite preview"
+ "dev:mock": "vite --mode mock",
+ "mock": "mm --config=mock/mm.config.js",
+ "build": "run-p type-check build-only",
+ "preview": "vite preview",
+ "build-only": "vite build",
+ "type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false",
+ "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
+ "format": "prettier --write src/"
},
"dependencies": {
- "@douyinfe/semi-icons": "^2.38.1",
- "@douyinfe/semi-ui": "^2.38.1",
- "@monaco-editor/react": "^4.5.1",
- "@reduxjs/toolkit": "^1.9.5",
- "@semi-bot/semi-theme-doucreator": "^1.0.18",
- "@semi-bot/semi-theme-figma": "^0.1.6",
- "axios": "^1.4.0",
- "http-proxy-middleware": "^2.0.6",
- "i18next": "^23.4.4",
- "i18next-browser-languagedetector": "^7.1.0",
- "i18next-http-backend": "^2.2.1",
- "antd": "^5.8.3",
- "@ant-design/pro-components": "^2.6.3",
- "less": "^4.1.3",
- "monaco-editor": "^0.40.0",
- "react": "^18.2.0",
- "react-bootstrap": "^2.8.0",
- "react-dom": "^18.2.0",
- "react-icons": "^4.10.1",
- "react-i18next": "^13.1.0",
- "zustand": "^4.4.1",
- "styled-components": "^6.0.0-rc.3",
- "vite-plugin-semi-theme": "^0.5.0",
- "screenfull": "^6.0.2"
+ "@antv/x6": "^2.15.3",
+ "@antv/x6-plugin-dnd": "^2.1.1",
+ "@antv/x6-vue-shape": "^2.1.1",
+ "dart-sass": "^1.25.0",
+ "dayjs": "^1.11.10",
+ "lodash": "^4.17.21",
+ "mitt": "^3.0.1",
+ "monaco-editor": "^0.43.0",
+ "pinia": "^2.1.6",
+ "pinia-plugin-persistedstate": "^3.2.0",
+ "sass": "^1.66.1",
+ "sass-loader": "^13.3.2",
+ "sql-formatter": "^13.0.0",
+ "vue": "^3.3.4",
+ "vue-draggable-plus": "^0.3.5",
+ "vue-i18n": "^9.4.0",
+ "vue-router": "^4.2.4"
},
"devDependencies": {
- "@types/node": "^20.3.2",
- "@types/react": "^18.0.37",
- "@types/react-dom": "^18.0.11",
- "@typescript-eslint/eslint-plugin": "^5.59.0",
- "@typescript-eslint/parser": "^5.59.0",
- "@vitejs/plugin-react": "^4.0.0",
- "eslint": "^8.38.0",
- "eslint-plugin-react-hooks": "^4.6.0",
- "eslint-plugin-react-refresh": "^0.3.4",
- "less-loader": "^11.1.3",
- "react-router-dom": "^6.14.1",
- "typescript": "^5.0.2",
- "vite": "^4.3.9"
+ "@rushstack/eslint-patch": "^1.3.3",
+ "@tsconfig/node18": "^18.2.2",
+ "@types/lodash": "^4.14.200",
+ "@types/node": "^18.17.15",
+ "@varlet/axle": "^0.2.5",
+ "@vicons/antd": "^0.12.0",
+ "@vicons/carbon": "^0.12.0",
+ "@vicons/ionicons5": "^0.12.0",
+ "@vitejs/plugin-vue": "^4.3.4",
+ "@vitejs/plugin-vue-jsx": "^3.0.2",
+ "@vue/eslint-config-prettier": "^8.0.0",
+ "@vue/eslint-config-typescript": "^11.0.3",
+ "@vue/tsconfig": "^0.4.0",
+ "autoprefixer": "^10.4.15",
+ "eslint": "^8.49.0",
+ "eslint-plugin-vue": "^9.17.0",
+ "mockm": "1.1.27-alpha.2",
+ "naive-ui": "^2.36.0",
+ "npm-run-all": "^4.1.5",
+ "postcss": "^8.4.29",
+ "prettier": "^3.0.3",
+ "typescript": "~5.1.6",
+ "unplugin-auto-import": "^0.16.6",
+ "unplugin-vue-components": "^0.25.2",
+ "vite": "^4.4.9",
+ "vue-tsc": "^1.8.11"
}
-}
+}
\ No newline at end of file
diff --git a/paimon-web-ui-new/pnpm-lock.yaml b/paimon-web-ui/pnpm-lock.yaml
similarity index 100%
rename from paimon-web-ui-new/pnpm-lock.yaml
rename to paimon-web-ui/pnpm-lock.yaml
diff --git a/paimon-web-ui/pom.xml b/paimon-web-ui/pom.xml
deleted file mode 100644
index e4a3144..0000000
--- a/paimon-web-ui/pom.xml
+++ /dev/null
@@ -1,98 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.paimon</groupId>
- <artifactId>paimon-webui</artifactId>
- <version>0.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>paimon-web-ui</artifactId>
- <packaging>pom</packaging>
- <name>Paimon : Web : UI</name>
-
- <properties>
- <node.version>v18.0.0</node.version>
- <npm.version>9.4.1</npm.version>
- <frontend-maven-plugin.version>1.12.0</frontend-maven-plugin.version>
- </properties>
-
- <profiles>
- <profile>
- <id>release</id>
- <build>
- <finalName>${project.artifactId}-${project.version}</finalName>
- <plugins>
- <plugin>
- <groupId>com.github.eirslett</groupId>
- <artifactId>frontend-maven-plugin</artifactId>
- <version>${frontend-maven-plugin.version}</version>
- <executions>
- <execution>
- <id>install node and npm</id>
- <goals>
- <goal>install-node-and-npm</goal>
- </goals>
- <configuration>
- <nodeVersion>${node.version}</nodeVersion>
- <npmVersion>${npm.version}</npmVersion>
- </configuration>
- </execution>
- <execution>
- <id>npm install</id>
- <goals>
- <goal>npm</goal>
- </goals>
- <phase>generate-resources</phase>
- <configuration>
- <arguments>install --force</arguments>
- </configuration>
- </execution>
- <execution>
- <id>npm fund</id>
- <goals>
- <goal>npm</goal>
- </goals>
- <phase>generate-resources</phase>
- <configuration>
- <arguments>fund</arguments>
- </configuration>
- </execution>
- <execution>
- <id>npm run build</id>
- <goals>
- <goal>npm</goal>
- </goals>
- <configuration>
- <arguments>run build</arguments>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
-</project>
\ No newline at end of file
diff --git a/paimon-web-ui-new/postcss.config.js b/paimon-web-ui/postcss.config.js
similarity index 100%
rename from paimon-web-ui-new/postcss.config.js
rename to paimon-web-ui/postcss.config.js
diff --git a/paimon-web-ui-new/src/App.tsx b/paimon-web-ui/src/App.tsx
similarity index 100%
rename from paimon-web-ui-new/src/App.tsx
rename to paimon-web-ui/src/App.tsx
diff --git a/paimon-web-ui/src/api/api.ts b/paimon-web-ui/src/api/api.ts
deleted file mode 100644
index 1d80977..0000000
--- a/paimon-web-ui/src/api/api.ts
+++ /dev/null
@@ -1,92 +0,0 @@
-/* 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 http from '@api/http'
-import {API_ENDPOINTS} from '@api/endpoints';
-import Result = API.Result;
-import {CatalogItemList} from "@src/types/Catalog/data";
-import {DatabaseItem} from "@src/types/Database/data";
-import {TableItem} from "@src/types/Table/data";
-
-export const createFileSystemCatalog = async (catalogProp: Prop.CatalogProp) => {
- try {
- return await http.httpPost<Result<any>, Prop.CatalogProp>(API_ENDPOINTS.CREATE_FILE_SYSTEM_CATALOG, catalogProp);
- } catch (error) {
- console.error('Failed to create catalog:', error);
- }
-};
-
-export const createHiveCatalog = async (catalogProp: Prop.CatalogProp) => {
- try {
- return await http.httpPost<Result<any>, Prop.CatalogProp>(API_ENDPOINTS.CREATE_HIVE_CATALOG, catalogProp);
- } catch (error) {
- console.error('Failed to create catalog:', error);
- }
-};
-
-export const getAllCatalogs = async () => {
- try {
- return await http.httpGet<Result<CatalogItemList>, null>(API_ENDPOINTS.GET_ALL_CATALOGS)
- } catch (error: any) {
- console.error('Failed to get catalogs:', error);
- }
-}
-
-export const createDatabase = async (databaseProp: Prop.DatabaseProp) => {
- try {
- return await http.httpPost<Result<any>, Prop.DatabaseProp>(API_ENDPOINTS.CREATE_DATABASE, databaseProp);
- } catch (error) {
- console.error('Failed to create database:', error);
- }
-};
-
-export const getAllDatabases = async () => {
- try {
- return await http.httpGet<Result<DatabaseItem[]>, null>(API_ENDPOINTS.GET_ALL_DATABASES)
- } catch (error: any) {
- console.error('Failed to get database:', error);
- }
-}
-
-export const createTable = async (databaseProp: TableItem) => {
- try {
- return await http.httpPost<Result<any>, TableItem>(API_ENDPOINTS.CREATE_TABLE, databaseProp);
- } catch (error) {
- console.error('Failed to create table:', error);
- }
-};
-
-export const getAllTables = async () => {
- try {
- return await http.httpGet<Result<TableItem[]>, null>(API_ENDPOINTS.GET_ALL_TABLES)
- } catch (error: any) {
- console.error('Failed to get tables:', error);
- }
-}
-
-const Api = {
- createFileSystemCatalog,
- createHiveCatalog,
- getAllCatalogs,
- createDatabase,
- getAllDatabases,
- createTable,
- getAllTables,
-}
-
-export default Api;
-
diff --git a/paimon-web-ui/src/api/data.d.ts b/paimon-web-ui/src/api/data.d.ts
deleted file mode 100644
index 886c716..0000000
--- a/paimon-web-ui/src/api/data.d.ts
+++ /dev/null
@@ -1,52 +0,0 @@
-/* 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. */
-
-declare namespace API {
- export interface Result<T> {
- code: number;
- msg: string;
- data: T;
- }
-
- export interface PageData<T> {
- records: T[];
- page: number;
- size: number;
- total: number;
- }
-
- export type PageResult<T> = Result<PageData<T>>
-}
-
-declare namespace Prop {
- // Catalog
- export interface CatalogProp {
- catalogName: string,
- catalogType: string,
- warehouse: string,
- hiveUri: string,
- hiveConfDir: string,
- isDelete: boolean
- }
-
- // Database
- export interface DatabaseProp {
- databaseName: string,
- catalogId: number,
- description: string
- }
-}
\ No newline at end of file
diff --git a/paimon-web-ui/src/api/endpoints.ts b/paimon-web-ui/src/api/endpoints.ts
deleted file mode 100644
index 8cfbfce..0000000
--- a/paimon-web-ui/src/api/endpoints.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-/* 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. */
-
-export const API_ENDPOINTS = {
-
- // auth && login
- GET_LDAP_ENABLE: '/ldap/enable',
- LOGIN: '/login',
-
- // catalog
- CREATE_FILE_SYSTEM_CATALOG: '/catalog/createFilesystemCatalog',
- CREATE_HIVE_CATALOG: '/catalog/createHiveCatalog',
- GET_ALL_CATALOGS: '/catalog/getAllCatalogs',
-
- // database
- CREATE_DATABASE: '/database/createDatabase',
- GET_ALL_DATABASES: '/database/getAllDatabases',
-
- // table
- CREATE_TABLE: '/table/createTable',
- GET_ALL_TABLES: '/table/getAllTables',
-
-};
\ No newline at end of file
diff --git a/paimon-web-ui/src/api/http.ts b/paimon-web-ui/src/api/http.ts
deleted file mode 100644
index 5c32cf6..0000000
--- a/paimon-web-ui/src/api/http.ts
+++ /dev/null
@@ -1,120 +0,0 @@
-/* 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 axios, { AxiosResponse, AxiosError } from 'axios';
-/*import { Notification } from '@douyinfe/semi-ui';*/
-import {UserState} from "@src/types/User/data";
-import {Result} from "@src/types/Public/data";
-
-const httpClient = axios.create({
- baseURL: '/api',
- timeout: 30 * 1000,
- withCredentials: false,
- headers: {
- 'Content-Type': 'application/json'
- }
-});
-
-// request interceptor.
-httpClient.interceptors.request.use(
- (config: any) => {
-
- /*console.log(localStorage.getItem('token'))*/
-
- // Here you can set request headers like:config.headers['Token'] = localStorage.getItem('Token').
- config.headers['Authorization'] = localStorage.getItem('token');
-
- /*config.headers = {
- "Authorization": localStorage.getItem('token')
- }*/
- return config;
- },
- (error: AxiosError) => {
- // Handle request errors
- console.log('request:', error);
- return Promise.reject(error);
- }
-);
-
-// response interceptor.
-httpClient.interceptors.response.use(
- (response: AxiosResponse) => {
- // Here you can process the response data.
- const { data: reponseData , config: reponseConfig} = response;
-
- // 处理 config 获取 baseUrl 和 url 拼接 判断是登录接口 , 如果是 拿到相应的数据 存储到 localStorage 中 并设置到请求头中
- if (reponseConfig.url === '/login') {
- const {data} = reponseData as Result<UserState>
- /*console.log('登录接口', data)*/
- //todo: use store
- localStorage.setItem('token', data.saTokenInfo.tokenValue)
- }
-
- // Handle response data
- /* Notification.error({
- title: 'Error',
- content: `${reponseData.msg}`
- });*/
- return response;
- },
- (error: AxiosError) => {
- // Handle response errors.
- console.log('response:', error);
- return Promise.reject(error);
- }
-);
-
-const httpGet = async <T, E>(url: string, param?: E, beforeCallBack? : () => void , afterCallBack? : () => void): Promise<T> => {
- beforeCallBack && beforeCallBack()
- const {data} = await httpClient.get<T>(url, {params: param})
- afterCallBack && afterCallBack()
- return data
-}
-
-const httpPost = async <T, E>(url: string, body: E, beforeCallBack? : () => void , afterCallBack? : () => void): Promise<T> => {
- beforeCallBack && beforeCallBack()
- const {data} = await httpClient.post<T>(url, body)
- afterCallBack && afterCallBack()
- return data
-}
-
-const httpDelete = async <T, E>(url: string, param: E ,beforeCallBack? : () => void , afterCallBack? : () => void): Promise<T> => {
- beforeCallBack && beforeCallBack()
- const {data} = await httpClient.delete(url, {params: param})
- afterCallBack && afterCallBack()
- return data
-}
-
-const httpFormPost = async <T, E>(url: string, body?: E , beforeCallBack? : () => void , afterCallBack? : () => void): Promise<T> => {
- beforeCallBack && beforeCallBack()
- const {data} = await httpClient.post(url, body, {
- headers: {
- 'Content-Type': 'multipart/form-data'
- }
- })
- afterCallBack && afterCallBack()
- return data
-}
-
-const http = {
- httpGet,
- httpPost,
- httpDelete,
- httpFormPost
-}
-
-export default http;
\ No newline at end of file
diff --git a/paimon-web-ui-new/src/api/index.ts b/paimon-web-ui/src/api/index.ts
similarity index 100%
rename from paimon-web-ui-new/src/api/index.ts
rename to paimon-web-ui/src/api/index.ts
diff --git a/paimon-web-ui-new/src/api/message.ts b/paimon-web-ui/src/api/message.ts
similarity index 100%
rename from paimon-web-ui-new/src/api/message.ts
rename to paimon-web-ui/src/api/message.ts
diff --git a/paimon-web-ui-new/src/api/models/catalog/index.ts b/paimon-web-ui/src/api/models/catalog/index.ts
similarity index 100%
rename from paimon-web-ui-new/src/api/models/catalog/index.ts
rename to paimon-web-ui/src/api/models/catalog/index.ts
diff --git a/paimon-web-ui-new/src/api/models/catalog/types/catalog.ts b/paimon-web-ui/src/api/models/catalog/types/catalog.ts
similarity index 100%
rename from paimon-web-ui-new/src/api/models/catalog/types/catalog.ts
rename to paimon-web-ui/src/api/models/catalog/types/catalog.ts
diff --git a/paimon-web-ui-new/src/api/models/catalog/types/database.ts b/paimon-web-ui/src/api/models/catalog/types/database.ts
similarity index 100%
rename from paimon-web-ui-new/src/api/models/catalog/types/database.ts
rename to paimon-web-ui/src/api/models/catalog/types/database.ts
diff --git a/paimon-web-ui-new/src/api/models/catalog/types/datafile.ts b/paimon-web-ui/src/api/models/catalog/types/datafile.ts
similarity index 100%
rename from paimon-web-ui-new/src/api/models/catalog/types/datafile.ts
rename to paimon-web-ui/src/api/models/catalog/types/datafile.ts
diff --git a/paimon-web-ui-new/src/api/models/catalog/types/index.ts b/paimon-web-ui/src/api/models/catalog/types/index.ts
similarity index 100%
rename from paimon-web-ui-new/src/api/models/catalog/types/index.ts
rename to paimon-web-ui/src/api/models/catalog/types/index.ts
diff --git a/paimon-web-ui-new/src/api/models/catalog/types/manifest.ts b/paimon-web-ui/src/api/models/catalog/types/manifest.ts
similarity index 100%
rename from paimon-web-ui-new/src/api/models/catalog/types/manifest.ts
rename to paimon-web-ui/src/api/models/catalog/types/manifest.ts
diff --git a/paimon-web-ui-new/src/api/models/catalog/types/schema.ts b/paimon-web-ui/src/api/models/catalog/types/schema.ts
similarity index 100%
rename from paimon-web-ui-new/src/api/models/catalog/types/schema.ts
rename to paimon-web-ui/src/api/models/catalog/types/schema.ts
diff --git a/paimon-web-ui-new/src/api/models/catalog/types/snapshot.ts b/paimon-web-ui/src/api/models/catalog/types/snapshot.ts
similarity index 100%
rename from paimon-web-ui-new/src/api/models/catalog/types/snapshot.ts
rename to paimon-web-ui/src/api/models/catalog/types/snapshot.ts
diff --git a/paimon-web-ui-new/src/api/models/catalog/types/table.ts b/paimon-web-ui/src/api/models/catalog/types/table.ts
similarity index 100%
rename from paimon-web-ui-new/src/api/models/catalog/types/table.ts
rename to paimon-web-ui/src/api/models/catalog/types/table.ts
diff --git a/paimon-web-ui-new/src/api/models/cdc/index.ts b/paimon-web-ui/src/api/models/cdc/index.ts
similarity index 100%
rename from paimon-web-ui-new/src/api/models/cdc/index.ts
rename to paimon-web-ui/src/api/models/cdc/index.ts
diff --git a/paimon-web-ui-new/src/api/models/cdc/interface.ts b/paimon-web-ui/src/api/models/cdc/interface.ts
similarity index 100%
rename from paimon-web-ui-new/src/api/models/cdc/interface.ts
rename to paimon-web-ui/src/api/models/cdc/interface.ts
diff --git a/paimon-web-ui-new/src/api/models/login/index.ts b/paimon-web-ui/src/api/models/login/index.ts
similarity index 100%
rename from paimon-web-ui-new/src/api/models/login/index.ts
rename to paimon-web-ui/src/api/models/login/index.ts
diff --git a/paimon-web-ui-new/src/api/models/login/types/login_options.ts b/paimon-web-ui/src/api/models/login/types/login_options.ts
similarity index 100%
rename from paimon-web-ui-new/src/api/models/login/types/login_options.ts
rename to paimon-web-ui/src/api/models/login/types/login_options.ts
diff --git a/paimon-web-ui-new/src/api/models/role/index.ts b/paimon-web-ui/src/api/models/role/index.ts
similarity index 100%
rename from paimon-web-ui-new/src/api/models/role/index.ts
rename to paimon-web-ui/src/api/models/role/index.ts
diff --git a/paimon-web-ui-new/src/api/models/role/types/role.ts b/paimon-web-ui/src/api/models/role/types/role.ts
similarity index 100%
rename from paimon-web-ui-new/src/api/models/role/types/role.ts
rename to paimon-web-ui/src/api/models/role/types/role.ts
diff --git a/paimon-web-ui-new/src/api/request.ts b/paimon-web-ui/src/api/request.ts
similarity index 100%
rename from paimon-web-ui-new/src/api/request.ts
rename to paimon-web-ui/src/api/request.ts
diff --git a/paimon-web-ui-new/src/api/types.ts b/paimon-web-ui/src/api/types.ts
similarity index 100%
rename from paimon-web-ui-new/src/api/types.ts
rename to paimon-web-ui/src/api/types.ts
diff --git a/paimon-web-ui/src/app/App.less b/paimon-web-ui/src/app/App.less
deleted file mode 100644
index e14bbbd..0000000
--- a/paimon-web-ui/src/app/App.less
+++ /dev/null
@@ -1,33 +0,0 @@
-/* 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. */
-
-html,
-body,
-#root,
-#root > * {
- height: 100%;
- margin: 0;
- padding: 0;
- color: rgba(0, 0, 0, 0.65) !important;
- //--semi-color-primary: rgba(var(--semi-violet-6), 1);
- //--semi-color-primary: rgba(var(--semi-grey-6), 1);
- //--semi-color-primary: rgba(var(--semi-blue-5), 1);
- //--semi-color-primary-hover: rgba(var(--semi-violet-3), 1);
- //--semi-color-primary-hover: rgba(var(--semi-blue-6), 1);
- //--semi-color-primary-active: rgba(var(--semi-blue-7), 1);
- --semi-color-primary-light-default: rgba(var(--semi-color-bg-0), 1);
-}
diff --git a/paimon-web-ui/src/app/App.tsx b/paimon-web-ui/src/app/App.tsx
deleted file mode 100644
index 3d0ba46..0000000
--- a/paimon-web-ui/src/app/App.tsx
+++ /dev/null
@@ -1,29 +0,0 @@
-/* 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 { BrowserRouter } from 'react-router-dom'
-import RenderRouter from '@src/router'
-import './App.less'
-function App() {
- return(
- <BrowserRouter>
- <RenderRouter/>
- </BrowserRouter>
- )
-}
-
-export default App
diff --git a/paimon-web-ui/src/assets/img/empty.png b/paimon-web-ui/src/assets/img/empty.png
deleted file mode 100644
index 90e6251..0000000
Binary files a/paimon-web-ui/src/assets/img/empty.png and /dev/null differ
diff --git a/paimon-web-ui-new/src/assets/logo.svg b/paimon-web-ui/src/assets/logo.svg
similarity index 100%
rename from paimon-web-ui-new/src/assets/logo.svg
rename to paimon-web-ui/src/assets/logo.svg
diff --git a/paimon-web-ui/src/assets/logo/favicon.svg b/paimon-web-ui/src/assets/logo/favicon.svg
deleted file mode 100644
index f91bc6e..0000000
--- a/paimon-web-ui/src/assets/logo/favicon.svg
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg id="_图层_2" data-name="图层 2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 218.61 218.61">
- <defs>
- <style>
- .cls-1 {
- fill: #e7e7e7;
- }
-
- .cls-2 {
- fill: #0163e1;
- }
- </style>
- </defs>
- <g id="_图层_1-2" data-name="图层 1">
- <g>
- <path class="cls-2" d="m55.63,111.28c-3.51-10.04-11.49-18.15-21.95-21.65l-12.74-4.26h80.4c19.85-7.47,43.6-13.02,72.56-17.39l19.6-3.48,13.7-3.85C189.3,24.7,152.19,0,109.3,0,48.94,0,0,48.94,0,109.3c0,20.41,2.93,39.59,17.2,58.79,8.15-17.84,23.42-40.44,38.43-56.82Z"/>
- <path class="cls-2" d="m182.4,72.57c-60.11,22.53-114.4,58.22-158.92,104.43,20.02,25.34,51.02,41.61,85.82,41.61,60.37,0,109.3-48.94,109.3-109.3,0-16.36-3.6-31.88-10.04-45.81l-26.17,9.08Z"/>
- <path class="cls-1" d="m182.4,72.57l26.17-9.08c-.44-.95-.9-1.9-1.36-2.84l-13.7,3.85-17.66,1.02c-29.79,2.42-54.8,8.05-86.19,19.85H20.94l9,3.87c9.89,3.88,22.18,12,25.69,22.04-16.77,16.69-30.7,39.55-38.43,56.82,2.46,4.13,5.32,7.62,8.29,11.37,48.68-53.33,96.8-84.37,156.91-106.89Z"/>
- </g>
- </g>
-</svg>
\ No newline at end of file
diff --git a/paimon-web-ui/src/assets/logo/favicon_blue.svg b/paimon-web-ui/src/assets/logo/favicon_blue.svg
deleted file mode 100644
index 73c311a..0000000
--- a/paimon-web-ui/src/assets/logo/favicon_blue.svg
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg id="_图层_2" data-name="图层 2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 307.34 218.61">
- <defs>
- <style>
- .cls-1 {
- fill: #0666ff;
- }
- </style>
- </defs>
- <g id="_图层_1-2" data-name="图层 1">
- <path class="cls-1" d="m307.34,46.55l-50.19,14.1c.47.94.92,1.89,1.36,2.84l48.83-16.94Z"/>
- <path class="cls-1" d="m62.72,170.47l-12.62,25.69H0l22.99,4.72c7.55,1.55,14.28,5.8,18.93,11.96l20.16-23.6c3.71-4.16,7.5-8.23,11.36-12.24-2.97-3.76-5.69-7.71-8.15-11.84-.86,1.74-1.72,3.51-2.56,5.31Z"/>
- <path class="cls-1" d="m105.58,111.28c-3.51-10.04-11.49-18.15-21.95-21.65l-12.74-4.26h80.4c19.85-7.47,43.6-13.02,72.56-17.39l19.6-3.48,13.7-3.85C239.25,24.7,202.14,0,159.25,0,98.89,0,49.95,48.94,49.95,109.3c0,20.41,5.6,39.51,15.34,55.85,11.13-22.5,23.81-40.04,40.29-53.88Z"/>
- <path class="cls-1" d="m232.35,72.57c-60.11,22.53-114.4,58.22-158.92,104.43,20.02,25.34,51.02,41.61,85.82,41.61,60.37,0,109.3-48.94,109.3-109.3,0-16.36-3.6-31.88-10.04-45.81l-26.17,9.08Z"/>
- </g>
-</svg>
\ No newline at end of file
diff --git a/paimon-web-ui/src/assets/logo/favicon_white.svg b/paimon-web-ui/src/assets/logo/favicon_white.svg
deleted file mode 100644
index 9a30bec..0000000
--- a/paimon-web-ui/src/assets/logo/favicon_white.svg
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg id="_图层_2" data-name="图层 2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 307.34 218.61">
- <defs>
- <style>
- .cls-1 {
- fill: #f9f9f9;
- }
- </style>
- </defs>
- <g id="_图层_1-2" data-name="图层 1">
- <path class="cls-1" d="m307.34,46.55l-50.19,14.1c.47.94.92,1.89,1.36,2.84l48.83-16.94Z"/>
- <path class="cls-1" d="m62.72,170.47l-12.62,25.69H0l22.99,4.72c7.55,1.55,14.28,5.8,18.93,11.96l20.16-23.6c3.71-4.16,7.5-8.23,11.36-12.24-2.97-3.76-5.69-7.71-8.15-11.84-.86,1.74-1.72,3.51-2.56,5.31Z"/>
- <path class="cls-1" d="m105.58,111.28c-3.51-10.04-11.49-18.15-21.95-21.65l-12.74-4.26h80.4c19.85-7.47,43.6-13.02,72.56-17.39l19.6-3.48,13.7-3.85C239.25,24.7,202.14,0,159.25,0,98.89,0,49.95,48.94,49.95,109.3c0,20.41,5.6,39.51,15.34,55.85,11.13-22.5,23.81-40.04,40.29-53.88Z"/>
- <path class="cls-1" d="m232.35,72.57c-60.11,22.53-114.4,58.22-158.92,104.43,20.02,25.34,51.02,41.61,85.82,41.61,60.37,0,109.3-48.94,109.3-109.3,0-16.36-3.6-31.88-10.04-45.81l-26.17,9.08Z"/>
- </g>
-</svg>
\ No newline at end of file
diff --git a/paimon-web-ui-new/src/assets/styles/main.scss b/paimon-web-ui/src/assets/styles/main.scss
similarity index 100%
rename from paimon-web-ui-new/src/assets/styles/main.scss
rename to paimon-web-ui/src/assets/styles/main.scss
diff --git a/paimon-web-ui/src/components/Btn/ChangeI18nBtn/index.tsx b/paimon-web-ui/src/components/Btn/ChangeI18nBtn/index.tsx
deleted file mode 100644
index f599e95..0000000
--- a/paimon-web-ui/src/components/Btn/ChangeI18nBtn/index.tsx
+++ /dev/null
@@ -1,74 +0,0 @@
-/* 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 { useMemo, useState } from "react";
-import {Button, Tooltip} from "@douyinfe/semi-ui";
-import {IconLanguage} from "@douyinfe/semi-icons";
-import i18n from "i18next";
-
-
-const ChangeI18nBtn = () => {
-
- const [preBtnName, setPreBtnName] = useState<string>()
- const [changeName, setChangeName] = useState<string>()
-
- useMemo(() => {
- switch (i18n.language) {
- case 'zh-CN':
- setPreBtnName('EN')
- setChangeName('Switch to English')
- break
- case 'en':
- setPreBtnName('中文')
- setChangeName('切换中文')
- }
- return ''
- }, [])
-
- const switchEnCh = () => {
- if(preBtnName === 'EN') {
- i18n.changeLanguage('en')
- setPreBtnName('中文')
- setChangeName('切换中文')
- }
- if (preBtnName === '中文') {
- i18n.changeLanguage('zh-CN')
- setPreBtnName('EN')
- setChangeName('Switch to English')
- }
- }
-
-
- return (
- <Tooltip content={changeName}
- position='bottom'
- >
- <Button
- theme="borderless"
- icon={<IconLanguage size="extra-large" />}
- style={{
- color: 'var(--semi-color-text-2)',
- marginRight: '12px',
- }}
- aria-label={changeName}
- onClick={switchEnCh}
- >{preBtnName}</Button>
- </Tooltip>
- )
-}
-
-export default ChangeI18nBtn
diff --git a/paimon-web-ui/src/components/Btn/GithubLogoButton/index.tsx b/paimon-web-ui/src/components/Btn/GithubLogoButton/index.tsx
deleted file mode 100644
index 2b34ab2..0000000
--- a/paimon-web-ui/src/components/Btn/GithubLogoButton/index.tsx
+++ /dev/null
@@ -1,49 +0,0 @@
-/* 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 {Button, Tooltip} from "@douyinfe/semi-ui";
-import {IconGithubLogo} from "@douyinfe/semi-icons";
-import i18n from 'i18next';
-import {useMemo} from "react";
-import { useTranslation } from 'react-i18next';
-
-const GithubLogoButton = () => {
- const { t } = useTranslation();
- const handleClick = () => {
- window.open('https://github.com/apache/incubator-paimon-webui', '_blank');
- }
-
- const tooltipContent = useMemo(() => {
- return t('component.btn-github-icon');
- }, [i18n.language]);
-
- return (
- <Tooltip content={tooltipContent} position='bottom'>
- <Button
- theme="borderless"
- icon={<IconGithubLogo size="extra-large"/>}
- style={{
- color: 'var(--semi-color-text-2)',
- marginRight: '12px',
- }}
- onClick={handleClick}
- />
- </Tooltip>
- )
-}
-
-export default GithubLogoButton;
\ No newline at end of file
diff --git a/paimon-web-ui/src/components/Btn/ThemeSwitcherBtn/index.tsx b/paimon-web-ui/src/components/Btn/ThemeSwitcherBtn/index.tsx
deleted file mode 100644
index a298b6e..0000000
--- a/paimon-web-ui/src/components/Btn/ThemeSwitcherBtn/index.tsx
+++ /dev/null
@@ -1,51 +0,0 @@
-/* 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 { useMemo } from "react";
-import {Button, Tooltip} from "@douyinfe/semi-ui";
-import {IconMoon, IconSun} from "@douyinfe/semi-icons";
-import useThemeSwitcher from '@utils/mode.ts';
-import i18n from 'i18next';
-import { useTranslation } from 'react-i18next';
-
-const ThemeSwitcherBtn = () => {
- const { t } = useTranslation();
- const {dark, switchMode } = useThemeSwitcher();
-
- const [tooltipContent, icon] = useMemo(() => {
- const tooltipContent = dark ? t('component.btn-switch-to-light-mode') : t('component.btn-switch-to-dark-mode');
- const icon = dark ? <IconSun size={"extra-large"}/> : <IconMoon size={"extra-large"}/>;
- return [tooltipContent, icon];
- }, [dark, i18n.language]);
-
- return (
- <Tooltip content={tooltipContent} position='bottom'>
- <Button
- theme="borderless"
- icon={icon}
- style={{
- color: 'var(--semi-color-text-2)',
- marginRight: '12px',
- }}
- aria-label={tooltipContent}
- onClick={switchMode}
- />
- </Tooltip>
- )
-}
-
-export default ThemeSwitcherBtn;
\ No newline at end of file
diff --git a/paimon-web-ui/src/components/Dropdown/CatalogDropdown.tsx b/paimon-web-ui/src/components/Dropdown/CatalogDropdown.tsx
deleted file mode 100644
index edeaf72..0000000
--- a/paimon-web-ui/src/components/Dropdown/CatalogDropdown.tsx
+++ /dev/null
@@ -1,76 +0,0 @@
-/* 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 {Select} from '@douyinfe/semi-ui';
-import React from "react";
-import {CataLog} from "@pages/Playground/components/TabMenuSidebar/components/SiderTab";
-import {IconRefresh} from "@douyinfe/semi-icons";
-import { useTranslation } from 'react-i18next';
-
-/**
- * 下拉菜单组件props
- */
-type CatalogDropdownProps = {
- catalogList: CataLog[];
- catalogChange: (catalogId: number) => void;
- reLoadCatalog: boolean;
- reloadCatalogListCallBack: () => void;
-}
-
-const CatalogDropdown: React.FC<CatalogDropdownProps> = (props) => {
-
- const { t } = useTranslation()
-
- const {catalogList, catalogChange, reLoadCatalog,reloadCatalogListCallBack} = props;
-
-
- /**
- * 触发下拉菜单选中的事件 传递给父组件
- * @param
- */
- const handleCatalogChange = (value: any) => {
- catalogChange(value);
- }
-
- /**
- * 渲染下拉菜单
- * @returns {any}
- */
- const renderCatalogList = () => {
- return catalogList.map((catalog: CataLog) => {
- return {
- label: catalog.name,
- value: catalog.id,
- key: catalog.id,
- }
- })
- }
-
-
- return<>
- <Select
- suffix={<IconRefresh onClick={reloadCatalogListCallBack} title={"Refresh"} spin={reLoadCatalog}/>}
- loading={reLoadCatalog} onChange={handleCatalogChange}
- placeholder={t('playground.selectCatalog')}
- optionList={renderCatalogList()}
- showClear
- style={{display: "flex", flexGrow: 1}}
- />
- </>
-}
-
-export default CatalogDropdown;
diff --git a/paimon-web-ui/src/components/Editor/index.tsx b/paimon-web-ui/src/components/Editor/index.tsx
deleted file mode 100644
index 9fcf1c5..0000000
--- a/paimon-web-ui/src/components/Editor/index.tsx
+++ /dev/null
@@ -1,56 +0,0 @@
-/* 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 {Editor as MonacoEditor} from "@monaco-editor/react";
-
-import React from "react";
-import useThemeSwitcher from "@utils/mode.ts";
-
-export type EditorProps = {
- value?: string;
- theme?: string;
-}
-const Editor:React.FC<EditorProps> = (props) => {
- const {dark} = useThemeSwitcher();
-
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- // @ts-ignore
- const handleEditorChange = (value, event) => {
- //console.log(value);
- };
-
- const editorOptions = {
- selectOnLineNumbers: true,
- };
-
- return (
- <div>
- <MonacoEditor
- value={props.value}
- width="auto"
- height="500px"
- language="java"
- theme={dark ? 'vs-dark' : 'light'}
- options={editorOptions}
- onChange={handleEditorChange}
- />
- </div>
- );
-};
-
-export default Editor;
-
diff --git a/paimon-web-ui/src/components/IconMoreDropdown/CatalogIconMoreDropdown/index.tsx b/paimon-web-ui/src/components/IconMoreDropdown/CatalogIconMoreDropdown/index.tsx
deleted file mode 100644
index bf3c504..0000000
--- a/paimon-web-ui/src/components/IconMoreDropdown/CatalogIconMoreDropdown/index.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-/* 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 { IconMore, IconDelete } from "@douyinfe/semi-icons";
-import { Dropdown } from '@douyinfe/semi-ui';
-import { useTranslation } from 'react-i18next';
-
-const CatalogIconMoreDropdown = () => {
- const { t } = useTranslation();
-
- return(
- <Dropdown
- trigger={'click'}
- position={'bottomLeft'}
- render={
- <Dropdown.Menu>
- <Dropdown.Item><IconDelete/> {t('component.icon-more-dropdown-delete')}</Dropdown.Item>
- </Dropdown.Menu>
- }
- >
- <IconMore onClick={(e) => e.stopPropagation()}/>
- </Dropdown>
- );
-}
-
-export default CatalogIconMoreDropdown;
\ No newline at end of file
diff --git a/paimon-web-ui/src/components/IconMoreDropdown/DatabaseIconMoreDropdown/index.tsx b/paimon-web-ui/src/components/IconMoreDropdown/DatabaseIconMoreDropdown/index.tsx
deleted file mode 100644
index bf3c504..0000000
--- a/paimon-web-ui/src/components/IconMoreDropdown/DatabaseIconMoreDropdown/index.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-/* 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 { IconMore, IconDelete } from "@douyinfe/semi-icons";
-import { Dropdown } from '@douyinfe/semi-ui';
-import { useTranslation } from 'react-i18next';
-
-const CatalogIconMoreDropdown = () => {
- const { t } = useTranslation();
-
- return(
- <Dropdown
- trigger={'click'}
- position={'bottomLeft'}
- render={
- <Dropdown.Menu>
- <Dropdown.Item><IconDelete/> {t('component.icon-more-dropdown-delete')}</Dropdown.Item>
- </Dropdown.Menu>
- }
- >
- <IconMore onClick={(e) => e.stopPropagation()}/>
- </Dropdown>
- );
-}
-
-export default CatalogIconMoreDropdown;
\ No newline at end of file
diff --git a/paimon-web-ui/src/components/IconMoreDropdown/TableIconMoreDropdown/index.tsx b/paimon-web-ui/src/components/IconMoreDropdown/TableIconMoreDropdown/index.tsx
deleted file mode 100644
index 81b504f..0000000
--- a/paimon-web-ui/src/components/IconMoreDropdown/TableIconMoreDropdown/index.tsx
+++ /dev/null
@@ -1,41 +0,0 @@
-/* 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 { IconMore, IconDelete, IconEdit } from "@douyinfe/semi-icons";
-import { Dropdown } from '@douyinfe/semi-ui';
-import { useTranslation } from 'react-i18next';
-
-const TableIconMoreDropdown = () => {
- const { t } = useTranslation();
-
- return(
- <Dropdown
- trigger={'click'}
- position={'bottomLeft'}
- render={
- <Dropdown.Menu>
- <Dropdown.Item><IconEdit/> {t('component.icon-more-dropdown-rename')}</Dropdown.Item>
- <Dropdown.Item><IconDelete/> {t('component.icon-more-dropdown-delete')}</Dropdown.Item>
- </Dropdown.Menu>
- }
- >
- <IconMore onClick={(e) => e.stopPropagation()}/>
- </Dropdown>
- );
-}
-
-export default TableIconMoreDropdown;
\ No newline at end of file
diff --git a/paimon-web-ui/src/components/Search/index.tsx b/paimon-web-ui/src/components/Search/index.tsx
deleted file mode 100644
index 956ce19..0000000
--- a/paimon-web-ui/src/components/Search/index.tsx
+++ /dev/null
@@ -1,29 +0,0 @@
-/* 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 { Input } from '@douyinfe/semi-ui';
-import { IconFilter } from '@douyinfe/semi-icons';
-import { useTranslation } from 'react-i18next';
-
-const Search = () => {
- const { t } = useTranslation()
- return(
- <Input placeholder={t('playground.filter')} suffix={<IconFilter />}></Input>
- )
-}
-
-export default Search;
diff --git a/paimon-web-ui-new/src/components/context-menu/index.module.scss b/paimon-web-ui/src/components/context-menu/index.module.scss
similarity index 100%
rename from paimon-web-ui-new/src/components/context-menu/index.module.scss
rename to paimon-web-ui/src/components/context-menu/index.module.scss
diff --git a/paimon-web-ui-new/src/components/context-menu/index.tsx b/paimon-web-ui/src/components/context-menu/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/components/context-menu/index.tsx
rename to paimon-web-ui/src/components/context-menu/index.tsx
diff --git a/paimon-web-ui-new/src/components/dynamic-form/fields/checkbox.ts b/paimon-web-ui/src/components/dynamic-form/fields/checkbox.ts
similarity index 100%
rename from paimon-web-ui-new/src/components/dynamic-form/fields/checkbox.ts
rename to paimon-web-ui/src/components/dynamic-form/fields/checkbox.ts
diff --git a/paimon-web-ui-new/src/components/dynamic-form/fields/get-field.ts b/paimon-web-ui/src/components/dynamic-form/fields/get-field.ts
similarity index 100%
rename from paimon-web-ui-new/src/components/dynamic-form/fields/get-field.ts
rename to paimon-web-ui/src/components/dynamic-form/fields/get-field.ts
diff --git a/paimon-web-ui-new/src/components/dynamic-form/fields/index.ts b/paimon-web-ui/src/components/dynamic-form/fields/index.ts
similarity index 100%
rename from paimon-web-ui-new/src/components/dynamic-form/fields/index.ts
rename to paimon-web-ui/src/components/dynamic-form/fields/index.ts
diff --git a/paimon-web-ui-new/src/components/dynamic-form/fields/input.ts b/paimon-web-ui/src/components/dynamic-form/fields/input.ts
similarity index 100%
rename from paimon-web-ui-new/src/components/dynamic-form/fields/input.ts
rename to paimon-web-ui/src/components/dynamic-form/fields/input.ts
diff --git a/paimon-web-ui-new/src/components/dynamic-form/fields/radio.ts b/paimon-web-ui/src/components/dynamic-form/fields/radio.ts
similarity index 100%
rename from paimon-web-ui-new/src/components/dynamic-form/fields/radio.ts
rename to paimon-web-ui/src/components/dynamic-form/fields/radio.ts
diff --git a/paimon-web-ui-new/src/components/dynamic-form/fields/select.ts b/paimon-web-ui/src/components/dynamic-form/fields/select.ts
similarity index 100%
rename from paimon-web-ui-new/src/components/dynamic-form/fields/select.ts
rename to paimon-web-ui/src/components/dynamic-form/fields/select.ts
diff --git a/paimon-web-ui-new/src/components/dynamic-form/fields/switch.ts b/paimon-web-ui/src/components/dynamic-form/fields/switch.ts
similarity index 100%
rename from paimon-web-ui-new/src/components/dynamic-form/fields/switch.ts
rename to paimon-web-ui/src/components/dynamic-form/fields/switch.ts
diff --git a/paimon-web-ui-new/src/components/dynamic-form/get-elements-by-json.ts b/paimon-web-ui/src/components/dynamic-form/get-elements-by-json.ts
similarity index 100%
rename from paimon-web-ui-new/src/components/dynamic-form/get-elements-by-json.ts
rename to paimon-web-ui/src/components/dynamic-form/get-elements-by-json.ts
diff --git a/paimon-web-ui-new/src/components/dynamic-form/index.tsx b/paimon-web-ui/src/components/dynamic-form/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/components/dynamic-form/index.tsx
rename to paimon-web-ui/src/components/dynamic-form/index.tsx
diff --git a/paimon-web-ui-new/src/components/dynamic-form/types.ts b/paimon-web-ui/src/components/dynamic-form/types.ts
similarity index 100%
rename from paimon-web-ui-new/src/components/dynamic-form/types.ts
rename to paimon-web-ui/src/components/dynamic-form/types.ts
diff --git a/paimon-web-ui-new/src/components/dynamic-form/use-form.ts b/paimon-web-ui/src/components/dynamic-form/use-form.ts
similarity index 100%
rename from paimon-web-ui-new/src/components/dynamic-form/use-form.ts
rename to paimon-web-ui/src/components/dynamic-form/use-form.ts
diff --git a/paimon-web-ui-new/src/components/modal/index.tsx b/paimon-web-ui/src/components/modal/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/components/modal/index.tsx
rename to paimon-web-ui/src/components/modal/index.tsx
diff --git a/paimon-web-ui-new/src/components/modal/use-task.ts b/paimon-web-ui/src/components/modal/use-task.ts
similarity index 100%
rename from paimon-web-ui-new/src/components/modal/use-task.ts
rename to paimon-web-ui/src/components/modal/use-task.ts
diff --git a/paimon-web-ui-new/src/components/monaco-editor/index.tsx b/paimon-web-ui/src/components/monaco-editor/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/components/monaco-editor/index.tsx
rename to paimon-web-ui/src/components/monaco-editor/index.tsx
diff --git a/paimon-web-ui-new/src/components/monaco-editor/type.ts b/paimon-web-ui/src/components/monaco-editor/type.ts
similarity index 100%
rename from paimon-web-ui-new/src/components/monaco-editor/type.ts
rename to paimon-web-ui/src/components/monaco-editor/type.ts
diff --git a/paimon-web-ui-new/src/components/table-action/index.tsx b/paimon-web-ui/src/components/table-action/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/components/table-action/index.tsx
rename to paimon-web-ui/src/components/table-action/index.tsx
diff --git a/paimon-web-ui-new/src/composables/locales.ts b/paimon-web-ui/src/composables/locales.ts
similarity index 100%
rename from paimon-web-ui-new/src/composables/locales.ts
rename to paimon-web-ui/src/composables/locales.ts
diff --git a/paimon-web-ui-new/src/config/index.ts b/paimon-web-ui/src/config/index.ts
similarity index 100%
rename from paimon-web-ui-new/src/config/index.ts
rename to paimon-web-ui/src/config/index.ts
diff --git a/paimon-web-ui/src/config/menu.tsx b/paimon-web-ui/src/config/menu.tsx
deleted file mode 100644
index 9025e72..0000000
--- a/paimon-web-ui/src/config/menu.tsx
+++ /dev/null
@@ -1,55 +0,0 @@
-/* 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. */
-
-export interface MenuItem {
- itemKey: string
- text: string
- name: string
- icon?: React.ReactNode
- path: string
- items?: MenuItem[]
- component?: React.ComponentType<any>
-}
-
-const MENU_CONFIG: MenuItem[] = [
- {
- itemKey: '1',
- text: 'Playground',
- name: 'playground',
- path: '/playground'
- },
- {
- itemKey: '2',
- text: 'Metadata',
- name: 'metadata',
- path: '/metadata'
- },
- {
- itemKey: '3',
- text: 'CDC Ingestion',
- name: 'cdcingestion',
- path: '/system'
- },
- {
- itemKey: '4',
- text: 'System',
- name: 'system',
- path: '/system'
- }
-]
-
-export default MENU_CONFIG;
diff --git a/paimon-web-ui-new/src/form-lib/cdc/use-cdc-list.ts b/paimon-web-ui/src/form-lib/cdc/use-cdc-list.ts
similarity index 100%
rename from paimon-web-ui-new/src/form-lib/cdc/use-cdc-list.ts
rename to paimon-web-ui/src/form-lib/cdc/use-cdc-list.ts
diff --git a/paimon-web-ui-new/src/form-lib/cdc/use-mysql.ts b/paimon-web-ui/src/form-lib/cdc/use-mysql.ts
similarity index 100%
rename from paimon-web-ui-new/src/form-lib/cdc/use-mysql.ts
rename to paimon-web-ui/src/form-lib/cdc/use-mysql.ts
diff --git a/paimon-web-ui-new/src/form-lib/cdc/use-paimon.ts b/paimon-web-ui/src/form-lib/cdc/use-paimon.ts
similarity index 100%
rename from paimon-web-ui-new/src/form-lib/cdc/use-paimon.ts
rename to paimon-web-ui/src/form-lib/cdc/use-paimon.ts
diff --git a/paimon-web-ui-new/src/form-lib/index.ts b/paimon-web-ui/src/form-lib/index.ts
similarity index 100%
rename from paimon-web-ui-new/src/form-lib/index.ts
rename to paimon-web-ui/src/form-lib/index.ts
diff --git a/paimon-web-ui-new/src/form-lib/metadata/use-database.ts b/paimon-web-ui/src/form-lib/metadata/use-database.ts
similarity index 100%
rename from paimon-web-ui-new/src/form-lib/metadata/use-database.ts
rename to paimon-web-ui/src/form-lib/metadata/use-database.ts
diff --git a/paimon-web-ui-new/src/form-lib/metadata/use-options.ts b/paimon-web-ui/src/form-lib/metadata/use-options.ts
similarity index 100%
rename from paimon-web-ui-new/src/form-lib/metadata/use-options.ts
rename to paimon-web-ui/src/form-lib/metadata/use-options.ts
diff --git a/paimon-web-ui/src/hooks/localStorage/index.tsx b/paimon-web-ui/src/hooks/localStorage/index.tsx
deleted file mode 100644
index 3725c1e..0000000
--- a/paimon-web-ui/src/hooks/localStorage/index.tsx
+++ /dev/null
@@ -1,49 +0,0 @@
-/* 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 {useCallback, useState} from "react";
-
-export function useLocalStorage(key: string, initialValue: any) {
- const readValue = useCallback(() => {
- try {
- const item = window.localStorage.getItem(key);
- return item ? JSON.parse(item) : initialValue;
- } catch (error) {
- console.warn(error);
- return initialValue;
- }
- }, [key, initialValue]);
-
- const [localState, setLocalState] = useState(readValue);
-
- const handleSetState = useCallback(
- (value: any) => {
- try {
- const nextState =
- typeof value === "function" ? value(localState) : value;
- window.localStorage.setItem(key, JSON.stringify(nextState));
- setLocalState(nextState);
- window.dispatchEvent(new Event("local-storage-change"));
- } catch (error) {
- console.warn(error);
- }
- },
- [key, localState]
- );
-
- return [localState, handleSetState];
-}
diff --git a/paimon-web-ui/src/index.less b/paimon-web-ui/src/index.less
deleted file mode 100644
index 1b8d7e4..0000000
--- a/paimon-web-ui/src/index.less
+++ /dev/null
@@ -1,22 +0,0 @@
-/* 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. */
-
-body {
- color: var(--semi-color-text-0);
- background-color: var(--semi-color-bg-0);
- height: 100%;
-}
diff --git a/paimon-web-ui-new/src/layouts/content/components/menubar/index.tsx b/paimon-web-ui/src/layouts/content/components/menubar/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/layouts/content/components/menubar/index.tsx
rename to paimon-web-ui/src/layouts/content/components/menubar/index.tsx
diff --git a/paimon-web-ui-new/src/layouts/content/components/sidebar/index.tsx b/paimon-web-ui/src/layouts/content/components/sidebar/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/layouts/content/components/sidebar/index.tsx
rename to paimon-web-ui/src/layouts/content/components/sidebar/index.tsx
diff --git a/paimon-web-ui-new/src/layouts/content/components/toolbar/index.tsx b/paimon-web-ui/src/layouts/content/components/toolbar/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/layouts/content/components/toolbar/index.tsx
rename to paimon-web-ui/src/layouts/content/components/toolbar/index.tsx
diff --git a/paimon-web-ui-new/src/layouts/content/components/topbar/index.module.scss b/paimon-web-ui/src/layouts/content/components/topbar/index.module.scss
similarity index 100%
rename from paimon-web-ui-new/src/layouts/content/components/topbar/index.module.scss
rename to paimon-web-ui/src/layouts/content/components/topbar/index.module.scss
diff --git a/paimon-web-ui-new/src/layouts/content/components/topbar/index.tsx b/paimon-web-ui/src/layouts/content/components/topbar/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/layouts/content/components/topbar/index.tsx
rename to paimon-web-ui/src/layouts/content/components/topbar/index.tsx
diff --git a/paimon-web-ui-new/src/layouts/content/index.module.scss b/paimon-web-ui/src/layouts/content/index.module.scss
similarity index 100%
rename from paimon-web-ui-new/src/layouts/content/index.module.scss
rename to paimon-web-ui/src/layouts/content/index.module.scss
diff --git a/paimon-web-ui-new/src/layouts/content/index.tsx b/paimon-web-ui/src/layouts/content/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/layouts/content/index.tsx
rename to paimon-web-ui/src/layouts/content/index.tsx
diff --git a/paimon-web-ui-new/src/layouts/content/use-data.ts b/paimon-web-ui/src/layouts/content/use-data.ts
similarity index 100%
rename from paimon-web-ui-new/src/layouts/content/use-data.ts
rename to paimon-web-ui/src/layouts/content/use-data.ts
diff --git a/paimon-web-ui-new/src/locales/en/index.ts b/paimon-web-ui/src/locales/en/index.ts
similarity index 100%
rename from paimon-web-ui-new/src/locales/en/index.ts
rename to paimon-web-ui/src/locales/en/index.ts
diff --git a/paimon-web-ui-new/src/locales/en/modules/cdc.ts b/paimon-web-ui/src/locales/en/modules/cdc.ts
similarity index 100%
rename from paimon-web-ui-new/src/locales/en/modules/cdc.ts
rename to paimon-web-ui/src/locales/en/modules/cdc.ts
diff --git a/paimon-web-ui-new/src/locales/en/modules/common.ts b/paimon-web-ui/src/locales/en/modules/common.ts
similarity index 100%
rename from paimon-web-ui-new/src/locales/en/modules/common.ts
rename to paimon-web-ui/src/locales/en/modules/common.ts
diff --git a/paimon-web-ui-new/src/locales/en/modules/job.ts b/paimon-web-ui/src/locales/en/modules/job.ts
similarity index 100%
rename from paimon-web-ui-new/src/locales/en/modules/job.ts
rename to paimon-web-ui/src/locales/en/modules/job.ts
diff --git a/paimon-web-ui-new/src/locales/en/modules/layout.ts b/paimon-web-ui/src/locales/en/modules/layout.ts
similarity index 100%
rename from paimon-web-ui-new/src/locales/en/modules/layout.ts
rename to paimon-web-ui/src/locales/en/modules/layout.ts
diff --git a/paimon-web-ui-new/src/locales/en/modules/login.ts b/paimon-web-ui/src/locales/en/modules/login.ts
similarity index 100%
rename from paimon-web-ui-new/src/locales/en/modules/login.ts
rename to paimon-web-ui/src/locales/en/modules/login.ts
diff --git a/paimon-web-ui-new/src/locales/en/modules/metadata.ts b/paimon-web-ui/src/locales/en/modules/metadata.ts
similarity index 100%
rename from paimon-web-ui-new/src/locales/en/modules/metadata.ts
rename to paimon-web-ui/src/locales/en/modules/metadata.ts
diff --git a/paimon-web-ui-new/src/locales/en/modules/playground.ts b/paimon-web-ui/src/locales/en/modules/playground.ts
similarity index 100%
rename from paimon-web-ui-new/src/locales/en/modules/playground.ts
rename to paimon-web-ui/src/locales/en/modules/playground.ts
diff --git a/paimon-web-ui-new/src/locales/en/modules/system.ts b/paimon-web-ui/src/locales/en/modules/system.ts
similarity index 100%
rename from paimon-web-ui-new/src/locales/en/modules/system.ts
rename to paimon-web-ui/src/locales/en/modules/system.ts
diff --git a/paimon-web-ui/src/locales/en/translation.json b/paimon-web-ui/src/locales/en/translation.json
deleted file mode 100644
index 1ac2217..0000000
--- a/paimon-web-ui/src/locales/en/translation.json
+++ /dev/null
@@ -1,54 +0,0 @@
-{
- "common": {
- "filter": "Filter"
- },
- "header": {
- "playground": "Playground",
- "metadata": "Metadata",
- "cdcingestion": "CDC Ingestion",
- "system": "System"
- },
- "playground": {
- "selectCatalog": "Select Catalog"
- },
- "metadata": {
- "catalog": "Catalog",
- "tableInfo": "TableInfo",
- "details": "Details",
- "files": "Files",
- "add-database": "Add Database",
- "add-table": "Add Table",
- "create-database": "Create Database",
- "create-table": "Create Table",
- "submit": "Submit",
- "cancel": "Cancel",
- "message": "This item is required.",
- "database-name": "Database Name",
- "table-name": "Table Name",
- "description": "Description",
- "text-area-description": "Please Enter",
- "create-catalog": "Create Catalog",
- "create-database-success": "Database created successfully!",
- "create-database-failed": "Failed to create database:",
- "create-table-success": "Table created successfully!",
- "create-table-failed": "Failed to create table:",
- "form-group-basic-information": "Basic Information",
- "form-group-add-column-ordinary": "Common Column",
- "form-group-add-column-partition": "Partition Column",
- "add-column-field": "Field",
- "add-column-default-value": "Default Value",
- "add-column-type": "Type",
- "add-column-primary-key": "Primary Key",
- "add-column-comment": "Comment",
- "form-group-add-config": "Add Options",
- "add-config-key": "Key",
- "add-config-value": "Value"
- },
- "component": {
- "icon-more-dropdown-rename": "Rename",
- "icon-more-dropdown-delete": "Delete",
- "btn-switch-to-light-mode": "Switch to Light Mode",
- "btn-switch-to-dark-mode": "Switch to Dark Mode",
- "btn-github-icon": "Visit GitHub repository"
- }
-}
diff --git a/paimon-web-ui/src/locales/i18n.ts b/paimon-web-ui/src/locales/i18n.ts
deleted file mode 100644
index eeacd7b..0000000
--- a/paimon-web-ui/src/locales/i18n.ts
+++ /dev/null
@@ -1,63 +0,0 @@
-/* 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 i18n from 'i18next';
-import { initReactI18next } from 'react-i18next';
-
-import Backend from 'i18next-http-backend';
-import LanguageDetector from 'i18next-browser-languagedetector';
-import en from '@src/locales/en/translation.json';
-import zh from '@src/locales/zh-CN/translation.json';
-
-// don't want to use this?
-// have a look at the Quick start guide
-// for passing in lng and translations on init
-
-const resources = {
- "en": {
- translation: en
- },
- "zh-CN": {
- translation: zh
- }
-}
-
-i18n
- // load translation using http -> see /public/locales (i.e. https://github.com/i18next/react-i18next/tree/master/example/react/public/locales)
- // learn more: https://github.com/i18next/i18next-http-backend
- // want your translations to be loaded from a professional CDN? => https://github.com/locize/react-tutorial#step-2---use-the-locize-cdn
- .use(Backend)
- // detect user language
- // learn more: https://github.com/i18next/i18next-browser-languageDetector
- .use(LanguageDetector)
- // pass the i18n instance to react-i18next.
- .use(initReactI18next)
- // init i18next
- // for all options read: https://www.i18next.com/overview/configuration-options
- .init({
- fallbackLng: 'zh-CN',
- debug: true,
- interpolation: {
- escapeValue: false, // not needed for react as it escapes by default
- },
- resources
- });
-
-
-export default i18n;
-
-
diff --git a/paimon-web-ui-new/src/locales/index.ts b/paimon-web-ui/src/locales/index.ts
similarity index 100%
rename from paimon-web-ui-new/src/locales/index.ts
rename to paimon-web-ui/src/locales/index.ts
diff --git a/paimon-web-ui/src/locales/zh-CN/translation.json b/paimon-web-ui/src/locales/zh-CN/translation.json
deleted file mode 100644
index 8d5ecc3..0000000
--- a/paimon-web-ui/src/locales/zh-CN/translation.json
+++ /dev/null
@@ -1,54 +0,0 @@
-{
- "common": {
- "filter": "搜索"
- },
- "header": {
- "playground": "查询控制台",
- "metadata": "元数据管理",
- "cdcingestion": "CDC 集成",
- "system": "系统管理"
- },
- "playground": {
- "selectCatalog": "选择Catalog"
- },
- "metadata": {
- "catalog": "Catalog目录",
- "tableInfo": "基本信息",
- "details": "详细信息",
- "files": "数据文件",
- "add-database": "添加数据库",
- "add-table": "添加数据表",
- "create-database": "创建 Database",
- "create-table": "创建 Table",
- "submit": "确定",
- "cancel": "取消",
- "message": "该项为必填项!",
- "database-name": "名称",
- "table-name": "名称",
- "description": "描述",
- "text-area-description": "请输入",
- "create-catalog": "创建Catalog",
- "create-database-success": "创建 Database 成功!",
- "create-database-failed": "创建 Database 失败:",
- "create-table-success": "创建 Table 成功!",
- "create-table-failed": "创建 Table 失败:",
- "form-group-basic-information": "基本信息",
- "form-group-add-column-ordinary": "普通列",
- "form-group-add-column-partition": "分区列",
- "add-column-field": "字段",
- "add-column-default-value": "默认值",
- "add-column-type": "类型",
- "add-column-primary-key": "主键",
- "add-column-comment": "备注",
- "form-group-add-config": "添加选项",
- "add-config-key": "键",
- "add-config-value": "值"
- },
- "component": {
- "icon-more-dropdown-rename": "重命名",
- "icon-more-dropdown-delete": "删除",
- "btn-switch-to-light-mode": "切换到亮色模式",
- "btn-switch-to-dark-mode": "切换到暗色模式",
- "btn-github-icon": "访问 GitHub 仓库"
- }
-}
diff --git a/paimon-web-ui-new/src/locales/zh/index.ts b/paimon-web-ui/src/locales/zh/index.ts
similarity index 100%
rename from paimon-web-ui-new/src/locales/zh/index.ts
rename to paimon-web-ui/src/locales/zh/index.ts
diff --git a/paimon-web-ui-new/src/locales/zh/modules/cdc.ts b/paimon-web-ui/src/locales/zh/modules/cdc.ts
similarity index 100%
rename from paimon-web-ui-new/src/locales/zh/modules/cdc.ts
rename to paimon-web-ui/src/locales/zh/modules/cdc.ts
diff --git a/paimon-web-ui-new/src/locales/zh/modules/common.ts b/paimon-web-ui/src/locales/zh/modules/common.ts
similarity index 100%
rename from paimon-web-ui-new/src/locales/zh/modules/common.ts
rename to paimon-web-ui/src/locales/zh/modules/common.ts
diff --git a/paimon-web-ui-new/src/locales/zh/modules/job.ts b/paimon-web-ui/src/locales/zh/modules/job.ts
similarity index 100%
rename from paimon-web-ui-new/src/locales/zh/modules/job.ts
rename to paimon-web-ui/src/locales/zh/modules/job.ts
diff --git a/paimon-web-ui-new/src/locales/zh/modules/layout.ts b/paimon-web-ui/src/locales/zh/modules/layout.ts
similarity index 100%
rename from paimon-web-ui-new/src/locales/zh/modules/layout.ts
rename to paimon-web-ui/src/locales/zh/modules/layout.ts
diff --git a/paimon-web-ui-new/src/locales/zh/modules/login.ts b/paimon-web-ui/src/locales/zh/modules/login.ts
similarity index 100%
rename from paimon-web-ui-new/src/locales/zh/modules/login.ts
rename to paimon-web-ui/src/locales/zh/modules/login.ts
diff --git a/paimon-web-ui-new/src/locales/zh/modules/metadata.ts b/paimon-web-ui/src/locales/zh/modules/metadata.ts
similarity index 100%
rename from paimon-web-ui-new/src/locales/zh/modules/metadata.ts
rename to paimon-web-ui/src/locales/zh/modules/metadata.ts
diff --git a/paimon-web-ui-new/src/locales/zh/modules/playground.ts b/paimon-web-ui/src/locales/zh/modules/playground.ts
similarity index 100%
rename from paimon-web-ui-new/src/locales/zh/modules/playground.ts
rename to paimon-web-ui/src/locales/zh/modules/playground.ts
diff --git a/paimon-web-ui-new/src/locales/zh/modules/system.ts b/paimon-web-ui/src/locales/zh/modules/system.ts
similarity index 100%
rename from paimon-web-ui-new/src/locales/zh/modules/system.ts
rename to paimon-web-ui/src/locales/zh/modules/system.ts
diff --git a/paimon-web-ui-new/src/main.ts b/paimon-web-ui/src/main.ts
similarity index 100%
rename from paimon-web-ui-new/src/main.ts
rename to paimon-web-ui/src/main.ts
diff --git a/paimon-web-ui/src/main.tsx b/paimon-web-ui/src/main.tsx
deleted file mode 100644
index 8fbb2ef..0000000
--- a/paimon-web-ui/src/main.tsx
+++ /dev/null
@@ -1,29 +0,0 @@
-/* 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 React from 'react'
-import ReactDOM from 'react-dom/client'
-import App from './app/App.tsx'
-import './index.less'
-
-import '@src/locales/i18n.ts'
-
-ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
- // <React.StrictMode>
- <App />
- // </React.StrictMode>,
-)
diff --git a/paimon-web-ui/src/pages/Abnormal/Dev/index.tsx b/paimon-web-ui/src/pages/Abnormal/Dev/index.tsx
deleted file mode 100644
index 1b7b57d..0000000
--- a/paimon-web-ui/src/pages/Abnormal/Dev/index.tsx
+++ /dev/null
@@ -1,30 +0,0 @@
-/* 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 { Empty } from '@douyinfe/semi-ui';
-import { IllustrationConstruction, IllustrationConstructionDark } from '@douyinfe/semi-illustrations';
-
-const DevStatus = () => (
- <Empty
- image={<IllustrationConstruction style={{ width: 150, height: 150 }} />}
- darkModeImage={<IllustrationConstructionDark style={{ width: 150, height: 150 }} />}
- title={'功能开发中'}
- description="当前功能暂未开放,敬请期待。"
- />
-);
-
-export default DevStatus;
diff --git a/paimon-web-ui/src/pages/Layout/Header/header.module.less b/paimon-web-ui/src/pages/Layout/Header/header.module.less
deleted file mode 100644
index c3449e3..0000000
--- a/paimon-web-ui/src/pages/Layout/Header/header.module.less
+++ /dev/null
@@ -1,28 +0,0 @@
-/* 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. */
-
-.selected-nav-item {
- color: rgba(var(--semi-blue-5), 1) !important;
-}
-
-.header {
- width: 96px;
- height: 36px;
- font-size: 36px;
- margin-left: -45px;
- margin-right: -20px;
-}
\ No newline at end of file
diff --git a/paimon-web-ui/src/pages/Layout/Header/index.tsx b/paimon-web-ui/src/pages/Layout/Header/index.tsx
deleted file mode 100644
index 8b9aceb..0000000
--- a/paimon-web-ui/src/pages/Layout/Header/index.tsx
+++ /dev/null
@@ -1,125 +0,0 @@
-/* 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 {Avatar, Layout, Nav} from '@douyinfe/semi-ui';
-import paimonLogo from '@src/assets/logo/favicon_blue.svg';
-import {useLocation, useNavigate} from "react-router";
-import {useMemo, useState} from "react";
-import menuList from "@config/menu.tsx";
-import ChangeI18nBtn from "@components/Btn/ChangeI18nBtn";
-import ThemeSwitcherBtn from "@components/Btn/ThemeSwitcherBtn";
-import {useTranslation} from "react-i18next";
-import {Link} from "react-router-dom";
-import GithubLogoButton from "@components/Btn/GithubLogoButton";
-import styles from "./header.module.less";
-
-const { Header } = Layout
-
-const HeaderRoot = ()=> {
- const navigate = useNavigate()
-
- const [openKeys, setOpenKeys] = useState<string[]>([])
- const location = useLocation();
-
- const initialKey = useMemo(() => {
- const path = location.pathname;
- const matchedItem = menuList.find(item => item.path === path);
- return matchedItem ? matchedItem.name : menuList[0]?.name;
- }, [location, menuList]);
-
- const [selectedKeys, setSelectedKeys] = useState<string[]>([initialKey]);
-
- const navList = useMemo(() => {
- return menuList.map((e) => {
- return {
- ...e,
- items: e?.items
- ? e.items.map((m) => {
- return {
- ...m
- }
- })
- : []
- }
- })
- }, [menuList])
-
- const onSelect = (data: any) => {
- setSelectedKeys([...data.selectedKeys])
- navigate(data.selectedItems[0].path as string)
- }
-
- const onOpenChange = (data: any) => {
- setOpenKeys([...data.openKeys])
- }
-
- const { t } = useTranslation()
-
- return(
- <Header style={{ backgroundColor: 'var(--semi-color-bg-1)'}}>
- <div>
- <Nav
- header={{
- logo: <img src={ paimonLogo } alt="Apache Paimon"
- style={{ width: '96px', height: '36px', fontSize: 36, marginLeft: '-45px', marginRight: '-20px'}}/>,
- text: 'Apache Paimon'
- }}
- mode={"horizontal"}
- defaultSelectedKeys={['Home']}
- openKeys={openKeys}
- selectedKeys={selectedKeys}
- onSelect={onSelect}
- onOpenChange={onOpenChange}
- // items={navList}
- footer={
- <div>
- <ThemeSwitcherBtn />
- <GithubLogoButton />
- <ChangeI18nBtn />
- <Avatar
- color="orange"
- size="small"
- style={{ marginRight: '0px'}}>
- YJ
- </Avatar>
- </div>
- }
- >
- {
- navList.map( nav => {
- return (
- <Link
- key={nav.name}
- style={{ textDecoration: "none" }}
- to={nav.path}
- >
- <Nav.Item
- itemKey={nav.name}
- text={t('header.' + nav.name)}
- className={selectedKeys.includes(nav.name) ? styles['selected-nav-item'] : ''}
- />
- </Link>
- )
- })
- }
- </Nav>
- </div>
- </Header>
- )
-}
-
-export default HeaderRoot
diff --git a/paimon-web-ui/src/pages/Layout/index.tsx b/paimon-web-ui/src/pages/Layout/index.tsx
deleted file mode 100644
index 4c9ee53..0000000
--- a/paimon-web-ui/src/pages/Layout/index.tsx
+++ /dev/null
@@ -1,38 +0,0 @@
-/* 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 { Layout } from "@douyinfe/semi-ui";
-import Header from "@pages/Layout/Header";
-import { Outlet } from 'react-router-dom';
-import styles from "./layout.module.less";
-
-const { Content } = Layout
-
-const LayoutRoot = () => {
- return (
- <Layout className="layout-page">
- <Header/>
- <Layout>
- {/*<Sider/>*/}
- <Content className={styles.content}>
- <Outlet />
- </Content>
- </Layout>
- </Layout>
- )
-}
-export default LayoutRoot
diff --git a/paimon-web-ui/src/pages/Layout/layout.module.less b/paimon-web-ui/src/pages/Layout/layout.module.less
deleted file mode 100644
index 3eab7ce..0000000
--- a/paimon-web-ui/src/pages/Layout/layout.module.less
+++ /dev/null
@@ -1,20 +0,0 @@
-/* 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. */
-
-.content {
- background-color: var(--semi-color-bg-0);
-}
\ No newline at end of file
diff --git a/paimon-web-ui/src/pages/Metadata/components/LeftContent/components/CatalogModalForm/CatalogForm/index.tsx b/paimon-web-ui/src/pages/Metadata/components/LeftContent/components/CatalogModalForm/CatalogForm/index.tsx
deleted file mode 100644
index cb0723e..0000000
--- a/paimon-web-ui/src/pages/Metadata/components/LeftContent/components/CatalogModalForm/CatalogForm/index.tsx
+++ /dev/null
@@ -1,111 +0,0 @@
-/* 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 { Form } from '@douyinfe/semi-ui';
-import {useTranslation} from "react-i18next";
-
-// @ts-ignore
-const CatalogForm = ({ getFormApi }) => {
- const { t } = useTranslation();
- return(
- <>
- <Form
- wrapperCol={{ span: 20 }}
- labelCol={{ span: 4 }}
- labelPosition='left'
- labelAlign='left'
- getFormApi={getFormApi}
- >
- {
- ({ formState }) => (
- <>
- <Form.Input
- field="catalogName"
- label='Catalog Name'
- trigger='blur'
- rules={[
- { required: true, message: t('metadata.message') },
- ]}
- style={{ width: "100%" }}
- showClear/>
-
- <Form.Select
- field="catalogType"
- label='Catalog Type'
- placeholder={"please select catalog"}
- rules={[
- { required: true, message: t('metadata.message') },
- ]}
- style={{ width: "100%" }}
- showClear>
- <Form.Select.Option value="filesystem">FileSystem</Form.Select.Option>
- <Form.Select.Option value="hive">Hive</Form.Select.Option>
- </Form.Select>
-
- {formState.values.catalogType === 'filesystem' ? (
- <Form.Input
- field="warehouse"
- label='Warehouse'
- trigger='blur'
- rules={[
- { required: true, message: t('metadata.message') },
- ]}
- style={{ width: "100%" }}
- showClear/>
- )
- :
- <>
- <Form.Input
- field="warehouse"
- label='Warehouse'
- trigger='blur'
- rules={[
- { required: true, message: t('metadata.message') },
- ]}
- style={{ width: "100%" }}
- showClear/>
-
- <Form.Input
- field="uri"
- label='Hive Uri'
- trigger='blur'
- rules={[
- { required: true, message: t('metadata.message') },
- ]}
- style={{ width: "100%" }}
- showClear/>
-
- <Form.Input
- field="hiveConfDir"
- label='Hive Conf Dir'
- trigger='blur'
- rules={[
- { required: true, message: t('metadata.message') },
- ]}
- style={{ width: "100%" }}
- showClear/>
- </>
- }
- </>
- )
- }
- </Form>
- </>
- );
-}
-
-export default CatalogForm;
\ No newline at end of file
diff --git a/paimon-web-ui/src/pages/Metadata/components/LeftContent/components/CatalogModalForm/index.tsx b/paimon-web-ui/src/pages/Metadata/components/LeftContent/components/CatalogModalForm/index.tsx
deleted file mode 100644
index 11c546d..0000000
--- a/paimon-web-ui/src/pages/Metadata/components/LeftContent/components/CatalogModalForm/index.tsx
+++ /dev/null
@@ -1,61 +0,0 @@
-/* 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 React, {useState} from "react";
-import { Modal } from '@douyinfe/semi-ui';
-import CatalogForm from "@pages/Metadata/components/LeftContent/components/CatalogModalForm/CatalogForm";
-import {useTranslation} from "react-i18next";
-import {auto} from "@popperjs/core";
-
-type CatalogModalFormProps = {
- visible: boolean;
- onClose: () => void;
- onOk: (formApi: any) => void;
-};
-
-
-const CatalogModalForm: React.FC<CatalogModalFormProps> = ({ visible , onClose, onOk }) => {
- const { t } = useTranslation();
- const [formApi, setFormApi] = useState(null);
-
- const getFormApi = (api: any) => {
- setFormApi(api);
- };
-
- const handleOkClick = async () => {
- await onOk(formApi);
- onClose();
- };
-
- return(
- <Modal
- title={t('metadata.create-catalog')}
- visible = {visible}
- onCancel= {onClose}
- maskClosable={false}
- okText={t('metadata.submit')}
- cancelText={t('metadata.cancel')}
- width={'690px'}
- height={auto}
- onOk={() => handleOkClick()}
- >
- <CatalogForm getFormApi={getFormApi}/>
- </Modal>
- );
-}
-
-export default CatalogModalForm;
\ No newline at end of file
diff --git a/paimon-web-ui/src/pages/Metadata/components/LeftContent/components/CatalogTree/catalog-tree.module.less b/paimon-web-ui/src/pages/Metadata/components/LeftContent/components/CatalogTree/catalog-tree.module.less
deleted file mode 100644
index d9be919..0000000
--- a/paimon-web-ui/src/pages/Metadata/components/LeftContent/components/CatalogTree/catalog-tree.module.less
+++ /dev/null
@@ -1,82 +0,0 @@
-/* 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. */
-
-.catalog-tree-input {
- //background-color: var(--semi-color-bg-0);
- width: 347px;
- margin-left: -12px;
-}
-
-.liClass {
- position: relative;
- display: flex;
- align-items: center;
- justify-content: space-between;
- width: 100%;
-}
-
-.iconPlus {
- position: absolute;
- right: 40px;
- padding: 2px;
- transition: all 0.2s ease-in-out; /* Add transition effect */
- border: none;
- color: #000;
- font-size: 12px; /* Small size for the "+" icon in the initial state */
- visibility: hidden; /* Hide the "+" icon in the initial state */
- border-radius: 50%; /* Add border radius */
- background: transparent; /* Transparent background in the initial state */
-}
-
-.liClass:hover .iconPlus{
- visibility: visible; /* Show the "+" icon when hovering over the entire node */
- border: none;
- color: #000;
- font-size: 12px;
- background: transparent;
-}
-
-.liClass .iconPlus:hover{
- border: 1px solid #d3d3d3; /* Gray border when hovering over the "+" icon */
- color: #d3d3d3; /* Gray color when hovering over the "+" icon */
- font-size: 16px; /* Increase the size of the "+" icon when hovering */
- background: #fff; /* White background when hovering over the "+" icon */
- box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1); /* Add shadow effect */
-}
-
-.iconMore {
- display: flex;
- align-items: center;
- transition: all 0.2s ease-in-out;
- visibility: hidden;
- margin-right: 12px;
- color: #000;
-}
-
-.liClass:hover .iconMore {
- visibility: visible;
-}
-
-.semi-tree-node-selected {
- color: rgba(var(--semi-blue-5), 1) !important;
-}
-
-.icon {
- margin-right: 8px;
- color: var(--semi-color-text-2);
-}
-
diff --git a/paimon-web-ui/src/pages/Metadata/components/LeftContent/components/CatalogTree/index.tsx b/paimon-web-ui/src/pages/Metadata/components/LeftContent/components/CatalogTree/index.tsx
deleted file mode 100644
index 304cd12..0000000
--- a/paimon-web-ui/src/pages/Metadata/components/LeftContent/components/CatalogTree/index.tsx
+++ /dev/null
@@ -1,396 +0,0 @@
-/* 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 {Input, Tree} from '@douyinfe/semi-ui';
-import { IconSearch, IconFile, IconPlus, IconFolder, IconFolderOpen } from "@douyinfe/semi-icons";
-import {Tooltip} from "@douyinfe/semi-ui";
-import {useEffect, useState} from "react";
-import { useTranslation } from 'react-i18next';
-import { useDatabaseStore } from "@src/store/databaseStore.ts";
-import { useCatalogStore } from "@src/store/catalogStore.ts";
-import {useTableStore} from "@src/store/tableStore.ts";
-import DatabaseModalForm from "@pages/Metadata/components/LeftContent/components/DatabaseModalForm";
-import TableModalForm from "@pages/Metadata/components/LeftContent/components/TableModalForm";
-import {TableItem, TableColumn} from "@src/types/Table/data";
-import CatalogIconMoreDropdown from "@components/IconMoreDropdown/CatalogIconMoreDropdown";
-import DatabaseIconMoreDropdown from "@components/IconMoreDropdown/DatabaseIconMoreDropdown";
-import TableIconMoreDropdown from "@components/IconMoreDropdown/TableIconMoreDropdown";
-import styles from "./catalog-tree.module.less"
-
-type TreeDataItem = {
- label: string;
- value: string;
- key: string;
- type: "catalog" | "database" | "table";
- catalogId: number;
- parentId?: number;
- children?: TreeDataItem[];
-};
-
-const CatalogTree = () => {
- const { t } = useTranslation()
- const [hoveredNode, setHoveredNode] = useState(null);
- const [showModal, setShowModal] = useState(false);
- const [createType, setCreateType] =
- useState<"catalog" | "database" | "table" | null>(null);
-
- // Database
- const createDatabase = useDatabaseStore(state => state.createDatabase);
- const fetchDatabases= useDatabaseStore(state => state.fetchDatabases);
- const databaseItemList = useDatabaseStore(state => state.databaseItemList);
-
- // Catalog
- const [treeData, setTreeData] = useState<TreeDataItem[]>([]);
- const fetchCatalogData = useCatalogStore(state => state.fetchCatalogData);
- const catalogItemList = useCatalogStore(state => state.catalogItemList);
-
- // Table
- const { inputs, configs, setInputs, setConfigs} = useTableStore();
- const createTable = useTableStore(state => state.createTable);
- const fetchTables= useTableStore(state => state.fetchTables);
- const tableItemList = useTableStore(state => state.tableItemList);
-
- const [selectedCatalogName, setSelectedCatalogName] = useState<string | null>(null);
- const [selectedDatabaseName, setSelectedDatabaseName] = useState<string | null>(null);
-
- const [expandedKeys, setExpandedKeys] = useState<string[]>([]);
- const [selectedKey, setSelectedKey] = useState(null);
-
- const setTableNodeClicked = useTableStore((state) => state.setTableNodeClicked);
-
- useEffect(() => {
- // Fetch the catalog data when the component mounts
- fetchTables();
- }, [fetchTables]);
-
- useEffect(() => {
- // Fetch the catalog data when the component mounts
- fetchDatabases();
- }, [fetchDatabases]);
-
- const handleMouseEnter = (key: any) => {
- setHoveredNode(key);
- };
-
- const handleMouseLeave = () => {
- setHoveredNode(null);
- };
-
- const handleOpenModal = (type: "catalog" | "database" | "table", name: string, parentId?: number) => {
- if (type === "catalog" || type === "database") {
- if (type === "catalog") {
- setSelectedCatalogName(name);
- } else if (type === "database") {
- const databaseItem =
- databaseItemList.find(item => item.databaseName === name && item.catalogId === parentId);
- if (databaseItem) {
- const catalogItem = catalogItemList.find(item => item.id === databaseItem.catalogId);
- if (catalogItem) {
- setSelectedCatalogName(catalogItem.catalogName);
- }
- }
- setSelectedDatabaseName(name);
- }
- setCreateType(type);
- setShowModal(true);
- }
- };
-
- const handleCloseDatabaseModal = () => {
- setShowModal(false);
- };
-
- const handleCloseTableModal = () => {
- setInputs([{}]);
- setConfigs([]);
- setShowModal(false);
- };
-
- useEffect(() => {
- // Fetch the catalog data when the component mounts
- fetchCatalogData();
- }, [fetchCatalogData]);
-
- useEffect(() => {
- // Update treeData when catalogItemList changes
- const transformedData = catalogItemList.map(item => ({
- label: item.catalogName,
- value: item.catalogName,
- type: "catalog" as "catalog",
- catalogId: item.id,
- key: item.id.toString(),
- children: databaseItemList
- .filter(dbItem => dbItem.catalogId === item.id)
- .map(dbItem => {
- const databaseKey = item.id.toString() + "-" + dbItem.databaseName;
- const tableChildren = tableItemList
- .filter(tableItem => tableItem.catalogName === item.catalogName && tableItem.databaseName === dbItem.databaseName)
- .map(tableItem => ({
- label: tableItem.tableName,
- value: tableItem.tableName,
- type: "table" as "table",
- catalogId: item.id,
- key: item.catalogName + "#" + dbItem.databaseName + "#" + tableItem.tableName
- }));
- return {
- label: dbItem.databaseName,
- value: dbItem.databaseName,
- type: "database" as "database",
- catalogId: item.id,
- parentId: item.id,
- key: databaseKey,
- children: tableChildren
- };
- }),
- }));
- setTreeData(transformedData);
- }, [catalogItemList, databaseItemList, tableItemList]);
-
- const handleCreateDatabaseOk = (formApi: any) => {
- return new Promise<void>((resolve, reject) => {
- formApi
- .validate()
- .then((values: any) => {
- const formData = values;
- const databaseProp: Prop.DatabaseProp = {
- databaseName: formData.databaseName,
- catalogId: formData.catalogId,
- description: formData.description
- };
- createDatabase(databaseProp)
- .then(() => {
- fetchDatabases();
- resolve();
- })
- .catch((error: any) => {
- console.log(error);
- reject(error);
- });
- })
- .catch((errors: any) => {
- console.log(errors);
- reject(errors);
- });
- });
- }
-
- const handleCreateTableOk = (formApi: any) => {
- return new Promise<void>((resolve, reject) => {
- formApi
- .validate()
- .then(() => {
- const values = formApi.getValues();
- const catalogName = formApi.catalogName;
- const databaseName = formApi.databaseName;
-
- let tableColumns: TableColumn[] = [];
- let tableOptions: Map<string, string> =new Map<string, string>();
- if (inputs.length > 0) {
- inputs.map((_, index) => {
- const field = values[`field${index}`];
- const dataType = values[`type${index}`];
- const comment = values[`comment${index}`];
- const primaryKey = values[`primaryKey${index}`];
- const defaultValue = values[`defaultValue${index}`];
- if (field !== undefined && dataType !== undefined) {
- const tableColumn: TableColumn = {
- field: field,
- dataType: dataType,
- comment: comment === undefined ? null : comment,
- isPK: primaryKey !== undefined,
- defaultValue: defaultValue === undefined ? null : defaultValue,
- }
- tableColumns.push(tableColumn);
- }
- });
- }
-
- if (configs.length > 0) {
- configs.map((_, index) => {
- const key = values[`configKey${index}`];
- const value = values[`configValue${index}`];
- tableOptions.set(key, value);
- });
- }
-
- const tableProp: TableItem = {
- catalogName: catalogName,
- databaseName: databaseName,
- tableName: values.tableName,
- description: values.description === undefined ? null : values.description,
- tableColumns: tableColumns,
- partitionKey: values.partitionKey === undefined ? [] : values.partitionKey,
- tableOptions: tableOptions,
- }
- createTable(tableProp)
- .then(() => {
- fetchTables();
- setInputs([{}]);
- setConfigs([]);
- resolve();
- })
- .catch((error: any) => {
- console.log(error);
- setInputs([{}]);
- setConfigs([]);
- reject(error);
- });
- console.log(tableProp)
- })
- .catch((errors: any) => {
- console.log(errors);
- setInputs([{}]);
- setConfigs([]);
- reject(errors);
- });
- });
- }
-
- const findNodeByKey = (key: string, nodes?: TreeDataItem[]): TreeDataItem | null => {
- if (!nodes) {
- return null;
- }
-
- for (let i = 0; i < nodes.length; i++) {
- if (nodes[i].key === key) {
- return nodes[i];
- } else if (nodes[i].children) {
- const foundNode = findNodeByKey(key, nodes[i].children);
- if (foundNode) {
- return foundNode;
- }
- }
- }
- return null;
- };
-
- const onTreeNodeClick = (key: any) => {
- const node = findNodeByKey(key, treeData);
- if (node && node.type === 'table') {
- setTableNodeClicked(key);
- }
- };
-
- const onExpand = (_: string[], info: any) => {
- const key = info.node.key;
- const expanded = info.expanded;
-
- if (expanded) {
- setExpandedKeys(prevKeys => [...prevKeys, key]);
- } else {
- const nodeToCollapse = findNodeByKey(key, treeData);
- let keysToCollapse = [key];
- if (nodeToCollapse && nodeToCollapse.children) {
- keysToCollapse = [...keysToCollapse, ...nodeToCollapse.children.map(child => child.key)];
- }
- setExpandedKeys(prevKeys => prevKeys.filter(k => !keysToCollapse.includes(k)));
- }
- };
-
- const renderLabel = (x: any) => {
- const { className, onExpand, onClick, data, expandIcon } = x;
- const { label, key, type } = data;
- const isLeaf = !(data.children && data.children.length);
- const hasChildren = data.children && data.children.length > 0;
- const isExpanded = expandedKeys.includes(key);
- const isSelected = selectedKey === key;
-
- let icon;
- if (type === 'table') {
- icon = <IconFile size={"small"} className={styles.icon}/>;
- } else if (hasChildren) {
- icon = isExpanded ? <IconFolderOpen size={"small"} className={styles.icon}/>
- : <IconFolder size={"small"} className={styles.icon}/>
- } else {
- icon = <IconFolder size={"small"} className={styles.icon}/>;
- }
-
- let iconMore;
- if (type === 'catalog') {
- iconMore = <CatalogIconMoreDropdown/>;
- } else if (type === 'database') {
- iconMore = <DatabaseIconMoreDropdown/>;
- } else {
- iconMore = <TableIconMoreDropdown/>;
- }
-
- return (
- <li
- className={`${className} ${styles.liClass} ${isSelected ? styles['semi-tree-node-selected'] : ''}`}
- role="treeitem"
- onClick={(e) => {
- if (isLeaf) {
- onClick(e);
- } else {
- onExpand(e);
- }
- setSelectedKey(key);
- }}
- onMouseEnter={() => handleMouseEnter(key)}
- onMouseLeave={handleMouseLeave}
- tabIndex={0}
- >
- {expandIcon}
- {icon}
- <div style={{ flex: 1 }}>{label}</div>
- { key === hoveredNode && (type === "catalog" || type === "database") && (
- <Tooltip content={type === "catalog" ? t('metadata.add-database') : t('metadata.add-table')}>
- <IconPlus
- className={styles.iconPlus}
- onClick={(e) => {
- e.stopPropagation();
- handleOpenModal(type, label, data.parentId)
- }}
- />
- </Tooltip>
- )}
- <div className={styles.iconMore}>{iconMore}</div>
- </li>
- );
- };
-
- return(
- <>
- <Tree
- filterTreeNode
- treeData={treeData}
- expandedKeys={expandedKeys}
- onExpand={onExpand}
- selectedKey={selectedKey}
- onSelect={onTreeNodeClick}
- searchPlaceholder={t('common.filter')}
- searchRender={({ prefix, ...restProps }) => (
- <Input suffix={<IconSearch className={styles['catalog-tree-input-icon']}/>} {...restProps} className={styles['catalog-tree-input']}></Input>
- )}
- renderFullLabel={renderLabel}
- />
- {showModal && createType === "catalog" && (
- <DatabaseModalForm visible={showModal} onClose={handleCloseDatabaseModal} onOk={handleCreateDatabaseOk}/>
- )}
- {showModal && createType === "database" && (
- <TableModalForm
- visible={showModal}
- onClose={handleCloseTableModal}
- onOk={handleCreateTableOk}
- catalogName={selectedCatalogName}
- databaseName={selectedDatabaseName}/>
- )}
- </>
- );
-}
-
-export default CatalogTree;
diff --git a/paimon-web-ui/src/pages/Metadata/components/LeftContent/components/DatabaseModalForm/DatabaseForm/index.tsx b/paimon-web-ui/src/pages/Metadata/components/LeftContent/components/DatabaseModalForm/DatabaseForm/index.tsx
deleted file mode 100644
index f1f200a..0000000
--- a/paimon-web-ui/src/pages/Metadata/components/LeftContent/components/DatabaseModalForm/DatabaseForm/index.tsx
+++ /dev/null
@@ -1,74 +0,0 @@
-/* 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 { Form } from '@douyinfe/semi-ui';
-import {useTranslation} from "react-i18next";
-import {useCatalogStore} from "@src/store/catalogStore.ts";
-
-// @ts-ignore
-const DatabaseForm = ({ getFormApi }) => {
- const { t } = useTranslation();
- const catalogItemList = useCatalogStore(state => state.catalogItemList);
-
- return(
- <>
- <Form
- getFormApi={getFormApi}
- >
- {
- ({}) => (
- <>
- <Form.Input
- field="databaseName"
- label={t('metadata.database-name')}
- trigger='blur'
- rules={[
- { required: true, message: t('metadata.message') },
- ]}
- style={{ width: "100%" }}
- showClear/>
-
- <Form.Select
- field="catalogId"
- label='Catalog'
- rules={[
- { required: true, message: t('metadata.message') },
- ]}
- style={{ width: "100%" }}
- showClear>
- {catalogItemList.map(item => (
- <Form.Select.Option key={item.id} value={item.id}>
- {item.catalogName}
- </Form.Select.Option>
- ))}
- </Form.Select>
-
- <Form.TextArea
- field="description"
- label={t('metadata.description')}
- style={{ width: "100%" }}
- placeholder={t('metadata.text-area-description')}
- showClear/>
- </>
- )
- }
- </Form>
- </>
- );
-}
-
-export default DatabaseForm;
diff --git a/paimon-web-ui/src/pages/Metadata/components/LeftContent/components/DatabaseModalForm/index.tsx b/paimon-web-ui/src/pages/Metadata/components/LeftContent/components/DatabaseModalForm/index.tsx
deleted file mode 100644
index d5722a3..0000000
--- a/paimon-web-ui/src/pages/Metadata/components/LeftContent/components/DatabaseModalForm/index.tsx
+++ /dev/null
@@ -1,60 +0,0 @@
-/* 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 React, {useState} from "react";
-import { Modal } from '@douyinfe/semi-ui';
-import DatabaseForm from "@pages/Metadata/components/LeftContent/components/DatabaseModalForm/DatabaseForm";
-import {useTranslation} from "react-i18next";
-
-type DatabaseModalFormProps = {
- visible: boolean;
- onClose: () => void;
- onOk: (formApi: any) => void;
-};
-
-const DatabaseModalForm: React.FC<DatabaseModalFormProps> = ({ visible , onClose, onOk }) => {
- const [formApi, setFormApi] = useState(null);
- const { t } = useTranslation();
-
- const getFormApi = (api: any) => {
- setFormApi(api);
- };
-
- const handleOkClick = async () => {
- await onOk(formApi);
- onClose();
- };
-
- return(
- <Modal
- title = {t('metadata.create-database')}
- visible = {visible}
- onCancel= {onClose}
- maskClosable={false}
- okText={t('metadata.submit')}
- cancelText={t('metadata.cancel')}
- width={'650px'}
- height={'490px'}
- onOk={() => handleOkClick()}
- >
- <DatabaseForm getFormApi={getFormApi}/>
- </Modal>
- );
-}
-
-export default DatabaseModalForm;
-
diff --git a/paimon-web-ui/src/pages/Metadata/components/LeftContent/components/TableModalForm/TableForm/index.tsx b/paimon-web-ui/src/pages/Metadata/components/LeftContent/components/TableModalForm/TableForm/index.tsx
deleted file mode 100644
index 3c7ef8e..0000000
--- a/paimon-web-ui/src/pages/Metadata/components/LeftContent/components/TableModalForm/TableForm/index.tsx
+++ /dev/null
@@ -1,244 +0,0 @@
-/* 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 {Button, Form} from '@douyinfe/semi-ui';
-import {useTranslation} from "react-i18next";
-import {IconPlus, IconMinus} from "@douyinfe/semi-icons";
-import {useRef, useState} from "react";
-import {useTableStore} from "@src/store/tableStore.ts";
-
-// @ts-ignore
-const TableForm = ({ getFormApi }) => {
- const formApiRef = useRef<any>(null);
- const { t } = useTranslation();
- const { inputs, configs, setInputs, setConfigs } = useTableStore();
- const [fieldOptions, setFieldOptions] = useState<string[]>([]);
-
- const handleAddInput = () => {
- const newInputs = inputs.concat({});
- setInputs(newInputs);
- }
-
- const handleRemoveInput = (index: any) => {
- if (formApiRef.current) {
- const newInputs = [...inputs];
- formApiRef.current.setValue(`field${index}`, null);
- formApiRef.current.setValue(`comment${index}`, null);
- formApiRef.current.setValue(`type${index}`, null);
- newInputs.splice(index, 1);
- setInputs(newInputs);
- const newFieldOptions = newInputs.map((_, index) => formApiRef.current.getValue(`field${index}`));
- setFieldOptions(newFieldOptions);
- }
- }
-
- const updateFieldOptions = (index: any) => {
- if (formApiRef.current) {
- const fieldValue = formApiRef.current.getValue(`field${index}`);
- if (fieldValue !== undefined) {
- const newFieldOptions = [...fieldOptions];
- newFieldOptions[index] = fieldValue;
- setFieldOptions(newFieldOptions);
- }
- }
- };
-
- const handleAddConfig = () => {
- setConfigs(configs.concat({}));
- }
-
- const handleRemoveConfig = (index: any) => {
- if (formApiRef.current) {
- const newConfigs = [...configs];
- formApiRef.current.setValue(`configKey${index}`, null);
- formApiRef.current.setValue(`configValue${index}`, null);
- newConfigs.splice(index, 1);
- setConfigs(newConfigs);
- }
- }
-
- const options = [
- { value: 'INT', label: 'INT' },
- { value: 'TINYINT', label: 'TINYINT' },
- { value: 'SMALLINT', label: 'SMALLINT' },
- { value: 'BIGINT', label: 'BIGINT' },
- { value: 'STRING', label: 'STRING' },
- { value: 'DOUBLE', label: 'DOUBLE' },
- { value: 'BOOLEAN', label: 'BOOLEAN' },
- { value: 'DATE', label: 'DATE' },
- { value: 'TIME', label: 'TIME' },
- { value: 'TIMESTAMP', label: 'TIMESTAMP' },
- { value: 'BYTES', label: 'BYTES' },
- { value: 'FLOAT', label: 'FLOAT' },
- { value: 'DECIMAL', label: 'DECIMAL' },
- ];
-
- return(
- <>
- <Form
- getFormApi={api => {
- formApiRef.current = api;
- if (getFormApi) {
- getFormApi(api);
- }
- }}
- >
- {
- ({}) => (
- <>
- <Form.Section text={t('metadata.form-group-basic-information')}>
- <Form.Input
- field="tableName"
- label={t('metadata.table-name')}
- trigger='blur'
- rules={[
- { required: true, message: t('metadata.message') },
- ]}
- style={{ width: "100%" }}
- showClear/>
- <Form.TextArea
- field="description"
- label={t('metadata.description')}
- style={{ width: "100%" }}
- placeholder={t('metadata.text-area-description')}
- autosize rows={2}
- showClear/>
- </Form.Section>
-
- <Form.Section
- text={
- <div
- style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', cursor: 'pointer',
- color: inputs.length > 0 ? 'black' : 'lightgray',}}
- onClick={handleAddInput}
- >
- <span>{t('metadata.form-group-add-column-ordinary')}</span>
- <IconPlus />
- </div>
- }
- >
- {inputs.map((_, index) => (
- <div style={{ display: 'flex', alignItems: 'center', marginBottom: '10px'}} key={index}>
- <Form.Input
- noLabel={true}
- field={`field${index}`}
- placeholder={t('metadata.add-column-field')}
- style={{ width: "160px" }}
- onBlur={() => updateFieldOptions(index)}
- showClear />
- <Form.Select
- noLabel={true}
- field={`type${index}`}
- placeholder={t('metadata.add-column-type')}
- style={{ width: "130px", marginLeft: '10px' }}
- allowCreate={true}
- filter={true}
- showClear>
- {options.map((option, i) => (
- <Form.Select.Option key={i} value={option.value}>
- {option.label}
- </Form.Select.Option>
- ))}
- </Form.Select>
- <Form.Input
- noLabel={true}
- field={`comment${index}`}
- placeholder={t('metadata.add-column-comment')}
- style={{ width: "160px", marginLeft: '10px' }}
- showClear />
- <Form.Checkbox
- field={`primaryKey${index}`}
- noLabel={true}
- style={{marginLeft: '10px'}}>
- {t('metadata.add-column-primary-key')}
- </Form.Checkbox>
- <Form.Input
- noLabel={true}
- field={`defaultValue${index}`}
- placeholder={t('metadata.add-column-default-value')}
- style={{ width: "126px", marginLeft: '10px'}}
- showClear />
- <Button
- onClick={() => handleRemoveInput(index)}
- icon={<IconMinus />}
- style={{ marginLeft: '10px', borderRadius: '50%' }}
- />
- </div>
- ))}
- </Form.Section>
-
- <Form.Section text={t('metadata.form-group-add-column-partition')}>
- <Form.Select
- noLabel={true}
- field="partitionKey"
- style={{ width: "100%" }}
- filter={true}
- showClear
- multiple
- >
- {fieldOptions.map((field, index) => (
- <Form.Select.Option key={index} value={field}>{field}</Form.Select.Option>
- ))}
- </Form.Select>
- </Form.Section>
-
- <Form.Section
- text={
- <div
- style={{
- display: 'flex', justifyContent: 'space-between', alignItems: 'center',
- cursor: 'pointer',
- color: configs.length > 0 ? 'black' : 'lightgray',
- }}
- onClick={handleAddConfig}
- >
- <span>{t('metadata.form-group-add-config')}</span>
- <IconPlus />
- </div>
- }
- >
- {configs.map((_, index) => (
- <div style={{ display: 'flex', alignItems: 'center', marginBottom: '10px' }} key={index}>
- <Form.Input
- noLabel={true}
- field={`configKey${index}`}
- placeholder={t('metadata.add-config-key')}
- style={{ width: "329px"}}
- showClear />
- <Form.Input
- noLabel={true}
- field={`configValue${index}`}
- placeholder={t('metadata.add-config-value')}
- style={{ width: "329px", marginLeft: '10px' }}
- showClear />
- <Button
- onClick={() => handleRemoveConfig(index)}
- icon={<IconMinus />}
- style={{ marginLeft: '10px', borderRadius: '50%'}}
- />
- </div>
- ))}
- </Form.Section>
- </>
- )
- }
- </Form>
- </>
- );
-}
-
-export default TableForm;
\ No newline at end of file
diff --git a/paimon-web-ui/src/pages/Metadata/components/LeftContent/components/TableModalForm/index.tsx b/paimon-web-ui/src/pages/Metadata/components/LeftContent/components/TableModalForm/index.tsx
deleted file mode 100644
index 53938c5..0000000
--- a/paimon-web-ui/src/pages/Metadata/components/LeftContent/components/TableModalForm/index.tsx
+++ /dev/null
@@ -1,67 +0,0 @@
-/* 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 React, {useState} from "react";
-import { Modal } from '@douyinfe/semi-ui';
-import {useTranslation} from "react-i18next";
-import {auto} from "@popperjs/core";
-import TableForm from "@pages/Metadata/components/LeftContent/components/TableModalForm/TableForm";
-
-type TableModalFormProps = {
- visible: boolean;
- onClose: () => void;
- onOk: (formApi: any) => void;
- catalogName: string | null;
- databaseName: string | null;
-};
-
-const TableModalForm: React.FC<TableModalFormProps> = ({ visible , onClose, onOk, catalogName, databaseName }) => {
- const [formApi, setFormApi] = useState(null);
- const { t } = useTranslation();
-
- const getFormApi = (api: any) => {
- const formData = {
- ... api,
- catalogName,
- databaseName,
- }
- setFormApi(formData);
- };
-
- const handleOkClick = async () => {
- await onOk(formApi);
- onClose();
- };
-
- return(
- <Modal
- title = {t('metadata.create-table')}
- visible = {visible}
- onCancel= {onClose}
- maskClosable={false}
- okText={t('metadata.submit')}
- cancelText={t('metadata.cancel')}
- width={'760px'}
- height={auto}
- onOk={() => handleOkClick()}
- >
- <TableForm getFormApi={getFormApi}/>
- </Modal>
- );
-}
-
-export default TableModalForm;
\ No newline at end of file
diff --git a/paimon-web-ui/src/pages/Metadata/components/LeftContent/index.tsx b/paimon-web-ui/src/pages/Metadata/components/LeftContent/index.tsx
deleted file mode 100644
index c7979da..0000000
--- a/paimon-web-ui/src/pages/Metadata/components/LeftContent/index.tsx
+++ /dev/null
@@ -1,100 +0,0 @@
-/* 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 { IconPlus } from "@douyinfe/semi-icons";
-import CatalogTree from "@pages/Metadata/components/LeftContent/components/CatalogTree";
-import { useState } from "react";
-import CatalogModalForm from "@pages/Metadata/components/LeftContent/components/CatalogModalForm";
-import {useCatalogStore} from "@src/store/catalogStore.ts";
-import styles from "./left-content.module.less";
-import { useTranslation } from 'react-i18next';
-import {useDatabaseStore} from "@src/store/databaseStore.ts";
-
-
-const MetadataSidebar = () => {
-
- const [showModal, setShowModal] = useState(false);
- const createFilesystemCatalog = useCatalogStore(state => state.createFileSystemCatalog);
- const createHiveCatalog = useCatalogStore(state => state.createHiveCatalog);
- const fetchCatalogData = useCatalogStore(state => state.fetchCatalogData);
- const fetchAllDatabases = useDatabaseStore(state => state.fetchDatabases);
-
- const handleOpenModal = () => {
- setShowModal(true);
- };
-
- const handleCloseModal = () => {
- setShowModal(false);
- };
-
- const handleOk = (formApi: any) => {
- return new Promise<void>((resolve, reject) => {
- formApi
- .validate()
- .then((values: any) => {
- // Assuming values contains the form data
- const formData = values;
-
- const catalogProp: Prop.CatalogProp = {
- catalogName: formData.catalogName,
- catalogType: formData.catalogType,
- warehouse: formData.warehouse,
- hiveUri: formData.hiveUri,
- hiveConfDir: formData.hiveConfDir,
- isDelete: false
- };
-
- if (formData.catalogType === 'filesystem') {
- createFilesystemCatalog(catalogProp)
- .then(() => {
- fetchCatalogData();
- fetchAllDatabases();
- resolve();
- })
- } else {
- createHiveCatalog(catalogProp)
- .then(() => {
- fetchCatalogData();
- fetchAllDatabases();
- resolve();
- })
- }
- resolve();
- })
- .catch((errors: any) => {
- console.log(errors);
- reject(errors);
- });
- });
- };
-
- const { t } = useTranslation()
- return(
- <div className={styles.container}>
- <div className={styles['add-catalog-container']}>
- <span>{t('metadata.catalog')}</span>
- <IconPlus className={styles.iconPlus} onClick={handleOpenModal}/>
- </div>
- <CatalogTree/>
- {showModal && (
- <CatalogModalForm visible={showModal} onClose={handleCloseModal} onOk={handleOk}/>
- )}
- </div>
- )
-}
-
-export default MetadataSidebar;
diff --git a/paimon-web-ui/src/pages/Metadata/components/LeftContent/left-content.module.less b/paimon-web-ui/src/pages/Metadata/components/LeftContent/left-content.module.less
deleted file mode 100644
index 862b5c5..0000000
--- a/paimon-web-ui/src/pages/Metadata/components/LeftContent/left-content.module.less
+++ /dev/null
@@ -1,39 +0,0 @@
-/* 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. */
-
-.container {
- width: 347px;
- height: 100%;
- padding: 10px 24px;
-}
-
-.add-catalog-container {
- color: var(--semi-color-text-0);
- margin: 6px 0 16px;
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- align-items: center;
-}
-
-.iconPlus {
- transition: box-shadow 0.1s ease-in-out;
-}
-
-.iconPlus:hover {
- box-shadow: 0px 0px 30px rgba(var(--semi-light-blue-5), 1);
-}
\ No newline at end of file
diff --git a/paimon-web-ui/src/pages/Metadata/components/RightContent/components/MainContent/Table/index.tsx b/paimon-web-ui/src/pages/Metadata/components/RightContent/components/MainContent/Table/index.tsx
deleted file mode 100644
index 4c33c3b..0000000
--- a/paimon-web-ui/src/pages/Metadata/components/RightContent/components/MainContent/Table/index.tsx
+++ /dev/null
@@ -1,53 +0,0 @@
-/* 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 { useState } from 'react';
-import {TabPane, Tabs} from '@douyinfe/semi-ui';
-import { useTranslation } from 'react-i18next';
-
-const TableTab = () => {
- const { t } = useTranslation()
-
- const [tabList, setTabList] = useState([
- { tab: 'TableInfo', name: 'tableInfo', itemKey: '1', content: "info", closable: true },
- { tab: 'Details', name: 'details', itemKey: '2', content: "info", closable: true },
- { tab: 'Files', name: 'files', itemKey: '3', content: "info", closable: true }
- ]);
-
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- // @ts-ignore
- const close = (key) => {
- const newTabList = tabList.filter((t) => t.itemKey !== key);
- setTabList(newTabList);
- };
-
-
- return (
- <Tabs type="line" defaultActiveKey="1" onTabClose={close}>
- {tabList.map((tab) => (
- <TabPane closable={tab.closable}
- tab={<span>{t(`metadata.${tab.name}`)}</span>}
- itemKey={tab.itemKey}
- key={tab.itemKey}>
- {tab.content}
- </TabPane>
- ))}
- </Tabs>
- )
-}
-
-export default TableTab;
diff --git a/paimon-web-ui/src/pages/Metadata/components/RightContent/index.tsx b/paimon-web-ui/src/pages/Metadata/components/RightContent/index.tsx
deleted file mode 100644
index 94254da..0000000
--- a/paimon-web-ui/src/pages/Metadata/components/RightContent/index.tsx
+++ /dev/null
@@ -1,52 +0,0 @@
-/* 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 TableTab from "@pages/Metadata/components/RightContent/components/MainContent/Table";
-import { Breadcrumb } from '@douyinfe/semi-ui';
-import {useTableStore} from "@src/store/tableStore.ts";
-import styles from "./right-content.module.less"
-import emptyImg from "@assets/img/empty.png";
-
-const MetadataRightContent = () => {
- const tableNodeClicked = useTableStore((state) => state.tableNodeClicked);
-
- if (!tableNodeClicked) {
- return (
- <div className={styles['empty-container']}>
- <div className={styles['el-empty__image']}>
- <img src={emptyImg}/>
- </div>
- <div className={styles['el-empty__description']}>
- <p>请在左侧选择 Table</p>
- </div>
- </div>
- )
- }
-
- return(
- <div className={styles.container}>
- <Breadcrumb separator={'>'} compact={false}>
- <Breadcrumb.Item>{tableNodeClicked.split("#")[0]}</Breadcrumb.Item>
- <Breadcrumb.Item>{tableNodeClicked.split("#")[1]}</Breadcrumb.Item>
- <Breadcrumb.Item>{tableNodeClicked.split("#")[2]}</Breadcrumb.Item>
- </Breadcrumb>
- <TableTab/>
- </div>
- )
-}
-
-export default MetadataRightContent;
diff --git a/paimon-web-ui/src/pages/Metadata/components/RightContent/right-content.module.less b/paimon-web-ui/src/pages/Metadata/components/RightContent/right-content.module.less
deleted file mode 100644
index bf17e01..0000000
--- a/paimon-web-ui/src/pages/Metadata/components/RightContent/right-content.module.less
+++ /dev/null
@@ -1,35 +0,0 @@
-/* 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. */
-
-.container {
- flex: 1;
- padding: 10px 20px 0 20px;
-}
-
-.empty-container {
- display: flex;
- justify-content: center;
- align-items: center;
- height: calc(100vh - 350px);
- width: 100vw;
- flex-direction: column;
-}
-
-.el-empty__description {
- font-size: 14px;
- color: #888;
-}
diff --git a/paimon-web-ui/src/pages/Metadata/index.tsx b/paimon-web-ui/src/pages/Metadata/index.tsx
deleted file mode 100644
index 45fa324..0000000
--- a/paimon-web-ui/src/pages/Metadata/index.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-/* 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 MetadataSidebar from "@pages/Metadata/components/LeftContent";
-import {Divider} from "@douyinfe/semi-ui";
-import MetadataRightContent from "@pages/Metadata/components/RightContent";
-import styles from "./metadata.module.less";
-
-const RightContent = () => {
-
- return(
- <div className={styles.container}>
- <MetadataSidebar/>
- <Divider layout="vertical" margin='396px' className={styles.divider}/>
- <MetadataRightContent />
- </div>
- )
-}
-
-export default RightContent;
diff --git a/paimon-web-ui/src/pages/Metadata/metadata.module.less b/paimon-web-ui/src/pages/Metadata/metadata.module.less
deleted file mode 100644
index 0488e48..0000000
--- a/paimon-web-ui/src/pages/Metadata/metadata.module.less
+++ /dev/null
@@ -1,26 +0,0 @@
-/* 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. */
-
-.container {
- display: flex;
- flex-direction: row;
-}
-
-.divider {
- height: 100%;
- position: fixed;
-}
\ No newline at end of file
diff --git a/paimon-web-ui/src/pages/Other/Login/index.tsx b/paimon-web-ui/src/pages/Other/Login/index.tsx
deleted file mode 100644
index 449a3b5..0000000
--- a/paimon-web-ui/src/pages/Other/Login/index.tsx
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- *
- * 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 {useEffect, useState} from "react";
-import {Card,} from '@douyinfe/semi-ui';
-import styled from "styled-components";
-import {useForm} from "antd/es/form/Form";
-import {ProForm, ProFormCheckbox, ProFormText, SubmitterProps} from "@ant-design/pro-components";
-import http from "@api/http.ts";
-import {API_ENDPOINTS} from "@api/endpoints.ts";
-import {Col, Row} from "antd";
-import "@douyinfe/semi-foundation/lib/es/button/button.css?inline"
-import {LoginParams, UserState} from "@src/types/User/data";
-import {useNavigate} from "react-router";
-
-
-const Login = () => {
- // const dispatch = useDispatch();
- const navigate = useNavigate();
-
- // @ts-ignore
- const [ldapEnabled, setLdapEnabled] = useState(false);
- const [submitting, setSubmitting] = useState(false);
-
- const [form] = useForm<LoginParams>();
-
-
- useEffect(() => {
- // todo: get ldap enabled status , the backend code is not ready yet
- // http.httpGet(API_ENDPOINTS.GET_LDAP_ENABLE).then(res => {
- // setLdapEnabled(res.data);
- // form.setFieldValue("ldapLogin",res.data)
- // }, err => console.error(err))
- }, []);
-
-
- const handleClickLogin = async () => {
- setSubmitting(true);
- const values = await form.validateFields();
- const response = await http.httpPost<UserState, typeof values>(
- API_ENDPOINTS.LOGIN,
- {...values},
- () => setSubmitting(true),
- () => setSubmitting(false)
- );
-
- if (response.status) {
- navigate('/playground')
- } else {
- console.error('Login failed:', response.saTokenInfo);
- }
- };
-
- const proFormSubmitter: SubmitterProps = {
- searchConfig: {submitText: 'Login'},
- resetButtonProps: false,
- submitButtonProps: {
- className: "semi-button-primary",
- type: 'primary',
- loading: submitting,
- autoFocus: true,
- htmlType: 'submit',
- size: "large",
- shape: "round",
- style: {
- width: '100%',
- }
- },
- };
-
-
- return <Container>
- <Card style={{width: 400}}>
- <h3>Paimon Manager</h3>
- <ProForm
- form={form}
- onFinish={handleClickLogin}
- initialValues={{rememberMe: true}}
- submitter={{...proFormSubmitter}}
- >
- <ProFormText
- name="username"
- label="Username"
- placeholder="Please input username"
- rules={[{required: true, message: 'Please input username'}]}
- />
- <ProFormText.Password
- name="password"
- label="Password"
- placeholder="Please input password"
- rules={[{required: true, message: 'Please input password'}]}
- />
- <Row>
- <Col span={18}>
- <ProFormCheckbox name="rememberMe">
- {/*{l("login.rememberMe")}*/} Remember Me
- </ProFormCheckbox>
- </Col>
- <Col span={6}>
- <ProFormCheckbox name="ldapLogin" hidden={!ldapEnabled}>
- {/*{l("login.ldapLogin")}*/} LDAP Login
- </ProFormCheckbox>
- </Col>
- </Row>
- </ProForm>
- </Card>
- </Container>
-}
-
-export default Login;
-
-const Container = styled.div`
- background: url('https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/V-_oS6r-i7wAAAAAAAAAAAAAFl94AQBr') no-repeat;
- background-size: 100% 100%;
- height: 100vh;
- overflow: hidden;
- width: 100vw;
- display: flex;
- flex-direction: row;
- flex-wrap: nowrap;
- align-content: center;
- justify-content: center;
- align-items: center;
- h3 {
- font-size: 24px;
- font-weight: 600;
- text-align: center;
- margin: 10px auto 20px;
- }
-`
\ No newline at end of file
diff --git a/paimon-web-ui/src/pages/Playground/components/RightContent/components/BottomPanel/index.tsx b/paimon-web-ui/src/pages/Playground/components/RightContent/components/BottomPanel/index.tsx
deleted file mode 100644
index ee4772f..0000000
--- a/paimon-web-ui/src/pages/Playground/components/RightContent/components/BottomPanel/index.tsx
+++ /dev/null
@@ -1,26 +0,0 @@
-/* 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. */
-
-const BottomPanel = () => {
- return(
- <div>
- <div></div>
- </div>
- )
-}
-
-export default BottomPanel;
diff --git a/paimon-web-ui/src/pages/Playground/components/RightContent/components/TopPanel/Tab/index.tsx b/paimon-web-ui/src/pages/Playground/components/RightContent/components/TopPanel/Tab/index.tsx
deleted file mode 100644
index 3397ad3..0000000
--- a/paimon-web-ui/src/pages/Playground/components/RightContent/components/TopPanel/Tab/index.tsx
+++ /dev/null
@@ -1,51 +0,0 @@
-/* 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 {useState} from 'react';
-import {TabPane, Tabs} from '@douyinfe/semi-ui';
-import {IconCode} from "@douyinfe/semi-icons";
-import Editor from "@components/Editor";
-
-const Index = () => {
- const genContent = (value:string) => {
- return <Editor value={value}/>
- }
- const [tabList, setTabList] = useState([
- { tab: 'user', itemKey: '1', content: genContent(""), closable: true },
- { tab: 'student', itemKey: '2', content: genContent("12"), closable: true }
- ]);
-
-
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- const close = (key:string) => {
- const newTabList = tabList.filter((t) => t.itemKey !== key);
- setTabList(newTabList);
- };
-
-
- return (
- <Tabs type="card" defaultActiveKey="1" onTabClose={close}>
- {tabList.map((t) => (
- <TabPane closable={t.closable} tab={<span><IconCode style={{color: "rgba(var(--semi-blue-5), 1)"}}/>{t.tab}</span>} itemKey={t.itemKey} key={t.itemKey}>
- {t.content}
- </TabPane>
- ))}
- </Tabs>
- )
-}
-
-export default Index;
diff --git a/paimon-web-ui/src/pages/Playground/components/RightContent/components/TopPanel/index.tsx b/paimon-web-ui/src/pages/Playground/components/RightContent/components/TopPanel/index.tsx
deleted file mode 100644
index 234a1c6..0000000
--- a/paimon-web-ui/src/pages/Playground/components/RightContent/components/TopPanel/index.tsx
+++ /dev/null
@@ -1,30 +0,0 @@
-/* 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 PlaygroundRightHeaderTab from "@pages/Playground/components/RightContent/components/TopPanel/Tab";
-
-const TopPanel = () => {
- return(
- <div>
- <span>
- <PlaygroundRightHeaderTab/>
- </span>
- </div>
- )
-}
-
-export default TopPanel;
diff --git a/paimon-web-ui/src/pages/Playground/components/RightContent/index.tsx b/paimon-web-ui/src/pages/Playground/components/RightContent/index.tsx
deleted file mode 100644
index d2808e0..0000000
--- a/paimon-web-ui/src/pages/Playground/components/RightContent/index.tsx
+++ /dev/null
@@ -1,33 +0,0 @@
-/* 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 BottomPanel from "@pages/Playground/components/RightContent/components/BottomPanel";
-import TopPanel from "@pages/Playground/components/RightContent/components/TopPanel";
-import { Divider } from '@douyinfe/semi-ui';
-import styles from "./right-content.module.less";
-
-const PageContent = () => {
- return(
- <div className={styles.container}>
- <TopPanel/>
- <Divider margin='-4px'/>
- <BottomPanel/>
- </div>
- )
-}
-
-export default PageContent;
diff --git a/paimon-web-ui/src/pages/Playground/components/RightContent/right-content.module.less b/paimon-web-ui/src/pages/Playground/components/RightContent/right-content.module.less
deleted file mode 100644
index 03136e0..0000000
--- a/paimon-web-ui/src/pages/Playground/components/RightContent/right-content.module.less
+++ /dev/null
@@ -1,22 +0,0 @@
-/* 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. */
-
-.container {
- width: calc(100% - 416px);
- background-color: var(--semi-color-bg-0);
- padding: 0 0 0 2px;
-}
\ No newline at end of file
diff --git a/paimon-web-ui/src/pages/Playground/components/TabMenuSidebar/components/SiderTab/index.tsx b/paimon-web-ui/src/pages/Playground/components/TabMenuSidebar/components/SiderTab/index.tsx
deleted file mode 100644
index f575714..0000000
--- a/paimon-web-ui/src/pages/Playground/components/TabMenuSidebar/components/SiderTab/index.tsx
+++ /dev/null
@@ -1,149 +0,0 @@
-/* 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 {TabPane, Tabs} from '@douyinfe/semi-ui';
-import {IconCode, IconListView, IconHistory} from '@douyinfe/semi-icons';
-import CatalogDropdown from "@components/Dropdown/CatalogDropdown.tsx";
-import TreeNode from '@pages/Playground/components/TabMenuSidebar/components/TreeComponent';
-import {useCallback, useEffect, useState} from "react";
-import styles from "./siderbar.module.less";
-
-
-const TMP_CATALOG_LIST = [
- {
- id: 1,
- name: 'catalog1',
- description: 'catalog1',
- createTime: '2021-08-01',
- updateTime: '2021-08-01',
- },
- {
- id: 2,
- name: 'catalog2',
- description: 'catalog2',
- createTime: '2021-08-01',
- updateTime: '2021-08-01',
- },
-]
-
-export type CataLog = {
- id: number;
- name: string;
- description: string;
- createTime: string;
- updateTime: string;
-}
-
-const SiderTab = () => {
-
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- // @ts-ignore
- const [catalogList, setCatalogList] = useState<CataLog[]>(TMP_CATALOG_LIST || []);
- const [avtiveCatalogId, setActiveCatalogId] = useState<number>(0);
- const [reLoadCatalog, setReLoadCatalog] = useState<boolean>(false);
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- // @ts-ignore
- const [treeLoading, setTreeLoading] = useState<boolean>(false);
-
-
- /**
- * 获取 catalog 列表
- * @type {() => Promise<void>}
- */
- const queryCatalog = useCallback(async () => {
- // todo: 获取后端 catalog 列表 ,
- console.log('CatalogDropdorn');
- }, [])
-
-
- /**
- * 获取 catalog 下的表
- * @type {() => Promise<void>}
- */
- const queryTableByCataLog = useCallback(async () => {
- // todo: 根据选择的 catalog id 获取后端 catalog 下的表
- console.log('queryDetailCataLog');
- }, [avtiveCatalogId]) // 当 avtiveCatalog 变化时,重新获取 catalog 下的表
-
-
- useEffect(() => {
- queryCatalog();
- }, []); // 当 reLoadCatalog 变化时,重新获取 catalog 列表
-
- /**
- * Catalog下拉菜单选中的事件
- * @param {number} catalogId
- */
- const handleCatalogChange = async (catalogId: number) => {
- // 设置当前选中的 catalog id
- setActiveCatalogId(catalogId);
- setTreeLoading(true);
- // 重新获取 catalog 下的表
- await queryTableByCataLog();
- setTreeLoading(false);
- }
-
- /**
- * 刷新 Catalog 列表
- */
- const handleReloadCatalog = () => {
- console.log('handleReloadCatalog')
- setReLoadCatalog(true);
- queryCatalog();
- setTimeout(() => {
- setReLoadCatalog(false);
- }, 3000)
- }
-
- return (
- <Tabs tabPosition={"left"} type={"button"} tabPaneMotion={false} className={styles.container}>
- <TabPane
- className={styles['tab-panel-container']}
- tab={
- <span>
- <IconListView size={"extra-large"} title={"Catalog"}/>
- </span>
- } itemKey={'1'}>
- <CatalogDropdown
- reloadCatalogListCallBack={() => handleReloadCatalog()}
- reLoadCatalog={reLoadCatalog}
- catalogChange={handleCatalogChange}
- catalogList={catalogList}
- />
- <TreeNode/>
- </TabPane>
- <TabPane
- tab={
- <span>
- <IconCode size={"extra-large"} title={"Saved Queries"}/>
- </span>
- } itemKey={'2'}>
- Saved Queries
- </TabPane>
- <TabPane
- tab={
- <span>
- <IconHistory size={"extra-large"} title={"History"}/>
- </span>
- } itemKey={'3'}>
- History
- </TabPane>
- </Tabs>
- )
-}
-
-export default SiderTab;
diff --git a/paimon-web-ui/src/pages/Playground/components/TabMenuSidebar/components/SiderTab/siderbar.module.less b/paimon-web-ui/src/pages/Playground/components/TabMenuSidebar/components/SiderTab/siderbar.module.less
deleted file mode 100644
index 4e5f598..0000000
--- a/paimon-web-ui/src/pages/Playground/components/TabMenuSidebar/components/SiderTab/siderbar.module.less
+++ /dev/null
@@ -1,26 +0,0 @@
-/* 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. */
-
-.container {
- width: 100%;
- margin-right: 5px;
-}
-
-.tab-panel-container {
- width: 100%;
- padding: 10px 0 0 0;
-}
\ No newline at end of file
diff --git a/paimon-web-ui/src/pages/Playground/components/TabMenuSidebar/components/TreeComponent/index.tsx b/paimon-web-ui/src/pages/Playground/components/TabMenuSidebar/components/TreeComponent/index.tsx
deleted file mode 100644
index 06279d1..0000000
--- a/paimon-web-ui/src/pages/Playground/components/TabMenuSidebar/components/TreeComponent/index.tsx
+++ /dev/null
@@ -1,179 +0,0 @@
-/* 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 { Tree } from '@douyinfe/semi-ui';
-import { Input } from '@douyinfe/semi-ui';
-import { IconFilter } from '@douyinfe/semi-icons';
-import { IconFile } from '@douyinfe/semi-icons';
-import styles from "./tree-component.module.less";
-import { useTranslation } from 'react-i18next';
-
-const TreeNode = () => {
- const { t } = useTranslation()
- const treeData = [
- {
- label: 'paimon',
- value: 'paimon',
- key: '0',
- children: [
- {
- label: 'paimon_table_01',
- value: 'paimon_table_01',
- key: '0-0',
- icon: <IconFile/>,
- children: [
- {
- label: 'id',
- value: 'id',
- key: '0-0-0',
- },
- {
- label: 'name',
- value: 'name',
- key: '0-1-0',
- },
- {
- label: 'age',
- value: 'age',
- key: '0-2-0',
- },
- {
- label: 'gender',
- value: 'gender',
- key: '0-3-0',
- },
- {
- label: 'address',
- value: 'address',
- key: '0-4-0',
- },
- ],
- },
- {
- label: 'paimon_table_02',
- value: 'paimon_table_02',
- key: '0-1',
- children: [
- {
- label: 'Osaka',
- value: 'Osaka',
- key: '0-1-0'
- }
- ]
- },
- {
- label: 'paimon_table_03',
- value: 'paimon_table_03',
- key: '0-2',
- children: [
- {
- label: 'Beijing',
- value: 'Beijing',
- key: '0-2-0',
- },
- ],
- },
- {
- label: 'paimon_table_04',
- value: 'paimon_table_04',
- key: '0-3',
- children: [
- {
- label: 'Beijing',
- value: 'Beijing',
- key: '0-3-0',
- },
- ],
- },
- {
- label: 'paimon_table_05',
- value: 'paimon_table_05',
- key: '0-4',
- children: [
- {
- label: 'Beijing',
- value: 'Beijing',
- key: '0-4-0',
- },
- ],
- },
- ],
- },
- {
- label: 'iceberg',
- value: 'iceberg',
- key: '1',
- children: [
- {
- label: 'United States',
- value: 'United States',
- key: '1-0'
- },
- {
- label: 'Canada',
- value: 'Canada',
- key: '1-1'
- }
- ]
- }
- ];
-
- /**
- * 渲染树节点 使用自定义方式 ,可以直接点击节点 展开
- * @param className
- * @param onExpand
- * @param onClick
- * @param data
- * @param expandIcon
- * @returns {JSX.Element}
- */
-
- const renderLabel = (x: any) => {
- const className = x.className;
- const onExpand = x.onExpand;
- const onClick = x.onClick;
- const data = x.data;
- const expandIcon = x.expandIcon;
- const { label } = data;
- const isLeaf = !(data.children && data.children.length);
- return (
- <li
- className={className}
- role="treeitem"
- onClick={isLeaf ? onClick : onExpand}
- >
- {isLeaf ? null : expandIcon}
- <span>{label}</span>
- </li>
- );
- };
-
- return(
- <Tree
- filterTreeNode
- treeData={treeData}
- searchPlaceholder={t('common.filter')}
- searchRender={({ prefix, ...restProps }) => (
- <Input suffix={<IconFilter/>} {...restProps}></Input>
- )}
- renderFullLabel={renderLabel}
- searchClassName={styles['tree-search-wrapper']}
- />
- )
-}
-
-export default TreeNode;
diff --git a/paimon-web-ui/src/pages/Playground/components/TabMenuSidebar/components/TreeComponent/tree-component.module.less b/paimon-web-ui/src/pages/Playground/components/TabMenuSidebar/components/TreeComponent/tree-component.module.less
deleted file mode 100644
index 892457f..0000000
--- a/paimon-web-ui/src/pages/Playground/components/TabMenuSidebar/components/TreeComponent/tree-component.module.less
+++ /dev/null
@@ -1,28 +0,0 @@
-/* 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. */
-
-.tree-search-wrapper {
- padding: 10px 0 2px 0;
-}
-
-.catalog-tree-input {
- background-color: var(--semi-color-bg-0);
-}
-
-.selected-node {
- background-color: #ff0000;
-}
diff --git a/paimon-web-ui/src/pages/Playground/components/TabMenuSidebar/index.tsx b/paimon-web-ui/src/pages/Playground/components/TabMenuSidebar/index.tsx
deleted file mode 100644
index f47fe1b..0000000
--- a/paimon-web-ui/src/pages/Playground/components/TabMenuSidebar/index.tsx
+++ /dev/null
@@ -1,29 +0,0 @@
-/* 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 SiderTab from "@pages/Playground/components/TabMenuSidebar/components/SiderTab";
-import styles from "./tab-menu-sidebar.module.less";
-
-const TabMenuSidebar = () => {
- return(
- <div className={styles.container}>
- <SiderTab/>
- </div>
- )
-}
-
-export default TabMenuSidebar;
diff --git a/paimon-web-ui/src/pages/Playground/components/TabMenuSidebar/tab-menu-sidebar.module.less b/paimon-web-ui/src/pages/Playground/components/TabMenuSidebar/tab-menu-sidebar.module.less
deleted file mode 100644
index c65b2d6..0000000
--- a/paimon-web-ui/src/pages/Playground/components/TabMenuSidebar/tab-menu-sidebar.module.less
+++ /dev/null
@@ -1,24 +0,0 @@
-/* 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. */
-
-.container {
- width: 414px;
- height: 100%;
- background-color: var(--semi-color-bg-1);
- display: flex;
- flex-direction: row;
-}
\ No newline at end of file
diff --git a/paimon-web-ui/src/pages/Playground/index.tsx b/paimon-web-ui/src/pages/Playground/index.tsx
deleted file mode 100644
index cad013b..0000000
--- a/paimon-web-ui/src/pages/Playground/index.tsx
+++ /dev/null
@@ -1,31 +0,0 @@
-/* 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 TabMenuSidebar from "@pages/Playground/components/TabMenuSidebar";
-import RightContent from "@pages/Playground/components/RightContent";
-import {Divider} from "@douyinfe/semi-ui";
-import styles from "./playground.module.less"
-
-export default function Index() {
- return(
- <div className={styles.container}>
- <TabMenuSidebar/>
- <Divider layout="vertical" margin='415px' className={styles.divider}/>
- <RightContent/>
- </div>
- )
-}
diff --git a/paimon-web-ui/src/pages/Playground/playground.module.less b/paimon-web-ui/src/pages/Playground/playground.module.less
deleted file mode 100644
index a0c0a83..0000000
--- a/paimon-web-ui/src/pages/Playground/playground.module.less
+++ /dev/null
@@ -1,27 +0,0 @@
-/* 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. */
-
-.container {
- display: flex;
- flex-direction: row;
- height: 100%;
-}
-
-.divider {
- position: fixed;
- height: 100%;
-}
\ No newline at end of file
diff --git a/paimon-web-ui-new/src/router/index.ts b/paimon-web-ui/src/router/index.ts
similarity index 100%
rename from paimon-web-ui-new/src/router/index.ts
rename to paimon-web-ui/src/router/index.ts
diff --git a/paimon-web-ui/src/router/index.tsx b/paimon-web-ui/src/router/index.tsx
deleted file mode 100644
index c912a87..0000000
--- a/paimon-web-ui/src/router/index.tsx
+++ /dev/null
@@ -1,68 +0,0 @@
-/* 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 { lazy } from 'react'*/
-import {Navigate, RouteObject} from 'react-router';
-import { useRoutes } from 'react-router-dom';
-import LayoutPage from '@src/pages/Layout';
-import PlaygroundPage from '@src/pages/Playground';
-import MetaDataPage from '@pages/Metadata';
-import DevStatus from "@pages/Abnormal/Dev";
-/*import Login from "@pages/Other/Login";*/
-
-/*const Editor = lazy(() => import('@src/pages/Playground'))
-const Studio = lazy(() => import('@src/pages/Metadata'))*/
-
-const routeList: RouteObject[] = [
- /* {
- path: '/',
- element: <Login/>,
- },*/
- {
- path: '/',
- element: <LayoutPage/>,
- children: [
- {
- path: '/',
- element: <Navigate to="playground" />
- },
- {
- path: 'playground',
- element: <PlaygroundPage/>
- },
- {
- path: 'metadata',
- element: <MetaDataPage/>
- },
- {
- path: 'system',
- element: <DevStatus/>
- }
- ]
- },
- /*{
- path: '*',
- element: <Login/>
- }*/
-]
-
-function RenderRouter() {
- const element = useRoutes(routeList)
- return element
-}
-
-export default RenderRouter
diff --git a/paimon-web-ui-new/src/router/modules/cdc_ingestion.ts b/paimon-web-ui/src/router/modules/cdc_ingestion.ts
similarity index 100%
rename from paimon-web-ui-new/src/router/modules/cdc_ingestion.ts
rename to paimon-web-ui/src/router/modules/cdc_ingestion.ts
diff --git a/paimon-web-ui-new/src/router/modules/job.ts b/paimon-web-ui/src/router/modules/job.ts
similarity index 100%
rename from paimon-web-ui-new/src/router/modules/job.ts
rename to paimon-web-ui/src/router/modules/job.ts
diff --git a/paimon-web-ui-new/src/router/modules/metadata.ts b/paimon-web-ui/src/router/modules/metadata.ts
similarity index 100%
rename from paimon-web-ui-new/src/router/modules/metadata.ts
rename to paimon-web-ui/src/router/modules/metadata.ts
diff --git a/paimon-web-ui-new/src/router/modules/playground.ts b/paimon-web-ui/src/router/modules/playground.ts
similarity index 100%
rename from paimon-web-ui-new/src/router/modules/playground.ts
rename to paimon-web-ui/src/router/modules/playground.ts
diff --git a/paimon-web-ui-new/src/router/modules/system.ts b/paimon-web-ui/src/router/modules/system.ts
similarity index 100%
rename from paimon-web-ui-new/src/router/modules/system.ts
rename to paimon-web-ui/src/router/modules/system.ts
diff --git a/paimon-web-ui-new/src/router/routes.ts b/paimon-web-ui/src/router/routes.ts
similarity index 100%
rename from paimon-web-ui-new/src/router/routes.ts
rename to paimon-web-ui/src/router/routes.ts
diff --git a/paimon-web-ui-new/src/store/catalog/index.ts b/paimon-web-ui/src/store/catalog/index.ts
similarity index 100%
rename from paimon-web-ui-new/src/store/catalog/index.ts
rename to paimon-web-ui/src/store/catalog/index.ts
diff --git a/paimon-web-ui/src/store/catalogStore.ts b/paimon-web-ui/src/store/catalogStore.ts
deleted file mode 100644
index a1efcf8..0000000
--- a/paimon-web-ui/src/store/catalogStore.ts
+++ /dev/null
@@ -1,94 +0,0 @@
-/* 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 {create} from 'zustand';
-import {persist} from "zustand/middleware";
-import {CatalogItemList} from "@src/types/Catalog/data";
-import Api from "@api/api.ts";
-import {Toast} from "@douyinfe/semi-ui";
-
-type Store = {
- catalogItemList: CatalogItemList;
- createFileSystemCatalog: (catalogProp: Prop.CatalogProp) => Promise<void>;
- createHiveCatalog: (catalogProp: Prop.CatalogProp) => Promise<void>;
- fetchCatalogData: () => Promise<void>;
-};
-
-export const useCatalogStore = create<Store>()(persist(
- (set) => ({
- catalogItemList: [],
- createFileSystemCatalog: async (catalogProp) => {
- try {
- const response = await Api.createFileSystemCatalog(catalogProp);
- if (!response) {
- throw new Error('No response from createFileSystemCatalog');
- }
- if (response.code === 200) {
- Toast.success('Catalog created successfully!');
- } else {
- console.error('Failed to create catalog:', response.msg);
- Toast.error('Failed to create catalog:' + response.msg);
- }
- } catch (error) {
- console.error('Failed to create catalog:', error);
- Toast.error('Failed to create catalog:' + error);
- }
- },
- createHiveCatalog: async (catalogProp) => {
- try {
- const response = await Api.createHiveCatalog(catalogProp);
- if (!response) {
- throw new Error('No response from createFileSystemCatalog');
- }
- if (response.code === 200) {
- Toast.success('Catalog created successfully!');
- } else {
- console.error('Failed to create catalog:', response.msg);
- Toast.error('Failed to create catalog:' + response.msg);
- }
- } catch (error) {
- console.error('Failed to create catalog:', error);
- Toast.error('Failed to create catalog:' + error);
- }
- },
- fetchCatalogData: async () => {
- try {
- const result = await Api.getAllCatalogs();
- if (result && result.data) {
- const newCatalogItemList = result.data.map((item) => {
- return {
- id: item.id,
- catalogName: item.catalogName,
- catalogType: item.catalogType,
- warehouse: item.warehouse,
- hiveUri: item.hiveUri,
- hiveConfDir: item.hiveConfDir,
- isDelete: item.isDelete,
- createTime: item.createTime,
- updateTime: item.updateTime
- };
- });
- set((state) => ({ ...state, catalogItemList: newCatalogItemList }));
- }
- } catch (error) {
- console.error('Failed to get catalogs:', error);
- }
- },
- }),{
- name: 'catalog-storage'
- }
-))
\ No newline at end of file
diff --git a/paimon-web-ui-new/src/store/cdc/index.ts b/paimon-web-ui/src/store/cdc/index.ts
similarity index 100%
rename from paimon-web-ui-new/src/store/cdc/index.ts
rename to paimon-web-ui/src/store/cdc/index.ts
diff --git a/paimon-web-ui-new/src/store/config/index.ts b/paimon-web-ui/src/store/config/index.ts
similarity index 100%
rename from paimon-web-ui-new/src/store/config/index.ts
rename to paimon-web-ui/src/store/config/index.ts
diff --git a/paimon-web-ui-new/src/store/config/type.ts b/paimon-web-ui/src/store/config/type.ts
similarity index 100%
rename from paimon-web-ui-new/src/store/config/type.ts
rename to paimon-web-ui/src/store/config/type.ts
diff --git a/paimon-web-ui/src/store/databaseStore.ts b/paimon-web-ui/src/store/databaseStore.ts
deleted file mode 100644
index b597b89..0000000
--- a/paimon-web-ui/src/store/databaseStore.ts
+++ /dev/null
@@ -1,66 +0,0 @@
-/* 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 {create} from 'zustand';
-import Api from "@api/api.ts";
-import {Toast} from "@douyinfe/semi-ui";
-import {DatabaseItem} from "@src/types/Database/data";
-import i18n from 'i18next';
-
-type Store = {
- databaseItemList: DatabaseItem[];
- createDatabase: (databaseProp: Prop.DatabaseProp) => Promise<void>;
- fetchDatabases: () => Promise<void>;
-};
-
-export const useDatabaseStore = create<Store>((set) => ({
- databaseItemList: [],
- createDatabase: async (databaseProp) => {
- try {
- const response = await Api.createDatabase(databaseProp);
- if (!response) {
- throw new Error('No response from createDatabase');
- }
- if (response.code === 200) {
- Toast.success(i18n.t('metadata.create-database-success'));
- } else {
- console.error('Failed to create database:', response.msg);
- Toast.error(i18n.t('metadata.create-database-failed') + response.msg);
- }
- } catch (error) {
- console.error('Failed to create database:', error);
- Toast.error(i18n.t('metadata.create-database-failed') + error);
- }
- },
- fetchDatabases: async () => {
- try {
- const result = await Api.getAllDatabases();
- if (result && result.data) {
- const newDatabaseItemList = result.data.map((item) => {
- return {
- databaseName: item.databaseName,
- catalogId: item.catalogId,
- description: item.description,
- };
- });
- set((state) => ({ ...state, databaseItemList: newDatabaseItemList }));
- }
- } catch (error) {
- console.error('Failed to get databases:', error);
- }
- },
-}));
\ No newline at end of file
diff --git a/paimon-web-ui/src/store/tableStore.ts b/paimon-web-ui/src/store/tableStore.ts
deleted file mode 100644
index b0d8ad6..0000000
--- a/paimon-web-ui/src/store/tableStore.ts
+++ /dev/null
@@ -1,83 +0,0 @@
-/* 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 {create} from 'zustand';
-import Api from "@api/api.ts";
-import {Toast} from "@douyinfe/semi-ui";
-import i18n from 'i18next';
-import {TableItem} from "@src/types/Table/data";
-
-type Store = {
- inputs: Array<{}>;
- configs: Array<{}>;
- tableItemList: TableItem[];
- tableNodeClicked: string;
- setTableNodeClicked: (newTableNodeClicked: string) => void;
- setInputs: (newInputs: Array<{}>) => void;
- setConfigs: (newConfigs: Array<{}>) => void;
- createTable: (tableProp: TableItem) => Promise<void>;
- fetchTables: () => Promise<void>;
-};
-
-export const useTableStore = create<Store>((set) => ({
- inputs: [{}],
- configs: [],
- tableItemList: [],
- tableNodeClicked: "",
- setTableNodeClicked: (newTableNodeClicked) => set(() => ({ tableNodeClicked: newTableNodeClicked })),
- setInputs: (newInputs) => set(() => ({ inputs: newInputs })),
- setConfigs: (newConfigs) => set(() => ({ configs: newConfigs })),
- createTable: async (tableProp) => {
- try {
- const response = await Api.createTable(tableProp);
- if (!response) {
- throw new Error('No response from createTable');
- }
- if (response.code === 200) {
- Toast.success(i18n.t('metadata.create-table-success'));
- } else {
- console.error('Failed to create table:', response.msg);
- Toast.error(i18n.t('metadata.create-table-failed') + response.msg);
- }
- } catch (error) {
- console.error('Failed to create table:', error);
- Toast.error(i18n.t('metadata.create-table-failed') + error);
- }
- },
- fetchTables: async () => {
- try {
- const result = await Api.getAllTables();
- if (result && result.data) {
- const newTableItemList = result.data.map((item) => {
- return {
- catalogName: item.catalogName,
- databaseName: item.databaseName,
- tableName: item.tableName,
- description: item.description,
- tableColumns: item.tableColumns,
- partitionKey: item.partitionKey,
- tableOptions: item.tableOptions,
- };
- });
- set((state) => ({ ...state, tableItemList: newTableItemList }));
- }
- } catch (error) {
- console.error('Failed to get tables:', error);
- }
- },
-}));
-
diff --git a/paimon-web-ui-new/src/themes/index.ts b/paimon-web-ui/src/themes/index.ts
similarity index 100%
rename from paimon-web-ui-new/src/themes/index.ts
rename to paimon-web-ui/src/themes/index.ts
diff --git a/paimon-web-ui-new/src/themes/modules/dark.ts b/paimon-web-ui/src/themes/modules/dark.ts
similarity index 100%
rename from paimon-web-ui-new/src/themes/modules/dark.ts
rename to paimon-web-ui/src/themes/modules/dark.ts
diff --git a/paimon-web-ui-new/src/themes/modules/light.ts b/paimon-web-ui/src/themes/modules/light.ts
similarity index 100%
rename from paimon-web-ui-new/src/themes/modules/light.ts
rename to paimon-web-ui/src/themes/modules/light.ts
diff --git a/paimon-web-ui/src/types/Catalog/data.d.ts b/paimon-web-ui/src/types/Catalog/data.d.ts
deleted file mode 100644
index 2bf4e51..0000000
--- a/paimon-web-ui/src/types/Catalog/data.d.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/* 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. */
-
-export type CatalogItem = {
- id: number,
- catalogName: string,
- catalogType: string,
- warehouse: string,
- hiveUri: string,
- hiveConfDir: string,
- isDelete: boolean,
- createTime: Date,
- updateTime: Date
-}
-
-export type CatalogItemList = CatalogItem[];
\ No newline at end of file
diff --git a/paimon-web-ui/src/types/Database/data.d.ts b/paimon-web-ui/src/types/Database/data.d.ts
deleted file mode 100644
index 792be79..0000000
--- a/paimon-web-ui/src/types/Database/data.d.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/* 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. */
-
-export type DatabaseItem = {
- databaseName: string,
- catalogId: number,
- description: string,
-}
\ No newline at end of file
diff --git a/paimon-web-ui/src/types/Public/data.d.ts b/paimon-web-ui/src/types/Public/data.d.ts
deleted file mode 100644
index cb0a630..0000000
--- a/paimon-web-ui/src/types/Public/data.d.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *
- * 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.
- *
- */
-
-export interface Result<T> {
- code: number;
- msg: string;
- data: T;
-}
-
-export interface PageData<T> {
- records: T[];
- page: number;
- size: number;
- total: number;
-}
-
-// with page
-export type PageResult<T> = Result<PageData<T>>
-
-export interface BaseBeanColumns extends ExcludeNameAndEnableColumns {
- name: string,
- enabled: boolean,
-}
-
-export interface ExcludeNameAndEnableColumns {
- id: number,
- createTime: Date,
- updateTime: Date,
-}
diff --git a/paimon-web-ui/src/types/Table/data.d.ts b/paimon-web-ui/src/types/Table/data.d.ts
deleted file mode 100644
index 80c7896..0000000
--- a/paimon-web-ui/src/types/Table/data.d.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/* 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. */
-
-export type TableColumn = {
- field: string,
- dataType: string,
- comment: string | null,
- isPK: boolean,
- defaultValue: string | null,
-}
-
-export type TableItem = {
- catalogName: string,
- databaseName: string,
- tableName: string,
- description: string | null,
- tableColumns: TableColumn[],
- partitionKey: [],
- tableOptions: Map<string, string>,
-}
\ No newline at end of file
diff --git a/paimon-web-ui/src/types/User/data.d.ts b/paimon-web-ui/src/types/User/data.d.ts
deleted file mode 100644
index e7fa3e2..0000000
--- a/paimon-web-ui/src/types/User/data.d.ts
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- *
- * 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 {BaseBeanColumns, ExcludeNameAndEnableColumns} from "@src/types/Public/data";
-
-/**
- * user login params
- */
-interface LoginParams {
- username: string;
- password: string;
- rememberMe: boolean;
- ldapLogin: boolean;
-}
-
-/**
- * if login success, return user info and token
- */
-export interface UserState {
- status: boolean;
- saTokenInfo: SaTokenInfo;
- roleList: Role[];
- tenantList: Tenant[];
- menuList: SysMenu[];
- user: User;
-}
-
-
-/**
- * user info
- */
-export interface User extends ExcludeNameAndEnableColumns {
- username: string;
- nickname?: string;
- password?: string;
- avatar?: string;
- worknum?: string;
- userType: number;
- mobile?: string;
- enabled: boolean;
- isDelete: boolean;
-}
-
-
-export interface SaTokenInfo {
- tokenName: string;
- tokenValue: string;
- isLogin: boolean;
- loginId: number;
- loginType: string;
- tokenTimeout: number;
- sessionTimeout: number;
- tokenSessionTimeout: number;
- tokenActivityTimeout: number;
- loginDevice: string;
- tag: string;
-}
-
-
-export interface Tenant extends ExcludeNameAndEnableColumns {
- tenantCode: string;
- isDelete: boolean;
- note?: string;
-}
-
-export interface Role extends ExcludeNameAndEnableColumns {
- tenantId: number;
- tenant: Tenant;
- roleCode?: string;
- roleName?: string;
- isDelete: boolean;
- note?: string;
-}
-
-
-export interface SysMenu extends BaseBeanColumns {
- parentId: number, // 父级
- orderNum: number, // 排序
- path: string, // 路由
- component: string, // 组件
- type: string,// C菜单 F按钮 M目录
- display: boolean, // 菜单状态(0显示 1隐藏)
- perms: string, // 权限标识
- icon: string, // 图标
- rootMenu: boolean,
- note: string,
- children: SysMenu[],
-}
diff --git a/paimon-web-ui/src/utils/mode.ts b/paimon-web-ui/src/utils/mode.ts
deleted file mode 100644
index 1dc436a..0000000
--- a/paimon-web-ui/src/utils/mode.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-/* 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 { useEffect } from 'react';
-import {useLocalStorage} from "@src/hooks/localStorage";
-
-const useThemeSwitcher = () => {
- const [dark, setDark] = useLocalStorage("dark", false);
-
- const switchMode = () => {
- const body = document.body;
- if (body.hasAttribute('theme-mode')) {
- body.removeAttribute('theme-mode');
- const updatedValue = !dark;
- setDark(updatedValue);
- console.log("白")
- } else {
- body.setAttribute('theme-mode', 'dark');
- setDark(!dark);
- console.log("黑")
- }
- };
-
- useEffect(() => {
- const body = document.body;
- if (dark) {
- body.setAttribute('theme-mode', 'dark');
- } else {
- body.removeAttribute('theme-mode');
- }
- }, [dark]);
-
- return { dark, switchMode };
-};
-
-export default useThemeSwitcher;
diff --git a/paimon-web-ui-new/src/views/cdc/components/dag/context-menu.tsx b/paimon-web-ui/src/views/cdc/components/dag/context-menu.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/cdc/components/dag/context-menu.tsx
rename to paimon-web-ui/src/views/cdc/components/dag/context-menu.tsx
diff --git a/paimon-web-ui-new/src/views/cdc/components/dag/custom-node.tsx b/paimon-web-ui/src/views/cdc/components/dag/custom-node.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/cdc/components/dag/custom-node.tsx
rename to paimon-web-ui/src/views/cdc/components/dag/custom-node.tsx
diff --git a/paimon-web-ui-new/src/views/cdc/components/dag/dag-canvas.tsx b/paimon-web-ui/src/views/cdc/components/dag/dag-canvas.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/cdc/components/dag/dag-canvas.tsx
rename to paimon-web-ui/src/views/cdc/components/dag/dag-canvas.tsx
diff --git a/paimon-web-ui-new/src/views/cdc/components/dag/dag-slider.tsx b/paimon-web-ui/src/views/cdc/components/dag/dag-slider.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/cdc/components/dag/dag-slider.tsx
rename to paimon-web-ui/src/views/cdc/components/dag/dag-slider.tsx
diff --git a/paimon-web-ui-new/src/views/cdc/components/dag/drawer.tsx b/paimon-web-ui/src/views/cdc/components/dag/drawer.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/cdc/components/dag/drawer.tsx
rename to paimon-web-ui/src/views/cdc/components/dag/drawer.tsx
diff --git a/paimon-web-ui-new/src/views/cdc/components/dag/index.module.scss b/paimon-web-ui/src/views/cdc/components/dag/index.module.scss
similarity index 100%
rename from paimon-web-ui-new/src/views/cdc/components/dag/index.module.scss
rename to paimon-web-ui/src/views/cdc/components/dag/index.module.scss
diff --git a/paimon-web-ui-new/src/views/cdc/components/dag/index.tsx b/paimon-web-ui/src/views/cdc/components/dag/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/cdc/components/dag/index.tsx
rename to paimon-web-ui/src/views/cdc/components/dag/index.tsx
diff --git a/paimon-web-ui-new/src/views/cdc/components/dag/node-config.ts b/paimon-web-ui/src/views/cdc/components/dag/node-config.ts
similarity index 100%
rename from paimon-web-ui-new/src/views/cdc/components/dag/node-config.ts
rename to paimon-web-ui/src/views/cdc/components/dag/node-config.ts
diff --git a/paimon-web-ui-new/src/views/cdc/components/dag/use-canvas-init.ts b/paimon-web-ui/src/views/cdc/components/dag/use-canvas-init.ts
similarity index 100%
rename from paimon-web-ui-new/src/views/cdc/components/dag/use-canvas-init.ts
rename to paimon-web-ui/src/views/cdc/components/dag/use-canvas-init.ts
diff --git a/paimon-web-ui-new/src/views/cdc/components/list/index.module.scss b/paimon-web-ui/src/views/cdc/components/list/index.module.scss
similarity index 100%
rename from paimon-web-ui-new/src/views/cdc/components/list/index.module.scss
rename to paimon-web-ui/src/views/cdc/components/list/index.module.scss
diff --git a/paimon-web-ui-new/src/views/cdc/components/list/index.tsx b/paimon-web-ui/src/views/cdc/components/list/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/cdc/components/list/index.tsx
rename to paimon-web-ui/src/views/cdc/components/list/index.tsx
diff --git a/paimon-web-ui-new/src/views/cdc/components/list/use-table.ts b/paimon-web-ui/src/views/cdc/components/list/use-table.ts
similarity index 100%
rename from paimon-web-ui-new/src/views/cdc/components/list/use-table.ts
rename to paimon-web-ui/src/views/cdc/components/list/use-table.ts
diff --git a/paimon-web-ui-new/src/views/cdc/index.module.scss b/paimon-web-ui/src/views/cdc/index.module.scss
similarity index 100%
rename from paimon-web-ui-new/src/views/cdc/index.module.scss
rename to paimon-web-ui/src/views/cdc/index.module.scss
diff --git a/paimon-web-ui-new/src/views/cdc/index.tsx b/paimon-web-ui/src/views/cdc/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/cdc/index.tsx
rename to paimon-web-ui/src/views/cdc/index.tsx
diff --git a/paimon-web-ui-new/src/views/job/components/statistic-card/index.module.scss b/paimon-web-ui/src/views/job/components/statistic-card/index.module.scss
similarity index 100%
rename from paimon-web-ui-new/src/views/job/components/statistic-card/index.module.scss
rename to paimon-web-ui/src/views/job/components/statistic-card/index.module.scss
diff --git a/paimon-web-ui-new/src/views/job/components/statistic-card/index.tsx b/paimon-web-ui/src/views/job/components/statistic-card/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/job/components/statistic-card/index.tsx
rename to paimon-web-ui/src/views/job/components/statistic-card/index.tsx
diff --git a/paimon-web-ui-new/src/views/job/components/status-tag/index.tsx b/paimon-web-ui/src/views/job/components/status-tag/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/job/components/status-tag/index.tsx
rename to paimon-web-ui/src/views/job/components/status-tag/index.tsx
diff --git a/paimon-web-ui-new/src/views/job/constant.tsx b/paimon-web-ui/src/views/job/constant.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/job/constant.tsx
rename to paimon-web-ui/src/views/job/constant.tsx
diff --git a/paimon-web-ui-new/src/views/job/index.module.scss b/paimon-web-ui/src/views/job/index.module.scss
similarity index 100%
rename from paimon-web-ui-new/src/views/job/index.module.scss
rename to paimon-web-ui/src/views/job/index.module.scss
diff --git a/paimon-web-ui-new/src/views/job/index.tsx b/paimon-web-ui/src/views/job/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/job/index.tsx
rename to paimon-web-ui/src/views/job/index.tsx
diff --git a/paimon-web-ui-new/src/views/login/index.module.scss b/paimon-web-ui/src/views/login/index.module.scss
similarity index 100%
rename from paimon-web-ui-new/src/views/login/index.module.scss
rename to paimon-web-ui/src/views/login/index.module.scss
diff --git a/paimon-web-ui-new/src/views/login/index.tsx b/paimon-web-ui/src/views/login/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/login/index.tsx
rename to paimon-web-ui/src/views/login/index.tsx
diff --git a/paimon-web-ui-new/src/views/login/use-form.ts b/paimon-web-ui/src/views/login/use-form.ts
similarity index 100%
rename from paimon-web-ui-new/src/views/login/use-form.ts
rename to paimon-web-ui/src/views/login/use-form.ts
diff --git a/paimon-web-ui-new/src/views/metadata/components/breadcrumb/index.tsx b/paimon-web-ui/src/views/metadata/components/breadcrumb/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/metadata/components/breadcrumb/index.tsx
rename to paimon-web-ui/src/views/metadata/components/breadcrumb/index.tsx
diff --git a/paimon-web-ui-new/src/views/metadata/components/catalog-form/index.tsx b/paimon-web-ui/src/views/metadata/components/catalog-form/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/metadata/components/catalog-form/index.tsx
rename to paimon-web-ui/src/views/metadata/components/catalog-form/index.tsx
diff --git a/paimon-web-ui-new/src/views/metadata/components/columns-form/index.tsx b/paimon-web-ui/src/views/metadata/components/columns-form/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/metadata/components/columns-form/index.tsx
rename to paimon-web-ui/src/views/metadata/components/columns-form/index.tsx
diff --git a/paimon-web-ui-new/src/views/metadata/components/database-form/index.tsx b/paimon-web-ui/src/views/metadata/components/database-form/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/metadata/components/database-form/index.tsx
rename to paimon-web-ui/src/views/metadata/components/database-form/index.tsx
diff --git a/paimon-web-ui-new/src/views/metadata/components/datafile/index.tsx b/paimon-web-ui/src/views/metadata/components/datafile/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/metadata/components/datafile/index.tsx
rename to paimon-web-ui/src/views/metadata/components/datafile/index.tsx
diff --git a/paimon-web-ui-new/src/views/metadata/components/manifest/index.tsx b/paimon-web-ui/src/views/metadata/components/manifest/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/metadata/components/manifest/index.tsx
rename to paimon-web-ui/src/views/metadata/components/manifest/index.tsx
diff --git a/paimon-web-ui-new/src/views/metadata/components/menu-tree/index.module.scss b/paimon-web-ui/src/views/metadata/components/menu-tree/index.module.scss
similarity index 100%
rename from paimon-web-ui-new/src/views/metadata/components/menu-tree/index.module.scss
rename to paimon-web-ui/src/views/metadata/components/menu-tree/index.module.scss
diff --git a/paimon-web-ui-new/src/views/metadata/components/menu-tree/index.tsx b/paimon-web-ui/src/views/metadata/components/menu-tree/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/metadata/components/menu-tree/index.tsx
rename to paimon-web-ui/src/views/metadata/components/menu-tree/index.tsx
diff --git a/paimon-web-ui-new/src/views/metadata/components/metadata-tabs/index.module.scss b/paimon-web-ui/src/views/metadata/components/metadata-tabs/index.module.scss
similarity index 100%
rename from paimon-web-ui-new/src/views/metadata/components/metadata-tabs/index.module.scss
rename to paimon-web-ui/src/views/metadata/components/metadata-tabs/index.module.scss
diff --git a/paimon-web-ui-new/src/views/metadata/components/metadata-tabs/index.tsx b/paimon-web-ui/src/views/metadata/components/metadata-tabs/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/metadata/components/metadata-tabs/index.tsx
rename to paimon-web-ui/src/views/metadata/components/metadata-tabs/index.tsx
diff --git a/paimon-web-ui-new/src/views/metadata/components/options-form-content/index.tsx b/paimon-web-ui/src/views/metadata/components/options-form-content/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/metadata/components/options-form-content/index.tsx
rename to paimon-web-ui/src/views/metadata/components/options-form-content/index.tsx
diff --git a/paimon-web-ui-new/src/views/metadata/components/options-form/edit.tsx b/paimon-web-ui/src/views/metadata/components/options-form/edit.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/metadata/components/options-form/edit.tsx
rename to paimon-web-ui/src/views/metadata/components/options-form/edit.tsx
diff --git a/paimon-web-ui-new/src/views/metadata/components/options-form/index.tsx b/paimon-web-ui/src/views/metadata/components/options-form/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/metadata/components/options-form/index.tsx
rename to paimon-web-ui/src/views/metadata/components/options-form/index.tsx
diff --git a/paimon-web-ui-new/src/views/metadata/components/options/index.tsx b/paimon-web-ui/src/views/metadata/components/options/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/metadata/components/options/index.tsx
rename to paimon-web-ui/src/views/metadata/components/options/index.tsx
diff --git a/paimon-web-ui-new/src/views/metadata/components/schema/columns.ts b/paimon-web-ui/src/views/metadata/components/schema/columns.ts
similarity index 100%
rename from paimon-web-ui-new/src/views/metadata/components/schema/columns.ts
rename to paimon-web-ui/src/views/metadata/components/schema/columns.ts
diff --git a/paimon-web-ui-new/src/views/metadata/components/schema/index.module.scss b/paimon-web-ui/src/views/metadata/components/schema/index.module.scss
similarity index 100%
rename from paimon-web-ui-new/src/views/metadata/components/schema/index.module.scss
rename to paimon-web-ui/src/views/metadata/components/schema/index.module.scss
diff --git a/paimon-web-ui-new/src/views/metadata/components/schema/index.tsx b/paimon-web-ui/src/views/metadata/components/schema/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/metadata/components/schema/index.tsx
rename to paimon-web-ui/src/views/metadata/components/schema/index.tsx
diff --git a/paimon-web-ui-new/src/views/metadata/components/snapshot/index.tsx b/paimon-web-ui/src/views/metadata/components/snapshot/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/metadata/components/snapshot/index.tsx
rename to paimon-web-ui/src/views/metadata/components/snapshot/index.tsx
diff --git a/paimon-web-ui-new/src/views/metadata/components/table-column-content/constant.ts b/paimon-web-ui/src/views/metadata/components/table-column-content/constant.ts
similarity index 100%
rename from paimon-web-ui-new/src/views/metadata/components/table-column-content/constant.ts
rename to paimon-web-ui/src/views/metadata/components/table-column-content/constant.ts
diff --git a/paimon-web-ui-new/src/views/metadata/components/table-column-content/index.tsx b/paimon-web-ui/src/views/metadata/components/table-column-content/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/metadata/components/table-column-content/index.tsx
rename to paimon-web-ui/src/views/metadata/components/table-column-content/index.tsx
diff --git a/paimon-web-ui-new/src/views/metadata/components/table-form/index.module.scss b/paimon-web-ui/src/views/metadata/components/table-form/index.module.scss
similarity index 100%
rename from paimon-web-ui-new/src/views/metadata/components/table-form/index.module.scss
rename to paimon-web-ui/src/views/metadata/components/table-form/index.module.scss
diff --git a/paimon-web-ui-new/src/views/metadata/components/table-form/index.tsx b/paimon-web-ui/src/views/metadata/components/table-form/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/metadata/components/table-form/index.tsx
rename to paimon-web-ui/src/views/metadata/components/table-form/index.tsx
diff --git a/paimon-web-ui-new/src/views/metadata/components/table/index.tsx b/paimon-web-ui/src/views/metadata/components/table/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/metadata/components/table/index.tsx
rename to paimon-web-ui/src/views/metadata/components/table/index.tsx
diff --git a/paimon-web-ui-new/src/views/metadata/constant.ts b/paimon-web-ui/src/views/metadata/constant.ts
similarity index 100%
rename from paimon-web-ui-new/src/views/metadata/constant.ts
rename to paimon-web-ui/src/views/metadata/constant.ts
diff --git a/paimon-web-ui-new/src/views/metadata/index.module.scss b/paimon-web-ui/src/views/metadata/index.module.scss
similarity index 100%
rename from paimon-web-ui-new/src/views/metadata/index.module.scss
rename to paimon-web-ui/src/views/metadata/index.module.scss
diff --git a/paimon-web-ui-new/src/views/metadata/index.tsx b/paimon-web-ui/src/views/metadata/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/metadata/index.tsx
rename to paimon-web-ui/src/views/metadata/index.tsx
diff --git a/paimon-web-ui-new/src/views/playground/components/query/components/console/index.module.scss b/paimon-web-ui/src/views/playground/components/query/components/console/index.module.scss
similarity index 100%
rename from paimon-web-ui-new/src/views/playground/components/query/components/console/index.module.scss
rename to paimon-web-ui/src/views/playground/components/query/components/console/index.module.scss
diff --git a/paimon-web-ui-new/src/views/playground/components/query/components/console/index.tsx b/paimon-web-ui/src/views/playground/components/query/components/console/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/playground/components/query/components/console/index.tsx
rename to paimon-web-ui/src/views/playground/components/query/components/console/index.tsx
diff --git a/paimon-web-ui-new/src/views/playground/components/query/components/debugger/index.module.scss b/paimon-web-ui/src/views/playground/components/query/components/debugger/index.module.scss
similarity index 100%
rename from paimon-web-ui-new/src/views/playground/components/query/components/debugger/index.module.scss
rename to paimon-web-ui/src/views/playground/components/query/components/debugger/index.module.scss
diff --git a/paimon-web-ui-new/src/views/playground/components/query/components/debugger/index.tsx b/paimon-web-ui/src/views/playground/components/query/components/debugger/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/playground/components/query/components/debugger/index.tsx
rename to paimon-web-ui/src/views/playground/components/query/components/debugger/index.tsx
diff --git a/paimon-web-ui-new/src/views/playground/components/query/components/menu-tree/index.module.scss b/paimon-web-ui/src/views/playground/components/query/components/menu-tree/index.module.scss
similarity index 100%
rename from paimon-web-ui-new/src/views/playground/components/query/components/menu-tree/index.module.scss
rename to paimon-web-ui/src/views/playground/components/query/components/menu-tree/index.module.scss
diff --git a/paimon-web-ui-new/src/views/playground/components/query/components/menu-tree/index.tsx b/paimon-web-ui/src/views/playground/components/query/components/menu-tree/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/playground/components/query/components/menu-tree/index.tsx
rename to paimon-web-ui/src/views/playground/components/query/components/menu-tree/index.tsx
diff --git a/paimon-web-ui-new/src/views/playground/components/query/components/tabs/index.module.scss b/paimon-web-ui/src/views/playground/components/query/components/tabs/index.module.scss
similarity index 100%
rename from paimon-web-ui-new/src/views/playground/components/query/components/tabs/index.module.scss
rename to paimon-web-ui/src/views/playground/components/query/components/tabs/index.module.scss
diff --git a/paimon-web-ui-new/src/views/playground/components/query/components/tabs/index.tsx b/paimon-web-ui/src/views/playground/components/query/components/tabs/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/playground/components/query/components/tabs/index.tsx
rename to paimon-web-ui/src/views/playground/components/query/components/tabs/index.tsx
diff --git a/paimon-web-ui-new/src/views/playground/components/query/index.module.scss b/paimon-web-ui/src/views/playground/components/query/index.module.scss
similarity index 100%
rename from paimon-web-ui-new/src/views/playground/components/query/index.module.scss
rename to paimon-web-ui/src/views/playground/components/query/index.module.scss
diff --git a/paimon-web-ui-new/src/views/playground/components/query/index.tsx b/paimon-web-ui/src/views/playground/components/query/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/playground/components/query/index.tsx
rename to paimon-web-ui/src/views/playground/components/query/index.tsx
diff --git a/paimon-web-ui-new/src/views/playground/components/slider/index.module.scss b/paimon-web-ui/src/views/playground/components/slider/index.module.scss
similarity index 100%
rename from paimon-web-ui-new/src/views/playground/components/slider/index.module.scss
rename to paimon-web-ui/src/views/playground/components/slider/index.module.scss
diff --git a/paimon-web-ui-new/src/views/playground/components/slider/index.tsx b/paimon-web-ui/src/views/playground/components/slider/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/playground/components/slider/index.tsx
rename to paimon-web-ui/src/views/playground/components/slider/index.tsx
diff --git a/paimon-web-ui-new/src/views/playground/components/workbench/components/console/index.module.scss b/paimon-web-ui/src/views/playground/components/workbench/components/console/index.module.scss
similarity index 100%
rename from paimon-web-ui-new/src/views/playground/components/workbench/components/console/index.module.scss
rename to paimon-web-ui/src/views/playground/components/workbench/components/console/index.module.scss
diff --git a/paimon-web-ui-new/src/views/playground/components/workbench/components/console/index.tsx b/paimon-web-ui/src/views/playground/components/workbench/components/console/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/playground/components/workbench/components/console/index.tsx
rename to paimon-web-ui/src/views/playground/components/workbench/components/console/index.tsx
diff --git a/paimon-web-ui-new/src/views/playground/components/workbench/components/debugger/index.module.scss b/paimon-web-ui/src/views/playground/components/workbench/components/debugger/index.module.scss
similarity index 100%
rename from paimon-web-ui-new/src/views/playground/components/workbench/components/debugger/index.module.scss
rename to paimon-web-ui/src/views/playground/components/workbench/components/debugger/index.module.scss
diff --git a/paimon-web-ui-new/src/views/playground/components/workbench/components/debugger/index.tsx b/paimon-web-ui/src/views/playground/components/workbench/components/debugger/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/playground/components/workbench/components/debugger/index.tsx
rename to paimon-web-ui/src/views/playground/components/workbench/components/debugger/index.tsx
diff --git a/paimon-web-ui-new/src/views/playground/components/workbench/components/menu-tree/index.module.scss b/paimon-web-ui/src/views/playground/components/workbench/components/menu-tree/index.module.scss
similarity index 100%
rename from paimon-web-ui-new/src/views/playground/components/workbench/components/menu-tree/index.module.scss
rename to paimon-web-ui/src/views/playground/components/workbench/components/menu-tree/index.module.scss
diff --git a/paimon-web-ui-new/src/views/playground/components/workbench/components/menu-tree/index.tsx b/paimon-web-ui/src/views/playground/components/workbench/components/menu-tree/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/playground/components/workbench/components/menu-tree/index.tsx
rename to paimon-web-ui/src/views/playground/components/workbench/components/menu-tree/index.tsx
diff --git a/paimon-web-ui-new/src/views/playground/components/workbench/components/tabs/index.module.scss b/paimon-web-ui/src/views/playground/components/workbench/components/tabs/index.module.scss
similarity index 100%
rename from paimon-web-ui-new/src/views/playground/components/workbench/components/tabs/index.module.scss
rename to paimon-web-ui/src/views/playground/components/workbench/components/tabs/index.module.scss
diff --git a/paimon-web-ui-new/src/views/playground/components/workbench/components/tabs/index.tsx b/paimon-web-ui/src/views/playground/components/workbench/components/tabs/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/playground/components/workbench/components/tabs/index.tsx
rename to paimon-web-ui/src/views/playground/components/workbench/components/tabs/index.tsx
diff --git a/paimon-web-ui-new/src/views/playground/components/workbench/index.module.scss b/paimon-web-ui/src/views/playground/components/workbench/index.module.scss
similarity index 100%
rename from paimon-web-ui-new/src/views/playground/components/workbench/index.module.scss
rename to paimon-web-ui/src/views/playground/components/workbench/index.module.scss
diff --git a/paimon-web-ui-new/src/views/playground/components/workbench/index.tsx b/paimon-web-ui/src/views/playground/components/workbench/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/playground/components/workbench/index.tsx
rename to paimon-web-ui/src/views/playground/components/workbench/index.tsx
diff --git a/paimon-web-ui-new/src/views/playground/index.module.scss b/paimon-web-ui/src/views/playground/index.module.scss
similarity index 100%
rename from paimon-web-ui-new/src/views/playground/index.module.scss
rename to paimon-web-ui/src/views/playground/index.module.scss
diff --git a/paimon-web-ui-new/src/views/playground/index.tsx b/paimon-web-ui/src/views/playground/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/playground/index.tsx
rename to paimon-web-ui/src/views/playground/index.tsx
diff --git a/paimon-web-ui-new/src/views/system/index.module.scss b/paimon-web-ui/src/views/system/index.module.scss
similarity index 100%
rename from paimon-web-ui-new/src/views/system/index.module.scss
rename to paimon-web-ui/src/views/system/index.module.scss
diff --git a/paimon-web-ui-new/src/views/system/index.tsx b/paimon-web-ui/src/views/system/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/system/index.tsx
rename to paimon-web-ui/src/views/system/index.tsx
diff --git a/paimon-web-ui-new/src/views/system/role/index.module.scss b/paimon-web-ui/src/views/system/role/index.module.scss
similarity index 100%
rename from paimon-web-ui-new/src/views/system/role/index.module.scss
rename to paimon-web-ui/src/views/system/role/index.module.scss
diff --git a/paimon-web-ui-new/src/views/system/role/index.tsx b/paimon-web-ui/src/views/system/role/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/system/role/index.tsx
rename to paimon-web-ui/src/views/system/role/index.tsx
diff --git a/paimon-web-ui-new/src/views/system/role/use-constants.ts b/paimon-web-ui/src/views/system/role/use-constants.ts
similarity index 100%
rename from paimon-web-ui-new/src/views/system/role/use-constants.ts
rename to paimon-web-ui/src/views/system/role/use-constants.ts
diff --git a/paimon-web-ui-new/src/views/system/role/use-table.ts b/paimon-web-ui/src/views/system/role/use-table.ts
similarity index 100%
rename from paimon-web-ui-new/src/views/system/role/use-table.ts
rename to paimon-web-ui/src/views/system/role/use-table.ts
diff --git a/paimon-web-ui-new/src/views/system/user/index.module.scss b/paimon-web-ui/src/views/system/user/index.module.scss
similarity index 100%
rename from paimon-web-ui-new/src/views/system/user/index.module.scss
rename to paimon-web-ui/src/views/system/user/index.module.scss
diff --git a/paimon-web-ui-new/src/views/system/user/index.tsx b/paimon-web-ui/src/views/system/user/index.tsx
similarity index 100%
rename from paimon-web-ui-new/src/views/system/user/index.tsx
rename to paimon-web-ui/src/views/system/user/index.tsx
diff --git a/paimon-web-ui/src/vite-env.d.ts b/paimon-web-ui/src/vite-env.d.ts
deleted file mode 100644
index b4c9812..0000000
--- a/paimon-web-ui/src/vite-env.d.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/* 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. */
-
-/// <reference types="vite/client" />
diff --git a/paimon-web-ui-new/tsconfig.app.json b/paimon-web-ui/tsconfig.app.json
similarity index 100%
rename from paimon-web-ui-new/tsconfig.app.json
rename to paimon-web-ui/tsconfig.app.json
diff --git a/paimon-web-ui/tsconfig.json b/paimon-web-ui/tsconfig.json
index eb79bd4..78f134a 100644
--- a/paimon-web-ui/tsconfig.json
+++ b/paimon-web-ui/tsconfig.json
@@ -1,36 +1,11 @@
{
- "compilerOptions": {
- "target": "ES2020",
- "useDefineForClassFields": true,
- "lib": ["ES2020", "DOM", "DOM.Iterable"],
- "module": "ESNext",
- "skipLibCheck": true,
-
- /* Bundler mode */
- "moduleResolution": "bundler",
- "allowImportingTsExtensions": true,
- "resolveJsonModule": true,
- "isolatedModules": true,
- "noEmit": true,
- "jsx": "react-jsx",
-
- /* Linting */
- "strict": true,
- "noUnusedLocals": true,
- "noUnusedParameters": true,
- "noFallthroughCasesInSwitch": true,
- "baseUrl": ".",
- "paths": {
- "@src/*": ["src/*"],
- "@assets/*": ["src/assets/*"],
- "@components/*": ["src/components/*"],
- "@config/*": ["src/config/*"],
- "@utils/*": ["src/utils/*"],
- "@pages/*": ["src/pages/*"],
- "@api/*": ["src/api/*"],
- "@mock/*": ["mock/*"]
+ "files": [],
+ "references": [
+ {
+ "path": "./tsconfig.node.json"
+ },
+ {
+ "path": "./tsconfig.app.json"
}
- },
- "include": ["src","./**/*.d.ts", "./**/*.ts", "./**/*.tsx"],
- "references": [{ "path": "./tsconfig.node.json" }]
+ ],
}
diff --git a/paimon-web-ui/tsconfig.node.json b/paimon-web-ui/tsconfig.node.json
index 42872c5..dee96be 100644
--- a/paimon-web-ui/tsconfig.node.json
+++ b/paimon-web-ui/tsconfig.node.json
@@ -1,10 +1,16 @@
{
+ "extends": "@tsconfig/node18/tsconfig.json",
+ "include": [
+ "vite.config.*",
+ "vitest.config.*",
+ "cypress.config.*",
+ "nightwatch.conf.*",
+ "playwright.config.*"
+ ],
"compilerOptions": {
"composite": true,
- "skipLibCheck": true,
"module": "ESNext",
- "moduleResolution": "bundler",
- "allowSyntheticDefaultImports": true
- },
- "include": ["vite.config.ts"]
+ "moduleResolution": "Bundler",
+ "types": ["node"]
+ }
}
diff --git a/paimon-web-ui/vite.config.ts b/paimon-web-ui/vite.config.ts
index 1a9f901..859f6c5 100644
--- a/paimon-web-ui/vite.config.ts
+++ b/paimon-web-ui/vite.config.ts
@@ -15,36 +15,68 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License. */
+import { fileURLToPath, URL } from 'node:url'
+
import { defineConfig } from 'vite'
-import react from '@vitejs/plugin-react'
-import SemiPlugin from "vite-plugin-semi-theme";
-import { resolve } from 'path'
+import vue from '@vitejs/plugin-vue'
+import vueJsx from '@vitejs/plugin-vue-jsx'
+import AutoImport from 'unplugin-auto-import/vite'
+import Components from 'unplugin-vue-components/vite'
+import { NaiveUiResolver } from 'unplugin-vue-components/resolvers'
+// https://vitejs.dev/config/
export default defineConfig({
- plugins: [
- /*SemiPlugin({
- theme: "@semi-bot/semi-theme-figma"
- }),*/
- react()
- ],
- resolve: {
- alias: {
- '@src': resolve(__dirname, './src'),
- '@assets': resolve(__dirname, './src/assets'),
- '@components': resolve(__dirname, './src/components'),
- '@pages': resolve(__dirname, './src/pages'),
- '@utils': resolve(__dirname, './src/utils'),
- '@config': resolve(__dirname, './src/config'),
- '@mock': resolve(__dirname, './mock'),
- '@api': resolve(__dirname, './src/api')
- }
- },
server: {
proxy: {
+ '/mock': {
+ target: 'http://127.0.0.1:10088',
+ changeOrigin: true,
+ },
'/api': {
- target: 'http://localhost:10088',
- changeOrigin: true
+ target: 'http://127.0.0.1:10088',
+ changeOrigin: true,
+ }
+ }
+ },
+ plugins: [
+ vue(),
+ vueJsx(),
+ AutoImport({
+ imports: [
+ 'vue',
+ 'vue-router',
+ 'pinia',
+ {
+ 'naive-ui': [
+ 'useDialog',
+ 'useMessage',
+ 'useNotification',
+ 'useLoadingBar'
+ ]
+ }
+ ],
+ dts: './auto-imports.d.ts',
+ dirs: [
+ './src/composables',
+ ],
+ eslintrc: {
+ enabled: false
}
+ }),
+ Components({
+ resolvers: [NaiveUiResolver()]
+ })
+ ],
+ css: {
+ postcss: {
+ plugins: [
+ require("autoprefixer")
+ ]
+ }
+ },
+ resolve: {
+ alias: {
+ '@': fileURLToPath(new URL('./src', import.meta.url))
}
}
})