diff --git a/src/assets/icons/issue-child.svg b/src/assets/icons/issue-child.svg new file mode 100755 index 00000000..c451f853 --- /dev/null +++ b/src/assets/icons/issue-child.svg @@ -0,0 +1,16 @@ + + +icn/issue-child \ No newline at end of file diff --git a/src/assets/icons/list-bulleted.svg b/src/assets/icons/list-bulleted.svg new file mode 100755 index 00000000..77cc0c26 --- /dev/null +++ b/src/assets/icons/list-bulleted.svg @@ -0,0 +1,16 @@ + + +icn/list-bulleted \ No newline at end of file diff --git a/src/assets/icons/statistics-bulleted.svg b/src/assets/icons/statistics-bulleted.svg new file mode 100644 index 00000000..236a28cc --- /dev/null +++ b/src/assets/icons/statistics-bulleted.svg @@ -0,0 +1,15 @@ + + \ No newline at end of file diff --git a/src/assets/icons/table.svg b/src/assets/icons/table.svg new file mode 100755 index 00000000..baa32ebd --- /dev/null +++ b/src/assets/icons/table.svg @@ -0,0 +1,23 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/store/modules/trace.ts b/src/store/modules/trace.ts index cfd49cfb..73342588 100644 --- a/src/store/modules/trace.ts +++ b/src/store/modules/trace.ts @@ -30,7 +30,7 @@ interface TraceState { traceList: Trace[]; traceTotal: number; traceSpans: Span[]; - currentTrace: Nullable; + currentTrace: Trace | any; conditions: any; // traceSpanLogs: any[]; // traceSpanLogsTotal: number; @@ -49,7 +49,7 @@ export const traceStore = defineStore({ traceList: [], traceSpans: [], traceTotal: 0, - currentTrace: null, + currentTrace: {}, conditions: { queryDuration: useAppStoreWithOut().durationTime, traceState: "ALL", @@ -103,10 +103,16 @@ export const traceStore = defineStore({ if (res.data.errors) { return res.data; } - this.traceList = res.data.data.data.traces; + this.traceList = res.data.data.data.traces.map((d: Trace) => { + d.traceIds = d.traceIds.map((id: string) => { + return { value: id, label: id }; + }); + return d; + }); this.traceTotal = res.data.data.data.total; + this.setCurrentTrace(res.data.data.data.traces[0] || {}); }, - async getTraceSpans(params: any) { + async getTraceSpans(params: { traceId: string }) { const res: AxiosResponse = await graphql .query("queryTrace") .params(params); diff --git a/src/styles/lib.scss b/src/styles/lib.scss index 7a74e835..f6aecaed 100644 --- a/src/styles/lib.scss +++ b/src/styles/lib.scss @@ -95,6 +95,10 @@ background-color: #a7aebb; } +.mt-0 { + margin-top: 0; +} + .mb-5 { margin-bottom: 5px; } diff --git a/src/types/trace.d.ts b/src/types/trace.d.ts index 010397f9..7bd2682f 100644 --- a/src/types/trace.d.ts +++ b/src/types/trace.d.ts @@ -21,7 +21,7 @@ export interface Trace { key: string; operationNames: string[]; start: string; - traceIds: string[]; + traceIds: Array; } export interface Span { diff --git a/src/views/dashboard/controls/Trace.vue b/src/views/dashboard/controls/Trace.vue index 1f93f742..34c86558 100644 --- a/src/views/dashboard/controls/Trace.vue +++ b/src/views/dashboard/controls/Trace.vue @@ -13,12 +13,13 @@ 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. --> @@ -26,9 +27,10 @@ limitations under the License. --> import type { PropType } from "vue"; import Filter from "../related/trace/Filter.vue"; import TraceList from "../related/trace/TraceList.vue"; +import Content from "../related/trace/Content.vue"; /*global defineProps */ -const props = defineProps({ +defineProps({ data: { type: Object as PropType, default: () => ({ graph: {} }), @@ -37,9 +39,10 @@ const props = defineProps({ }); diff --git a/src/views/dashboard/related/trace/Content.vue b/src/views/dashboard/related/trace/Content.vue new file mode 100644 index 00000000..09c4ae00 --- /dev/null +++ b/src/views/dashboard/related/trace/Content.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/dashboard/related/trace/Filter.vue b/src/views/dashboard/related/trace/Filter.vue index c96c3ca3..d2f10ba9 100644 --- a/src/views/dashboard/related/trace/Filter.vue +++ b/src/views/dashboard/related/trace/Filter.vue @@ -48,12 +48,6 @@ limitations under the License. --> {{ t("traceID") }}: -
- {{ t("duration") }}: - - - - -
@input="changeTimeRange" />
--> +
+ {{ t("duration") }}: + + - + +
:small="true" layout="prev, pager, next, jumper" :total="traceStore.traceTotal" + v-model:pager-count="pageCount" @current-change="updatePage" /> - +
+ +
-
- +
+
{{ i.duration }} ms{{ parseInt(i.start, 10) }} + >{{ dateFormat(parseInt(i.start, 10)) }}
@@ -69,6 +72,7 @@ limitations under the License. -->