|
|
@ -14,7 +14,8 @@ class KubernetesDashboardController {
|
|
|
|
KubernetesConfigurationService,
|
|
|
|
KubernetesConfigurationService,
|
|
|
|
KubernetesVolumeService,
|
|
|
|
KubernetesVolumeService,
|
|
|
|
KubernetesNamespaceHelper,
|
|
|
|
KubernetesNamespaceHelper,
|
|
|
|
Authentication
|
|
|
|
Authentication,
|
|
|
|
|
|
|
|
TagService
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
this.$async = $async;
|
|
|
|
this.$async = $async;
|
|
|
|
this.Notifications = Notifications;
|
|
|
|
this.Notifications = Notifications;
|
|
|
@ -26,6 +27,7 @@ class KubernetesDashboardController {
|
|
|
|
this.KubernetesVolumeService = KubernetesVolumeService;
|
|
|
|
this.KubernetesVolumeService = KubernetesVolumeService;
|
|
|
|
this.KubernetesNamespaceHelper = KubernetesNamespaceHelper;
|
|
|
|
this.KubernetesNamespaceHelper = KubernetesNamespaceHelper;
|
|
|
|
this.Authentication = Authentication;
|
|
|
|
this.Authentication = Authentication;
|
|
|
|
|
|
|
|
this.TagService = TagService;
|
|
|
|
|
|
|
|
|
|
|
|
this.onInit = this.onInit.bind(this);
|
|
|
|
this.onInit = this.onInit.bind(this);
|
|
|
|
this.getAll = this.getAll.bind(this);
|
|
|
|
this.getAll = this.getAll.bind(this);
|
|
|
@ -37,17 +39,31 @@ class KubernetesDashboardController {
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
const endpointId = this.EndpointProvider.endpointID();
|
|
|
|
const endpointId = this.EndpointProvider.endpointID();
|
|
|
|
const [endpoint, pools, applications, configurations, volumes] = await Promise.all([
|
|
|
|
const [endpoint, pools, applications, configurations, volumes, tags] = await Promise.all([
|
|
|
|
this.EndpointService.endpoint(endpointId),
|
|
|
|
this.EndpointService.endpoint(endpointId),
|
|
|
|
this.KubernetesResourcePoolService.get(),
|
|
|
|
this.KubernetesResourcePoolService.get(),
|
|
|
|
this.KubernetesApplicationService.get(),
|
|
|
|
this.KubernetesApplicationService.get(),
|
|
|
|
this.KubernetesConfigurationService.get(),
|
|
|
|
this.KubernetesConfigurationService.get(),
|
|
|
|
this.KubernetesVolumeService.get(),
|
|
|
|
this.KubernetesVolumeService.get(),
|
|
|
|
|
|
|
|
this.TagService.tags(),
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
this.endpoint = endpoint;
|
|
|
|
this.endpoint = endpoint;
|
|
|
|
this.applications = applications;
|
|
|
|
this.applications = applications;
|
|
|
|
this.volumes = volumes;
|
|
|
|
this.volumes = volumes;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.endpointTags = this.endpoint.TagIds.length
|
|
|
|
|
|
|
|
? _.join(
|
|
|
|
|
|
|
|
_.filter(
|
|
|
|
|
|
|
|
_.map(this.endpoint.TagIds, (id) => {
|
|
|
|
|
|
|
|
const tag = tags.find((tag) => tag.Id === id);
|
|
|
|
|
|
|
|
return tag ? tag.Name : '';
|
|
|
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
Boolean
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
', '
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
: '-';
|
|
|
|
|
|
|
|
|
|
|
|
if (!isAdmin) {
|
|
|
|
if (!isAdmin) {
|
|
|
|
this.pools = _.filter(pools, (pool) => {
|
|
|
|
this.pools = _.filter(pools, (pool) => {
|
|
|
|
return !this.KubernetesNamespaceHelper.isSystemNamespace(pool.Namespace.Name);
|
|
|
|
return !this.KubernetesNamespaceHelper.isSystemNamespace(pool.Namespace.Name);
|
|
|
|