Map filename added

This commit is contained in:
Cindy Chang
2024-08-16 10:47:17 +08:00
parent 772302d079
commit 43cbfb0529
5 changed files with 45 additions and 6 deletions

View File

@@ -402,7 +402,7 @@ export default {
case "ends-with": case "ends-with":
case "directly-follows": case "directly-follows":
case "eventually-follows": case "eventually-follows":
label = `${includeStr}, ${getTaskLabel(e)}`; label = `${includeStr}, ${this.getTaskLabel(e)}`;
type = "Sequence"; type = "Sequence";
break; break;
case "start-end": case "start-end":

View File

@@ -1,14 +1,25 @@
<template> <template>
<Sidebar :visible="sidebarState" :closeIcon="'pi pi-angle-right'" :modal="false" position="right" :dismissable="false" class="!w-[360px]" @hide="hide" @show="show"> <Sidebar :visible="sidebarState" :closeIcon="'pi pi-angle-right'" :modal="false" position="right" :dismissable="false"
class="!w-[360px]" @hide="hide" @show="show">
<template #header> <template #header>
<ul class="flex space-x-4 pl-4"> <ul class="flex space-x-4 pl-4">
<li class="h1 border-r-2 border-neutral-300 pr-4 cursor-pointer hover:text-neutral-900 hover:duration-700" @click="switchTab('summary')" :class="tab === 'summary'? 'text-neutral-900': ''">Summary</li> <li class="h1 border-r-2 border-neutral-300 pr-4 cursor-pointer hover:text-neutral-900 hover:duration-700"
<li class="h1 border-r-2 border-neutral-300 pr-4 cursor-pointer hover:text-neutral-900 hover:duration-700" @click="switchTab('insight')" :class="tab === 'insight'? 'text-neutral-900': ''">Insight</li> @click="switchTab('summary')" :class="tab === 'summary'? 'text-neutral-900': ''">Summary</li>
<li class="h1 border-r-2 border-neutral-300 pr-4 cursor-pointer hover:text-neutral-900 hover:duration-700"
@click="switchTab('insight')" :class="tab === 'insight'? 'text-neutral-900': ''">Insight</li>
</ul> </ul>
</template> </template>
<!-- header: summary --> <!-- header: summary -->
<div v-if="tab === 'summary'"> <div v-if="tab === 'summary'">
<!-- Stats --> <!-- Stats -->
<ul class="pb-4 border-b border-neutral-300">
<li>
<p class="h2">{{ i18next.t("Map.FileName") }}</p>
<div class="flex justify-between items-center">
<span>{{ currentMapFile }}</span>
</div>
</li>
</ul>
<ul class="pb-4 border-b border-neutral-300"> <ul class="pb-4 border-b border-neutral-300">
<li> <li>
<p class="h2">Cases</p> <p class="h2">Cases</p>
@@ -209,8 +220,11 @@
</template> </template>
<script> <script>
import { computed, } from 'vue';
import PageAdmin from '@/stores/pageAdmin';
import { getTimeLabel } from '@/module/timeLabel.js'; import { getTimeLabel } from '@/module/timeLabel.js';
import getMoment from 'moment'; import getMoment from 'moment';
import i18next from '@/i18n/i18n';
export default { export default {
props:{ props:{
@@ -227,6 +241,16 @@ export default {
required: false, required: false,
} }
}, },
setup(){
const pageAdmin = PageAdmin();
const currentMapFile = computed(() => pageAdmin.currentMapFile);
return {
currentMapFile,
i18next,
};
},
data() { data() {
return { return {
tab: 'summary', tab: 'summary',

View File

@@ -11,6 +11,9 @@
"Save": "Save", "Save": "Save",
"Confirm": "Confirm" "Confirm": "Confirm"
}, },
"Map":{
"FileName": "File Name"
},
"AcctMgmt":{ "AcctMgmt":{
"hi": "Hi, ", "hi": "Hi, ",
"acctMgmt": "Account management", "acctMgmt": "Account management",

View File

@@ -15,6 +15,7 @@ export default defineStore('pageAdminStore', {
isPagePending: false, isPagePending: false,
shouldKeepPreviousPage: false, // false -- meaning modal is not pressed as "NO" shouldKeepPreviousPage: false, // false -- meaning modal is not pressed as "NO"
activePageComputedByRoute: "MAP", activePageComputedByRoute: "MAP",
currentMapFile: '',
}), }),
getters: { getters: {
}, },
@@ -97,5 +98,8 @@ export default defineStore('pageAdminStore', {
printPageAdiminLog && console.log('clearShouldKeepPreviousPageBoolean()'); printPageAdiminLog && console.log('clearShouldKeepPreviousPageBoolean()');
this.shouldKeepPreviousPage = false; this.shouldKeepPreviousPage = false;
}, },
setCurrentMapFile(fileName){
this.currentMapFile = fileName;
},
}, },
}) })

View File

@@ -164,7 +164,9 @@
</div> </div>
<!-- All Files type of List --> <!-- All Files type of List -->
<div v-if="!switchListOrGrid"> <div v-if="!switchListOrGrid">
<DataTable :value="allFiles" dataKey="id" tableClass="w-full text-sm cursor-pointer relative table-fixed" :rowClass="setRowClass" breakpoint="0" @row-dblclick="enterDiscover($event.data)" contextmenu v-model:contextMenuSelection="selectedTableFile" @row-contextmenu="onRightClickTable" > <DataTable :value="allFiles" dataKey="id" tableClass="w-full text-sm cursor-pointer relative table-fixed"
:rowClass="setRowClass" breakpoint="0" @row-dblclick="enterDiscover($event.data)" contextmenu
v-model:contextMenuSelection="selectedTableFile" @row-contextmenu="onRightClickTable" >
<Column field="name" header="Name" bodyClass="font-medium fileName" sortable></Column> <Column field="name" header="Name" bodyClass="font-medium fileName" sortable></Column>
<Column field="parentLog" header="Dependency" bodyClass="text-neutral-500" sortable></Column> <Column field="parentLog" header="Dependency" bodyClass="text-neutral-500" sortable></Column>
<Column field="fileType" header="File Type" bodyClass="text-neutral-500 fileType" sortable></Column> <Column field="fileType" header="File Type" bodyClass="text-neutral-500 fileType" sortable></Column>
@@ -219,10 +221,11 @@
</div> </div>
</template> </template>
<script> <script>
import { storeToRefs } from 'pinia'; import { storeToRefs, mapActions, } from 'pinia';
import LoginStore from '@/stores/login.ts'; import LoginStore from '@/stores/login.ts';
import filesStore from '@/stores/files.js'; import filesStore from '@/stores/files.js';
import AllMapDataStore from '@/stores/allMapData.js'; import AllMapDataStore from '@/stores/allMapData.js';
import PageAdmin from '@/stores/pageAdmin.js';
import LoadingStore from '@/stores/loading.js'; import LoadingStore from '@/stores/loading.js';
import IconDataFormat from '@/components/icons/IconDataFormat.vue'; import IconDataFormat from '@/components/icons/IconDataFormat.vue';
import IconRule from '@/components/icons/IconRule.vue'; import IconRule from '@/components/icons/IconRule.vue';
@@ -386,6 +389,8 @@
let fileId; let fileId;
let params; let params;
this.setCurrentMapFile(file.name);
switch (file.type) { switch (file.type) {
case 'log': case 'log':
this.createFilterId = null; this.createFilterId = null;
@@ -597,6 +602,9 @@
break; break;
} }
}, },
...mapActions(
PageAdmin, ['setCurrentMapFile',],
)
}, },
mounted() { mounted() {
this.isLoading = true; this.isLoading = true;