)
}
+
function mapStateToProps (state) {
const { auth, global, members, webSocket } = state;
return {
- // loading: members.isRequesting,
- // user: auth.user,
- // actions: global.actions,
- // members: members.data,
- // socket: webSocket.socket
- pomsMonitor: global.pomsMonitor,
+ clientHeight: global.clientHeight,
+ pomsAmbari: global.pomsAmbari,
+
};
}
-export default connect(mapStateToProps)(Server);
+export default connect(mapStateToProps)(SetControl);
diff --git a/web/client/src/sections/facility/containers/other.jsx b/web/client/src/sections/facility/containers/other.jsx
index c116207..29acddd 100644
--- a/web/client/src/sections/facility/containers/other.jsx
+++ b/web/client/src/sections/facility/containers/other.jsx
@@ -4,7 +4,7 @@ import { connect } from 'react-redux';
const SetControl = (props) => {
- const { dispatch, actions, user, loading, socket } = props
+ const { dispatch, actions, clientHeight, history } = props
useEffect(() => {
@@ -12,22 +12,66 @@ const SetControl = (props) => {
return (
- <>
-
-
+
+
+
+
+
{
+ history.push({ pathname: '/facility/other/kowl', })
+ }}>
+
+
+
kowl监控
+
kafka消息可视化工具
+
+
+
+
+
+
{
+ history.push({ pathname: '/facility/other/pghero',})
+ }}>
+
+
+
pghero
+
PostgreSQL 性能监控工具
+
+
+
+
+
+
{
+ history.push({ pathname: '/facility/other/es', })
+ }}>
+
+
+
- >
+
+
+
)
}
function mapStateToProps (state) {
const { auth, global, members, webSocket } = state;
return {
- // loading: members.isRequesting,
- // user: auth.user,
- // actions: global.actions,
- // members: members.data,
- // socket: webSocket.socket
+ clientHeight: global.clientHeight,
+ pomsKowl: global.pomsKowl,
+ pomsPghero: global.pomsPghero,
+ pomsEs: global.pomsEs,
+
};
}
diff --git a/web/client/src/sections/facility/containers/pghero.jsx b/web/client/src/sections/facility/containers/pghero.jsx
new file mode 100644
index 0000000..4888b16
--- /dev/null
+++ b/web/client/src/sections/facility/containers/pghero.jsx
@@ -0,0 +1,55 @@
+import React, { useEffect } from 'react';
+import { connect } from 'react-redux';
+import { IconReply } from '@douyinfe/semi-icons';
+import { Button } from '@douyinfe/semi-ui';
+
+
+const Pghero = (props) => {
+ const { dispatch, actions, pomsPghero, clientHeight,history } = props
+
+ useEffect(() => {
+
+ }, [])
+
+
+ return (
+
+
+
+
+
+
+
+
+
+
+ )
+}
+function mapStateToProps (state) {
+ const { auth, global, members, webSocket } = state;
+ return {
+ clientHeight: global.clientHeight,
+ pomsPghero: global.pomsPghero,
+ };
+}
+
+export default connect(mapStateToProps)(Pghero);
diff --git a/web/client/src/sections/facility/nav-item.jsx b/web/client/src/sections/facility/nav-item.jsx
index 0a5c662..ec85973 100644
--- a/web/client/src/sections/facility/nav-item.jsx
+++ b/web/client/src/sections/facility/nav-item.jsx
@@ -2,43 +2,43 @@ import React from 'react';
import { IconCode } from '@douyinfe/semi-icons';
export function getNavItem (user, dispatch) {
- return (
- [
- {
- itemKey: 'facility',
- text: '设备',
- icon:
,
- items: [
- {
- itemKey: 'deviceQuery',
- text: '设备查询',
- icon:
,
- to: '/facility/deviceQuery/maintenanceRecords1',
- items: [{
- itemKey: 'maintenanceRecords1', to: '/facility/deviceQuery/maintenanceRecords1', text: '维护记录'
- }]
- }, {
- itemKey: 'serverInformation',
- text: '服务器信息',
- icon:
,
- to: '/facility/serverInformation/monitor',
- items: [{
- itemKey: 'monitor', to: '/facility/serverInformation/monitor', text: '运维监控'
- },{
- itemKey: 'maintenanceRecords', to: '/facility/serverInformation/maintenanceRecords', text: '维护记录'
- }]
- },{
- itemKey: 'other',
- text: '其他',
- icon:
,
- to: '/facility/other/other1',
- items: [{
- itemKey: 'other1', to: '/facility/other/other1', text: '其他'
- }]
- }
- ]
- },
- ]
- );
+ return (
+ [
+ {
+ itemKey: 'facility',
+ text: '设备',
+ icon:
,
+ items: [
+ {
+ itemKey: 'deviceQuery',
+ text: '设备查询',
+ icon:
,
+ to: '/facility/deviceQuery/maintenanceRecords1',
+ items: [{
+ itemKey: 'maintenanceRecords1', to: '/facility/deviceQuery/maintenanceRecords1', text: '维护记录'
+ }]
+ }, {
+ itemKey: 'serverInformation',
+ text: '服务器信息',
+ icon:
,
+ to: '/facility/serverInformation/monitor',
+ items: [{
+ itemKey: 'monitor', to: '/facility/serverInformation/monitor', text: '运维监控'
+ }, {
+ itemKey: 'maintenanceRecords', to: '/facility/serverInformation/maintenanceRecords', text: '维护记录'
+ }]
+ }, {
+ itemKey: 'other',
+ text: '其他',
+ icon:
,
+ to: '/facility/other/other1',
+ items: [{
+ itemKey: 'other1', to: '/facility/other/other1', text: '其他'
+ }]
+ }
+ ]
+ },
+ ]
+ );
}
diff --git a/web/client/src/sections/facility/routes.js b/web/client/src/sections/facility/routes.js
index 8a174d5..fa25ebd 100644
--- a/web/client/src/sections/facility/routes.js
+++ b/web/client/src/sections/facility/routes.js
@@ -1,47 +1,77 @@
-import { MaintenanceRecords, Monitor, Other } from './containers';
+import { MaintenanceRecords, Grafana, Monitor,Other, Kubesphere, Ambari, Es, Kowl, Pghero } from './containers';
export default [{
- type: 'inner',
- route: {
- path: '/facility',
- key: 'facility',
- breadcrumb: '设备',
- // 不设置 component 则面包屑禁止跳转
- childRoutes: [{
- path: '/deviceQuery',
- key: 'deviceQuery',
- breadcrumb: '设备查询',
- childRoutes: [{
- path: '/maintenanceRecords1',
- key: 'maintenanceRecords1',
- component: MaintenanceRecords,
- breadcrumb: '维护记录',
- }]
- }, {
- path: '/serverInformation',
- key: 'serverInformation',
- breadcrumb: '服务器信息',
- childRoutes: [{
- path: '/monitor',
- key: 'monitor',
- component: Monitor,
- breadcrumb: '运维监控',
- }, {
- path: '/maintenanceRecords',
- key: 'maintenanceRecords',
- component: MaintenanceRecords,
- breadcrumb: '维护记录',
- },]
- }, {
- path: '/other',
- key: 'other',
+ type: 'inner',
+ route: {
+ path: '/facility',
+ key: 'facility',
+ breadcrumb: '设备',
+ // 不设置 component 则面包屑禁止跳转
+ childRoutes: [{
+ path: '/deviceQuery',
+ key: 'deviceQuery',
+ breadcrumb: '设备查询',
+ childRoutes: [{
+ path: '/maintenanceRecords1',
+ key: 'maintenanceRecords1',
+ component: MaintenanceRecords,
+ breadcrumb: '维护记录',
+ }]
+ }, {
+ path: '/serverInformation',
+ key: 'serverInformation',
+ breadcrumb: '服务器信息',
+ childRoutes: [{
+ path: '/monitor',
+ key: 'monitor',
+ component: Monitor,
+ breadcrumb: 'Monitor',
+ },{
+ path: '/grafana',
+ key: 'grafana',
+ component: Grafana,
+ breadcrumb: 'Grafana',
+ }, {
+ path: '/kubesphere',
+ key: 'kubesphere',
+ component: Kubesphere,
+ breadcrumb: 'Kubesphere',
+ }, {
+ path: '/ambari',
+ key: 'ambari',
+ component: Ambari,
+ breadcrumb: 'Ambari',
+ }, {
+ path: '/maintenanceRecords',
+ key: 'maintenanceRecords',
+ component: MaintenanceRecords,
+ breadcrumb: '维护记录',
+ },]
+ }, {
+ path: '/other',
+ key: 'other',
+ breadcrumb: '其他',
+ childRoutes: [{
+ path: '/other1',
+ key: 'other1',
+ component: Other,
breadcrumb: '其他',
- childRoutes: [{
- path: '/other1',
- key: 'other1',
- component: Other,
- breadcrumb: '其他',
- }]
- }]
- }
+ }, {
+ path: '/kowl',
+ key: 'kowl',
+ component: Kowl,
+ breadcrumb: 'Kowl',
+ }, {
+ path: '/pghero',
+ key: 'pghero',
+ component: Pghero,
+ breadcrumb: 'Pghero',
+ }, {
+ path: '/es',
+ key: 'es',
+ component: Es,
+ breadcrumb: 'Es',
+ }]
+ }]
+ }
}];
\ No newline at end of file
diff --git a/web/config.js b/web/config.js
index 96c67fb..9f52985 100644
--- a/web/config.js
+++ b/web/config.js
@@ -17,6 +17,12 @@ args.option('apiAnxinyunUrl', '安心云 api');
args.option('apiEmisUrl', '企业管理 api');
args.option('iotVcmpWeb', 'IOT 视频服务');
args.option('pomsMonitor', '运维监控 web');
+args.option('pomsKubesphere', 'kubesphere web');
+args.option('pomsAmbari', 'ambari web');
+args.option('pomsKowl', '运维监控 web');
+args.option('pomsPghero', 'pghero web');
+args.option('pomsEs', 'es监控 web');
+args.option('pomsNotebook', 'notebook web');
args.option('dcWeb', '报表中心web');
@@ -34,6 +40,12 @@ const API_EMIS_URL = process.env.API_EMIS_URL || flags.apiEmisUrl;
const API_ANXINYUN_URL = process.env.API_ANXINYUN_URL || flags.apiAnxinyunUrl;
const IOT_VIDEO_WEB = process.env.IOT_VIDEO_WEB || flags.iotVcmpWeb;
const POMS_MONITOR = process.env.POMS_MONITOR || flags.pomsMonitor;
+const POMS_KUBESPHERE = process.env.POMS_KUBESPHERE || flags.pomsKubesphere;
+const POMS_AMBARI = process.env.POMS_AMBARI || flags.pomsAmbari;
+const POMS_KOWL = process.env.POMS_KOWL || flags.pomsKowl;
+const POMS_PGHERO = process.env.POMS_PGHERO || flags.pomsPghero;
+const POMS_ES = process.env.POMS_ES || flags.pomsEs;
+const POMS_NOTEBOOK = process.env.POMS_NOTEBOOK || flags.pomsNotebook;
const DC_WEB = process.env.DC_WEB || flags.dcWeb;
// 七牛
@@ -92,6 +104,12 @@ const product = {
apiUrl: API_POMS_URL,
iotVcmpWeb: IOT_VIDEO_WEB,
pomsMonitor: POMS_MONITOR,
+ pomsKubesphere: POMS_KUBESPHERE,
+ pomsAmbari: POMS_AMBARI,
+ pomsKowl: POMS_KOWL,
+ pomsPghero: POMS_PGHERO,
+ pomsEs: POMS_ES,
+ pomsNotebook: POMS_NOTEBOOK,
dcWeb: DC_WEB,
staticRoot: './client',
qiniu: {
diff --git a/web/package.json b/web/package.json
index 396a774..50677c3 100644
--- a/web/package.json
+++ b/web/package.json
@@ -7,7 +7,7 @@
"test": "mocha",
"start-vite": "cross-env NODE_ENV=developmentVite npm run start-params",
"start": "cross-env NODE_ENV=development npm run start-params",
- "start-params": "node server -p 5600 -u http://localhost:4600 --apiPomsUrl http://localhost:4600 --apiAnxinyunUrl http://10.8.30.112:4100 --apiEmisUrl http://10.8.30.112:14000 --qnak 5XrM4wEB9YU6RQwT64sPzzE6cYFKZgssdP5Kj3uu --qnsk w6j2ixR_i-aelc6I7S3HotKIX-ukMzcKmDfH6-M5 --qnbkt anxinyun-test --qndmn http://test.resources.anxinyun.cn --iotVcmpWeb https://mediaconsole.ngaiot.com --pomsMonitor https://monitor.anxinyun.cn --dcWeb https://fsiot-oamss.anxinyun.cn",
+ "start-params": "node server -p 5600 -u http://localhost:4600 --apiPomsUrl http://localhost:4600 --apiAnxinyunUrl http://10.8.30.112:4100 --apiEmisUrl http://10.8.30.112:14000 --qnak 5XrM4wEB9YU6RQwT64sPzzE6cYFKZgssdP5Kj3uu --qnsk w6j2ixR_i-aelc6I7S3HotKIX-ukMzcKmDfH6-M5 --qnbkt anxinyun-test --qndmn http://test.resources.anxinyun.cn --iotVcmpWeb https://mediaconsole.ngaiot.com --pomsMonitor http://monitor.anxinyun.cn/goto/PaEDLE84z?orgId=1 --pomsKubesphere https://k8sadmin.anxinyun.cn/ --pomsAmbari https://ambari.anxinyun.cn/ --pomsKowl https://kafka.anxinyun.cn/ --pomsPghero https://pghero.anxinyun.cn/ --pomsEs https://esc.anxinyun.cn/ --pomsNotebook https://inotebook.anxinyun.cn/ --dcWeb https://fsiot-oamss.anxinyun.cn",
"deploy": "export NODE_ENV=production&& npm run build && node server",
"build-dev": "cross-env NODE_ENV=development&&webpack --config webpack.config.js",
"build": "cross-env NODE_ENV=production&&webpack --config webpack.config.prod.js"
@@ -83,4 +83,4 @@
"webpack-dev-server": "^3.11.2",
"webpack-hot-middleware": "^2.25.0"
}
-}
+}
\ No newline at end of file
diff --git a/web/routes/attachment/index.js b/web/routes/attachment/index.js
index 1afd5f5..6e8967e 100644
--- a/web/routes/attachment/index.js
+++ b/web/routes/attachment/index.js
@@ -19,13 +19,19 @@ module.exports = {
entry: function (app, router, opts) {
const getApiRoot = async function (ctx) {
- const { apiUrl, iotVcmpWeb, pomsMonitor, dcWeb, qiniu } = opts;
+ const { apiUrl, iotVcmpWeb, pomsMonitor, pomsKubesphere, pomsAmbari, pomsKowl, pomsPghero, pomsEs, pomsNotebook, dcWeb, qiniu } = opts;
ctx.status = 200;
ctx.body = {
root: apiUrl,
iotVcmpWeb: iotVcmpWeb,
+ pomsKubesphere: pomsKubesphere,
+ pomsAmbari: pomsAmbari,
+ pomsKowl: pomsKowl,
+ pomsPghero: pomsPghero,
+ pomsEs: pomsEs,
pomsMonitor: pomsMonitor,
+ pomsNotebook: pomsNotebook,
dcWeb: dcWeb,
qiniu: qiniu
};
@@ -58,7 +64,7 @@ module.exports = {
const fileInfo = await ctx.app.fs.attachment.upload(file);
fkey = fileInfo.key;
ctx.body = { uploaded: fkey };
-
+
} catch (err) {
ctx.status = 500;
ctx.fs.logger.error(err);