mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 01:57:35 -03:30
properly deprovisions instance
This commit is contained in:
parent
d4b25058cd
commit
6619cc39f7
@ -27,7 +27,7 @@ class Instances extends Base {
|
||||
}
|
||||
|
||||
deprovisionInstance(instanceId) {
|
||||
return this.http.post(`${this.baseUrl}${instanceId}`, {
|
||||
return this.http.patch(`${this.baseUrl}${instanceId}/`, {
|
||||
node_state: 'deprovisioning',
|
||||
});
|
||||
}
|
||||
|
||||
@ -110,7 +110,7 @@ function InstanceList() {
|
||||
Promise.all(
|
||||
selected.map(({ id }) => InstancesAPI.deprovisionInstance(id))
|
||||
),
|
||||
{ fetchItems: fetchInstances }
|
||||
{ fetchItems: fetchInstances, qsConfig: QS_CONFIG }
|
||||
);
|
||||
|
||||
return (
|
||||
|
||||
@ -38,7 +38,7 @@ function RemoveInstanceButton({ itemsToRemove, onRemove, isK8s }) {
|
||||
const toggleModal = async (isOpen) => {
|
||||
setRemoveDetails(null);
|
||||
setIsLoading(true);
|
||||
if (isOpen && itemsToRemove.length === 1) {
|
||||
if (isOpen && itemsToRemove.length > 0) {
|
||||
const { results, error } = await getRelatedResourceDeleteCounts(
|
||||
relatedResourceDeleteRequests.instance(itemsToRemove[0])
|
||||
);
|
||||
@ -85,7 +85,7 @@ function RemoveInstanceButton({ itemsToRemove, onRemove, isK8s }) {
|
||||
<Plural
|
||||
value={itemsToRemove.length}
|
||||
one="This intance is currently being used by other resources. Are you sure you want to delete it?"
|
||||
other="Deleting these instances could impact other resources that rely on them. Are you sure you want to delete anyway?"
|
||||
other="Deprovisioning these instances could impact other resources that rely on them. Are you sure you want to delete anyway?"
|
||||
/>
|
||||
{removeDetails &&
|
||||
Object.entries(removeDetails).map(([key, value]) => (
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user