mirror of
https://github.com/portainer/portainer.git
synced 2025-08-07 14:55:27 +02:00
feat(waiting-room): choose relations when associated endpoint [EE-5187] (#8720)
This commit is contained in:
parent
511adabce2
commit
365316971b
53 changed files with 1712 additions and 303 deletions
|
@ -9,3 +9,15 @@ export function promiseSequence<T>(promises: (() => Promise<T>)[]) {
|
|||
Promise.resolve<T>(undefined as unknown as T)
|
||||
);
|
||||
}
|
||||
|
||||
export function isFulfilled<T>(
|
||||
result: PromiseSettledResult<T>
|
||||
): result is PromiseFulfilledResult<T> {
|
||||
return result.status === 'fulfilled';
|
||||
}
|
||||
|
||||
export function getFulfilledResults<T>(
|
||||
results: Array<PromiseSettledResult<T>>
|
||||
) {
|
||||
return results.filter(isFulfilled).map((result) => result.value);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ import { EnvironmentId } from '@/react/portainer/environments/types';
|
|||
import { createTag, getTags } from './tags.service';
|
||||
import { Tag, TagId } from './types';
|
||||
|
||||
const tagKeys = {
|
||||
export const tagKeys = {
|
||||
all: ['tags'] as const,
|
||||
tag: (id: TagId) => [...tagKeys.all, id] as const,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue