mirror of
https://github.com/ansible/awx.git
synced 2026-05-09 10:27:37 -02:30
update scheduler list styling
This commit is contained in:
@@ -285,6 +285,15 @@ table, tbody {
|
|||||||
padding-right: 0px!important;
|
padding-right: 0px!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.List-staticColumn--toggle {
|
||||||
|
width: 55px;
|
||||||
|
padding-right: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.List-staticColumn--schedulerTime {
|
||||||
|
max-width: 164px;
|
||||||
|
}
|
||||||
|
|
||||||
.List-staticColumnAdjacent {
|
.List-staticColumnAdjacent {
|
||||||
padding-left: 10px!important;
|
padding-left: 10px!important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,29 +18,40 @@ export default
|
|||||||
hover: true,
|
hover: true,
|
||||||
|
|
||||||
fields: {
|
fields: {
|
||||||
|
toggleSchedule: {
|
||||||
|
label: '',
|
||||||
|
columnClass: 'List-staticColumn--toggle',
|
||||||
|
type: "toggle",
|
||||||
|
ngClick: "toggleSchedule($event, schedule.id)",
|
||||||
|
awToolTip: "{{ schedule.play_tip }}",
|
||||||
|
dataTipWatch: "schedule.play_tip",
|
||||||
|
dataPlacement: "right",
|
||||||
|
searchable: false,
|
||||||
|
nosort: true,
|
||||||
|
},
|
||||||
name: {
|
name: {
|
||||||
key: true,
|
key: true,
|
||||||
label: 'Name',
|
label: 'Name',
|
||||||
ngClick: "editSchedule(schedule.id)",
|
ngClick: "editSchedule(schedule.id)",
|
||||||
columnClass: "col-md-3 col-sm-3 col-xs-3"
|
columnClass: "col-md-3 col-sm-3 col-xs-6"
|
||||||
},
|
},
|
||||||
dtstart: {
|
dtstart: {
|
||||||
label: 'First Run',
|
label: 'First Run',
|
||||||
filter: "longDate",
|
filter: "longDate",
|
||||||
searchable: false,
|
searchable: false,
|
||||||
columnClass: "col-md-2 col-sm-3 hidden-xs"
|
columnClass: "List-staticColumn--schedulerTime hidden-sm hidden-xs"
|
||||||
},
|
},
|
||||||
next_run: {
|
next_run: {
|
||||||
label: 'Next Run',
|
label: 'Next Run',
|
||||||
filter: "longDate",
|
filter: "longDate",
|
||||||
searchable: false,
|
searchable: false,
|
||||||
columnClass: "col-md-2 col-sm-3 col-xs-3"
|
columnClass: "List-staticColumn--schedulerTime hidden-xs"
|
||||||
},
|
},
|
||||||
dtend: {
|
dtend: {
|
||||||
label: 'Final Run',
|
label: 'Final Run',
|
||||||
filter: "longDate",
|
filter: "longDate",
|
||||||
searchable: false,
|
searchable: false,
|
||||||
columnClass: "col-md-2 col-sm-3 hidden-xs"
|
columnClass: "List-staticColumn--schedulerTime hidden-xs"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -63,14 +74,6 @@ export default
|
|||||||
},
|
},
|
||||||
|
|
||||||
fieldActions: {
|
fieldActions: {
|
||||||
"play": {
|
|
||||||
mode: "all",
|
|
||||||
ngClick: "toggleSchedule($event, schedule.id)",
|
|
||||||
awToolTip: "{{ schedule.play_tip }}",
|
|
||||||
dataTipWatch: "schedule.play_tip",
|
|
||||||
iconClass: "{{ 'fa icon-schedule-enabled-' + schedule.enabled }}",
|
|
||||||
dataPlacement: "top"
|
|
||||||
},
|
|
||||||
edit: {
|
edit: {
|
||||||
label: 'Edit',
|
label: 'Edit',
|
||||||
ngClick: "editSchedule(schedule.id)",
|
ngClick: "editSchedule(schedule.id)",
|
||||||
|
|||||||
52
awx/ui/client/src/scheduler/scheduleToggle.block.less
Normal file
52
awx/ui/client/src/scheduler/scheduleToggle.block.less
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
/** @define ScheduleToggle */
|
||||||
|
|
||||||
|
.ScheduleToggle {
|
||||||
|
border-radius: 5px;
|
||||||
|
border: 1px solid #b7b7b7;
|
||||||
|
background-color: #b7b7b7;
|
||||||
|
width: 40px;
|
||||||
|
margin-top: 2px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ScheduleToggle-switch {
|
||||||
|
color: #848992;
|
||||||
|
background-color: #fff;
|
||||||
|
margin-left: 4px;
|
||||||
|
border-left: 1px solid #b7b7b7;
|
||||||
|
margin-right: 0px;
|
||||||
|
text-align: center;
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-size: 11px;
|
||||||
|
border-top-right-radius: 4px;
|
||||||
|
border-bottom-right-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ScheduleToggle.is-on {
|
||||||
|
border-color: #1678c4;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ScheduleToggle-switch.is-on {
|
||||||
|
margin-right: 5px;
|
||||||
|
margin-left: 0px;
|
||||||
|
background-color: #1678c4;
|
||||||
|
color: #fff;
|
||||||
|
border-left: 0;
|
||||||
|
border-top-right-radius: 0px;
|
||||||
|
border-bottom-right-radius: 0px;
|
||||||
|
border-top-left-radius: 4px;
|
||||||
|
border-bottom-left-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ScheduleToggle-switch:hover {
|
||||||
|
background-color: #fafafa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ScheduleToggle.is-on:hover {
|
||||||
|
border-color: #4498DA;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ScheduleToggle-switch.is-on:hover {
|
||||||
|
background-color: #4498DA;
|
||||||
|
}
|
||||||
@@ -458,6 +458,12 @@ angular.module('GeneratorHelpers', [systemStatus.name])
|
|||||||
html = Badge(field);
|
html = Badge(field);
|
||||||
} else if (field.type === 'template') {
|
} else if (field.type === 'template') {
|
||||||
html = Template(field);
|
html = Template(field);
|
||||||
|
} else if (field.type === 'toggle') {
|
||||||
|
html += "<td class=\"List-tableCell " + fld + "-column";
|
||||||
|
html += (field['class']) ? " " + field['class'] : "";
|
||||||
|
html += " " + field.columnClass;
|
||||||
|
html += "\"><div class='ScheduleToggle' ng-class='{\"is-on\": " + list.iterator + ".enabled\}' aw-tool-tip='" + field.awToolTip + "' data-placement='" + field.dataPlacement + "' data-tip-watch='" + field.dataTipWatch + "'><div ng-show='" + list.iterator + ".enabled' class='ScheduleToggle-switch is-on' ng-click='" + field.ngClick + "'>ON</div><div ng-show='!" + list.iterator + ".enabled' class='ScheduleToggle-switch' ng-click='" + field.ngClick + "'>OFF</div></div></td>";
|
||||||
|
console.log(html);
|
||||||
} else {
|
} else {
|
||||||
html += "<td class=\"List-tableCell " + fld + "-column";
|
html += "<td class=\"List-tableCell " + fld + "-column";
|
||||||
html += (field['class']) ? " " + field['class'] : "";
|
html += (field['class']) ? " " + field['class'] : "";
|
||||||
|
|||||||
Reference in New Issue
Block a user