2018-10-11 14:03:25 +00:00
|
|
|
import { ResourceControlViewModel } from '../../portainer/models/resourceControl'
|
|
|
|
|
2018-10-10 08:06:23 +00:00
|
|
|
export function SecretViewModel(data) {
|
2017-05-27 07:23:49 +00:00
|
|
|
this.Id = data.ID;
|
|
|
|
this.CreatedAt = data.CreatedAt;
|
|
|
|
this.UpdatedAt = data.UpdatedAt;
|
|
|
|
this.Version = data.Version.Index;
|
|
|
|
this.Name = data.Spec.Name;
|
|
|
|
this.Labels = data.Spec.Labels;
|
2017-09-19 15:10:15 +00:00
|
|
|
|
|
|
|
if (data.Portainer) {
|
|
|
|
if (data.Portainer.ResourceControl) {
|
|
|
|
this.ResourceControl = new ResourceControlViewModel(data.Portainer.ResourceControl);
|
|
|
|
}
|
|
|
|
}
|
2017-05-27 07:23:49 +00:00
|
|
|
}
|