mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-01 20:05:58 +00:00
revert logs on trace widget (#170)
This commit is contained in:
parent
2bf90d6a6d
commit
9f57e35119
@ -154,6 +154,7 @@ const msg = {
|
|||||||
query: "Query",
|
query: "Query",
|
||||||
postgreSQL: "PostgreSQL",
|
postgreSQL: "PostgreSQL",
|
||||||
endpointTips: "The table shows up to 20 pieces of endpoints.",
|
endpointTips: "The table shows up to 20 pieces of endpoints.",
|
||||||
|
apisix: "APISIX",
|
||||||
seconds: "Seconds",
|
seconds: "Seconds",
|
||||||
hourTip: "Select Hour",
|
hourTip: "Select Hour",
|
||||||
minuteTip: "Select Minute",
|
minuteTip: "Select Minute",
|
||||||
|
@ -154,6 +154,7 @@ const msg = {
|
|||||||
query: "Consulta",
|
query: "Consulta",
|
||||||
postgreSQL: "PostgreSQL",
|
postgreSQL: "PostgreSQL",
|
||||||
endpointTips: "Aquí, la tabla muestra hasta 20 punto final.",
|
endpointTips: "Aquí, la tabla muestra hasta 20 punto final.",
|
||||||
|
apisix: "APISIX",
|
||||||
seconds: "Segundos",
|
seconds: "Segundos",
|
||||||
hourTip: "Seleccione Hora",
|
hourTip: "Seleccione Hora",
|
||||||
minuteTip: "Seleccione Minuto",
|
minuteTip: "Seleccione Minuto",
|
||||||
|
@ -151,6 +151,7 @@ const msg = {
|
|||||||
query: "查询",
|
query: "查询",
|
||||||
postgreSQL: "PostgreSQL",
|
postgreSQL: "PostgreSQL",
|
||||||
endpointTips: "这里最多展示20条endpoints。",
|
endpointTips: "这里最多展示20条endpoints。",
|
||||||
|
apisix: "APISIX",
|
||||||
seconds: "秒",
|
seconds: "秒",
|
||||||
hourTip: "选择小时",
|
hourTip: "选择小时",
|
||||||
minuteTip: "选择分钟",
|
minuteTip: "选择分钟",
|
||||||
|
@ -30,7 +30,7 @@ export default [
|
|||||||
path: "/apisix",
|
path: "/apisix",
|
||||||
name: "APISIX",
|
name: "APISIX",
|
||||||
meta: {
|
meta: {
|
||||||
title: "APISIX",
|
title: "apisix",
|
||||||
layer: "APISIX",
|
layer: "APISIX",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
1
src/types/components.d.ts
vendored
1
src/types/components.d.ts
vendored
@ -9,6 +9,7 @@ declare module '@vue/runtime-core' {
|
|||||||
ElCollapse: typeof import('element-plus/es')['ElCollapse']
|
ElCollapse: typeof import('element-plus/es')['ElCollapse']
|
||||||
ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem']
|
ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem']
|
||||||
ElDialog: typeof import('element-plus/es')['ElDialog']
|
ElDialog: typeof import('element-plus/es')['ElDialog']
|
||||||
|
ElDrawer: typeof import('element-plus/es')['ElDrawer']
|
||||||
ElDropdown: typeof import('element-plus/es')['ElDropdown']
|
ElDropdown: typeof import('element-plus/es')['ElDropdown']
|
||||||
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
|
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
|
||||||
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
|
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
|
||||||
|
@ -362,14 +362,6 @@ watch(
|
|||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.trace-list .trace-node rect {
|
|
||||||
cursor: pointer;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
fill: rgba(0, 0, 0, 0.05);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.dialog-c-text {
|
.dialog-c-text {
|
||||||
white-space: pre;
|
white-space: pre;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
@ -81,34 +81,75 @@ limitations under the License. -->
|
|||||||
{{ t("relatedTraceLogs") }}
|
{{ t("relatedTraceLogs") }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
<el-dialog
|
||||||
|
v-model="showRelatedLogs"
|
||||||
|
:destroy-on-close="true"
|
||||||
|
fullscreen
|
||||||
|
@closed="showRelatedLogs = false"
|
||||||
|
>
|
||||||
|
<el-pagination
|
||||||
|
v-model:currentPage="pageNum"
|
||||||
|
v-model:page-size="pageSize"
|
||||||
|
:small="true"
|
||||||
|
layout="prev, pager, next"
|
||||||
|
:pager-count="5"
|
||||||
|
:total="total"
|
||||||
|
@current-change="turnPage"
|
||||||
|
/>
|
||||||
|
<LogTable
|
||||||
|
:tableData="traceStore.traceSpanLogs || []"
|
||||||
|
:type="`service`"
|
||||||
|
:noLink="true"
|
||||||
|
>
|
||||||
|
<div class="log-tips" v-if="!traceStore.traceSpanLogs.length">
|
||||||
|
{{ t("noData") }}
|
||||||
|
</div>
|
||||||
|
</LogTable>
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { inject } from "vue";
|
import { ref, computed } from "vue";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import type { PropType } from "vue";
|
import type { PropType } from "vue";
|
||||||
import copy from "@/utils/copy";
|
import copy from "@/utils/copy";
|
||||||
import getDashboard from "@/hooks/useDashboardsSession";
|
import { ElMessage } from "element-plus";
|
||||||
import { LayoutConfig } from "@/types/dashboard";
|
|
||||||
import { dateFormat } from "@/utils/dateFormat";
|
import { dateFormat } from "@/utils/dateFormat";
|
||||||
|
import { useTraceStore } from "@/store/modules/trace";
|
||||||
|
import LogTable from "@/views/dashboard/related/log/LogTable/Index.vue";
|
||||||
|
|
||||||
/*global defineProps, Recordable */
|
/*global defineProps */
|
||||||
const options: Recordable<LayoutConfig> = inject("options") || {};
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
currentSpan: { type: Object as PropType<any>, default: () => ({}) },
|
currentSpan: { type: Object as PropType<any>, default: () => ({}) },
|
||||||
});
|
});
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const traceStore = useTraceStore();
|
||||||
|
const pageNum = ref<number>(1);
|
||||||
|
const showRelatedLogs = ref<boolean>(false);
|
||||||
|
const pageSize = 10;
|
||||||
|
const total = computed(() =>
|
||||||
|
traceStore.traceList.length === pageSize
|
||||||
|
? pageSize * pageNum.value + 1
|
||||||
|
: pageSize * pageNum.value
|
||||||
|
);
|
||||||
async function getTaceLogs() {
|
async function getTaceLogs() {
|
||||||
const { associationWidget } = getDashboard();
|
showRelatedLogs.value = true;
|
||||||
associationWidget(
|
const res = await traceStore.getSpanLogs({
|
||||||
(options.id as any) || "",
|
condition: {
|
||||||
{
|
relatedTrace: {
|
||||||
sourceId: options?.id || "",
|
traceId: props.currentSpan.traceId,
|
||||||
traceId: props.currentSpan.traceId,
|
segmentId: props.currentSpan.segmentId,
|
||||||
segmentId: props.currentSpan.segmentId,
|
spanId: props.currentSpan.spanId,
|
||||||
spanId: props.currentSpan.spanId,
|
},
|
||||||
|
paging: { pageNum: pageNum.value, pageSize },
|
||||||
},
|
},
|
||||||
"Log"
|
});
|
||||||
);
|
if (res.errors) {
|
||||||
|
ElMessage.error(res.errors);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function turnPage(p: number) {
|
||||||
|
pageNum.value = p;
|
||||||
|
getTaceLogs();
|
||||||
}
|
}
|
||||||
function showCurrentSpanDetail(text: string) {
|
function showCurrentSpanDetail(text: string) {
|
||||||
copy(text);
|
copy(text);
|
||||||
|
@ -141,6 +141,7 @@ export default class ListGraph {
|
|||||||
.append("g")
|
.append("g")
|
||||||
.attr("transform", `translate(${source.y0},${source.x0})`)
|
.attr("transform", `translate(${source.y0},${source.x0})`)
|
||||||
.attr("class", "trace-node")
|
.attr("class", "trace-node")
|
||||||
|
.attr("style", "cursor: pointer")
|
||||||
.style("opacity", 0)
|
.style("opacity", 0)
|
||||||
.on("mouseover", function (event: any, d: Trace) {
|
.on("mouseover", function (event: any, d: Trace) {
|
||||||
t.tip.show(d, this);
|
t.tip.show(d, this);
|
||||||
|
Loading…
Reference in New Issue
Block a user