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
35
app/react/docker/stacks/view-models/external-stack.ts
Normal file
35
app/react/docker/stacks/view-models/external-stack.ts
Normal file
|
@ -0,0 +1,35 @@
|
|||
import _ from 'lodash';
|
||||
|
||||
import { StackType } from '@/react/common/stacks/types';
|
||||
import { ResourceControlViewModel } from '@/react/portainer/access-control/models/ResourceControlViewModel';
|
||||
|
||||
import { IResource } from '../../components/datatable/createOwnershipColumn';
|
||||
|
||||
export class ExternalStackViewModel implements IResource {
|
||||
Id: string;
|
||||
|
||||
Name: string;
|
||||
|
||||
ResourceControl?: ResourceControlViewModel;
|
||||
|
||||
Type: StackType;
|
||||
|
||||
CreationDate: number;
|
||||
|
||||
CreatedBy?: string;
|
||||
|
||||
UpdateDate?: number;
|
||||
|
||||
UpdatedBy?: string;
|
||||
|
||||
External: boolean;
|
||||
|
||||
constructor(name: string, type: StackType, creationDate: number) {
|
||||
this.Id = `external-stack_${_.uniqueId()}`;
|
||||
this.Name = name;
|
||||
this.Type = type;
|
||||
this.CreationDate = creationDate;
|
||||
|
||||
this.External = true;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue