1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-02 20:35:25 +02:00

feat(services): rollback service capability (#3057)

* feat(services): rollback service capability

* refactor(services): notification reword

Co-Authored-By: William <william.conquest@portainer.io>

* refactor(services): remove TODO comment + add note on rollback capability

* fix(services): service update rpc error version out of sync

* feat(services): confirmation modal on rollback

* feat(services): rpc error no previous spec message
This commit is contained in:
xAt0mZ 2019-09-10 00:56:57 +02:00 committed by Anthony Lapenna
parent ec19faaa24
commit 52704e681b
4 changed files with 70 additions and 12 deletions

View file

@ -14,19 +14,13 @@ function ServiceFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider, Htt
method: 'POST', params: {action: 'create'},
headers: {
'X-Registry-Auth': HttpRequestHelper.registryAuthenticationHeader,
// TODO: This is a temporary work-around that allows us to leverage digest pinning on
// the Docker daemon side. It has been moved client-side since Docker API version > 1.29.
// We should introduce digest pinning in Portainer as well.
'version': '1.29'
},
ignoreLoadingBar: true
},
update: {
method: 'POST', params: { id: '@id', action: 'update', version: '@version' },
method: 'POST', params: { id: '@id', action: 'update', version: '@version', rollback: '@rollback' },
headers: {
// TODO: This is a temporary work-around that allows us to leverage digest pinning on
// the Docker daemon side. It has been moved client-side since Docker API version > 1.29.
// We should introduce digest pinning in Portainer as well.
'version': '1.29'
}
},