Merge pull request #5169 from betagouv/dev

This commit is contained in:
Pierre de La Morinerie 2020-05-18 14:41:19 +02:00 committed by GitHub
commit 7968ba44b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 3 deletions

View file

@ -1,7 +1,8 @@
import ProgressBar from './progress-bar';
import {
errorFromDirectUploadMessage,
FAILURE_CONNECTIVITY
ERROR_CODE_READ,
FAILURE_CLIENT
} from './file-upload-error';
import { fire } from '@utils';
@ -58,8 +59,10 @@ addUploadEventListener(ERROR_EVENT, (event) => {
ProgressBar.error(id, errorMsg);
// Report unexpected client errors to Sentry.
// (But ignore usual client errors, or errors we can monitor better on the server side.)
let error = errorFromDirectUploadMessage(errorMsg);
if (error.failureReason != FAILURE_CONNECTIVITY) {
if (error.failureReason == FAILURE_CLIENT && error.code != ERROR_CODE_READ) {
fire(document, 'sentry:capture-exception', error);
}
});

View file

@ -1,5 +1,8 @@
.procedure-logos
= image_tag procedure.logo_url, alt: "logo #{procedure.libelle}"
- procedure_logo_alt = ''
- if procedure.service.present?
- procedure_logo_alt = "#{procedure.service.nom} #{procedure.service.organisme}"
= image_tag procedure.logo_url, alt: procedure_logo_alt
- if procedure.euro_flag
= image_tag("flag_of_europe.svg", id: 'euro_flag', class: (!procedure.euro_flag ? "hidden" : ""))
%h1.procedure-title

View file

@ -32,3 +32,13 @@ task :post_deploy do
sh "mina post_deploy domain=#{domains.first} branch=#{branch}"
end
task :rollback do
domains = domains_for_stage(ENV.fetch('STAGE'))
branch = ENV.fetch('BRANCH')
domains.each do |domain|
sh "mina rollback domain=#{domain} branch=#{branch}"
sh "mina service:restart_puma domain=#{domain} branch=#{branch}"
end
end