From 0bc990faf4553636815d2838f5d05d25b488ac65 Mon Sep 17 00:00:00 2001 From: Sonja Happ Date: Fri, 22 Jan 2021 11:30:04 +0100 Subject: [PATCH 1/2] treat case where upload progress is not known --- src/file/edit-files.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/file/edit-files.js b/src/file/edit-files.js index 8cc3421..af5d251 100644 --- a/src/file/edit-files.js +++ b/src/file/edit-files.js @@ -40,7 +40,7 @@ class EditFilesDialog extends React.Component { } onClose() { - + this.props.onClose(); } @@ -66,7 +66,12 @@ class EditFilesDialog extends React.Component { }; updateUploadProgress = (event) => { - this.setState({ uploadProgress: parseInt(event.percent.toFixed(), 10) }); + if (event.hasOwnProperty("percent")){ + this.setState({ uploadProgress: parseInt(event.percent.toFixed(), 10) }); + } else { + this.setState({ uploadProgress: 0 }); + } + }; clearProgress = (newFileID) => { @@ -83,7 +88,7 @@ class EditFilesDialog extends React.Component { }; closeEditModal(){ - + this.setState({editModal: false}); } @@ -167,7 +172,7 @@ class EditFilesDialog extends React.Component { - + ); } } From a6d25617c1b02fdcbd544ab15e863a19aa037b17 Mon Sep 17 00:00:00 2001 From: Sonja Happ Date: Fri, 22 Jan 2021 11:33:01 +0100 Subject: [PATCH 2/2] CI: use branch name instead of commit to tag images, deactivate kaniko cache --- .gitlab-ci.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d892544..e8ae18b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,6 @@ variables: GIT_SUBMODULE_STRATEGY: normal - DOCKER_TAG: ${CI_COMMIT_SHORT_SHA} + DOCKER_TAG: ${CI_COMMIT_BRANCH} DOCKER_IMAGE: ${CI_REGISTRY_IMAGE} cache: @@ -42,8 +42,5 @@ deploy: --dockerfile ${CI_PROJECT_DIR}/Dockerfile --destination ${DOCKER_IMAGE}:${DOCKER_TAG} --snapshotMode=redo - --cache=true - --cache-ttl=12h - only: - refs: - - master + dependencies: + - build