mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-18 18:45:23 +00:00
add category selector
This commit is contained in:
parent
bb7c6bcfae
commit
7426a12fa1
@ -50,6 +50,16 @@ limitations under the License. -->
|
|||||||
@query="searchEndpoints"
|
@query="searchEndpoints"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="mr-5" v-if="isBrowser">
|
||||||
|
<span class="grey mr-5"> {{ t("category") }}: </span>
|
||||||
|
<Selector
|
||||||
|
size="small"
|
||||||
|
:value="state.category.value"
|
||||||
|
:options="ErrorCategory"
|
||||||
|
placeholder="Select a category"
|
||||||
|
@change="changeField('category', $event)"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<el-button
|
<el-button
|
||||||
class="search-btn"
|
class="search-btn"
|
||||||
size="small"
|
size="small"
|
||||||
@ -130,6 +140,7 @@ import { useSelectorStore } from "@/store/modules/selectors";
|
|||||||
import ConditionTags from "@/views/components/ConditionTags.vue";
|
import ConditionTags from "@/views/components/ConditionTags.vue";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { EntityType } from "../../data";
|
import { EntityType } from "../../data";
|
||||||
|
import { ErrorCategory } from "./data";
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const appStore = useAppStoreWithOut();
|
const appStore = useAppStoreWithOut();
|
||||||
@ -148,6 +159,7 @@ const state = reactive<any>({
|
|||||||
instance: { value: "0", label: "All" },
|
instance: { value: "0", label: "All" },
|
||||||
endpoint: { value: "0", label: "All" },
|
endpoint: { value: "0", label: "All" },
|
||||||
service: { value: "", label: "" },
|
service: { value: "", label: "" },
|
||||||
|
category: { value: "ALL", label: "All" },
|
||||||
});
|
});
|
||||||
|
|
||||||
init();
|
init();
|
||||||
@ -228,7 +240,7 @@ function searchLogs() {
|
|||||||
serviceVersionId: instance || state.instance.id || undefined,
|
serviceVersionId: instance || state.instance.id || undefined,
|
||||||
paging: { pageNum: 1, pageSize: 15 },
|
paging: { pageNum: 1, pageSize: 15 },
|
||||||
queryDuration: appStore.durationTime,
|
queryDuration: appStore.durationTime,
|
||||||
category: "ALL",
|
category: state.category.value,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
logStore.setLogCondition({
|
logStore.setLogCondition({
|
||||||
|
26
src/views/dashboard/related/log/data.ts
Normal file
26
src/views/dashboard/related/log/data.ts
Normal file
@ -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" },
|
||||||
|
];
|
Loading…
Reference in New Issue
Block a user