mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-10-15 12:49:17 +00:00
fix: Trace associates with Log widget (#351)
* fix: view logs on trace widget * fix: service
This commit is contained in:
@@ -199,7 +199,14 @@ limitations under the License. -->
|
||||
ElMessage.error(resp.errors);
|
||||
return;
|
||||
}
|
||||
state.service = logStore.services[0];
|
||||
if (!logStore.services.length) {
|
||||
return;
|
||||
}
|
||||
if (props.data.filters && props.data.filters.id) {
|
||||
state.service = logStore.services.find((item: { id: string }) => item.id === props.data.filters?.id);
|
||||
} else {
|
||||
state.service = logStore.services[0];
|
||||
}
|
||||
getInstances(state.service.id);
|
||||
getEndpoints(state.service.id);
|
||||
}
|
||||
|
@@ -102,12 +102,17 @@ limitations under the License. -->
|
||||
import { dateFormat } from "@/utils/dateFormat";
|
||||
import { useAppStoreWithOut } from "@/store/modules/app";
|
||||
|
||||
const props = {
|
||||
serviceId: { type: String, default: "" },
|
||||
};
|
||||
|
||||
export default defineComponent({
|
||||
name: "TraceDetail",
|
||||
components: {
|
||||
...graphs,
|
||||
},
|
||||
setup() {
|
||||
props,
|
||||
setup(props) {
|
||||
const appStore = useAppStoreWithOut();
|
||||
/*global Recordable */
|
||||
const options: Recordable<LayoutConfig> = inject("options") || {};
|
||||
@@ -138,6 +143,7 @@ limitations under the License. -->
|
||||
{
|
||||
sourceId: options?.id || "",
|
||||
traceId: traceId.value || traceStore.currentTrace.traceIds[0].value,
|
||||
id: props.serviceId || undefined,
|
||||
},
|
||||
"Log",
|
||||
);
|
||||
|
@@ -90,7 +90,8 @@ limitations under the License. -->
|
||||
import { EntityType, QueryOrders, Status } from "../../data";
|
||||
import type { LayoutConfig } from "@/types/dashboard";
|
||||
|
||||
/*global defineProps, Recordable */
|
||||
/*global defineProps, defineEmits, Recordable */
|
||||
const emits = defineEmits(["get"]);
|
||||
const props = defineProps({
|
||||
needQuery: { type: Boolean, default: true },
|
||||
data: {
|
||||
@@ -150,6 +151,8 @@ limitations under the License. -->
|
||||
return;
|
||||
}
|
||||
state.service = getCurrentNode(traceStore.services) || traceStore.services[0];
|
||||
emits("get", state.service.id);
|
||||
|
||||
getEndpoints(state.service.id);
|
||||
getInstances(state.service.id);
|
||||
}
|
||||
@@ -232,6 +235,7 @@ limitations under the License. -->
|
||||
if (type === "service") {
|
||||
getEndpoints(state.service.id);
|
||||
getInstances(state.service.id);
|
||||
emits("get", state.service.id);
|
||||
}
|
||||
}
|
||||
function updateTags(data: { tagsMap: Array<Option>; tagsList: string[] }) {
|
||||
|
Reference in New Issue
Block a user