mirror of
https://github.com/portainer/portainer.git
synced 2025-07-25 00:09:40 +02:00
refactor(ui/datatables): migrate views to use datatable component [EE-4064] (#7609)
This commit is contained in:
parent
0f0513c684
commit
fe8e834dbf
90 changed files with 1714 additions and 2717 deletions
|
@ -3,6 +3,7 @@ import { useMutation, useQueryClient } from 'react-query';
|
|||
import { EnvironmentId } from '@/react/portainer/environments/types';
|
||||
import axios, { parseAxiosError } from '@/portainer/services/axios';
|
||||
import { promiseSequence } from '@/portainer/helpers/promise-utils';
|
||||
import { useIntegratedLicenseInfo } from '@/portainer/license-management/use-license.service';
|
||||
|
||||
export function useAssociateDeviceMutation() {
|
||||
const queryClient = useQueryClient();
|
||||
|
@ -31,3 +32,11 @@ async function associateDevice(environmentId: EnvironmentId) {
|
|||
throw parseAxiosError(e as Error, 'Failed to associate device');
|
||||
}
|
||||
}
|
||||
|
||||
export function useLicenseOverused() {
|
||||
const integratedInfo = useIntegratedLicenseInfo();
|
||||
if (integratedInfo && integratedInfo.licenseInfo.enforcedAt > 0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue