mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-14 09:00:50 +00:00
query logs with trace id
This commit is contained in:
parent
7ae484671b
commit
19b85285ba
1
src/types/dashboard.d.ts
vendored
1
src/types/dashboard.d.ts
vendored
@ -47,6 +47,7 @@ export interface LayoutConfig {
|
||||
startTime: string;
|
||||
endTime: string;
|
||||
};
|
||||
traceId?: string;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -130,7 +130,7 @@ limitations under the License. -->
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, watch, onUnmounted } from "vue";
|
||||
import { ref, reactive, watch, onUnmounted, inject } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { Option } from "@/types/app";
|
||||
import { useLogStore } from "@/store/modules/log";
|
||||
@ -141,8 +141,10 @@ import ConditionTags from "@/views/components/ConditionTags.vue";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { EntityType } from "../../data";
|
||||
import { ErrorCategory } from "./data";
|
||||
import { LayoutConfig } from "@/types/dashboard";
|
||||
|
||||
/*global defineProps */
|
||||
const options: LayoutConfig | undefined = inject("options");
|
||||
const props = defineProps({
|
||||
needQuery: { type: Boolean, default: true },
|
||||
});
|
||||
@ -151,7 +153,9 @@ const appStore = useAppStoreWithOut();
|
||||
const selectorStore = useSelectorStore();
|
||||
const dashboardStore = useDashboardStore();
|
||||
const logStore = useLogStore();
|
||||
const traceId = ref<string>("");
|
||||
const traceId = ref<string>(
|
||||
(options && options.filters && options.filters.traceId) || ""
|
||||
);
|
||||
const keywordsOfContent = ref<string[]>([]);
|
||||
const excludingKeywordsOfContent = ref<string[]>([]);
|
||||
const tagsList = ref<string[]>([]);
|
||||
@ -325,6 +329,12 @@ function removeExcludeContent(index: number) {
|
||||
}
|
||||
onUnmounted(() => {
|
||||
logStore.resetCondition();
|
||||
const item = {
|
||||
...options,
|
||||
filters: undefined,
|
||||
};
|
||||
dashboardStore.setWidget(item);
|
||||
traceId.value = "";
|
||||
});
|
||||
watch(
|
||||
() => selectorStore.currentService,
|
||||
|
@ -140,8 +140,8 @@ export default defineComponent({
|
||||
LogTable,
|
||||
},
|
||||
setup() {
|
||||
/*global Nullable */
|
||||
const options: LayoutConfig | undefined = inject("options");
|
||||
/*global Nullable, Recordable */
|
||||
const options: Recordable<LayoutConfig> = inject("options") || {};
|
||||
const { t } = useI18n();
|
||||
const traceStore = useTraceStore();
|
||||
const loading = ref<boolean>(false);
|
||||
@ -189,7 +189,7 @@ export default defineComponent({
|
||||
};
|
||||
dashboardStore.setWidget(item);
|
||||
const logTabIndex = widget.id.split("-");
|
||||
const traceTabindex = options?.id?.split("-") || [];
|
||||
const traceTabindex = (options.id as any).split("-") || [];
|
||||
let container: Nullable<Element>;
|
||||
|
||||
if (logTabIndex[1] === undefined) {
|
||||
|
Loading…
Reference in New Issue
Block a user