mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 07:19:41 +02:00
refactor(docker/stacks): migrate table to react [EE-4705] (#9956)
This commit is contained in:
parent
c3d266931f
commit
c8a1f0fa77
43 changed files with 1127 additions and 492 deletions
20
app/react/docker/stacks/view-models/utils.ts
Normal file
20
app/react/docker/stacks/view-models/utils.ts
Normal file
|
@ -0,0 +1,20 @@
|
|||
import { ExternalStackViewModel } from './external-stack';
|
||||
import { StackViewModel } from './stack';
|
||||
|
||||
export function isExternalStack(
|
||||
stack: StackViewModel | ExternalStackViewModel
|
||||
): stack is ExternalStackViewModel {
|
||||
return 'External' in stack && stack.External;
|
||||
}
|
||||
|
||||
export function isRegularStack(
|
||||
stack: StackViewModel | ExternalStackViewModel
|
||||
): stack is StackViewModel & { Regular: true } {
|
||||
return 'Regular' in stack && stack.Regular;
|
||||
}
|
||||
|
||||
export function isOrphanedStack(
|
||||
stack: StackViewModel | ExternalStackViewModel
|
||||
): stack is StackViewModel & { Orphaned: true } {
|
||||
return 'Orphaned' in stack && stack.Orphaned;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue