mirror of https://github.com/portainer/portainer
fix(docker): missing browse volume option [EE-7179] (#11901)
parent
6486a5d971
commit
4d586f7a85
|
@ -8,6 +8,7 @@ import { BasicTableSettings } from '@@/datatables/types';
|
||||||
import { Button } from '@@/buttons';
|
import { Button } from '@@/buttons';
|
||||||
import { TableState } from '@@/datatables/useTableState';
|
import { TableState } from '@@/datatables/useTableState';
|
||||||
import { withMeta } from '@@/datatables/extend-options/withMeta';
|
import { withMeta } from '@@/datatables/extend-options/withMeta';
|
||||||
|
import { mergeOptions } from '@@/datatables/extend-options/mergeOptions';
|
||||||
|
|
||||||
import { FileData } from './types';
|
import { FileData } from './types';
|
||||||
import { columns } from './columns';
|
import { columns } from './columns';
|
||||||
|
@ -86,15 +87,17 @@ export function FilesTable({
|
||||||
Dir: false,
|
Dir: false,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
extendTableOptions={withMeta({
|
extendTableOptions={mergeOptions(
|
||||||
table: 'files',
|
withMeta({
|
||||||
isEdit,
|
table: 'files',
|
||||||
setIsEdit,
|
isEdit,
|
||||||
onRename,
|
setIsEdit,
|
||||||
onBrowse,
|
onRename,
|
||||||
onDownload,
|
onBrowse,
|
||||||
onDelete,
|
onDownload,
|
||||||
})}
|
onDelete,
|
||||||
|
})
|
||||||
|
)}
|
||||||
disableSelect
|
disableSelect
|
||||||
data-cy="files-datatable"
|
data-cy="files-datatable"
|
||||||
renderTableActions={() => {
|
renderTableActions={() => {
|
||||||
|
|
|
@ -6,6 +6,7 @@ import { createPersistedStore } from '@@/datatables/types';
|
||||||
import { useTableState } from '@@/datatables/useTableState';
|
import { useTableState } from '@@/datatables/useTableState';
|
||||||
import { ExpandableDatatable } from '@@/datatables/ExpandableDatatable';
|
import { ExpandableDatatable } from '@@/datatables/ExpandableDatatable';
|
||||||
import { withMeta } from '@@/datatables/extend-options/withMeta';
|
import { withMeta } from '@@/datatables/extend-options/withMeta';
|
||||||
|
import { mergeOptions } from '@@/datatables/extend-options/mergeOptions';
|
||||||
|
|
||||||
import { ContainerListViewModel } from '../../types';
|
import { ContainerListViewModel } from '../../types';
|
||||||
|
|
||||||
|
@ -60,10 +61,12 @@ export function ContainerNetworksDatatable({
|
||||||
selectedNetworks={networks.map((n) => n.id)}
|
selectedNetworks={networks.map((n) => n.id)}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
extendTableOptions={withMeta({
|
extendTableOptions={mergeOptions(
|
||||||
table: 'container-networks',
|
withMeta({
|
||||||
containerId: container.Id,
|
table: 'container-networks',
|
||||||
})}
|
containerId: container.Id,
|
||||||
|
})
|
||||||
|
)}
|
||||||
data-cy="container-networks-datatable"
|
data-cy="container-networks-datatable"
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
|
@ -13,6 +13,7 @@ import { useTableState } from '@@/datatables/useTableState';
|
||||||
import { useRepeater } from '@@/datatables/useRepeater';
|
import { useRepeater } from '@@/datatables/useRepeater';
|
||||||
import { TableSettingsMenuAutoRefresh } from '@@/datatables/TableSettingsMenuAutoRefresh';
|
import { TableSettingsMenuAutoRefresh } from '@@/datatables/TableSettingsMenuAutoRefresh';
|
||||||
import { withMeta } from '@@/datatables/extend-options/withMeta';
|
import { withMeta } from '@@/datatables/extend-options/withMeta';
|
||||||
|
import { mergeOptions } from '@@/datatables/extend-options/mergeOptions';
|
||||||
|
|
||||||
import { useColumns } from './columns';
|
import { useColumns } from './columns';
|
||||||
|
|
||||||
|
@ -52,10 +53,12 @@ export function NodesDatatable({
|
||||||
dataset={dataset || []}
|
dataset={dataset || []}
|
||||||
isLoading={!dataset}
|
isLoading={!dataset}
|
||||||
settingsManager={tableState}
|
settingsManager={tableState}
|
||||||
extendTableOptions={withMeta({
|
extendTableOptions={mergeOptions(
|
||||||
table: 'nodes',
|
withMeta({
|
||||||
haveAccessToNode,
|
table: 'nodes',
|
||||||
})}
|
haveAccessToNode,
|
||||||
|
})
|
||||||
|
)}
|
||||||
renderTableSettings={() => (
|
renderTableSettings={() => (
|
||||||
<TableSettingsMenu>
|
<TableSettingsMenu>
|
||||||
<TableSettingsMenuAutoRefresh
|
<TableSettingsMenuAutoRefresh
|
||||||
|
|
|
@ -14,6 +14,7 @@ import { useRepeater } from '@@/datatables/useRepeater';
|
||||||
import { useTableState } from '@@/datatables/useTableState';
|
import { useTableState } from '@@/datatables/useTableState';
|
||||||
import { withMeta } from '@@/datatables/extend-options/withMeta';
|
import { withMeta } from '@@/datatables/extend-options/withMeta';
|
||||||
import { withColumnFilters } from '@@/datatables/extend-options/withColumnFilters';
|
import { withColumnFilters } from '@@/datatables/extend-options/withColumnFilters';
|
||||||
|
import { mergeOptions } from '@@/datatables/extend-options/mergeOptions';
|
||||||
|
|
||||||
import { DecoratedVolume } from '../types';
|
import { DecoratedVolume } from '../types';
|
||||||
|
|
||||||
|
@ -69,16 +70,13 @@ export function VolumesDatatable({
|
||||||
/>
|
/>
|
||||||
</TableSettingsMenu>
|
</TableSettingsMenu>
|
||||||
)}
|
)}
|
||||||
extendTableOptions={
|
extendTableOptions={mergeOptions(
|
||||||
(withMeta({
|
withMeta({
|
||||||
table: 'volumes',
|
table: 'volumes',
|
||||||
isBrowseVisible,
|
isBrowseVisible,
|
||||||
}),
|
}),
|
||||||
withColumnFilters(
|
withColumnFilters(tableState.columnFilters, tableState.setColumnFilters)
|
||||||
tableState.columnFilters,
|
)}
|
||||||
tableState.setColumnFilters
|
|
||||||
))
|
|
||||||
}
|
|
||||||
data-cy="docker-volumes-datatable"
|
data-cy="docker-volumes-datatable"
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
|
@ -7,6 +7,7 @@ import { useEnvironmentList } from '@/react/portainer/environments/queries';
|
||||||
import { Datatable } from '@@/datatables';
|
import { Datatable } from '@@/datatables';
|
||||||
import { useTableState } from '@@/datatables/useTableState';
|
import { useTableState } from '@@/datatables/useTableState';
|
||||||
import { withMeta } from '@@/datatables/extend-options/withMeta';
|
import { withMeta } from '@@/datatables/extend-options/withMeta';
|
||||||
|
import { mergeOptions } from '@@/datatables/extend-options/mergeOptions';
|
||||||
|
|
||||||
import { EdgeJob, JobResult, LogsStatus } from '../../types';
|
import { EdgeJob, JobResult, LogsStatus } from '../../types';
|
||||||
import { useJobResults } from '../../queries/jobResults/useJobResults';
|
import { useJobResults } from '../../queries/jobResults/useJobResults';
|
||||||
|
@ -68,10 +69,12 @@ export function ResultsDatatable({ jobId }: { jobId: EdgeJob['Id'] }) {
|
||||||
title="Results"
|
title="Results"
|
||||||
titleIcon={List}
|
titleIcon={List}
|
||||||
settingsManager={tableState}
|
settingsManager={tableState}
|
||||||
extendTableOptions={withMeta({
|
extendTableOptions={mergeOptions(
|
||||||
table: 'edge-job-results',
|
withMeta({
|
||||||
jobId,
|
table: 'edge-job-results',
|
||||||
})}
|
jobId,
|
||||||
|
})
|
||||||
|
)}
|
||||||
data-cy="edge-job-results-datatable"
|
data-cy="edge-job-results-datatable"
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
|
@ -14,6 +14,7 @@ import { useTableState } from '@@/datatables/useTableState';
|
||||||
import { withMeta } from '@@/datatables/extend-options/withMeta';
|
import { withMeta } from '@@/datatables/extend-options/withMeta';
|
||||||
import { Button } from '@@/buttons';
|
import { Button } from '@@/buttons';
|
||||||
import { TextTip } from '@@/Tip/TextTip';
|
import { TextTip } from '@@/Tip/TextTip';
|
||||||
|
import { mergeOptions } from '@@/datatables/extend-options/mergeOptions';
|
||||||
|
|
||||||
import { useColumns } from './columns/useColumns';
|
import { useColumns } from './columns/useColumns';
|
||||||
import { Access } from './types';
|
import { Access } from './types';
|
||||||
|
@ -55,10 +56,12 @@ export function AccessDatatable({
|
||||||
isLoading={!dataset}
|
isLoading={!dataset}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
settingsManager={tableState}
|
settingsManager={tableState}
|
||||||
extendTableOptions={withMeta({
|
extendTableOptions={mergeOptions(
|
||||||
table: 'access-table',
|
withMeta({
|
||||||
roles: rolesState,
|
table: 'access-table',
|
||||||
})}
|
roles: rolesState,
|
||||||
|
})
|
||||||
|
)}
|
||||||
isRowSelectable={({ original: item }) => !inheritFrom || !item.Inherited}
|
isRowSelectable={({ original: item }) => !inheritFrom || !item.Inherited}
|
||||||
renderTableActions={(selectedItems) => (
|
renderTableActions={(selectedItems) => (
|
||||||
<>
|
<>
|
||||||
|
|
|
@ -5,6 +5,7 @@ import { createPersistedStore } from '@@/datatables/types';
|
||||||
import { useTableState } from '@@/datatables/useTableState';
|
import { useTableState } from '@@/datatables/useTableState';
|
||||||
import { Datatable } from '@@/datatables';
|
import { Datatable } from '@@/datatables';
|
||||||
import { withControlledSelected } from '@@/datatables/extend-options/withControlledSelected';
|
import { withControlledSelected } from '@@/datatables/extend-options/withControlledSelected';
|
||||||
|
import { mergeOptions } from '@@/datatables/extend-options/mergeOptions';
|
||||||
|
|
||||||
import { RegistryGitlabProject } from '../../types/gitlabProject';
|
import { RegistryGitlabProject } from '../../types/gitlabProject';
|
||||||
|
|
||||||
|
@ -40,9 +41,11 @@ export function GitlabProjectTable({
|
||||||
settingsManager={tableState}
|
settingsManager={tableState}
|
||||||
title="Gitlab projects"
|
title="Gitlab projects"
|
||||||
titleIcon={ListIcon}
|
titleIcon={ListIcon}
|
||||||
extendTableOptions={withControlledSelected(
|
extendTableOptions={mergeOptions(
|
||||||
(ids) => onChange(dataset.filter(({ Id }) => ids.includes(`${Id}`))),
|
withControlledSelected(
|
||||||
value.map(({ Id }) => `${Id}`)
|
(ids) => onChange(dataset.filter(({ Id }) => ids.includes(`${Id}`))),
|
||||||
|
value.map(({ Id }) => `${Id}`)
|
||||||
|
)
|
||||||
)}
|
)}
|
||||||
isRowSelectable={({ original: item }) => item.RegistryEnabled}
|
isRowSelectable={({ original: item }) => item.RegistryEnabled}
|
||||||
data-cy="gitlab-projects-datatable"
|
data-cy="gitlab-projects-datatable"
|
||||||
|
|
|
@ -5,6 +5,7 @@ import { Datatable } from '@@/datatables';
|
||||||
import { useTableStateWithStorage } from '@@/datatables/useTableState';
|
import { useTableStateWithStorage } from '@@/datatables/useTableState';
|
||||||
import { DeleteButton } from '@@/buttons/DeleteButton';
|
import { DeleteButton } from '@@/buttons/DeleteButton';
|
||||||
import { withMeta } from '@@/datatables/extend-options/withMeta';
|
import { withMeta } from '@@/datatables/extend-options/withMeta';
|
||||||
|
import { mergeOptions } from '@@/datatables/extend-options/mergeOptions';
|
||||||
|
|
||||||
import { Tag } from './types';
|
import { Tag } from './types';
|
||||||
import { useColumns } from './columns/useColumns';
|
import { useColumns } from './columns/useColumns';
|
||||||
|
@ -45,13 +46,15 @@ export function TagsDatatable({
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
getRowId={(tag) => tag.Name}
|
getRowId={(tag) => tag.Name}
|
||||||
extendTableOptions={withMeta({
|
extendTableOptions={mergeOptions(
|
||||||
onUpdate: async () => {
|
withMeta({
|
||||||
await onRetag(updatesState.updates);
|
onUpdate: async () => {
|
||||||
updatesState.clear();
|
await onRetag(updatesState.updates);
|
||||||
},
|
updatesState.clear();
|
||||||
table: 'registry-repository-tags',
|
},
|
||||||
})}
|
table: 'registry-repository-tags',
|
||||||
|
})
|
||||||
|
)}
|
||||||
data-cy="registry-tags-datatable"
|
data-cy="registry-tags-datatable"
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue