Compare commits

...

4 Commits

Author SHA1 Message Date
ZQKC
a87a0663ed 版本升级至3.4.0 2023-12-03 15:24:11 +08:00
ZQKC
f5de9789f2 合并企业版分支 2023-12-03 14:40:40 +08:00
ZQKC
64cddb7912 合并Master分支 2023-07-07 13:01:27 +08:00
zengqiao
aa35965d7a 体验环境 2023-02-27 18:43:48 +08:00
11 changed files with 78 additions and 20 deletions

View File

@@ -35,7 +35,7 @@
},
"devDependencies": {
"@ant-design/icons": "^4.6.2",
"@babel/core": "^7.5.5",
"@babel/core": "^7.18.13",
"@babel/plugin-proposal-class-properties": "^7.4.0",
"@babel/plugin-proposal-decorators": "^7.4.0",
"@babel/plugin-proposal-export-default-from": "^7.2.0",
@@ -50,7 +50,7 @@
"@babel/preset-react": "^7.0.0",
"@babel/preset-typescript": "^7.14.5",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.1",
"@types/lodash": "^4.14.138",
"@types/lodash": "^4.14.184",
"@types/react-dom": "^17.0.5",
"@types/react-router": "5.1.18",
"@types/react-router-dom": "^5.3.3",
@@ -76,6 +76,7 @@
"hard-source-webpack-plugin": "^0.13.1",
"html-webpack-plugin": "^4.0.0",
"husky": "4.3.7",
"knowdesign": "^1.3.7",
"less-loader": "^4.1.0",
"lint-staged": "10.5.3",
"mini-css-extract-plugin": "^1.3.0",

View File

@@ -109,7 +109,15 @@ class CoverHtmlWebpackPlugin {
<script src='${isProd ? PublicPath : ''}/static/js/named-exports.min.js'></script>
<script src='${isProd ? PublicPath : ''}/static/js/use-default.min.js'></script>
<script src='${isProd ? PublicPath : ''}/static/js/amd.js'></script>
${process.env.BUSINESS_VERSION === 'true' ? `<script src=${isProd ? PublicPath : ''}/static/js/ksl.min.js></script>` : ''}
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?16d7da6d1dd79237d801ee55809cfe90";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</head>
<body>
${depsMap}

View File

@@ -64,7 +64,7 @@
"webpack-bundle-analyzer": "^4.5.0"
},
"devDependencies": {
"@babel/core": "^7.5.5",
"@babel/core": "^7.18.13",
"@babel/plugin-proposal-class-properties": "^7.4.0",
"@babel/plugin-proposal-decorators": "^7.4.0",
"@babel/plugin-proposal-export-default-from": "^7.2.0",
@@ -79,7 +79,7 @@
"@babel/preset-typescript": "^7.14.5",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.1",
"@types/crypto-js": "^4.1.0",
"@types/lodash": "^4.14.171",
"@types/lodash": "^4.14.184",
"@types/node": "^12.12.25",
"@types/pubsub-js": "^1.5.18",
"pubsub-js": "^1.5.18",
@@ -101,6 +101,7 @@
"file-loader": "^6.0.0",
"hard-source-webpack-plugin": "^0.13.1",
"husky": "4.3.7",
"knowdesign": "^1.3.7",
"less": "^3.9.0",
"less-loader": "^4.1.0",
"lint-staged": "10.5.3",

View File

@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/ban-ts-comment */
/* eslint-disable no-constant-condition */
import '@babel/polyfill';
import React, { useState, useEffect, useLayoutEffect } from 'react';
@@ -88,6 +89,17 @@ const AppContent = (props: { setlanguage: (language: string) => void }) => {
} else {
setCurActiveAppName('cluster');
}
// @ts-ignore
window._hmt = window._hmt || [];
// window._hmt.push([
// '_setPageviewProperty',
// {
// page_name: 'test',
// page_title: null, // 当属性值传入 null 时,其作用为删除此前设置的该 PV 属性
// },
// ]);
// @ts-ignore
window._hmt.push(['_trackPageview', pathname]);
}, [pathname]);
// 获取版本信息

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -154,15 +154,15 @@ export const urlParser = () => {
export const getLicenseInfo = (cbk: (msg: string) => void) => {
if (process.env.BUSINESS_VERSION) {
const info = (window as any).code;
if (!info) {
setTimeout(() => getLicenseInfo(cbk), 1000);
} else {
const res = info() || {};
if (res.code !== 0) {
cbk(res.msg);
}
}
// const info = (window as any).code;
// if (!info) {
// setTimeout(() => getLicenseInfo(cbk), 1000);
// } else {
// const res = info() || {};
// if (res.code !== 0) {
// cbk(res.msg);
// }
// }
}
};

View File

@@ -150,7 +150,14 @@ export const leftMenus = (clusterId?: string, clusterRunState?: number) => ({
children: [
process.env.BUSINESS_VERSION
? {
name: 'balance',
name: (intl: any) => {
return (
<div className="menu-item-with-pro-tag">
<span>{intl.formatMessage({ id: 'menu.cluster.operation.balance' })}</span>
<div className="pro-tag"></div>
</div>
);
},
path: 'balance',
icon: '#icon-luoji',
}
@@ -164,19 +171,26 @@ export const leftMenus = (clusterId?: string, clusterRunState?: number) => ({
},
process.env.BUSINESS_VERSION
? {
name: 'produce-consume',
name: (intl: any) => {
return (
<div className="menu-item-with-pro-tag">
<span>{intl.formatMessage({ id: 'menu.cluster.produce-consume' })}</span>
<div className="pro-tag"></div>
</div>
);
},
path: 'testing',
icon: 'icon-Message',
permissionPoint: [ClustersPermissionMap.TEST_CONSUMER, ClustersPermissionMap.TEST_PRODUCER],
children: [
{
name: 'producer',
name: (intl: any) => <span>{intl.formatMessage({ id: 'menu.cluster.produce-consume.producer' })}</span>,
path: 'producer',
icon: 'icon-luoji',
permissionPoint: ClustersPermissionMap.TEST_PRODUCER,
},
{
name: 'consumer',
name: (intl: any) => <span>{intl.formatMessage({ id: 'menu.cluster.produce-consume.consumer' })}</span>,
path: 'consumer',
icon: 'icon-luoji',
permissionPoints: ClustersPermissionMap.TEST_CONSUMER,

View File

@@ -259,6 +259,19 @@ li {
}
}
.menu-item-with-pro-tag {
display: flex;
.pro-tag {
width: 24px;
margin-left: 4px;
background: no-repeat center/24px 16px url('./assets/pro-tag.png');
}
}
.dcloud-menu-item-selected .menu-item-with-pro-tag .pro-tag {
width: 0;
}
.menu-item-with-beta-tag {
display: flex;
.beta-tag {

View File

@@ -45,6 +45,7 @@ export const FormMap = [
prefix: <></>,
// prefix: <UserOutlined style={{ color: 'rgba(0,0,0,.25)' }} />,
},
initialValue: 'admin',
},
{
key: 'pw',
@@ -64,6 +65,7 @@ export const FormMap = [
placeholder: '请输入密码',
// prefix: <LockOutlined style={{ color: 'rgba(0,0,0,.25)' }} />,
},
initialValue: 'admin2022_',
},
];

View File

@@ -58,7 +58,14 @@ export const LoginForm: React.FC<any> = (props) => {
{FormMap.map((formItem) => {
return (
<Row key={formItem.key}>
<Form.Item key={formItem.key} name={formItem.key} label={formItem.label} rules={formItem.rules} style={{ width: '100%' }}>
<Form.Item
key={formItem.key}
name={formItem.key}
label={formItem.label}
rules={formItem.rules}
initialValue={formItem.initialValue}
style={{ width: '100%' }}
>
{renderFormItem(formItem)}
</Form.Item>
</Row>

View File

@@ -15,7 +15,7 @@
</parent>
<properties>
<revision>enterprise-3.4.0</revision>
<revision>demo-3.4.0</revision>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>