diff --git a/src/locales/lang/en.ts b/src/locales/lang/en.ts index c4e41a95..60bdf9b0 100644 --- a/src/locales/lang/en.ts +++ b/src/locales/lang/en.ts @@ -96,8 +96,8 @@ const msg = { taskList: "Task List", sampledTraces: "Sampled Traces", editTab: "Enable editing tab names", - label: "Name", - id: "ID", + label: "Service Name", + id: "Service ID", setRoot: "Set this to root", setNormal: "Set this to normal", export: "Export Dashboard Templates", diff --git a/src/locales/lang/zh.ts b/src/locales/lang/zh.ts index 19e3e87b..779eed57 100644 --- a/src/locales/lang/zh.ts +++ b/src/locales/lang/zh.ts @@ -96,8 +96,8 @@ const msg = { taskList: "任务列表", sampledTraces: "采样的追踪", editTab: "开启编辑Tab的名称", - label: "名称", - id: "编号", + label: "服务名称", + id: "服务编号", setRoot: "设置成为根", setNormal: "设置成为普通", export: "导出仪表板模板", diff --git a/src/views/dashboard/List.vue b/src/views/dashboard/List.vue index 917314d0..57537f91 100644 --- a/src/views/dashboard/List.vue +++ b/src/views/dashboard/List.vue @@ -40,6 +40,7 @@ limitations under the License. --> :style="{ width: '100%', fontSize: '13px' }" v-loading="loading" ref="multipleTableRef" + :default-sort="{ prop: 'name' }" @selection-change="handleSelectionChange" > @@ -173,7 +174,12 @@ async function importTemplates(event: any) { el!.value = ""; } function exportTemplates() { - const templates = multipleSelection.value.map((d: DashboardItem) => { + const arr = multipleSelection.value.sort( + (a: DashboardItem, b: DashboardItem) => { + return a.name.localeCompare(b.name); + } + ); + const templates = arr.map((d: DashboardItem) => { const key = [d.layer, d.entity, d.name.split(" ").join("-")].join("_"); const layout = JSON.parse(sessionStorage.getItem(key) || "{}"); return layout;