mirror of https://github.com/portainer/portainer
fix(environments): fix env table [EE-5971] (#10060)
Co-authored-by: testa113 <testa113>pull/10067/head
parent
360969c93e
commit
d54dd47b21
|
@ -11,7 +11,7 @@ import { Link } from '@@/Link';
|
||||||
import { useTableState } from '@@/datatables/useTableState';
|
import { useTableState } from '@@/datatables/useTableState';
|
||||||
|
|
||||||
import { isBE } from '../../feature-flags/feature-flags.service';
|
import { isBE } from '../../feature-flags/feature-flags.service';
|
||||||
import { isSortType, refetchIfAnyOffline } from '../queries/useEnvironmentList';
|
import { isSortType } from '../queries/useEnvironmentList';
|
||||||
|
|
||||||
import { columns } from './columns';
|
import { columns } from './columns';
|
||||||
import { EnvironmentListItem } from './types';
|
import { EnvironmentListItem } from './types';
|
||||||
|
@ -39,7 +39,7 @@ export function EnvironmentsDatatable({
|
||||||
sort: isSortType(tableState.sortBy.id) ? tableState.sortBy.id : undefined,
|
sort: isSortType(tableState.sortBy.id) ? tableState.sortBy.id : undefined,
|
||||||
order: tableState.sortBy.desc ? 'desc' : 'asc',
|
order: tableState.sortBy.desc ? 'desc' : 'asc',
|
||||||
},
|
},
|
||||||
{ enabled: groupsQuery.isSuccess, refetchInterval: refetchIfAnyOffline }
|
{ enabled: groupsQuery.isSuccess, refetchInterval: 30 * 1000 }
|
||||||
);
|
);
|
||||||
|
|
||||||
const environmentsWithGroups = environments.map<EnvironmentListItem>(
|
const environmentsWithGroups = environments.map<EnvironmentListItem>(
|
||||||
|
@ -88,15 +88,17 @@ export function EnvironmentsDatatable({
|
||||||
Auto onboarding
|
Auto onboarding
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
<Link to="portainer.wizard.endpoints">
|
||||||
<Button
|
<Button
|
||||||
as={Link}
|
onClick={() =>
|
||||||
props={{ to: 'portainer.wizard.endpoints' }}
|
localStorage.setItem('wizardReferrer', 'environments')
|
||||||
icon={Plus}
|
}
|
||||||
className="!m-0"
|
icon={Plus}
|
||||||
>
|
className="!m-0"
|
||||||
Add environment
|
>
|
||||||
</Button>
|
Add environment
|
||||||
|
</Button>
|
||||||
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in New Issue