mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-16 14:25:23 +00:00
sort dashboard list
This commit is contained in:
parent
3306e3b382
commit
458bc57100
@ -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",
|
||||
|
@ -96,8 +96,8 @@ const msg = {
|
||||
taskList: "任务列表",
|
||||
sampledTraces: "采样的追踪",
|
||||
editTab: "开启编辑Tab的名称",
|
||||
label: "名称",
|
||||
id: "编号",
|
||||
label: "服务名称",
|
||||
id: "服务编号",
|
||||
setRoot: "设置成为根",
|
||||
setNormal: "设置成为普通",
|
||||
export: "导出仪表板模板",
|
||||
|
@ -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"
|
||||
>
|
||||
<el-table-column type="selection" width="35" />
|
||||
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user