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