Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented: Updated the DataManager Logs page to be dynamic in Job Manager(#680) #729

Merged
merged 15 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
ymaheshwari1 marked this conversation as resolved.
Show resolved Hide resolved
}

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 @@
})
},

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 @@
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 Expand Up @@ -745,7 +744,7 @@
return resp;
},

async runServiceNow({ dispatch }, params) {

Check warning on line 747 in src/store/modules/job/actions.ts

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (18.x)

'dispatch' is defined but never used

Check warning on line 747 in src/store/modules/job/actions.ts

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (20.x)

'dispatch' is defined but never used
let resp;

const job = params.job
Expand Down
Loading