diff --git a/dinky-web/.eslintrc.js b/dinky-web/.eslintrc.js
index 3ac39ef607..060035f620 100644
--- a/dinky-web/.eslintrc.js
+++ b/dinky-web/.eslintrc.js
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+
module.exports = {
extends: [require.resolve('@umijs/lint/dist/config/eslint')],
globals: {
diff --git a/dinky-web/.gitignore b/dinky-web/.gitignore
index 0fb3670732..6894cc5df1 100644
--- a/dinky-web/.gitignore
+++ b/dinky-web/.gitignore
@@ -39,3 +39,5 @@ screenshot
.eslintcache
build
+
+pnpm-lock.yaml
diff --git a/dinky-web/.husky/commit-msg b/dinky-web/.husky/commit-msg
deleted file mode 100755
index d50cdcf95b..0000000000
--- a/dinky-web/.husky/commit-msg
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-. "$(dirname "$0")/_/husky.sh"
-
-# Export Git hook params
-export GIT_PARAMS=$*
-
-npx --no-install fabric verify-commit
diff --git a/dinky-web/.husky/pre-commit b/dinky-web/.husky/pre-commit
deleted file mode 100755
index d37daa075e..0000000000
--- a/dinky-web/.husky/pre-commit
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-. "$(dirname "$0")/_/husky.sh"
-
-npx --no-install lint-staged
diff --git a/dinky-web/.prettierignore b/dinky-web/.prettierignore
index 7999ccda34..e91817a6ba 100644
--- a/dinky-web/.prettierignore
+++ b/dinky-web/.prettierignore
@@ -17,6 +17,5 @@ LICENSE
*.lock
yarn-error.log
.history
-CNAME
/build
/public
diff --git a/dinky-web/.prettierrc.js b/dinky-web/.prettierrc.js
index 3447a1afd1..088d35a2b0 100644
--- a/dinky-web/.prettierrc.js
+++ b/dinky-web/.prettierrc.js
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+
module.exports = {
singleQuote: true,
trailingComma: 'all',
diff --git a/dinky-web/README.md b/dinky-web/README.md
index 4c89a727ce..fc1e06e9db 100644
--- a/dinky-web/README.md
+++ b/dinky-web/README.md
@@ -1,57 +1,43 @@
-# Ant Design Pro
+# Dinky-web
-This project is initialized with [Ant Design Pro](https://pro.ant.design). Follow is the quick guide for how to use.
+This project uses [Ant Design Pro](https://pro.ant.design) for initialization. Here's a quick guide on how to use it.
-## Environment Prepare
+[![CN doc](https://img.shields.io/badge/文档-中文版-blue.svg)](README_zh_CN.md)
+[![EN doc](https://img.shields.io/badge/document-English-blue.svg)](README.md)
-Install `node_modules`:
-```bash
-npm install
-```
+## Environment preparation
-or
-```bash
-yarn
-```
+| Environment | Version | Remarks |
+| ----------- | -------- | ------- |
+| node | 14.19.0+ | |
+| npm | 7.19.0+ | |
-## Provided Scripts
+> Configure related environment variables by yourself
-Ant Design Pro provides some useful script to help you quick start and build with web project, code style check and test.
-
-Scripts provided in `package.json`. It's safe to modify or add additional script:
-
-### Start project
+## StartUp
```bash
-npm start
+# Note: You need to enter the directory of this module to execute
+
+npm i --force && npm start
```
-### Build project
+### Build
```bash
npm run build
```
-### Check code style
+### Code Style Check
```bash
npm run lint
```
-You can also use script to auto fix some lint error:
+You can also automatically fix some lint errors with a script:
```bash
npm run lint:fix
```
-
-### Test code
-
-```bash
-npm test
-```
-
-## More
-
-You can view full document on our [official website](https://pro.ant.design). And welcome any feedback in our [github](https://github.com/ant-design/ant-design-pro).
diff --git a/dinky-web/README_zh_CN.md b/dinky-web/README_zh_CN.md
new file mode 100644
index 0000000000..a2ee6b54fd
--- /dev/null
+++ b/dinky-web/README_zh_CN.md
@@ -0,0 +1,38 @@
+# Dinky-web
+
+本项目使用 [Ant Design Pro](https://pro.ant.design) 进行初始化。 以下是如何使用的快速指南。
+
+## 环境准备
+
+
+| 环境 | 版本 | 备注 |
+| ---- | -------- | ---- |
+| node | 14.19.0+ | |
+| npm | 7.19.0+ | |
+
+> 自行配置相关环境变量
+
+## 启动
+
+```bash
+# 注意: 需要进入到此模块目录下执行
+
+npm i --force && npm start
+```
+
+### 构建
+
+```bash
+npm run build
+```
+
+### 代码样式检查
+
+```bash
+npm run lint
+```
+
+您还可以使用脚本自动修复一些 lint 错误:
+```bash
+npm run lint:fix
+```
diff --git a/dinky-web/config/config.ts b/dinky-web/config/config.ts
index acf2afd6a8..5f817ff038 100644
--- a/dinky-web/config/config.ts
+++ b/dinky-web/config/config.ts
@@ -1,6 +1,23 @@
+/*
+ * 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.
+ */
+
// https://umijs.org/config/
-import { defineConfig } from '@umijs/max';
-import { join } from 'path';
+import {defineConfig} from '@umijs/max';
+import {join} from 'path';
import defaultSettings from './defaultSettings';
import proxy from './proxy';
import routes from './routes';
@@ -76,7 +93,7 @@ export default defineConfig({
* @name layout 插件
* @doc https://umijs.org/docs/max/layout-menu
*/
- title: 'Ant Design Pro',
+ title: 'Dinky',
layout: {
locale: true,
...defaultSettings,
diff --git a/dinky-web/config/defaultSettings.ts b/dinky-web/config/defaultSettings.ts
index 2796a7ecb1..857126563d 100644
--- a/dinky-web/config/defaultSettings.ts
+++ b/dinky-web/config/defaultSettings.ts
@@ -1,4 +1,21 @@
-import { ProLayoutProps } from '@ant-design/pro-components';
+/*
+ * 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 {ProLayoutProps} from '@ant-design/pro-components';
/**
* @name
@@ -15,11 +32,80 @@ const Settings: ProLayoutProps & {
fixedHeader: false,
fixSiderbar: true,
colorWeak: false,
- title: 'Ant Design Pro',
+ title: 'Dinky Real-time Platform ',
pwa: true,
- logo: 'https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg',
+ logo: '/dinky.svg',
iconfontUrl: '',
+ splitMenus: true,
+ menu: {
+ locale: true
+ },
token: {
+ // bgLayout: '', layout 的背景颜色
+
+ // 官方 https://procomponents.ant.design/components/layout/#layout-classicmode
+ header: {
+ colorBgHeader: '#292f33',
+ colorHeaderTitle: '#fff',
+ colorTextMenu: '#dfdfdf',
+ colorTextMenuSecondary: '#dfdfdf',
+ colorTextMenuSelected: '#fff',
+ colorBgMenuItemSelected: '#22272b',
+ colorTextMenuActive: 'rgba(255,255,255,0.85)',
+ colorTextRightActionsItem: '#dfdfdf',
+ },
+ colorTextAppListIconHover: '#fff',
+ colorTextAppListIcon: '#dfdfdf',
+ sider: {
+ colorMenuBackground: '#fff',
+ colorMenuItemDivider: '#dfdfdf',
+ colorBgMenuItemHover: '#f6f6f6',
+ colorTextMenu: '#595959',
+ colorTextMenuSelected: '#242424',
+ colorTextMenuActive: '#242424',
+ colorBgMenuItemCollapsedHover: '#242424',
+ },
+ // 自定义
+ // header: {
+ // colorBgHeader: '#292f33', //header 背景色
+ // colorHeaderTitle: '#fff', //header 的 title 颜色
+ // // colorBgMenuItemHover: '', // 悬浮某项时的菜单背景色
+ // colorBgMenuItemSelected: '#1890ff', // 选中某项时的菜单背景色
+ // colorTextMenuSelected: '#fff', // 选中某项时的字体颜色
+ // // colorTextMenuActive: 'rgba(239,7,7,0.85)', // 悬浮选中某项时的字体颜色
+ // colorTextMenu: '#dfdfdf', // 字体颜色
+ // colorTextMenuSecondary: '#ffffff', // 二级菜单字体颜色
+ // // colorBgRightActionsItemHover:'',
+ // colorTextRightActionsItem: '#e10a0a',
+ // // heightLayoutHeader: 0
+ // },
+ // colorTextAppListIconHover: 'rgba(93,161,192,0.75)',
+ // colorTextAppListIcon: 'rgba(24,255,182,0.75)',
+ // // 侧边side的 token 配置
+ // sider: {
+ // // colorBgCollapsedButton: '#4c7cd5', // 折叠按钮背景色
+ // // colorTextCollapsedButtonHover: '', // 折叠按钮文本悬浮背景色
+ // // colorTextCollapsedButton: '', // 折叠按钮文本颜色
+ // colorMenuBackground: '#dfdfdf', // 侧边栏菜单整体背景色
+ // colorBgMenuItemCollapsedHover: '#8f8a8a',
+ // // colorBgMenuItemCollapsedSelected: '#6dce11',// 侧边栏收起时 二级菜单弹出时选中的背景色
+ // // colorBgMenuItemCollapsedElevated: '#800b26',// 侧边栏收起时 二级菜单弹出时的背景色
+ // colorMenuItemDivider: '#d74814',
+ // colorBgMenuItemHover: '#cb5252',
+ // colorBgMenuItemSelected: 'rgba(93,161,192,0.75)',
+ // colorTextMenuSelected: '#242424', // 选中菜单的字体颜色
+ // colorTextMenuItemHover: '#1890ff', // 悬浮菜单时的字体颜色
+ // colorTextMenuActive: '#d809ef', // 含有二级菜单的 菜单悬浮时的字体颜色
+ // // colorTextMenu: '#ab0e0e', // 侧边栏菜单字体颜色
+ // // colorTextMenuSecondary: '#ab0e0e', // 二级菜单字体颜色
+ // paddingInlineLayoutMenu: 0, // padding 内联布局菜单 间距
+ // paddingBlockLayoutMenu: 0, // padding 块布局菜单 间距
+ // /**
+ // * menu 顶部 title 的字体颜色
+ // */
+ // // colorTextMenuTitle: '#67081e',
+ // // colorTextSubMenuSelected: '#346dc0',
+ // },
// 参见ts声明,demo 见文档,通过token 修改样式
//https://procomponents.ant.design/components/layout#%E9%80%9A%E8%BF%87-token-%E4%BF%AE%E6%94%B9%E6%A0%B7%E5%BC%8F
},
diff --git a/dinky-web/config/oneapi.json b/dinky-web/config/oneapi.json
index c77d988b33..bffb8e939d 100644
--- a/dinky-web/config/oneapi.json
+++ b/dinky-web/config/oneapi.json
@@ -1,7 +1,7 @@
{
"openapi": "3.0.1",
"info": {
- "title": "Ant Design Pro",
+ "title": "Dinky",
"version": "1.0.0"
},
"servers": [
diff --git a/dinky-web/config/proxy.ts b/dinky-web/config/proxy.ts
index 1b568e2fb9..df02b8cb53 100644
--- a/dinky-web/config/proxy.ts
+++ b/dinky-web/config/proxy.ts
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+
/**
* @name 代理的配置
* @see 在生产环境 代理是无法生效的,所以这里没有生产环境的配置
diff --git a/dinky-web/config/routes.ts b/dinky-web/config/routes.ts
index 9a68bcb2e2..f7bc3de321 100644
--- a/dinky-web/config/routes.ts
+++ b/dinky-web/config/routes.ts
@@ -1,4 +1,21 @@
-/**
+/*
+ * 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.
+ */
+
+/**
* @name umi 的路由配置
* @description 只支持 path,component,routes,redirect,wrappers,name,icon 的配置
* @param path path 只支持两种占位符配置,第一种是动态参数 :id 的形式,第二种是 * 通配符,通配符只能出现路由字符串的最后。
@@ -22,38 +39,193 @@ export default [
},
],
},
+
{
- path: '/welcome',
- name: 'welcome',
- icon: 'smile',
- component: './Welcome',
+ path: '/',
+ redirect: '/dataStudio',
},
+
{
- path: '/admin',
- name: 'admin',
- icon: 'crown',
- access: 'canAdmin',
+ path: '/dataStudio',
+ name: 'dataStudio',
+ icon: 'consoleSql',
+ footerRender: false,
+ // component: './DataStudio',
+ },
+ {
+ path: '/devops',
+ name: 'devops',
+ icon: 'control',
+ // component: './DevOps',
+ },
+ {
+ path: '/job',
+ name: 'job',
+ // component: './DevOps/JobInfo',
+ hideInMenu: true,
+ },
+ {
+ path: '/datacenter',
+ name: 'datacenter',
+ icon: 'database',
routes: [
{
- path: '/admin',
- redirect: '/admin/sub-page',
+ path: '/datacenter',
+ redirect: '/datacenter/metadata',
},
{
- path: '/admin/sub-page',
- name: 'sub-page',
- component: './Admin',
+ path: '/datacenter/metadata',
+ name: 'metadata',
+ icon: 'cluster',
+ // component: './DataCenter/MetaData',
},
],
},
+
{
- name: 'list.table-list',
- icon: 'table',
- path: '/list',
- component: './TableList',
+ path: '/registration',
+ name: 'registration',
+ icon: 'appstore',
+ routes: [
+ {
+ path: '/registration',
+ redirect: '/registration/cluster/clusterInstance',
+ },
+ {
+ path: '/registration/cluster',
+ name: 'cluster',
+ icon: 'cluster',
+ routes: [
+ {
+ path: '/registration/cluster/clusterInstance',
+ name: 'clusterInstance',
+ // component: './RegistrationCenter/ClusterManage/Cluster',
+ },
+ {
+ path: '/registration/cluster/clusterConfiguration',
+ name: 'clusterConfiguration',
+ // component: './RegistrationCenter/ClusterManage/ClusterConfiguration',
+ },
+ ],
+ },
+ {
+ path: '/registration/jar',
+ name: 'jar',
+ icon: 'file',
+ // component: './RegistrationCenter/Jar',
+ },
+ {
+ path: '/registration/database',
+ name: 'database',
+ icon: 'database',
+ // component: './RegistrationCenter/DataBase',
+ },
+ {
+ path: '/registration/alert',
+ name: 'alert',
+ icon: 'alert',
+ routes: [
+ {
+ path: '/registration/alert/alertInstance',
+ name: 'alertInstance',
+ // component: './RegistrationCenter/AlertManage/AlertInstance',
+ },
+ {
+ path: '/registration/alert/alertGroup',
+ name: 'alertGroup',
+ // component: './RegistrationCenter/AlertManage/AlertGroup',
+ },
+ ],
+ }, {
+ path: '/registration/document',
+ name: 'document',
+ icon: 'container',
+ // component: './RegistrationCenter/Document',
+ },{
+ path: '/registration/fragment',
+ name: 'fragment',
+ icon: "cloud",
+ // component: './RegistrationCenter/FragmentVariable',
+ }
+ ],
},
{
- path: '/',
- redirect: '/welcome',
+ name: 'authenticationCenter',
+ icon: 'SafetyCertificateOutlined',
+ path: '/authenticationCenter',
+ // access: "canAdmin",
+ routes: [
+ {
+ path: '/authenticationCenter',
+ redirect: '/authenticationCenter/userManager',
+ },
+ {
+ path: '/authenticationCenter/userManager',
+ name: 'userManager',
+ icon: 'UserOutlined',
+ // component: './AuthenticationCenter/UserManager',
+ },
+ {
+ path: '/authenticationCenter/roleManager',
+ name: 'roleManager',
+ icon: 'TeamOutlined',
+ // component: './AuthenticationCenter/RoleManager',
+ },
+ {
+ path: '/authenticationCenter/namespaceManager',
+ name: 'namespaceManager',
+ icon: 'BulbOutlined',
+ // component: './AuthenticationCenter/NamespaceManager',
+ },
+ {
+ path: '/authenticationCenter/tenantManager',
+ name: 'tenantManager',
+ icon: 'SecurityScanOutlined',
+ // component: './AuthenticationCenter/TenantManager',
+ },
+ ],
+ },
+
+ {
+ name: 'settings',
+ icon: 'setting',
+ path: '/settingCenter',
+ routes: [
+ {
+ path: '/settingCenter',
+ redirect: '/settingCenter/flinkSettings',
+ },
+ {
+ path: '/settingCenter/flinkSettings',
+ name: 'flinkConfig',
+ icon: 'setting',
+ // component: './SettingCenter/FlinkSettings',
+ },
+ {
+ path: '/settingCenter/udfTemplate',
+ name: 'udfTemplate',
+ icon: 'setting',
+ // component: './SettingCenter/UDFTemplate',
+ },
+ {
+ path: '/settingCenter/systemInfo',
+ name: 'systemInfo',
+ icon: 'desktop',
+ // component: './SettingCenter/SystemInfo',
+ },
+ {
+ path: '/settingCenter/processList',
+ name: 'processList',
+ icon: 'desktop',
+ // component: './SettingCenter/ProcessList',
+ },
+ ],
+ },
+ {
+ path: '/about',
+ name: 'about',
+ icon: 'smile',
+ component: './Welcome',
},
{
path: '*',
diff --git a/dinky-web/jest.config.ts b/dinky-web/jest.config.ts
index 1de2a1af75..5e527a687e 100644
--- a/dinky-web/jest.config.ts
+++ b/dinky-web/jest.config.ts
@@ -1,4 +1,21 @@
-import { configUmiAlias, createConfig } from '@umijs/max/test';
+/*
+ * 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 {configUmiAlias, createConfig} from '@umijs/max/test';
export default async () => {
const config = await configUmiAlias({
diff --git a/dinky-web/mock/listTableList.ts b/dinky-web/mock/listTableList.ts
index 35ec3cec13..a586d81f9a 100644
--- a/dinky-web/mock/listTableList.ts
+++ b/dinky-web/mock/listTableList.ts
@@ -1,6 +1,23 @@
-import { Request, Response } from 'express';
+/*
+ * 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 {Request, Response} from 'express';
import moment from 'moment';
-import { parse } from 'url';
+import {parse} from 'url';
// mock tableListDataSource
const genList = (current: number, pageSize: number) => {
diff --git a/dinky-web/mock/notices.ts b/dinky-web/mock/notices.ts
deleted file mode 100644
index 616c92180c..0000000000
--- a/dinky-web/mock/notices.ts
+++ /dev/null
@@ -1,115 +0,0 @@
-import { Request, Response } from 'express';
-
-const getNotices = (req: Request, res: Response) => {
- res.json({
- data: [
- {
- id: '000000001',
- avatar:
- 'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/MSbDR4FR2MUAAAAAAAAAAAAAFl94AQBr',
- title: '你收到了 14 份新周报',
- datetime: '2017-08-09',
- type: 'notification',
- },
- {
- id: '000000002',
- avatar:
- 'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/hX-PTavYIq4AAAAAAAAAAAAAFl94AQBr',
- title: '你推荐的 曲妮妮 已通过第三轮面试',
- datetime: '2017-08-08',
- type: 'notification',
- },
- {
- id: '000000003',
- avatar:
- 'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/jHX5R5l3QjQAAAAAAAAAAAAAFl94AQBr',
- title: '这种模板可以区分多种通知类型',
- datetime: '2017-08-07',
- read: true,
- type: 'notification',
- },
- {
- id: '000000004',
- avatar:
- 'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/Wr4mQqx6jfwAAAAAAAAAAAAAFl94AQBr',
- title: '左侧图标用于区分不同的类型',
- datetime: '2017-08-07',
- type: 'notification',
- },
- {
- id: '000000005',
- avatar:
- 'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/Mzj_TbcWUj4AAAAAAAAAAAAAFl94AQBr',
- title: '内容不要超过两行字,超出时自动截断',
- datetime: '2017-08-07',
- type: 'notification',
- },
- {
- id: '000000006',
- avatar:
- 'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/eXLzRbPqQE4AAAAAAAAAAAAAFl94AQBr',
- title: '曲丽丽 评论了你',
- description: '描述信息描述信息描述信息',
- datetime: '2017-08-07',
- type: 'message',
- clickClose: true,
- },
- {
- id: '000000007',
- avatar:
- 'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/w5mRQY2AmEEAAAAAAAAAAAAAFl94AQBr',
- title: '朱偏右 回复了你',
- description: '这种模板用于提醒谁与你发生了互动,左侧放『谁』的头像',
- datetime: '2017-08-07',
- type: 'message',
- clickClose: true,
- },
- {
- id: '000000008',
- avatar:
- 'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/wPadR5M9918AAAAAAAAAAAAAFl94AQBr',
- title: '标题',
- description: '这种模板用于提醒谁与你发生了互动,左侧放『谁』的头像',
- datetime: '2017-08-07',
- type: 'message',
- clickClose: true,
- },
- {
- id: '000000009',
- title: '任务名称',
- description: '任务需要在 2017-01-12 20:00 前启动',
- extra: '未开始',
- status: 'todo',
- type: 'event',
- },
- {
- id: '000000010',
- title: '第三方紧急代码变更',
- description: '冠霖提交于 2017-01-06,需在 2017-01-07 前完成代码变更任务',
- extra: '马上到期',
- status: 'urgent',
- type: 'event',
- },
- {
- id: '000000011',
- title: '信息安全考试',
- description: '指派竹尔于 2017-01-09 前完成更新并发布',
- extra: '已耗时 8 天',
- status: 'doing',
- type: 'event',
- },
- {
- id: '000000012',
- title: 'ABCD 版本发布',
- description: '冠霖提交于 2017-01-06,需在 2017-01-07 前完成代码变更任务',
- extra: '进行中',
- status: 'processing',
- type: 'event',
- },
- ],
- });
-};
-
-export default {
- 'GET /api/notices': getNotices,
-};
diff --git a/dinky-web/mock/requestRecord.mock.js b/dinky-web/mock/requestRecord.mock.js
index 6c59e198da..e4eece3013 100644
--- a/dinky-web/mock/requestRecord.mock.js
+++ b/dinky-web/mock/requestRecord.mock.js
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+
module.exports = {
'GET /api/currentUser': {
data: {
diff --git a/dinky-web/mock/route.ts b/dinky-web/mock/route.ts
index 418d10f1ab..f1f566ac11 100644
--- a/dinky-web/mock/route.ts
+++ b/dinky-web/mock/route.ts
@@ -1,3 +1,20 @@
+/*
+ * 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 default {
'/api/auth_routes': {
'/form/advanced-form': { authority: ['admin', 'user'] },
diff --git a/dinky-web/mock/user.ts b/dinky-web/mock/user.ts
index 75edd34042..377b799cf3 100644
--- a/dinky-web/mock/user.ts
+++ b/dinky-web/mock/user.ts
@@ -1,4 +1,21 @@
-import { Request, Response } from 'express';
+/*
+ * 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 {Request, Response} from 'express';
const waitTime = (time: number = 100) => {
return new Promise((resolve) => {
diff --git a/dinky-web/package.json b/dinky-web/package.json
index 1e2365b384..b4bb905f49 100644
--- a/dinky-web/package.json
+++ b/dinky-web/package.json
@@ -1,8 +1,8 @@
{
- "name": "ant-design-pro",
+ "name": "Dinky",
"version": "6.0.0",
"private": true,
- "description": "An out-of-box UI solution for enterprise applications",
+ "description": "Dinky is an out of the box one-stop real-time computing platform dedicated to the construction and practice of Unified Batch & Streaming and Unified Data Lake & Data Warehouse. Based on Apache Flink, Dinky provides the ability to connect many big data frameworks including OLAP and Data Lake.",
"scripts": {
"analyze": "cross-env ANALYZE=1 max build",
"build": "max build",
@@ -19,7 +19,6 @@
"lint:js": "eslint --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src",
"lint:prettier": "prettier -c --write \"**/**.{js,jsx,tsx,ts,less,md,json}\" --end-of-line auto",
"openapi": "max openapi",
- "prepare": "husky install",
"prettier": "prettier -c --write \"**/**.{js,jsx,tsx,ts,less,md,json}\"",
"preview": "npm run build && max preview --port 8000",
"record": "cross-env NODE_ENV=development REACT_APP_ENV=test max record --scene=login",
@@ -40,8 +39,8 @@
},
"browserslist": ["> 1%", "last 2 versions", "not ie <= 10"],
"dependencies": {
- "@ant-design/icons": "^4.7.0",
- "@ant-design/pro-components": "^2.3.37",
+ "@ant-design/icons": "^5.0.1",
+ "@ant-design/pro-components": "^2.3.52",
"@ant-design/use-emotion-css": "1.0.4",
"@umijs/route-utils": "^2.1.3",
"antd": "^5.0.0",
diff --git a/dinky-web/pom.xml b/dinky-web/pom.xml
new file mode 100644
index 0000000000..5a95dd7fa0
--- /dev/null
+++ b/dinky-web/pom.xml
@@ -0,0 +1,78 @@
+
+
+
+
+ 4.0.0
+
+ org.dinky
+ dinky
+ 0.8.0
+
+
+ dinky-web
+ pom
+
+ Dinky : Dinky-Web
+
+
+ ${project.artifactId}-${project.version}
+
+
+
+ com.github.eirslett
+ frontend-maven-plugin
+ 1.12.0
+
+ v14.17.0
+ 7.19.0
+
+
+
+
+
+
+ install node and npm
+
+ install-node-and-npm
+
+
+
+ npm install
+
+ npm
+
+
+
+ install --force
+
+
+
+ npm run build
+
+ npm
+
+
+ run build
+
+
+
+
+
+
+
diff --git a/dinky-web/public/CNAME b/dinky-web/public/CNAME
deleted file mode 100644
index 30c2d4d362..0000000000
--- a/dinky-web/public/CNAME
+++ /dev/null
@@ -1 +0,0 @@
-preview.pro.ant.design
\ No newline at end of file
diff --git a/dinky-web/public/community/dingtalk.jpg b/dinky-web/public/community/dingtalk.jpg
new file mode 100644
index 0000000000..701ca27a63
Binary files /dev/null and b/dinky-web/public/community/dingtalk.jpg differ
diff --git a/dinky-web/public/community/qq.png b/dinky-web/public/community/qq.png
new file mode 100644
index 0000000000..f96709fa68
Binary files /dev/null and b/dinky-web/public/community/qq.png differ
diff --git a/dinky-web/public/community/wechat.jpg b/dinky-web/public/community/wechat.jpg
new file mode 100644
index 0000000000..5ef33eb803
Binary files /dev/null and b/dinky-web/public/community/wechat.jpg differ
diff --git a/dinky-web/public/database/clickhouse.png b/dinky-web/public/database/clickhouse.png
new file mode 100644
index 0000000000..15ed001c01
Binary files /dev/null and b/dinky-web/public/database/clickhouse.png differ
diff --git a/dinky-web/public/database/db.jpg b/dinky-web/public/database/db.jpg
new file mode 100644
index 0000000000..bfe2a38643
Binary files /dev/null and b/dinky-web/public/database/db.jpg differ
diff --git a/dinky-web/public/database/doris.jpeg b/dinky-web/public/database/doris.jpeg
new file mode 100644
index 0000000000..e5f2256830
Binary files /dev/null and b/dinky-web/public/database/doris.jpeg differ
diff --git a/dinky-web/public/database/hive.png b/dinky-web/public/database/hive.png
new file mode 100644
index 0000000000..faa24c148e
Binary files /dev/null and b/dinky-web/public/database/hive.png differ
diff --git a/dinky-web/public/database/mysql.jpg b/dinky-web/public/database/mysql.jpg
new file mode 100644
index 0000000000..e927f50710
Binary files /dev/null and b/dinky-web/public/database/mysql.jpg differ
diff --git a/dinky-web/public/database/oracle.jpg b/dinky-web/public/database/oracle.jpg
new file mode 100644
index 0000000000..a1985751d1
Binary files /dev/null and b/dinky-web/public/database/oracle.jpg differ
diff --git a/dinky-web/public/database/phoenix.png b/dinky-web/public/database/phoenix.png
new file mode 100644
index 0000000000..5495793a96
Binary files /dev/null and b/dinky-web/public/database/phoenix.png differ
diff --git a/dinky-web/public/database/postgresql.jpg b/dinky-web/public/database/postgresql.jpg
new file mode 100644
index 0000000000..9b5f175c61
Binary files /dev/null and b/dinky-web/public/database/postgresql.jpg differ
diff --git a/dinky-web/public/database/presto.png b/dinky-web/public/database/presto.png
new file mode 100644
index 0000000000..15058db026
Binary files /dev/null and b/dinky-web/public/database/presto.png differ
diff --git a/dinky-web/public/database/sqlserver.jpg b/dinky-web/public/database/sqlserver.jpg
new file mode 100644
index 0000000000..339a4b3e91
Binary files /dev/null and b/dinky-web/public/database/sqlserver.jpg differ
diff --git a/dinky-web/public/database/starrocks.jpg b/dinky-web/public/database/starrocks.jpg
new file mode 100644
index 0000000000..c425dd2835
Binary files /dev/null and b/dinky-web/public/database/starrocks.jpg differ
diff --git a/dinky-web/public/dinky.svg b/dinky-web/public/dinky.svg
new file mode 100644
index 0000000000..b4d5df8343
--- /dev/null
+++ b/dinky-web/public/dinky.svg
@@ -0,0 +1,1400 @@
+
+
+
+
diff --git a/dinky-web/public/favicon.ico b/dinky-web/public/favicon.ico
index e2e9325298..89bda05425 100644
Binary files a/dinky-web/public/favicon.ico and b/dinky-web/public/favicon.ico differ
diff --git a/dinky-web/public/logo.svg b/dinky-web/public/logo.svg
deleted file mode 100644
index 239bf69f18..0000000000
--- a/dinky-web/public/logo.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/dinky-web/public/pro_icon.svg b/dinky-web/public/pro_icon.svg
deleted file mode 100644
index e075b78d76..0000000000
--- a/dinky-web/public/pro_icon.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-
\ No newline at end of file
diff --git a/dinky-web/public/scripts/loading.js b/dinky-web/public/scripts/loading.js
index c1ced54c1e..b964dd83b0 100644
--- a/dinky-web/public/scripts/loading.js
+++ b/dinky-web/public/scripts/loading.js
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+
/**
* loading 占位
* 解决首次加载时白屏的问题
@@ -191,10 +208,10 @@
- 正在加载资源
+ Loading...
- 初次加载资源可能需要较多时间 请耐心等待
+ It may take a long time to load resources for the first time, please be patient
`;
diff --git a/dinky-web/src/access.ts b/dinky-web/src/access.ts
index e823e24b3e..160c1694ce 100644
--- a/dinky-web/src/access.ts
+++ b/dinky-web/src/access.ts
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+
/**
* @see https://umijs.org/zh-CN/plugins/plugin-access
* */
diff --git a/dinky-web/src/app.tsx b/dinky-web/src/app.tsx
index 7171f93d25..f43c387bbe 100644
--- a/dinky-web/src/app.tsx
+++ b/dinky-web/src/app.tsx
@@ -1,14 +1,32 @@
+/*
+ * 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 Footer from '@/components/Footer';
import RightContent from '@/components/RightContent';
-import { LinkOutlined } from '@ant-design/icons';
-import type { Settings as LayoutSettings } from '@ant-design/pro-components';
-import { SettingDrawer } from '@ant-design/pro-components';
-import type { RunTimeLayoutConfig } from '@umijs/max';
-import { history, Link } from '@umijs/max';
+import {LinkOutlined} from '@ant-design/icons';
+import type {Settings as LayoutSettings} from '@ant-design/pro-components';
+import {SettingDrawer} from '@ant-design/pro-components';
+import type {RunTimeLayoutConfig} from '@umijs/max';
+import {history, Link} from '@umijs/max';
import defaultSettings from '../config/defaultSettings';
-import { errorConfig } from './requestErrorConfig';
-import { currentUser as queryCurrentUser } from './services/ant-design-pro/api';
+import {errorConfig} from './requestErrorConfig';
+import {currentUser as queryCurrentUser} from './services/api';
import React from 'react';
+
const isDev = process.env.NODE_ENV === 'development';
const loginPath = '/user/login';
diff --git a/dinky-web/src/components/Footer/index.tsx b/dinky-web/src/components/Footer/index.tsx
index 03ac1468db..2ae189e23d 100644
--- a/dinky-web/src/components/Footer/index.tsx
+++ b/dinky-web/src/components/Footer/index.tsx
@@ -1,40 +1,44 @@
-import { GithubOutlined } from '@ant-design/icons';
-import { DefaultFooter } from '@ant-design/pro-components';
-import { useIntl } from '@umijs/max';
+/*
+ * 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 {l} from '@/utils/intl';
+import {GithubOutlined} from '@ant-design/icons';
+import {DefaultFooter} from '@ant-design/pro-components';
import React from 'react';
const Footer: React.FC = () => {
- const intl = useIntl();
- const defaultMessage = intl.formatMessage({
- id: 'app.copyright.produced',
- defaultMessage: '蚂蚁集团体验技术部出品',
- });
-
const currentYear = new Date().getFullYear();
-
return (
,
- href: 'https://github.com/ant-design/ant-design-pro',
- blankTarget: true,
- },
- {
- key: 'Ant Design',
- title: 'Ant Design',
- href: 'https://ant.design',
+ title: ,
+ href: 'https://github.com/DataLinkDC/dlink',
blankTarget: true,
},
]}
diff --git a/dinky-web/src/components/HeaderDropdown/index.tsx b/dinky-web/src/components/HeaderDropdown/index.tsx
index 8474be5195..d16568472d 100644
--- a/dinky-web/src/components/HeaderDropdown/index.tsx
+++ b/dinky-web/src/components/HeaderDropdown/index.tsx
@@ -1,7 +1,24 @@
-import { Dropdown } from 'antd';
-import type { DropDownProps } from 'antd/es/dropdown';
+/*
+ * 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 {Dropdown} from 'antd';
+import type {DropDownProps} from 'antd/es/dropdown';
import React from 'react';
-import { useEmotionCss } from '@ant-design/use-emotion-css';
+import {useEmotionCss} from '@ant-design/use-emotion-css';
import classNames from 'classnames';
export type HeaderDropdownProps = {
diff --git a/dinky-web/src/components/RightContent/AvatarDropdown.tsx b/dinky-web/src/components/RightContent/AvatarDropdown.tsx
index e4dfaf033b..3dd92b4f4c 100644
--- a/dinky-web/src/components/RightContent/AvatarDropdown.tsx
+++ b/dinky-web/src/components/RightContent/AvatarDropdown.tsx
@@ -1,13 +1,30 @@
-import { outLogin } from '@/services/ant-design-pro/api';
-import { LogoutOutlined, SettingOutlined, UserOutlined } from '@ant-design/icons';
-import { useEmotionCss } from '@ant-design/use-emotion-css';
-import { history, useModel } from '@umijs/max';
-import { Avatar, Spin } from 'antd';
-import { setAlpha } from '@ant-design/pro-components';
-import { stringify } from 'querystring';
-import type { MenuInfo } from 'rc-menu/lib/interface';
-import React, { useCallback } from 'react';
-import { flushSync } from 'react-dom';
+/*
+ * 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 {outLogin} from '@/services/api';
+import {LogoutOutlined, SettingOutlined, UserOutlined} from '@ant-design/icons';
+import {useEmotionCss} from '@ant-design/use-emotion-css';
+import {history, useModel} from '@umijs/max';
+import {Avatar, Spin} from 'antd';
+import {setAlpha} from '@ant-design/pro-components';
+import {stringify} from 'querystring';
+import type {MenuInfo} from 'rc-menu/lib/interface';
+import React, {useCallback} from 'react';
+import {flushSync} from 'react-dom';
import HeaderDropdown from '../HeaderDropdown';
export type GlobalHeaderRightProps = {
diff --git a/dinky-web/src/components/RightContent/index.tsx b/dinky-web/src/components/RightContent/index.tsx
index 2d00792915..1a1bca8ce9 100644
--- a/dinky-web/src/components/RightContent/index.tsx
+++ b/dinky-web/src/components/RightContent/index.tsx
@@ -1,6 +1,23 @@
-import { QuestionCircleOutlined } from '@ant-design/icons';
-import { useEmotionCss } from '@ant-design/use-emotion-css';
-import { SelectLang, useModel } from '@umijs/max';
+/*
+ * 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 {GlobalOutlined} from '@ant-design/icons';
+import {useEmotionCss} from '@ant-design/use-emotion-css';
+import {SelectLang, useModel} from '@umijs/max';
import React from 'react';
import Avatar from './AvatarDropdown';
@@ -26,6 +43,7 @@ const GlobalHeaderRight: React.FC = () => {
overflow: 'hidden',
cursor: 'pointer',
padding: '0 12px',
+ color: '#fff',
borderRadius: token.borderRadius,
'&:hover': {
backgroundColor: token.colorBgTextHover,
@@ -41,16 +59,8 @@ const GlobalHeaderRight: React.FC = () => {
return (
- Ant Design Pro 是一个整合了 umi,Ant Design 和 ProComponents
- 的脚手架方案。致力于在设计规范和基础组件的基础上,继续向上构建,提炼出典型模板/业务组件/配套设计资源,进一步提升企业级中后台产品设计研发过程中的『用户』和『设计者』的体验。
-
-
-
-
-
-
-
+ />
+
+ {l('pages.welcome.Community')}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
);
};
export default Welcome;
+
+
+
diff --git a/dinky-web/src/requestErrorConfig.ts b/dinky-web/src/requestErrorConfig.ts
index c0c4a6a21a..388dcdc429 100644
--- a/dinky-web/src/requestErrorConfig.ts
+++ b/dinky-web/src/requestErrorConfig.ts
@@ -1,6 +1,23 @@
-import type { RequestOptions } from '@@/plugin-request/request';
-import type { RequestConfig } from '@umijs/max';
-import { message, notification } from 'antd';
+/*
+ * 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 type {RequestOptions} from '@@/plugin-request/request';
+import type {RequestConfig} from '@umijs/max';
+import {message, notification} from 'antd';
// 错误处理方案: 错误类型
enum ErrorShowType {
diff --git a/dinky-web/src/service-worker.js b/dinky-web/src/service-worker.js
index b86726cdeb..042da0120f 100644
--- a/dinky-web/src/service-worker.js
+++ b/dinky-web/src/service-worker.js
@@ -1,3 +1,20 @@
+/*
+ * 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-disable no-restricted-globals */
/* eslint-disable no-underscore-dangle */
/* globals workbox */
diff --git a/dinky-web/src/services/ant-design-pro/index.ts b/dinky-web/src/services/ant-design-pro/index.ts
deleted file mode 100644
index 1ac489fe5f..0000000000
--- a/dinky-web/src/services/ant-design-pro/index.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-// @ts-ignore
-/* eslint-disable */
-// API 更新时间:
-// API 唯一标识:
-import * as api from './api';
-import * as login from './login';
-export default {
- api,
- login,
-};
diff --git a/dinky-web/src/services/ant-design-pro/login.ts b/dinky-web/src/services/ant-design-pro/login.ts
deleted file mode 100644
index 8871ed84be..0000000000
--- a/dinky-web/src/services/ant-design-pro/login.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-// @ts-ignore
-/* eslint-disable */
-import { request } from '@umijs/max';
-
-/** 发送验证码 POST /api/login/captcha */
-export async function getFakeCaptcha(
- params: {
- // query
- /** 手机号 */
- phone?: string;
- },
- options?: { [key: string]: any },
-) {
- return request('/api/login/captcha', {
- method: 'GET',
- params: {
- ...params,
- },
- ...(options || {}),
- });
-}
diff --git a/dinky-web/src/services/ant-design-pro/api.ts b/dinky-web/src/services/api.ts
similarity index 71%
rename from dinky-web/src/services/ant-design-pro/api.ts
rename to dinky-web/src/services/api.ts
index cbd596160e..b546673bb1 100644
--- a/dinky-web/src/services/ant-design-pro/api.ts
+++ b/dinky-web/src/services/api.ts
@@ -1,6 +1,23 @@
+/*
+ * 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.
+ */
+
// @ts-ignore
/* eslint-disable */
-import { request } from '@umijs/max';
+import {request} from '@umijs/max';
/** 获取当前的用户 GET /api/currentUser */
export async function currentUser(options?: { [key: string]: any }) {
diff --git a/dinky-web/src/services/index.ts b/dinky-web/src/services/index.ts
new file mode 100644
index 0000000000..92a651f65c
--- /dev/null
+++ b/dinky-web/src/services/index.ts
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+
+// @ts-ignore
+/* eslint-disable */
+// API 更新时间:
+// API 唯一标识:
+import * as api from './api';
+
+export default {
+ api,
+};
diff --git a/dinky-web/src/services/swagger/index.ts b/dinky-web/src/services/swagger/index.ts
deleted file mode 100644
index 83cf97ca4d..0000000000
--- a/dinky-web/src/services/swagger/index.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-// @ts-ignore
-/* eslint-disable */
-// API 更新时间:
-// API 唯一标识:
-import * as pet from './pet';
-import * as store from './store';
-import * as user from './user';
-export default {
- pet,
- store,
- user,
-};
diff --git a/dinky-web/src/services/swagger/pet.ts b/dinky-web/src/services/swagger/pet.ts
deleted file mode 100644
index b887475a19..0000000000
--- a/dinky-web/src/services/swagger/pet.ts
+++ /dev/null
@@ -1,153 +0,0 @@
-// @ts-ignore
-/* eslint-disable */
-import { request } from '@umijs/max';
-
-/** Update an existing pet PUT /pet */
-export async function updatePet(body: API.Pet, options?: { [key: string]: any }) {
- return request('/pet', {
- method: 'PUT',
- headers: {
- 'Content-Type': 'application/json',
- },
- data: body,
- ...(options || {}),
- });
-}
-
-/** Add a new pet to the store POST /pet */
-export async function addPet(body: API.Pet, options?: { [key: string]: any }) {
- return request('/pet', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json',
- },
- data: body,
- ...(options || {}),
- });
-}
-
-/** Find pet by ID Returns a single pet GET /pet/${param0} */
-export async function getPetById(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.getPetByIdParams,
- options?: { [key: string]: any },
-) {
- const { petId: param0, ...queryParams } = params;
- return request(`/pet/${param0}`, {
- method: 'GET',
- params: { ...queryParams },
- ...(options || {}),
- });
-}
-
-/** Updates a pet in the store with form data POST /pet/${param0} */
-export async function updatePetWithForm(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.updatePetWithFormParams,
- body: { name?: string; status?: string },
- options?: { [key: string]: any },
-) {
- const { petId: param0, ...queryParams } = params;
- const formData = new FormData();
-
- Object.keys(body).forEach((ele) => {
- const item = (body as any)[ele];
-
- if (item !== undefined && item !== null) {
- formData.append(
- ele,
- typeof item === 'object' && !(item instanceof File) ? JSON.stringify(item) : item,
- );
- }
- });
-
- return request(`/pet/${param0}`, {
- method: 'POST',
- params: { ...queryParams },
- data: formData,
- ...(options || {}),
- });
-}
-
-/** Deletes a pet DELETE /pet/${param0} */
-export async function deletePet(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.deletePetParams & {
- // header
- api_key?: string;
- },
- options?: { [key: string]: any },
-) {
- const { petId: param0, ...queryParams } = params;
- return request(`/pet/${param0}`, {
- method: 'DELETE',
- headers: {},
- params: { ...queryParams },
- ...(options || {}),
- });
-}
-
-/** uploads an image POST /pet/${param0}/uploadImage */
-export async function uploadFile(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.uploadFileParams,
- body: { additionalMetadata?: string; file?: string },
- file?: File,
- options?: { [key: string]: any },
-) {
- const { petId: param0, ...queryParams } = params;
- const formData = new FormData();
-
- if (file) {
- formData.append('file', file);
- }
-
- Object.keys(body).forEach((ele) => {
- const item = (body as any)[ele];
-
- if (item !== undefined && item !== null) {
- formData.append(
- ele,
- typeof item === 'object' && !(item instanceof File) ? JSON.stringify(item) : item,
- );
- }
- });
-
- return request(`/pet/${param0}/uploadImage`, {
- method: 'POST',
- params: { ...queryParams },
- data: formData,
- requestType: 'form',
- ...(options || {}),
- });
-}
-
-/** Finds Pets by status Multiple status values can be provided with comma separated strings GET /pet/findByStatus */
-export async function findPetsByStatus(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.findPetsByStatusParams,
- options?: { [key: string]: any },
-) {
- return request('/pet/findByStatus', {
- method: 'GET',
- params: {
- ...params,
- },
- ...(options || {}),
- });
-}
-
-/** Finds Pets by tags Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. GET /pet/findByTags */
-export async function findPetsByTags(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.findPetsByTagsParams,
- options?: { [key: string]: any },
-) {
- return request('/pet/findByTags', {
- method: 'GET',
- params: {
- ...params,
- },
- ...(options || {}),
- });
-}
diff --git a/dinky-web/src/services/swagger/store.ts b/dinky-web/src/services/swagger/store.ts
deleted file mode 100644
index b9c689a6ab..0000000000
--- a/dinky-web/src/services/swagger/store.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-// @ts-ignore
-/* eslint-disable */
-import { request } from '@umijs/max';
-
-/** Returns pet inventories by status Returns a map of status codes to quantities GET /store/inventory */
-export async function getInventory(options?: { [key: string]: any }) {
- return request>('/store/inventory', {
- method: 'GET',
- ...(options || {}),
- });
-}
-
-/** Place an order for a pet POST /store/order */
-export async function placeOrder(body: API.Order, options?: { [key: string]: any }) {
- return request('/store/order', {
- method: 'POST',
- data: body,
- ...(options || {}),
- });
-}
-
-/** Find purchase order by ID For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions GET /store/order/${param0} */
-export async function getOrderById(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.getOrderByIdParams,
- options?: { [key: string]: any },
-) {
- const { orderId: param0, ...queryParams } = params;
- return request(`/store/order/${param0}`, {
- method: 'GET',
- params: { ...queryParams },
- ...(options || {}),
- });
-}
-
-/** Delete purchase order by ID For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors DELETE /store/order/${param0} */
-export async function deleteOrder(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.deleteOrderParams,
- options?: { [key: string]: any },
-) {
- const { orderId: param0, ...queryParams } = params;
- return request(`/store/order/${param0}`, {
- method: 'DELETE',
- params: { ...queryParams },
- ...(options || {}),
- });
-}
diff --git a/dinky-web/src/services/swagger/typings.d.ts b/dinky-web/src/services/swagger/typings.d.ts
deleted file mode 100644
index d06bcfcb94..0000000000
--- a/dinky-web/src/services/swagger/typings.d.ts
+++ /dev/null
@@ -1,112 +0,0 @@
-declare namespace API {
- type ApiResponse = {
- code?: number;
- type?: string;
- message?: string;
- };
-
- type Category = {
- id?: number;
- name?: string;
- };
-
- type deleteOrderParams = {
- /** ID of the order that needs to be deleted */
- orderId: number;
- };
-
- type deletePetParams = {
- api_key?: string;
- /** Pet id to delete */
- petId: number;
- };
-
- type deleteUserParams = {
- /** The name that needs to be deleted */
- username: string;
- };
-
- type findPetsByStatusParams = {
- /** Status values that need to be considered for filter */
- status: ('available' | 'pending' | 'sold')[];
- };
-
- type findPetsByTagsParams = {
- /** Tags to filter by */
- tags: string[];
- };
-
- type getOrderByIdParams = {
- /** ID of pet that needs to be fetched */
- orderId: number;
- };
-
- type getPetByIdParams = {
- /** ID of pet to return */
- petId: number;
- };
-
- type getUserByNameParams = {
- /** The name that needs to be fetched. Use user1 for testing. */
- username: string;
- };
-
- type loginUserParams = {
- /** The user name for login */
- username: string;
- /** The password for login in clear text */
- password: string;
- };
-
- type Order = {
- id?: number;
- petId?: number;
- quantity?: number;
- shipDate?: string;
- /** Order Status */
- status?: 'placed' | 'approved' | 'delivered';
- complete?: boolean;
- };
-
- type Pet = {
- id?: number;
- category?: Category;
- name: string;
- photoUrls: string[];
- tags?: Tag[];
- /** pet status in the store */
- status?: 'available' | 'pending' | 'sold';
- };
-
- type Tag = {
- id?: number;
- name?: string;
- };
-
- type updatePetWithFormParams = {
- /** ID of pet that needs to be updated */
- petId: number;
- };
-
- type updateUserParams = {
- /** name that need to be updated */
- username: string;
- };
-
- type uploadFileParams = {
- /** ID of pet to update */
- petId: number;
- };
-
- type User = {
- id?: number;
- username?: string;
- firstName?: string;
- lastName?: string;
- email?: string;
- password?: string;
- phone?: string;
- /** User Status */
- userStatus?: number;
- };
-}
diff --git a/dinky-web/src/services/swagger/user.ts b/dinky-web/src/services/swagger/user.ts
deleted file mode 100644
index 4dd6f421b0..0000000000
--- a/dinky-web/src/services/swagger/user.ts
+++ /dev/null
@@ -1,100 +0,0 @@
-// @ts-ignore
-/* eslint-disable */
-import { request } from '@umijs/max';
-
-/** Create user This can only be done by the logged in user. POST /user */
-export async function createUser(body: API.User, options?: { [key: string]: any }) {
- return request('/user', {
- method: 'POST',
- data: body,
- ...(options || {}),
- });
-}
-
-/** Get user by user name GET /user/${param0} */
-export async function getUserByName(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.getUserByNameParams,
- options?: { [key: string]: any },
-) {
- const { username: param0, ...queryParams } = params;
- return request(`/user/${param0}`, {
- method: 'GET',
- params: { ...queryParams },
- ...(options || {}),
- });
-}
-
-/** Updated user This can only be done by the logged in user. PUT /user/${param0} */
-export async function updateUser(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.updateUserParams,
- body: API.User,
- options?: { [key: string]: any },
-) {
- const { username: param0, ...queryParams } = params;
- return request(`/user/${param0}`, {
- method: 'PUT',
- params: { ...queryParams },
- data: body,
- ...(options || {}),
- });
-}
-
-/** Delete user This can only be done by the logged in user. DELETE /user/${param0} */
-export async function deleteUser(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.deleteUserParams,
- options?: { [key: string]: any },
-) {
- const { username: param0, ...queryParams } = params;
- return request(`/user/${param0}`, {
- method: 'DELETE',
- params: { ...queryParams },
- ...(options || {}),
- });
-}
-
-/** Creates list of users with given input array POST /user/createWithArray */
-export async function createUsersWithArrayInput(
- body: API.User[],
- options?: { [key: string]: any },
-) {
- return request('/user/createWithArray', {
- method: 'POST',
- data: body,
- ...(options || {}),
- });
-}
-
-/** Creates list of users with given input array POST /user/createWithList */
-export async function createUsersWithListInput(body: API.User[], options?: { [key: string]: any }) {
- return request('/user/createWithList', {
- method: 'POST',
- data: body,
- ...(options || {}),
- });
-}
-
-/** Logs user into the system GET /user/login */
-export async function loginUser(
- // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
- params: API.loginUserParams,
- options?: { [key: string]: any },
-) {
- return request('/user/login', {
- method: 'GET',
- params: {
- ...params,
- },
- ...(options || {}),
- });
-}
-
-/** Logs out current logged in user session GET /user/logout */
-export async function logoutUser(options?: { [key: string]: any }) {
- return request('/user/logout', {
- method: 'GET',
- ...(options || {}),
- });
-}
diff --git a/dinky-web/src/services/ant-design-pro/typings.d.ts b/dinky-web/src/services/typings.d.ts
similarity index 71%
rename from dinky-web/src/services/ant-design-pro/typings.d.ts
rename to dinky-web/src/services/typings.d.ts
index 13e5a680c4..0cdafb8f3e 100644
--- a/dinky-web/src/services/ant-design-pro/typings.d.ts
+++ b/dinky-web/src/services/typings.d.ts
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+
// @ts-ignore
/* eslint-disable */
diff --git a/dinky-web/src/typings.d.ts b/dinky-web/src/typings.d.ts
index 742f70c60e..5ebfbcf3fc 100644
--- a/dinky-web/src/typings.d.ts
+++ b/dinky-web/src/typings.d.ts
@@ -1,3 +1,20 @@
+/*
+ * 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 module 'slash2';
declare module '*.css';
declare module '*.less';
diff --git a/dinky-web/src/utils/intl.ts b/dinky-web/src/utils/intl.ts
new file mode 100644
index 0000000000..ff88fdba89
--- /dev/null
+++ b/dinky-web/src/utils/intl.ts
@@ -0,0 +1,23 @@
+/*
+ * 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 {getIntl} from "@umijs/max";
+
+export const l = (id: string, defaultMessage?: string, value?: {}) => {
+ return getIntl().formatMessage({id, defaultMessage}, value);
+}
+
diff --git a/dinky-web/tests/setupTests.jsx b/dinky-web/tests/setupTests.jsx
index 952561d5e7..cdf3aac071 100644
--- a/dinky-web/tests/setupTests.jsx
+++ b/dinky-web/tests/setupTests.jsx
@@ -1,4 +1,21 @@
-const localStorageMock = {
+/*
+ * 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 localStorageMock = {
getItem: jest.fn(),
setItem: jest.fn(),
removeItem: jest.fn(),
diff --git a/dinky-web/types/cache/mock/login.mock.cache.js b/dinky-web/types/cache/mock/login.mock.cache.js
index 6c59e198da..e4eece3013 100644
--- a/dinky-web/types/cache/mock/login.mock.cache.js
+++ b/dinky-web/types/cache/mock/login.mock.cache.js
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+
module.exports = {
'GET /api/currentUser': {
data: {
diff --git a/dinky-web/types/cache/mock/mock.cache.js b/dinky-web/types/cache/mock/mock.cache.js
index e69de29bb2..29400e587d 100644
--- a/dinky-web/types/cache/mock/mock.cache.js
+++ b/dinky-web/types/cache/mock/mock.cache.js
@@ -0,0 +1,17 @@
+/*
+ * 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.
+ */
+
diff --git a/dinky-web/types/index.d.ts b/dinky-web/types/index.d.ts
index 2c2805a926..58e7b35a3f 100644
--- a/dinky-web/types/index.d.ts
+++ b/dinky-web/types/index.d.ts
@@ -1,3 +1,20 @@
+/*
+ * 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 namespace API {
/** GET /api/currentUser */
export type GET_API_CURRENT_USER_QUERY = {
diff --git a/dlink-web/config/config.ts b/dlink-web/config/config.ts
index 7556caf8a7..369b76bf1f 100644
--- a/dlink-web/config/config.ts
+++ b/dlink-web/config/config.ts
@@ -26,7 +26,6 @@ import defaultSettings from './defaultSettings';
import proxy from './proxy';
import routes from './routes';
-const {REACT_APP_ENV} = process.env;
export default defineConfig({
hash: true,