Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7c2fcb67eb | ||
|
|
2eb4453487 | ||
|
|
535e499cc5 | ||
|
|
fee315b07e | ||
|
|
d1166b5294 |
@@ -945,6 +945,6 @@
|
||||
}
|
||||
],
|
||||
"version": {
|
||||
"VERSION": "{\"SchemaVersion\":\"2.18.1\",\"MigratorCount\":0,\"Edition\":1,\"InstanceID\":\"463d5c47-0ea5-4aca-85b1-405ceefee254\"}"
|
||||
"VERSION": "{\"SchemaVersion\":\"2.18.2\",\"MigratorCount\":0,\"Edition\":1,\"InstanceID\":\"463d5c47-0ea5-4aca-85b1-405ceefee254\"}"
|
||||
}
|
||||
}
|
||||
@@ -82,7 +82,7 @@ type Handler struct {
|
||||
}
|
||||
|
||||
// @title PortainerCE API
|
||||
// @version 2.18.1
|
||||
// @version 2.18.2
|
||||
// @description.markdown api-description.md
|
||||
// @termsOfService
|
||||
|
||||
|
||||
@@ -150,6 +150,7 @@ func createStackPayloadFromSwarmGitPayload(name, swarmID, repoUrl, repoReference
|
||||
Authentication: repoAuthentication,
|
||||
Username: repoUsername,
|
||||
Password: repoPassword,
|
||||
TLSSkipVerify: repoSkipSSLVerify,
|
||||
},
|
||||
ComposeFile: composeFile,
|
||||
AdditionalFiles: additionalFiles,
|
||||
|
||||
@@ -25,6 +25,7 @@ type stackGitUpdatePayload struct {
|
||||
RepositoryAuthentication bool
|
||||
RepositoryUsername string
|
||||
RepositoryPassword string
|
||||
TLSSkipVerify bool
|
||||
}
|
||||
|
||||
func (payload *stackGitUpdatePayload) Validate(r *http.Request) error {
|
||||
@@ -138,6 +139,7 @@ func (handler *Handler) stackUpdateGit(w http.ResponseWriter, r *http.Request) *
|
||||
|
||||
//update retrieved stack data based on the payload
|
||||
stack.GitConfig.ReferenceName = payload.RepositoryReferenceName
|
||||
stack.GitConfig.TLSSkipVerify = payload.TLSSkipVerify
|
||||
stack.AutoUpdate = payload.AutoUpdate
|
||||
stack.Env = payload.Env
|
||||
stack.UpdatedBy = user.Username
|
||||
|
||||
@@ -31,6 +31,7 @@ type kubernetesGitStackUpdatePayload struct {
|
||||
RepositoryUsername string
|
||||
RepositoryPassword string
|
||||
AutoUpdate *portainer.AutoUpdateSettings
|
||||
TLSSkipVerify bool
|
||||
}
|
||||
|
||||
func (payload *kubernetesFileStackUpdatePayload) Validate(r *http.Request) error {
|
||||
@@ -62,6 +63,7 @@ func (handler *Handler) updateKubernetesStack(r *http.Request, stack *portainer.
|
||||
}
|
||||
|
||||
stack.GitConfig.ReferenceName = payload.RepositoryReferenceName
|
||||
stack.GitConfig.TLSSkipVerify = payload.TLSSkipVerify
|
||||
stack.AutoUpdate = payload.AutoUpdate
|
||||
|
||||
if payload.RepositoryAuthentication {
|
||||
|
||||
@@ -1514,7 +1514,7 @@ type (
|
||||
|
||||
const (
|
||||
// APIVersion is the version number of the Portainer API
|
||||
APIVersion = "2.18.1"
|
||||
APIVersion = "2.18.2"
|
||||
// Edition is what this edition of Portainer is called
|
||||
Edition = PortainerCE
|
||||
// ComposeSyntaxMaxVersion is a maximum supported version of the docker compose syntax
|
||||
|
||||
@@ -45,6 +45,7 @@ class KubernetesRedeployAppGitFormController {
|
||||
this.onChangeRef = this.onChangeRef.bind(this);
|
||||
this.onChangeAutoUpdate = this.onChangeAutoUpdate.bind(this);
|
||||
this.onChangeGitAuth = this.onChangeGitAuth.bind(this);
|
||||
this.onChangeTLSSkipVerify = this.onChangeTLSSkipVerify.bind(this);
|
||||
}
|
||||
|
||||
onChangeRef(value) {
|
||||
@@ -68,6 +69,12 @@ class KubernetesRedeployAppGitFormController {
|
||||
});
|
||||
}
|
||||
|
||||
onChangeTLSSkipVerify(value) {
|
||||
return this.$async(async () => {
|
||||
this.onChange({ TLSSkipVerify: value });
|
||||
});
|
||||
}
|
||||
|
||||
async onChangeAutoUpdate(values) {
|
||||
return this.$async(async () => {
|
||||
await this.onChange({
|
||||
@@ -152,6 +159,7 @@ class KubernetesRedeployAppGitFormController {
|
||||
|
||||
$onInit() {
|
||||
this.formValues.RefName = this.stack.GitConfig.ReferenceName;
|
||||
this.formValues.TLSSkipVerify = this.stack.GitConfig.TLSSkipVerify;
|
||||
|
||||
this.formValues.AutoUpdate = parseAutoUpdateResponse(this.stack.AutoUpdate);
|
||||
|
||||
|
||||
@@ -43,6 +43,19 @@
|
||||
is-auth-edit="$ctrl.state.isAuthEdit"
|
||||
></git-form-auth-fieldset>
|
||||
|
||||
<div class="form-group" ng-if="$ctrl.state.showConfig">
|
||||
<div class="col-sm-12">
|
||||
<por-switch-field
|
||||
name="TLSSkipVerify"
|
||||
checked="$ctrl.formValues.TLSSkipVerify"
|
||||
tooltip="'Enabling this will allow skipping TLS validation for any self-signed certificate.'"
|
||||
label-class="'col-sm-3 col-lg-2'"
|
||||
label="'Skip TLS Verification'"
|
||||
on-change="($ctrl.onChangeTLSSkipVerify)"
|
||||
></por-switch-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 form-section-title"> Actions </div>
|
||||
<!-- #Git buttons -->
|
||||
<button
|
||||
@@ -61,6 +74,7 @@
|
||||
</span>
|
||||
<span ng-show="$ctrl.state.redeployInProgress">In progress...</span>
|
||||
</button>
|
||||
|
||||
<button
|
||||
class="btn btn-sm btn-primary"
|
||||
ng-click="$ctrl.saveGitSettings()"
|
||||
|
||||
@@ -55,6 +55,7 @@ class StackRedeployGitFormController {
|
||||
this.onChangeEnvVar = this.onChangeEnvVar.bind(this);
|
||||
this.onChangeOption = this.onChangeOption.bind(this);
|
||||
this.onChangeGitAuth = this.onChangeGitAuth.bind(this);
|
||||
this.onChangeTLSSkipVerify = this.onChangeTLSSkipVerify.bind(this);
|
||||
}
|
||||
|
||||
buildAnalyticsProperties() {
|
||||
@@ -94,6 +95,10 @@ class StackRedeployGitFormController {
|
||||
this.onChange({ Env: value });
|
||||
}
|
||||
|
||||
onChangeTLSSkipVerify(value) {
|
||||
this.onChange({ TLSSkipVerify: value });
|
||||
}
|
||||
|
||||
onChangeOption(values) {
|
||||
this.onChange({
|
||||
Option: {
|
||||
@@ -189,6 +194,7 @@ class StackRedeployGitFormController {
|
||||
|
||||
async $onInit() {
|
||||
this.formValues.RefName = this.model.ReferenceName;
|
||||
this.formValues.TLSSkipVerify = this.model.TLSSkipVerify;
|
||||
this.formValues.Env = this.stack.Env;
|
||||
|
||||
if (this.stack.Option) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<form name="$ctrl.redeployGitForm" class="form-horizontal my-8">
|
||||
<div class="col-sm-12 form-section-title"> Redeploy from git repository </div>
|
||||
|
||||
<git-form-info-panel
|
||||
class-name="'text-muted small'"
|
||||
url="$ctrl.model.URL"
|
||||
@@ -17,6 +18,7 @@
|
||||
webhook-id="{{ $ctrl.state.webhookId }}"
|
||||
webhooks-docs="https://docs.portainer.io/user/docker/stacks/webhooks"
|
||||
></git-form-auto-update-fieldset>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12">
|
||||
<p>
|
||||
@@ -37,6 +39,7 @@
|
||||
is-url-valid="true"
|
||||
stack-id="$ctrl.gitStackId"
|
||||
></git-form-ref-field>
|
||||
|
||||
<git-form-auth-fieldset
|
||||
ng-if="$ctrl.state.showConfig"
|
||||
value="$ctrl.formValues"
|
||||
@@ -45,12 +48,26 @@
|
||||
is-auth-edit="$ctrl.state.isAuthEdit"
|
||||
></git-form-auth-fieldset>
|
||||
|
||||
<div class="form-group" ng-if="$ctrl.state.showConfig">
|
||||
<div class="col-sm-12">
|
||||
<por-switch-field
|
||||
name="TLSSkipVerify"
|
||||
checked="$ctrl.formValues.TLSSkipVerify"
|
||||
tooltip="'Enabling this will allow skipping TLS validation for any self-signed certificate.'"
|
||||
label-class="'col-sm-3 col-lg-2'"
|
||||
label="'Skip TLS Verification'"
|
||||
on-change="($ctrl.onChangeTLSSkipVerify)"
|
||||
></por-switch-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<environment-variables-panel
|
||||
ng-model="$ctrl.formValues.Env"
|
||||
explanation="These values will be used as substitutions in the stack file"
|
||||
on-change="($ctrl.onChangeEnvVar)"
|
||||
show-help-message="true"
|
||||
></environment-variables-panel>
|
||||
|
||||
<option-panel ng-if="$ctrl.stack.Type === 1 && $ctrl.endpoint.apiVersion >= 1.27" ng-model="$ctrl.formValues.Option" on-change="($ctrl.onChangeOption)"></option-panel>
|
||||
|
||||
<div class="col-sm-12 form-section-title"> Actions </div>
|
||||
|
||||
@@ -42,7 +42,8 @@ function getBaseUrl() {
|
||||
const port = parseInt(window.location.port, 10);
|
||||
const displayPort =
|
||||
(protocol === 'http' && port === 80) ||
|
||||
(protocol === 'https' && port === 443)
|
||||
(protocol === 'https' && port === 443) ||
|
||||
Number.isNaN(port)
|
||||
? ''
|
||||
: `:${port}`;
|
||||
return `${protocol}://${hostname}${displayPort}${baseHref()}`;
|
||||
|
||||
@@ -284,6 +284,7 @@ angular.module('portainer.app').factory('StackService', [
|
||||
RepositoryAuthentication: gitConfig.RepositoryAuthentication,
|
||||
RepositoryUsername: gitConfig.RepositoryUsername,
|
||||
RepositoryPassword: gitConfig.RepositoryPassword,
|
||||
TLSSkipVerify: gitConfig.TLSSkipVerify,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -468,6 +469,7 @@ angular.module('portainer.app').factory('StackService', [
|
||||
RepositoryUsername: gitConfig.RepositoryUsername,
|
||||
RepositoryPassword: gitConfig.RepositoryPassword,
|
||||
Prune: gitConfig.Option.Prune,
|
||||
TLSSkipVerify: gitConfig.TLSSkipVerify,
|
||||
}
|
||||
).$promise;
|
||||
};
|
||||
|
||||
@@ -11,7 +11,7 @@ function RegistryModalService(RegistryService) {
|
||||
const defaultValue = _.get(registryModel, 'Registry.Id', 0);
|
||||
|
||||
const registryId = await selectRegistry(registries, defaultValue);
|
||||
if (!registryId) {
|
||||
if (registryId === undefined) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
<code-editor
|
||||
read-only="orphaned"
|
||||
identifier="stack-editor"
|
||||
placeholder="# Define or paste the content of your docker compose file here"
|
||||
placeholder="Define or paste the content of your docker compose file here"
|
||||
yml="true"
|
||||
on-change="(editorUpdate)"
|
||||
value="stackFileContent"
|
||||
|
||||
@@ -72,5 +72,5 @@
|
||||
}
|
||||
|
||||
.root :global(.cm-content[contenteditable='true']) {
|
||||
@apply h-full;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"author": "Portainer.io",
|
||||
"name": "portainer",
|
||||
"homepage": "http://portainer.io",
|
||||
"version": "2.18.1",
|
||||
"version": "2.18.2",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:portainer/portainer.git"
|
||||
|
||||
Reference in New Issue
Block a user