From 7426a12fa1a773c0c4c9d6bc20c6754546305197 Mon Sep 17 00:00:00 2001 From: Qiuxia Fan Date: Tue, 14 Jun 2022 10:39:19 +0800 Subject: [PATCH] add category selector --- src/views/dashboard/related/log/Header.vue | 14 +++++++++++- src/views/dashboard/related/log/data.ts | 26 ++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 src/views/dashboard/related/log/data.ts diff --git a/src/views/dashboard/related/log/Header.vue b/src/views/dashboard/related/log/Header.vue index b2d21a7f..ee86a4b3 100644 --- a/src/views/dashboard/related/log/Header.vue +++ b/src/views/dashboard/related/log/Header.vue @@ -50,6 +50,16 @@ limitations under the License. --> @query="searchEndpoints" /> +
+ {{ t("category") }}: + +
({ instance: { value: "0", label: "All" }, endpoint: { value: "0", label: "All" }, service: { value: "", label: "" }, + category: { value: "ALL", label: "All" }, }); init(); @@ -228,7 +240,7 @@ function searchLogs() { serviceVersionId: instance || state.instance.id || undefined, paging: { pageNum: 1, pageSize: 15 }, queryDuration: appStore.durationTime, - category: "ALL", + category: state.category.value, }); } else { logStore.setLogCondition({ diff --git a/src/views/dashboard/related/log/data.ts b/src/views/dashboard/related/log/data.ts new file mode 100644 index 00000000..ec454837 --- /dev/null +++ b/src/views/dashboard/related/log/data.ts @@ -0,0 +1,26 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export const ErrorCategory = [ + { label: "All", value: "ALL" }, + { label: "AJAX", value: "AJAX" }, + { label: "Resource", value: "RESOURCE" }, + { label: "Vue", value: "VUE" }, + { label: "Promise", value: "PROMISE" }, + { label: "JS", value: "JS" }, + { label: "Unknown", value: "UNKNOWN" }, +];