onDelete(deleteList)}
+ onClick={() => onDelete(radioOption)}
variant="danger"
key="delete"
- isDisabled={Object.keys(deleteList).some(
- group => deleteList[group] === null
- )}
+ isDisabled={radioOption === null}
>
{i18n._(t`Delete`)}
,
@@ -135,10 +55,43 @@ const InventoryGroupsDeleteModal = ({
groups.length > 1 ? i18n._(t`groups`) : i18n._(t`group`)
} below?`
)}
- {content}
+
+ {groups.map(group => {
+ return {group.name};
+ })}
+
+
+ setRadioOption('delete')}
+ />
+ setRadioOption('promote')}
+ />
+
,
document.body
);
};
+InventoryGroupsDeleteModal.propTypes = {
+ onClose: func.isRequired,
+ onDelete: func.isRequired,
+ isModalOpen: bool,
+ groups: arrayOf(object),
+};
+
+InventoryGroupsDeleteModal.defaultProps = {
+ isModalOpen: false,
+ groups: [],
+};
+
export default withI18n()(InventoryGroupsDeleteModal);
diff --git a/awx/ui_next/src/types.js b/awx/ui_next/src/types.js
index 4713e0dcfd..5fee265305 100644
--- a/awx/ui_next/src/types.js
+++ b/awx/ui_next/src/types.js
@@ -199,8 +199,6 @@ export const Host = shape({
enabled: bool,
instance_id: string,
variables: string,
- has_active_failures: bool,
- has_inventory_sources: bool,
last_job: number,
last_job_host_summary: number,
});
@@ -242,10 +240,4 @@ export const Group = shape({
description: string,
inventory: number,
variables: string,
- has_active_failures: bool,
- total_hosts: number,
- hosts_with_active_failures: number,
- total_groups: number,
- groups_with_active_failures: number,
- has_inventory_sources: bool,
});