- {expanded?.content === StorageDeviceAction.CREATE_BCACHE && (
-
setExpanded(null)}
- storageDevice={disk}
- systemId={node.system_id}
- />
- )}
- {expanded?.content === StorageDeviceAction.CREATE_CACHE_SET && (
- {
- dispatch(machineActions.cleanup());
- dispatch(
- machineActions.createCacheSet({
- blockId: disk.id,
- systemId: node.system_id,
- })
- );
- }}
- onSaveAnalytics={{
- action: "Create cache set from disk",
- category: "Machine storage",
- label: "Create cache set",
- }}
- statusKey="creatingCacheSet"
- submitAppearance="positive"
- systemId={node.system_id}
- />
- )}
- {expanded?.content ===
- StorageDeviceAction.CREATE_LOGICAL_VOLUME && (
-
- )}
- {expanded?.content === StorageDeviceAction.CREATE_PARTITION && (
-
- )}
- {expanded?.content === StorageDeviceAction.DELETE_DISK && (
- {
- dispatch(machineActions.cleanup());
- dispatch(
- machineActions.deleteDisk({
- blockId: disk.id,
- systemId: node.system_id,
- })
- );
- }}
- onSaveAnalytics={{
- action: `Delete ${diskType}`,
- category: "Machine storage",
- label: `Remove ${diskType}`,
- }}
- statusKey="deletingDisk"
- systemId={node.system_id}
- />
- )}
- {expanded?.content === StorageDeviceAction.DELETE_VOLUME_GROUP && (
- {
- dispatch(machineActions.cleanup());
- dispatch(
- machineActions.deleteVolumeGroup({
- systemId: node.system_id,
- volumeGroupId: disk.id,
- })
- );
- }}
- onSaveAnalytics={{
- action: "Delete volume group",
- category: "Machine storage",
- label: "Remove volume group",
- }}
- statusKey="deletingVolumeGroup"
- systemId={node.system_id}
- />
- )}
- {expanded?.content === StorageDeviceAction.EDIT_DISK && (
-
- )}
- {expanded?.content === StorageDeviceAction.SET_BOOT_DISK && (
- {
- dispatch(machineActions.cleanup());
- dispatch(
- machineActions.setBootDisk({
- blockId: disk.id,
- systemId: node.system_id,
- })
- );
- }}
- onSaveAnalytics={{
- action: "Set boot disk",
- category: "Machine storage",
- label: "Set boot disk",
- }}
- statusKey="settingBootDisk"
- submitAppearance="positive"
- systemId={node.system_id}
- />
- )}
-
- ) : null,
});
}
@@ -516,79 +376,11 @@ const AvailableStorageTable = ({
isMachine,
partition,
actionsDisabled,
- expanded,
- setExpanded,
selected,
handleRowCheckbox,
- setSidePanelContent
+ setSidePanelContent,
+ disk
),
- expandedContent: isMachine ? (
-