mirror of
https://github.com/didi/KnowStreaming.git
synced 2025-12-24 20:22:12 +08:00
Compare commits
4 Commits
ve_3.x
...
ve_demo_3.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a87a0663ed | ||
|
|
f5de9789f2 | ||
|
|
64cddb7912 | ||
|
|
aa35965d7a |
@@ -35,7 +35,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@ant-design/icons": "^4.6.2",
|
"@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-class-properties": "^7.4.0",
|
||||||
"@babel/plugin-proposal-decorators": "^7.4.0",
|
"@babel/plugin-proposal-decorators": "^7.4.0",
|
||||||
"@babel/plugin-proposal-export-default-from": "^7.2.0",
|
"@babel/plugin-proposal-export-default-from": "^7.2.0",
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
"@babel/preset-react": "^7.0.0",
|
"@babel/preset-react": "^7.0.0",
|
||||||
"@babel/preset-typescript": "^7.14.5",
|
"@babel/preset-typescript": "^7.14.5",
|
||||||
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.1",
|
"@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-dom": "^17.0.5",
|
||||||
"@types/react-router": "5.1.18",
|
"@types/react-router": "5.1.18",
|
||||||
"@types/react-router-dom": "^5.3.3",
|
"@types/react-router-dom": "^5.3.3",
|
||||||
@@ -76,6 +76,7 @@
|
|||||||
"hard-source-webpack-plugin": "^0.13.1",
|
"hard-source-webpack-plugin": "^0.13.1",
|
||||||
"html-webpack-plugin": "^4.0.0",
|
"html-webpack-plugin": "^4.0.0",
|
||||||
"husky": "4.3.7",
|
"husky": "4.3.7",
|
||||||
|
"knowdesign": "^1.3.7",
|
||||||
"less-loader": "^4.1.0",
|
"less-loader": "^4.1.0",
|
||||||
"lint-staged": "10.5.3",
|
"lint-staged": "10.5.3",
|
||||||
"mini-css-extract-plugin": "^1.3.0",
|
"mini-css-extract-plugin": "^1.3.0",
|
||||||
|
|||||||
@@ -109,7 +109,15 @@ class CoverHtmlWebpackPlugin {
|
|||||||
<script src='${isProd ? PublicPath : ''}/static/js/named-exports.min.js'></script>
|
<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/use-default.min.js'></script>
|
||||||
<script src='${isProd ? PublicPath : ''}/static/js/amd.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>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
${depsMap}
|
${depsMap}
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
"webpack-bundle-analyzer": "^4.5.0"
|
"webpack-bundle-analyzer": "^4.5.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.5.5",
|
"@babel/core": "^7.18.13",
|
||||||
"@babel/plugin-proposal-class-properties": "^7.4.0",
|
"@babel/plugin-proposal-class-properties": "^7.4.0",
|
||||||
"@babel/plugin-proposal-decorators": "^7.4.0",
|
"@babel/plugin-proposal-decorators": "^7.4.0",
|
||||||
"@babel/plugin-proposal-export-default-from": "^7.2.0",
|
"@babel/plugin-proposal-export-default-from": "^7.2.0",
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
"@babel/preset-typescript": "^7.14.5",
|
"@babel/preset-typescript": "^7.14.5",
|
||||||
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.1",
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.1",
|
||||||
"@types/crypto-js": "^4.1.0",
|
"@types/crypto-js": "^4.1.0",
|
||||||
"@types/lodash": "^4.14.171",
|
"@types/lodash": "^4.14.184",
|
||||||
"@types/node": "^12.12.25",
|
"@types/node": "^12.12.25",
|
||||||
"@types/pubsub-js": "^1.5.18",
|
"@types/pubsub-js": "^1.5.18",
|
||||||
"pubsub-js": "^1.5.18",
|
"pubsub-js": "^1.5.18",
|
||||||
@@ -101,6 +101,7 @@
|
|||||||
"file-loader": "^6.0.0",
|
"file-loader": "^6.0.0",
|
||||||
"hard-source-webpack-plugin": "^0.13.1",
|
"hard-source-webpack-plugin": "^0.13.1",
|
||||||
"husky": "4.3.7",
|
"husky": "4.3.7",
|
||||||
|
"knowdesign": "^1.3.7",
|
||||||
"less": "^3.9.0",
|
"less": "^3.9.0",
|
||||||
"less-loader": "^4.1.0",
|
"less-loader": "^4.1.0",
|
||||||
"lint-staged": "10.5.3",
|
"lint-staged": "10.5.3",
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
||||||
/* eslint-disable no-constant-condition */
|
/* eslint-disable no-constant-condition */
|
||||||
import '@babel/polyfill';
|
import '@babel/polyfill';
|
||||||
import React, { useState, useEffect, useLayoutEffect } from 'react';
|
import React, { useState, useEffect, useLayoutEffect } from 'react';
|
||||||
@@ -88,6 +89,17 @@ const AppContent = (props: { setlanguage: (language: string) => void }) => {
|
|||||||
} else {
|
} else {
|
||||||
setCurActiveAppName('cluster');
|
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]);
|
}, [pathname]);
|
||||||
|
|
||||||
// 获取版本信息
|
// 获取版本信息
|
||||||
|
|||||||
BIN
km-console/packages/layout-clusters-fe/src/assets/pro-tag.png
Normal file
BIN
km-console/packages/layout-clusters-fe/src/assets/pro-tag.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
@@ -154,15 +154,15 @@ export const urlParser = () => {
|
|||||||
|
|
||||||
export const getLicenseInfo = (cbk: (msg: string) => void) => {
|
export const getLicenseInfo = (cbk: (msg: string) => void) => {
|
||||||
if (process.env.BUSINESS_VERSION) {
|
if (process.env.BUSINESS_VERSION) {
|
||||||
const info = (window as any).code;
|
// const info = (window as any).code;
|
||||||
if (!info) {
|
// if (!info) {
|
||||||
setTimeout(() => getLicenseInfo(cbk), 1000);
|
// setTimeout(() => getLicenseInfo(cbk), 1000);
|
||||||
} else {
|
// } else {
|
||||||
const res = info() || {};
|
// const res = info() || {};
|
||||||
if (res.code !== 0) {
|
// if (res.code !== 0) {
|
||||||
cbk(res.msg);
|
// cbk(res.msg);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -150,7 +150,14 @@ export const leftMenus = (clusterId?: string, clusterRunState?: number) => ({
|
|||||||
children: [
|
children: [
|
||||||
process.env.BUSINESS_VERSION
|
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',
|
path: 'balance',
|
||||||
icon: '#icon-luoji',
|
icon: '#icon-luoji',
|
||||||
}
|
}
|
||||||
@@ -164,19 +171,26 @@ export const leftMenus = (clusterId?: string, clusterRunState?: number) => ({
|
|||||||
},
|
},
|
||||||
process.env.BUSINESS_VERSION
|
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',
|
path: 'testing',
|
||||||
icon: 'icon-Message',
|
icon: 'icon-Message',
|
||||||
permissionPoint: [ClustersPermissionMap.TEST_CONSUMER, ClustersPermissionMap.TEST_PRODUCER],
|
permissionPoint: [ClustersPermissionMap.TEST_CONSUMER, ClustersPermissionMap.TEST_PRODUCER],
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
name: 'producer',
|
name: (intl: any) => <span>{intl.formatMessage({ id: 'menu.cluster.produce-consume.producer' })}</span>,
|
||||||
path: 'producer',
|
path: 'producer',
|
||||||
icon: 'icon-luoji',
|
icon: 'icon-luoji',
|
||||||
permissionPoint: ClustersPermissionMap.TEST_PRODUCER,
|
permissionPoint: ClustersPermissionMap.TEST_PRODUCER,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'consumer',
|
name: (intl: any) => <span>{intl.formatMessage({ id: 'menu.cluster.produce-consume.consumer' })}</span>,
|
||||||
path: 'consumer',
|
path: 'consumer',
|
||||||
icon: 'icon-luoji',
|
icon: 'icon-luoji',
|
||||||
permissionPoints: ClustersPermissionMap.TEST_CONSUMER,
|
permissionPoints: ClustersPermissionMap.TEST_CONSUMER,
|
||||||
|
|||||||
@@ -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 {
|
.menu-item-with-beta-tag {
|
||||||
display: flex;
|
display: flex;
|
||||||
.beta-tag {
|
.beta-tag {
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ export const FormMap = [
|
|||||||
prefix: <></>,
|
prefix: <></>,
|
||||||
// prefix: <UserOutlined style={{ color: 'rgba(0,0,0,.25)' }} />,
|
// prefix: <UserOutlined style={{ color: 'rgba(0,0,0,.25)' }} />,
|
||||||
},
|
},
|
||||||
|
initialValue: 'admin',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'pw',
|
key: 'pw',
|
||||||
@@ -64,6 +65,7 @@ export const FormMap = [
|
|||||||
placeholder: '请输入密码',
|
placeholder: '请输入密码',
|
||||||
// prefix: <LockOutlined style={{ color: 'rgba(0,0,0,.25)' }} />,
|
// prefix: <LockOutlined style={{ color: 'rgba(0,0,0,.25)' }} />,
|
||||||
},
|
},
|
||||||
|
initialValue: 'admin2022_',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,14 @@ export const LoginForm: React.FC<any> = (props) => {
|
|||||||
{FormMap.map((formItem) => {
|
{FormMap.map((formItem) => {
|
||||||
return (
|
return (
|
||||||
<Row key={formItem.key}>
|
<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)}
|
{renderFormItem(formItem)}
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Row>
|
</Row>
|
||||||
|
|||||||
2
pom.xml
2
pom.xml
@@ -15,7 +15,7 @@
|
|||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<revision>enterprise-3.4.0</revision>
|
<revision>demo-3.4.0</revision>
|
||||||
|
|
||||||
<maven.compiler.source>8</maven.compiler.source>
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
<maven.compiler.target>8</maven.compiler.target>
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
|
|||||||
Reference in New Issue
Block a user