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

Improved: Added a function to set the ion-badge color based on log status and updated the 'Failed Records' icon properties (#680) #745

Merged
merged 3 commits into from
Nov 29, 2024
Merged
Changes from 1 commit
Commits
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
17 changes: 15 additions & 2 deletions src/views/DataManagerLogDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@
<p>{{ translate('Finished') }}</p>
</ion-label>

<ion-badge v-if="log.statusId" :color="log.statusId === 'SERVICE_FAILED' ? 'danger' : 'success'">{{ translate(getStatusDesc(log.statusId)) }}</ion-badge>
<ion-badge v-if="log.statusId" :color="getLogStatusColor(log.statusId)">{{ translate(getStatusDesc(log.statusId)) }}</ion-badge>

<div class="ion-text-center" lines="none" v-if="log.errorRecordContentId" button @click="downloadErrorRecordFile(log)">
<ion-icon slot="start" :icon="cloudDownloadOutline" />
<ion-icon slot="icon-only" color="medium" :icon="cloudDownloadOutline" />
<ion-label>
<p>{{ translate('Failed records') }}</p>
</ion-label>
Expand Down Expand Up @@ -257,6 +257,19 @@ export default defineComponent ({
} catch (error) {
logger.error(error);
}
},
getLogStatusColor(statusId) {
if (statusId === 'SERVICE_FINISHED') {
return 'success';
} else if (statusId === 'SERVICE_RUNNING') {
return 'dark';
} else if (statusId === 'SERVICE_FAILED') {
return 'danger';
} else if (statusId === 'SERVICE_PENDING') {
return 'medium';
} else {
return 'medium';
ymaheshwari1 marked this conversation as resolved.
Show resolved Hide resolved
}
}
},
setup() {
Expand Down
Loading