diff --git a/app/scripts/controllers/addConfigVolume.js b/app/scripts/controllers/addConfigVolume.js index fa8e7cc74f..41755d41c8 100644 --- a/app/scripts/controllers/addConfigVolume.js +++ b/app/scripts/controllers/addConfigVolume.js @@ -62,6 +62,9 @@ angular.module('openshiftConsole') subpage: 'Add Config Files' }); + $scope.configMapVersion = APIService.getPreferredVersion('configmaps'); + $scope.secretVersion = APIService.getPreferredVersion('secrets'); + var humanizeKind = $filter('humanizeKind'); $scope.groupByKind = function(object) { return humanizeKind(object.kind); @@ -137,7 +140,7 @@ angular.module('openshiftConsole') } ); - DataService.list("configmaps", context, null, { errorNotification: false }).then(function(configMapData) { + DataService.list($scope.configMapVersion, context, null, { errorNotification: false }).then(function(configMapData) { $scope.configMaps = orderByDisplayName(configMapData.by("metadata.name")); }, function(e) { if (e.code === 403) { @@ -148,7 +151,7 @@ angular.module('openshiftConsole') displayError('Could not load config maps', getErrorDetails(e)); }); - DataService.list("secrets", context, null, { errorNotification: false }).then(function(secretData) { + DataService.list($scope.secretVersion, context, null, { errorNotification: false }).then(function(secretData) { $scope.secrets = orderByDisplayName(secretData.by("metadata.name")); }, function(e) { if (e.code === 403) { diff --git a/app/views/add-config-volume.html b/app/views/add-config-volume.html index 5b2cdfe765..7f5277b89e 100644 --- a/app/views/add-config-volume.html +++ b/app/views/add-config-volume.html @@ -11,7 +11,7 @@

The {{kind | humanizeKind}} could not be loaded.

-
+

No config maps or secrets.

@@ -22,7 +22,7 @@

No config maps or secrets.

Back to {{kind | humanizeKind}} {{name}}

-
+

Add Config Files to {{name}}

Add values from a config map or secret as volume. This will make the data available as files for {{kind | humanizeKind}} {{name}}. @@ -44,12 +44,12 @@

Add Config Files to {{name}}

-
- + diff --git a/dist/scripts/scripts.js b/dist/scripts/scripts.js index 4a169c6412..eb0b23d0e3 100644 --- a/dist/scripts/scripts.js +++ b/dist/scripts/scripts.js @@ -8466,7 +8466,7 @@ name: n.name, kind: n.kind, namespace: n.project, subpage: "Add Config Files" -}); +}), a.configMapVersion = o.getPreferredVersion("configmaps"), a.secretVersion = o.getPreferredVersion("secrets"); var h = e("humanizeKind"); a.groupByKind = function(e) { return h(e.kind); @@ -8507,13 +8507,13 @@ subpage: "Add Config Files" }); }, function(e) { a.error = e; -}), c.list("configmaps", r, null, { +}), c.list(a.configMapVersion, r, null, { errorNotification: !1 }).then(function(e) { a.configMaps = o(e.by("metadata.name")); }, function(e) { 403 !== e.code ? b("Could not load config maps", d(e)) : a.configMaps = []; -}), c.list("secrets", r, null, { +}), c.list(a.secretVersion, r, null, { errorNotification: !1 }).then(function(e) { a.secrets = o(e.by("metadata.name")); diff --git a/dist/scripts/templates.js b/dist/scripts/templates.js index afd10c6677..48de9ecbc2 100644 --- a/dist/scripts/templates.js +++ b/dist/scripts/templates.js @@ -828,14 +828,14 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function( "

{{error | getErrorDetails}}

\n" + "
\n" + "
\n" + - "
\n" + + "
\n" + "

No config maps or secrets.

\n" + "

\n" + "There are no config maps or secrets in project {{project | displayName}} to use as a volume for this {{kind | humanizeKind}}.\n" + "

\n" + "

Back to {{kind | humanizeKind}} {{name}}

\n" + "
\n" + - "
\n" + + "
\n" + "

Add Config Files to {{name}}

\n" + "
\n" + "Add values from a config map or secret as volume. This will make the data available as files for {{kind | humanizeKind}} {{name}}.\n" + @@ -855,12 +855,12 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function( "\n" + "\n" + "\n" + - "
\n" + - "\n" + + "
\n" + + "\n" + "Create Config Map\n" + "\n" + - "\n" + - "|\n" + + "\n" + + "|\n" + "Create Secret\n" + "\n" + "
\n" +