mirror of https://github.com/portainer/portainer
feat(k8s/applications): Expose application workload type (#4029)
* feat(applications): Expose application workload type * feat(application): support daemonSet workload type and add default valuepull/4053/head
parent
c9e8021fe8
commit
833abb24cb
|
@ -107,7 +107,14 @@
|
|||
</a>
|
||||
</th>
|
||||
<th>
|
||||
Deployment
|
||||
<a ng-click="$ctrl.changeOrderBy('ApplicationType')">
|
||||
Application Type
|
||||
<i class="fa fa-sort-alpha-down" aria-hidden="true" ng-if="$ctrl.state.orderBy === 'ApplicationType' && !$ctrl.state.reverseOrder"></i>
|
||||
<i class="fa fa-sort-alpha-up" aria-hidden="true" ng-if="$ctrl.state.orderBy === 'ApplicationType' && $ctrl.state.reverseOrder"></i>
|
||||
</a>
|
||||
</th>
|
||||
<th>
|
||||
Status
|
||||
</th>
|
||||
<th>
|
||||
Publishing mode
|
||||
|
@ -141,6 +148,7 @@
|
|||
<a ui-sref="kubernetes.resourcePools.resourcePool({ id: item.ResourcePool })">{{ item.ResourcePool }}</a>
|
||||
</td>
|
||||
<td>{{ item.Image }}</td>
|
||||
<td>{{ item.ApplicationType | kubernetesApplicationTypeText }}</td>
|
||||
<td>
|
||||
<span ng-if="item.DeploymentType === $ctrl.KubernetesApplicationDeploymentTypes.REPLICATED">Replicated</span>
|
||||
<span ng-if="item.DeploymentType === $ctrl.KubernetesApplicationDeploymentTypes.GLOBAL">Global</span>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import _ from 'lodash-es';
|
||||
import { KubernetesApplicationDataAccessPolicies } from 'Kubernetes/models/application/models';
|
||||
import { KubernetesServiceTypes } from 'Kubernetes/models/service/models';
|
||||
import { KubernetesApplicationTypes, KubernetesApplicationTypeStrings } from 'Kubernetes/models/application/models';
|
||||
|
||||
angular
|
||||
.module('portainer.kubernetes')
|
||||
|
@ -45,6 +46,21 @@ angular
|
|||
}
|
||||
};
|
||||
})
|
||||
.filter('kubernetesApplicationTypeText', function () {
|
||||
'use strict';
|
||||
return function (type) {
|
||||
switch (type) {
|
||||
case KubernetesApplicationTypes.DEPLOYMENT:
|
||||
return KubernetesApplicationTypeStrings.DEPLOYMENT;
|
||||
case KubernetesApplicationTypes.DAEMONSET:
|
||||
return KubernetesApplicationTypeStrings.DAEMONSET;
|
||||
case KubernetesApplicationTypes.STATEFULSET:
|
||||
return KubernetesApplicationTypeStrings.STATEFULSET;
|
||||
default:
|
||||
return '-';
|
||||
}
|
||||
};
|
||||
})
|
||||
.filter('kubernetesApplicationCPUValue', function () {
|
||||
'use strict';
|
||||
return function (value) {
|
||||
|
|
|
@ -36,7 +36,13 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Deployment</td>
|
||||
<td>Application Type</td>
|
||||
<td>
|
||||
{{ ctrl.application.ApplicationType | kubernetesApplicationTypeText }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Status</td>
|
||||
<td>
|
||||
<span ng-if="ctrl.application.DeploymentType === ctrl.KubernetesApplicationDeploymentTypes.REPLICATED">Replicated</span>
|
||||
<span ng-if="ctrl.application.DeploymentType === ctrl.KubernetesApplicationDeploymentTypes.GLOBAL">Global</span>
|
||||
|
|
Loading…
Reference in New Issue