Skip to content

Commit

Permalink
Improved: Added CSS to highlight the selected job card(hotwax#742)
Browse files Browse the repository at this point in the history
  • Loading branch information
R-Sourabh committed Nov 25, 2024
1 parent 2d85b8d commit 0ebf7eb
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/views/Pipeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
</div>

<div v-else>
<ion-card v-for="job in pendingJobs" :key="job.jobId" @click="viewJobConfiguration(job)" :button="isDesktop">
<ion-card v-for="job in pendingJobs" :key="job.jobId" @click="viewJobConfiguration(job)" :button="isDesktop" :class="{ 'job-card-elevated': elevatedJobCard === job.jobId }">
<ion-card-header>
<ion-card-title>{{ job.enumName }}</ion-card-title>
<ion-badge v-if="job.runTime" color="dark">{{ timeFromNow(job.runTime)}}</ion-badge>
Expand Down Expand Up @@ -180,7 +180,7 @@
</div>

<div v-else>
<ion-card v-for="job in jobHistory" :key="job.jobId" @click="viewJobConfiguration(job)" :button="isDesktop">
<ion-card v-for="job in jobHistory" :key="job.jobId" @click="viewJobConfiguration(job)" :button="isDesktop" :class="{ 'job-card-elevated': elevateJobCard === job.jobId }">
<ion-card-header>
<div>
<ion-card-subtitle class="overline">{{ job.parentJobId }}</ion-card-subtitle>
Expand Down Expand Up @@ -360,7 +360,8 @@ export default defineComponent({
isDesktop: isPlatform('desktop'),
isRetrying: false,
queryString: '' as any,
isScrollingEnabled: false
isScrollingEnabled: false,
elevateJobCard: '' as any
}
},
computed: {
Expand Down Expand Up @@ -602,6 +603,7 @@ export default defineComponent({
return alert.present();
},
async viewJobConfiguration(job: any) {
this.elevateJobCard = job.jobId
this.currentJobStatus = job.tempExprId
const id = Object.entries(this.jobEnums).find((enums) => enums[1] == job.systemJobEnumId) as any
const appFreqType = id && (Object.entries(this.jobFrequencyType).find((freq) => freq[0] == id[0]) as any)
Expand Down Expand Up @@ -685,6 +687,11 @@ export default defineComponent({
</script>

<style scoped>
.job-card-elevated {
box-shadow: 0px 8px 10px 0px rgba(0, 0, 0, 0.14), 0px 3px 14px 0px rgba(0, 0, 0, 0.12), 0px 4px 5px 0px rgba(0, 0, 0, 0.20);
scale: 1.03
}
ion-card-header {
display: flex;
flex-direction: row;
Expand Down

0 comments on commit 0ebf7eb

Please sign in to comment.