mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-18 14:45:25 +00:00
Merge branch 'main' of github.com:apache/skywalking-booster-ui into feat/mobile
This commit is contained in:
commit
c78eeafeb8
@ -45,7 +45,7 @@ import { Option } from "@/types/app";
|
|||||||
const emit = defineEmits(["change"]);
|
const emit = defineEmits(["change"]);
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
options: {
|
options: {
|
||||||
type: Array as PropType<(Option & { disabled: boolean })[]>,
|
type: Array as PropType<Option[]>,
|
||||||
default: () => [],
|
default: () => [],
|
||||||
},
|
},
|
||||||
value: {
|
value: {
|
||||||
|
@ -242,6 +242,10 @@ const msg = {
|
|||||||
defaultDepth: "Default Depth",
|
defaultDepth: "Default Depth",
|
||||||
traceTagsTip: `Only tags defined in the core/default/searchableTracesTags are searchable.
|
traceTagsTip: `Only tags defined in the core/default/searchableTracesTags are searchable.
|
||||||
Check more details on the Configuration Vocabulary page`,
|
Check more details on the Configuration Vocabulary page`,
|
||||||
|
logTagsTip: `Only tags defined in the core/default/searchableLogsTags are searchable.
|
||||||
|
Check more details on the Configuration Vocabulary page`,
|
||||||
|
alarmTagsTip: `Only tags defined in the core/default/searchableAlarmTags are searchable.
|
||||||
|
Check more details on the Configuration Vocabulary page`,
|
||||||
tagsLink: "Configuration Vocabulary page",
|
tagsLink: "Configuration Vocabulary page",
|
||||||
addTag: "Please input a tag",
|
addTag: "Please input a tag",
|
||||||
log: "Log",
|
log: "Log",
|
||||||
|
@ -243,6 +243,10 @@ const msg = {
|
|||||||
defaultDepth: "默认深度",
|
defaultDepth: "默认深度",
|
||||||
traceTagsTip:
|
traceTagsTip:
|
||||||
"只有core/default/searchableTracesTags中定义的标记才可搜索。查看配置词汇表页面上的更多详细信息。",
|
"只有core/default/searchableTracesTags中定义的标记才可搜索。查看配置词汇表页面上的更多详细信息。",
|
||||||
|
logTagsTip:
|
||||||
|
"只有core/default/searchableTracesTags中定义的标记才可搜索。查看配置词汇表页面上的更多详细信息。",
|
||||||
|
alarmTagsTip:
|
||||||
|
"只有core/default/searchableTracesTags中定义的标记才可搜索。查看配置词汇表页面上的更多详细信息。",
|
||||||
tagsLink: "配置词汇页",
|
tagsLink: "配置词汇页",
|
||||||
addTag: "请添加标签",
|
addTag: "请添加标签",
|
||||||
logCategory: "日志类别",
|
logCategory: "日志类别",
|
||||||
|
@ -161,7 +161,13 @@ export const profileStore = defineStore({
|
|||||||
this.analyzeTrees = [];
|
this.analyzeTrees = [];
|
||||||
return res.data;
|
return res.data;
|
||||||
}
|
}
|
||||||
this.segmentSpans = segment.spans;
|
this.segmentSpans = segment.spans.map((d: SegmentSpan) => {
|
||||||
|
return {
|
||||||
|
...d,
|
||||||
|
segmentId: this.currentSegment.segmentId,
|
||||||
|
traceId: this.currentSegment.traceIds[0],
|
||||||
|
};
|
||||||
|
});
|
||||||
if (!(segment.spans && segment.spans.length)) {
|
if (!(segment.spans && segment.spans.length)) {
|
||||||
this.analyzeTrees = [];
|
this.analyzeTrees = [];
|
||||||
return res.data;
|
return res.data;
|
||||||
|
@ -410,6 +410,9 @@ export const topologyStore = defineStore({
|
|||||||
const idsC = this.calls
|
const idsC = this.calls
|
||||||
.filter((i: Call) => i.detectPoints.includes("CLIENT"))
|
.filter((i: Call) => i.detectPoints.includes("CLIENT"))
|
||||||
.map((b: Call) => b.id);
|
.map((b: Call) => b.id);
|
||||||
|
if (!idsC.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const param = await useQueryTopologyMetrics(linkClientMetrics, idsC);
|
const param = await useQueryTopologyMetrics(linkClientMetrics, idsC);
|
||||||
const res = await this.getCallClientMetrics(param);
|
const res = await this.getCallClientMetrics(param);
|
||||||
|
|
||||||
@ -425,6 +428,9 @@ export const topologyStore = defineStore({
|
|||||||
const idsS = this.calls
|
const idsS = this.calls
|
||||||
.filter((i: Call) => i.detectPoints.includes("SERVER"))
|
.filter((i: Call) => i.detectPoints.includes("SERVER"))
|
||||||
.map((b: Call) => b.id);
|
.map((b: Call) => b.id);
|
||||||
|
if (!idsS.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const param = await useQueryTopologyMetrics(linkServerMetrics, idsS);
|
const param = await useQueryTopologyMetrics(linkServerMetrics, idsS);
|
||||||
const res = await this.getCallServerMetrics(param);
|
const res = await this.getCallServerMetrics(param);
|
||||||
|
|
||||||
@ -438,6 +444,9 @@ export const topologyStore = defineStore({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const ids = this.nodes.map((d: Node) => d.id);
|
const ids = this.nodes.map((d: Node) => d.id);
|
||||||
|
if (!ids.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const param = await useQueryTopologyMetrics(nodeMetrics, ids);
|
const param = await useQueryTopologyMetrics(nodeMetrics, ids);
|
||||||
const res = await this.getNodeMetricValue(param);
|
const res = await this.getNodeMetricValue(param);
|
||||||
|
|
||||||
|
@ -39,7 +39,17 @@ limitations under the License. -->
|
|||||||
>
|
>
|
||||||
{{ t("tagsLink") }}
|
{{ t("tagsLink") }}
|
||||||
</a>
|
</a>
|
||||||
<el-tooltip :content="t('traceTagsTip')">
|
<el-tooltip
|
||||||
|
:content="
|
||||||
|
t(
|
||||||
|
type === 'LOG'
|
||||||
|
? 'logTagsTip'
|
||||||
|
: type === 'TRACE'
|
||||||
|
? 'traceTagsTip'
|
||||||
|
: 'alarmTagsTip'
|
||||||
|
)
|
||||||
|
"
|
||||||
|
>
|
||||||
<span>
|
<span>
|
||||||
<Icon class="icon-help mr-5" iconName="help" size="middle" />
|
<Icon class="icon-help mr-5" iconName="help" size="middle" />
|
||||||
</span>
|
</span>
|
||||||
|
@ -22,12 +22,12 @@ limitations under the License. -->
|
|||||||
<span v-else-if="item.label === 'tags'">
|
<span v-else-if="item.label === 'tags'">
|
||||||
{{ tags }}
|
{{ tags }}
|
||||||
</span>
|
</span>
|
||||||
<router-link
|
<!-- <router-link
|
||||||
v-else-if="item.label === 'traceId' && !noLink"
|
v-else-if="item.label === 'traceId' && !noLink"
|
||||||
:to="{ name: 'trace', query: { traceid: data[item.label] } }"
|
:to="{ name: 'trace', query: { traceid: data[item.label] } }"
|
||||||
>
|
>
|
||||||
<span :class="noLink ? '' : 'blue'">{{ data[item.label] }}</span>
|
<span :class="noLink ? '' : 'blue'">{{ data[item.label] }}</span>
|
||||||
</router-link>
|
</router-link> -->
|
||||||
<span v-else>{{ data[item.label] }}</span>
|
<span v-else>{{ data[item.label] }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -124,12 +124,14 @@ limitations under the License. -->
|
|||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
|
import { useSelectorStore } from "@/store/modules/selectors";
|
||||||
import { useProfileStore } from "@/store/modules/profile";
|
import { useProfileStore } from "@/store/modules/profile";
|
||||||
import { TaskLog, TaskListItem } from "@/types/profile";
|
import { TaskLog, TaskListItem } from "@/types/profile";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const profileStore = useProfileStore();
|
const profileStore = useProfileStore();
|
||||||
|
const selectorStore = useSelectorStore();
|
||||||
const dateFormat = (date: number, pattern = "YYYY-MM-DD HH:mm:ss") =>
|
const dateFormat = (date: number, pattern = "YYYY-MM-DD HH:mm:ss") =>
|
||||||
dayjs(date).format(pattern);
|
dayjs(date).format(pattern);
|
||||||
const viewDetail = ref<boolean>(false);
|
const viewDetail = ref<boolean>(false);
|
||||||
@ -150,7 +152,7 @@ async function viewTask(e: Event, item: TaskListItem) {
|
|||||||
viewDetail.value = true;
|
viewDetail.value = true;
|
||||||
selectedTask.value = item;
|
selectedTask.value = item;
|
||||||
service.value = (
|
service.value = (
|
||||||
profileStore.services.filter((s: any) => s.id === item.serviceId)[0] || {}
|
selectorStore.services.filter((s: any) => s.id === item.serviceId)[0] || {}
|
||||||
).label;
|
).label;
|
||||||
const res = await profileStore.getTaskLogs({ taskID: item.id });
|
const res = await profileStore.getTaskLogs({ taskID: item.id });
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ limitations under the License. -->
|
|||||||
<span class="g-sm-8 wba">{{ currentSpan.peer || "No Peer" }}</span>
|
<span class="g-sm-8 wba">{{ currentSpan.peer || "No Peer" }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-10 clear item">
|
<div class="mb-10 clear item">
|
||||||
<span class="g-sm-4 grey">{{ t("error") }}:</span>
|
<span class="g-sm-4 grey">{{ t("isError") }}:</span>
|
||||||
<span class="g-sm-8 wba">{{ currentSpan.isError }}</span>
|
<span class="g-sm-8 wba">{{ currentSpan.isError }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-10 clear item" v-for="i in currentSpan.tags" :key="i.key">
|
<div class="mb-10 clear item" v-for="i in currentSpan.tags" :key="i.key">
|
||||||
|
@ -105,8 +105,12 @@ limitations under the License. -->
|
|||||||
<span>{{ data.serviceCode }}</span>
|
<span>{{ data.serviceCode }}</span>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
<div class="application" v-show="headerType === 'profile'">
|
<div
|
||||||
<span @click="viewSpanDetail">{{ t("view") }}</span>
|
class="application"
|
||||||
|
v-show="headerType === 'profile'"
|
||||||
|
@click="viewSpan($event)"
|
||||||
|
>
|
||||||
|
<span>{{ t("view") }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@ -185,7 +189,7 @@ export default defineComponent({
|
|||||||
function toggle() {
|
function toggle() {
|
||||||
displayChildren.value = !displayChildren.value;
|
displayChildren.value = !displayChildren.value;
|
||||||
}
|
}
|
||||||
function showSelectSpan(dom: any) {
|
function showSelectSpan(dom: HTMLSpanElement) {
|
||||||
if (!dom) {
|
if (!dom) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -207,11 +211,18 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
viewSpanDetail(dom);
|
viewSpanDetail(dom);
|
||||||
}
|
}
|
||||||
|
function viewSpan(event: any) {
|
||||||
|
const dom = event.path.find((d: any) =>
|
||||||
|
d.className.includes("trace-item")
|
||||||
|
);
|
||||||
|
emit("select", props.data);
|
||||||
|
viewSpanDetail(dom);
|
||||||
|
}
|
||||||
|
|
||||||
function selectedItem(data: any) {
|
function selectedItem(data: HTMLSpanElement) {
|
||||||
emit("select", data);
|
emit("select", data);
|
||||||
}
|
}
|
||||||
function viewSpanDetail(dom: any) {
|
function viewSpanDetail(dom: HTMLSpanElement) {
|
||||||
showSelectSpan(dom);
|
showSelectSpan(dom);
|
||||||
showDetail.value = true;
|
showDetail.value = true;
|
||||||
}
|
}
|
||||||
@ -226,6 +237,7 @@ export default defineComponent({
|
|||||||
showDetail,
|
showDetail,
|
||||||
selectSpan,
|
selectSpan,
|
||||||
selectedItem,
|
selectedItem,
|
||||||
|
viewSpan,
|
||||||
t,
|
t,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user