{this.renderTab()}
diff --git a/kafka-manager-console/src/container/user-center/order-list.tsx b/kafka-manager-console/src/container/user-center/order-list.tsx
index bfa6cd40..6c81b0ec 100644
--- a/kafka-manager-console/src/container/user-center/order-list.tsx
+++ b/kafka-manager-console/src/container/user-center/order-list.tsx
@@ -21,21 +21,20 @@ interface IProps {
@observer
export class OrderList extends SearchAndFilterContainer {
-
public orderType: string;
-
- public state = {
+ public state: { [propname: string]: any } = {
searchKey: '',
currentTab: '0',
filterTypeVisible: false,
filterStatusVisible: false,
+ selectedRows: [],
};
-
public currentItem = {} as IBaseOrder;
constructor(props: IProps) {
super(props);
this.orderType = props.type;
+ // this.state.b;
}
public cancelOrder(record: IBaseOrder) {
@@ -73,9 +72,9 @@ export class OrderList extends SearchAndFilterContainer {
onFilter: (value: string, record: IBaseOrder) => record.status === +value,
render: (t: number) => (
<>
-
- {orderStatusMap[t] || ''}
-
+
+ {orderStatusMap[t] || ''}
+
>
),
}, this.renderColumnsFilter('filterStatusVisible'));
diff --git a/kafka-manager-console/src/lib/api.ts b/kafka-manager-console/src/lib/api.ts
index 484757f8..f53f6852 100644
--- a/kafka-manager-console/src/lib/api.ts
+++ b/kafka-manager-console/src/lib/api.ts
@@ -1,4 +1,4 @@
-import fetch , { formFetch } from './fetch';
+import fetch, { formFetch } from './fetch';
import { IUploadFile, IUser, IQuotaModelItem, ILimitsItem, ITopic, IOrderParams, ISample, IMigration, IExecute, IEepand, IUtils, ITopicMetriceParams, IRegister, IEditTopic, IExpand, IDeleteTopic, INewRegions, INewLogical, IRebalance, INewBulidEnums, ITrigger, IApprovalOrder, IMonitorSilences, IConfigure, IBatchApproval } from 'types/base-type';
import { IRequestParams } from 'types/alarm';
import { apiCache } from 'lib/api-cache';
@@ -94,8 +94,8 @@ export const getRealTimeTraffic = (clusterId: number, topicName: string) => {
return fetch(`/normal/${clusterId}/topics/${topicName}/metrics`);
};
-export const getRealConsume = (clusterId: number, topicName: string) => {
- return fetch(`/normal/${clusterId}/topics/${topicName}/request-time`);
+export const getRealConsume = (clusterId: number, topicName: string, percentile: string) => {
+ return fetch(`/normal/${clusterId}/topics/${topicName}/request-time?percentile=${percentile}`);
};
export const getConnectionInfo = (clusterId: number, topicName: string, appId?: string) => {
@@ -354,12 +354,12 @@ export const approvalOrder = (params: IApprovalOrder) => {
* @see http://127.0.0.1:8080/swagger-ui.html#!/OP4524037213333045620851255092147540REST41/getOrderAppDetailUsingGET
*/
export const getOrderTypeList = () => {
- return fetch('/normal/orders/type-enums') ;
+ return fetch('/normal/orders/type-enums');
};
// 我的申请
export const getApplyOrderList = (status: number) => {
- return fetch(`/normal/orders?status=${status === 2 ? '' : status}`) ;
+ return fetch(`/normal/orders?status=${status === 2 ? '' : status}`);
};
export const getOrderDetail = (orderId: number) => {
@@ -436,7 +436,7 @@ export const editConfigure = (params: IConfigure) => {
});
};
-export const deleteConfigure = (configKey: string) => {
+export const deleteConfigure = (configKey: string) => {
return fetch(`/rd/configs?config-key=${configKey}`, {
method: 'DELETE',
});
@@ -800,21 +800,21 @@ export const getTicketBycode = (code: string) => {
method: 'POST',
body: JSON.stringify({ code }),
});
- };
+};
export const userLogOut = () => {
return fetch('/sso/logout', {
method: 'DELETE',
});
- };
+};
- /**
- * 监控报警 alarm
- */
+/**
+ * 监控报警 alarm
+ */
export const getMonitorStrategies = () => {
return fetch('/normal/monitor-strategies');
- };
+};
export const deteleMonitorStrategies = (monitorId: number) => {
return fetch(`/normal/monitor-strategies?monitorId=${monitorId}`, {
@@ -873,7 +873,7 @@ export const getMonitorDetail = (monitorId: number) => {
};
export const modifyMonitorStrategy = (params: IRequestParams) => {
- return fetch('/normal/monitor-strategies', {
+ return fetch('/normal/monitor-strategies', {
method: 'PUT',
body: JSON.stringify(params),
});
diff --git a/kafka-manager-console/src/lib/bar-pie-config.ts b/kafka-manager-console/src/lib/bar-pie-config.ts
index dc37d8fa..bd79c5a9 100644
--- a/kafka-manager-console/src/lib/bar-pie-config.ts
+++ b/kafka-manager-console/src/lib/bar-pie-config.ts
@@ -76,7 +76,8 @@ export const getPieChartOption = (data: ILabelValue[], legend: string[]) => {
},
emphasis: {
label: {
- show: true,
+ // show: true,
+ show: false,
fontSize: '16',
fontWeight: 'bold',
},
diff --git a/kafka-manager-console/src/routers/index.tsx b/kafka-manager-console/src/routers/index.tsx
index 7841e124..3ecea6fb 100644
--- a/kafka-manager-console/src/routers/index.tsx
+++ b/kafka-manager-console/src/routers/index.tsx
@@ -2,6 +2,7 @@ import * as ReactDOM from 'react-dom';
import { Provider } from 'mobx-react';
import * as React from 'react';
import Router from './router';
+import 'styles/style.less';
const renderApp = () => {
ReactDOM.render(
diff --git a/kafka-manager-console/src/routers/page/index.less b/kafka-manager-console/src/routers/page/index.less
index 55b90786..e4559814 100644
--- a/kafka-manager-console/src/routers/page/index.less
+++ b/kafka-manager-console/src/routers/page/index.less
@@ -107,3 +107,10 @@ html, body, .router-nav {
padding: 10px;
}
+.applicationDocument {
+ display: inline-block;
+ margin-left: 10px;
+ cursor: pointer;
+ font-size: 12px;
+}
+
diff --git a/kafka-manager-console/src/store/admin.ts b/kafka-manager-console/src/store/admin.ts
index d5bec622..f3d08264 100644
--- a/kafka-manager-console/src/store/admin.ts
+++ b/kafka-manager-console/src/store/admin.ts
@@ -597,7 +597,9 @@ class Admin {
}
public getTopicsBasicInfo(clusterId: number, topicName: string) {
- return getTopicsBasicInfo(clusterId, topicName).then(this.setTopicsBasicInfo);
+ return getTopicsBasicInfo(clusterId, topicName).then(data => {
+ return this.setTopicsBasicInfo(data);
+ });
}
public getTasksKafkaFiles(clusterId?: any) {
diff --git a/kafka-manager-console/src/store/order.ts b/kafka-manager-console/src/store/order.ts
index e06d8b68..0742d0f6 100644
--- a/kafka-manager-console/src/store/order.ts
+++ b/kafka-manager-console/src/store/order.ts
@@ -19,6 +19,9 @@ class Order {
@observable
public loading: boolean = false;
+ @observable
+ public selectedRows: any[] = [];
+
@observable
public orderList: IBaseOrder[] = [];
@@ -55,6 +58,15 @@ class Order {
this.loading = value;
}
+ @action.bound
+ public setSelectedRows(rows?: any[]) {
+ if (rows) {
+ this.selectedRows = rows;
+ } else {
+ this.selectedRows = [];
+ }
+ }
+
@action.bound
public setOrderList(data: IBaseOrder[]) {
this.orderList = data;
diff --git a/kafka-manager-console/src/store/region.ts b/kafka-manager-console/src/store/region.ts
index 0b26c96e..6bb20e9d 100644
--- a/kafka-manager-console/src/store/region.ts
+++ b/kafka-manager-console/src/store/region.ts
@@ -22,8 +22,8 @@ class RegionCenter {
@observable
public regionIdcList: IRegionIdcs[] = [
{ name: '国内', idc: 'cn' },
- { name: '美东', idc: 'us' },
- { name: '俄罗斯', idc: 'ru' },
+ // { name: '美东', idc: 'us' },
+ // { name: '俄罗斯', idc: 'ru' },
];
@action.bound
diff --git a/kafka-manager-console/src/store/topic.ts b/kafka-manager-console/src/store/topic.ts
index 1c4806c9..b47c1122 100644
--- a/kafka-manager-console/src/store/topic.ts
+++ b/kafka-manager-console/src/store/topic.ts
@@ -35,6 +35,8 @@ export interface ITopicBaseInfo {
score: number;
topicCodeC: string;
physicalClusterId: number;
+ percentile: string;
+ regionNameList: any;
}
export interface IRealTimeTraffic {
@@ -488,9 +490,9 @@ class Topic {
return getRealTimeTraffic(clusterId, topicName).then(this.setRealTimeTraffic);
}
- public getRealConsume(clusterId: number, topicName: string) {
+ public getRealConsume(clusterId: number, topicName: string, percentile: string) {
this.setConsumeLoading(true);
- return getRealConsume(clusterId, topicName).then(this.setRealConsume);
+ return getRealConsume(clusterId, topicName, percentile).then(this.setRealConsume);
}
public getConnectionInfo(clusterId: number, topicName: string, appId?: string) {
diff --git a/kafka-manager-console/src/store/version.ts b/kafka-manager-console/src/store/version.ts
index 5c774e87..e2a3422f 100644
--- a/kafka-manager-console/src/store/version.ts
+++ b/kafka-manager-console/src/store/version.ts
@@ -8,7 +8,7 @@ interface IEnum {
suffix?: string;
}
interface IUploadFileType {
- fileEnum: IEnum[] ;
+ fileEnum: IEnum[];
storageEnum: IEnum[];
}
@@ -44,11 +44,10 @@ export class Version {
@action.bound
public setFileList(data: IUploadFile[]) {
-
this.fileList = (data || []).map((item, index) => {
return {
...item,
- configType: this.acceptFileMap[item.fileType],
+ configType: this.acceptFileMap[item.fileType] || '',
key: index,
};
});
diff --git a/kafka-manager-console/src/store/wrapper.ts b/kafka-manager-console/src/store/wrapper.ts
index 69c7c168..fc327fe6 100644
--- a/kafka-manager-console/src/store/wrapper.ts
+++ b/kafka-manager-console/src/store/wrapper.ts
@@ -24,6 +24,7 @@ class Wrapper {
});
}
+
@action.bound
public setXFormWrapper(xFormWrapper: IXFormWrapper) {
this.xFormWrapper = xFormWrapper;
diff --git a/kafka-manager-console/src/styles/style.less b/kafka-manager-console/src/styles/style.less
new file mode 100644
index 00000000..e349bfce
--- /dev/null
+++ b/kafka-manager-console/src/styles/style.less
@@ -0,0 +1,15 @@
+.ant-spin-blur .ant-table-content {
+ opacity: 0;
+}
+.ant-alert-error {
+ margin-top: 10px;
+}
+.isSHowApp {
+ display: block;
+}
+.isHideApp {
+ display: none;
+}
+.tips {
+ margin-left: 48px;
+}
\ No newline at end of file
diff --git a/kafka-manager-console/src/styles/table-filter.less b/kafka-manager-console/src/styles/table-filter.less
index 6fa8d860..21dd1b52 100644
--- a/kafka-manager-console/src/styles/table-filter.less
+++ b/kafka-manager-console/src/styles/table-filter.less
@@ -1,6 +1,6 @@
.content-container {
position: relative;
-
+ min-width: 760px;
.table-operation {
a {
color: @primary-color;
diff --git a/kafka-manager-console/src/types/base-type.ts b/kafka-manager-console/src/types/base-type.ts
index b2eb5d17..5cfbb999 100644
--- a/kafka-manager-console/src/types/base-type.ts
+++ b/kafka-manager-console/src/types/base-type.ts
@@ -537,9 +537,10 @@ export interface IUtils {
export interface IXFormWrapper {
type?: string;
- title: string;
+ title: string | JSX.Element;
onSubmit: (result: any) => any;
onCancel?: () => any;
+ onChange?: (result: any) => any;
visible: boolean;
onChangeVisible?: (visible: boolean) => any;
formMap?: any[];
@@ -552,6 +553,7 @@ export interface IXFormWrapper {
noform?: boolean;
nofooter?: boolean;
isWaitting?: boolean;
+ onSubmitFaild?: (err: any, ref: any, formData: any, formMap: any) => any;
}
export interface IBaseOrder extends IBase {
@@ -608,9 +610,11 @@ export interface IBasicInfo {
}
export interface IClusterTopics {
+ regionNameList: any;
appId: string;
appName: string;
byteIn: number;
+ byteOut: number;
clusterId: number;
description: string;
partitionNum: number;
@@ -916,6 +920,7 @@ export interface INewLogical {
mode: number;
name: string;
logicalClusterName?: string;
+ logicalClusterEName?: string;
regionIdList: number[];
}
@@ -935,6 +940,7 @@ export interface ITaskManage {
clusterId: number;
clusterName: string;
gmtCreate: number;
+ createTime: number;
operator: string;
status: number;
taskId: number;
diff --git a/kafka-manager-console/webpack.config.js b/kafka-manager-console/webpack.config.js
index dcc6071c..a07d9990 100644
--- a/kafka-manager-console/webpack.config.js
+++ b/kafka-manager-console/webpack.config.js
@@ -9,7 +9,7 @@ const path = require('path')
const isProd = process.env.NODE_ENV === 'production';
const outPath = path.resolve('../kafka-manager-web/src/main/resources/templates');
const filename = isProd ? '[name].[contenthash]' : '[name]';
-
+const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
let publicPath = '/';
const plugins = [
@@ -17,6 +17,7 @@ const plugins = [
template: './src/routers/index.htm',
favicon: './src/assets/image/logo.ico'
}),
+ new MonacoWebpackPlugin()
];
if (isProd) {
@@ -52,7 +53,7 @@ module.exports = {
rules: [
{
test: /\.(css|less)$/,
- use: [ isProd ? {
+ use: [isProd ? {
loader: MiniCssExtractPlugin.loader,
options: {
publicPath,
@@ -75,17 +76,28 @@ module.exports = {
loader: 'ts-loader',
},
{
- test:/\.(png|svg|jpeg|jpg|gif)$/,
- use:[
+ test: /\.(png|svg|jpeg|jpg|gif)$/,
+ use: [
{
- loader:'file-loader',
- options:{
- name:'[name].[ext]',
- outputPath:'./assets/image/',
- }
+ loader: 'file-loader',
+ options: {
+ name: '[name].[ext]',
+ outputPath: './assets/image/',
+ }
}
]
- }
+ },
+ {
+ test: /\.(ttf)$/i,
+ use: [
+ {
+ loader: 'url-loader',
+ options: {
+ limit: 8192,
+ },
+ },
+ ],
+ },
],
},
optimization: {
@@ -118,7 +130,9 @@ module.exports = {
historyApiFallback: true,
proxy: {
'/api/v1/': {
- target: 'http://127.0.0.1:8080',
+ // target: 'http://127.0.0.1:8080',
+ target: 'http://10.179.37.199:8008',
+ // target: 'http://99.11.45.164:8888',
changeOrigin: true,
}
},