{headerMenu.map((item: IMenuItem, index: number) =>
diff --git a/kafka-manager-console/src/container/modal/admin/cluster.ts b/kafka-manager-console/src/container/modal/admin/cluster.ts
index 20ed9098..ac4af3a5 100644
--- a/kafka-manager-console/src/container/modal/admin/cluster.ts
+++ b/kafka-manager-console/src/container/modal/admin/cluster.ts
@@ -22,11 +22,11 @@ export const showEditClusterTopic = (item: IClusterTopics) => {
},
{
key: 'appId',
- label: '应用ID',
+ label: '应用名称',
type: 'select',
options: app.adminAppData.map(item => {
return {
- label: item.appId,
+ label: item.name,
value: item.appId,
};
}),
@@ -61,7 +61,7 @@ export const showEditClusterTopic = (item: IClusterTopics) => {
attrs: {
placeholder: '请输入保存时间',
suffix: '小时',
- prompttype:'修改保存时间,预计一分钟左右生效!'
+ prompttype: '修改保存时间,预计一分钟左右生效!'
},
},
{
diff --git a/kafka-manager-console/src/container/modal/admin/confirm-detail-topic.tsx b/kafka-manager-console/src/container/modal/admin/confirm-detail-topic.tsx
index 41f6ed61..83d1b02d 100644
--- a/kafka-manager-console/src/container/modal/admin/confirm-detail-topic.tsx
+++ b/kafka-manager-console/src/container/modal/admin/confirm-detail-topic.tsx
@@ -35,7 +35,6 @@ class CustomForm extends React.Component
{
this.props.form.validateFields((err: any, values: any) => {
const deleteData = this.props.formData;
if (!err) {
- // console.log('values', values);
if (values.topicName !== this.props.formData.topicName) {
notification.error({ message: 'topic名称不正确,请重新输入' });
} else {
@@ -77,7 +76,6 @@ class CustomForm extends React.Component {
}
public render() {
- // console.log('props', this.props);
const { formData = {} as any, visible } = this.props;
const { getFieldDecorator } = this.props.form;
let metadata = [] as IBrokersMetadata[];
diff --git a/kafka-manager-console/src/container/modal/admin/expand-partition.tsx b/kafka-manager-console/src/container/modal/admin/expand-partition.tsx
index dfb51ba9..44001081 100644
--- a/kafka-manager-console/src/container/modal/admin/expand-partition.tsx
+++ b/kafka-manager-console/src/container/modal/admin/expand-partition.tsx
@@ -111,11 +111,11 @@ class CustomForm extends React.Component {
})()}
- {/* */}
+ {/* */}
{/* this.onSwitchChange(checked)} /> */}
{ this.onSwitchChange(e.target.value === 'region' ? true : false); }}>
Region类型
- Borker类型
+ Broker类型
diff --git a/kafka-manager-console/src/container/modal/admin/task.ts b/kafka-manager-console/src/container/modal/admin/task.ts
index d9a609ac..12a46d53 100644
--- a/kafka-manager-console/src/container/modal/admin/task.ts
+++ b/kafka-manager-console/src/container/modal/admin/task.ts
@@ -28,8 +28,8 @@ const updateInputModal = (status?: string) => {
formMap[4].invisible = status === 'region';
formMap[5].invisible = status !== 'region';
- formMap[4].rules = [{required: status !== 'region'}];
- formMap[5].rules = [{required: status === 'region'}];
+ formMap[4].rules = [{ required: status !== 'region' }];
+ formMap[5].rules = [{ required: status === 'region' }];
// tslint:disable-next-line:no-unused-expression
wrapper.ref && wrapper.ref.updateFormMap$(formMap, wrapper.xFormWrapper.formData);
};
@@ -103,7 +103,7 @@ export const createMigrationTasks = () => {
label: 'Region',
value: 'region',
}, {
- label: 'Borker',
+ label: 'Broker',
value: 'broker',
}],
rules: [{
@@ -141,7 +141,7 @@ export const createMigrationTasks = () => {
placeholder: '请选择目标Region',
},
},
-
+
{
key: 'beginTime',
label: '计划开始时间',
diff --git a/kafka-manager-console/src/container/modal/offline-app-modal-new.tsx b/kafka-manager-console/src/container/modal/offline-app-modal-new.tsx
new file mode 100644
index 00000000..2b582f77
--- /dev/null
+++ b/kafka-manager-console/src/container/modal/offline-app-modal-new.tsx
@@ -0,0 +1,78 @@
+import * as React from 'react';
+import { Table, Modal, Tooltip, Icon, message, notification, Alert, Button } from 'component/antd';
+import { app } from 'store/app';
+import { getApplyOnlineColumns } from 'container/topic/config';
+import { observer } from 'mobx-react';
+import { modal } from 'store/modal';
+import { users } from 'store/users';
+import { urlPrefix } from 'constants/left-menu';
+import { region } from 'store';
+
+@observer
+export class ConnectAppNewList extends React.Component {
+
+ public componentDidMount() {
+ app.getAppsConnections(modal.params);
+ }
+
+ public handleCancel = () => {
+ app.setAppsConnections([]);
+ modal.close();
+ }
+
+ public handleSubmit = () => {
+ const connectionList = app.appsConnections;
+ if (connectionList && connectionList.length) {
+ return message.warning('存在连接信息,无法申请下线!');
+ }
+ const offlineParams = {
+ type: 11,
+ applicant: users.currentUser.username,
+ description: '',
+ extensions: JSON.stringify({ appId: modal.params }),
+ };
+ app.applyAppOffline(offlineParams).then((data: any) => {
+ notification.success({ message: '申请下线成功' });
+ window.location.href = `${urlPrefix}/user/order-detail/?orderId=${data.id}®ion=${region.currentRegion}`;
+ });
+ modal.close();
+ }
+
+ public render() {
+ const connectionList = app.appsConnections;
+ return (
+ <>
+ 确定
+ :
+ <>
+
+
+ >
+ }
+ width={500}
+ >
+
+ {
+ connectionList && connectionList.length
+ ?
+
该应用已与Topic关联,请先解除应用与Topic之间的关系。点击查看
+ :
+
应用下线后,AppID、密钥将会失效,请谨慎操作!
+ }
+
+
+ >
+ );
+ }
+}
diff --git a/kafka-manager-console/src/container/modal/order.tsx b/kafka-manager-console/src/container/modal/order.tsx
index c982db4c..4daec7c9 100644
--- a/kafka-manager-console/src/container/modal/order.tsx
+++ b/kafka-manager-console/src/container/modal/order.tsx
@@ -4,13 +4,14 @@ import { message, Icon, notification, Modal, Table, Tooltip } from 'component/an
import { IApprovalOrder, IBaseOrder, IOrderInfo } from 'types/base-type';
import { admin } from 'store/admin';
import { modal } from 'store/modal';
+import { cluster } from 'store/cluster';
import { cellStyle } from 'constants/table';
import * as React from 'react';
const updateInputModal = (status: string, type: number) => {
const formMap = wrapper.xFormWrapper.formMap;
- const region = type === 0 ? 5 : 3;
- const broker = type === 0 ? 6 : 4;
+ const region = type === 0 ? 6 : 3;
+ const broker = type === 0 ? 7 : 4;
formMap[region].invisible = status === 'region';
formMap[broker].invisible = status !== 'region';
@@ -37,6 +38,12 @@ const renderModalTilte = (type: number, status: number) => {
export const showApprovalModal = (info: IOrderInfo, status: number, from?: string) => {
const { id, type } = info;
const formMap = [{
+ key: 'clusterId',
+ label: '所属集群',
+ type: 'input_number',
+ defaultValue: info.detail.logicalClusterName,
+ attrs: { disabled: true },
+ }, {
key: 'partitionNum',
label: '分区数',
type: 'input_number',
@@ -87,7 +94,7 @@ export const showApprovalModal = (info: IOrderInfo, status: number, from?: strin
label: 'Region',
value: 'region',
}, {
- label: 'Borker',
+ label: 'Broker',
value: 'broker',
}],
rules: [{ required: false, message: '请选择类型' }],
diff --git a/kafka-manager-console/src/container/modal/topic.tsx b/kafka-manager-console/src/container/modal/topic.tsx
index d4df0318..4e026641 100644
--- a/kafka-manager-console/src/container/modal/topic.tsx
+++ b/kafka-manager-console/src/container/modal/topic.tsx
@@ -399,8 +399,8 @@ export const updateAllTopicFormModal = () => {
const formMap = wrapper.xFormWrapper.formMap;
if (topic.authorities) {
const { consume, send, checkStatus } = judgeAccessStatus(topic.authorities.access);
- formMap[3].defaultValue = checkStatus;
- formMap[3].options = [{
+ formMap[2].defaultValue = checkStatus;
+ formMap[2].options = [{
label: `消费权限${consume ? '(已拥有)' : ''}`,
value: '1',
disabled: consume,
@@ -409,7 +409,7 @@ export const updateAllTopicFormModal = () => {
value: '2',
disabled: send,
}];
- formMap[3].rules = [{
+ formMap[2].rules = [{
required: true,
validator: (rule: any, value: any, callback: any) => getPowerValidator(rule, value, callback, checkStatus, 'allTopic'),
}];
@@ -476,7 +476,6 @@ export const showAllPermissionModal = (item: ITopic) => {
const showAllPermission = (appId: string, item: ITopic, access: number) => {
const { consume, send, checkStatus } = judgeAccessStatus(access);
-
const xFormModal = {
formMap: [
{
@@ -489,16 +488,6 @@ const showAllPermission = (appId: string, item: ITopic, access: number) => {
disabled: true,
},
},
- {
- key: 'clusterName',
- label: '集群名称',
- defaultValue: item.clusterName,
- rules: [{ required: true, message: '请输入集群名称' }],
- attrs: {
- placeholder: '请输入集群名称',
- disabled: true,
- },
- },
{
key: 'appId',
label: '绑定应用',
@@ -526,6 +515,26 @@ const showAllPermission = (appId: string, item: ITopic, access: number) => {
validator: (rule: any, value: any, callback: any) => getPowerValidator(rule, value, callback, checkStatus, 'allTopic'),
}],
},
+ // {
+ // key: 'clusterName',
+ // label: '集群名称',
+ // defaultValue: item.clusterName,
+ // rules: [{ required: true, message: '请输入集群名称' }],
+ // attrs: {
+ // placeholder: '请输入集群名称',
+ // disabled: true,
+ // },
+ // },
+ // {
+ // key: 'clusterName',
+ // label: '集群名称',
+ // defaultValue: item.clusterName,
+ // rules: [{ required: true, message: '请输入集群名称' }],
+ // attrs: {
+ // placeholder: '请输入集群名称',
+ // disabled: true,
+ // },
+ // },
{
key: 'description',
label: '申请原因',
@@ -587,16 +596,16 @@ export const showPermissionModal = (item: ITopic) => {
disabled: true,
},
},
- {
- key: 'clusterName',
- label: '集群名称',
- defaultValue: item.clusterName,
- rules: [{ required: true, message: '请输入集群名称' }],
- attrs: {
- placeholder: '请输入集群名称',
- disabled: true,
- },
- },
+ // {
+ // key: 'clusterName',
+ // label: '集群名称',
+ // defaultValue: item.clusterName,
+ // rules: [{ required: true, message: '请输入集群名称' }],
+ // attrs: {
+ // placeholder: '请输入集群名称',
+ // disabled: true,
+ // },
+ // },
{
key: 'appName',
label: '绑定应用',
diff --git a/kafka-manager-console/src/container/search-filter.tsx b/kafka-manager-console/src/container/search-filter.tsx
index ac5d6bc1..f6ed09fa 100644
--- a/kafka-manager-console/src/container/search-filter.tsx
+++ b/kafka-manager-console/src/container/search-filter.tsx
@@ -126,7 +126,7 @@ export class SearchAndFilterContainer extends React.Component
@@ -194,7 +194,7 @@ export class SearchAndFilterContainer extends React.Component {
+ public renderColumnsFilter = (type: string, params?: any) => {
return {
filterIcon: this.renderFilterIcon.bind(null, type),
filterDropdownVisible: this.state[type] as boolean,
diff --git a/kafka-manager-console/src/container/staff-select.tsx b/kafka-manager-console/src/container/staff-select.tsx
index e9072569..f01637e9 100644
--- a/kafka-manager-console/src/container/staff-select.tsx
+++ b/kafka-manager-console/src/container/staff-select.tsx
@@ -28,7 +28,8 @@ export class StaffSelect extends React.Component {
public getStaffList = () => {
const { value } = this.props;
const current = users.currentUser.username || getCookie('username');
- const principals = value || (current ? [current] : []);
+ const principals = [''];
+ // const principals = value || (current ? [current] : []);
const promises: any[] = [];
for (const item of principals) {
@@ -64,7 +65,6 @@ export class StaffSelect extends React.Component {
const { value, isDisabled } = this.props;
const current = users.currentUser.username || getCookie('username');
const principals = value || (current ? [current] : []);
-
return (