Skip to content

Commit

Permalink
Always set progress to 100 when upload completes
Browse files Browse the repository at this point in the history
  • Loading branch information
jmthomas committed Jul 29, 2024
1 parent 632f65c commit 267fafc
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion openc3-cosmos-cmd-tlm-api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ USER root
RUN bundle config set --local without 'development' \
&& bundle install --quiet \
# Temporary until grpc updated
&& gem uninstall google-protobuf -v "!= 3.24.0" --all \
# && gem uninstall google-protobuf -v "!= 3.24.0" --all \
&& rm Gemfile.lock \
&& rm -rf /usr/lib/ruby/gems/*/cache/* \
/var/cache/apk/* \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ export default {
})
Promise.all(promises)
.then((responses) => {
this.progress = 100
this.alert = `Uploaded ${responses.length} package${
responses.length > 1 ? 's' : ''
}`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,13 +373,13 @@ export default {
this.update()
}, 5000)
}
},
}
)
},
formatDate(nanoSecs) {
return format(
toDate(parseInt(nanoSecs) / 1_000_000),
'yyyy-MM-dd HH:mm:ss.SSS',
'yyyy-MM-dd HH:mm:ss.SSS'
)
},
upload: function (existing = null) {
Expand All @@ -395,13 +395,14 @@ export default {
headers: { 'Content-Type': 'multipart/form-data' },
onUploadProgress: function (progressEvent) {
var percentCompleted = Math.round(
(progressEvent.loaded * 100) / progressEvent.total,
(progressEvent.loaded * 100) / progressEvent.total
)
self.progress = percentCompleted
},
})
promise
.then((response) => {
this.progress = 100
this.alert = 'Uploaded file'
this.alertType = 'success'
this.showAlert = true
Expand Down Expand Up @@ -574,7 +575,7 @@ export default {
{
okText: 'Ok',
cancelText: 'Cancel',
},
}
)
.then(() => {
this.upload(this.currentPlugin)
Expand All @@ -601,7 +602,7 @@ export default {
{
okText: 'Ok',
cancelText: 'Cancel',
},
}
)
.then(() => {
this.upload(this.currentPlugin)
Expand Down
2 changes: 1 addition & 1 deletion openc3-cosmos-script-runner-api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ USER root
RUN bundle config set --local without 'development' \
&& bundle install --quiet \
# Temporary until grpc updated
&& gem uninstall google-protobuf -v "!= 3.24.0" --all \
# && gem uninstall google-protobuf -v "!= 3.24.0" --all \
&& rm Gemfile.lock \
&& rm -rf /usr/lib/ruby/gems/*/cache/* \
/var/cache/apk/* \
Expand Down
8 changes: 4 additions & 4 deletions openc3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ RUN mkdir -p lib/openc3/ext \
&& mv *.gem gems/. \
# TODO: Remove google-protobuf / grpc manually install once grpc fixed
# Uninstall twice is intentional because --all doesn't work
&& gem install google-protobuf -v 3.24.0 --platform ruby \
&& gem install grpc -v 1.59.2 \
&& gem uninstall google-protobuf -v "!= 3.24.0" --all \
&& gem uninstall google-protobuf -v "!= 3.24.0" --all \
# && gem install google-protobuf -v 3.24.0 --platform ruby \
# && gem install grpc -v 1.59.2 \
# && gem uninstall google-protobuf -v "!= 3.24.0" --all \
# && gem uninstall google-protobuf -v "!= 3.24.0" --all \
&& gem cleanup \
&& rm -rf /usr/lib/ruby/gems/*/cache/* /var/cache/apk/* /tmp/* /var/tmp/*

Expand Down

0 comments on commit 267fafc

Please sign in to comment.