1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-31 03:09:44 +02:00

refactor(docker/services): migrate service tasks to react [EE-4676] (#10328)

This commit is contained in:
Chaim Lev-Ari 2023-10-23 13:52:49 +03:00 committed by GitHub
parent 70455320be
commit 1fa63f6ab7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 175 additions and 259 deletions

View file

@ -0,0 +1,17 @@
type TableMeta = {
serviceName: string;
table: 'tasks';
};
export function getTableMeta(meta: unknown): TableMeta {
return isTableMeta(meta) ? meta : { table: 'tasks', serviceName: '' };
}
function isTableMeta(meta: unknown): meta is TableMeta {
return (
!!meta &&
typeof meta === 'object' &&
'table' in meta &&
meta.table === 'tasks'
);
}