+
+
{{item.key}}
+
{{item.value}}
+
+
+
{{item.key}}
{{item.value}}
@@ -513,8 +445,9 @@
clusterId: '',
clusterIds: [],
maxTps: 128,
- alarmType: 0,
alarmIsEnable: '',
+ alarmType: 0,
+ alarmLevel: 1,
alarmMsgLag: '',
alarmDelayTime: '',
apiType: 1,
@@ -539,11 +472,13 @@
jsonPath: '',
pressureTraffic: 0,
bigDataType: 0,
- bigDataConfig: ''
+ bigDataConfig: '',
+ remark: ''
},
isSubmitting: false,
filterableGroups: [],
filterableTopics: [],
+ groupAlarmList: [],
others: [{ key: '', value: '' }],
transits: [{ key: '', value: '' }],
queryParams: [{ key: '', value: '' }],
@@ -553,7 +488,8 @@
isShowAdvancedConfig: false,
urls: [{ key: '' }],
iconForAdvancedConfig: '',
-
+ isShowAlarmConfig: true,
+ iconForAlarmConfig: 'chevron-top',
isEditing: false,
bigDataConfigError: ''
};
@@ -578,31 +514,52 @@
},
configResultArr: {
get () {
- return [ {
- key: 'Consumer group',
- value: this.form.groupId ? this.getGroupNameById(this.form.groupId, this.groupList) : '',
- },
- {
- key: 'Topic',
- value: this.form.topicId ? this.getTopicNameById(this.form.topicId, this.topicList) : '',
- },
- {
- key: 'Consume maxTps',
- value: this.form.maxTps
- },
- {
- key: 'Receive Pressure Traffic',
- value: this.form.pressureTraffic === 1 ? 'Enable' : 'Disable',
- },
- {
- key: 'Api Level',
- value: this.form.apiType === 1 ? 'High level' : 'Low level',
+ return [{
+ key: 'Consumer group',
+ value: this.form.groupId ? this.getGroupNameById(this.form.groupId, this.groupList) : '',
+ },
+ {
+ key: 'Topic',
+ value: this.form.topicId ? this.getTopicNameById(this.form.topicId, this.topicList) : '',
+ },
+ {
+ key: 'Consume maxTps',
+ value: this.form.maxTps
+ },
+ {
+ key: 'Receive Pressure Traffic',
+ value: this.form.pressureTraffic === 1 ? 'Enable' : 'Disable',
+ },
+ {
+ key: 'Api Level',
+ value: this.form.apiType === 1 ? 'High level' : 'Low level',
+ }];
+ },
+ set () {
+ }
+ },
+ alarmConfig: {
+ get () {
+ return [{
+ key: 'Alarm Type',
+ value: this.form.alarmType,
+ },
+ {
+ key: 'Alarm Level',
+ value: this.form.alarmLevel,
+ },
+ {
+ key: 'Alarm Msg Lag',
+ value: this.form.alarmMsgLag
+ },
+ {
+ key: 'Alarm Delay Time',
+ value: this.form.alarmDelayTime,
}];
},
set () {
}
},
-
advanceConfig: {
get () {
return [
@@ -700,6 +657,16 @@
}
},
+ toggleAlarmConfig () {
+ if (this.isShowAlarmConfig) {
+ this.isShowAlarmConfig = false;
+ this.iconForAlarmConfig = 'chevron-bottom';
+ } else {
+ this.isShowAlarmConfig = true;
+ this.iconForAlarmConfig = 'chevron-top';
+ }
+ },
+
// 针对线下环境初始化默认值
initData () {
if (window.ENV === 'daily' || window.ENV === 'development') {
@@ -782,10 +749,11 @@
topicName: form.topicName || this.getTopicNameById(form.topicId),
clusters: { 'ddmq': 1 },
maxTps: Number(form.maxTps),
- alarmType: 0,
alarmIsEnable: 1,
- alarmMsgLag: 10000,
- alarmDelayTime: 300000,
+ alarmType: form.alarmType,
+ alarmLevel: form.alarmLevel,
+ alarmMsgLag: form.alarmMsgLag,
+ alarmDelayTime: form.alarmDelayTime,
apiType: form.apiType,
extraParams: this.formatMap(this.others),
queryParams: {},
@@ -793,7 +761,8 @@
httpQueryParams: {},
urls: [],
orderRemark: form.orderRemark,
- pressureTraffic: form.pressureTraffic
+ pressureTraffic: form.pressureTraffic,
+ remark: form.remark
};
// 接口类型选择决定读取以下字段
@@ -924,6 +893,15 @@
value: item.groupId
};
});
+ this.groupAlarmList = groupList.map((item) => {
+ return {
+ groupId: item.groupId,
+ alarmLevel: item.alarmLevel,
+ alarmMsgLag: item.alarmMsgLag,
+ alarmDelayTime: item.alarmDelayTime,
+ alarmGroup: item.alarmGroup
+ };
+ });
});
},
@@ -976,6 +954,16 @@
this.$emit('input', false);
},
+ changeGroupId () {
+ this.groupAlarmList.forEach((item) => {
+ if (item.groupId === this.form.groupId) {
+ this.form.alarmLevel = item.alarmLevel;
+ this.form.alarmMsgLag = item.alarmMsgLag;
+ this.form.alarmDelayTime = item.alarmDelayTime;
+ }
+ });
+ },
+
init () {
this.getMsgPushTypes();
this.getGroups();
diff --git a/carrera-console/carrera-console-fe/src/pages/subscribe/modals/detail.vue b/carrera-console/carrera-console-fe/src/pages/subscribe/modals/detail.vue
index 242f63f..e3e90dd 100644
--- a/carrera-console/carrera-console-fe/src/pages/subscribe/modals/detail.vue
+++ b/carrera-console/carrera-console-fe/src/pages/subscribe/modals/detail.vue
@@ -73,6 +73,21 @@
API Level
{{this.dictTranslate('topic', 'apiTypes', basicInfo.apiType) }}