feat(dashboard) remove environment url from dashboard EE-2849 (#6955)

* EE-2849 remove environment url from dashboard

* EE-2849 only remove edge env's url

* EE-2849 remove logging
pull/6977/head
Chao Geng 3 years ago committed by GitHub
parent b031a30f62
commit 3aacaa7caf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -51,7 +51,7 @@
> >
</td> </td>
</tr> </tr>
<tr> <tr ng-if="showEnvUrl">
<td>URL</td> <td>URL</td>
<td>{{ endpoint.URL | stripprotocol }}</td> <td>{{ endpoint.URL | stripprotocol }}</td>
</tr> </tr>

@ -2,6 +2,7 @@ import angular from 'angular';
import _ from 'lodash'; import _ from 'lodash';
import { isOfflineEndpoint } from '@/portainer/helpers/endpointHelper'; import { isOfflineEndpoint } from '@/portainer/helpers/endpointHelper';
import { PortainerEndpointTypes } from 'Portainer/models/endpoint/models';
angular.module('portainer.docker').controller('DashboardController', [ angular.module('portainer.docker').controller('DashboardController', [
'$scope', '$scope',
@ -46,7 +47,7 @@ angular.module('portainer.docker').controller('DashboardController', [
$scope.endpoint = endpoint; $scope.endpoint = endpoint;
$scope.showStacks = await shouldShowStacks(); $scope.showStacks = await shouldShowStacks();
$scope.showEnvUrl = endpoint.Type !== PortainerEndpointTypes.EdgeAgentOnDockerEnvironment && endpoint.Type !== PortainerEndpointTypes.EdgeAgentOnKubernetesEnvironment;
$q.all({ $q.all({
containers: ContainerService.containers(1), containers: ContainerService.containers(1),
images: ImageService.images(false), images: ImageService.images(false),

@ -16,7 +16,7 @@
{{ ctrl.endpoint.Name }} {{ ctrl.endpoint.Name }}
</td> </td>
</tr> </tr>
<tr> <tr ng-if="ctrl.showEnvUrl">
<td>URL</td> <td>URL</td>
<td>{{ ctrl.endpoint.URL | stripprotocol }}</td> <td>{{ ctrl.endpoint.URL | stripprotocol }}</td>
</tr> </tr>

@ -2,6 +2,7 @@ import angular from 'angular';
import _ from 'lodash-es'; import _ from 'lodash-es';
import KubernetesConfigurationHelper from 'Kubernetes/helpers/configurationHelper'; import KubernetesConfigurationHelper from 'Kubernetes/helpers/configurationHelper';
import KubernetesNamespaceHelper from 'Kubernetes/helpers/namespaceHelper'; import KubernetesNamespaceHelper from 'Kubernetes/helpers/namespaceHelper';
import { PortainerEndpointTypes } from 'Portainer/models/endpoint/models';
class KubernetesDashboardController { class KubernetesDashboardController {
/* @ngInject */ /* @ngInject */
@ -34,6 +35,7 @@ class KubernetesDashboardController {
async getAllAsync() { async getAllAsync() {
const isAdmin = this.Authentication.isAdmin(); const isAdmin = this.Authentication.isAdmin();
const storageClasses = this.endpoint.Kubernetes.Configuration.StorageClasses; const storageClasses = this.endpoint.Kubernetes.Configuration.StorageClasses;
this.showEnvUrl = this.endpoint.Type !== PortainerEndpointTypes.EdgeAgentOnDockerEnvironment && this.endpoint.Type !== PortainerEndpointTypes.EdgeAgentOnKubernetesEnvironment;
try { try {
const [pools, applications, configurations, volumes, tags] = await Promise.all([ const [pools, applications, configurations, volumes, tags] = await Promise.all([

Loading…
Cancel
Save