diff options
| -rw-r--r-- | Gemfile | 1 | ||||
| -rw-r--r-- | app/decorators/import_decorator.rb | 8 | ||||
| -rw-r--r-- | app/helpers/compliance_check_sets_helper.rb | 6 | ||||
| -rw-r--r-- | app/javascript/vehicle_journeys/components/VehicleJourney.js | 14 | ||||
| -rw-r--r-- | app/views/imports/index.html.slim | 2 | ||||
| -rw-r--r-- | config/deploy/staging.rb | 2 | ||||
| -rw-r--r-- | config/environments/production.rb | 2 | ||||
| -rw-r--r-- | config/initializers/sidekiq.rb | 11 | ||||
| -rw-r--r-- | config/locales/imports.en.yml | 2 | ||||
| -rw-r--r-- | config/locales/imports.fr.yml | 2 | ||||
| -rw-r--r-- | db/schema.rb | 4 | 
11 files changed, 18 insertions, 36 deletions
| @@ -139,7 +139,6 @@ gem 'rake'  gem 'devise-async'  gem 'apartment', '~> 1.0.0'  gem 'aasm' -gem 'activerecord-nulldb-adapter'  gem 'puma', '~> 3.10.0'  gem 'newrelic_rpm' diff --git a/app/decorators/import_decorator.rb b/app/decorators/import_decorator.rb index e748f830d..8b00234d2 100644 --- a/app/decorators/import_decorator.rb +++ b/app/decorators/import_decorator.rb @@ -16,14 +16,6 @@ class ImportDecorator < Draper::Decorator      links = []      links << Link.new( -      content: h.t('imports.actions.show'), -      href: h.workbench_import_path( -        context[:workbench], -        object -      ) -    ) - -    links << Link.new(        content: h.t('imports.actions.download'),        href: object.file.url      ) diff --git a/app/helpers/compliance_check_sets_helper.rb b/app/helpers/compliance_check_sets_helper.rb index b255aee63..690bee80e 100644 --- a/app/helpers/compliance_check_sets_helper.rb +++ b/app/helpers/compliance_check_sets_helper.rb @@ -20,9 +20,9 @@ module ComplianceCheckSetsHelper        content_tag :span, '', class: "fa fa-clock-o"      else        cls ='' -      cls = 'success' if status == 'OK' -      cls = 'warning' if status == 'WARNING' -      cls = 'danger' if %w[ERROR IGNORED].include? status +      cls = 'success' if status == 'successful' +      cls = 'warning' if status == 'warning' +      cls = 'danger' if %w[failed aborted canceled].include? status        content_tag :span, '', class: "fa fa-circle text-#{cls}"      end diff --git a/app/javascript/vehicle_journeys/components/VehicleJourney.js b/app/javascript/vehicle_journeys/components/VehicleJourney.js index 7ac2a7ce7..8344a951a 100644 --- a/app/javascript/vehicle_journeys/components/VehicleJourney.js +++ b/app/javascript/vehicle_journeys/components/VehicleJourney.js @@ -69,8 +69,8 @@ export default class VehicleJourney extends Component {            >            <div className='strong mb-xs'>{this.props.value.short_id || '-'}</div>            <div>{this.props.value.published_journey_name && this.props.value.published_journey_name != "non renseigné" ? this.props.value.published_journey_name : '-'}</div> -          <div>{this.props.value.company ? this.props.value.company.name : '-'}</div>            <div>{this.props.value.journey_pattern.short_id || '-'}</div> +          <div>{this.props.value.company ? this.props.value.company.name : '-'}</div>            <div>              {time_tables.slice(0,3).map((tt, i)=>                <span key={i} className='vj_tt'>{this.timeTableURL(tt)}</span> @@ -109,9 +109,8 @@ export default class VehicleJourney extends Component {                        min='00'                        max='23'                        className='form-control' -                      disabled={this.isDisabled(this.props.value.deletable, vj.dummy) || this.props.filters.policy['vehicle_journeys.update'] == false} +                      disabled={!this.props.editMode || this.isDisabled(this.props.value.deletable, vj.dummy) || this.props.filters.policy['vehicle_journeys.update'] == false}                        readOnly={!this.props.editMode && !vj.dummy} -                      disabled={!this.props.editMode && !vj.dummy}                        onChange={(e) => {this.props.onUpdateTime(e, i, this.props.index, 'hour', false, false)}}                        value={vj.arrival_time['hour']}                        /> @@ -121,9 +120,8 @@ export default class VehicleJourney extends Component {                        min='00'                        max='59'                        className='form-control' -                      disabled={this.isDisabled(this.props.value.deletable, vj.dummy) || this.props.filters.policy['vehicle_journeys.update'] == false} +                      disabled={!this.props.editMode || this.isDisabled(this.props.value.deletable, vj.dummy) || this.props.filters.policy['vehicle_journeys.update'] == false}                        readOnly={!this.props.editMode && !vj.dummy} -                      disabled={!this.props.editMode && !vj.dummy}                        onChange={(e) => {this.props.onUpdateTime(e, i, this.props.index, 'minute', false, false)}}                        value={vj.arrival_time['minute']}                        /> @@ -142,9 +140,8 @@ export default class VehicleJourney extends Component {                        min='00'                        max='23'                        className='form-control' -                      disabled={this.isDisabled(this.props.value.deletable, vj.dummy) || this.props.filters.policy['vehicle_journeys.update'] == false} +                      disabled={!this.props.editMode || this.isDisabled(this.props.value.deletable, vj.dummy) || this.props.filters.policy['vehicle_journeys.update'] == false}                        readOnly={!this.props.editMode && !vj.dummy} -                      disabled={!this.props.editMode && !vj.dummy}                        onChange={(e) => {this.props.onUpdateTime(e, i, this.props.index, 'hour', true, this.props.filters.toggleArrivals)}}                        value={vj.departure_time['hour']}                        /> @@ -154,9 +151,8 @@ export default class VehicleJourney extends Component {                        min='00'                        max='59'                        className='form-control' -                      disabled={this.isDisabled(this.props.value.deletable, vj.dummy) || this.props.filters.policy['vehicle_journeys.update'] == false} +                      disabled={!this.props.editMode || this.isDisabled(this.props.value.deletable, vj.dummy) || this.props.filters.policy['vehicle_journeys.update'] == false}                        readOnly={!this.props.editMode && !vj.dummy} -                      disabled={!this.props.editMode && !vj.dummy}                        onChange={(e) => {this.props.onUpdateTime(e, i, this.props.index, "minute", true,  this.props.filters.toggleArrivals)}}                        value={vj.departure_time['minute']}                        /> diff --git a/app/views/imports/index.html.slim b/app/views/imports/index.html.slim index 79452bbfc..856b715e0 100644 --- a/app/views/imports/index.html.slim +++ b/app/views/imports/index.html.slim @@ -34,7 +34,7 @@                  attribute: 'creator' \                ) \              ], -            links: [], +            links: [:show],              cls: 'table has-search'            = new_pagination @imports, 'pull-right' diff --git a/config/deploy/staging.rb b/config/deploy/staging.rb index d0a1edc42..2c3970e40 100644 --- a/config/deploy/staging.rb +++ b/config/deploy/staging.rb @@ -1,2 +1,2 @@ -server "stif-boiv-staging.af83.priv", :app, :web, :db, :primary => true +server "stif-boiv-worker-staging.af83.priv", :app, :web, :db, :primary => true  set :branch, 'staging' diff --git a/config/environments/production.rb b/config/environments/production.rb index cb50cd145..57a8e1483 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -133,7 +133,7 @@ Rails.application.configure do    # IEV    config.iev_url = ENV.fetch('IEV_URL',"http://iev:8080") -  config.rails_host = ENV.fetch('RAILS_HOST','http://front') +  config.rails_host = ENV.fetch('RAILS_HOST','http://front:3000')    # Set node env for browserify-rails    # config.browserify_rails.node_env = "production" diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb index 1e9383c22..a177e7091 100644 --- a/config/initializers/sidekiq.rb +++ b/config/initializers/sidekiq.rb @@ -7,16 +7,11 @@ Sidekiq.configure_server do |config|        pendings.map { |sync| sync.failed({error: 'Failed by Sidekiq reboot', processing_time: 0}) }      end    end +  config.redis = { url: ENV.fetch('SIDEKIQ_REDIS_URL', 'redis://localhost:6379/12') }  end -unless Rails.env.test? || Rails.env.development? -  Sidekiq.configure_server do |config| -    config.redis = { url: ENV.fetch('SIDEKIQ_REDIS_URL', 'redis://redis:6379/12') } -  end - -  Sidekiq.configure_client do |config| -    config.redis = { url: ENV.fetch('SIDEKIQ_REDIS_URL', 'redis://redis:6379/12') } -  end +Sidekiq.configure_client do |config| +  config.redis = { url: ENV.fetch('SIDEKIQ_REDIS_URL', 'redis://localhost:6379/12') }  end  Sidekiq.default_worker_options = { retry: false } diff --git a/config/locales/imports.en.yml b/config/locales/imports.en.yml index 462b17196..d9f1984fe 100644 --- a/config/locales/imports.en.yml +++ b/config/locales/imports.en.yml @@ -15,7 +15,7 @@ en:        title: "Imports"        warning: ""      new: -      title: "Imports" +      title: "Generate a new import"      show:        title: "Import %{name}"        report: "Report" diff --git a/config/locales/imports.fr.yml b/config/locales/imports.fr.yml index b545f90df..9795b2190 100644 --- a/config/locales/imports.fr.yml +++ b/config/locales/imports.fr.yml @@ -15,7 +15,7 @@ fr:        title: "Imports"        warning: ""      new: -      title: "Imports" +      title: "Générer un import"      show:        title: "Import %{name}"        report: "Rapport" diff --git a/db/schema.rb b/db/schema.rb index fa48a5643..df8243cfd 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,12 +11,12 @@  #  # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20180105102012) do +ActiveRecord::Schema.define(version: 20180103084612) do    # These are extensions that must be enabled in order to support this database    enable_extension "plpgsql" -  enable_extension "hstore"    enable_extension "postgis" +  enable_extension "hstore"    enable_extension "unaccent"    create_table "access_links", id: :bigserial, force: :cascade do |t| | 
