1 ? i18n._(t`Delete Groups`) : i18n._(t`Delete Group`)
+ }
+ onClose={onClose}
+ actions={[
+ ,
+ ,
+ ]}
+ >
+ {i18n._(
+ t`Are you sure you want to delete the ${
+ groups.length > 1 ? i18n._(t`groups`) : i18n._(t`group`)
+ } below?`
+ )}
+
+ {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 a519b7ab08..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,
});
@@ -229,3 +227,17 @@ export const User = shape({
ldap_dn: string,
last_login: string,
});
+
+export const Group = shape({
+ id: number.isRequired,
+ type: oneOf(['group']),
+ url: string,
+ related: shape({}),
+ summary_fields: shape({}),
+ created: string,
+ modified: string,
+ name: string.isRequired,
+ description: string,
+ inventory: number,
+ variables: string,
+});