Skip to content

Commit

Permalink
πŸ’„ : add PENDING state management
Browse files Browse the repository at this point in the history
  • Loading branch information
juwit committed Oct 23, 2020
1 parent b5d2867 commit a8ea854
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
9 changes: 9 additions & 0 deletions src/main/client/app/pages/stacks/job/job-metadata.vue
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,15 @@
margin-bottom: 1rem;
}
.job-metadata-container[class*=PENDING] {
background: linear-gradient(to right, #91B0B1 0, #91B0B1 1rem, #fff 1rem, #fff 100%) no-repeat;
color: #91B0B1;
}
.job-metadata-container[class*=PENDING] .job-detail-title {
color: #91B0B1;
}
.job-metadata-container[class*=STARTED] {
background: linear-gradient(to right, #2196f3 0, #2196f3 1rem, #fff 1rem, #fff 100%) no-repeat;
}
Expand Down
7 changes: 6 additions & 1 deletion src/main/client/app/pages/stacks/job/job-step.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<div class="job-step-header-title">
<span>{{ headerTitle }}</span>
<font-awesome-icon
v-if="step.status === 'STARTED'"
v-if="step.status === 'STARTED' || step.status === 'PENDING'"
icon="circle-notch"
spin
class="icon"
Expand Down Expand Up @@ -175,6 +175,11 @@
cursor: default;
}
.job-step-container[class*=PENDING] .job-step-header {
background: linear-gradient(to right, #91B0B1 0, #91B0B1 1rem, #fff 1rem, #fff 100%) no-repeat;
color: #91B0B1;
}
.job-step-container[class*=STARTED] .job-step-header {
background: linear-gradient(to right, #2196f3 0, #2196f3 1rem, #fff 1rem, #fff 100%) no-repeat;
color: #2196f3;
Expand Down
4 changes: 3 additions & 1 deletion src/main/client/app/pages/stacks/stack-edition.vue
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
displayConfirmDialog,
displayNotification,
} from '@/shared/services/modal-service';
import { getJobs } from '@/shared/api/jobs-api';
import { getJobs, planJob } from '@/shared/api/jobs-api';
import { getCredentialsList } from '@/shared/api/credentials-api';
export default {
Expand Down Expand Up @@ -275,6 +275,7 @@
if (await displayConfirmDialog(this, { title: 'Run request', message })) {
await this.saveStack();
const { jobId } = await runStack(this.stack.id);
await planJob(jobId);
this.$router.push({ name: 'job', params: { jobId } });
}
},
Expand All @@ -283,6 +284,7 @@
const message = 'This will completely stop the stack, and destroy all created resources. Continue?';
if (await displayConfirmDialog(this, { title: 'Stop request', message })) {
const { jobId } = await destroyStack(this.stack.id);
await planJob(jobId);
this.$router.push({ name: 'job', params: { jobId } });
}
},
Expand Down

0 comments on commit a8ea854

Please sign in to comment.