Compare commits

...

5 Commits

Author SHA1 Message Date
yi-portainer
51295e481a * bump the APIVersion to 2.0.1 2021-01-07 14:28:52 +13:00
Yi Chen
b78d804881 Revert "chore(build): bump Kompose version (#4475)" (#4676)
This reverts commit 380f106571.

Co-authored-by: Stéphane Busso <sbusso@users.noreply.github.com>
2020-12-30 23:03:43 +13:00
Anthony Lapenna
51b72c12f9 fix(docker/stack-details): do not display editor tab for external stack (#4650) 2020-12-23 14:45:32 +13:00
Yi Chen
58c04bdbe3 + silently continue when downloading artifacts in windows (#4637) 2020-12-22 13:47:11 +13:00
cong meng
a6320d5222 fix(frontend) unable to retrieve config map error when trying to manage newly created resource pool (ce#180) (#4618)
* fix(frontend) unable to retrieve config map error when trying to manage newly created resource pool (ce#180)

* fix(frontend) rephrase comments (#4629)

Co-authored-by: Stéphane Busso <sbusso@users.noreply.github.com>

Co-authored-by: Simon Meng <simon.meng@portainer.io>
Co-authored-by: Stéphane Busso <sbusso@users.noreply.github.com>
2020-12-22 13:38:54 +13:00
7 changed files with 19 additions and 5 deletions

View File

@@ -1119,7 +1119,7 @@ type (
const (
// APIVersion is the version number of the Portainer API
APIVersion = "2.0.0"
APIVersion = "2.0.1"
// DBVersion is the version number of the Portainer database
DBVersion = 25
// AssetsServerURL represents the URL of the Portainer asset server

View File

@@ -28,8 +28,19 @@ class KubernetesConfigMapService {
this.KubernetesConfigMaps(namespace).get(params).$promise,
this.KubernetesConfigMaps(namespace).getYaml(params).$promise,
]);
const configMap = KubernetesConfigMapConverter.apiToConfigMap(rawPromise.value, yamlPromise.value);
return configMap;
if (_.get(rawPromise, 'reason.status') == 404 && _.get(yamlPromise, 'reason.status') == 404) {
return KubernetesConfigMapConverter.defaultConfigMap(namespace, name);
}
// Saving binary data to 'data' field in configMap Object is not allowed by kubernetes and getYaml() may get
// an error. We should keep binary data to 'binaryData' field instead of 'data'. Before that, we
// use response from get() and ignore 500 error as a workaround.
if (rawPromise.value) {
return KubernetesConfigMapConverter.apiToConfigMap(rawPromise.value, yamlPromise.value);
}
throw new PortainerError('Unable to retrieve config map ', name);
} catch (err) {
if (err.status === 404) {
return KubernetesConfigMapConverter.defaultConfigMap(namespace, name);

View File

@@ -89,7 +89,7 @@
</uib-tab>
<!-- !tab-info -->
<!-- tab-file -->
<uib-tab index="1" select="showEditor()">
<uib-tab index="1" select="showEditor()" ng-if="!state.externalStack">
<uib-tab-heading> <i class="fa fa-pencil-alt space-right" aria-hidden="true"></i> Editor </uib-tab-heading>
<form class="form-horizontal" ng-if="state.showEditorTab" style="margin-top: 10px;">
<div class="form-group">

View File

@@ -3,6 +3,7 @@ param (
)
$ErrorActionPreference = "Stop";
$ProgressPreference = "SilentlyContinue";
New-Item -Path "docker-binary" -ItemType Directory | Out-Null

View File

@@ -3,5 +3,6 @@ param (
)
$ErrorActionPreference = "Stop";
$ProgressPreference = "SilentlyContinue";
Invoke-WebRequest -O "dist/kompose.exe" "https://github.com/kubernetes/kompose/releases/download/$($kompose_version)/kompose-windows-amd64.exe"

View File

@@ -3,5 +3,6 @@ param (
)
$ErrorActionPreference = "Stop";
$ProgressPreference = "SilentlyContinue";
Invoke-WebRequest -O "dist/kubectl.exe" "https://storage.googleapis.com/kubernetes-release/release/$($kubectl_version)/bin/windows/amd64/kubectl.exe"

View File

@@ -19,7 +19,7 @@ module.exports = function (grunt) {
binaries: {
dockerLinuxVersion: '18.09.3',
dockerWindowsVersion: '17.09.0-ce',
komposeVersion: 'v1.22.0',
komposeVersion: 'v1.21.0',
kubectlVersion: 'v1.18.0',
},
config: gruntfile_cfg.config,