mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
refactor(app): summary widget migration [EE-5351] (#8796)
* refactor(app): summary widget migration [EE-5351] * update converter and limit display --------- Co-authored-by: testa113 <testa113>
This commit is contained in:
parent
745bbb7d79
commit
98e6393274
23 changed files with 964 additions and 304 deletions
|
@ -4,6 +4,7 @@ import { compact } from 'lodash';
|
|||
import { withError } from '@/react-tools/react-query';
|
||||
import axios, { parseAxiosError } from '@/portainer/services/axios';
|
||||
import { EnvironmentId } from '@/react/portainer/environments/types';
|
||||
import { isFulfilled } from '@/react/utils';
|
||||
|
||||
import { getNamespaces } from '../namespaces/service';
|
||||
|
||||
|
@ -52,12 +53,6 @@ export function useServices(environmentId: EnvironmentId) {
|
|||
);
|
||||
}
|
||||
|
||||
function isFulfilled<T>(
|
||||
input: PromiseSettledResult<T>
|
||||
): input is PromiseFulfilledResult<T> {
|
||||
return input.status === 'fulfilled';
|
||||
}
|
||||
|
||||
export function useMutationDeleteServices(environmentId: EnvironmentId) {
|
||||
const queryClient = useQueryClient();
|
||||
return useMutation(deleteServices, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue