mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 20:30:46 -03:30
allow for read only view of management schedules as well
This commit is contained in:
parent
6ffe67ec41
commit
3fab3a9e5c
@ -21,6 +21,7 @@
|
||||
Name
|
||||
</label>
|
||||
<input
|
||||
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
type="text"
|
||||
class="form-control input-sm
|
||||
Form-textInput"
|
||||
@ -40,7 +41,8 @@
|
||||
Start Date
|
||||
</label>
|
||||
<div class="input-group Form-inputGroup SchedulerForm-inputGroup--date">
|
||||
<scheduler-date-picker date="schedulerStartDt">
|
||||
<scheduler-date-picker date="schedulerStartDt"
|
||||
disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)">
|
||||
</scheduler-date-picker>
|
||||
</div>
|
||||
<div class="error"
|
||||
@ -63,6 +65,7 @@
|
||||
</label>
|
||||
<div class="input-group SchedulerTime">
|
||||
<input name="schedulerStartHour"
|
||||
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
id="schedulerStartHour"
|
||||
sch-spinner="scheduler_form"
|
||||
class="scheduler-time-spinner
|
||||
@ -78,6 +81,7 @@
|
||||
:
|
||||
</span>
|
||||
<input name="schedulerStartMinute"
|
||||
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
id="schedulerStartMinute"
|
||||
sch-spinner="scheduler_form"
|
||||
class="scheduler-time-spinner
|
||||
@ -93,6 +97,7 @@
|
||||
:
|
||||
</span>
|
||||
<input name="schedulerStartSecond"
|
||||
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
id="schedulerStartSecond"
|
||||
sch-spinner="scheduler_form"
|
||||
class="scheduler-time-spinner
|
||||
@ -128,6 +133,7 @@
|
||||
Local Time Zone
|
||||
</label>
|
||||
<select
|
||||
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
class="MakeSelect2"
|
||||
name="schedulerTimeZone"
|
||||
id="schedulerTimeZone"
|
||||
@ -143,6 +149,7 @@
|
||||
Repeat frequency
|
||||
</label>
|
||||
<select name="schedulerFrequency"
|
||||
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
id="schedulerFrequency"
|
||||
class="MakeSelect2"
|
||||
ng-model="schedulerFrequency"
|
||||
@ -156,7 +163,8 @@
|
||||
</div>
|
||||
<div class="form-group SchedulerForm-formGroup" ng-if="cleanupJob && !isFactCleanup">
|
||||
<label class="Form-inputLabel"><span class="red-text">*</span> Days of data to keep</label>
|
||||
<input type="number" sch-spinner="scheduler_form" class="scheduler-time-spinner SchedulerTime-input SpinnerInput RepeatFrequencyOptions-number" name="schedulerPurgeDays" id="schedulerPurgeDays" min="1" aw-spinner="schedulerPurgeDays" ng-model="schedulerPurgeDays" required placeholder="Days of data to keep">
|
||||
<input type="number" sch-spinner="scheduler_form" class="scheduler-time-spinner SchedulerTime-input SpinnerInput RepeatFrequencyOptions-number" name="schedulerPurgeDays" id="schedulerPurgeDays" min="1" aw-spinner="schedulerPurgeDays" ng-model="schedulerPurgeDays" required placeholder="Days of data to keep"
|
||||
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)">
|
||||
<div class="error" ng-show="scheduler_form.schedulerPurgeDays.$dirty && scheduler_form.schedulerPurgeDays.$error.required">A value is required.</div>
|
||||
<div class="error" ng-show="scheduler_form.schedulerPurgeDays.$error.number">This is not a valid number.</div>
|
||||
</div>
|
||||
@ -175,6 +183,7 @@
|
||||
Every
|
||||
</label>
|
||||
<input name="schedulerInterval"
|
||||
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
id="schedulerInterval"
|
||||
sch-spinner="scheduler_form"
|
||||
class="scheduler-spinner
|
||||
@ -211,6 +220,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<input
|
||||
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
name="monthDay"
|
||||
id="monthDay"
|
||||
sch-spinner="scheduler_form"
|
||||
@ -232,6 +242,7 @@
|
||||
<label class="Form-inputLabel">
|
||||
<span class="red-text">*</span>
|
||||
<input type="radio"
|
||||
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
value="other"
|
||||
ng-model="$parent.monthlyRepeatOption"
|
||||
ng-change="monthlyRepeatChange()"
|
||||
@ -246,7 +257,7 @@
|
||||
id="monthlyOccurrence"
|
||||
ng-model="$parent.monthlyOccurrence"
|
||||
ng-options="o.name for o in occurrences"
|
||||
ng-disabled="monthlyRepeatOption != 'other'"
|
||||
ng-disabled="monthlyRepeatOption != 'other' || !(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
class=" MakeSelect2 form-control
|
||||
input-sm
|
||||
RepeatFrequencyOptions-spacedSelect
|
||||
@ -257,7 +268,7 @@
|
||||
id="monthlyWeekDay"
|
||||
ng-model="$parent.monthlyWeekDay"
|
||||
ng-options="w.name for w in weekdays"
|
||||
ng-disabled="monthlyRepeatOption != 'other'"
|
||||
ng-disabled="monthlyRepeatOption != 'other' || !(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
class="MakeSelect2 form-control input-sm" >
|
||||
</select>
|
||||
</div>
|
||||
@ -270,6 +281,7 @@
|
||||
<span class="red-text">*</span>
|
||||
<label class="Form-inputLabel">
|
||||
<input type="radio"
|
||||
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
value="month"
|
||||
ng-model="$parent.yearlyRepeatOption"
|
||||
ng-change="yearlyRepeatChange()"
|
||||
@ -284,12 +296,13 @@
|
||||
id="yearlyMonth"
|
||||
ng-model="$parent.yearlyMonth"
|
||||
ng-options="m.name for m in months"
|
||||
ng-disabled="yearlyRepeatOption != 'month'"
|
||||
ng-disabled="yearlyRepeatOption != 'month' || !(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
class="MakeSelect2 form-control input-sm
|
||||
RepeatFrequencyOptions-spacedSelect"
|
||||
>
|
||||
</select>
|
||||
<input name="yearlyMonthDay"
|
||||
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
id="yearlyMonthDay"
|
||||
sch-spinner="scheduler_form"
|
||||
class="scheduler-spinner
|
||||
@ -313,6 +326,7 @@
|
||||
<label class="Form-inputLabel">
|
||||
<span class="red-text">*</span>
|
||||
<input type="radio"
|
||||
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
value="other"
|
||||
ng-model="$parent.yearlyRepeatOption"
|
||||
ng-change="yearlyRepeatChange()"
|
||||
@ -329,7 +343,7 @@
|
||||
id="yearlyOccurrence"
|
||||
ng-model="$parent.yearlyOccurrence"
|
||||
ng-options="o.name for o in occurrences"
|
||||
ng-disabled="yearlyRepeatOption != 'other'"
|
||||
ng-disabled="yearlyRepeatOption != 'other' || !(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
class="MakeSelect2
|
||||
form-control input-sm
|
||||
RepeatFrequencyOptions-spacedSelect
|
||||
@ -341,7 +355,7 @@
|
||||
id="yearlyWeekDay"
|
||||
ng-model="$parent.yearlyWeekDay"
|
||||
ng-options="w.name for w in weekdays"
|
||||
ng-disabled="yearlyRepeatOption != 'other'"
|
||||
ng-disabled="yearlyRepeatOption != 'other' || !(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
class="MakeSelect2
|
||||
form-control input-sm
|
||||
RepeatFrequencyOptions-spacedSelect
|
||||
@ -352,7 +366,7 @@
|
||||
id="yearlyOtherMonth"
|
||||
ng-model="$parent.yearlyOtherMonth"
|
||||
ng-options="m.name for m in months"
|
||||
ng-disabled="yearlyRepeatOption != 'other'"
|
||||
ng-disabled="yearlyRepeatOption != 'other' || !(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
class="MakeSelect2
|
||||
form-control input-sm
|
||||
RepeatFrequencyOptions-thirdSelect">
|
||||
@ -374,6 +388,7 @@
|
||||
data-toggle="buttons-checkbox"
|
||||
id="weekdaySelect">
|
||||
<button type="button"
|
||||
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
ng-class="weekDaySUClass"
|
||||
class="btn btn-default
|
||||
RepeatFrequencyOptions-weekButton"
|
||||
@ -382,6 +397,7 @@
|
||||
Sun
|
||||
</button>
|
||||
<button type="button"
|
||||
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
ng-class="weekDayMOClass"
|
||||
class="btn btn-default
|
||||
RepeatFrequencyOptions-weekButton"
|
||||
@ -390,6 +406,7 @@
|
||||
Mon
|
||||
</button>
|
||||
<button type="button"
|
||||
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
ng-class="weekDayTUClass"
|
||||
class="btn btn-default
|
||||
RepeatFrequencyOptions-weekButton"
|
||||
@ -398,6 +415,7 @@
|
||||
Tue
|
||||
</button>
|
||||
<button type="button"
|
||||
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
ng-class="weekDayWEClass"
|
||||
class="btn btn-default
|
||||
RepeatFrequencyOptions-weekButton"
|
||||
@ -406,6 +424,7 @@
|
||||
Wed
|
||||
</button>
|
||||
<button type="button"
|
||||
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
ng-class="weekDayTHClass"
|
||||
class="btn btn-default
|
||||
RepeatFrequencyOptions-weekButton"
|
||||
@ -414,6 +433,7 @@
|
||||
Thu
|
||||
</button>
|
||||
<button type="button"
|
||||
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
ng-class="weekDayFRClass"
|
||||
class="btn btn-default
|
||||
RepeatFrequencyOptions-weekButton"
|
||||
@ -422,6 +442,7 @@
|
||||
Fri
|
||||
</button>
|
||||
<button type="button"
|
||||
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
ng-class="weekDaySAClass"
|
||||
class="btn btn-default
|
||||
RepeatFrequencyOptions-weekButton"
|
||||
@ -445,6 +466,7 @@
|
||||
</label>
|
||||
<div>
|
||||
<select id="schedulerEnd"
|
||||
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
name="schedulerEnd"
|
||||
ng-model="$parent.schedulerEnd"
|
||||
ng-options="e.name for e in endOptions"
|
||||
@ -463,6 +485,7 @@
|
||||
Occurrence(s)
|
||||
</label>
|
||||
<input
|
||||
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
ng-name="schedulerOccurrenceCount"
|
||||
ng-id="schedulerOccurrenceCount"
|
||||
sch-spinner="scheduler_form"
|
||||
@ -486,7 +509,8 @@
|
||||
End Date
|
||||
</label>
|
||||
<div class="input-group Form-inputGroup SchedulerForm-inputGroup--date">
|
||||
<scheduler-date-picker date="$parent.schedulerEndDt">
|
||||
<scheduler-date-picker date="$parent.schedulerEndDt"
|
||||
disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)">
|
||||
</scheduler-date-picker>
|
||||
</div>
|
||||
<div class="error"
|
||||
@ -506,8 +530,8 @@
|
||||
<div class="form-group SchedulerForm-formGroup" ng-if="isFactCleanup">
|
||||
<label class="Form-inputLabel RepeatFrequencyOptions-everyLabel"><span class="red-text">*</span> Select a time period after which to remove old facts</label>
|
||||
<div class="RepeatFrequencyOptions-inputGroup RepeatFrequencyOptions-inputGroup--halvesWithSelect">
|
||||
<input type="number" id="keep_amount" name="keep_amount" ng-model="keep_amount" aw-spinner="keep_amount" ng-required="true" sch-spinner="scheduler_form" class="scheduler-time-spinner SchedulerTime-input SpinnerInput RepeatFrequencyOptions-number" aw-min=0 aw-max=9999 integer></input>
|
||||
<select id="keep_unit" name="keep_unit" ng-model="keep_unit" ng-options="type.label for type in keep_unit_choices track by type.value" ng-required="true" class="form-control input-sm MakeSelect2"></select>
|
||||
<input type="number" id="keep_amount" name="keep_amount" ng-model="keep_amount" aw-spinner="keep_amount" ng-required="true" sch-spinner="scheduler_form" class="scheduler-time-spinner SchedulerTime-input SpinnerInput RepeatFrequencyOptions-number" aw-min=0 aw-max=9999 integer ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"></input>
|
||||
<select id="keep_unit" name="keep_unit" ng-model="keep_unit" ng-options="type.label for type in keep_unit_choices track by type.value" ng-required="true" class="form-control input-sm MakeSelect2" ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"></select>
|
||||
</div>
|
||||
|
||||
<!-- The below errors are ONLY for id="keep_amount", not for id="keep_unit" -->
|
||||
@ -523,8 +547,8 @@
|
||||
<label class="Form-inputLabel RepeatFrequencyOptions-everyLabel"><span class="red-text">*</span> Select a frequency for snapshot retention</label>
|
||||
<div class="RepeatFrequencyOptions-inputGroup RepeatFrequencyOptions-inputGroup--halvesWithSelect">
|
||||
<input type="number" sch-spinner="scheduler_form" class="scheduler-time-spinner SchedulerTime-input SpinnerInput RepeatFrequencyOptions-number" id="granularity_keep_amount" name="granularity_keep_amount" ng-model="granularity_keep_amount" aw-spinner="granularity_keep_amount"
|
||||
ng-required="true" aw-min=0 aw-max=9999 >
|
||||
<select id="granularity_keep_unit" name="granularity_keep_unit" ng-model="granularity_keep_unit" ng-options="type.label for type in granularity_keep_unit_choices track by type.value" ng-required="true" class="form-control input-sm MakeSelect2"></select>
|
||||
ng-required="true" aw-min=0 aw-max=9999 ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)">
|
||||
<select id="granularity_keep_unit" name="granularity_keep_unit" ng-model="granularity_keep_unit" ng-options="type.label for type in granularity_keep_unit_choices track by type.value" ng-required="true" class="form-control input-sm MakeSelect2" ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"></select>
|
||||
</div>
|
||||
|
||||
<!-- The below errors are ONLY for id="granularity_keep_amount", not for id="granularity_keep_unit" -->
|
||||
@ -607,11 +631,18 @@
|
||||
<button type="button"
|
||||
class="btn btn-sm Form-cancelButton"
|
||||
id="project_cancel_btn"
|
||||
ng-show="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
ng-click="formCancel()">Close</button>
|
||||
<button type="button"
|
||||
class="btn btn-sm Form-cancelButton"
|
||||
id="project_cancel_btn"
|
||||
ng-show="(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
ng-click="formCancel()">Cancel</button>
|
||||
<button type="button"
|
||||
class="btn btn-sm Form-saveButton"
|
||||
id="project_save_btn"
|
||||
ng-click="saveSchedule()"
|
||||
ng-show="(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
ng-disabled="!schedulerIsValid"> Save</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -88,6 +88,11 @@
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.RepeatFrequencyOptions-weekButton.active {
|
||||
background-color: @default-list-header-bg !important;
|
||||
border-color: @d7grey !important;
|
||||
}
|
||||
|
||||
.RepeatFrequencyOptions-everyGroup {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
</label>
|
||||
<div class="input-group Form-inputGroup SchedulerForm-inputGroup--date">
|
||||
<scheduler-date-picker date="schedulerStartDt"
|
||||
disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)">
|
||||
disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)">
|
||||
</scheduler-date-picker>
|
||||
</div>
|
||||
<div class="error"
|
||||
@ -370,6 +370,7 @@
|
||||
data-toggle="buttons-checkbox"
|
||||
id="weekdaySelect">
|
||||
<button type="button"
|
||||
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
ng-class="weekDaySUClass"
|
||||
class="btn btn-default
|
||||
RepeatFrequencyOptions-weekButton"
|
||||
@ -378,6 +379,7 @@
|
||||
Sun
|
||||
</button>
|
||||
<button type="button"
|
||||
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
ng-class="weekDayMOClass"
|
||||
class="btn btn-default
|
||||
RepeatFrequencyOptions-weekButton"
|
||||
@ -386,6 +388,7 @@
|
||||
Mon
|
||||
</button>
|
||||
<button type="button"
|
||||
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
ng-class="weekDayTUClass"
|
||||
class="btn btn-default
|
||||
RepeatFrequencyOptions-weekButton"
|
||||
@ -394,6 +397,7 @@
|
||||
Tue
|
||||
</button>
|
||||
<button type="button"
|
||||
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
ng-class="weekDayWEClass"
|
||||
class="btn btn-default
|
||||
RepeatFrequencyOptions-weekButton"
|
||||
@ -402,6 +406,7 @@
|
||||
Wed
|
||||
</button>
|
||||
<button type="button"
|
||||
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
ng-class="weekDayTHClass"
|
||||
class="btn btn-default
|
||||
RepeatFrequencyOptions-weekButton"
|
||||
@ -410,6 +415,7 @@
|
||||
Thu
|
||||
</button>
|
||||
<button type="button"
|
||||
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
ng-class="weekDayFRClass"
|
||||
class="btn btn-default
|
||||
RepeatFrequencyOptions-weekButton"
|
||||
@ -418,6 +424,7 @@
|
||||
Fri
|
||||
</button>
|
||||
<button type="button"
|
||||
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||
ng-class="weekDaySAClass"
|
||||
class="btn btn-default
|
||||
RepeatFrequencyOptions-weekButton"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user