1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-22 14:59:41 +02:00
portainer/app/kubernetes/models/application/models/index.js
fhanportainer 6d87c77ab0
feat(stack): front end backport changes to CE EE-1199 (#5455)
* feat(stack): front end backport changes to CE EE-1199

* fix k8s deploy logic

* fixed web editor confirmation message typo. EE-1501

* fix(stack): fixed issue auth detail not remembered EE-1502 (#5459)

* show status in buttons

* removed onChangeRef function.

* moved buttons in git form to its own component

* removed unused variable.

Co-authored-by: ArrisLee <arris_li@hotmail.com>
2021-08-25 14:04:12 +12:00

101 lines
2.5 KiB
JavaScript

export * from './constants';
/**
* KubernetesApplication Model (Composite)
*/
const _KubernetesApplication = Object.freeze({
Id: '',
Name: '',
StackName: '',
StackId: '',
ApplicationKind: '',
ApplicationOwner: '',
ApplicationName: '',
ResourcePool: '',
Image: '',
CreationDate: 0,
Pods: [],
Containers: [],
Limits: {},
ServiceType: '',
ServiceId: '',
ServiceName: '',
HeadlessServiceName: undefined, // only used for StatefulSet
LoadBalancerIPAddress: undefined, // only filled when bound service is LoadBalancer and state is available
PublishedPorts: [],
Volumes: [],
Env: [],
PersistedFolders: [], // KubernetesApplicationPersistedFolder list
ConfigurationVolumes: [], // KubernetesApplicationConfigurationVolume list
DeploymentType: 'Unknown',
DataAccessPolicy: 'Unknown',
ApplicationType: 'Unknown',
RunningPodsCount: 0,
TotalPodsCount: 0,
Yaml: '',
Note: '',
Revisions: undefined,
CurrentRevision: undefined,
Raw: undefined, // only filled when inspecting app details / create / edit view (never filled in multiple-apps views)
AutoScaler: undefined, // only filled if the application has an HorizontalPodAutoScaler bound to it
});
export class KubernetesApplication {
constructor() {
Object.assign(this, JSON.parse(JSON.stringify(_KubernetesApplication)));
}
}
/**
* KubernetesApplicationPersistedFolder Model
*/
const _KubernetesApplicationPersistedFolder = Object.freeze({
MountPath: '',
PersistentVolumeClaimName: '',
HostPath: '',
});
export class KubernetesApplicationPersistedFolder {
constructor() {
Object.assign(this, JSON.parse(JSON.stringify(_KubernetesApplicationPersistedFolder)));
}
}
/**
* KubernetesApplicationConfigurationVolume Model
*/
const _KubernetesApplicationConfigurationVolume = Object.freeze({
fileMountPath: '',
rootMountPath: '',
configurationKey: '',
configurationName: '',
});
export class KubernetesApplicationConfigurationVolume {
constructor() {
Object.assign(this, JSON.parse(JSON.stringify(_KubernetesApplicationConfigurationVolume)));
}
}
/**
* KubernetesApplicationPort Model
*/
const _KubernetesApplicationPort = Object.freeze({
IngressRules: [], // KubernetesIngressRule[]
NodePort: 0,
TargetPort: 0,
Port: 0,
Protocol: '',
});
export class KubernetesApplicationPort {
constructor() {
Object.assign(this, JSON.parse(JSON.stringify(_KubernetesApplicationPort)));
}
}
export const KubernetesDeploymentTypes = Object.freeze({
GIT: 'git',
CONTENT: 'content',
APPLICATION_FORM: 'application form',
});