Merge branch 'release/2.5' into develop
commit
2270de73ee
|
@ -77,5 +77,5 @@ func (handler *Handler) proxyRequestsToKubernetesAPI(w http.ResponseWriter, r *h
|
||||||
}
|
}
|
||||||
|
|
||||||
func isKubernetesRequest(requestURL string) bool {
|
func isKubernetesRequest(requestURL string) bool {
|
||||||
return strings.HasPrefix(requestURL, "/api")
|
return strings.HasPrefix(requestURL, "/api") || strings.HasPrefix(requestURL, "/healthz")
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,9 @@ export class EditEdgeStackFormController {
|
||||||
}
|
}
|
||||||
|
|
||||||
editorUpdate(cm) {
|
editorUpdate(cm) {
|
||||||
this.model.StackFileContent = cm.getValue();
|
if (this.model.StackFileContent.replace(/(\r\n|\n|\r)/gm, '') !== cm.getValue().replace(/(\r\n|\n|\r)/gm, '')) {
|
||||||
this.isEditorDirty = true;
|
this.model.StackFileContent = cm.getValue();
|
||||||
|
this.isEditorDirty = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,8 +43,10 @@ class KubernetesConfigurationDataController {
|
||||||
}
|
}
|
||||||
|
|
||||||
async editorUpdateAsync(cm) {
|
async editorUpdateAsync(cm) {
|
||||||
this.formValues.DataYaml = cm.getValue();
|
if (this.formValues.DataYaml !== cm.getValue()) {
|
||||||
this.isEditorDirty = true;
|
this.formValues.DataYaml = cm.getValue();
|
||||||
|
this.isEditorDirty = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
editorUpdate(cm) {
|
editorUpdate(cm) {
|
||||||
|
|
|
@ -96,8 +96,10 @@ class EditCustomTemplateViewController {
|
||||||
}
|
}
|
||||||
|
|
||||||
editorUpdate(cm) {
|
editorUpdate(cm) {
|
||||||
this.formValues.FileContent = cm.getValue();
|
if (this.formValues.FileContent.replace(/(\r\n|\n|\r)/gm, '') !== cm.getValue().replace(/(\r\n|\n|\r)/gm, '')) {
|
||||||
this.state.isEditorDirty = true;
|
this.formValues.FileContent = cm.getValue();
|
||||||
|
this.state.isEditorDirty = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async uiCanExit() {
|
async uiCanExit() {
|
||||||
|
|
|
@ -201,12 +201,11 @@ angular.module('portainer.app').controller('StackController', [
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.editorUpdate = function (cm) {
|
$scope.editorUpdate = function (cm) {
|
||||||
if ($scope.stackFileContent !== cm.getValue()) {
|
if ($scope.stackFileContent.replace(/(\r\n|\n|\r)/gm, '') !== cm.getValue().replace(/(\r\n|\n|\r)/gm, '')) {
|
||||||
$scope.state.isEditorDirty = true;
|
$scope.state.isEditorDirty = true;
|
||||||
|
$scope.stackFileContent = cm.getValue();
|
||||||
|
$scope.state.yamlError = StackHelper.validateYAML($scope.stackFileContent, $scope.containerNames);
|
||||||
}
|
}
|
||||||
$scope.stackFileContent = cm.getValue();
|
|
||||||
$scope.state.yamlError = StackHelper.validateYAML($scope.stackFileContent, $scope.containerNames);
|
|
||||||
$scope.state.isEditorDirty = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.stopStack = stopStack;
|
$scope.stopStack = stopStack;
|
||||||
|
@ -269,8 +268,7 @@ angular.module('portainer.app').controller('StackController', [
|
||||||
var stack = data.stack;
|
var stack = data.stack;
|
||||||
$scope.groups = data.groups;
|
$scope.groups = data.groups;
|
||||||
$scope.stack = stack;
|
$scope.stack = stack;
|
||||||
$scope.containers = data.containers;
|
$scope.containerNames = ContainerHelper.getContainerNames(data.containers);
|
||||||
$scope.containerNames = ContainerHelper.getContainerNames($scope.containers);
|
|
||||||
|
|
||||||
let resourcesPromise = Promise.resolve({});
|
let resourcesPromise = Promise.resolve({});
|
||||||
if (stack.Status === 1) {
|
if (stack.Status === 1) {
|
||||||
|
|
Loading…
Reference in New Issue