diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index ad9e255e93b..6648b358557 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -52,14 +52,6 @@ Layout/ClosingParenthesisIndentation: - 'spec/support/helpers/stub_object_storage.rb' - 'spec/workers/remove_unreferenced_lfs_objects_worker_spec.rb' -# Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle. -# SupportedStyles: leading, trailing -Layout/DotPosition: - Exclude: - - 'app/models/concerns/relative_positioning.rb' - # Offense count: 69 # Cop supports --auto-correct. Layout/EmptyLinesAroundArguments: @@ -100,12 +92,6 @@ Layout/IndentFirstParameter: - 'spec/support/helpers/repo_helpers.rb' - 'spec/support/helpers/stub_object_storage.rb' -# Offense count: 1 -# Cop supports --auto-correct. -Layout/LeadingBlankLines: - Exclude: - - 'lib/tasks/yarn.rake' - # Offense count: 54 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, IndentationWidth. @@ -150,11 +136,6 @@ Layout/SpaceInsideBlockBraces: Layout/SpaceInsideParens: Enabled: false -# Offense count: 1 -Lint/DisjunctiveAssignmentInConstructor: - Exclude: - - 'app/models/uploads/base.rb' - # Offense count: 19 Lint/DuplicateMethods: Exclude: @@ -177,21 +158,6 @@ Lint/DuplicateMethods: Lint/MissingCopEnableDirective: Enabled: false -# Offense count: 2 -# Cop supports --auto-correct. -# Configuration parameters: Whitelist. -# Whitelist: present?, blank?, presence, try, try! -Lint/SafeNavigationConsistency: - Exclude: - - 'lib/gitlab/gpg/commit.rb' - -# Offense count: 2 -# Cop supports --auto-correct. -Lint/ToJSON: - Exclude: - - 'lib/gitlab/cycle_analytics/usage_data.rb' - - 'lib/gitlab/template/base_template.rb' - # Offense count: 6 Lint/UriEscapeUnescape: Exclude: @@ -200,12 +166,6 @@ Lint/UriEscapeUnescape: - 'spec/lib/google_api/auth_spec.rb' - 'spec/requests/api/files_spec.rb' -# Offense count: 1 -# Configuration parameters: CheckForMethodsWithNoSideEffects. -Lint/Void: - Exclude: - - 'lib/gitlab/git/diff_collection.rb' - # Offense count: 165 # Cop supports --auto-correct. # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. @@ -284,12 +244,6 @@ RSpec/LetBeforeExamples: - 'spec/rubocop/cop/migration/update_column_in_batches_spec.rb' - 'spec/serializers/pipeline_details_entity_spec.rb' -# Offense count: 1 -# Cop supports --auto-correct. -RSpec/MultipleSubjects: - Exclude: - - 'spec/services/merge_requests/create_from_issue_service_spec.rb' - # Offense count: 2018 # Cop supports --auto-correct. # Configuration parameters: Strict, EnforcedStyle, AllowedExplicitMatchers. @@ -319,12 +273,6 @@ RSpec/ScatteredSetup: - 'spec/requests/api/jobs_spec.rb' - 'spec/services/projects/create_service_spec.rb' -# Offense count: 1 -# Cop supports --auto-correct. -RSpec/SharedContext: - Exclude: - - 'spec/features/admin/admin_groups_spec.rb' - # Offense count: 4 RSpec/VoidExpect: Exclude: @@ -348,12 +296,6 @@ Rails/ApplicationController: - 'spec/controllers/concerns/continue_params_spec.rb' - 'spec/lib/marginalia_spec.rb' -# Offense count: 1 -# Cop supports --auto-correct. -Rails/ApplicationMailer: - Exclude: - - 'app/mailers/base_mailer.rb' - # Offense count: 8 # Cop supports --auto-correct. Rails/BelongsTo: @@ -414,14 +356,6 @@ Rails/LinkToBlank: Rails/RakeEnvironment: Enabled: false -# Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: Include. -# Include: app/models/**/*.rb -Rails/RedundantAllowNil: - Exclude: - - 'app/models/application_setting.rb' - # Offense count: 868 # Configuration parameters: Blacklist, Whitelist. # Blacklist: decrement!, decrement_counter, increment!, increment_counter, toggle!, touch, update_all, update_attribute, update_column, update_columns, update_counters @@ -457,12 +391,6 @@ Style/CommentedKeyword: - 'lib/tasks/gitlab/backup.rake' - 'spec/tasks/gitlab/backup_rake_spec.rb' -# Offense count: 1 -# Cop supports --auto-correct. -Style/Dir: - Exclude: - - 'qa/qa.rb' - # Offense count: 6 # Cop supports --auto-correct. Style/EachWithObject: @@ -591,13 +519,6 @@ Style/NumericLiteralPrefix: Style/NumericPredicate: Enabled: false -# Offense count: 2 -# Cop supports --auto-correct. -Style/OrAssignment: - Exclude: - - 'lib/api/commit_statuses.rb' - - 'lib/gitlab/project_transfer.rb' - # Offense count: 106 # Cop supports --auto-correct. Style/ParallelAssignment: @@ -632,12 +553,6 @@ Style/PerlBackrefs: Style/RaiseArgs: Enabled: false -# Offense count: 1 -# Cop supports --auto-correct. -Style/RedundantConditional: - Exclude: - - 'lib/system_check/helpers.rb' - # Offense count: 221 # Cop supports --auto-correct. Style/RedundantFreeze: @@ -704,12 +619,6 @@ Style/SingleLineMethods: Style/SpecialGlobalVars: EnforcedStyle: use_perl_names -# Offense count: 1 -# Cop supports --auto-correct. -Style/StderrPuts: - Exclude: - - 'config/initializers/rspec_profiling.rb' - # Offense count: 75 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle. @@ -736,30 +645,6 @@ Style/TernaryParentheses: - 'spec/requests/api/pipeline_schedules_spec.rb' - 'spec/support/capybara.rb' -# Offense count: 2 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyleForMultiline. -# SupportedStylesForMultiline: comma, consistent_comma, no_comma -Style/TrailingCommaInArrayLiteral: - Exclude: - - 'ee/spec/models/project_spec.rb' - - 'spec/lib/gitlab/metrics/dashboard/processor_spec.rb' - -# Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyleForMultiline. -# SupportedStylesForMultiline: comma, consistent_comma, no_comma -Style/TrailingCommaInHashLiteral: - Exclude: - - 'lib/gitlab/ci/ansi2html.rb' - -# Offense count: 2 -# Cop supports --auto-correct. -Style/UnlessElse: - Exclude: - - 'lib/backup/manager.rb' - - 'lib/gitlab/project_search_results.rb' - # Offense count: 8 # Cop supports --auto-correct. Style/UnneededCondition: @@ -776,13 +661,6 @@ Style/UnneededCondition: Style/UnneededInterpolation: Enabled: false -# Offense count: 2 -# Cop supports --auto-correct. -Style/UnneededSort: - Exclude: - - 'app/models/concerns/resolvable_discussion.rb' - - 'lib/gitlab/highlight.rb' - RSpec/ReceiveCounts: Exclude: - 'ee/spec/models/broadcast_message_spec.rb' @@ -907,4 +785,4 @@ RSpec/ContextMethod: - 'spec/services/projects/open_issues_count_service_spec.rb' - 'spec/services/quick_actions/interpret_service_spec.rb' - 'spec/support/shared_examples/services/boards/issues_list_service_shared_examples.rb' - - 'spec/uploaders/namespace_file_uploader_spec.rb' \ No newline at end of file + - 'spec/uploaders/namespace_file_uploader_spec.rb' diff --git a/app/assets/javascripts/monitoring/components/dashboard.vue b/app/assets/javascripts/monitoring/components/dashboard.vue index 9b9c380c9af..c34623cf858 100644 --- a/app/assets/javascripts/monitoring/components/dashboard.vue +++ b/app/assets/javascripts/monitoring/components/dashboard.vue @@ -132,11 +132,6 @@ export default { type: String, required: true, }, - environmentsEndpoint: { - type: String, - required: false, - default: '', - }, currentEnvironmentName: { type: String, required: true, @@ -218,9 +213,7 @@ export default { ]), ...mapGetters('monitoringDashboard', ['getMetricStates', 'filteredEnvironments']), firstDashboard() { - return this.environmentsEndpoint.length > 0 && this.allDashboards.length > 0 - ? this.allDashboards[0] - : {}; + return this.allDashboards.length > 0 ? this.allDashboards[0] : {}; }, selectedDashboard() { return this.allDashboards.find(d => d.path === this.currentDashboard) || this.firstDashboard; @@ -246,7 +239,6 @@ export default { created() { this.setEndpoints({ metricsEndpoint: this.metricsEndpoint, - environmentsEndpoint: this.environmentsEndpoint, deploymentsEndpoint: this.deploymentsEndpoint, dashboardEndpoint: this.dashboardEndpoint, dashboardsEndpoint: this.dashboardsEndpoint, diff --git a/app/assets/javascripts/monitoring/stores/mutations.js b/app/assets/javascripts/monitoring/stores/mutations.js index e14425d7c6c..f0390bfc636 100644 --- a/app/assets/javascripts/monitoring/stores/mutations.js +++ b/app/assets/javascripts/monitoring/stores/mutations.js @@ -172,7 +172,6 @@ export default { [types.SET_ENDPOINTS](state, endpoints) { state.metricsEndpoint = endpoints.metricsEndpoint; - state.environmentsEndpoint = endpoints.environmentsEndpoint; state.deploymentsEndpoint = endpoints.deploymentsEndpoint; state.dashboardEndpoint = endpoints.dashboardEndpoint; state.dashboardsEndpoint = endpoints.dashboardsEndpoint; diff --git a/app/assets/javascripts/monitoring/stores/state.js b/app/assets/javascripts/monitoring/stores/state.js index 2c6758dfce2..2a2a7c9c88d 100644 --- a/app/assets/javascripts/monitoring/stores/state.js +++ b/app/assets/javascripts/monitoring/stores/state.js @@ -2,7 +2,6 @@ import invalidUrl from '~/lib/utils/invalid_url'; export default () => ({ metricsEndpoint: null, - environmentsEndpoint: null, deploymentsEndpoint: null, dashboardEndpoint: invalidUrl, emptyState: 'gettingStarted', diff --git a/app/assets/javascripts/serverless/components/url.vue b/app/assets/javascripts/serverless/components/url.vue index 5e30c8d614e..d6de5e56a5c 100644 --- a/app/assets/javascripts/serverless/components/url.vue +++ b/app/assets/javascripts/serverless/components/url.vue @@ -1,12 +1,8 @@