mirror of
https://github.com/ansible/awx.git
synced 2026-02-28 16:28:43 -03:30
Merge pull request #5052 from jlmitch5/disableScheduleToggle
RBAC Hide the things for schedules
This commit is contained in:
@@ -2239,3 +2239,22 @@ button[disabled],
|
|||||||
html input[disabled] {
|
html input[disabled] {
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.CodeMirror--disabled .CodeMirror.cm-s-default,
|
||||||
|
.CodeMirror--disabled .CodeMirror-line {
|
||||||
|
background-color: #f6f6f6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.CodeMirror--disabled .CodeMirror-gutter.CodeMirror-lint-markers,
|
||||||
|
.CodeMirror--disabled .CodeMirror-gutter.CodeMirror-linenumbers {
|
||||||
|
background-color: #ebebeb;
|
||||||
|
color: @b7grey;
|
||||||
|
}
|
||||||
|
|
||||||
|
.CodeMirror--disabled .CodeMirror-lines {
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
.CodeMirror--disabled .CodeMirror-cursors {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ export default
|
|||||||
awToolTip: "{{ group.group_schedule_tooltip }}",
|
awToolTip: "{{ group.group_schedule_tooltip }}",
|
||||||
ngClass: "group.scm_type_class",
|
ngClass: "group.scm_type_class",
|
||||||
dataPlacement: 'top',
|
dataPlacement: 'top',
|
||||||
ngShow: "!(group.summary_fields.inventory_source.source === '') && group.summary_fields.user_capabilities.schedule"
|
ngShow: "!(group.summary_fields.inventory_source.source === '')"
|
||||||
},
|
},
|
||||||
edit: {
|
edit: {
|
||||||
//label: 'Edit',
|
//label: 'Edit',
|
||||||
|
|||||||
@@ -97,7 +97,6 @@ export default
|
|||||||
awToolTip: "{{ project.scm_schedule_tooltip }}",
|
awToolTip: "{{ project.scm_schedule_tooltip }}",
|
||||||
ngClass: "project.scm_type_class",
|
ngClass: "project.scm_type_class",
|
||||||
dataPlacement: 'top',
|
dataPlacement: 'top',
|
||||||
ngShow: "project.summary_fields.user_capabilities.schedule"
|
|
||||||
},
|
},
|
||||||
edit: {
|
edit: {
|
||||||
ngClick: "editProject(project.id)",
|
ngClick: "editProject(project.id)",
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ export default
|
|||||||
ngClick: "toggleSchedule($event, schedule.id)",
|
ngClick: "toggleSchedule($event, schedule.id)",
|
||||||
nosort: true,
|
nosort: true,
|
||||||
awToolTip: "{{ schedule.play_tip }}",
|
awToolTip: "{{ schedule.play_tip }}",
|
||||||
|
ngDisabled: "!schedule.summary_fields.user_capabilities.edit",
|
||||||
dataTipWatch: "schedule.play_tip",
|
dataTipWatch: "schedule.play_tip",
|
||||||
dataPlacement: 'top'
|
dataPlacement: 'top'
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ export default
|
|||||||
|
|
||||||
fields: {
|
fields: {
|
||||||
toggleSchedule: {
|
toggleSchedule: {
|
||||||
|
ngDisabled: "!schedule.summary_fields.user_capabilities.edit",
|
||||||
label: '',
|
label: '',
|
||||||
columnClass: 'List-staticColumn--toggle',
|
columnClass: 'List-staticColumn--toggle',
|
||||||
type: "toggle",
|
type: "toggle",
|
||||||
|
|||||||
@@ -94,7 +94,6 @@ export default
|
|||||||
ngClick: 'scheduleJob(template)',
|
ngClick: 'scheduleJob(template)',
|
||||||
awToolTip: i18n._('Schedule future job template runs'),
|
awToolTip: i18n._('Schedule future job template runs'),
|
||||||
dataPlacement: 'top',
|
dataPlacement: 'top',
|
||||||
ngShow: 'template.summary_fields.user_capabilities.schedule'
|
|
||||||
},
|
},
|
||||||
copy: {
|
copy: {
|
||||||
label: i18n._('Copy'),
|
label: i18n._('Copy'),
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
<span translate>Name</span>
|
<span translate>Name</span>
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
type="text"
|
type="text"
|
||||||
class="form-control input-sm
|
class="form-control input-sm
|
||||||
Form-textInput"
|
Form-textInput"
|
||||||
@@ -40,7 +41,8 @@
|
|||||||
<span translate>Start Date</span>
|
<span translate>Start Date</span>
|
||||||
</label>
|
</label>
|
||||||
<div class="input-group Form-inputGroup SchedulerForm-inputGroup--date">
|
<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>
|
</scheduler-date-picker>
|
||||||
</div>
|
</div>
|
||||||
<div class="error"
|
<div class="error"
|
||||||
@@ -63,6 +65,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<div class="input-group SchedulerTime">
|
<div class="input-group SchedulerTime">
|
||||||
<input name="schedulerStartHour"
|
<input name="schedulerStartHour"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
id="schedulerStartHour"
|
id="schedulerStartHour"
|
||||||
sch-spinner="scheduler_form"
|
sch-spinner="scheduler_form"
|
||||||
class="scheduler-time-spinner
|
class="scheduler-time-spinner
|
||||||
@@ -78,6 +81,7 @@
|
|||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
<input name="schedulerStartMinute"
|
<input name="schedulerStartMinute"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
id="schedulerStartMinute"
|
id="schedulerStartMinute"
|
||||||
sch-spinner="scheduler_form"
|
sch-spinner="scheduler_form"
|
||||||
class="scheduler-time-spinner
|
class="scheduler-time-spinner
|
||||||
@@ -93,6 +97,7 @@
|
|||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
<input name="schedulerStartSecond"
|
<input name="schedulerStartSecond"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
id="schedulerStartSecond"
|
id="schedulerStartSecond"
|
||||||
sch-spinner="scheduler_form"
|
sch-spinner="scheduler_form"
|
||||||
class="scheduler-time-spinner
|
class="scheduler-time-spinner
|
||||||
@@ -128,6 +133,7 @@
|
|||||||
<span translate>Local Time Zone</span>
|
<span translate>Local Time Zone</span>
|
||||||
</label>
|
</label>
|
||||||
<select
|
<select
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
class="MakeSelect2"
|
class="MakeSelect2"
|
||||||
name="schedulerTimeZone"
|
name="schedulerTimeZone"
|
||||||
id="schedulerTimeZone"
|
id="schedulerTimeZone"
|
||||||
@@ -143,6 +149,7 @@
|
|||||||
<span translate>Repeat frequency</span>
|
<span translate>Repeat frequency</span>
|
||||||
</label>
|
</label>
|
||||||
<select name="schedulerFrequency"
|
<select name="schedulerFrequency"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
id="schedulerFrequency"
|
id="schedulerFrequency"
|
||||||
class="MakeSelect2"
|
class="MakeSelect2"
|
||||||
ng-model="schedulerFrequency"
|
ng-model="schedulerFrequency"
|
||||||
@@ -156,7 +163,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group SchedulerForm-formGroup" ng-if="cleanupJob && !isFactCleanup">
|
<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>
|
<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" translate>A value is required.</div>
|
<div class="error" ng-show="scheduler_form.schedulerPurgeDays.$dirty && scheduler_form.schedulerPurgeDays.$error.required" translate>A value is required.</div>
|
||||||
<div class="error" ng-show="scheduler_form.schedulerPurgeDays.$error.number" translate>This is not a valid number.</div>
|
<div class="error" ng-show="scheduler_form.schedulerPurgeDays.$error.number" translate>This is not a valid number.</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -175,6 +182,7 @@
|
|||||||
Every
|
Every
|
||||||
</label>
|
</label>
|
||||||
<input name="schedulerInterval"
|
<input name="schedulerInterval"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
id="schedulerInterval"
|
id="schedulerInterval"
|
||||||
sch-spinner="scheduler_form"
|
sch-spinner="scheduler_form"
|
||||||
class="scheduler-spinner
|
class="scheduler-spinner
|
||||||
@@ -211,6 +219,7 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<input
|
<input
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
name="monthDay"
|
name="monthDay"
|
||||||
id="monthDay"
|
id="monthDay"
|
||||||
sch-spinner="scheduler_form"
|
sch-spinner="scheduler_form"
|
||||||
@@ -232,6 +241,7 @@
|
|||||||
<label class="Form-inputLabel">
|
<label class="Form-inputLabel">
|
||||||
<span class="red-text">*</span>
|
<span class="red-text">*</span>
|
||||||
<input type="radio"
|
<input type="radio"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
value="other"
|
value="other"
|
||||||
ng-model="$parent.monthlyRepeatOption"
|
ng-model="$parent.monthlyRepeatOption"
|
||||||
ng-change="monthlyRepeatChange()"
|
ng-change="monthlyRepeatChange()"
|
||||||
@@ -246,7 +256,7 @@
|
|||||||
id="monthlyOccurrence"
|
id="monthlyOccurrence"
|
||||||
ng-model="$parent.monthlyOccurrence"
|
ng-model="$parent.monthlyOccurrence"
|
||||||
ng-options="o.name for o in occurrences"
|
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
|
class=" MakeSelect2 form-control
|
||||||
input-sm
|
input-sm
|
||||||
RepeatFrequencyOptions-spacedSelect
|
RepeatFrequencyOptions-spacedSelect
|
||||||
@@ -257,7 +267,7 @@
|
|||||||
id="monthlyWeekDay"
|
id="monthlyWeekDay"
|
||||||
ng-model="$parent.monthlyWeekDay"
|
ng-model="$parent.monthlyWeekDay"
|
||||||
ng-options="w.name for w in weekdays"
|
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" >
|
class="MakeSelect2 form-control input-sm" >
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@@ -270,6 +280,7 @@
|
|||||||
<span class="red-text">*</span>
|
<span class="red-text">*</span>
|
||||||
<label class="Form-inputLabel">
|
<label class="Form-inputLabel">
|
||||||
<input type="radio"
|
<input type="radio"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
value="month"
|
value="month"
|
||||||
ng-model="$parent.yearlyRepeatOption"
|
ng-model="$parent.yearlyRepeatOption"
|
||||||
ng-change="yearlyRepeatChange()"
|
ng-change="yearlyRepeatChange()"
|
||||||
@@ -284,12 +295,13 @@
|
|||||||
id="yearlyMonth"
|
id="yearlyMonth"
|
||||||
ng-model="$parent.yearlyMonth"
|
ng-model="$parent.yearlyMonth"
|
||||||
ng-options="m.name for m in months"
|
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
|
class="MakeSelect2 form-control input-sm
|
||||||
RepeatFrequencyOptions-spacedSelect"
|
RepeatFrequencyOptions-spacedSelect"
|
||||||
>
|
>
|
||||||
</select>
|
</select>
|
||||||
<input name="yearlyMonthDay"
|
<input name="yearlyMonthDay"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
id="yearlyMonthDay"
|
id="yearlyMonthDay"
|
||||||
sch-spinner="scheduler_form"
|
sch-spinner="scheduler_form"
|
||||||
class="scheduler-spinner
|
class="scheduler-spinner
|
||||||
@@ -313,6 +325,7 @@
|
|||||||
<label class="Form-inputLabel">
|
<label class="Form-inputLabel">
|
||||||
<span class="red-text">*</span>
|
<span class="red-text">*</span>
|
||||||
<input type="radio"
|
<input type="radio"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
value="other"
|
value="other"
|
||||||
ng-model="$parent.yearlyRepeatOption"
|
ng-model="$parent.yearlyRepeatOption"
|
||||||
ng-change="yearlyRepeatChange()"
|
ng-change="yearlyRepeatChange()"
|
||||||
@@ -329,7 +342,7 @@
|
|||||||
id="yearlyOccurrence"
|
id="yearlyOccurrence"
|
||||||
ng-model="$parent.yearlyOccurrence"
|
ng-model="$parent.yearlyOccurrence"
|
||||||
ng-options="o.name for o in occurrences"
|
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
|
class="MakeSelect2
|
||||||
form-control input-sm
|
form-control input-sm
|
||||||
RepeatFrequencyOptions-spacedSelect
|
RepeatFrequencyOptions-spacedSelect
|
||||||
@@ -341,7 +354,7 @@
|
|||||||
id="yearlyWeekDay"
|
id="yearlyWeekDay"
|
||||||
ng-model="$parent.yearlyWeekDay"
|
ng-model="$parent.yearlyWeekDay"
|
||||||
ng-options="w.name for w in weekdays"
|
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
|
class="MakeSelect2
|
||||||
form-control input-sm
|
form-control input-sm
|
||||||
RepeatFrequencyOptions-spacedSelect
|
RepeatFrequencyOptions-spacedSelect
|
||||||
@@ -352,7 +365,7 @@
|
|||||||
id="yearlyOtherMonth"
|
id="yearlyOtherMonth"
|
||||||
ng-model="$parent.yearlyOtherMonth"
|
ng-model="$parent.yearlyOtherMonth"
|
||||||
ng-options="m.name for m in months"
|
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
|
class="MakeSelect2
|
||||||
form-control input-sm
|
form-control input-sm
|
||||||
RepeatFrequencyOptions-thirdSelect">
|
RepeatFrequencyOptions-thirdSelect">
|
||||||
@@ -374,6 +387,7 @@
|
|||||||
data-toggle="buttons-checkbox"
|
data-toggle="buttons-checkbox"
|
||||||
id="weekdaySelect">
|
id="weekdaySelect">
|
||||||
<button type="button"
|
<button type="button"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
ng-class="weekDaySUClass"
|
ng-class="weekDaySUClass"
|
||||||
class="btn btn-default
|
class="btn btn-default
|
||||||
RepeatFrequencyOptions-weekButton"
|
RepeatFrequencyOptions-weekButton"
|
||||||
@@ -382,6 +396,7 @@
|
|||||||
Sun
|
Sun
|
||||||
</button>
|
</button>
|
||||||
<button type="button"
|
<button type="button"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
ng-class="weekDayMOClass"
|
ng-class="weekDayMOClass"
|
||||||
class="btn btn-default
|
class="btn btn-default
|
||||||
RepeatFrequencyOptions-weekButton"
|
RepeatFrequencyOptions-weekButton"
|
||||||
@@ -390,6 +405,7 @@
|
|||||||
Mon
|
Mon
|
||||||
</button>
|
</button>
|
||||||
<button type="button"
|
<button type="button"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
ng-class="weekDayTUClass"
|
ng-class="weekDayTUClass"
|
||||||
class="btn btn-default
|
class="btn btn-default
|
||||||
RepeatFrequencyOptions-weekButton"
|
RepeatFrequencyOptions-weekButton"
|
||||||
@@ -398,6 +414,7 @@
|
|||||||
Tue
|
Tue
|
||||||
</button>
|
</button>
|
||||||
<button type="button"
|
<button type="button"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
ng-class="weekDayWEClass"
|
ng-class="weekDayWEClass"
|
||||||
class="btn btn-default
|
class="btn btn-default
|
||||||
RepeatFrequencyOptions-weekButton"
|
RepeatFrequencyOptions-weekButton"
|
||||||
@@ -406,6 +423,7 @@
|
|||||||
Wed
|
Wed
|
||||||
</button>
|
</button>
|
||||||
<button type="button"
|
<button type="button"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
ng-class="weekDayTHClass"
|
ng-class="weekDayTHClass"
|
||||||
class="btn btn-default
|
class="btn btn-default
|
||||||
RepeatFrequencyOptions-weekButton"
|
RepeatFrequencyOptions-weekButton"
|
||||||
@@ -414,6 +432,7 @@
|
|||||||
Thu
|
Thu
|
||||||
</button>
|
</button>
|
||||||
<button type="button"
|
<button type="button"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
ng-class="weekDayFRClass"
|
ng-class="weekDayFRClass"
|
||||||
class="btn btn-default
|
class="btn btn-default
|
||||||
RepeatFrequencyOptions-weekButton"
|
RepeatFrequencyOptions-weekButton"
|
||||||
@@ -422,6 +441,7 @@
|
|||||||
Fri
|
Fri
|
||||||
</button>
|
</button>
|
||||||
<button type="button"
|
<button type="button"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
ng-class="weekDaySAClass"
|
ng-class="weekDaySAClass"
|
||||||
class="btn btn-default
|
class="btn btn-default
|
||||||
RepeatFrequencyOptions-weekButton"
|
RepeatFrequencyOptions-weekButton"
|
||||||
@@ -445,6 +465,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<div>
|
<div>
|
||||||
<select id="schedulerEnd"
|
<select id="schedulerEnd"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
name="schedulerEnd"
|
name="schedulerEnd"
|
||||||
ng-model="$parent.schedulerEnd"
|
ng-model="$parent.schedulerEnd"
|
||||||
ng-options="e.name for e in endOptions"
|
ng-options="e.name for e in endOptions"
|
||||||
@@ -463,6 +484,7 @@
|
|||||||
Occurrence(s)
|
Occurrence(s)
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
ng-name="schedulerOccurrenceCount"
|
ng-name="schedulerOccurrenceCount"
|
||||||
ng-id="schedulerOccurrenceCount"
|
ng-id="schedulerOccurrenceCount"
|
||||||
sch-spinner="scheduler_form"
|
sch-spinner="scheduler_form"
|
||||||
@@ -486,7 +508,8 @@
|
|||||||
End Date
|
End Date
|
||||||
</label>
|
</label>
|
||||||
<div class="input-group Form-inputGroup SchedulerForm-inputGroup--date">
|
<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>
|
</scheduler-date-picker>
|
||||||
</div>
|
</div>
|
||||||
<div class="error"
|
<div class="error"
|
||||||
@@ -506,8 +529,8 @@
|
|||||||
<div class="form-group SchedulerForm-formGroup" ng-if="isFactCleanup">
|
<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>
|
<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">
|
<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>
|
<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"></select>
|
<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>
|
</div>
|
||||||
|
|
||||||
<!-- The below errors are ONLY for id="keep_amount", not for id="keep_unit" -->
|
<!-- The below errors are ONLY for id="keep_amount", not for id="keep_unit" -->
|
||||||
@@ -523,8 +546,8 @@
|
|||||||
<label class="Form-inputLabel RepeatFrequencyOptions-everyLabel"><span class="red-text">*</span> Select a frequency for snapshot retention</label>
|
<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">
|
<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"
|
<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 >
|
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"></select>
|
<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>
|
</div>
|
||||||
|
|
||||||
<!-- The below errors are ONLY for id="granularity_keep_amount", not for id="granularity_keep_unit" -->
|
<!-- The below errors are ONLY for id="granularity_keep_amount", not for id="granularity_keep_unit" -->
|
||||||
@@ -607,11 +630,18 @@
|
|||||||
<button type="button"
|
<button type="button"
|
||||||
class="btn btn-sm Form-cancelButton"
|
class="btn btn-sm Form-cancelButton"
|
||||||
id="project_cancel_btn"
|
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>
|
ng-click="formCancel()">Cancel</button>
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="btn btn-sm Form-saveButton"
|
class="btn btn-sm Form-saveButton"
|
||||||
id="project_save_btn"
|
id="project_save_btn"
|
||||||
ng-click="saveSchedule()"
|
ng-click="saveSchedule()"
|
||||||
|
ng-show="(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
ng-disabled="!schedulerIsValid"> Save</button>
|
ng-disabled="!schedulerIsValid"> Save</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -88,6 +88,11 @@
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.RepeatFrequencyOptions-weekButton.active {
|
||||||
|
background-color: @default-list-header-bg !important;
|
||||||
|
border-color: @d7grey !important;
|
||||||
|
}
|
||||||
|
|
||||||
.RepeatFrequencyOptions-everyGroup {
|
.RepeatFrequencyOptions-everyGroup {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|||||||
@@ -6,9 +6,11 @@
|
|||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
border: 1px solid @default-icon;
|
border: 1px solid @default-icon;
|
||||||
background-color: @default-icon;
|
background-color: @default-icon;
|
||||||
width: 40px;
|
width: 42px;
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
display: flex;
|
||||||
|
height: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ScheduleToggle-switch {
|
.ScheduleToggle-switch {
|
||||||
@@ -22,6 +24,10 @@
|
|||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
border-top-right-radius: 4px;
|
border-top-right-radius: 4px;
|
||||||
border-bottom-right-radius: 4px;
|
border-bottom-right-radius: 4px;
|
||||||
|
padding-top: 0px;
|
||||||
|
margin-top: 0px;
|
||||||
|
border-top: 0px;
|
||||||
|
border-bottom: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ScheduleToggle.is-on {
|
.ScheduleToggle.is-on {
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ export default
|
|||||||
date: '=',
|
date: '=',
|
||||||
minDate: '=',
|
minDate: '=',
|
||||||
autoUpdate: '=?',
|
autoUpdate: '=?',
|
||||||
inputClass: '&'
|
inputClass: '&',
|
||||||
|
disabled: '=?'
|
||||||
},
|
},
|
||||||
templateUrl: templateUrl('system-tracking/date-picker/date-picker'),
|
templateUrl: templateUrl('system-tracking/date-picker/date-picker'),
|
||||||
link: function(scope, element, attrs) {
|
link: function(scope, element, attrs) {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<div class="DatePicker">
|
<div class="DatePicker">
|
||||||
<button class="DatePicker-icon"><i class="fa fa-calendar"></i></button>
|
<button class="DatePicker-icon" ng-disabled="disabled"><i class="fa fa-calendar"></i></button>
|
||||||
<input
|
<input
|
||||||
|
ng-disabled="disabled"
|
||||||
class="DatePicker-input"
|
class="DatePicker-input"
|
||||||
type="text"
|
type="text"
|
||||||
readonly
|
readonly
|
||||||
|
|||||||
@@ -69,11 +69,14 @@ function($filter, $compile, $state, $stateParams, EditSchedule, Wait, $scope, $r
|
|||||||
// extra_data field is not manifested in the UI when scheduling a Management Job
|
// extra_data field is not manifested in the UI when scheduling a Management Job
|
||||||
if ($state.current.name !== 'managementJobSchedules.add' && $state.current.name !== 'managementJobSchedules.edit'){
|
if ($state.current.name !== 'managementJobSchedules.add' && $state.current.name !== 'managementJobSchedules.edit'){
|
||||||
$scope.$on('ScheduleFound', function(){
|
$scope.$on('ScheduleFound', function(){
|
||||||
|
let readOnly = !$scope.schedule_obj.summary_fields.user_capabilities
|
||||||
|
.edit;
|
||||||
ParseTypeChange({
|
ParseTypeChange({
|
||||||
scope: $scope,
|
scope: $scope,
|
||||||
variable: 'extraVars',
|
variable: 'extraVars',
|
||||||
parse_variable: 'parseType',
|
parse_variable: 'parseType',
|
||||||
field_id: 'SchedulerForm-extraVars'
|
field_id: 'SchedulerForm-extraVars',
|
||||||
|
readOnly: readOnly
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
name="schedulerName"
|
name="schedulerName"
|
||||||
id="schedulerName"
|
id="schedulerName"
|
||||||
ng-model="schedulerName" required
|
ng-model="schedulerName" required
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
placeholder="Schedule name">
|
placeholder="Schedule name">
|
||||||
<div class="error"
|
<div class="error"
|
||||||
ng-show="scheduler_form.$dirty && scheduler_form.schedulerName.$error.required">
|
ng-show="scheduler_form.$dirty && scheduler_form.schedulerName.$error.required">
|
||||||
@@ -40,7 +41,8 @@
|
|||||||
Start Date
|
Start Date
|
||||||
</label>
|
</label>
|
||||||
<div class="input-group Form-inputGroup SchedulerForm-inputGroup--date">
|
<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>
|
</scheduler-date-picker>
|
||||||
</div>
|
</div>
|
||||||
<div class="error"
|
<div class="error"
|
||||||
@@ -65,6 +67,7 @@
|
|||||||
<input name="schedulerStartHour"
|
<input name="schedulerStartHour"
|
||||||
id="schedulerStartHour"
|
id="schedulerStartHour"
|
||||||
sch-spinner="scheduler_form"
|
sch-spinner="scheduler_form"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
class="scheduler-time-spinner
|
class="scheduler-time-spinner
|
||||||
ScheduleTime-input SpinnerInput"
|
ScheduleTime-input SpinnerInput"
|
||||||
aw-spinner="schedulerStartHour"
|
aw-spinner="schedulerStartHour"
|
||||||
@@ -80,6 +83,7 @@
|
|||||||
<input name="schedulerStartMinute"
|
<input name="schedulerStartMinute"
|
||||||
id="schedulerStartMinute"
|
id="schedulerStartMinute"
|
||||||
sch-spinner="scheduler_form"
|
sch-spinner="scheduler_form"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
class="scheduler-time-spinner
|
class="scheduler-time-spinner
|
||||||
SchedulerTime-input SpinnerInput"
|
SchedulerTime-input SpinnerInput"
|
||||||
aw-spinner="schedulerStartMinute"
|
aw-spinner="schedulerStartMinute"
|
||||||
@@ -95,6 +99,7 @@
|
|||||||
<input name="schedulerStartSecond"
|
<input name="schedulerStartSecond"
|
||||||
id="schedulerStartSecond"
|
id="schedulerStartSecond"
|
||||||
sch-spinner="scheduler_form"
|
sch-spinner="scheduler_form"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
class="scheduler-time-spinner
|
class="scheduler-time-spinner
|
||||||
SchedulerTime-input SpinnerInput"
|
SchedulerTime-input SpinnerInput"
|
||||||
aw-spinner="schedulerStartSecond"
|
aw-spinner="schedulerStartSecond"
|
||||||
@@ -116,6 +121,7 @@
|
|||||||
Local Time Zone
|
Local Time Zone
|
||||||
</label>
|
</label>
|
||||||
<select
|
<select
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
class="MakeSelect2"
|
class="MakeSelect2"
|
||||||
name="schedulerTimeZone"
|
name="schedulerTimeZone"
|
||||||
id="schedulerTimeZone"
|
id="schedulerTimeZone"
|
||||||
@@ -131,6 +137,7 @@
|
|||||||
Repeat frequency
|
Repeat frequency
|
||||||
</label>
|
</label>
|
||||||
<select name="schedulerFrequency"
|
<select name="schedulerFrequency"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
id="schedulerFrequency"
|
id="schedulerFrequency"
|
||||||
class="MakeSelect2"
|
class="MakeSelect2"
|
||||||
ng-model="schedulerFrequency"
|
ng-model="schedulerFrequency"
|
||||||
@@ -159,6 +166,7 @@
|
|||||||
<input name="schedulerInterval"
|
<input name="schedulerInterval"
|
||||||
id="schedulerInterval"
|
id="schedulerInterval"
|
||||||
sch-spinner="scheduler_form"
|
sch-spinner="scheduler_form"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
class="scheduler-spinner
|
class="scheduler-spinner
|
||||||
SpinnerInput"
|
SpinnerInput"
|
||||||
aw-spinner="schedulerInterval"
|
aw-spinner="schedulerInterval"
|
||||||
@@ -185,6 +193,7 @@
|
|||||||
<label class="Form-inputLabel">
|
<label class="Form-inputLabel">
|
||||||
<span class="red-text">*</span>
|
<span class="red-text">*</span>
|
||||||
<input type="radio" value="day"
|
<input type="radio" value="day"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
ng-model="$parent.monthlyRepeatOption"
|
ng-model="$parent.monthlyRepeatOption"
|
||||||
ng-change="monthlyRepeatChange()"
|
ng-change="monthlyRepeatChange()"
|
||||||
name="monthlyRepeatOption"
|
name="monthlyRepeatOption"
|
||||||
@@ -196,6 +205,7 @@
|
|||||||
name="monthDay"
|
name="monthDay"
|
||||||
id="monthDay"
|
id="monthDay"
|
||||||
sch-spinner="scheduler_form"
|
sch-spinner="scheduler_form"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
class="scheduler-spinner SpinnerInput"
|
class="scheduler-spinner SpinnerInput"
|
||||||
aw-spinner="$parent.monthDay"
|
aw-spinner="$parent.monthDay"
|
||||||
ng-model="$parent.monthDay"
|
ng-model="$parent.monthDay"
|
||||||
@@ -214,6 +224,7 @@
|
|||||||
<label class="Form-inputLabel">
|
<label class="Form-inputLabel">
|
||||||
<span class="red-text">*</span>
|
<span class="red-text">*</span>
|
||||||
<input type="radio"
|
<input type="radio"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
value="other"
|
value="other"
|
||||||
ng-model="$parent.monthlyRepeatOption"
|
ng-model="$parent.monthlyRepeatOption"
|
||||||
ng-change="monthlyRepeatChange()"
|
ng-change="monthlyRepeatChange()"
|
||||||
@@ -228,7 +239,7 @@
|
|||||||
id="monthlyOccurrence"
|
id="monthlyOccurrence"
|
||||||
ng-model="$parent.monthlyOccurrence"
|
ng-model="$parent.monthlyOccurrence"
|
||||||
ng-options="o.name for o in occurrences"
|
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
|
class=" MakeSelect2 form-control
|
||||||
input-sm
|
input-sm
|
||||||
RepeatFrequencyOptions-spacedSelect
|
RepeatFrequencyOptions-spacedSelect
|
||||||
@@ -239,7 +250,7 @@
|
|||||||
id="monthlyWeekDay"
|
id="monthlyWeekDay"
|
||||||
ng-model="$parent.monthlyWeekDay"
|
ng-model="$parent.monthlyWeekDay"
|
||||||
ng-options="w.name for w in weekdays"
|
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" >
|
class="MakeSelect2 form-control input-sm" >
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@@ -252,6 +263,7 @@
|
|||||||
<span class="red-text">*</span>
|
<span class="red-text">*</span>
|
||||||
<label class="Form-inputLabel">
|
<label class="Form-inputLabel">
|
||||||
<input type="radio"
|
<input type="radio"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
value="month"
|
value="month"
|
||||||
ng-model="$parent.yearlyRepeatOption"
|
ng-model="$parent.yearlyRepeatOption"
|
||||||
ng-change="yearlyRepeatChange()"
|
ng-change="yearlyRepeatChange()"
|
||||||
@@ -266,7 +278,7 @@
|
|||||||
id="yearlyMonth"
|
id="yearlyMonth"
|
||||||
ng-model="$parent.yearlyMonth"
|
ng-model="$parent.yearlyMonth"
|
||||||
ng-options="m.name for m in months"
|
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
|
class="MakeSelect2 form-control input-sm
|
||||||
RepeatFrequencyOptions-spacedSelect"
|
RepeatFrequencyOptions-spacedSelect"
|
||||||
>
|
>
|
||||||
@@ -274,6 +286,7 @@
|
|||||||
<input name="yearlyMonthDay"
|
<input name="yearlyMonthDay"
|
||||||
id="yearlyMonthDay"
|
id="yearlyMonthDay"
|
||||||
sch-spinner="scheduler_form"
|
sch-spinner="scheduler_form"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
class="scheduler-spinner
|
class="scheduler-spinner
|
||||||
SpinnerInput"
|
SpinnerInput"
|
||||||
aw-spinner="$parent.yearlyMonthDay"
|
aw-spinner="$parent.yearlyMonthDay"
|
||||||
@@ -295,6 +308,7 @@
|
|||||||
<label class="Form-inputLabel">
|
<label class="Form-inputLabel">
|
||||||
<span class="red-text">*</span>
|
<span class="red-text">*</span>
|
||||||
<input type="radio"
|
<input type="radio"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
value="other"
|
value="other"
|
||||||
ng-model="$parent.yearlyRepeatOption"
|
ng-model="$parent.yearlyRepeatOption"
|
||||||
ng-change="yearlyRepeatChange()"
|
ng-change="yearlyRepeatChange()"
|
||||||
@@ -311,7 +325,7 @@
|
|||||||
id="yearlyOccurrence"
|
id="yearlyOccurrence"
|
||||||
ng-model="$parent.yearlyOccurrence"
|
ng-model="$parent.yearlyOccurrence"
|
||||||
ng-options="o.name for o in occurrences"
|
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
|
class="MakeSelect2
|
||||||
form-control input-sm
|
form-control input-sm
|
||||||
RepeatFrequencyOptions-spacedSelect
|
RepeatFrequencyOptions-spacedSelect
|
||||||
@@ -323,7 +337,7 @@
|
|||||||
id="yearlyWeekDay"
|
id="yearlyWeekDay"
|
||||||
ng-model="$parent.yearlyWeekDay"
|
ng-model="$parent.yearlyWeekDay"
|
||||||
ng-options="w.name for w in weekdays"
|
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
|
class="MakeSelect2
|
||||||
form-control input-sm
|
form-control input-sm
|
||||||
RepeatFrequencyOptions-spacedSelect
|
RepeatFrequencyOptions-spacedSelect
|
||||||
@@ -334,7 +348,7 @@
|
|||||||
id="yearlyOtherMonth"
|
id="yearlyOtherMonth"
|
||||||
ng-model="$parent.yearlyOtherMonth"
|
ng-model="$parent.yearlyOtherMonth"
|
||||||
ng-options="m.name for m in months"
|
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
|
class="MakeSelect2
|
||||||
form-control input-sm
|
form-control input-sm
|
||||||
RepeatFrequencyOptions-thirdSelect">
|
RepeatFrequencyOptions-thirdSelect">
|
||||||
@@ -356,6 +370,7 @@
|
|||||||
data-toggle="buttons-checkbox"
|
data-toggle="buttons-checkbox"
|
||||||
id="weekdaySelect">
|
id="weekdaySelect">
|
||||||
<button type="button"
|
<button type="button"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
ng-class="weekDaySUClass"
|
ng-class="weekDaySUClass"
|
||||||
class="btn btn-default
|
class="btn btn-default
|
||||||
RepeatFrequencyOptions-weekButton"
|
RepeatFrequencyOptions-weekButton"
|
||||||
@@ -364,6 +379,7 @@
|
|||||||
Sun
|
Sun
|
||||||
</button>
|
</button>
|
||||||
<button type="button"
|
<button type="button"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
ng-class="weekDayMOClass"
|
ng-class="weekDayMOClass"
|
||||||
class="btn btn-default
|
class="btn btn-default
|
||||||
RepeatFrequencyOptions-weekButton"
|
RepeatFrequencyOptions-weekButton"
|
||||||
@@ -372,6 +388,7 @@
|
|||||||
Mon
|
Mon
|
||||||
</button>
|
</button>
|
||||||
<button type="button"
|
<button type="button"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
ng-class="weekDayTUClass"
|
ng-class="weekDayTUClass"
|
||||||
class="btn btn-default
|
class="btn btn-default
|
||||||
RepeatFrequencyOptions-weekButton"
|
RepeatFrequencyOptions-weekButton"
|
||||||
@@ -380,6 +397,7 @@
|
|||||||
Tue
|
Tue
|
||||||
</button>
|
</button>
|
||||||
<button type="button"
|
<button type="button"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
ng-class="weekDayWEClass"
|
ng-class="weekDayWEClass"
|
||||||
class="btn btn-default
|
class="btn btn-default
|
||||||
RepeatFrequencyOptions-weekButton"
|
RepeatFrequencyOptions-weekButton"
|
||||||
@@ -388,6 +406,7 @@
|
|||||||
Wed
|
Wed
|
||||||
</button>
|
</button>
|
||||||
<button type="button"
|
<button type="button"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
ng-class="weekDayTHClass"
|
ng-class="weekDayTHClass"
|
||||||
class="btn btn-default
|
class="btn btn-default
|
||||||
RepeatFrequencyOptions-weekButton"
|
RepeatFrequencyOptions-weekButton"
|
||||||
@@ -396,6 +415,7 @@
|
|||||||
Thu
|
Thu
|
||||||
</button>
|
</button>
|
||||||
<button type="button"
|
<button type="button"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
ng-class="weekDayFRClass"
|
ng-class="weekDayFRClass"
|
||||||
class="btn btn-default
|
class="btn btn-default
|
||||||
RepeatFrequencyOptions-weekButton"
|
RepeatFrequencyOptions-weekButton"
|
||||||
@@ -404,6 +424,7 @@
|
|||||||
Fri
|
Fri
|
||||||
</button>
|
</button>
|
||||||
<button type="button"
|
<button type="button"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
ng-class="weekDaySAClass"
|
ng-class="weekDaySAClass"
|
||||||
class="btn btn-default
|
class="btn btn-default
|
||||||
RepeatFrequencyOptions-weekButton"
|
RepeatFrequencyOptions-weekButton"
|
||||||
@@ -427,6 +448,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<div>
|
<div>
|
||||||
<select id="schedulerEnd"
|
<select id="schedulerEnd"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
name="schedulerEnd"
|
name="schedulerEnd"
|
||||||
ng-model="$parent.schedulerEnd"
|
ng-model="$parent.schedulerEnd"
|
||||||
ng-options="e.name for e in endOptions"
|
ng-options="e.name for e in endOptions"
|
||||||
@@ -448,6 +470,7 @@
|
|||||||
ng-name="schedulerOccurrenceCount"
|
ng-name="schedulerOccurrenceCount"
|
||||||
ng-id="schedulerOccurrenceCount"
|
ng-id="schedulerOccurrenceCount"
|
||||||
sch-spinner="scheduler_form"
|
sch-spinner="scheduler_form"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
class="scheduler-spinner
|
class="scheduler-spinner
|
||||||
SpinnerInput"
|
SpinnerInput"
|
||||||
aw-spinner="$parent.schedulerOccurrenceCount"
|
aw-spinner="$parent.schedulerOccurrenceCount"
|
||||||
@@ -468,7 +491,8 @@
|
|||||||
End Date
|
End Date
|
||||||
</label>
|
</label>
|
||||||
<div class="input-group Form-inputGroup SchedulerForm-inputGroup--date">
|
<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>
|
</scheduler-date-picker>
|
||||||
</div>
|
</div>
|
||||||
<div class="error"
|
<div class="error"
|
||||||
@@ -494,6 +518,7 @@
|
|||||||
<input name="schedulerEndHour"
|
<input name="schedulerEndHour"
|
||||||
id="schedulerEndHour"
|
id="schedulerEndHour"
|
||||||
sch-spinner="scheduler_form"
|
sch-spinner="scheduler_form"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
class="scheduler-time-spinner
|
class="scheduler-time-spinner
|
||||||
ScheduleTime-input SpinnerInput"
|
ScheduleTime-input SpinnerInput"
|
||||||
aw-spinner="$parent.schedulerEndHour"
|
aw-spinner="$parent.schedulerEndHour"
|
||||||
@@ -509,6 +534,7 @@
|
|||||||
<input name="schedulerEndMinute"
|
<input name="schedulerEndMinute"
|
||||||
id="$parent.schedulerEndMinute"
|
id="$parent.schedulerEndMinute"
|
||||||
sch-spinner="scheduler_form"
|
sch-spinner="scheduler_form"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
class="scheduler-time-spinner
|
class="scheduler-time-spinner
|
||||||
SchedulerTime-input SpinnerInput"
|
SchedulerTime-input SpinnerInput"
|
||||||
aw-spinner="$parent.schedulerEndMinute"
|
aw-spinner="$parent.schedulerEndMinute"
|
||||||
@@ -524,6 +550,7 @@
|
|||||||
<input name="schedulerEndSecond"
|
<input name="schedulerEndSecond"
|
||||||
id="schedulerEndSecond"
|
id="schedulerEndSecond"
|
||||||
sch-spinner="scheduler_form"
|
sch-spinner="scheduler_form"
|
||||||
|
ng-disabled="!(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
class="scheduler-time-spinner
|
class="scheduler-time-spinner
|
||||||
SchedulerTime-input SpinnerInput"
|
SchedulerTime-input SpinnerInput"
|
||||||
aw-spinner="$parent.schedulerEndSecond"
|
aw-spinner="$parent.schedulerEndSecond"
|
||||||
@@ -629,7 +656,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
<div>
|
<div ng-class="{'CodeMirror--disabled': !(schedule_obj.summary_fields.user_capabilities.edit || canAdd)}">
|
||||||
<textarea rows="6" ng-model="extraVars" name="Scheduler-extraVars" class="form-control" id="SchedulerForm-extraVars"></textarea>
|
<textarea rows="6" ng-model="extraVars" name="Scheduler-extraVars" class="form-control" id="SchedulerForm-extraVars"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -638,11 +665,19 @@
|
|||||||
<button type="button"
|
<button type="button"
|
||||||
class="btn btn-sm Form-cancelButton"
|
class="btn btn-sm Form-cancelButton"
|
||||||
id="project_cancel_btn"
|
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>
|
ng-click="formCancel()">Cancel</button>
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="btn btn-sm Form-saveButton"
|
class="btn btn-sm Form-saveButton"
|
||||||
id="project_save_btn"
|
id="project_save_btn"
|
||||||
ng-click="saveSchedule()"
|
ng-click="saveSchedule()"
|
||||||
|
ng-show="(schedule_obj.summary_fields.user_capabilities.edit || canAdd)"
|
||||||
ng-disabled="!schedulerIsValid"> Save</button>
|
ng-disabled="!schedulerIsValid"> Save</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -981,6 +981,15 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'JobsHelper'])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// hack to get ngDisabled to work
|
||||||
|
if (attrs.ngDisabled) {
|
||||||
|
scope.$watch(attrs.ngDisabled, function(val) {
|
||||||
|
opts.disabled = (val === true) ? true : false;
|
||||||
|
$(elm).spinner(opts);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (disabled) {
|
if (disabled) {
|
||||||
opts.disabled = true;
|
opts.disabled = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1271,7 +1271,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
|||||||
|
|
||||||
for (i = 0; i < field.options.length; i++) {
|
for (i = 0; i < field.options.length; i++) {
|
||||||
html += "<label class=\"radio-inline ";
|
html += "<label class=\"radio-inline ";
|
||||||
html += (field.options[i].labelClass) ? ` ${field.options[i].labelClass} "` : "\"";
|
html += (field.options[i].labelClass) ? ` ${field.options[i].labelClass} "` : "\"";
|
||||||
html += (field.options[i].ngShow) ? this.attr(field.options[i], 'ngShow') : "";
|
html += (field.options[i].ngShow) ? this.attr(field.options[i], 'ngShow') : "";
|
||||||
html += ">";
|
html += ">";
|
||||||
html += "<input type=\"radio\" ";
|
html += "<input type=\"radio\" ";
|
||||||
|
|||||||
@@ -509,12 +509,16 @@ angular.module('GeneratorHelpers', [systemStatus.name])
|
|||||||
html += (field['class']) ? " " + field['class'] : "";
|
html += (field['class']) ? " " + field['class'] : "";
|
||||||
html += " " + field.columnClass;
|
html += " " + field.columnClass;
|
||||||
html += "\"><div class='ScheduleToggle' ng-class='{\"is-on\": " + list.iterator + ".";
|
html += "\"><div class='ScheduleToggle' ng-class='{\"is-on\": " + list.iterator + ".";
|
||||||
html += (field.flag) ? field.flag : "enabled";
|
html += (field.flag) ? field.flag : "enabled\}' ";
|
||||||
html += "\}' aw-tool-tip='" + field.awToolTip + "' data-placement='" + field.dataPlacement + "' data-tip-watch='" + field.dataTipWatch + "'><div ng-show='" + list.iterator + "." ;
|
html += "aw-tool-tip='" + field.awToolTip + "' data-placement='" + field.dataPlacement + "' data-tip-watch='" + field.dataTipWatch + "'><button ";
|
||||||
|
html += (field.ngDisabled) ? `ng-disabled="${field.ngDisabled}" ` : "";
|
||||||
|
html += "ng-show='" + list.iterator + "." ;
|
||||||
html += (field.flag) ? field.flag : 'enabled';
|
html += (field.flag) ? field.flag : 'enabled';
|
||||||
html += "' class='ScheduleToggle-switch is-on' ng-click='" + field.ngClick + "'>ON</div><div ng-show='!" + list.iterator + "." ;
|
html += "' class='ScheduleToggle-switch is-on' ng-click='" + field.ngClick + "'>ON</button><button ";
|
||||||
|
html += (field.ngDisabled) ? `ng-disabled="${field.ngDisabled}" ` : "";
|
||||||
|
html += "ng-show='!" + list.iterator + "." ;
|
||||||
html += (field.flag) ? field.flag : "enabled";
|
html += (field.flag) ? field.flag : "enabled";
|
||||||
html += "' class='ScheduleToggle-switch' ng-click='" + field.ngClick + "'>OFF</div></div></td>";
|
html += "' class='ScheduleToggle-switch' ng-click='" + field.ngClick + "'>OFF</button></div></td>";
|
||||||
} 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'] : "";
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
<div class="DatePicker">
|
<div class="DatePicker">
|
||||||
<button class="DatePicker-icon"><i class="fa fa-calendar"></i></button>
|
<button class="DatePicker-icon" ng-disabled="disabled"><i class="fa fa-calendar"></i></button>
|
||||||
<input
|
<input
|
||||||
class="DatePicker-input"
|
class="DatePicker-input"
|
||||||
type="text"
|
type="text"
|
||||||
readonly
|
readonly
|
||||||
ng-model="dateValue"
|
ng-model="dateValue"
|
||||||
ng-class="inputClass()">
|
ng-class="inputClass()"
|
||||||
|
ng-disabled="disabled">
|
||||||
<p class="error" ng-if="error">{{error}}</p>
|
<p class="error" ng-if="error">{{error}}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user