mirror of
https://github.com/ansible/awx.git
synced 2026-05-24 17:17:45 -02:30
Wraps label count validation in function
This commit is contained in:
@@ -496,6 +496,7 @@
|
||||
$state.transitionTo('templates');
|
||||
};
|
||||
|
||||
let handleLabelCount = () => {
|
||||
/**
|
||||
* This block of code specifically handles the client-side validation of the `labels` field.
|
||||
* Due to it's detached nature in relation to the other job template fields, we must
|
||||
@@ -509,6 +510,7 @@
|
||||
* by invalidating the field and inform the user of the error.
|
||||
*/
|
||||
|
||||
|
||||
$scope.job_template_labels_isValid = true;
|
||||
const maxCount = 512;
|
||||
const jt_label_id = 'job_template_labels';
|
||||
@@ -536,5 +538,8 @@
|
||||
$scope.job_template_labels_isValid = true;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
handleLabelCount();
|
||||
}
|
||||
];
|
||||
|
||||
@@ -705,6 +705,7 @@ export default
|
||||
$state.go('templates');
|
||||
};
|
||||
|
||||
let handleLabelCount = () => {
|
||||
/**
|
||||
* This block of code specifically handles the client-side validation of the `labels` field.
|
||||
* Due to it's detached nature in relation to the other job template fields, we must
|
||||
@@ -745,5 +746,8 @@ export default
|
||||
$scope.job_template_labels_isValid = true;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
handleLabelCount();
|
||||
}
|
||||
];
|
||||
|
||||
@@ -179,6 +179,7 @@ export default [
|
||||
$state.transitionTo('templates');
|
||||
};
|
||||
|
||||
let handleLabelCount = () => {
|
||||
/**
|
||||
* This block of code specifically handles the client-side validation of the `labels` field.
|
||||
* Due to it's detached nature in relation to the other job template fields, we must
|
||||
@@ -215,5 +216,8 @@ export default [
|
||||
$scope.workflow_job_template_labels_isValid = true;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
handleLabelCount();
|
||||
}
|
||||
];
|
||||
|
||||
@@ -323,6 +323,7 @@ export default [
|
||||
$scope.invalid_survey = false;
|
||||
});
|
||||
|
||||
let handleLabelCount = () => {
|
||||
/**
|
||||
* This block of code specifically handles the client-side validation of the `labels` field.
|
||||
* Due to it's detached nature in relation to the other job template fields, we must
|
||||
@@ -359,5 +360,8 @@ export default [
|
||||
$scope.workflow_job_template_labels_isValid = true;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
handleLabelCount();
|
||||
}
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user