Skip to content

Commit

Permalink
Improved: changed component name, udpate fetchDataManagerLogs payload…
Browse files Browse the repository at this point in the history
… and made changes in the css(hotwax#680)
  • Loading branch information
R-Sourabh committed Oct 3, 2024
1 parent a6863d9 commit 37a38e4
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,35 @@
</ion-header>

<ion-content>
<div class="header">
<div class="ion-padding">
<section>
<div class="header ion-padding">
<section>
<ion-item lines="none">
<h1>{{ translate('Import logs') }}</h1>
</ion-item>
<ion-list>
<ion-item>
<ion-icon slot="start" :icon="pulseOutline" />
{{ translate('Job') }}
<ion-label slot="end" class="ion-text-wrap">{{ currentJob.jobId }}</ion-label>
</ion-item>
<ion-item>
<ion-icon slot="start" :icon="fileTrayFullOutline" />
{{ translate('Files received') }}
<ion-label slot="end">{{ getDataManagerLogs.length }}</ion-label>
</ion-item>
<ion-item>
<ion-icon slot="start" :icon="codeWorkingOutline" />
{{ translate('Files processed') }}
<ion-label slot="end">{{ getProcessedFileCount() }}</ion-label>
</ion-item>
<ion-item lines="none">
<h1>{{ translate('Import logs') }}</h1>
<ion-icon slot="start" :icon="warningOutline" />
{{ translate('Files with errors') }}
<ion-label slot="end">{{ getErrorFileCount() }}</ion-label>
</ion-item>
<ion-list>
<ion-item>
<ion-icon slot="start" :icon="pulseOutline" />
{{ translate('Job') }}
<ion-label slot="end" class="ion-text-wrap">{{ currentJob.jobId }}</ion-label>
</ion-item>
<ion-item>
<ion-icon slot="start" :icon="fileTrayFullOutline" />
{{ translate('Files received') }}
<ion-label slot="end">{{ getDataManagerLogs.length }}</ion-label>
</ion-item>
<ion-item>
<ion-icon slot="start" :icon="codeWorkingOutline" />
{{ translate('Files processed') }}
<ion-label slot="end">{{ getProcessedFileCount() }}</ion-label>
</ion-item>
<ion-item lines="none">
<ion-icon slot="start" :icon="warningOutline" />
{{ translate('Files with errors') }}
<ion-label slot="end">{{ getErrorFileCount() }}</ion-label>
</ion-item>
</ion-list>
</section>
</div>
<div class="config ion-padding">
</ion-list>
</section>
<div class="config-details">
<ion-label lines="none">
<p class="overline">{{ currentJob.runtimeData?.configId }}</p>
<h1>{{ configDetails?.description }}</h1>
Expand Down Expand Up @@ -129,7 +127,7 @@ import { JobService } from "@/services/JobService";
import logger from '@/logger';

export default defineComponent ({
name: "ImportLogsDetail",
name: "DataManagerLogDetails",
components: {
IonBackButton,
IonBadge,
Expand Down Expand Up @@ -270,7 +268,7 @@ export default defineComponent ({
</script>

<style scoped>
section {
.header > section {
overflow: hidden;
border: var(--border-medium);
border-radius: 16px;
Expand All @@ -288,9 +286,10 @@ section {
.header {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-gap: var(--spacer-sm);
}

.config {
.config-details {
align-self: end;
}

Expand Down
6 changes: 3 additions & 3 deletions src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Miscellaneous from '@/views/Miscellaneous.vue'
import Reports from '@/views/Reports.vue'
import BulkEditor from '@/views/BulkEditor.vue'
import Settings from "@/views/Settings.vue"
import ImportLogsDetail from "@/components/ImportLogsDetail.vue"
import DataManagerLogDetails from "@/components/DataManagerLogDetails.vue"
import store from '@/store'
import { hasPermission } from '@/authorization';
import { showToast } from '@/utils'
Expand Down Expand Up @@ -66,8 +66,8 @@ const routes: Array<RouteRecordRaw> = [
},
{
path: '/import-logs-detail/:jobId',
name: 'ImportLogsDetail',
component: ImportLogsDetail,
name: 'DataManagerLogDetails',
component: DataManagerLogDetails,
beforeEnter: authGuard,
},
{
Expand Down
5 changes: 2 additions & 3 deletions src/store/modules/job/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,11 @@ const actions: ActionTree<JobState, RootState> = {
})
},

async fetchDataManagerLogs({ commit, dispatch }, configId) {
async fetchDataManagerLogs({ commit }, configId) {
commit(types.JOB_DATA_MANAGER_LOGS_UPDATED, []);
let logs = [] as any
const payload = {
"inputFields": {
"statusId": ["SERVICE_CANCELLED", "SERVICE_CRASHED", "SERVICE_FAILED", "SERVICE_FINISHED", "SERVICE_PENDING", "SERVICE_RUNNING", "SERVICE_QUEUED"],
"systemJobEnumId_op": "not-empty",
"configId": configId
},
Expand All @@ -289,7 +288,7 @@ const actions: ActionTree<JobState, RootState> = {
return logs;
},

async fetchDataResource({ commit, state }, logs) {
async fetchDataResource({ commit }, logs) {
// Extract logFileContentId and errorRecordContentId from logs
const contentIds = [].concat(...logs.map((log: any) => [log.logFileContentId, log.errorRecordContentId].filter(id => id)));

Expand Down

0 comments on commit 37a38e4

Please sign in to comment.