Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

chore[Op#50748] Remove unused configuration checks component (#14260)

Kabiru Mwenjab82c3ebb944d
diff --git a/modules/storages/app/components/storages/admin/configuration_checks_component.rb b/modules/storages/app/components/storages/admin/configuration_checks_component.rb
deleted file mode 100644
index d454457f060..00000000000
--- a/modules/storages/app/components/storages/admin/configuration_checks_component.rb
+++ /dev/null
@@ -1,46 +0,0 @@
-# frozen_string_literal: true
-
-#-- copyright
-# OpenProject is an open source project management software.
-# Copyright (C) 2012-2023 the OpenProject GmbH
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License version 3.
-#
-# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
-# Copyright (C) 2006-2013 Jean-Philippe Lang
-# Copyright (C) 2010-2013 the ChiliProject Team
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# See COPYRIGHT and LICENSE files for more details.
-#++
-#
-module Storages::Admin
- class ConfigurationChecksComponent < Primer::Beta::Flash
- def initialize(storage:, spacious: true, dismissible: false, icon: :alert, scheme: :danger, **kwargs)
- @storage = storage
- super(spacious:, dismissible:, icon:, scheme:, **kwargs)
- end
-
- def render?
- end
-
- def content
- I18n.t('storages.configuration_checks.incomplete')
- end
- end
-end
diff --git a/modules/storages/config/locales/en.yml b/modules/storages/config/locales/en.yml
index d5e1772e27e..841af4b268a 100644
--- a/modules/storages/config/locales/en.yml
+++ b/modules/storages/config/locales/en.yml
@@ -161,7 +161,6 @@ en:
The project folder is the default folder for file uploads for this project.
Users can nevertheless still upload files to other locations.
configuration_checks:
- incomplete: "The setup of this storage is incomplete."
oauth_client_incomplete:
nextcloud: "Allow OpenProject to access Nextcloud data using OAuth."
one_drive: "Allow OpenProject to access Azure data using OAuth to connect OneDrive/Sharepoint."
diff --git a/modules/storages/spec/components/admin/configuration_checks_component_spec.rb b/modules/storages/spec/components/admin/configuration_checks_component_spec.rb
deleted file mode 100644
index 281d956101b..00000000000
--- a/modules/storages/spec/components/admin/configuration_checks_component_spec.rb
+++ /dev/null
@@ -1,54 +0,0 @@
-#-- copyright
-# OpenProject is an open source project management software.
-# Copyright (C) 2012-2023 the OpenProject GmbH
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License version 3.
-#
-# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
-# Copyright (C) 2006-2013 Jean-Philippe Lang
-# Copyright (C) 2010-2013 the ChiliProject Team
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# See COPYRIGHT and LICENSE files for more details.
-#++
-#
-require_relative '../../spec_helper'
-
-RSpec.describe Storages::Admin::ConfigurationChecksComponent,
- type: :component do
- describe '#render?' do
- context 'with all configuration checks complete' do
- it 'returns false, does not render view component' do
- storage = build_stubbed(:nextcloud_storage,
- oauth_application: build_stubbed(:oauth_application),
- oauth_client: build_stubbed(:oauth_client))
- component = described_class.new(storage:)
-
- expect(render_inline(component).content).to be_blank
- end
- end
-
- context 'with incomplete configuration checks' do
- it 'returns true, renders view component' do
- storage = build_stubbed(:nextcloud_storage, host: nil, name: nil)
- component = described_class.new(storage:)
-
- expect(render_inline(component)).to have_content('The setup of this storage is incomplete.')
- end
- end
- end
-end