Skip to content

Commit

Permalink
Merge pull request #873 from gpuligundla/feat/automatic-scheduling-st…
Browse files Browse the repository at this point in the history
…atus

Feat:Added field to show automatic scheduling status
  • Loading branch information
benoit74 authored Nov 23, 2023
2 parents c678dda + 47d7918 commit 355f828
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions dispatcher/backend/src/common/schemas/orms.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ def get_is_requested(schedule: dbm.Schedule):
config = mf.Nested(ConfigTaskOnlySchema)
language = mf.Nested(LanguageSchema)
is_requested = mf.Function(get_is_requested)
enabled = mf.Boolean()


class ScheduleFullSchema(BaseSchema):
Expand Down
1 change: 1 addition & 0 deletions dispatcher/backend/src/routes/schedules/schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def get(self, session: so.Session):
sa.select(
dbm.Schedule.name,
dbm.Schedule.category,
dbm.Schedule.enabled,
so.Bundle(
"language",
dbm.Schedule.language_code.label("code"),
Expand Down
5 changes: 4 additions & 1 deletion dispatcher/frontend-ui/src/components/SchedulesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@
<tr v-for="schedule in schedules" :key="schedule._id">
<td>
<router-link :to="{name: 'schedule-detail', params: {'schedule_name': schedule.name}}">
{{ schedule.name }}
<span style="display: flex; align-items: center">
{{ schedule.name }}
<font-awesome-icon v-if="!schedule.enabled" icon="pause" style="margin-left: 5px; color: orange"/>
</span>
</router-link>
</td>
<td>{{ schedule.category }}</td>
Expand Down
3 changes: 2 additions & 1 deletion dispatcher/frontend-ui/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { faSpinner, faUser, faUserCircle, faKey, faTimes, faTimesCircle,
faCalendarAlt, faStopCircle, faTrashAlt, faPlug,
faSkullCrossbones, faAsterisk, faCheck, faPlusCircle,
faExclamationTriangle, faServer, faSortAmountUp,
faExternalLinkAlt, faClock, faCompactDisc, faGlasses, faBug } from '@fortawesome/free-solid-svg-icons'
faExternalLinkAlt, faClock, faCompactDisc, faGlasses, faBug, faPause, } from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
library.add(faKey);
library.add(faBug);
Expand Down Expand Up @@ -61,6 +61,7 @@ library.add(faExternalLinkAlt);
library.add(faArrowCircleLeft);
library.add(faSkullCrossbones);
library.add(faExclamationTriangle);
library.add(faPause);
Vue.component('font-awesome-icon', FontAwesomeIcon);

// Multiselect for schedules filter
Expand Down

0 comments on commit 355f828

Please sign in to comment.