From 0d9f41d2cbb0a7dfc79e52b266e38d4f12a3f7f7 Mon Sep 17 00:00:00 2001 From: xy <1803352740@qq.com> Date: Tue, 9 Apr 2024 10:51:26 +0800 Subject: [PATCH 1/5] =?UTF-8?q?fix(backend):=20=E6=8E=92=E5=BA=8F=E5=A4=B1?= =?UTF-8?q?=E6=95=88=E9=97=AE=E9=A2=98=E8=A7=A3=E5=86=B3=20#3888?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbm-ui/backend/db_services/dbbase/resources/query.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dbm-ui/backend/db_services/dbbase/resources/query.py b/dbm-ui/backend/db_services/dbbase/resources/query.py index a0e5df4733..e820d5c169 100644 --- a/dbm-ui/backend/db_services/dbbase/resources/query.py +++ b/dbm-ui/backend/db_services/dbbase/resources/query.py @@ -370,9 +370,6 @@ def filter_instance_func(_query_params, _cluster_queryset, _proxy_queryset, _sto _cluster_queryset = filter_inst_queryset( _cluster_queryset, _proxy_queryset, _storage_queryset, cls.build_q_for_instance_filter(_query_params) ) - # 部署时间表头排序 - if query_params.get("ordering"): - _cluster_queryset = _cluster_queryset.order_by(query_params.get("ordering")) return _cluster_queryset @@ -388,6 +385,10 @@ def filter_instance_func(_query_params, _cluster_queryset, _proxy_queryset, _sto query_params, cluster_queryset, proxy_queryset, storage_queryset ) + # 部署时间表头排序 + if query_params.get("ordering"): + cluster_queryset = cluster_queryset.order_by(query_params.get("ordering")) + cluster_infos = cls._filter_cluster_hook( bk_biz_id, cluster_queryset, proxy_queryset, storage_queryset, limit, offset, **kwargs ) From cc7370ea3e48d6c6f6f34dd35d80ab4730209bb5 Mon Sep 17 00:00:00 2001 From: 3octaves <873551943@qq.com> Date: Tue, 9 Apr 2024 11:15:07 +0800 Subject: [PATCH 2/5] =?UTF-8?q?fix(frontend):=20=E5=91=8A=E8=AD=A6?= =?UTF-8?q?=E7=BB=84=E6=9B=B4=E6=96=B0=E5=8E=BB=E9=99=A4=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?id=20#3893?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/services/source/monitorNoticeGroup.ts | 19 +++++++++---------- .../alarm-group/components/DetailDialog.vue | 6 ++++-- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/dbm-ui/frontend/src/services/source/monitorNoticeGroup.ts b/dbm-ui/frontend/src/services/source/monitorNoticeGroup.ts index faef1c2cec..f32ad97be2 100644 --- a/dbm-ui/frontend/src/services/source/monitorNoticeGroup.ts +++ b/dbm-ui/frontend/src/services/source/monitorNoticeGroup.ts @@ -39,27 +39,26 @@ export function getAlarmGroupList(params: { } /** - * 告警组新增、编辑参数 + * 新建告警组 */ -interface IOperaionNoticeGroupParams { +export function insertAlarmGroup(params: { bk_biz_id: number name: string, receivers: NoticGroupModel['receivers'][], details: NoticGroupModel['details'] - id: number -} - -/** - * 新建告警组 - */ -export function insertAlarmGroup(params: Omit) { +}) { return http.post(`${path}/`, params); } /** * 编辑告警组 */ -export function updateAlarmGroup(params: IOperaionNoticeGroupParams) { +export function updateAlarmGroup(params: { + name: string, + receivers: NoticGroupModel['receivers'][], + details: NoticGroupModel['details'] + id: number +}) { return http.put(`${path}/${params.id}/`, params); } diff --git a/dbm-ui/frontend/src/views/monitor-alarm-db/alarm-group/components/DetailDialog.vue b/dbm-ui/frontend/src/views/monitor-alarm-db/alarm-group/components/DetailDialog.vue index 16eac8e67a..29adcf6039 100644 --- a/dbm-ui/frontend/src/views/monitor-alarm-db/alarm-group/components/DetailDialog.vue +++ b/dbm-ui/frontend/src/views/monitor-alarm-db/alarm-group/components/DetailDialog.vue @@ -194,7 +194,6 @@ const { name } = formData; const params = { - bk_biz_id: props.bizId, name, receivers: receiversSelectorRef.value.getSelectedReceivers(), details: { @@ -208,7 +207,10 @@ id: props.detailData.id, }); } else { - insertAlarmGroupRun(params); + insertAlarmGroupRun({ + ...params, + bk_biz_id: props.bizId, + }); } }; From acf78ef451a1b1eec8a0494b6e8c57ec5ba4a6b9 Mon Sep 17 00:00:00 2001 From: 3octaves <873551943@qq.com> Date: Tue, 9 Apr 2024 10:54:00 +0800 Subject: [PATCH 3/5] =?UTF-8?q?fix(frontend):=20=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E4=BD=93=E9=AA=8C=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=8F=8A=E4=BC=98=E5=8C=96=20#3834?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/system-search/Index.vue | 12 +- .../components/search-result/Index.vue | 26 +++- .../render-result/ClusterDomain.vue | 33 ++--- .../render-result/ClusterName.vue | 33 ++--- .../search-result/render-result/Instance.vue | 49 ++---- .../search-result/render-result/Machine.vue | 32 ++-- .../components/HightLightText.vue | 14 +- .../system-search/hooks/useRedirect.ts | 47 ++++++ .../frontend/src/views/quick-search/Index.vue | 21 ++- .../quick-search/components/ClusterDomain.vue | 128 ++++++++-------- .../quick-search/components/ClusterName.vue | 126 ++++++++-------- .../quick-search/components/Instance.vue | 140 +++++++++--------- .../quick-search/components/ResourcePool.vue | 72 ++++++--- .../quick-search/components/SearchInput.vue | 16 +- .../views/quick-search/components/Task.vue | 72 ++++++--- .../views/quick-search/components/Ticket.vue | 69 ++++++--- .../views/quick-search/style/table-card.less | 8 + 17 files changed, 523 insertions(+), 375 deletions(-) create mode 100644 dbm-ui/frontend/src/components/system-search/hooks/useRedirect.ts diff --git a/dbm-ui/frontend/src/components/system-search/Index.vue b/dbm-ui/frontend/src/components/system-search/Index.vue index e4bf809ce6..7c79e86d43 100644 --- a/dbm-ui/frontend/src/components/system-search/Index.vue +++ b/dbm-ui/frontend/src/components/system-search/Index.vue @@ -12,7 +12,8 @@ :placeholder="t('全站搜索 Ctrl + K')" type="search" @enter="handleEnter" - @focus="handleFocus" /> + @focus="handleFocus" + @paste="handlePaste" />
{ + const pasteValue = (event.clipboardData || window.clipboardData).getData('text'); + setTimeout(() => { + serach.value = `${serach.value}${serach.value ? '|' : ''}${pasteValue}`.replace(batchSplitRegex, '|'); + }); + }; + const handleFocus = () => { if (isFocused.value) { return; diff --git a/dbm-ui/frontend/src/components/system-search/components/search-result/Index.vue b/dbm-ui/frontend/src/components/system-search/components/search-result/Index.vue index b719d9fb73..86a282dd1e 100644 --- a/dbm-ui/frontend/src/components/system-search/components/search-result/Index.vue +++ b/dbm-ui/frontend/src/components/system-search/components/search-result/Index.vue @@ -20,6 +20,11 @@ diff --git a/dbm-ui/frontend/src/components/system-search/components/search-result/render-result/ClusterName.vue b/dbm-ui/frontend/src/components/system-search/components/search-result/render-result/ClusterName.vue index 2125a7b864..e49335ed32 100644 --- a/dbm-ui/frontend/src/components/system-search/components/search-result/render-result/ClusterName.vue +++ b/dbm-ui/frontend/src/components/system-search/components/search-result/render-result/ClusterName.vue @@ -20,10 +20,10 @@
diff --git a/dbm-ui/frontend/src/components/system-search/components/search-result/render-result/Instance.vue b/dbm-ui/frontend/src/components/system-search/components/search-result/render-result/Instance.vue index c7baac71fc..4829a6fe67 100644 --- a/dbm-ui/frontend/src/components/system-search/components/search-result/render-result/Instance.vue +++ b/dbm-ui/frontend/src/components/system-search/components/search-result/render-result/Instance.vue @@ -20,10 +20,10 @@ diff --git a/dbm-ui/frontend/src/components/system-search/components/search-result/render-result/Machine.vue b/dbm-ui/frontend/src/components/system-search/components/search-result/render-result/Machine.vue index dc37498ab8..8b099b6e37 100644 --- a/dbm-ui/frontend/src/components/system-search/components/search-result/render-result/Machine.vue +++ b/dbm-ui/frontend/src/components/system-search/components/search-result/render-result/Machine.vue @@ -20,10 +20,10 @@ diff --git a/dbm-ui/frontend/src/components/system-search/components/search-result/render-result/components/HightLightText.vue b/dbm-ui/frontend/src/components/system-search/components/search-result/render-result/components/HightLightText.vue index 8420107aa9..e5c042504e 100644 --- a/dbm-ui/frontend/src/components/system-search/components/search-result/render-result/components/HightLightText.vue +++ b/dbm-ui/frontend/src/components/system-search/components/search-result/render-result/components/HightLightText.vue @@ -13,6 +13,8 @@