From c3bbe97f81fce759166052f4c66a575fad0e2dc7 Mon Sep 17 00:00:00 2001 From: Alexander Brandon Coles Date: Thu, 4 Sep 2025 09:36:43 +0100 Subject: [PATCH] [#67244] Remove Dashboards module Also removes ng `DashboardComponent` and related code. This functionality has been disabled for a long period of time and it is not envisaged that it will be re-enabled in the future. Instead, Dashboards will be reimplemented in the Overviews module. See opf/openproject#20045 See https://community.openproject.org/work_packages/66904 --- Gemfile.lock | 8 - Gemfile.modules | 1 - config/initializers/module_handler.rb | 7 +- frontend/src/app/app.module.ts | 6 - .../dashboard/dashboard.component.html | 3 - .../dashboard/dashboard.component.ts | 16 - .../openproject-dashboards.module.ts | 46 --- .../dashboards/dashboards_controller.rb | 5 - .../dashboards/app/models/grids/dashboard.rb | 38 --- .../views/dashboards/dashboards/show.html.erb | 23 -- .../dashboards/config/locales/crowdin/af.yml | 4 - .../dashboards/config/locales/crowdin/ar.yml | 4 - .../dashboards/config/locales/crowdin/az.yml | 4 - .../dashboards/config/locales/crowdin/be.yml | 4 - .../dashboards/config/locales/crowdin/bg.yml | 4 - .../dashboards/config/locales/crowdin/ca.yml | 4 - .../config/locales/crowdin/ckb-IR.yml | 4 - .../dashboards/config/locales/crowdin/cs.yml | 4 - .../dashboards/config/locales/crowdin/da.yml | 4 - .../dashboards/config/locales/crowdin/de.yml | 4 - .../dashboards/config/locales/crowdin/el.yml | 4 - .../dashboards/config/locales/crowdin/eo.yml | 4 - .../dashboards/config/locales/crowdin/es.yml | 4 - .../dashboards/config/locales/crowdin/et.yml | 4 - .../dashboards/config/locales/crowdin/eu.yml | 4 - .../dashboards/config/locales/crowdin/fa.yml | 4 - .../dashboards/config/locales/crowdin/fi.yml | 4 - .../dashboards/config/locales/crowdin/fil.yml | 4 - .../dashboards/config/locales/crowdin/fr.yml | 4 - .../dashboards/config/locales/crowdin/he.yml | 4 - .../dashboards/config/locales/crowdin/hi.yml | 4 - .../dashboards/config/locales/crowdin/hr.yml | 4 - .../dashboards/config/locales/crowdin/hu.yml | 4 - .../dashboards/config/locales/crowdin/id.yml | 4 - .../dashboards/config/locales/crowdin/it.yml | 4 - .../dashboards/config/locales/crowdin/ja.yml | 4 - .../config/locales/crowdin/js-af.yml | 4 - .../config/locales/crowdin/js-ar.yml | 4 - .../config/locales/crowdin/js-az.yml | 4 - .../config/locales/crowdin/js-be.yml | 4 - .../config/locales/crowdin/js-bg.yml | 4 - .../config/locales/crowdin/js-ca.yml | 4 - .../config/locales/crowdin/js-ckb-IR.yml | 4 - .../config/locales/crowdin/js-cs.yml | 4 - .../config/locales/crowdin/js-da.yml | 4 - .../config/locales/crowdin/js-de.yml | 4 - .../config/locales/crowdin/js-el.yml | 4 - .../config/locales/crowdin/js-eo.yml | 4 - .../config/locales/crowdin/js-es.yml | 4 - .../config/locales/crowdin/js-et.yml | 4 - .../config/locales/crowdin/js-eu.yml | 4 - .../config/locales/crowdin/js-fa.yml | 4 - .../config/locales/crowdin/js-fi.yml | 4 - .../config/locales/crowdin/js-fil.yml | 4 - .../config/locales/crowdin/js-fr.yml | 4 - .../config/locales/crowdin/js-he.yml | 4 - .../config/locales/crowdin/js-hi.yml | 4 - .../config/locales/crowdin/js-hr.yml | 4 - .../config/locales/crowdin/js-hu.yml | 4 - .../config/locales/crowdin/js-id.yml | 4 - .../config/locales/crowdin/js-it.yml | 4 - .../config/locales/crowdin/js-ja.yml | 4 - .../config/locales/crowdin/js-ka.yml | 4 - .../config/locales/crowdin/js-kk.yml | 4 - .../config/locales/crowdin/js-ko.yml | 4 - .../config/locales/crowdin/js-lt.yml | 4 - .../config/locales/crowdin/js-lv.yml | 4 - .../config/locales/crowdin/js-mn.yml | 4 - .../config/locales/crowdin/js-ms.yml | 4 - .../config/locales/crowdin/js-ne.yml | 4 - .../config/locales/crowdin/js-nl.yml | 4 - .../config/locales/crowdin/js-no.yml | 4 - .../config/locales/crowdin/js-pl.yml | 4 - .../config/locales/crowdin/js-pt-BR.yml | 4 - .../config/locales/crowdin/js-pt-PT.yml | 4 - .../config/locales/crowdin/js-ro.yml | 4 - .../config/locales/crowdin/js-ru.yml | 4 - .../config/locales/crowdin/js-rw.yml | 4 - .../config/locales/crowdin/js-si.yml | 4 - .../config/locales/crowdin/js-sk.yml | 4 - .../config/locales/crowdin/js-sl.yml | 4 - .../config/locales/crowdin/js-sr.yml | 4 - .../config/locales/crowdin/js-sv.yml | 4 - .../config/locales/crowdin/js-th.yml | 4 - .../config/locales/crowdin/js-tr.yml | 4 - .../config/locales/crowdin/js-uk.yml | 4 - .../config/locales/crowdin/js-uz.yml | 4 - .../config/locales/crowdin/js-vi.yml | 4 - .../config/locales/crowdin/js-zh-CN.yml | 4 - .../config/locales/crowdin/js-zh-TW.yml | 4 - .../dashboards/config/locales/crowdin/ka.yml | 4 - .../dashboards/config/locales/crowdin/kk.yml | 4 - .../dashboards/config/locales/crowdin/ko.yml | 4 - .../dashboards/config/locales/crowdin/lt.yml | 4 - .../dashboards/config/locales/crowdin/lv.yml | 4 - .../dashboards/config/locales/crowdin/mn.yml | 4 - .../dashboards/config/locales/crowdin/ms.yml | 4 - .../dashboards/config/locales/crowdin/ne.yml | 4 - .../dashboards/config/locales/crowdin/nl.yml | 4 - .../dashboards/config/locales/crowdin/no.yml | 4 - .../dashboards/config/locales/crowdin/pl.yml | 4 - .../config/locales/crowdin/pt-BR.yml | 4 - .../config/locales/crowdin/pt-PT.yml | 4 - .../dashboards/config/locales/crowdin/ro.yml | 4 - .../dashboards/config/locales/crowdin/ru.yml | 4 - .../dashboards/config/locales/crowdin/rw.yml | 4 - .../dashboards/config/locales/crowdin/si.yml | 4 - .../dashboards/config/locales/crowdin/sk.yml | 4 - .../dashboards/config/locales/crowdin/sl.yml | 4 - .../dashboards/config/locales/crowdin/sr.yml | 4 - .../dashboards/config/locales/crowdin/sv.yml | 4 - .../dashboards/config/locales/crowdin/th.yml | 4 - .../dashboards/config/locales/crowdin/tr.yml | 4 - .../dashboards/config/locales/crowdin/uk.yml | 4 - .../dashboards/config/locales/crowdin/uz.yml | 4 - .../dashboards/config/locales/crowdin/vi.yml | 4 - .../config/locales/crowdin/zh-CN.yml | 4 - .../config/locales/crowdin/zh-TW.yml | 4 - modules/dashboards/config/locales/en.yml | 5 - modules/dashboards/config/locales/js-en.yml | 4 - modules/dashboards/config/routes.rb | 3 - modules/dashboards/dashboards.gemspec | 11 - modules/dashboards/lib/dashboards.rb | 4 - modules/dashboards/lib/dashboards/engine.rb | 47 --- .../lib/dashboards/grid_registration.rb | 33 -- .../contracts/grids/create_contract_spec.rb | 59 ---- .../spec/contracts/grids/shared_examples.rb | 320 ------------------ .../dashboards/spec/factories/grid_factory.rb | 62 ---- .../spec/features/custom_text_spec.rb | 182 ---------- .../dashboards/spec/features/docments_spec.rb | 85 ----- .../spec/features/members_principals_spec.rb | 89 ----- .../dashboards/spec/features/members_spec.rb | 152 --------- .../features/modifying_with_unallowed_spec.rb | 95 ------ .../spec/features/navigation_spec.rb | 55 --- modules/dashboards/spec/features/news_spec.rb | 88 ----- .../spec/features/project_description_spec.rb | 153 --------- .../spec/features/project_status_spec.rb | 152 --------- .../spec/features/read_only_allowed_spec.rb | 93 ----- .../spec/features/subprojects_spec.rb | 130 ------- .../spec/features/time_entries_spec.rb | 134 -------- .../features/work_package_calendar_spec.rb | 142 -------- .../work_package_graph_overview_spec.rb | 95 ------ .../spec/features/work_package_graph_spec.rb | 172 ---------- .../spec/features/work_package_table_spec.rb | 201 ----------- .../lib/dashboards/grid_registration_spec.rb | 83 ----- .../requests/api/v3/attachments/grid_spec.rb | 48 --- .../grids/grids_create_form_resource_spec.rb | 244 ------------- .../api/v3/grids/grids_resource_spec.rb | 195 ----------- .../spec/support/pages/dashboard.rb | 45 --- spec/lib/redmine/menu_manager_spec.rb | 1 - 150 files changed, 1 insertion(+), 3766 deletions(-) delete mode 100644 frontend/src/app/features/dashboards/dashboard/dashboard.component.html delete mode 100644 frontend/src/app/features/dashboards/dashboard/dashboard.component.ts delete mode 100644 frontend/src/app/features/dashboards/openproject-dashboards.module.ts delete mode 100644 modules/dashboards/app/controllers/dashboards/dashboards_controller.rb delete mode 100644 modules/dashboards/app/models/grids/dashboard.rb delete mode 100644 modules/dashboards/app/views/dashboards/dashboards/show.html.erb delete mode 100644 modules/dashboards/config/locales/crowdin/af.yml delete mode 100644 modules/dashboards/config/locales/crowdin/ar.yml delete mode 100644 modules/dashboards/config/locales/crowdin/az.yml delete mode 100644 modules/dashboards/config/locales/crowdin/be.yml delete mode 100644 modules/dashboards/config/locales/crowdin/bg.yml delete mode 100644 modules/dashboards/config/locales/crowdin/ca.yml delete mode 100644 modules/dashboards/config/locales/crowdin/ckb-IR.yml delete mode 100644 modules/dashboards/config/locales/crowdin/cs.yml delete mode 100644 modules/dashboards/config/locales/crowdin/da.yml delete mode 100644 modules/dashboards/config/locales/crowdin/de.yml delete mode 100644 modules/dashboards/config/locales/crowdin/el.yml delete mode 100644 modules/dashboards/config/locales/crowdin/eo.yml delete mode 100644 modules/dashboards/config/locales/crowdin/es.yml delete mode 100644 modules/dashboards/config/locales/crowdin/et.yml delete mode 100644 modules/dashboards/config/locales/crowdin/eu.yml delete mode 100644 modules/dashboards/config/locales/crowdin/fa.yml delete mode 100644 modules/dashboards/config/locales/crowdin/fi.yml delete mode 100644 modules/dashboards/config/locales/crowdin/fil.yml delete mode 100644 modules/dashboards/config/locales/crowdin/fr.yml delete mode 100644 modules/dashboards/config/locales/crowdin/he.yml delete mode 100644 modules/dashboards/config/locales/crowdin/hi.yml delete mode 100644 modules/dashboards/config/locales/crowdin/hr.yml delete mode 100644 modules/dashboards/config/locales/crowdin/hu.yml delete mode 100644 modules/dashboards/config/locales/crowdin/id.yml delete mode 100644 modules/dashboards/config/locales/crowdin/it.yml delete mode 100644 modules/dashboards/config/locales/crowdin/ja.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-af.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-ar.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-az.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-be.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-bg.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-ca.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-ckb-IR.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-cs.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-da.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-de.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-el.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-eo.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-es.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-et.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-eu.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-fa.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-fi.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-fil.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-fr.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-he.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-hi.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-hr.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-hu.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-id.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-it.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-ja.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-ka.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-kk.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-ko.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-lt.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-lv.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-mn.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-ms.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-ne.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-nl.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-no.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-pl.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-pt-BR.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-pt-PT.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-ro.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-ru.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-rw.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-si.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-sk.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-sl.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-sr.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-sv.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-th.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-tr.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-uk.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-uz.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-vi.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-zh-CN.yml delete mode 100644 modules/dashboards/config/locales/crowdin/js-zh-TW.yml delete mode 100644 modules/dashboards/config/locales/crowdin/ka.yml delete mode 100644 modules/dashboards/config/locales/crowdin/kk.yml delete mode 100644 modules/dashboards/config/locales/crowdin/ko.yml delete mode 100644 modules/dashboards/config/locales/crowdin/lt.yml delete mode 100644 modules/dashboards/config/locales/crowdin/lv.yml delete mode 100644 modules/dashboards/config/locales/crowdin/mn.yml delete mode 100644 modules/dashboards/config/locales/crowdin/ms.yml delete mode 100644 modules/dashboards/config/locales/crowdin/ne.yml delete mode 100644 modules/dashboards/config/locales/crowdin/nl.yml delete mode 100644 modules/dashboards/config/locales/crowdin/no.yml delete mode 100644 modules/dashboards/config/locales/crowdin/pl.yml delete mode 100644 modules/dashboards/config/locales/crowdin/pt-BR.yml delete mode 100644 modules/dashboards/config/locales/crowdin/pt-PT.yml delete mode 100644 modules/dashboards/config/locales/crowdin/ro.yml delete mode 100644 modules/dashboards/config/locales/crowdin/ru.yml delete mode 100644 modules/dashboards/config/locales/crowdin/rw.yml delete mode 100644 modules/dashboards/config/locales/crowdin/si.yml delete mode 100644 modules/dashboards/config/locales/crowdin/sk.yml delete mode 100644 modules/dashboards/config/locales/crowdin/sl.yml delete mode 100644 modules/dashboards/config/locales/crowdin/sr.yml delete mode 100644 modules/dashboards/config/locales/crowdin/sv.yml delete mode 100644 modules/dashboards/config/locales/crowdin/th.yml delete mode 100644 modules/dashboards/config/locales/crowdin/tr.yml delete mode 100644 modules/dashboards/config/locales/crowdin/uk.yml delete mode 100644 modules/dashboards/config/locales/crowdin/uz.yml delete mode 100644 modules/dashboards/config/locales/crowdin/vi.yml delete mode 100644 modules/dashboards/config/locales/crowdin/zh-CN.yml delete mode 100644 modules/dashboards/config/locales/crowdin/zh-TW.yml delete mode 100644 modules/dashboards/config/locales/en.yml delete mode 100644 modules/dashboards/config/locales/js-en.yml delete mode 100644 modules/dashboards/config/routes.rb delete mode 100644 modules/dashboards/dashboards.gemspec delete mode 100644 modules/dashboards/lib/dashboards.rb delete mode 100644 modules/dashboards/lib/dashboards/engine.rb delete mode 100644 modules/dashboards/lib/dashboards/grid_registration.rb delete mode 100644 modules/dashboards/spec/contracts/grids/create_contract_spec.rb delete mode 100644 modules/dashboards/spec/contracts/grids/shared_examples.rb delete mode 100644 modules/dashboards/spec/factories/grid_factory.rb delete mode 100644 modules/dashboards/spec/features/custom_text_spec.rb delete mode 100644 modules/dashboards/spec/features/docments_spec.rb delete mode 100644 modules/dashboards/spec/features/members_principals_spec.rb delete mode 100644 modules/dashboards/spec/features/members_spec.rb delete mode 100644 modules/dashboards/spec/features/modifying_with_unallowed_spec.rb delete mode 100644 modules/dashboards/spec/features/navigation_spec.rb delete mode 100644 modules/dashboards/spec/features/news_spec.rb delete mode 100644 modules/dashboards/spec/features/project_description_spec.rb delete mode 100644 modules/dashboards/spec/features/project_status_spec.rb delete mode 100644 modules/dashboards/spec/features/read_only_allowed_spec.rb delete mode 100644 modules/dashboards/spec/features/subprojects_spec.rb delete mode 100644 modules/dashboards/spec/features/time_entries_spec.rb delete mode 100644 modules/dashboards/spec/features/work_package_calendar_spec.rb delete mode 100644 modules/dashboards/spec/features/work_package_graph_overview_spec.rb delete mode 100644 modules/dashboards/spec/features/work_package_graph_spec.rb delete mode 100644 modules/dashboards/spec/features/work_package_table_spec.rb delete mode 100644 modules/dashboards/spec/lib/dashboards/grid_registration_spec.rb delete mode 100644 modules/dashboards/spec/requests/api/v3/attachments/grid_spec.rb delete mode 100644 modules/dashboards/spec/requests/api/v3/grids/grids_create_form_resource_spec.rb delete mode 100644 modules/dashboards/spec/requests/api/v3/grids/grids_resource_spec.rb delete mode 100644 modules/dashboards/spec/support/pages/dashboard.rb diff --git a/Gemfile.lock b/Gemfile.lock index 905e9fbf1b6..3f3e8245070 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -123,12 +123,6 @@ PATH specs: costs (1.0.0) -PATH - remote: modules/dashboards - specs: - dashboards (1.0.0) - grids - PATH remote: modules/documents specs: @@ -1370,7 +1364,6 @@ DEPENDENCIES cuprite (~> 0.17.0) daemons dalli (~> 3.2.0) - dashboards! date_validator (~> 0.12.0) deckar01-task_list (~> 2.3.1) dentaku (~> 3.5)! @@ -1635,7 +1628,6 @@ CHECKSUMS cuprite (0.17) sha256=b140d5dc70d08b97ad54bcf45cd95d0bd430e291e9dffe76fff851fddd57c12b daemons (1.4.1) sha256=8fc76d76faec669feb5e455d72f35bd4c46dc6735e28c420afb822fac1fa9a1d dalli (3.2.8) sha256=2e63595084d91fae2655514a02c5d4fc0f16c0799893794abe23bf628bebaaa5 - dashboards (1.0.0) date (3.4.1) sha256=bf268e14ef7158009bfeaec40b5fa3c7271906e88b196d958a89d4b408abe64f date_validator (0.12.0) sha256=68c9834da240347b9c17441c553a183572508617ebfbe8c020020f3192ce3058 deckar01-task_list (2.3.4) sha256=66abdc7e009ea759732bb53867e1ea42de550e2aa03ac30a015cbf42a04c1667 diff --git a/Gemfile.modules b/Gemfile.modules index b67b7bc4267..0c488f5a3d0 100644 --- a/Gemfile.modules +++ b/Gemfile.modules @@ -32,7 +32,6 @@ group :opf_plugins do gem 'grids', path: 'modules/grids' gem 'my_page', path: 'modules/my_page' - gem 'dashboards', path: 'modules/dashboards' gem 'openproject-boards', path: 'modules/boards' gem 'overviews', path: 'modules/overviews' gem 'budgets', path: 'modules/budgets' diff --git a/config/initializers/module_handler.rb b/config/initializers/module_handler.rb index af6d58f8f8f..63d3ff376db 100644 --- a/config/initializers/module_handler.rb +++ b/config/initializers/module_handler.rb @@ -29,12 +29,7 @@ #++ Rails.application.config.to_prepare do - # Dashboards should currently always be disabled since the functionality is not desired. - to_disable = if Rails.env.test? - OpenProject::Configuration.disabled_modules - else - ["dashboards"] + OpenProject::Configuration.disabled_modules - end + to_disable = OpenProject::Configuration.disabled_modules if to_disable.any? OpenProject::Plugins::ModuleHandler.disable_modules!(to_disable) diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts index 13d500d63aa..262bb763e71 100644 --- a/frontend/src/app/app.module.ts +++ b/frontend/src/app/app.module.ts @@ -49,7 +49,6 @@ import { import { BrowserModule } from '@angular/platform-browser'; import { OpenprojectCalendarModule } from 'core-app/features/calendar/openproject-calendar.module'; import { OpenprojectGlobalSearchModule } from 'core-app/core/global_search/openproject-global-search.module'; -import { OpenprojectDashboardsModule } from 'core-app/features/dashboards/openproject-dashboards.module'; import { OpenprojectWorkPackageGraphsModule, } from 'core-app/shared/components/work-package-graphs/openproject-work-package-graphs.module'; @@ -207,7 +206,6 @@ import { OpInviteUserModalAugmentService } from 'core-app/features/invite-user-m import { TimeEntryTimerService } from 'core-app/shared/components/time_entries/services/time-entry-timer.service'; import { MyPageComponent } from './features/my-page/my-page.component'; import { OverviewComponent } from './features/overview/overview.component'; -import { DashboardComponent } from './features/dashboards/dashboard/dashboard.component'; export function initializeServices(injector:Injector) { return () => { @@ -302,9 +300,6 @@ export function runBootstrap(appRef:ApplicationRef) { // Calendar module OpenprojectCalendarModule, - // Dashboards - OpenprojectDashboardsModule, - // Overview OpenprojectOverviewModule, @@ -429,6 +424,5 @@ export class OpenProjectModule implements DoBootstrap { registerCustomElement('opce-my-page', MyPageComponent, { injector }); registerCustomElement('opce-overview', OverviewComponent, { injector }); - registerCustomElement('opce-dashboard', DashboardComponent, { injector }); } } diff --git a/frontend/src/app/features/dashboards/dashboard/dashboard.component.html b/frontend/src/app/features/dashboards/dashboard/dashboard.component.html deleted file mode 100644 index 5e500f0e769..00000000000 --- a/frontend/src/app/features/dashboards/dashboard/dashboard.component.html +++ /dev/null @@ -1,3 +0,0 @@ -

- - diff --git a/frontend/src/app/features/dashboards/dashboard/dashboard.component.ts b/frontend/src/app/features/dashboards/dashboard/dashboard.component.ts deleted file mode 100644 index 017b6143cd1..00000000000 --- a/frontend/src/app/features/dashboards/dashboard/dashboard.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Component } from '@angular/core'; -import { GridPageComponent } from 'core-app/shared/components/grids/grid/page/grid-page.component'; -import { GRID_PROVIDERS } from 'core-app/shared/components/grids/grid/grid.component'; - -@Component({ - selector: 'dashboard', - templateUrl: '../../../shared/components/grids/grid/page/grid-page.component.html', - styleUrls: ['../../../shared/components/grids/grid/page/grid-page.component.sass'], - providers: GRID_PROVIDERS, - standalone: false, -}) -export class DashboardComponent extends GridPageComponent { - protected gridScopePath():string { - return this.pathHelper.projectDashboardsPath(this.currentProject.identifier!); - } -} diff --git a/frontend/src/app/features/dashboards/openproject-dashboards.module.ts b/frontend/src/app/features/dashboards/openproject-dashboards.module.ts deleted file mode 100644 index ffecf5b5c2c..00000000000 --- a/frontend/src/app/features/dashboards/openproject-dashboards.module.ts +++ /dev/null @@ -1,46 +0,0 @@ -//-- copyright -// OpenProject is an open source project management software. -// Copyright (C) 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. -//++ - -import { NgModule } from '@angular/core'; -import { OpSharedModule } from 'core-app/shared/shared.module'; -import { DashboardComponent } from 'core-app/features/dashboards/dashboard/dashboard.component'; -import { OpenprojectGridsModule } from 'core-app/shared/components/grids/openproject-grids.module'; - -@NgModule({ - imports: [ - OpSharedModule, - - OpenprojectGridsModule, - ], - providers: [ - ], - declarations: [ - DashboardComponent, - ], -}) -export class OpenprojectDashboardsModule {} // eslint-disable-line @typescript-eslint/no-extraneous-class diff --git a/modules/dashboards/app/controllers/dashboards/dashboards_controller.rb b/modules/dashboards/app/controllers/dashboards/dashboards_controller.rb deleted file mode 100644 index 37931f49987..00000000000 --- a/modules/dashboards/app/controllers/dashboards/dashboards_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -module ::Dashboards - class DashboardsController < ::Grids::BaseInProjectController - menu_item :dashboards - end -end diff --git a/modules/dashboards/app/models/grids/dashboard.rb b/modules/dashboards/app/models/grids/dashboard.rb deleted file mode 100644 index 44db1aed847..00000000000 --- a/modules/dashboards/app/models/grids/dashboard.rb +++ /dev/null @@ -1,38 +0,0 @@ -#-- copyright -# OpenProject is an open source project management software. -# Copyright (C) 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 Grids - class Dashboard < Grid - belongs_to :project - - set_acts_as_attachable_options view_permission: :view_dashboards, - delete_permission: :manage_dashboards, - add_permission: :manage_dashboards, - skip_permission_checks: false - end -end diff --git a/modules/dashboards/app/views/dashboards/dashboards/show.html.erb b/modules/dashboards/app/views/dashboards/dashboards/show.html.erb deleted file mode 100644 index ad4b364f77d..00000000000 --- a/modules/dashboards/app/views/dashboards/dashboards/show.html.erb +++ /dev/null @@ -1,23 +0,0 @@ -<%= - render(Primer::OpenProject::PageHeader.new) do |header| - header.with_title(variant: :medium) { t("dashboards.label") } - header.with_breadcrumbs( - [ - { href: project_path(@project), text: @project.name, skip_for_mobile: true }, - t("dashboards.label") - ] - ) - header.with_action_icon_button( - icon: :"screen-full", - mobile_icon: :"screen-full", - label: I18n.t("js.button_show_fullscreen"), - data: { - controller: "projects-zen-mode", - target: "projects-zen-mode.button", - action: "click->projects-zen-mode#performAction" - } - ) - end -%> - -<%= angular_component_tag "opce-dashboard" %> diff --git a/modules/dashboards/config/locales/crowdin/af.yml b/modules/dashboards/config/locales/crowdin/af.yml deleted file mode 100644 index 0908e0e765d..00000000000 --- a/modules/dashboards/config/locales/crowdin/af.yml +++ /dev/null @@ -1,4 +0,0 @@ -af: - dashboards: - label: 'Beheerpanele' - project_module_dashboards: 'Beheerpanele' diff --git a/modules/dashboards/config/locales/crowdin/ar.yml b/modules/dashboards/config/locales/crowdin/ar.yml deleted file mode 100644 index a3a4b496eb6..00000000000 --- a/modules/dashboards/config/locales/crowdin/ar.yml +++ /dev/null @@ -1,4 +0,0 @@ -ar: - dashboards: - label: 'لوحات المعلومات' - project_module_dashboards: 'لوحات المعلومات' diff --git a/modules/dashboards/config/locales/crowdin/az.yml b/modules/dashboards/config/locales/crowdin/az.yml deleted file mode 100644 index 705063125a2..00000000000 --- a/modules/dashboards/config/locales/crowdin/az.yml +++ /dev/null @@ -1,4 +0,0 @@ -az: - dashboards: - label: 'Dashboards' - project_module_dashboards: 'Dashboards' diff --git a/modules/dashboards/config/locales/crowdin/be.yml b/modules/dashboards/config/locales/crowdin/be.yml deleted file mode 100644 index 2155f89c019..00000000000 --- a/modules/dashboards/config/locales/crowdin/be.yml +++ /dev/null @@ -1,4 +0,0 @@ -be: - dashboards: - label: 'Dashboards' - project_module_dashboards: 'Dashboards' diff --git a/modules/dashboards/config/locales/crowdin/bg.yml b/modules/dashboards/config/locales/crowdin/bg.yml deleted file mode 100644 index 68e2bd87f3f..00000000000 --- a/modules/dashboards/config/locales/crowdin/bg.yml +++ /dev/null @@ -1,4 +0,0 @@ -bg: - dashboards: - label: 'Табло' - project_module_dashboards: 'Табла за управление' diff --git a/modules/dashboards/config/locales/crowdin/ca.yml b/modules/dashboards/config/locales/crowdin/ca.yml deleted file mode 100644 index 0896d065143..00000000000 --- a/modules/dashboards/config/locales/crowdin/ca.yml +++ /dev/null @@ -1,4 +0,0 @@ -ca: - dashboards: - label: 'Taulers de control' - project_module_dashboards: 'Taulers de control' diff --git a/modules/dashboards/config/locales/crowdin/ckb-IR.yml b/modules/dashboards/config/locales/crowdin/ckb-IR.yml deleted file mode 100644 index ce9df691060..00000000000 --- a/modules/dashboards/config/locales/crowdin/ckb-IR.yml +++ /dev/null @@ -1,4 +0,0 @@ -ckb-IR: - dashboards: - label: 'Dashboards' - project_module_dashboards: 'Dashboards' diff --git a/modules/dashboards/config/locales/crowdin/cs.yml b/modules/dashboards/config/locales/crowdin/cs.yml deleted file mode 100644 index e176d3083af..00000000000 --- a/modules/dashboards/config/locales/crowdin/cs.yml +++ /dev/null @@ -1,4 +0,0 @@ -cs: - dashboards: - label: 'Nástěnky' - project_module_dashboards: 'Nástěnky' diff --git a/modules/dashboards/config/locales/crowdin/da.yml b/modules/dashboards/config/locales/crowdin/da.yml deleted file mode 100644 index d399d647aa8..00000000000 --- a/modules/dashboards/config/locales/crowdin/da.yml +++ /dev/null @@ -1,4 +0,0 @@ -da: - dashboards: - label: 'Dashboards' - project_module_dashboards: 'Dashboards' diff --git a/modules/dashboards/config/locales/crowdin/de.yml b/modules/dashboards/config/locales/crowdin/de.yml deleted file mode 100644 index cae623fec80..00000000000 --- a/modules/dashboards/config/locales/crowdin/de.yml +++ /dev/null @@ -1,4 +0,0 @@ -de: - dashboards: - label: 'Dashboards' - project_module_dashboards: 'Dashboards' diff --git a/modules/dashboards/config/locales/crowdin/el.yml b/modules/dashboards/config/locales/crowdin/el.yml deleted file mode 100644 index f997c523905..00000000000 --- a/modules/dashboards/config/locales/crowdin/el.yml +++ /dev/null @@ -1,4 +0,0 @@ -el: - dashboards: - label: 'Πίνακες Ελέγχου' - project_module_dashboards: 'Πίνακες Ελέγχου' diff --git a/modules/dashboards/config/locales/crowdin/eo.yml b/modules/dashboards/config/locales/crowdin/eo.yml deleted file mode 100644 index f7740bf5ec7..00000000000 --- a/modules/dashboards/config/locales/crowdin/eo.yml +++ /dev/null @@ -1,4 +0,0 @@ -eo: - dashboards: - label: 'Paneloj' - project_module_dashboards: 'Paneloj' diff --git a/modules/dashboards/config/locales/crowdin/es.yml b/modules/dashboards/config/locales/crowdin/es.yml deleted file mode 100644 index d91f2c5123b..00000000000 --- a/modules/dashboards/config/locales/crowdin/es.yml +++ /dev/null @@ -1,4 +0,0 @@ -es: - dashboards: - label: 'Paneles de control' - project_module_dashboards: 'Paneles de control' diff --git a/modules/dashboards/config/locales/crowdin/et.yml b/modules/dashboards/config/locales/crowdin/et.yml deleted file mode 100644 index c02fd6886fe..00000000000 --- a/modules/dashboards/config/locales/crowdin/et.yml +++ /dev/null @@ -1,4 +0,0 @@ -et: - dashboards: - label: 'Töölauad' - project_module_dashboards: 'Töölauad' diff --git a/modules/dashboards/config/locales/crowdin/eu.yml b/modules/dashboards/config/locales/crowdin/eu.yml deleted file mode 100644 index cf8bcb4218b..00000000000 --- a/modules/dashboards/config/locales/crowdin/eu.yml +++ /dev/null @@ -1,4 +0,0 @@ -eu: - dashboards: - label: 'Panelak' - project_module_dashboards: 'Panelak' diff --git a/modules/dashboards/config/locales/crowdin/fa.yml b/modules/dashboards/config/locales/crowdin/fa.yml deleted file mode 100644 index 84def71c2b7..00000000000 --- a/modules/dashboards/config/locales/crowdin/fa.yml +++ /dev/null @@ -1,4 +0,0 @@ -fa: - dashboards: - label: 'پیش‌خوان' - project_module_dashboards: 'پیش‌خوان' diff --git a/modules/dashboards/config/locales/crowdin/fi.yml b/modules/dashboards/config/locales/crowdin/fi.yml deleted file mode 100644 index bf5812f5c53..00000000000 --- a/modules/dashboards/config/locales/crowdin/fi.yml +++ /dev/null @@ -1,4 +0,0 @@ -fi: - dashboards: - label: 'Dashboards' - project_module_dashboards: 'Dashboards' diff --git a/modules/dashboards/config/locales/crowdin/fil.yml b/modules/dashboards/config/locales/crowdin/fil.yml deleted file mode 100644 index 31c9d316cc2..00000000000 --- a/modules/dashboards/config/locales/crowdin/fil.yml +++ /dev/null @@ -1,4 +0,0 @@ -fil: - dashboards: - label: 'Dashboards' - project_module_dashboards: 'Dashboards' diff --git a/modules/dashboards/config/locales/crowdin/fr.yml b/modules/dashboards/config/locales/crowdin/fr.yml deleted file mode 100644 index 3a1d05ef4ac..00000000000 --- a/modules/dashboards/config/locales/crowdin/fr.yml +++ /dev/null @@ -1,4 +0,0 @@ -fr: - dashboards: - label: 'Tableaux de bord' - project_module_dashboards: 'Tableaux de bord' diff --git a/modules/dashboards/config/locales/crowdin/he.yml b/modules/dashboards/config/locales/crowdin/he.yml deleted file mode 100644 index 9cd1c4fe0a2..00000000000 --- a/modules/dashboards/config/locales/crowdin/he.yml +++ /dev/null @@ -1,4 +0,0 @@ -he: - dashboards: - label: 'דאשבורד' - project_module_dashboards: 'דאשבורד' diff --git a/modules/dashboards/config/locales/crowdin/hi.yml b/modules/dashboards/config/locales/crowdin/hi.yml deleted file mode 100644 index 13fad2ed3f8..00000000000 --- a/modules/dashboards/config/locales/crowdin/hi.yml +++ /dev/null @@ -1,4 +0,0 @@ -hi: - dashboards: - label: 'Dashboards' - project_module_dashboards: 'Dashboards' diff --git a/modules/dashboards/config/locales/crowdin/hr.yml b/modules/dashboards/config/locales/crowdin/hr.yml deleted file mode 100644 index 225b0e143e2..00000000000 --- a/modules/dashboards/config/locales/crowdin/hr.yml +++ /dev/null @@ -1,4 +0,0 @@ -hr: - dashboards: - label: 'Kontrolne ploče' - project_module_dashboards: 'Kontrolne ploče' diff --git a/modules/dashboards/config/locales/crowdin/hu.yml b/modules/dashboards/config/locales/crowdin/hu.yml deleted file mode 100644 index b16abbc11e8..00000000000 --- a/modules/dashboards/config/locales/crowdin/hu.yml +++ /dev/null @@ -1,4 +0,0 @@ -hu: - dashboards: - label: 'Vezérlőpult' - project_module_dashboards: 'Vezérlőpult' diff --git a/modules/dashboards/config/locales/crowdin/id.yml b/modules/dashboards/config/locales/crowdin/id.yml deleted file mode 100644 index e68e5ec77f8..00000000000 --- a/modules/dashboards/config/locales/crowdin/id.yml +++ /dev/null @@ -1,4 +0,0 @@ -id: - dashboards: - label: 'Dasbor' - project_module_dashboards: 'Dasbor' diff --git a/modules/dashboards/config/locales/crowdin/it.yml b/modules/dashboards/config/locales/crowdin/it.yml deleted file mode 100644 index b786cfa120d..00000000000 --- a/modules/dashboards/config/locales/crowdin/it.yml +++ /dev/null @@ -1,4 +0,0 @@ -it: - dashboards: - label: 'Cruscotti' - project_module_dashboards: 'Cruscotti' diff --git a/modules/dashboards/config/locales/crowdin/ja.yml b/modules/dashboards/config/locales/crowdin/ja.yml deleted file mode 100644 index c14a15ff4b3..00000000000 --- a/modules/dashboards/config/locales/crowdin/ja.yml +++ /dev/null @@ -1,4 +0,0 @@ -ja: - dashboards: - label: 'ダッシュボード' - project_module_dashboards: 'ダッシュボード' diff --git a/modules/dashboards/config/locales/crowdin/js-af.yml b/modules/dashboards/config/locales/crowdin/js-af.yml deleted file mode 100644 index dc4467a408b..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-af.yml +++ /dev/null @@ -1,4 +0,0 @@ -af: - js: - dashboards: - label: 'Beheerpaneel' diff --git a/modules/dashboards/config/locales/crowdin/js-ar.yml b/modules/dashboards/config/locales/crowdin/js-ar.yml deleted file mode 100644 index d92d2d49861..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-ar.yml +++ /dev/null @@ -1,4 +0,0 @@ -ar: - js: - dashboards: - label: ' لوحة القيادة' diff --git a/modules/dashboards/config/locales/crowdin/js-az.yml b/modules/dashboards/config/locales/crowdin/js-az.yml deleted file mode 100644 index 8d5fc7e7811..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-az.yml +++ /dev/null @@ -1,4 +0,0 @@ -az: - js: - dashboards: - label: 'Dashboard' diff --git a/modules/dashboards/config/locales/crowdin/js-be.yml b/modules/dashboards/config/locales/crowdin/js-be.yml deleted file mode 100644 index bfed1117a9e..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-be.yml +++ /dev/null @@ -1,4 +0,0 @@ -be: - js: - dashboards: - label: 'Dashboard' diff --git a/modules/dashboards/config/locales/crowdin/js-bg.yml b/modules/dashboards/config/locales/crowdin/js-bg.yml deleted file mode 100644 index d3c5c591f29..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-bg.yml +++ /dev/null @@ -1,4 +0,0 @@ -bg: - js: - dashboards: - label: 'Табло' diff --git a/modules/dashboards/config/locales/crowdin/js-ca.yml b/modules/dashboards/config/locales/crowdin/js-ca.yml deleted file mode 100644 index e97964c24c8..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-ca.yml +++ /dev/null @@ -1,4 +0,0 @@ -ca: - js: - dashboards: - label: 'Tauler de control' diff --git a/modules/dashboards/config/locales/crowdin/js-ckb-IR.yml b/modules/dashboards/config/locales/crowdin/js-ckb-IR.yml deleted file mode 100644 index b4abe50a5ef..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-ckb-IR.yml +++ /dev/null @@ -1,4 +0,0 @@ -ckb-IR: - js: - dashboards: - label: 'Dashboard' diff --git a/modules/dashboards/config/locales/crowdin/js-cs.yml b/modules/dashboards/config/locales/crowdin/js-cs.yml deleted file mode 100644 index abdf03a80bc..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-cs.yml +++ /dev/null @@ -1,4 +0,0 @@ -cs: - js: - dashboards: - label: 'Nástěnka' diff --git a/modules/dashboards/config/locales/crowdin/js-da.yml b/modules/dashboards/config/locales/crowdin/js-da.yml deleted file mode 100644 index 14995a655f1..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-da.yml +++ /dev/null @@ -1,4 +0,0 @@ -da: - js: - dashboards: - label: 'Dashboard' diff --git a/modules/dashboards/config/locales/crowdin/js-de.yml b/modules/dashboards/config/locales/crowdin/js-de.yml deleted file mode 100644 index 7c7b861353f..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-de.yml +++ /dev/null @@ -1,4 +0,0 @@ -de: - js: - dashboards: - label: 'Dashboard' diff --git a/modules/dashboards/config/locales/crowdin/js-el.yml b/modules/dashboards/config/locales/crowdin/js-el.yml deleted file mode 100644 index 9b92026b319..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-el.yml +++ /dev/null @@ -1,4 +0,0 @@ -el: - js: - dashboards: - label: 'Πίνακας Ελέγχου' diff --git a/modules/dashboards/config/locales/crowdin/js-eo.yml b/modules/dashboards/config/locales/crowdin/js-eo.yml deleted file mode 100644 index 17554a607b6..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-eo.yml +++ /dev/null @@ -1,4 +0,0 @@ -eo: - js: - dashboards: - label: 'Paneloj' diff --git a/modules/dashboards/config/locales/crowdin/js-es.yml b/modules/dashboards/config/locales/crowdin/js-es.yml deleted file mode 100644 index 6b14cbe606c..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-es.yml +++ /dev/null @@ -1,4 +0,0 @@ -es: - js: - dashboards: - label: 'Panel de control' diff --git a/modules/dashboards/config/locales/crowdin/js-et.yml b/modules/dashboards/config/locales/crowdin/js-et.yml deleted file mode 100644 index d94138fe9ad..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-et.yml +++ /dev/null @@ -1,4 +0,0 @@ -et: - js: - dashboards: - label: 'Töölaud' diff --git a/modules/dashboards/config/locales/crowdin/js-eu.yml b/modules/dashboards/config/locales/crowdin/js-eu.yml deleted file mode 100644 index 9f00c7e784b..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-eu.yml +++ /dev/null @@ -1,4 +0,0 @@ -eu: - js: - dashboards: - label: 'Panela' diff --git a/modules/dashboards/config/locales/crowdin/js-fa.yml b/modules/dashboards/config/locales/crowdin/js-fa.yml deleted file mode 100644 index 39c0ba0775c..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-fa.yml +++ /dev/null @@ -1,4 +0,0 @@ -fa: - js: - dashboards: - label: 'پیشخوان' diff --git a/modules/dashboards/config/locales/crowdin/js-fi.yml b/modules/dashboards/config/locales/crowdin/js-fi.yml deleted file mode 100644 index eabdd59f115..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-fi.yml +++ /dev/null @@ -1,4 +0,0 @@ -fi: - js: - dashboards: - label: 'Dashboard' diff --git a/modules/dashboards/config/locales/crowdin/js-fil.yml b/modules/dashboards/config/locales/crowdin/js-fil.yml deleted file mode 100644 index d47143aac7e..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-fil.yml +++ /dev/null @@ -1,4 +0,0 @@ -fil: - js: - dashboards: - label: 'Dashboard' diff --git a/modules/dashboards/config/locales/crowdin/js-fr.yml b/modules/dashboards/config/locales/crowdin/js-fr.yml deleted file mode 100644 index ee0ce85efd2..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-fr.yml +++ /dev/null @@ -1,4 +0,0 @@ -fr: - js: - dashboards: - label: 'Tableau de bord' diff --git a/modules/dashboards/config/locales/crowdin/js-he.yml b/modules/dashboards/config/locales/crowdin/js-he.yml deleted file mode 100644 index f1c1cd85221..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-he.yml +++ /dev/null @@ -1,4 +0,0 @@ -he: - js: - dashboards: - label: 'דאשבורד' diff --git a/modules/dashboards/config/locales/crowdin/js-hi.yml b/modules/dashboards/config/locales/crowdin/js-hi.yml deleted file mode 100644 index 7c204034283..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-hi.yml +++ /dev/null @@ -1,4 +0,0 @@ -hi: - js: - dashboards: - label: 'Dashboard' diff --git a/modules/dashboards/config/locales/crowdin/js-hr.yml b/modules/dashboards/config/locales/crowdin/js-hr.yml deleted file mode 100644 index 97557df4d62..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-hr.yml +++ /dev/null @@ -1,4 +0,0 @@ -hr: - js: - dashboards: - label: 'Dashboard' diff --git a/modules/dashboards/config/locales/crowdin/js-hu.yml b/modules/dashboards/config/locales/crowdin/js-hu.yml deleted file mode 100644 index f62830b0ba6..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-hu.yml +++ /dev/null @@ -1,4 +0,0 @@ -hu: - js: - dashboards: - label: 'Vezérlőpult' diff --git a/modules/dashboards/config/locales/crowdin/js-id.yml b/modules/dashboards/config/locales/crowdin/js-id.yml deleted file mode 100644 index ca833887a6b..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-id.yml +++ /dev/null @@ -1,4 +0,0 @@ -id: - js: - dashboards: - label: 'Dasbor' diff --git a/modules/dashboards/config/locales/crowdin/js-it.yml b/modules/dashboards/config/locales/crowdin/js-it.yml deleted file mode 100644 index b75e766a42a..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-it.yml +++ /dev/null @@ -1,4 +0,0 @@ -it: - js: - dashboards: - label: 'Cruscotto' diff --git a/modules/dashboards/config/locales/crowdin/js-ja.yml b/modules/dashboards/config/locales/crowdin/js-ja.yml deleted file mode 100644 index b78347e036c..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-ja.yml +++ /dev/null @@ -1,4 +0,0 @@ -ja: - js: - dashboards: - label: 'ダッシュボード' diff --git a/modules/dashboards/config/locales/crowdin/js-ka.yml b/modules/dashboards/config/locales/crowdin/js-ka.yml deleted file mode 100644 index 5b578bba718..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-ka.yml +++ /dev/null @@ -1,4 +0,0 @@ -ka: - js: - dashboards: - label: 'სამუშაო დაფა' diff --git a/modules/dashboards/config/locales/crowdin/js-kk.yml b/modules/dashboards/config/locales/crowdin/js-kk.yml deleted file mode 100644 index 912e4d54eaf..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-kk.yml +++ /dev/null @@ -1,4 +0,0 @@ -kk: - js: - dashboards: - label: 'Dashboard' diff --git a/modules/dashboards/config/locales/crowdin/js-ko.yml b/modules/dashboards/config/locales/crowdin/js-ko.yml deleted file mode 100644 index 94acd88b211..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-ko.yml +++ /dev/null @@ -1,4 +0,0 @@ -ko: - js: - dashboards: - label: '대시보드' diff --git a/modules/dashboards/config/locales/crowdin/js-lt.yml b/modules/dashboards/config/locales/crowdin/js-lt.yml deleted file mode 100644 index 4e7eb4e7d74..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-lt.yml +++ /dev/null @@ -1,4 +0,0 @@ -lt: - js: - dashboards: - label: 'Skydelis' diff --git a/modules/dashboards/config/locales/crowdin/js-lv.yml b/modules/dashboards/config/locales/crowdin/js-lv.yml deleted file mode 100644 index c959de65bb8..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-lv.yml +++ /dev/null @@ -1,4 +0,0 @@ -lv: - js: - dashboards: - label: 'Informācijas panelis' diff --git a/modules/dashboards/config/locales/crowdin/js-mn.yml b/modules/dashboards/config/locales/crowdin/js-mn.yml deleted file mode 100644 index 47e6b5a6974..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-mn.yml +++ /dev/null @@ -1,4 +0,0 @@ -mn: - js: - dashboards: - label: 'Хянах самбар' diff --git a/modules/dashboards/config/locales/crowdin/js-ms.yml b/modules/dashboards/config/locales/crowdin/js-ms.yml deleted file mode 100644 index bdeac21aca9..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-ms.yml +++ /dev/null @@ -1,4 +0,0 @@ -ms: - js: - dashboards: - label: 'Papan Pemuka' diff --git a/modules/dashboards/config/locales/crowdin/js-ne.yml b/modules/dashboards/config/locales/crowdin/js-ne.yml deleted file mode 100644 index 2cb392c443f..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-ne.yml +++ /dev/null @@ -1,4 +0,0 @@ -ne: - js: - dashboards: - label: 'Dashboard' diff --git a/modules/dashboards/config/locales/crowdin/js-nl.yml b/modules/dashboards/config/locales/crowdin/js-nl.yml deleted file mode 100644 index f657116a81a..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-nl.yml +++ /dev/null @@ -1,4 +0,0 @@ -nl: - js: - dashboards: - label: 'Dashboard' diff --git a/modules/dashboards/config/locales/crowdin/js-no.yml b/modules/dashboards/config/locales/crowdin/js-no.yml deleted file mode 100644 index ce063a66b5b..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-no.yml +++ /dev/null @@ -1,4 +0,0 @@ -"no": - js: - dashboards: - label: 'Kontrollpanel' diff --git a/modules/dashboards/config/locales/crowdin/js-pl.yml b/modules/dashboards/config/locales/crowdin/js-pl.yml deleted file mode 100644 index 79f9e05f250..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-pl.yml +++ /dev/null @@ -1,4 +0,0 @@ -pl: - js: - dashboards: - label: 'Pulpit nawigacyjny' diff --git a/modules/dashboards/config/locales/crowdin/js-pt-BR.yml b/modules/dashboards/config/locales/crowdin/js-pt-BR.yml deleted file mode 100644 index 9aafff8e641..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-pt-BR.yml +++ /dev/null @@ -1,4 +0,0 @@ -pt-BR: - js: - dashboards: - label: 'Painel' diff --git a/modules/dashboards/config/locales/crowdin/js-pt-PT.yml b/modules/dashboards/config/locales/crowdin/js-pt-PT.yml deleted file mode 100644 index 862ac47440e..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-pt-PT.yml +++ /dev/null @@ -1,4 +0,0 @@ -pt-PT: - js: - dashboards: - label: 'Painel de Controlo' diff --git a/modules/dashboards/config/locales/crowdin/js-ro.yml b/modules/dashboards/config/locales/crowdin/js-ro.yml deleted file mode 100644 index 98a5d1ba919..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-ro.yml +++ /dev/null @@ -1,4 +0,0 @@ -ro: - js: - dashboards: - label: 'Panou de control' diff --git a/modules/dashboards/config/locales/crowdin/js-ru.yml b/modules/dashboards/config/locales/crowdin/js-ru.yml deleted file mode 100644 index f80cfefc166..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-ru.yml +++ /dev/null @@ -1,4 +0,0 @@ -ru: - js: - dashboards: - label: 'Панель' diff --git a/modules/dashboards/config/locales/crowdin/js-rw.yml b/modules/dashboards/config/locales/crowdin/js-rw.yml deleted file mode 100644 index 68ca7f4d7a0..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-rw.yml +++ /dev/null @@ -1,4 +0,0 @@ -rw: - js: - dashboards: - label: 'Dashboard' diff --git a/modules/dashboards/config/locales/crowdin/js-si.yml b/modules/dashboards/config/locales/crowdin/js-si.yml deleted file mode 100644 index 793dadcce46..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-si.yml +++ /dev/null @@ -1,4 +0,0 @@ -si: - js: - dashboards: - label: 'Dashboard' diff --git a/modules/dashboards/config/locales/crowdin/js-sk.yml b/modules/dashboards/config/locales/crowdin/js-sk.yml deleted file mode 100644 index cf17d7cefc1..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-sk.yml +++ /dev/null @@ -1,4 +0,0 @@ -sk: - js: - dashboards: - label: 'Dashboard' diff --git a/modules/dashboards/config/locales/crowdin/js-sl.yml b/modules/dashboards/config/locales/crowdin/js-sl.yml deleted file mode 100644 index 1e401118cba..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-sl.yml +++ /dev/null @@ -1,4 +0,0 @@ -sl: - js: - dashboards: - label: 'Nadzorna plošča' diff --git a/modules/dashboards/config/locales/crowdin/js-sr.yml b/modules/dashboards/config/locales/crowdin/js-sr.yml deleted file mode 100644 index 8cd827162e8..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-sr.yml +++ /dev/null @@ -1,4 +0,0 @@ -sr: - js: - dashboards: - label: 'Dashboard' diff --git a/modules/dashboards/config/locales/crowdin/js-sv.yml b/modules/dashboards/config/locales/crowdin/js-sv.yml deleted file mode 100644 index 88ffb8ba6b8..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-sv.yml +++ /dev/null @@ -1,4 +0,0 @@ -sv: - js: - dashboards: - label: 'Översikt' diff --git a/modules/dashboards/config/locales/crowdin/js-th.yml b/modules/dashboards/config/locales/crowdin/js-th.yml deleted file mode 100644 index 1dbc4645fae..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-th.yml +++ /dev/null @@ -1,4 +0,0 @@ -th: - js: - dashboards: - label: 'Dashboard' diff --git a/modules/dashboards/config/locales/crowdin/js-tr.yml b/modules/dashboards/config/locales/crowdin/js-tr.yml deleted file mode 100644 index 4542f6fc987..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-tr.yml +++ /dev/null @@ -1,4 +0,0 @@ -tr: - js: - dashboards: - label: 'Gösterge paneli' diff --git a/modules/dashboards/config/locales/crowdin/js-uk.yml b/modules/dashboards/config/locales/crowdin/js-uk.yml deleted file mode 100644 index 005c31376d6..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-uk.yml +++ /dev/null @@ -1,4 +0,0 @@ -uk: - js: - dashboards: - label: 'Панель керування' diff --git a/modules/dashboards/config/locales/crowdin/js-uz.yml b/modules/dashboards/config/locales/crowdin/js-uz.yml deleted file mode 100644 index 1e7ee0df2b0..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-uz.yml +++ /dev/null @@ -1,4 +0,0 @@ -uz: - js: - dashboards: - label: 'Dashboard' diff --git a/modules/dashboards/config/locales/crowdin/js-vi.yml b/modules/dashboards/config/locales/crowdin/js-vi.yml deleted file mode 100644 index 2dca7c6ac68..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-vi.yml +++ /dev/null @@ -1,4 +0,0 @@ -vi: - js: - dashboards: - label: 'Bảng điều khiển' diff --git a/modules/dashboards/config/locales/crowdin/js-zh-CN.yml b/modules/dashboards/config/locales/crowdin/js-zh-CN.yml deleted file mode 100644 index ea3bd4b6ff0..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-zh-CN.yml +++ /dev/null @@ -1,4 +0,0 @@ -zh-CN: - js: - dashboards: - label: '仪表板' diff --git a/modules/dashboards/config/locales/crowdin/js-zh-TW.yml b/modules/dashboards/config/locales/crowdin/js-zh-TW.yml deleted file mode 100644 index 8dc7b6f8962..00000000000 --- a/modules/dashboards/config/locales/crowdin/js-zh-TW.yml +++ /dev/null @@ -1,4 +0,0 @@ -zh-TW: - js: - dashboards: - label: '儀表板' diff --git a/modules/dashboards/config/locales/crowdin/ka.yml b/modules/dashboards/config/locales/crowdin/ka.yml deleted file mode 100644 index 500c8daf33e..00000000000 --- a/modules/dashboards/config/locales/crowdin/ka.yml +++ /dev/null @@ -1,4 +0,0 @@ -ka: - dashboards: - label: 'სამუშაო დაფები' - project_module_dashboards: 'სამუშაო დაფები' diff --git a/modules/dashboards/config/locales/crowdin/kk.yml b/modules/dashboards/config/locales/crowdin/kk.yml deleted file mode 100644 index b8244e8698c..00000000000 --- a/modules/dashboards/config/locales/crowdin/kk.yml +++ /dev/null @@ -1,4 +0,0 @@ -kk: - dashboards: - label: 'Dashboards' - project_module_dashboards: 'Dashboards' diff --git a/modules/dashboards/config/locales/crowdin/ko.yml b/modules/dashboards/config/locales/crowdin/ko.yml deleted file mode 100644 index 5c8105a9d08..00000000000 --- a/modules/dashboards/config/locales/crowdin/ko.yml +++ /dev/null @@ -1,4 +0,0 @@ -ko: - dashboards: - label: '대시보드' - project_module_dashboards: '대시보드' diff --git a/modules/dashboards/config/locales/crowdin/lt.yml b/modules/dashboards/config/locales/crowdin/lt.yml deleted file mode 100644 index 2eef2eedcb7..00000000000 --- a/modules/dashboards/config/locales/crowdin/lt.yml +++ /dev/null @@ -1,4 +0,0 @@ -lt: - dashboards: - label: 'Skydeliai' - project_module_dashboards: 'Skydeliai' diff --git a/modules/dashboards/config/locales/crowdin/lv.yml b/modules/dashboards/config/locales/crowdin/lv.yml deleted file mode 100644 index 73f6de5f1ce..00000000000 --- a/modules/dashboards/config/locales/crowdin/lv.yml +++ /dev/null @@ -1,4 +0,0 @@ -lv: - dashboards: - label: 'Informācijas panelis' - project_module_dashboards: 'Informācijas panelis' diff --git a/modules/dashboards/config/locales/crowdin/mn.yml b/modules/dashboards/config/locales/crowdin/mn.yml deleted file mode 100644 index c8736531020..00000000000 --- a/modules/dashboards/config/locales/crowdin/mn.yml +++ /dev/null @@ -1,4 +0,0 @@ -mn: - dashboards: - label: 'Хянах самбарууд' - project_module_dashboards: 'Хянах самбарууд' diff --git a/modules/dashboards/config/locales/crowdin/ms.yml b/modules/dashboards/config/locales/crowdin/ms.yml deleted file mode 100644 index aa7bc373532..00000000000 --- a/modules/dashboards/config/locales/crowdin/ms.yml +++ /dev/null @@ -1,4 +0,0 @@ -ms: - dashboards: - label: 'Papan Pemuka' - project_module_dashboards: 'Papan Pemuka' diff --git a/modules/dashboards/config/locales/crowdin/ne.yml b/modules/dashboards/config/locales/crowdin/ne.yml deleted file mode 100644 index 92ce58d6787..00000000000 --- a/modules/dashboards/config/locales/crowdin/ne.yml +++ /dev/null @@ -1,4 +0,0 @@ -ne: - dashboards: - label: 'Dashboards' - project_module_dashboards: 'Dashboards' diff --git a/modules/dashboards/config/locales/crowdin/nl.yml b/modules/dashboards/config/locales/crowdin/nl.yml deleted file mode 100644 index 250606132bb..00000000000 --- a/modules/dashboards/config/locales/crowdin/nl.yml +++ /dev/null @@ -1,4 +0,0 @@ -nl: - dashboards: - label: 'Dashboards' - project_module_dashboards: 'Dashboards' diff --git a/modules/dashboards/config/locales/crowdin/no.yml b/modules/dashboards/config/locales/crowdin/no.yml deleted file mode 100644 index 5d7c55b6cd3..00000000000 --- a/modules/dashboards/config/locales/crowdin/no.yml +++ /dev/null @@ -1,4 +0,0 @@ -"no": - dashboards: - label: 'Kontrollsentre' - project_module_dashboards: 'Kontrollsentre' diff --git a/modules/dashboards/config/locales/crowdin/pl.yml b/modules/dashboards/config/locales/crowdin/pl.yml deleted file mode 100644 index 412c5119b92..00000000000 --- a/modules/dashboards/config/locales/crowdin/pl.yml +++ /dev/null @@ -1,4 +0,0 @@ -pl: - dashboards: - label: 'Pulpity nawigacyjne' - project_module_dashboards: 'Pulpity nawigacyjne' diff --git a/modules/dashboards/config/locales/crowdin/pt-BR.yml b/modules/dashboards/config/locales/crowdin/pt-BR.yml deleted file mode 100644 index d55391e6ca3..00000000000 --- a/modules/dashboards/config/locales/crowdin/pt-BR.yml +++ /dev/null @@ -1,4 +0,0 @@ -pt-BR: - dashboards: - label: 'Painéis' - project_module_dashboards: 'Painéis' diff --git a/modules/dashboards/config/locales/crowdin/pt-PT.yml b/modules/dashboards/config/locales/crowdin/pt-PT.yml deleted file mode 100644 index e884662919c..00000000000 --- a/modules/dashboards/config/locales/crowdin/pt-PT.yml +++ /dev/null @@ -1,4 +0,0 @@ -pt-PT: - dashboards: - label: 'Painéis de controlo' - project_module_dashboards: 'Painéis de controle' diff --git a/modules/dashboards/config/locales/crowdin/ro.yml b/modules/dashboards/config/locales/crowdin/ro.yml deleted file mode 100644 index c077f9ae5de..00000000000 --- a/modules/dashboards/config/locales/crowdin/ro.yml +++ /dev/null @@ -1,4 +0,0 @@ -ro: - dashboards: - label: 'Panouri de control' - project_module_dashboards: 'Panouri de control' diff --git a/modules/dashboards/config/locales/crowdin/ru.yml b/modules/dashboards/config/locales/crowdin/ru.yml deleted file mode 100644 index 93e35ad7a23..00000000000 --- a/modules/dashboards/config/locales/crowdin/ru.yml +++ /dev/null @@ -1,4 +0,0 @@ -ru: - dashboards: - label: 'Панели' - project_module_dashboards: 'Панели' diff --git a/modules/dashboards/config/locales/crowdin/rw.yml b/modules/dashboards/config/locales/crowdin/rw.yml deleted file mode 100644 index d9cebd38334..00000000000 --- a/modules/dashboards/config/locales/crowdin/rw.yml +++ /dev/null @@ -1,4 +0,0 @@ -rw: - dashboards: - label: 'Dashboards' - project_module_dashboards: 'Dashboards' diff --git a/modules/dashboards/config/locales/crowdin/si.yml b/modules/dashboards/config/locales/crowdin/si.yml deleted file mode 100644 index bb8e2e1ab4a..00000000000 --- a/modules/dashboards/config/locales/crowdin/si.yml +++ /dev/null @@ -1,4 +0,0 @@ -si: - dashboards: - label: 'උපකරණ පුවරු' - project_module_dashboards: 'උපකරණ පුවරු' diff --git a/modules/dashboards/config/locales/crowdin/sk.yml b/modules/dashboards/config/locales/crowdin/sk.yml deleted file mode 100644 index 391c99a2e1f..00000000000 --- a/modules/dashboards/config/locales/crowdin/sk.yml +++ /dev/null @@ -1,4 +0,0 @@ -sk: - dashboards: - label: 'Dashboards' - project_module_dashboards: 'Dashboards' diff --git a/modules/dashboards/config/locales/crowdin/sl.yml b/modules/dashboards/config/locales/crowdin/sl.yml deleted file mode 100644 index 3c9560b8439..00000000000 --- a/modules/dashboards/config/locales/crowdin/sl.yml +++ /dev/null @@ -1,4 +0,0 @@ -sl: - dashboards: - label: 'Nadzorna plošča' - project_module_dashboards: 'Nadzorna plošča' diff --git a/modules/dashboards/config/locales/crowdin/sr.yml b/modules/dashboards/config/locales/crowdin/sr.yml deleted file mode 100644 index f6074076c44..00000000000 --- a/modules/dashboards/config/locales/crowdin/sr.yml +++ /dev/null @@ -1,4 +0,0 @@ -sr: - dashboards: - label: 'Dashboards' - project_module_dashboards: 'Dashboards' diff --git a/modules/dashboards/config/locales/crowdin/sv.yml b/modules/dashboards/config/locales/crowdin/sv.yml deleted file mode 100644 index 00610381db5..00000000000 --- a/modules/dashboards/config/locales/crowdin/sv.yml +++ /dev/null @@ -1,4 +0,0 @@ -sv: - dashboards: - label: 'Översikt' - project_module_dashboards: 'Översikt' diff --git a/modules/dashboards/config/locales/crowdin/th.yml b/modules/dashboards/config/locales/crowdin/th.yml deleted file mode 100644 index 65016dd5c89..00000000000 --- a/modules/dashboards/config/locales/crowdin/th.yml +++ /dev/null @@ -1,4 +0,0 @@ -th: - dashboards: - label: 'แผงควบคุม' - project_module_dashboards: 'แผงควบคุม' diff --git a/modules/dashboards/config/locales/crowdin/tr.yml b/modules/dashboards/config/locales/crowdin/tr.yml deleted file mode 100644 index 9fb6f369b4e..00000000000 --- a/modules/dashboards/config/locales/crowdin/tr.yml +++ /dev/null @@ -1,4 +0,0 @@ -tr: - dashboards: - label: 'Gösterge panelleri' - project_module_dashboards: 'Gösterge panelleri' diff --git a/modules/dashboards/config/locales/crowdin/uk.yml b/modules/dashboards/config/locales/crowdin/uk.yml deleted file mode 100644 index 8d273775d61..00000000000 --- a/modules/dashboards/config/locales/crowdin/uk.yml +++ /dev/null @@ -1,4 +0,0 @@ -uk: - dashboards: - label: 'Панелі керування' - project_module_dashboards: 'Панелі керування' diff --git a/modules/dashboards/config/locales/crowdin/uz.yml b/modules/dashboards/config/locales/crowdin/uz.yml deleted file mode 100644 index 07a5dd84bf4..00000000000 --- a/modules/dashboards/config/locales/crowdin/uz.yml +++ /dev/null @@ -1,4 +0,0 @@ -uz: - dashboards: - label: 'Dashboards' - project_module_dashboards: 'Dashboards' diff --git a/modules/dashboards/config/locales/crowdin/vi.yml b/modules/dashboards/config/locales/crowdin/vi.yml deleted file mode 100644 index c91e5c07047..00000000000 --- a/modules/dashboards/config/locales/crowdin/vi.yml +++ /dev/null @@ -1,4 +0,0 @@ -vi: - dashboards: - label: 'Bảng theo dõi' - project_module_dashboards: 'Bảng điều khiển' diff --git a/modules/dashboards/config/locales/crowdin/zh-CN.yml b/modules/dashboards/config/locales/crowdin/zh-CN.yml deleted file mode 100644 index 9d8ea5f298f..00000000000 --- a/modules/dashboards/config/locales/crowdin/zh-CN.yml +++ /dev/null @@ -1,4 +0,0 @@ -zh-CN: - dashboards: - label: '仪表板' - project_module_dashboards: '仪表板' diff --git a/modules/dashboards/config/locales/crowdin/zh-TW.yml b/modules/dashboards/config/locales/crowdin/zh-TW.yml deleted file mode 100644 index e1bc5f2eaf5..00000000000 --- a/modules/dashboards/config/locales/crowdin/zh-TW.yml +++ /dev/null @@ -1,4 +0,0 @@ -zh-TW: - dashboards: - label: '儀表板' - project_module_dashboards: '儀表板' diff --git a/modules/dashboards/config/locales/en.yml b/modules/dashboards/config/locales/en.yml deleted file mode 100644 index ecbc0c6db9e..00000000000 --- a/modules/dashboards/config/locales/en.yml +++ /dev/null @@ -1,5 +0,0 @@ -en: - dashboards: - label: 'Dashboards' - - project_module_dashboards: 'Dashboards' diff --git a/modules/dashboards/config/locales/js-en.yml b/modules/dashboards/config/locales/js-en.yml deleted file mode 100644 index b04cbee655b..00000000000 --- a/modules/dashboards/config/locales/js-en.yml +++ /dev/null @@ -1,4 +0,0 @@ -en: - js: - dashboards: - label: 'Dashboard' diff --git a/modules/dashboards/config/routes.rb b/modules/dashboards/config/routes.rb deleted file mode 100644 index 2abbb2a3173..00000000000 --- a/modules/dashboards/config/routes.rb +++ /dev/null @@ -1,3 +0,0 @@ -Rails.application.routes.draw do - get "/projects/:project_id/dashboards", to: "dashboards/dashboards#show", as: :project_dashboards -end diff --git a/modules/dashboards/dashboards.gemspec b/modules/dashboards/dashboards.gemspec deleted file mode 100644 index 0bbc19a888f..00000000000 --- a/modules/dashboards/dashboards.gemspec +++ /dev/null @@ -1,11 +0,0 @@ -Gem::Specification.new do |s| - s.name = "dashboards" - s.version = "1.0.0" - s.authors = ["OpenProject"] - s.summary = "OpenProject Dashboards" - - s.files = Dir["{app,config,db,lib}/**/*"] - - s.add_dependency "grids" - s.metadata["rubygems_mfa_required"] = "true" -end diff --git a/modules/dashboards/lib/dashboards.rb b/modules/dashboards/lib/dashboards.rb deleted file mode 100644 index 033ec800def..00000000000 --- a/modules/dashboards/lib/dashboards.rb +++ /dev/null @@ -1,4 +0,0 @@ -require "dashboards/engine" - -module Dashboards -end diff --git a/modules/dashboards/lib/dashboards/engine.rb b/modules/dashboards/lib/dashboards/engine.rb deleted file mode 100644 index b2882ccd3f5..00000000000 --- a/modules/dashboards/lib/dashboards/engine.rb +++ /dev/null @@ -1,47 +0,0 @@ -# Prevent load-order problems in case openproject-plugins is listed after a plugin in the Gemfile -# or not at all -require "open_project/plugins" - -module Dashboards - class Engine < ::Rails::Engine - engine_name :dashboards - - include OpenProject::Plugins::ActsAsOpEngine - - initializer "dashboards.menu" do - ::Redmine::MenuManager.map(:project_menu) do |menu| - menu.push(:dashboards, - { controller: "/dashboards/dashboards", action: "show" }, - caption: :"dashboards.label", - after: :work_packages, - icon: "meter", - badge: "label_menu_badge.alpha") - end - end - - initializer "dashboards.permissions" do - Rails.application.reloader.to_prepare do - OpenProject::AccessControl.map do |ac_map| - ac_map.project_module(:dashboards) do |pm_map| - pm_map.permission(:view_dashboards, - { "dashboards/dashboards": %i[show] }, - permissible_on: :project) - pm_map.permission(:manage_dashboards, - { "dashboards/dashboards": %i[show] }, - permissible_on: :project) - end - end - end - end - - initializer "dashboards.conversion" do - require Rails.root.join("config/constants/ar_to_api_conversions") - - Constants::ARToAPIConversions.add("grids/dashboard": "grid") - end - - config.to_prepare do - Dashboards::GridRegistration.register! - end - end -end diff --git a/modules/dashboards/lib/dashboards/grid_registration.rb b/modules/dashboards/lib/dashboards/grid_registration.rb deleted file mode 100644 index d6ec9da8d86..00000000000 --- a/modules/dashboards/lib/dashboards/grid_registration.rb +++ /dev/null @@ -1,33 +0,0 @@ -module Dashboards - class GridRegistration < ::Grids::Configuration::InProjectBaseRegistration - grid_class "Grids::Dashboard" - to_scope :project_dashboards_path - - defaults -> { - { - row_count: 1, - column_count: 2, - widgets: [ - { - identifier: "work_packages_table", - start_row: 1, - end_row: 2, - start_column: 1, - end_column: 2, - options: { - name: I18n.t("js.grid.widgets.work_packages_table.title"), - queryProps: { - "columns[]": %w(id project type subject), - filters: JSON.dump([{ status: { operator: "o", values: [] } }]) - } - } - } - ] - } - } - - view_permission :view_dashboards - edit_permission :manage_dashboards - in_project_scope_path ["dashboards"] - end -end diff --git a/modules/dashboards/spec/contracts/grids/create_contract_spec.rb b/modules/dashboards/spec/contracts/grids/create_contract_spec.rb deleted file mode 100644 index d35b67cd5b7..00000000000 --- a/modules/dashboards/spec/contracts/grids/create_contract_spec.rb +++ /dev/null @@ -1,59 +0,0 @@ -#-- copyright -# OpenProject is an open source project management software. -# Copyright (C) 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 "spec_helper" -require_relative "shared_examples" - -RSpec.describe Grids::CreateContract do - include_context "grid contract" - include_context "model contract" - - it_behaves_like "shared grid contract attributes" - - describe "user_id" do - context "for a Grids::Dashboard" do - let(:grid) { build_stubbed(:dashboard, default_values) } - - it_behaves_like "is not writable" do - let(:attribute) { :user_id } - let(:value) { 5 } - end - end - end - - describe "project_id" do - context "for a Grids::Dashboard" do - let(:grid) { build_stubbed(:dashboard, default_values) } - - it_behaves_like "is writable" do - let(:attribute) { :project_id } - let(:value) { 5 } - end - end - end -end diff --git a/modules/dashboards/spec/contracts/grids/shared_examples.rb b/modules/dashboards/spec/contracts/grids/shared_examples.rb deleted file mode 100644 index 0881d70afe8..00000000000 --- a/modules/dashboards/spec/contracts/grids/shared_examples.rb +++ /dev/null @@ -1,320 +0,0 @@ -#-- copyright -# OpenProject is an open source project management software. -# Copyright (C) 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. -#++ - -RSpec.shared_context "grid contract" do - let(:user) { build_stubbed(:user) } - let(:instance) { described_class.new(grid, user) } - let(:project) { build_stubbed(:project) } - let(:default_values) do - { - row_count: 6, - column_count: 7, - widgets: [], - project: - } - end - let(:grid) do - build_stubbed(:dashboard, default_values) - end - let(:mange_allowed) { true } - let(:permissions) { %i[manage_dashboards save_queries manage_public_queries] } - - before do - mock_permissions_for(user) do |mock| - mock.allow_in_project *permissions, project: - end - end -end - -RSpec.shared_examples_for "shared grid contract attributes" do - include_context "model contract" - let(:model) { grid } - - it "is valid" do - expect(instance.validate) - .to be_truthy - end - - context "if not having the manage_dashbaords permission" do - let(:permissions) { %i[save_queries] } - - it "is invalid" do - expect(instance.validate) - .to be_falsey - end - - it "notes the error" do - instance.validate - expect(instance.errors.details[:scope]) - .to contain_exactly({ error: :inclusion }) - end - end - - describe "widgets" do - it_behaves_like "is writable" do - let(:attribute) { :widgets } - let(:value) do - [ - Grids::Widget.new(start_row: 1, - end_row: 4, - start_column: 2, - end_column: 5, - identifier: "work_packages_table") - ] - end - end - - context "invalid identifier" do - before do - grid.widgets.build(start_row: 1, - end_row: 4, - start_column: 2, - end_column: 5, - identifier: "bogus_identifier") - end - - it "is invalid" do - expect(instance.validate) - .to be_falsey - end - - it "notes the error" do - instance.validate - expect(instance.errors.details[:widgets]) - .to contain_exactly({ error: :inclusion }) - end - end - - context "collisions between widgets" do - before do - grid.widgets.build(start_row: 1, - end_row: 3, - start_column: 1, - end_column: 3, - identifier: "work_packages_table") - grid.widgets.build(start_row: 2, - end_row: 4, - start_column: 2, - end_column: 4, - identifier: "work_packages_table") - end - - it "is invalid" do - expect(instance.validate) - .to be_falsey - end - - it "notes the error" do - instance.validate - expect(instance.errors.details[:widgets]) - .to contain_exactly({ error: :overlaps }, { error: :overlaps }) - end - end - - context "widgets having the same start column as another's end column" do - before do - grid.widgets.build(start_row: 1, - end_row: 3, - start_column: 1, - end_column: 3, - identifier: "work_packages_table") - grid.widgets.build(start_row: 1, - end_row: 3, - start_column: 3, - end_column: 4, - identifier: "work_packages_table") - end - - it "is valid" do - expect(instance.validate) - .to be_truthy - end - end - - context "widgets having the same start row as another's end row" do - before do - grid.widgets.build(start_row: 1, - end_row: 3, - start_column: 1, - end_column: 3, - identifier: "work_packages_table") - grid.widgets.build(start_row: 3, - end_row: 4, - start_column: 1, - end_column: 3, - identifier: "work_packages_table") - end - - it "is valid" do - expect(instance.validate) - .to be_truthy - end - end - - context "widgets being outside (max) of the grid" do - before do - grid.widgets.build(start_row: 1, - end_row: grid.row_count + 2, - start_column: 1, - end_column: 3, - identifier: "work_packages_table") - end - - it "is invalid" do - expect(instance.validate) - .to be_falsey - end - - it "notes the error" do - instance.validate - expect(instance.errors.details[:widgets]) - .to contain_exactly({ error: :outside }) - end - end - - context "widgets being outside (min) of the grid" do - before do - grid.widgets.build(start_row: 1, - end_row: 2, - start_column: -1, - end_column: 3, - identifier: "work_packages_table") - end - - it "is invalid" do - expect(instance.validate) - .to be_falsey - end - - it "notes the error" do - instance.validate - expect(instance.errors.details[:widgets]) - .to contain_exactly({ error: :outside }) - end - end - - context "widgets spanning the whole grid" do - before do - grid.widgets.build(start_row: 1, - end_row: grid.row_count + 1, - start_column: 1, - end_column: grid.column_count + 1, - identifier: "work_packages_table") - end - - it "is valid" do - expect(instance.validate) - .to be_truthy - end - end - - context "widgets having start after end column" do - before do - grid.widgets.build(start_row: 1, - end_row: 2, - start_column: 4, - end_column: 3, - identifier: "work_packages_table") - end - - it "is invalid" do - expect(instance.validate) - .to be_falsey - end - - it "notes the error" do - instance.validate - expect(instance.errors.details[:widgets]) - .to contain_exactly({ error: :end_before_start }) - end - end - - context "widgets having start after end row" do - before do - grid.widgets.build(start_row: 4, - end_row: 2, - start_column: 1, - end_column: 3, - identifier: "work_packages_table") - end - - it "is invalid" do - expect(instance.validate) - .to be_falsey - end - - it "notes the error" do - instance.validate - expect(instance.errors.details[:widgets]) - .to contain_exactly({ error: :end_before_start }) - end - end - - context "widgets having start equals end column" do - before do - grid.widgets.build(start_row: 1, - end_row: 2, - start_column: 4, - end_column: 3, - identifier: "work_packages_table") - end - - it "is invalid" do - expect(instance.validate) - .to be_falsey - end - - it "notes the error" do - instance.validate - expect(instance.errors.details[:widgets]) - .to contain_exactly({ error: :end_before_start }) - end - end - - context "widgets having start equals end row" do - before do - grid.widgets.build(start_row: 2, - end_row: 2, - start_column: 1, - end_column: 3, - identifier: "work_packages_table") - end - - it "is invalid" do - expect(instance.validate) - .to be_falsey - end - - it "notes the error" do - instance.validate - expect(instance.errors.details[:widgets]) - .to contain_exactly({ error: :end_before_start }) - end - end - end -end diff --git a/modules/dashboards/spec/factories/grid_factory.rb b/modules/dashboards/spec/factories/grid_factory.rb deleted file mode 100644 index 691119b01e6..00000000000 --- a/modules/dashboards/spec/factories/grid_factory.rb +++ /dev/null @@ -1,62 +0,0 @@ -FactoryBot.define do - factory :dashboard, class: "Grids::Dashboard" do - project - row_count { 7 } - column_count { 4 } - widgets do - [ - Grids::Widget.new( - identifier: "work_packages_table", - start_row: 1, - end_row: 7, - start_column: 1, - end_column: 3 - ) - ] - end - end - - factory :dashboard_with_table, class: "Grids::Dashboard" do - project - row_count { 7 } - column_count { 4 } - - callback(:after_build) do |dashboard| - query = create(:query, project: dashboard.project, public: true) - - widget = build(:grid_widget, - identifier: "work_packages_table", - start_row: 1, - end_row: 7, - start_column: 1, - end_column: 3, - options: { - name: "Work package table", - queryId: query.id - }) - - dashboard.widgets = [widget] - end - end - - factory :dashboard_with_custom_text, class: "Grids::Dashboard" do - project - row_count { 7 } - column_count { 4 } - - callback(:after_build) do |dashboard| - widget = build(:grid_widget, - identifier: "custom_text", - start_row: 1, - end_row: 7, - start_column: 1, - end_column: 3, - options: { - name: "Custom text", - text: "Lorem ipsum" - }) - - dashboard.widgets = [widget] - end - end -end diff --git a/modules/dashboards/spec/features/custom_text_spec.rb b/modules/dashboards/spec/features/custom_text_spec.rb deleted file mode 100644 index 05c7615fce2..00000000000 --- a/modules/dashboards/spec/features/custom_text_spec.rb +++ /dev/null @@ -1,182 +0,0 @@ -#-- copyright -# OpenProject is an open source project management software. -# Copyright (C) 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 "spec_helper" - -require_relative "../support/pages/dashboard" - -RSpec.describe "Project description widget on dashboard", :js do - let!(:type) { create(:type_task, name: "Task") } - let!(:project) do - create(:project, types: [type]) - end - - let(:permissions) do - %i[view_dashboards - manage_dashboards - add_work_packages] - end - - let(:role) do - create(:project_role, permissions:) - end - - let(:user) do - create(:user, member_with_permissions: { project => permissions }) - end - let(:dashboard_page) do - Pages::Dashboard.new(project) - end - let(:image_fixture) { UploadedFile.load_from("spec/fixtures/files/image.png") } - let(:editor) { Components::WysiwygEditor.new "body" } - let(:field) { TextEditorField.new(page, "description", selector: ".inline-edit--active-field") } - - before do - login_as user - end - - context "for a user having edit permissions" do - before do - dashboard_page.visit! - end - - it "can use the wp create button macro within it" do - dashboard_page.add_widget(1, 1, :within, "Custom text") - - sleep(0.1) - - # As the user lacks the manage_public_queries and save_queries permission, no other widget is present - custom_text_widget = Components::Grids::GridArea.new(".grid--area.-widgeted:nth-of-type(1)") - - within custom_text_widget.area do - find(".inplace-editing--container").click - end - - editor.insert_macro "Insert create work package button" - - expect(page).to have_css(".spot-modal") - select "Task", from: "selected-type" - find(".spot-modal--submit-button").click - - field.save! - - dashboard_page.expect_and_dismiss_toaster message: I18n.t("js.notice_successful_update") - - within("#content") do - expect(page).to have_css("a[href=\"/projects/#{project.identifier}/work_packages/new?type=#{type.id}\"]") - end - end - - it "can add the widget set custom text and upload attachments" do - dashboard_page.add_widget(1, 1, :within, "Custom text") - - sleep(0.1) - - # As the user lacks the manage_public_queries and save_queries permission, no other widget is present - custom_text_widget = Components::Grids::GridArea.new(".grid--area.-widgeted:nth-of-type(1)") - - within custom_text_widget.area do - find(".inplace-editing--container").click - - field.set_value("My own little text") - field.save! - end - - dashboard_page.expect_and_dismiss_toaster message: I18n.t("js.notice_successful_update") - - within custom_text_widget.area do - expect(page) - .to have_css(".inline-edit--display-field", text: "My own little text") - - find(".inplace-editing--container").click - - field.set_value("My new text") - field.cancel_by_click - - expect(page) - .to have_css(".inline-edit--display-field", text: "My own little text") - end - - dashboard_page.expect_no_toaster message: I18n.t("js.notice_successful_update") - - within custom_text_widget.area do - # adding an image - find(".inplace-editing--container").click - - sleep(0.1) - end - - # The drag_attachment is written in a way that it requires to be executed with page on body - # so we cannot have it wrapped in the within block. - editor.drag_attachment image_fixture.path, "Image uploaded" - - within custom_text_widget.area do - expect(page).to have_test_selector("op-attachment-list-item", text: "image.png") - expect(page).to have_no_css("notifications-upload-progress") - - field.save! - end - - dashboard_page.expect_and_dismiss_toaster message: I18n.t("js.notice_successful_update") - - within custom_text_widget.area do - expect(page) - .to have_css("#content img", count: 1) - - expect(page) - .not_to have_test_selector("op-attachment-list-item", text: "image.png") - end - end - end - - context "for a user lacking edit permissions" do - let!(:dashboard) do - create(:dashboard_with_custom_text, project:) - end - - let(:permissions) do - %i[view_dashboards] - end - - before do - dashboard_page.visit! - end - - it "allows reading but not editing the custom text" do - custom_text_widget = Components::Grids::GridArea.new(".grid--area.-widgeted:nth-of-type(1)") - - within custom_text_widget.area do - expect(page) - .to have_content(dashboard.widgets.first.options[:text]) - - expect(page) - .to have_no_css(".inplace-editing--container") - end - end - end -end diff --git a/modules/dashboards/spec/features/docments_spec.rb b/modules/dashboards/spec/features/docments_spec.rb deleted file mode 100644 index 61221d877d6..00000000000 --- a/modules/dashboards/spec/features/docments_spec.rb +++ /dev/null @@ -1,85 +0,0 @@ -#-- copyright -# OpenProject is an open source project management software. -# Copyright (C) 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 "spec_helper" - -require_relative "../support/pages/dashboard" - -RSpec.describe "Documents widget on dashboard", :js do - let!(:project) { create(:project) } - let!(:other_project) { create(:project) } - let!(:visible_document) do - create(:document, - project:, - description: "blubs") - end - let!(:invisible_document) do - create(:document, - project: other_project) - end - let(:role) do - create(:project_role, - permissions: %i[view_documents - view_dashboards - manage_dashboards]) - end - let(:user) do - create(:user).tap do |u| - create(:member, project:, roles: [role], user: u) - create(:member, project: other_project, roles: [role], user: u) - end - end - let(:dashboard) do - Pages::Dashboard.new(project) - end - - before do - login_as user - - dashboard.visit! - end - - it "can add the widget and see the visible documents" do - # within top-right area, add an additional widget - dashboard.add_widget(1, 1, :within, "Documents") - - document_widget = Components::Grids::GridArea.new(".grid--area.-widgeted:nth-of-type(1)") - - within document_widget.area do - expect(page) - .to have_content visible_document.title - expect(page) - .to have_content visible_document.description - expect(page) - .to have_content visible_document.created_at.strftime("%m/%d/%Y") - - expect(page) - .to have_no_content invisible_document.title - end - end -end diff --git a/modules/dashboards/spec/features/members_principals_spec.rb b/modules/dashboards/spec/features/members_principals_spec.rb deleted file mode 100644 index d5c5af3a1a1..00000000000 --- a/modules/dashboards/spec/features/members_principals_spec.rb +++ /dev/null @@ -1,89 +0,0 @@ -#-- copyright -# OpenProject is an open source project management software. -# Copyright (C) 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 "spec_helper" - -require_relative "../support/pages/dashboard" - -RSpec.describe "Dashboard page members", :js do - shared_let(:type) { create(:type) } - shared_let(:project) { create(:project, types: [type], description: "My **custom** description") } - - shared_let(:permissions) do - %i[manage_dashboards - view_dashboards - view_members] - end - - shared_let(:user) do - create(:user, - firstname: "Foo", - lastname: "Bar", - member_with_permissions: { project => permissions }) - end - - shared_let(:group) do - create(:group, - name: "DEV Team", - member_with_permissions: { project => permissions }) - end - - shared_let(:placeholder) do - create(:placeholder_user, - name: "DEVELOPER PLACEHOLDER", - member_with_permissions: { project => permissions }) - end - - let(:dashboard_page) do - Pages::Dashboard.new(project) - end - - before do - login_as user - - dashboard_page.visit! - end - - it "renders the default view, allows altering and saving" do - # within top-right area, add an additional widget - dashboard_page.add_widget(1, 1, :within, "Members") - - members_block = page.find(".widget-box", text: "Members") - - within(members_block) do - user_link = find("op-principal a", text: user.name) - expect(user_link["href"]).to end_with user_path(user.id) - - group_link = find("op-principal a", text: group.name) - expect(group_link["href"]).to end_with show_group_path(group.id) - - placeholder_link = find("op-principal a", text: placeholder.name) - expect(placeholder_link["href"]).to end_with placeholder_user_path(placeholder.id) - end - end -end diff --git a/modules/dashboards/spec/features/members_spec.rb b/modules/dashboards/spec/features/members_spec.rb deleted file mode 100644 index 816be9706e2..00000000000 --- a/modules/dashboards/spec/features/members_spec.rb +++ /dev/null @@ -1,152 +0,0 @@ -#-- copyright -# OpenProject is an open source project management software. -# Copyright (C) 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 "spec_helper" - -require_relative "../support/pages/dashboard" - -RSpec.describe "Members widget on dashboard", :js do - let!(:project) { create(:project) } - let!(:other_project) { create(:project) } - - let!(:manager_user) do - create(:user, lastname: "Manager", member_with_roles: { project => role }) - end - let!(:no_edit_member_user) do - create(:user, lastname: "No_Edit", member_with_roles: { project => no_edit_member_role }) - end - let!(:no_view_member_user) do - create(:user, lastname: "No_View", member_with_roles: { project => no_view_member_role }) - end - let!(:placeholder_user) do - create(:placeholder_user, - lastname: "Placeholder user", - member_with_roles: { project => no_view_member_role }) - end - let!(:invisible_user) do - create(:user, lastname: "Invisible", member_with_roles: { other_project => role }) - end - - let(:no_view_member_role) do - create(:project_role, - permissions: %i[manage_dashboards - view_dashboards]) - end - let(:no_edit_member_role) do - create(:project_role, - permissions: %i[manage_dashboards - view_dashboards - view_members]) - end - let(:role) do - create(:project_role, - permissions: %i[manage_dashboards - view_dashboards - manage_members - view_members]) - end - let(:dashboard) do - Pages::Dashboard.new(project) - end - - before do - login_as manager_user - - dashboard.visit! - end - - def expect_all_members_visible(area) - within area do - expect(page) - .to have_content role.name - expect(page) - .to have_content manager_user.name - expect(page) - .to have_content no_edit_member_role - expect(page) - .to have_content no_edit_member_user.name - expect(page) - .to have_content no_view_member_role - expect(page) - .to have_content no_view_member_user.name - expect(page) - .to have_content placeholder_user.name - end - end - - it "can add the widget and see the members if the permissions suffice" do - # within top-right area, add an additional widget - dashboard.add_widget(1, 1, :within, "Members") - - members_area = Components::Grids::GridArea.new(".grid--area.-widgeted:nth-of-type(1)") - - expect_all_members_visible(members_area.area) - - expect(page) - .to have_no_content invisible_user.name - - within members_area.area do - expect(page) - .to have_link("Member") - end - - # A user without edit permission will see the members but cannot add one - login_as no_edit_member_user - - visit root_path - dashboard.visit! - - expect_all_members_visible(members_area.area) - - within members_area.area do - expect(page) - .to have_no_link("Member") - end - - # A user without view permission will not see any members - login_as no_view_member_user - - visit root_path - - dashboard.visit! - - within members_area.area do - expect(page) - .to have_no_content manager_user.name - - expect(page) - .to have_content("No visible members") - - expect(page) - .to have_no_link("Member") - - expect(page) - .to have_no_link("View all members") - end - end -end diff --git a/modules/dashboards/spec/features/modifying_with_unallowed_spec.rb b/modules/dashboards/spec/features/modifying_with_unallowed_spec.rb deleted file mode 100644 index 4deefe69c15..00000000000 --- a/modules/dashboards/spec/features/modifying_with_unallowed_spec.rb +++ /dev/null @@ -1,95 +0,0 @@ -#-- copyright -# OpenProject is an open source project management software. -# Copyright (C) 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 "spec_helper" - -require_relative "../support/pages/dashboard" - -RSpec.describe "Modifying a dashboard which already has widgets for which permissions are lacking", :js do - let!(:project) do - create(:project) - end - - let(:permissions) do - %i[view_dashboards - manage_dashboards] - end - - let(:user) do - create(:user, member_with_permissions: { project => permissions }) - end - let!(:dashboard) do - create(:dashboard_with_table, project:) - end - let(:dashboard_page) do - Pages::Dashboard.new(project) - end - let!(:news) do - create(:news, - project:) - end - - before do - login_as user - - dashboard_page.visit! - end - - it "can add and modify widgets" do - dashboard_page.add_widget(dashboard.row_count, dashboard.column_count, :row, "News") - - sleep(0.1) - - news_widget = Components::Grids::GridArea.new(".grid--area.-widgeted:nth-of-type(2)") - - within news_widget.area do - expect(page) - .to have_content(news.title) - end - - visit root_path - - dashboard_page.visit! - - news_widget = Components::Grids::GridArea.new(".grid--area.-widgeted:nth-of-type(2)") - - within news_widget.area do - expect(page) - .to have_content(news.title) - end - - news_widget.remove - - visit root_path - - dashboard_page.visit! - - expect(page) - .to have_no_css(".grid--area.-widgeted:nth-of-type(2)") - end -end diff --git a/modules/dashboards/spec/features/navigation_spec.rb b/modules/dashboards/spec/features/navigation_spec.rb deleted file mode 100644 index 6b52ff878d3..00000000000 --- a/modules/dashboards/spec/features/navigation_spec.rb +++ /dev/null @@ -1,55 +0,0 @@ -#-- copyright -# OpenProject is an open source project management software. -# Copyright (C) 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 "spec_helper" - -RSpec.describe "Navigate to dashboard", :js do - let(:project) { create(:project) } - let(:permissions) { [:view_dashboards] } - let(:user) do - create(:user, - member_with_permissions: { project => permissions }) - end - - before do - login_as user - end - - it "can visit the dashboard" do - visit project_path(project) - - within "#menu-sidebar" do - click_link "Dashboard" - end - - within "#content" do - expect(page) - .to have_content("Dashboard") - end - end -end diff --git a/modules/dashboards/spec/features/news_spec.rb b/modules/dashboards/spec/features/news_spec.rb deleted file mode 100644 index c061c0c2d4d..00000000000 --- a/modules/dashboards/spec/features/news_spec.rb +++ /dev/null @@ -1,88 +0,0 @@ -#-- copyright -# OpenProject is an open source project management software. -# Copyright (C) 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 "spec_helper" - -require_relative "../support/pages/dashboard" - -RSpec.describe "News widget on dashboard", :js do - let!(:project) { create(:project) } - let!(:other_project) { create(:project) } - let!(:visible_news) do - create(:news, - project:, - description: "blubs") - end - let!(:invisible_news) do - create(:news, - project: other_project) - end - let(:role) do - create(:project_role, - permissions: %i[view_news - view_dashboards - manage_dashboards]) - end - let(:user) do - create(:user).tap do |u| - create(:member, project:, roles: [role], user: u) - create(:member, project: other_project, roles: [role], user: u) - end - end - - let(:dashboard) do - Pages::Dashboard.new(project) - end - - before do - login_as user - - dashboard.visit! - end - - it "can add the widget and see the visible news" do - # within top-right area, add an additional widget - dashboard.add_widget(1, 1, :within, "News") - - news_widget = Components::Grids::GridArea.new(".grid--area.-widgeted:nth-of-type(1)") - - within news_widget.area do - expect(page) - .to have_content visible_news.title - expect(page) - .to have_content visible_news.author.name - expect(page) - .to have_content visible_news.project.name - expect(page) - .to have_content visible_news.created_at.strftime("%m/%d/%Y") - - expect(page) - .to have_no_content invisible_news.title - end - end -end diff --git a/modules/dashboards/spec/features/project_description_spec.rb b/modules/dashboards/spec/features/project_description_spec.rb deleted file mode 100644 index fc16bbe05af..00000000000 --- a/modules/dashboards/spec/features/project_description_spec.rb +++ /dev/null @@ -1,153 +0,0 @@ -#-- copyright -# OpenProject is an open source project management software. -# Copyright (C) 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 "spec_helper" - -require_relative "../support/pages/dashboard" - -RSpec.describe "Project description widget on dashboard", :js do - let(:project_description) { "Some text I like to write" } - let!(:project) do - create(:project, description: project_description) - end - - let(:read_only_permissions) do - %i[view_dashboards - manage_dashboards] - end - - let(:editing_permissions) do - %i[view_dashboards - manage_dashboards - edit_project] - end - - let(:read_only_user) do - create(:user, member_with_permissions: { project => read_only_permissions }) - end - - let(:editing_user) do - create(:user, member_with_permissions: { project => editing_permissions }) - end - - let(:dashboard_page) do - Pages::Dashboard.new(project) - end - - def add_project_description_widget - dashboard_page.visit! - dashboard_page.add_widget(1, 1, :within, "Project description") - - dashboard_page.expect_and_dismiss_toaster message: I18n.t("js.notice_successful_update") - end - - before do - login_as current_user - add_project_description_widget - end - - context "without editing permissions" do - let(:current_user) { read_only_user } - - it "can add the widget, but not edit the description" do - # As the user lacks the manage_public_queries and save_queries permission, no other widget is present - description_widget = Components::Grids::GridArea.new(".grid--area.-widgeted:nth-of-type(1)") - - within(description_widget.area) do - # The description is visible - expect(page) - .to have_content(project_description) - - # The description is not editable - field = TextEditorField.new dashboard_page, "description" - field.expect_read_only - field.activate! expect_open: false - end - end - end - - context "with editing permissions" do - let(:current_user) { editing_user } - - it "can edit the description" do - # As the user lacks the manage_public_queries and save_queries permission, no other widget is present - description_widget = Components::Grids::GridArea.new(".grid--area.-widgeted:nth-of-type(1)") - - within(description_widget.area) do - # Open description field - field = TextEditorField.new dashboard_page, "description" - field.activate! - sleep(0.1) - - # Change the value - field.expect_value(project_description) - field.set_value "A completely new description which is super cool." - field.save! - - # The edit field is toggled and the value saved. - expect(page).to have_content("A completely new description which is super cool.") - expect(page).to have_selector(field.selector) - expect(page).to have_no_selector(field.input_selector) - end - end - end - - context "with editing and wp add permissions" do - let!(:type) { create(:type_task, name: "Task") } - let!(:project) do - create(:project, types: [type]) - end - - let(:current_user) do - create(:user, member_with_permissions: { project => editing_permissions + %i[add_work_packages] }) - end - let(:editor) { Components::WysiwygEditor.new "body" } - - it "can create a button macro for work packages" do - # As the user lacks the manage_public_queries and save_queries permission, no other widget is present - description_widget = Components::Grids::GridArea.new(".grid--area.-widgeted:nth-of-type(1)") - - field = TextEditorField.new dashboard_page, "description" - field.activate! - - editor.insert_macro "Insert create work package button" - - expect(page).to have_css(".spot-modal") - select "Task", from: "selected-type" - find(".spot-modal--submit-button").click - - field.save! - - dashboard_page.expect_and_dismiss_toaster message: I18n.t("js.notice_successful_update") - - within("#content") do - expect(page).to have_css("a[href=\"/projects/#{project.identifier}/work_packages/new?type=#{type.id}\"]") - end - end - end -end diff --git a/modules/dashboards/spec/features/project_status_spec.rb b/modules/dashboards/spec/features/project_status_spec.rb deleted file mode 100644 index ae1fa82de54..00000000000 --- a/modules/dashboards/spec/features/project_status_spec.rb +++ /dev/null @@ -1,152 +0,0 @@ -#-- copyright -# OpenProject is an open source project management software. -# Copyright (C) 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 "spec_helper" - -require_relative "../support/pages/dashboard" - -RSpec.describe "Project status widget on dashboard", :js, :selenium do - let!(:project) do - create(:project, - status_code: "on_track", - status_explanation: "some explanation") - end - - let(:read_only_permissions) do - %i[view_dashboards manage_dashboards] - end - - let(:editing_permissions) do - %i[view_dashboards - manage_dashboards - edit_project] - end - - let(:read_only_user) do - create(:user, - member_with_permissions: { project => read_only_permissions }) - end - - let(:editing_user) do - create(:user, - member_with_permissions: { project => editing_permissions }) - end - - let(:dashboard_page) do - Pages::Dashboard.new(project) - end - - def add_project_status_widget - dashboard_page.visit! - dashboard_page.add_widget(1, 1, :within, "Project status") - - dashboard_page.expect_and_dismiss_toaster message: I18n.t("js.notice_successful_update") - end - - before do - login_as current_user - add_project_status_widget - end - - context "without editing permissions" do - let(:current_user) { read_only_user } - - it "can add the widget, but not edit the status" do - # As the user lacks the manage_public_queries and save_queries permission, no other widget is present - status_widget = Components::Grids::GridArea.new(".grid--area.-widgeted:nth-of-type(1)") - - within(status_widget.area) do - # The description is visible - expect(page) - .to have_content("ON TRACK") - - expect(page) - .to have_content(project.status_explanation) - - # The status selector does not open - field = EditField.new(dashboard_page, "status") - field.expect_read_only - field.activate! expect_open: false - - # The explanation is not editable - field = TextEditorField.new(dashboard_page, "statusExplanation") - field.expect_read_only - field.activate! expect_open: false - end - end - end - - context "with editing permissions" do - let(:current_user) { editing_user } - - it "can edit the status and its explanation" do - # As the user lacks the manage_public_queries and save_queries permission, no other widget is present - status_widget = Components::Grids::GridArea.new(".grid--area.-widgeted:nth-of-type(1)") - - within(status_widget.area) do - # Open status selector - field = ProjectStatusField.new(dashboard_page, "status") - field.activate! - sleep(0.1) - - # Change the value - field.set_to("AT RISK") - - # The edit field is toggled and the value saved. - expect(page).to have_content("AT RISK", wait: 5) - expect(page).to have_selector(field.selector) - expect(page).to have_no_selector(field.input_selector) - - # Unset the project status - field.activate! - sleep(0.1) - field.set_to("NOT SET") - - # The edit field is toggled and the value saved. - expect(page).to have_content("NOT SET", wait: 5) - expect(page).to have_selector(field.selector) - expect(page).to have_no_selector(field.input_selector) - - # Open explanation field - field = TextEditorField.new dashboard_page, "statusExplanation" - field.activate! - sleep(0.1) - - # Change the value - field.expect_value(project.status_explanation) - field.set_value "A completely new explanation which is super cool." - field.save! - - # The edit field is toggled and the value saved. - expect(page).to have_content("A completely new explanation which is super cool.") - expect(page).to have_selector(field.selector) - expect(page).to have_no_selector(field.input_selector) - end - end - end -end diff --git a/modules/dashboards/spec/features/read_only_allowed_spec.rb b/modules/dashboards/spec/features/read_only_allowed_spec.rb deleted file mode 100644 index afa897387d5..00000000000 --- a/modules/dashboards/spec/features/read_only_allowed_spec.rb +++ /dev/null @@ -1,93 +0,0 @@ -#-- copyright -# OpenProject is an open source project management software. -# Copyright (C) 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 "spec_helper" - -require_relative "../support/pages/dashboard" - -RSpec.describe "Read only mode when user lacks edit permission on dashboard", :js do - let!(:type) { create(:type) } - let!(:project) { create(:project, types: [type]) } - let!(:work_package) do - create(:work_package, - project:, - type:, - author: user, - responsible: user) - end - let!(:dashboard) do - create(:dashboard_with_table, project:) - end - - let(:permissions) do - %i[view_work_packages - add_work_packages - save_queries - manage_public_queries - view_dashboards] - end - - let(:role) do - create(:project_role, permissions:) - end - - let(:user) do - create(:user).tap do |u| - create(:member, project:, user: u, roles: [role]) - end - end - let(:dashboard_page) do - Pages::Dashboard.new(project) - end - - before do - login_as user - - dashboard_page.visit! - end - - it "can not modify the dashboard but can still use it" do - dashboard_page.expect_unable_to_add_widget(dashboard.row_count, dashboard.column_count, :row) - dashboard_page.expect_no_help_mode - - table_widget = Components::Grids::GridArea.new(".grid--area.-widgeted:nth-of-type(1)") - - table_widget.expect_not_resizable - - table_widget.expect_not_draggable - - table_widget.expect_not_renameable - - table_widget.expect_no_menu - - within table_widget.area do - expect(page) - .to have_content(work_package.subject) - end - end -end diff --git a/modules/dashboards/spec/features/subprojects_spec.rb b/modules/dashboards/spec/features/subprojects_spec.rb deleted file mode 100644 index 0ce1cf65ee9..00000000000 --- a/modules/dashboards/spec/features/subprojects_spec.rb +++ /dev/null @@ -1,130 +0,0 @@ -#-- copyright -# OpenProject is an open source project management software. -# Copyright (C) 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 "spec_helper" - -require_relative "../support/pages/dashboard" - -RSpec.describe "Subprojects widget on dashboard", :js do - let!(:project) do - create(:project, parent: parent_project) - end - - let!(:child_project) do - create(:project, parent: project) - end - let!(:archived_child_project) do - create(:project, :archived, parent: project) - end - let!(:invisible_child_project) do - create(:project, parent: project) - end - let!(:grandchild_project) do - create(:project, parent: child_project) - end - let!(:parent_project) do - create(:project) - end - - let(:permissions) do - %i[view_dashboards - manage_dashboards] - end - - let(:role) do - create(:project_role, permissions:) - end - - let(:user) do - create(:user).tap do |u| - create(:member, project:, roles: [role], user: u) - create(:member, project: child_project, roles: [role], user: u) - create(:member, project: archived_child_project, roles: [role], user: u) - create(:member, project: grandchild_project, roles: [role], user: u) - create(:member, project: parent_project, roles: [role], user: u) - end - end - let(:dashboard_page) do - Pages::Dashboard.new(project) - end - - context "as a user" do - current_user { user } - - it "can add the widget listing active subprojects the user is member of", :aggregate_failures do - dashboard_page.visit! - dashboard_page.add_widget(1, 1, :within, "Subprojects") - - subprojects_widget = Components::Grids::GridArea.new(".grid--area.-widgeted:nth-of-type(1)") - - expect(page) - .to have_link(child_project.name) - - within(subprojects_widget.area) do - expect(page) - .to have_link(child_project.name) - expect(page) - .to have_no_link(archived_child_project.name) - expect(page) - .to have_no_link(grandchild_project.name) - expect(page) - .to have_no_link(invisible_child_project.name) - expect(page) - .to have_no_link(parent_project.name) - expect(page) - .to have_no_link(project.name) - end - end - end - - context "as an admin" do - current_user { create(:admin) } - - it "can add the widget listing all active subprojects", :aggregate_failures do - dashboard_page.visit! - dashboard_page.add_widget(1, 2, :within, "Subprojects") - - subprojects_widget = Components::Grids::GridArea.new(".grid--area.-widgeted:nth-of-type(2)") - - within(subprojects_widget.area) do - expect(page) - .to have_link(child_project.name) - expect(page) - .to have_no_link(archived_child_project.name) - expect(page) - .to have_no_link(grandchild_project.name) - expect(page) - .to have_link(invisible_child_project.name) # admins can see projects they are not a member of - expect(page) - .to have_no_link(parent_project.name) - expect(page) - .to have_no_link(project.name) - end - end - end -end diff --git a/modules/dashboards/spec/features/time_entries_spec.rb b/modules/dashboards/spec/features/time_entries_spec.rb deleted file mode 100644 index 9816b922cd8..00000000000 --- a/modules/dashboards/spec/features/time_entries_spec.rb +++ /dev/null @@ -1,134 +0,0 @@ -#-- copyright -# OpenProject is an open source project management software. -# Copyright (C) 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 "spec_helper" - -require_relative "../support/pages/dashboard" - -RSpec.describe "Time entries widget on dashboard", :js do - let!(:type) { create(:type) } - let!(:project) { create(:project, types: [type]) } - let!(:other_project) { create(:project, types: [type]) } - let!(:work_package) { create(:work_package, project:, type:, author: user) } - let!(:other_work_package) { create(:work_package, project: other_project, type:, author: user) } - let!(:visible_time_entry) do - create(:time_entry, - entity: work_package, - project:, - user:, - spent_on: Time.zone.today, - hours: 6, - comments: "My comment") - end - let!(:other_visible_time_entry) do - create(:time_entry, - entity: work_package, - project:, - user: other_user, - spent_on: 1.day.ago.to_date, - hours: 5, - comments: "Another`s comment") - end - let!(:invisible_time_entry) do - create(:time_entry, - entity: other_work_package, - project: other_project, - user:, - hours: 4) - end - let(:role) do - create(:project_role, - permissions: %i[view_time_entries - view_work_packages - edit_time_entries - view_dashboards - manage_dashboards]) - end - let(:other_user) do - create(:user) - end - let(:user) do - create(:user, member_with_roles: { project => role, other_project => role }) - end - - let(:time_logging_modal) { Components::TimeLoggingModal.new } - - let(:dashboard) do - Pages::Dashboard.new(project) - end - - before do - login_as user - - dashboard.visit! - end - - it "adds the widget and checks the displayed entries" do - # within top-right area, add an additional widget - dashboard.add_widget(1, 1, :within, 'Spent time \(last 7 days\)') - - spent_time_widget = Components::Grids::GridArea.new(".grid--area.-widgeted:nth-of-type(1)") - - within spent_time_widget.area do - expect(page).to have_content "Total: 11 h" - - expect(page).to have_content Time.zone.today.strftime("%m/%d/%Y") - expect(page).to have_css(".activity", text: visible_time_entry.activity.name) - expect(page).to have_css(".subject", text: "#{project.name} - ##{work_package.id}: #{work_package.subject}") - expect(page).to have_css(".comments", text: visible_time_entry.comments) - expect(page).to have_css(".hours", text: visible_time_entry.hours) - - expect(page).to have_content(1.day.ago.strftime("%m/%d/%Y")) - expect(page).to have_css(".activity", text: other_visible_time_entry.activity.name) - expect(page).to have_css(".subject", text: "#{project.name} - ##{work_package.id}: #{work_package.subject}") - expect(page).to have_css(".comments", text: other_visible_time_entry.comments) - expect(page).to have_css(".hours", text: other_visible_time_entry.hours) - - # Allows to edit - page.find_test_selector("edit-time-entry-#{visible_time_entry.id}").click - end - - time_logging_modal.is_visible true - - time_logging_modal.expect_work_package work_package - - time_logging_modal.update_field "hours", 4 - - sleep(0.1) - - time_logging_modal.submit - time_logging_modal.is_visible false - - within spent_time_widget.area do - expect(page).to have_css(".hours", text: 4) - end - - visible_time_entry.reload - expect(visible_time_entry.hours).to eq 4.0 - end -end diff --git a/modules/dashboards/spec/features/work_package_calendar_spec.rb b/modules/dashboards/spec/features/work_package_calendar_spec.rb deleted file mode 100644 index 22b77ab3da1..00000000000 --- a/modules/dashboards/spec/features/work_package_calendar_spec.rb +++ /dev/null @@ -1,142 +0,0 @@ -#-- copyright -# OpenProject is an open source project management software. -# Copyright (C) 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 "spec_helper" - -require_relative "../support/pages/dashboard" - -RSpec.describe "Work package calendar widget on dashboard", :js do - let!(:type) { create(:type) } - let!(:priority) { create(:default_priority) } - let!(:project) { create(:project, types: [type]) } - let!(:other_project) { create(:project, types: [type]) } - let!(:open_status) { create(:default_status) } - let!(:spanning_work_package) do - create(:work_package, - subject: "Spanning work package", - project:, - start_date: Date.today - 8.days, - due_date: Date.today + 8.days, - type:, - author: user, - responsible: user) - end - let!(:starting_work_package) do - create(:work_package, - subject: "Starting work package", - project:, - start_date: Date.today, - due_date: Date.today + 8.days, - type:, - author: user, - responsible: user) - end - let!(:ending_work_package) do - create(:work_package, - subject: "Ending work package", - project:, - start_date: Date.today - 8.days, - due_date: Date.today, - type:, - author: user, - responsible: user) - end - let!(:outdated_work_package) do - create(:work_package, - subject: "Outdated work package", - project:, - start_date: Date.today - 9.days, - due_date: Date.today - 7.days, - type:, - author: user, - responsible: user) - end - let!(:other_project_work_package) do - create(:work_package, - subject: "Other project work package", - project: other_project, - start_date: Date.today - 9.days, - due_date: Date.today + 7.days, - type:, - author: user, - responsible: user) - end - - let(:permissions) do - %i[view_work_packages - view_dashboards - manage_dashboards] - end - - let(:role) do - create(:project_role, permissions:) - end - - let(:user) do - create(:user).tap do |u| - create(:member, project:, user: u, roles: [role]) - create(:member, project: other_project, user: u, roles: [role]) - end - end - - let(:dashboard) do - Pages::Dashboard.new(project) - end - - before do - login_as user - - dashboard.visit! - end - - it "can add the widget and see the work packages of the project" do - dashboard.add_widget(1, 1, :within, "Calendar") - - sleep(0.1) - - # As the user lacks the necessary permissions, no widget is preconfigured - calendar_widget = Components::Grids::GridArea.new(".grid--area.-widgeted:nth-of-type(1)") - - within(calendar_widget.area) do - expect(page) - .to have_css(".fc-event-title", text: spanning_work_package.subject) - - expect(page) - .to have_css(".fc-event-title", text: starting_work_package.subject) - - expect(page) - .to have_css(".fc-event-title", text: ending_work_package.subject) - - expect(page) - .to have_no_css(".fc-event-title", text: outdated_work_package.subject) - - expect(page) - .to have_no_css(".fc-event-title", text: other_project_work_package.subject) - end - end -end diff --git a/modules/dashboards/spec/features/work_package_graph_overview_spec.rb b/modules/dashboards/spec/features/work_package_graph_overview_spec.rb deleted file mode 100644 index 19b7231c217..00000000000 --- a/modules/dashboards/spec/features/work_package_graph_overview_spec.rb +++ /dev/null @@ -1,95 +0,0 @@ -#-- copyright -# OpenProject is an open source project management software. -# Copyright (C) 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 "spec_helper" - -require_relative "../support/pages/dashboard" - -RSpec.describe "Work package overview graph widget on dashboard", :js do - let!(:type) { create(:type) } - let!(:priority) { create(:default_priority) } - let!(:project) { create(:project, types: [type]) } - let!(:open_status) { create(:default_status) } - let!(:closed_status) { create(:closed_status) } - let!(:open_work_package) do - create(:work_package, - subject: "Spanning work package", - project:, - status: open_status, - type:, - author: user, - responsible: user) - end - let!(:closed) do - create(:work_package, - subject: "Starting work package", - project:, - status: closed_status, - type:, - author: user, - responsible: user) - end - - let(:permissions) do - %i[view_work_packages - view_dashboards - manage_dashboards] - end - - let(:role) do - create(:project_role, permissions:) - end - - let(:user) do - create(:user).tap do |u| - create(:member, project:, user: u, roles: [role]) - end - end - - let(:dashboard) do - Pages::Dashboard.new(project) - end - - before do - login_as user - - dashboard.visit! - end - - # As a graph is rendered as a canvas, we have limited abilities to test the widget - it "can add the widget", :selenium do - sleep(0.1) - - dashboard.add_widget(1, 1, :within, "Work packages overview") - - # As the user lacks the necessary permissions, no widget is preconfigured - overview_widget = Components::Grids::GridArea.new(".grid--area.-widgeted:nth-of-type(1)") - - overview_widget.expect_to_span(1, 1, 2, 2) - end -end diff --git a/modules/dashboards/spec/features/work_package_graph_spec.rb b/modules/dashboards/spec/features/work_package_graph_spec.rb deleted file mode 100644 index 8735aaf2d3d..00000000000 --- a/modules/dashboards/spec/features/work_package_graph_spec.rb +++ /dev/null @@ -1,172 +0,0 @@ -#-- copyright -# OpenProject is an open source project management software. -# Copyright (C) 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 "spec_helper" - -require_relative "../support/pages/dashboard" - -RSpec.describe "Arbitrary WorkPackage query graph widget dashboard", - :js, - :selenium do - let!(:type) { create(:type) } - let!(:other_type) { create(:type) } - let!(:priority) { create(:default_priority) } - let!(:project) { create(:project, types: [type]) } - let!(:other_project) { create(:project, types: [type]) } - let!(:open_status) { create(:default_status) } - let!(:closed_status) { create(:status, is_closed: true) } - let!(:type_work_package) do - create(:work_package, - project:, - type:, - author: user, - status: open_status, - responsible: user) - end - let!(:other_type_work_package) do - create(:work_package, - project:, - type: other_type, - author: user, - status: closed_status, - responsible: user) - end - let!(:other_project_work_package) do - create(:work_package, - project: other_project, - type:, - author: user, - status: open_status, - responsible: user) - end - - let(:permissions) do - %i[view_work_packages - add_work_packages - save_queries - manage_public_queries - view_dashboards - manage_dashboards] - end - - let(:role) do - create(:project_role, permissions:) - end - - let(:user) do - create(:user).tap do |u| - create(:member, project:, user: u, roles: [role]) - create(:member, project: other_project, user: u, roles: [role]) - end - end - let(:dashboard_page) do - Pages::Dashboard.new(project) - end - - let(:modal) { Components::WorkPackages::TableConfigurationModal.new } - let(:filters) { Components::WorkPackages::TableConfiguration::Filters.new } - let(:general) { Components::WorkPackages::TableConfiguration::GraphGeneral.new } - - before do - login_as user - - dashboard_page.visit! - end - - context "with the permission to save queries" do - it "can add the widget and see the work packages of the filtered for types" do - # Displayed by default as the dashboard is created on first visiting the page. - dashboard_page.expect_and_dismiss_toaster(message: "Successful update.") - - expect(page) - .to have_content(type_work_package.subject) - - dashboard_page.add_widget(1, 1, :column, "Work packages graph") - - sleep(1) - - filter_area = Components::Grids::GridArea.new(".grid--area.-widgeted:nth-of-type(2)") - - filter_area.expect_to_span(1, 1, 2, 2) - - sleep(0.5) - - # User has the ability to modify the query - - filter_area.configure_wp_table - modal.switch_to("Filters") - filters.expect_filter_count(2) - filters.add_filter_by("Type", "is (OR)", type.name) - modal.save - - filter_area.configure_wp_table - modal.switch_to("General") - general.set_axis "Type" - general.set_type "Bar" - modal.save - - sleep(0.5) - - # The whole of the configuration survives a reload - # as it is persisted in the grid - # As we cannot check the canvas, we have to rely on the configuration - - visit root_path - dashboard_page.visit! - expect(page) - .to have_content(type_work_package.subject) - - filter_area.configure_wp_table - modal.switch_to("Filters") - - filters.expect_filter_count(3) - - modal.switch_to("General") - general.expect_axis "Type" - general.expect_type "Bar" - - # A notification is displayed if no work package is returned for the graph - modal.switch_to("Filters") - filters.add_filter_by("Subject", "contains", "!!!!!!!!!!!!!!!!!") - modal.save - - within filter_area.area do - expect(page) - .to have_content(I18n.t("js.work_packages.no_results.title")) - end - end - end - - context "without the permission to save queries" do - let(:permissions) { %i[view_work_packages add_work_packages view_dashboards manage_dashboards] } - - it "cannot add the widget" do - dashboard_page.expect_unable_to_add_widget(1, 1, :within, "Work packages graph") - end - end -end diff --git a/modules/dashboards/spec/features/work_package_table_spec.rb b/modules/dashboards/spec/features/work_package_table_spec.rb deleted file mode 100644 index 69423bd6004..00000000000 --- a/modules/dashboards/spec/features/work_package_table_spec.rb +++ /dev/null @@ -1,201 +0,0 @@ -#-- copyright -# OpenProject is an open source project management software. -# Copyright (C) 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 "spec_helper" - -require_relative "../support/pages/dashboard" - -RSpec.describe "Arbitrary WorkPackage query table widget dashboard", :js do - let!(:type) { create(:type) } - let!(:other_type) { create(:type) } - let!(:priority) { create(:default_priority) } - let!(:project) { create(:project, types: [type]) } - let!(:other_project) { create(:project, types: [type]) } - let!(:open_status) { create(:default_status) } - let!(:type_work_package) do - create(:work_package, - project:, - type:, - author: user, - responsible: user) - end - let!(:other_type_work_package) do - create(:work_package, - project:, - type: other_type, - author: user, - responsible: user) - end - let!(:other_project_work_package) do - create(:work_package, - project: other_project, - type:, - author: user, - responsible: user) - end - - let(:permissions) do - %i[view_work_packages - add_work_packages - save_queries - manage_public_queries - view_dashboards - manage_dashboards] - end - - let(:role) do - create(:project_role, permissions:) - end - - let(:user) do - create(:user).tap do |u| - create(:member, project:, user: u, roles: [role]) - create(:member, project: other_project, user: u, roles: [role]) - end - end - let(:dashboard_page) do - Pages::Dashboard.new(project) - end - - let(:modal) { Components::WorkPackages::TableConfigurationModal.new } - let(:filters) { Components::WorkPackages::TableConfiguration::Filters.new } - let(:columns) { Components::WorkPackages::Columns.new } - - before do - login_as user - - dashboard_page.visit! - end - - context "with the permission to save queries" do - it "can add the widget and see the work packages of the filtered for types" do - # This one always exists by default. - # Using it here as a safeguard to govern speed. - dashboard_page.expect_and_dismiss_toaster(message: "Successful update.") - - wp_area = Components::Grids::GridArea.new(".grid--area.-widgeted:nth-of-type(1)") - expect(wp_area) - .to have_css(".subject", text: type_work_package.subject) - - dashboard_page.add_widget(1, 1, :row, "Work packages table") - - # Actually there are two success messages displayed currently. One for the grid getting updated and one - # for the query assigned to the new widget being created. A user will not notice it but the automated - # browser can get confused. Therefore we wait. - sleep(1) - - dashboard_page.expect_and_dismiss_toaster(message: "Successful update.") - - filter_area = Components::Grids::GridArea.new(".grid--area.-widgeted:nth-of-type(2)") - - filter_area.expect_to_span(1, 1, 2, 3) - - # At the beginning, the default query is displayed - expect(filter_area.area) - .to have_css(".subject", text: type_work_package.subject, wait: 30) - - expect(filter_area.area) - .to have_css(".subject", text: other_type_work_package.subject) - - # Work packages from other projects are not displayed as the query is project scoped - expect(filter_area.area) - .to have_no_css(".subject", text: other_project_work_package.subject) - - # User has the ability to modify the query - - filter_area.configure_wp_table - modal.switch_to("Filters") - filters.expect_filter_count(2) - filters.add_filter_by("Type", "is (OR)", type.name) - modal.save - - filter_area.configure_wp_table - modal.switch_to("Columns") - columns.assume_opened - columns.remove "Subject" - - expect(filter_area.area) - .to have_css(".id", text: type_work_package.id) - - # as the Subject column is disabled - expect(filter_area.area) - .to have_no_css(".subject", text: type_work_package.subject) - - # As other_type is filtered out - expect(filter_area.area) - .to have_no_css(".id", text: other_type_work_package.id) - - # Work packages from other projects are not displayed as the query is project scoped - expect(filter_area.area) - .to have_no_css(".subject", text: other_project_work_package.subject) - - scroll_to_element(filter_area.area) - within filter_area.area do - input = find(".editable-toolbar-title--input") - input.set("My WP Filter") - input.native.send_keys(:return) - end - - sleep(1) - - # The whole of the configuration survives a reload - # as it is persisted in the grid - - visit root_path - dashboard_page.visit! - - filter_area = Components::Grids::GridArea.new(".grid--area.-widgeted:nth-of-type(2)") - expect(filter_area.area) - .to have_css(".id", text: type_work_package.id) - - # as the Subject column is disabled - expect(filter_area.area) - .to have_no_css(".subject", text: type_work_package.subject) - - # As other_type is filtered out - expect(filter_area.area) - .to have_no_css(".id", text: other_type_work_package.id) - - # Work packages from other projects are not displayed as the query is project scoped - expect(filter_area.area) - .to have_no_css(".subject", text: other_project_work_package.subject) - - within filter_area.area do - expect(page).to have_field("editable-toolbar-title", with: "My WP Filter", wait: 10) - end - end - end - - context "without the permission to save queries" do - let(:permissions) { %i[view_work_packages add_work_packages view_dashboards manage_dashboards] } - - it "cannot add the widget" do - dashboard_page.expect_unable_to_add_widget(1, 1, :within, "Work packages table") - end - end -end diff --git a/modules/dashboards/spec/lib/dashboards/grid_registration_spec.rb b/modules/dashboards/spec/lib/dashboards/grid_registration_spec.rb deleted file mode 100644 index 7977315b04d..00000000000 --- a/modules/dashboards/spec/lib/dashboards/grid_registration_spec.rb +++ /dev/null @@ -1,83 +0,0 @@ -require "spec_helper" - -RSpec.describe Dashboards::GridRegistration do - let(:user) { build_stubbed(:user) } - let(:project) { build_stubbed(:project) } - let(:grid) { build_stubbed(:dashboard, project:) } - - describe "from_scope" do - context "with a relative URL root", with_config: { rails_relative_url_root: "/foobar" } do - subject { described_class.from_scope "/foobar/projects/an_id/dashboards" } - - it "returns the class" do - expect(subject[:class]).to eq(Grids::Dashboard) - end - - it "returns the project_id" do - expect(subject[:project_id]).to eq("an_id") - end - - context "with a different route" do - subject { described_class.from_scope "/barfoo/projects/an_id/dashboards" } - - it "returns nil" do - expect(subject).to be_nil - end - end - end - - context "without a relative URL root" do - subject { described_class.from_scope "/projects/an_id/dashboards" } - - it "returns the class" do - expect(subject[:class]).to eq(Grids::Dashboard) - end - - it "returns the project_id" do - expect(subject[:project_id]).to eq("an_id") - end - - context "with a different route" do - subject { described_class.from_scope "/projects/an_id/boards" } - - it "returns nil" do - expect(subject).to be_nil - end - end - end - end - - describe "defaults" do - it "returns the initialized widget" do - expect(described_class.defaults[:widgets].map(&:identifier)) - .to contain_exactly("work_packages_table") - end - end - - describe "writable?" do - let(:permissions) { [:manage_dashboards] } - let(:allowed) { true } - - before do - mock_permissions_for(user) do |mock| - mock.allow_in_project *permissions, project: - end - end - - context "if the user has the :manage_dashboards permission" do - it "is truthy" do - expect(described_class) - .to be_writable(grid, user) - end - end - - context "if the user lacks the :manage_dashboards permission" do - let(:permissions) { [] } - - it "is falsey" do - expect(described_class) - .not_to be_writable(grid, user) - end - end - end -end diff --git a/modules/dashboards/spec/requests/api/v3/attachments/grid_spec.rb b/modules/dashboards/spec/requests/api/v3/attachments/grid_spec.rb deleted file mode 100644 index 26943441417..00000000000 --- a/modules/dashboards/spec/requests/api/v3/attachments/grid_spec.rb +++ /dev/null @@ -1,48 +0,0 @@ -#-- copyright -# OpenProject is an open source project management software. -# Copyright (C) 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 "spec_helper" -require Rails.root.join("spec/requests/api/v3/attachments/attachment_resource_shared_examples").to_s - -RSpec.describe "grid attachments" do - before do - Grids::Dashboard - end - - it_behaves_like "an APIv3 attachment resource" do - let(:attachment_type) { :grid } - - let(:create_permission) { :manage_dashboards } - let(:read_permission) { :view_dashboards } - let(:update_permission) { :manage_dashboards } - - let(:grid) { create(:dashboard, project:) } - - let(:missing_permissions_user) { create(:user) } - end -end diff --git a/modules/dashboards/spec/requests/api/v3/grids/grids_create_form_resource_spec.rb b/modules/dashboards/spec/requests/api/v3/grids/grids_create_form_resource_spec.rb deleted file mode 100644 index 4f6685b1351..00000000000 --- a/modules/dashboards/spec/requests/api/v3/grids/grids_create_form_resource_spec.rb +++ /dev/null @@ -1,244 +0,0 @@ -#-- copyright -# OpenProject is an open source project management software. -# Copyright (C) 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 "spec_helper" -require "rack/test" - -RSpec.describe "POST /api/v3/grids/form for Dashboard Grids", content_type: :json do - include Rack::Test::Methods - include API::V3::Utilities::PathHelper - - shared_let(:project) do - create(:project) - end - - let(:current_user) { allowed_user } - let(:path) { api_v3_paths.create_grid_form } - let(:params) { {} } - - shared_let(:allowed_user) do - create(:user, - member_with_permissions: { project => %i[view_dashboards manage_dashboards save_queries manage_public_queries] }) - end - - shared_let(:no_save_query_user) do - create(:user, - member_with_permissions: { project => %i[view_dashboards manage_dashboards] }) - end - - shared_let(:prohibited_user) do - create(:user, - member_with_permissions: { project => [] }) - end - - subject(:response) { last_response } - - before do - login_as(current_user) - end - - describe "#post" do - before do - post path, params.to_json - end - - context "with a valid boards scope" do - let(:params) do - { - name: "foo", - _links: { - scope: { - href: project_dashboards_path(project) - } - } - } - end - - it "contains default data in the payload" do - expected = { - rowCount: 1, - columnCount: 2, - widgets: [{ - _type: "GridWidget", - endColumn: 2, - endRow: 2, - identifier: "work_packages_table", - options: { - name: "Work packages table", - queryProps: { - "columns[]": %w(id project type subject), - filters: "[{\"status\":{\"operator\":\"o\",\"values\":[]}}]" - } - }, - startColumn: 1, - startRow: 1 - }], - name: "foo", - options: {}, - _links: { - attachments: [], - scope: { - href: project_dashboards_path(project), - type: "text/html" - } - } - } - - expect(subject.body) - .to be_json_eql(expected.to_json) - .at_path("_embedded/payload") - end - - it "has no validationErrors" do - expect(subject.body) - .to be_json_eql({}.to_json) - .at_path("_embedded/validationErrors") - end - - it "has a commit link" do - expect(subject.body) - .to be_json_eql(api_v3_paths.grids.to_json) - .at_path("_links/commit/href") - end - end - - context "with boards scope for which the user does not have the necessary permissions" do - let(:current_user) { prohibited_user } - let(:params) do - { - _links: { - scope: { - href: project_dashboards_path(project) - } - } - } - end - - it "has a validationError on scope" do - expect(subject.body) - .to be_json_eql("Scope is not set to one of the allowed values.".to_json) - .at_path("_embedded/validationErrors/scope/message") - end - end - - context "with an invalid scope" do - let(:params) do - { - _links: { - scope: { - href: project_dashboards_path(project_id: project.id + 1) - } - } - } - end - - it "has a validationError on scope" do - expect(subject.body) - .to be_json_eql("Scope is not set to one of the allowed values.".to_json) - .at_path("_embedded/validationErrors/scope/message") - end - end - - context "with an unsupported widget identifier" do - let(:params) do - { - name: "foo", - _links: { - attachments: [], - scope: { - href: project_dashboards_path(project) - } - }, - widgets: [ - { - _type: "GridWidget", - identifier: "bogus_identifier", - startRow: 1, - endRow: 2, - startColumn: 1, - endColumn: 2 - } - ] - } - end - - it "has a validationError on widget" do - expect(subject.body) - .to be_json_eql("Widgets is not set to one of the allowed values.".to_json) - .at_path("_embedded/validationErrors/widgets/message") - end - end - - context "for a user not allowed to save queries" do - let(:current_user) { no_save_query_user } - let(:params) do - { - name: "foo", - _links: { - scope: { - href: project_dashboards_path(project) - } - } - } - end - - it "contains default data in the payload that lacks the work_packages_table widget" do - expected = { - rowCount: 1, - columnCount: 2, - widgets: [], - name: "foo", - options: {}, - _links: { - attachments: [], - scope: { - href: project_dashboards_path(project), - type: "text/html" - } - } - } - - expect(subject.body) - .to be_json_eql(expected.to_json) - .at_path("_embedded/payload") - end - - it "has no validationErrors" do - expect(subject.body) - .to be_json_eql({}.to_json) - .at_path("_embedded/validationErrors") - end - - it "has a commit link" do - expect(subject.body) - .to be_json_eql(api_v3_paths.grids.to_json) - .at_path("_links/commit/href") - end - end - end -end diff --git a/modules/dashboards/spec/requests/api/v3/grids/grids_resource_spec.rb b/modules/dashboards/spec/requests/api/v3/grids/grids_resource_spec.rb deleted file mode 100644 index 7d8cbb4cbf3..00000000000 --- a/modules/dashboards/spec/requests/api/v3/grids/grids_resource_spec.rb +++ /dev/null @@ -1,195 +0,0 @@ -#-- copyright -# OpenProject is an open source project management software. -# Copyright (C) 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 "spec_helper" -require "rack/test" - -RSpec.describe "API v3 Grids resource", content_type: :json do - include Rack::Test::Methods - include API::V3::Utilities::PathHelper - - let(:current_user) do - create(:user, - member_with_permissions: { project => permissions }) - end - let(:permissions) { %i[view_dashboards manage_dashboards] } - let(:project) { create(:project) } - let(:grid) do - create(:dashboard, - project:, - widgets:) - end - let(:widgets) do - [create(:grid_widget, - identifier: "custom_text", - start_column: 1, - end_column: 3, - start_row: 1, - end_row: 3, - options: { - text: custom_text - })] - end - let(:custom_text) { "Some text a user wrote" } - - before do - login_as(current_user) - end - - subject(:response) { last_response } - - describe "#get" do - let(:path) { api_v3_paths.grid(grid.id) } - - let(:stored_grids) do - grid - end - - before do - stored_grids - - get path - end - - it "responds with 200 OK" do - expect(subject.status).to eq(200) - end - - it "sends a grid block" do - expect(subject.body) - .to be_json_eql("Grid".to_json) - .at_path("_type") - end - - it "identifies the url the grid is stored for" do - expect(subject.body) - .to be_json_eql(project_dashboards_path(project).to_json) - .at_path("_links/scope/href") - end - - it "has a widget that renders custom text" do - expect(subject.body) - .to be_json_eql("custom_text".to_json) - .at_path("widgets/0/identifier") - - expect(subject.body) - .to be_json_eql(custom_text.to_json) - .at_path("widgets/0/options/text/raw") - end - - context "with the grid not existing" do - let(:path) { api_v3_paths.grid(grid.id + 1) } - - it "responds with 404 NOT FOUND" do - expect(subject.status).to be 404 - end - end - end - - describe "#patch" do - let(:path) { api_v3_paths.grid(grid.id) } - - let(:stored_grids) do - grid - end - - let(:widget_params) { [] } - - let(:params) do - { - rowCount: 10, - name: "foo", - columnCount: 15, - widgets: widget_params - }.with_indifferent_access - end - - before do - stored_grids - - patch path, params.to_json - end - - context "with an added custom_text widget" do - let(:widget_params) do - [ - { - startColumn: 1, - startRow: 1, - endColumn: 3, - endRow: 3, - identifier: "custom_text", - options: { - name: "Name for custom text widget", - text: { - format: "markdown", - raw: "A custom text text", - html: "

A custom text text

" - } - } - }.with_indifferent_access - ] - end - let(:widgets) { [] } - - it "responds with 200 OK" do - expect(subject.status).to eq(200) - end - - it "returns the altered grid block with the added widget" do - expect(subject.body) - .to be_json_eql("Grid".to_json) - .at_path("_type") - expect(subject.body) - .to be_json_eql("foo".to_json) - .at_path("name") - expect(subject.body) - .to be_json_eql(params["rowCount"].to_json) - .at_path("rowCount") - expect(subject.body) - .to be_json_eql(params["widgets"][0]["identifier"].to_json) - .at_path("widgets/0/identifier") - expect(subject.body) - .to be_json_eql(params["widgets"][0]["options"]["text"]["raw"].to_json) - .at_path("widgets/0/options/text/raw") - expect(subject.body) - .to be_json_eql(params["widgets"][0]["options"]["name"].to_json) - .at_path("widgets/0/options/name") - end - - it "perists the changes" do - expect(grid.reload.row_count) - .to eql params["rowCount"] - expect(grid.reload.widgets[0].options["text"]) - .to eql params["widgets"][0]["options"]["text"]["raw"] - expect(grid.reload.widgets[0].options["name"]) - .to eql params["widgets"][0]["options"]["name"] - end - end - end -end diff --git a/modules/dashboards/spec/support/pages/dashboard.rb b/modules/dashboards/spec/support/pages/dashboard.rb deleted file mode 100644 index b6c33b88106..00000000000 --- a/modules/dashboards/spec/support/pages/dashboard.rb +++ /dev/null @@ -1,45 +0,0 @@ -#-- copyright -# OpenProject is an open source project management software. -# Copyright (C) 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 "support/pages/page" - -require_relative "../../../../grids/spec/support/pages/grid" - -module Pages - class Dashboard < ::Pages::Grid - attr_accessor :project - - def initialize(project) - self.project = project - end - - def path - project_dashboards_path(project) - end - end -end diff --git a/spec/lib/redmine/menu_manager_spec.rb b/spec/lib/redmine/menu_manager_spec.rb index 878af54543b..1ecfa383101 100644 --- a/spec/lib/redmine/menu_manager_spec.rb +++ b/spec/lib/redmine/menu_manager_spec.rb @@ -66,7 +66,6 @@ RSpec.describe Redmine::MenuManager do :gantt, :team_planner_view, :boards, - :dashboards, :backlogs, :news, :costs,