mirror of
https://github.com/ansible/awx.git
synced 2026-03-21 19:07:39 -02:30
add docstring for instance group service
This commit is contained in:
@@ -7,6 +7,24 @@ export default
|
|||||||
let defers = groups.map((group) => Rest.post(group));
|
let defers = groups.map((group) => Rest.post(group));
|
||||||
return Promise.all(defers);
|
return Promise.all(defers);
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* This function compares the currently saved ids and the selected ids - as soon as
|
||||||
|
* we encounter a difference between the two arrays, we mark all remaining currently
|
||||||
|
* saved ids in the array for disassociation.
|
||||||
|
*
|
||||||
|
* Example Scenario
|
||||||
|
* -----------------
|
||||||
|
* page is loaded with [1,2,3,4,5,6] as the currently selected tags
|
||||||
|
* user removes tag 3 from the middle
|
||||||
|
* user adds a new tag 7 to the end
|
||||||
|
* user appends tag 3 to the end
|
||||||
|
*
|
||||||
|
* _______ all ids here and to the right are disassociated
|
||||||
|
* |
|
||||||
|
* current: [1,2,3,4,5,6]
|
||||||
|
* selected: [1,2,4,5,6,7,3]
|
||||||
|
* |_______ all ids here and to the right are (re)associated
|
||||||
|
*/
|
||||||
editInstanceGroups: function(url, instance_groups) {
|
editInstanceGroups: function(url, instance_groups) {
|
||||||
Rest.setUrl(url);
|
Rest.setUrl(url);
|
||||||
return Rest.get()
|
return Rest.get()
|
||||||
|
|||||||
Reference in New Issue
Block a user