From 11d3b08b3693627c407331e56df9f4f6b7bdddce Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 27 Oct 2020 13:39:46 -0400 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20rip=20out=20all=20exist?= =?UTF-8?q?ing=20projects,=20orgs,=20and=20sub=20scopes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/form/host-catalog/index.hbs | 53 --- .../form/host-set/add-hosts/index.hbs | 56 ---- .../form/host-set/add-hosts/index.js | 57 ---- .../form/host-set/create-host/index.hbs | 82 ----- .../app/components/form/host-set/index.hbs | 59 ---- ui/core/app/components/form/host/index.hbs | 77 ----- ui/core/app/components/form/org/index.hbs | 53 --- ui/core/app/components/form/project/index.hbs | 53 --- .../form/target/add-host-sets/index.hbs | 60 ---- .../form/target/add-host-sets/index.js | 55 --- ui/core/app/components/form/target/index.hbs | 115 ------- ui/core/app/controllers/scopes/scope/orgs.js | 17 - .../app/controllers/scopes/scope/orgs/new.js | 17 - .../app/controllers/scopes/scope/projects.js | 17 - .../controllers/scopes/scope/projects/new.js | 17 - .../scopes/scope/projects/project.js | 12 - .../scope/projects/project/host-catalogs.js | 17 - .../project/host-catalogs/host-catalog.js | 12 - .../host-catalogs/host-catalog/host-sets.js | 18 - .../host-catalog/host-sets/host-set.js | 13 - .../host-sets/host-set/create-host.js | 18 - .../host-catalog/host-sets/new.js | 18 - .../host-catalogs/host-catalog/hosts.js | 18 - .../host-catalogs/host-catalog/hosts/host.js | 13 - .../host-catalogs/host-catalog/hosts/new.js | 18 - .../projects/project/host-catalogs/new.js | 18 - .../scopes/scope/projects/project/sessions.js | 19 -- .../scopes/scope/projects/project/targets.js | 18 - .../scope/projects/project/targets/new.js | 18 - .../scope/projects/project/targets/target.js | 13 - .../project/targets/target/add-host-sets.js | 17 - .../project/targets/target/host-sets.js | 18 - ui/core/app/router.js | 41 --- ui/core/app/routes/scopes/scope.js | 9 +- .../app/routes/scopes/scope/authenticate.js | 9 +- ui/core/app/routes/scopes/scope/index.js | 9 +- ui/core/app/routes/scopes/scope/orgs.js | 60 ---- ui/core/app/routes/scopes/scope/orgs/index.js | 3 - ui/core/app/routes/scopes/scope/orgs/new.js | 16 - ui/core/app/routes/scopes/scope/projects.js | 90 ----- .../app/routes/scopes/scope/projects/index.js | 3 - .../app/routes/scopes/scope/projects/new.js | 17 - .../routes/scopes/scope/projects/project.js | 31 -- .../scope/projects/project/host-catalogs.js | 70 ---- .../project/host-catalogs/host-catalog.js | 52 --- .../host-catalogs/host-catalog/host-sets.js | 76 ----- .../host-catalog/host-sets/host-set.js | 52 --- .../host-sets/host-set/add-hosts.js | 92 ----- .../host-sets/host-set/create-host.js | 90 ----- .../host-catalog/host-sets/host-set/hosts.js | 55 --- .../host-catalog/host-sets/host-set/index.js | 3 - .../host-catalog/host-sets/index.js | 3 - .../host-catalog/host-sets/new.js | 50 --- .../host-catalogs/host-catalog/hosts.js | 77 ----- .../host-catalogs/host-catalog/hosts/host.js | 52 --- .../host-catalog/hosts/host/index.js | 3 - .../host-catalogs/host-catalog/hosts/index.js | 3 - .../host-catalogs/host-catalog/hosts/new.js | 50 --- .../host-catalogs/host-catalog/index.js | 3 - .../projects/project/host-catalogs/index.js | 3 - .../projects/project/host-catalogs/new.js | 17 - .../scopes/scope/projects/project/index.js | 3 - .../scopes/scope/projects/project/sessions.js | 103 ------ .../scope/projects/project/sessions/index.js | 4 - .../scopes/scope/projects/project/targets.js | 67 ---- .../scope/projects/project/targets/index.js | 3 - .../scope/projects/project/targets/new.js | 17 - .../scope/projects/project/targets/target.js | 39 --- .../project/targets/target/add-host-sets.js | 92 ----- .../project/targets/target/host-sets.js | 67 ---- .../targets/target/host-sets/host-set.js | 3 - .../project/targets/target/host-sets/index.js | 3 - .../projects/project/targets/target/index.js | 3 - ui/core/app/templates/scopes/scope.hbs | 50 ++- ui/core/app/templates/scopes/scope/orgs.hbs | 3 - .../app/templates/scopes/scope/orgs/index.hbs | 63 ---- .../app/templates/scopes/scope/orgs/new.hbs | 24 -- .../app/templates/scopes/scope/projects.hbs | 3 - .../templates/scopes/scope/projects/index.hbs | 63 ---- .../templates/scopes/scope/projects/new.hbs | 24 -- .../scopes/scope/projects/project.hbs | 3 - .../scope/projects/project/-sidebar.hbs | 20 -- .../scope/projects/project/host-catalogs.hbs | 3 - .../project/host-catalogs/host-catalog.hbs | 25 -- .../host-catalogs/host-catalog/-actions.hbs | 22 -- .../host-catalogs/host-catalog/-header.hbs | 12 - .../host-catalog/-navigation.hbs | 11 - .../host-catalogs/host-catalog/host-sets.hbs | 3 - .../host-catalog/host-sets/host-set.hbs | 3 - .../host-sets/host-set/-actions.hbs | 16 - .../host-sets/host-set/-header.hbs | 12 - .../host-sets/host-set/-navigation.hbs | 8 - .../host-sets/host-set/add-hosts.hbs | 8 - .../host-sets/host-set/add-hosts/-header.hbs | 5 - .../host-sets/host-set/create-host.hbs | 7 - .../host-set/create-host/-header.hbs | 4 - .../host-catalog/host-sets/host-set/hosts.hbs | 71 ---- .../host-catalog/host-sets/host-set/index.hbs | 5 - .../host-catalog/host-sets/index.hbs | 56 ---- .../host-catalog/host-sets/new.hbs | 7 - .../host-catalog/host-sets/new/-header.hbs | 4 - .../host-catalogs/host-catalog/hosts.hbs | 3 - .../host-catalogs/host-catalog/hosts/host.hbs | 3 - .../host-catalog/hosts/host/-actions.hbs | 9 - .../host-catalog/hosts/host/-header.hbs | 12 - .../host-catalog/hosts/host/-navigation.hbs | 5 - .../host-catalog/hosts/host/index.hbs | 5 - .../host-catalog/hosts/index.hbs | 60 ---- .../host-catalogs/host-catalog/hosts/new.hbs | 7 - .../host-catalog/hosts/new/-header.hbs | 4 - .../host-catalogs/host-catalog/index.hbs | 5 - .../projects/project/host-catalogs/index.hbs | 84 ----- .../projects/project/host-catalogs/new.hbs | 24 -- .../scopes/scope/projects/project/index.hbs | 50 --- .../scope/projects/project/sessions.hbs | 3 - .../scope/projects/project/sessions/index.hbs | 82 ----- .../scopes/scope/projects/project/targets.hbs | 3 - .../scope/projects/project/targets/index.hbs | 88 ----- .../scope/projects/project/targets/new.hbs | 24 -- .../scope/projects/project/targets/target.hbs | 25 -- .../project/targets/target/-actions.hbs | 13 - .../project/targets/target/-header.hbs | 12 - .../project/targets/target/-navigation.hbs | 8 - .../project/targets/target/add-host-sets.hbs | 25 -- .../targets/target/add-host-sets/-header.hbs | 5 - .../project/targets/target/host-sets.hbs | 68 ---- .../targets/target/host-sets/host-set.hbs | 1 - .../projects/project/targets/target/index.hbs | 5 - .../tests/acceptance/authentication-test.js | 24 +- ui/core/tests/acceptance/bread-crumbs-test.js | 249 -------------- .../tests/acceptance/host-catalogs-test.js | 217 ------------ ui/core/tests/acceptance/host-sets-test.js | 203 ----------- .../tests/acceptance/host-sets/hosts-test.js | 235 ------------- ui/core/tests/acceptance/hosts-test.js | 205 ------------ ui/core/tests/acceptance/orgs-test.js | 148 -------- ui/core/tests/acceptance/projects-test.js | 264 --------------- ui/core/tests/acceptance/sessions-test.js | 104 ------ ui/core/tests/acceptance/targets-test.js | 316 ------------------ .../components/form/host-catalog-test.js | 23 -- .../components/form/host-set-test.js | 23 -- .../form/host-set/add-hosts-test.js | 12 - .../integration/components/form/host-test.js | 23 -- .../integration/components/form/org-test.js | 23 -- .../components/form/project-test.js | 23 -- .../components/form/target-test.js | 23 -- .../form/target/add-host-sets-test.js | 12 - .../controllers/scopes/scope/orgs-test.js | 12 - .../controllers/scopes/scope/orgs/new-test.js | 12 - .../controllers/scopes/scope/projects-test.js | 12 - .../scopes/scope/projects/new-test.js | 12 - .../scopes/scope/projects/project-test.js | 14 - .../projects/project/host-catalogs-test.js | 17 - .../host-catalogs/host-catalog-test.js | 17 - .../host-catalog/host-sets-test.js | 17 - .../host-catalog/host-sets/host-set-test.js | 17 - .../host-sets/host-set/create-host-test.js | 12 - .../host-catalog/host-sets/new-test.js | 17 - .../host-catalogs/host-catalog/hosts-test.js | 17 - .../host-catalog/hosts/host-test.js | 17 - .../host-catalog/hosts/new-test.js | 17 - .../project/host-catalogs/new-test.js | 17 - .../scope/projects/project/sessions-test.js | 12 - .../scope/projects/project/targets-test.js | 16 - .../projects/project/targets/new-test.js | 17 - .../projects/project/targets/target-test.js | 17 - .../targets/target/add-host-sets-test.js | 17 - .../project/targets/target/host-sets-test.js | 17 - .../unit/routes/scopes/scope/orgs-test.js | 11 - .../routes/scopes/scope/orgs/index-test.js | 11 - .../unit/routes/scopes/scope/orgs/new-test.js | 11 - .../unit/routes/scopes/scope/projects-test.js | 11 - .../scopes/scope/projects/index-test.js | 11 - .../routes/scopes/scope/projects/new-test.js | 11 - .../scopes/scope/projects/project-test.js | 11 - .../projects/project/host-catalogs-test.js | 15 - .../host-catalogs/host-catalog-test.js | 16 - .../host-catalog/host-sets-test.js | 16 - .../host-catalog/host-sets/host-set-test.js | 16 - .../host-sets/host-set/add-hosts-test.js | 16 - .../host-sets/host-set/create-host-test.js | 11 - .../host-sets/host-set/hosts-test.js | 16 - .../host-sets/host-set/index-test.js | 16 - .../host-catalog/host-sets/index-test.js | 16 - .../host-catalog/host-sets/new-test.js | 16 - .../host-catalogs/host-catalog/hosts-test.js | 16 - .../host-catalog/hosts/host-test.js | 16 - .../host-catalog/hosts/host/index-test.js | 16 - .../host-catalog/hosts/index-test.js | 16 - .../host-catalog/hosts/new-test.js | 16 - .../host-catalogs/host-catalog/index-test.js | 16 - .../project/host-catalogs/index-test.js | 16 - .../project/host-catalogs/new-test.js | 16 - .../scope/projects/project/index-test.js | 11 - .../scope/projects/project/sessions-test.js | 11 - .../projects/project/sessions/index-test.js | 11 - .../scope/projects/project/targets-test.js | 15 - .../projects/project/targets/index-test.js | 15 - .../projects/project/targets/new-test.js | 15 - .../projects/project/targets/target-test.js | 15 - .../targets/target/add-host-sets-test.js | 16 - .../project/targets/target/host-sets-test.js | 16 - .../targets/target/host-sets/host-set-test.js | 16 - .../project/targets/target/index-test.js | 16 - 203 files changed, 68 insertions(+), 6575 deletions(-) delete mode 100644 ui/core/app/components/form/host-catalog/index.hbs delete mode 100644 ui/core/app/components/form/host-set/add-hosts/index.hbs delete mode 100644 ui/core/app/components/form/host-set/add-hosts/index.js delete mode 100644 ui/core/app/components/form/host-set/create-host/index.hbs delete mode 100644 ui/core/app/components/form/host-set/index.hbs delete mode 100644 ui/core/app/components/form/host/index.hbs delete mode 100644 ui/core/app/components/form/org/index.hbs delete mode 100644 ui/core/app/components/form/project/index.hbs delete mode 100644 ui/core/app/components/form/target/add-host-sets/index.hbs delete mode 100644 ui/core/app/components/form/target/add-host-sets/index.js delete mode 100644 ui/core/app/components/form/target/index.hbs delete mode 100644 ui/core/app/controllers/scopes/scope/orgs.js delete mode 100644 ui/core/app/controllers/scopes/scope/orgs/new.js delete mode 100644 ui/core/app/controllers/scopes/scope/projects.js delete mode 100644 ui/core/app/controllers/scopes/scope/projects/new.js delete mode 100644 ui/core/app/controllers/scopes/scope/projects/project.js delete mode 100644 ui/core/app/controllers/scopes/scope/projects/project/host-catalogs.js delete mode 100644 ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog.js delete mode 100644 ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets.js delete mode 100644 ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set.js delete mode 100644 ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/create-host.js delete mode 100644 ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new.js delete mode 100644 ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/hosts.js delete mode 100644 ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host.js delete mode 100644 ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/new.js delete mode 100644 ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/new.js delete mode 100644 ui/core/app/controllers/scopes/scope/projects/project/sessions.js delete mode 100644 ui/core/app/controllers/scopes/scope/projects/project/targets.js delete mode 100644 ui/core/app/controllers/scopes/scope/projects/project/targets/new.js delete mode 100644 ui/core/app/controllers/scopes/scope/projects/project/targets/target.js delete mode 100644 ui/core/app/controllers/scopes/scope/projects/project/targets/target/add-host-sets.js delete mode 100644 ui/core/app/controllers/scopes/scope/projects/project/targets/target/host-sets.js delete mode 100644 ui/core/app/routes/scopes/scope/orgs.js delete mode 100644 ui/core/app/routes/scopes/scope/orgs/index.js delete mode 100644 ui/core/app/routes/scopes/scope/orgs/new.js delete mode 100644 ui/core/app/routes/scopes/scope/projects.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/index.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/new.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/project.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/project/host-catalogs.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/add-hosts.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/create-host.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/hosts.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/index.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/index.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/index.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/index.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/new.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/index.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/project/host-catalogs/index.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/project/host-catalogs/new.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/project/index.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/project/sessions.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/project/sessions/index.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/project/targets.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/project/targets/index.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/project/targets/new.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/project/targets/target.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/project/targets/target/add-host-sets.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/project/targets/target/host-sets.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/project/targets/target/host-sets/host-set.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/project/targets/target/host-sets/index.js delete mode 100644 ui/core/app/routes/scopes/scope/projects/project/targets/target/index.js delete mode 100644 ui/core/app/templates/scopes/scope/orgs.hbs delete mode 100644 ui/core/app/templates/scopes/scope/orgs/index.hbs delete mode 100644 ui/core/app/templates/scopes/scope/orgs/new.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/index.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/new.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/-sidebar.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/host-catalogs.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/-actions.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/-header.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/-navigation.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/-actions.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/-header.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/-navigation.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/add-hosts.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/add-hosts/-header.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/create-host.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/create-host/-header.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/hosts.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/index.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/index.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new/-header.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/-actions.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/-header.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/-navigation.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/index.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/index.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/new.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/new/-header.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/index.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/host-catalogs/index.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/host-catalogs/new.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/index.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/sessions.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/sessions/index.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/targets.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/targets/index.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/targets/new.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/targets/target.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/targets/target/-actions.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/targets/target/-header.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/targets/target/-navigation.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/targets/target/add-host-sets.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/targets/target/add-host-sets/-header.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/targets/target/host-sets.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/targets/target/host-sets/host-set.hbs delete mode 100644 ui/core/app/templates/scopes/scope/projects/project/targets/target/index.hbs delete mode 100644 ui/core/tests/acceptance/bread-crumbs-test.js delete mode 100644 ui/core/tests/acceptance/host-catalogs-test.js delete mode 100644 ui/core/tests/acceptance/host-sets-test.js delete mode 100644 ui/core/tests/acceptance/host-sets/hosts-test.js delete mode 100644 ui/core/tests/acceptance/hosts-test.js delete mode 100644 ui/core/tests/acceptance/orgs-test.js delete mode 100644 ui/core/tests/acceptance/projects-test.js delete mode 100644 ui/core/tests/acceptance/sessions-test.js delete mode 100644 ui/core/tests/acceptance/targets-test.js delete mode 100644 ui/core/tests/integration/components/form/host-catalog-test.js delete mode 100644 ui/core/tests/integration/components/form/host-set-test.js delete mode 100644 ui/core/tests/integration/components/form/host-set/add-hosts-test.js delete mode 100644 ui/core/tests/integration/components/form/host-test.js delete mode 100644 ui/core/tests/integration/components/form/org-test.js delete mode 100644 ui/core/tests/integration/components/form/project-test.js delete mode 100644 ui/core/tests/integration/components/form/target-test.js delete mode 100644 ui/core/tests/integration/components/form/target/add-host-sets-test.js delete mode 100644 ui/core/tests/unit/controllers/scopes/scope/orgs-test.js delete mode 100644 ui/core/tests/unit/controllers/scopes/scope/orgs/new-test.js delete mode 100644 ui/core/tests/unit/controllers/scopes/scope/projects-test.js delete mode 100644 ui/core/tests/unit/controllers/scopes/scope/projects/new-test.js delete mode 100644 ui/core/tests/unit/controllers/scopes/scope/projects/project-test.js delete mode 100644 ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs-test.js delete mode 100644 ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog-test.js delete mode 100644 ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets-test.js delete mode 100644 ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set-test.js delete mode 100644 ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/create-host-test.js delete mode 100644 ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new-test.js delete mode 100644 ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/hosts-test.js delete mode 100644 ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host-test.js delete mode 100644 ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/new-test.js delete mode 100644 ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/new-test.js delete mode 100644 ui/core/tests/unit/controllers/scopes/scope/projects/project/sessions-test.js delete mode 100644 ui/core/tests/unit/controllers/scopes/scope/projects/project/targets-test.js delete mode 100644 ui/core/tests/unit/controllers/scopes/scope/projects/project/targets/new-test.js delete mode 100644 ui/core/tests/unit/controllers/scopes/scope/projects/project/targets/target-test.js delete mode 100644 ui/core/tests/unit/controllers/scopes/scope/projects/project/targets/target/add-host-sets-test.js delete mode 100644 ui/core/tests/unit/controllers/scopes/scope/projects/project/targets/target/host-sets-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/orgs-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/orgs/index-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/orgs/new-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects/index-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects/new-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects/project-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/add-hosts-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/create-host-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/hosts-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/index-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/index-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/index-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/index-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/new-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/index-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/index-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/new-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects/project/index-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects/project/sessions-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects/project/sessions/index-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects/project/targets-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects/project/targets/index-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects/project/targets/new-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects/project/targets/target-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects/project/targets/target/add-host-sets-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects/project/targets/target/host-sets-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects/project/targets/target/host-sets/host-set-test.js delete mode 100644 ui/core/tests/unit/routes/scopes/scope/projects/project/targets/target/index-test.js diff --git a/ui/core/app/components/form/host-catalog/index.hbs b/ui/core/app/components/form/host-catalog/index.hbs deleted file mode 100644 index 0e024b1fb..000000000 --- a/ui/core/app/components/form/host-catalog/index.hbs +++ /dev/null @@ -1,53 +0,0 @@ - - - - {{#if @model.errors.name}} - - {{#each @model.errors.name as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - - - {{#if @model.errors.description}} - - {{#each @model.errors.description as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - - - - diff --git a/ui/core/app/components/form/host-set/add-hosts/index.hbs b/ui/core/app/components/form/host-set/add-hosts/index.hbs deleted file mode 100644 index 0ff9064ee..000000000 --- a/ui/core/app/components/form/host-set/add-hosts/index.hbs +++ /dev/null @@ -1,56 +0,0 @@ -{{#if this.hasAvailableHosts}} - - - - - - - - {{t "form.name.label"}} - {{t "form.type.label"}} - {{t "form.id.label"}} - - - - {{#each this.filteredHosts as |host|}} - - - - - {{host.name}} - - {{host.type}} - - - {{/each}} - - - - -{{/if}} - -{{#unless this.hasAvailableHosts}} - - - - {{t "resources.host-set.host.messages.add-none.description"}} - - - - {{t "actions.back"}} - - - -{{/unless}} diff --git a/ui/core/app/components/form/host-set/add-hosts/index.js b/ui/core/app/components/form/host-set/add-hosts/index.js deleted file mode 100644 index 4f1a8eb22..000000000 --- a/ui/core/app/components/form/host-set/add-hosts/index.js +++ /dev/null @@ -1,57 +0,0 @@ -import Component from '@glimmer/component'; -import { computed, action } from '@ember/object'; -import { A } from '@ember/array'; - -export default class FormHostSetAddHostsIndexComponent extends Component { - // =properties - - /** - * Array of selected host IDs. - * @type {EmberArray} - */ - selectedHostIDs = A(); - - /** - * Checks for unassigned hosts. - * @param {[HostModel]} filteredHosts - * @type {boolean} - */ - @computed('filteredHosts.length') - get hasAvailableHosts() { - return this.filteredHosts.length > 0; - } - - /** - * Hosts currently not assigned to current host set. - * @type {[HostModel]} - */ - @computed('args.{model,model.host_ids,hosts}') - get filteredHosts() { - const currentHostIDs = this.args.model.host_ids.map((host) => host.value); - return this.args.hosts.filter(({ id }) => !currentHostIDs.includes(id)); - } - - // =actions - - /** - * Toggle host selection - * @param {HostModel} host - */ - @action - toggleHost(host) { - if (!this.selectedHostIDs.includes(host.id)) { - this.selectedHostIDs.addObject(host.id); - } else { - this.selectedHostIDs.removeObject(host.id); - } - } - - /** - * Callback submit with selected host ids - * @param {requestCallback} fn - */ - @action - submit(fn) { - fn(this.selectedHostIDs); - } -} diff --git a/ui/core/app/components/form/host-set/create-host/index.hbs b/ui/core/app/components/form/host-set/create-host/index.hbs deleted file mode 100644 index e12cabec9..000000000 --- a/ui/core/app/components/form/host-set/create-host/index.hbs +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - {{#if @model.host.errors.name}} - - {{#each @model.host.errors.name as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - - - {{#if @model.host.errors.description}} - - {{#each @model.host.errors.description as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - - - {{#if @model.host.errors.name}} - - {{#each @model.host.errors.name as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - - - - diff --git a/ui/core/app/components/form/host-set/index.hbs b/ui/core/app/components/form/host-set/index.hbs deleted file mode 100644 index d457ad0e7..000000000 --- a/ui/core/app/components/form/host-set/index.hbs +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - {{#if @model.errors.name}} - - {{#each @model.errors.name as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - - - {{#if @model.errors.description}} - - {{#each @model.errors.description as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - - - - diff --git a/ui/core/app/components/form/host/index.hbs b/ui/core/app/components/form/host/index.hbs deleted file mode 100644 index b5a931880..000000000 --- a/ui/core/app/components/form/host/index.hbs +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - {{#if @model.errors.name}} - - {{#each @model.errors.name as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - - - {{#if @model.errors.description}} - - {{#each @model.errors.description as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - - - {{#if @model.errors.name}} - - {{#each @model.errors.name as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - - - - diff --git a/ui/core/app/components/form/org/index.hbs b/ui/core/app/components/form/org/index.hbs deleted file mode 100644 index 0e024b1fb..000000000 --- a/ui/core/app/components/form/org/index.hbs +++ /dev/null @@ -1,53 +0,0 @@ - - - - {{#if @model.errors.name}} - - {{#each @model.errors.name as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - - - {{#if @model.errors.description}} - - {{#each @model.errors.description as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - - - - diff --git a/ui/core/app/components/form/project/index.hbs b/ui/core/app/components/form/project/index.hbs deleted file mode 100644 index 0e024b1fb..000000000 --- a/ui/core/app/components/form/project/index.hbs +++ /dev/null @@ -1,53 +0,0 @@ - - - - {{#if @model.errors.name}} - - {{#each @model.errors.name as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - - - {{#if @model.errors.description}} - - {{#each @model.errors.description as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - - - - diff --git a/ui/core/app/components/form/target/add-host-sets/index.hbs b/ui/core/app/components/form/target/add-host-sets/index.hbs deleted file mode 100644 index 545f45f91..000000000 --- a/ui/core/app/components/form/target/add-host-sets/index.hbs +++ /dev/null @@ -1,60 +0,0 @@ -{{#if this.hasAvailableHostSets}} - - - - - - - - {{t 'form.id.label'}} - {{t 'form.name.label'}} - {{t 'form.type.label'}} - {{t 'resources.host-catalog.title'}} - - - - {{#each this.filteredHostSets as |hostSet|}} - - - - - {{hostSet.name}} - - {{t (concat 'resources.host-set.types.' hostSet.type)}} - - - {{hostSet.host_catalog_id}} - - - {{/each}} - - - - -{{/if}} - -{{#unless this.hasAvailableHostSets}} - - - - {{t "resources.target.host-set.messages.none.description"}} - - - - {{t "actions.back"}} - - - -{{/unless}} diff --git a/ui/core/app/components/form/target/add-host-sets/index.js b/ui/core/app/components/form/target/add-host-sets/index.js deleted file mode 100644 index f49dda570..000000000 --- a/ui/core/app/components/form/target/add-host-sets/index.js +++ /dev/null @@ -1,55 +0,0 @@ -import Component from '@glimmer/component'; -import { computed, action } from '@ember/object'; -import { A } from '@ember/array'; - -export default class FormTargetAddHostSetsComponent extends Component { - // =properties - - /** - * Array of selected host set IDs. - * @type {EmberArray} - */ - selectedHostSetIDs = A(); - - /** - * Checks for unassigned hostsets. - * @param {[HostSetModel]} filteredHostSets - * @type {boolean} - */ - @computed('filteredHostSets.length') - get hasAvailableHostSets() { - return this.filteredHostSets.length > 0; - } - - /** - * Host sets not already added to the target. - * @type {[HostSetModel]} - */ - @computed('args.{hostSets.[],model.host_sets.[]}') - get filteredHostSets() { - // Get IDs for host sets already added to the current target - const alreadyAddedHostSetIDs = this.args.model.host_sets.map( - ({ host_set_id }) => host_set_id - ); - const notAddedHostSets = this.args.hostSets.filter( - ({ id }) => !alreadyAddedHostSetIDs.includes(id) - ); - return notAddedHostSets; - } - - // =actions - - @action - toggleHostSet(hostSet) { - if (!this.selectedHostSetIDs.includes(hostSet.id)) { - this.selectedHostSetIDs.addObject(hostSet.id); - } else { - this.selectedHostSetIDs.removeObject(hostSet.id); - } - } - - @action - submit(fn) { - fn(this.selectedHostSetIDs); - } -} diff --git a/ui/core/app/components/form/target/index.hbs b/ui/core/app/components/form/target/index.hbs deleted file mode 100644 index afbfc76b0..000000000 --- a/ui/core/app/components/form/target/index.hbs +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - {{#if @model.errors.name}} - - {{#each @model.errors.name as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - - - {{#if @model.errors.description}} - - {{#each @model.errors.description as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - - - {{#if @model.errors.session_max_seconds}} - - {{#each @model.errors.session_max_seconds as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - - - {{#if @model.errors.session_connection_limit}} - - {{#each @model.errors.session_connection_limit as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - - {{!-- TODO this is a type-specific field --}} - - {{!-- TODO need to figure out how to reference `attributes.errors` here --}} - {{#if @model.errors.default_port}} - - {{#each @model.errors.default_port as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - - - - diff --git a/ui/core/app/controllers/scopes/scope/orgs.js b/ui/core/app/controllers/scopes/scope/orgs.js deleted file mode 100644 index d52189e5f..000000000 --- a/ui/core/app/controllers/scopes/scope/orgs.js +++ /dev/null @@ -1,17 +0,0 @@ -import Controller from '@ember/controller'; -import { inject as service } from '@ember/service'; - -export default class ScopesScopeOrgsController extends Controller { - // =services - - @service intl; - - // =attributes - - /** - * @type {string} - */ - get breadCrumb() { - return this.intl.t('resources.org.title_plural'); - } -} diff --git a/ui/core/app/controllers/scopes/scope/orgs/new.js b/ui/core/app/controllers/scopes/scope/orgs/new.js deleted file mode 100644 index d41b81a96..000000000 --- a/ui/core/app/controllers/scopes/scope/orgs/new.js +++ /dev/null @@ -1,17 +0,0 @@ -import Controller from '@ember/controller'; -import { inject as service } from '@ember/service'; - -export default class ScopesScopeOrgsNewController extends Controller { - // =services - - @service intl; - - // =attributes - - /** - * @type {string} - */ - get breadCrumb() { - return this.intl.t('titles.new'); - } -} diff --git a/ui/core/app/controllers/scopes/scope/projects.js b/ui/core/app/controllers/scopes/scope/projects.js deleted file mode 100644 index fb93923df..000000000 --- a/ui/core/app/controllers/scopes/scope/projects.js +++ /dev/null @@ -1,17 +0,0 @@ -import Controller from '@ember/controller'; -import { inject as service } from '@ember/service'; - -export default class ScopesScopeProjectsController extends Controller { - // =services - - @service intl; - - // =attributes - - /** - * @type {string} - */ - get breadCrumb() { - return this.intl.t('resources.project.title_plural'); - } -} diff --git a/ui/core/app/controllers/scopes/scope/projects/new.js b/ui/core/app/controllers/scopes/scope/projects/new.js deleted file mode 100644 index d1f87399f..000000000 --- a/ui/core/app/controllers/scopes/scope/projects/new.js +++ /dev/null @@ -1,17 +0,0 @@ -import Controller from '@ember/controller'; -import { inject as service } from '@ember/service'; - -export default class ScopesScopeProjectsNewController extends Controller { - // =services - - @service intl; - - // =attributes - - /** - * @type {string} - */ - get breadCrumb() { - return this.intl.t('titles.new'); - } -} diff --git a/ui/core/app/controllers/scopes/scope/projects/project.js b/ui/core/app/controllers/scopes/scope/projects/project.js deleted file mode 100644 index 8d1219267..000000000 --- a/ui/core/app/controllers/scopes/scope/projects/project.js +++ /dev/null @@ -1,12 +0,0 @@ -import Controller from '@ember/controller'; - -export default class ScopesScopeProjectsProjectController extends Controller { - // =attributes - - /** - * @type {string} - */ - get breadCrumb() { - return this.model.displayName; - } -} diff --git a/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs.js b/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs.js deleted file mode 100644 index 5e90268a0..000000000 --- a/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs.js +++ /dev/null @@ -1,17 +0,0 @@ -import Controller from '@ember/controller'; -import { inject as service } from '@ember/service'; - -export default class ScopesScopeProjectsProjectHostCatalogsController extends Controller { - // =services - - @service intl; - - // =attributes - - /** - * @type {string} - */ - get breadCrumb() { - return this.intl.t('resources.host-catalog.title_plural'); - } -} diff --git a/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog.js b/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog.js deleted file mode 100644 index 333fbfe1a..000000000 --- a/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog.js +++ /dev/null @@ -1,12 +0,0 @@ -import Controller from '@ember/controller'; - -export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogController extends Controller { - // =attributes - - /** - * @type {string} - */ - get breadCrumb() { - return this.model.displayName; - } -} diff --git a/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets.js b/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets.js deleted file mode 100644 index 2ec9620d3..000000000 --- a/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets.js +++ /dev/null @@ -1,18 +0,0 @@ -import Controller from '@ember/controller'; -import { inject as service } from '@ember/service'; - -export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostSetsController extends Controller { - // =services - - @service intl; - - // =attributes - - /** - * Host sets breadcrumb - * @type {string} - */ - get breadCrumb() { - return this.intl.t('resources.host-set.title_plural'); - } -} diff --git a/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set.js b/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set.js deleted file mode 100644 index 8e59a9fa9..000000000 --- a/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set.js +++ /dev/null @@ -1,13 +0,0 @@ -import Controller from '@ember/controller'; - -export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostSetsHostSetController extends Controller { - // =attributes - - /** - * Host set breadcrumb - * @type {string} - */ - get breadCrumb() { - return this.model.displayName; - } -} diff --git a/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/create-host.js b/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/create-host.js deleted file mode 100644 index e5ff5fa35..000000000 --- a/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/create-host.js +++ /dev/null @@ -1,18 +0,0 @@ -import Controller from '@ember/controller'; -import { inject as service } from '@ember/service'; - -export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostSetsHostSetCreateHostController extends Controller { - // =services - - @service intl; - - // =attributes - - /** - * Translated new host set breadcrumb - * @type {string} - */ - get breadCrumb() { - return this.intl.t('resources.host-set.actions.create-host'); - } -} diff --git a/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new.js b/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new.js deleted file mode 100644 index 8a0383067..000000000 --- a/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new.js +++ /dev/null @@ -1,18 +0,0 @@ -import Controller from '@ember/controller'; -import { inject as service } from '@ember/service'; - -export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostSetsNewController extends Controller { - // =services - - @service intl; - - // =attributes - - /** - * Translated new host set breadcrumb - * @type {string} - */ - get breadCrumb() { - return this.intl.t('titles.new'); - } -} diff --git a/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/hosts.js b/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/hosts.js deleted file mode 100644 index 589649129..000000000 --- a/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/hosts.js +++ /dev/null @@ -1,18 +0,0 @@ -import Controller from '@ember/controller'; -import { inject as service } from '@ember/service'; - -export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostsController extends Controller { - // =services - - @service intl; - - // =attributes - - /** - * Hosts breadcrumb - * @type {string} - */ - get breadCrumb() { - return this.intl.t('resources.host.title_plural'); - } -} diff --git a/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host.js b/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host.js deleted file mode 100644 index fc59d096c..000000000 --- a/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host.js +++ /dev/null @@ -1,13 +0,0 @@ -import Controller from '@ember/controller'; - -export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostsHostController extends Controller { - // =attributes - - /** - * Host breadcrumb - * @type {string} - */ - get breadCrumb() { - return this.model.displayName; - } -} diff --git a/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/new.js b/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/new.js deleted file mode 100644 index 420a7f671..000000000 --- a/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/new.js +++ /dev/null @@ -1,18 +0,0 @@ -import Controller from '@ember/controller'; -import { inject as service } from '@ember/service'; - -export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostsNewController extends Controller { - // =services - - @service intl; - - // =attributes - - /** - * Translated new host breadcrumb - * @type {string} - */ - get breadCrumb() { - return this.intl.t('titles.new'); - } -} diff --git a/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/new.js b/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/new.js deleted file mode 100644 index 040876e4f..000000000 --- a/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/new.js +++ /dev/null @@ -1,18 +0,0 @@ -import Controller from '@ember/controller'; -import { inject as service } from '@ember/service'; - -export default class ScopesScopeProjectsProjectHostCatalogsNewController extends Controller { - // =services - - @service intl; - - // =attributes - - /** - * Translated new role breadcrumb - * @type {string} - */ - get breadCrumb() { - return this.intl.t('titles.new'); - } -} diff --git a/ui/core/app/controllers/scopes/scope/projects/project/sessions.js b/ui/core/app/controllers/scopes/scope/projects/project/sessions.js deleted file mode 100644 index 4c49105c6..000000000 --- a/ui/core/app/controllers/scopes/scope/projects/project/sessions.js +++ /dev/null @@ -1,19 +0,0 @@ -import Controller from '@ember/controller'; -import { inject as service } from '@ember/service'; - -export default class ScopesScopeProjectsProjectSessionsController extends Controller { - - // =services - - @service intl; - - // =attributes - - /** - * @type {string} - */ - get breadCrumb() { - return this.intl.t('resources.session.title_plural'); - } - -} diff --git a/ui/core/app/controllers/scopes/scope/projects/project/targets.js b/ui/core/app/controllers/scopes/scope/projects/project/targets.js deleted file mode 100644 index 9c51e3de1..000000000 --- a/ui/core/app/controllers/scopes/scope/projects/project/targets.js +++ /dev/null @@ -1,18 +0,0 @@ -import Controller from '@ember/controller'; -import { inject as service } from '@ember/service'; - -export default class ScopesScopeProjectsProjectTargetsController extends Controller { - // =services - - @service intl; - - // =attributes - - /** - * Targets breadcrumb - * @type {string} - */ - get breadCrumb() { - return this.intl.t('resources.target.title_plural'); - } -} diff --git a/ui/core/app/controllers/scopes/scope/projects/project/targets/new.js b/ui/core/app/controllers/scopes/scope/projects/project/targets/new.js deleted file mode 100644 index 588dca4b6..000000000 --- a/ui/core/app/controllers/scopes/scope/projects/project/targets/new.js +++ /dev/null @@ -1,18 +0,0 @@ -import Controller from '@ember/controller'; -import { inject as service } from '@ember/service'; - -export default class ScopesScopeProjectsProjectTargetsNewController extends Controller { - // =services - - @service intl; - - // =attributes - - /** - * Translated new target breadcrumb - * @type {string} - */ - get breadCrumb() { - return this.intl.t('titles.new'); - } -} diff --git a/ui/core/app/controllers/scopes/scope/projects/project/targets/target.js b/ui/core/app/controllers/scopes/scope/projects/project/targets/target.js deleted file mode 100644 index 4cad64e2b..000000000 --- a/ui/core/app/controllers/scopes/scope/projects/project/targets/target.js +++ /dev/null @@ -1,13 +0,0 @@ -import Controller from '@ember/controller'; - -export default class ScopesScopeProjectsProjectTargetsTargetController extends Controller { - // =attributes - - /** - * A target breadcrumb - * @type {string} - */ - get breadCrumb() { - return this.model.displayName; - } -} diff --git a/ui/core/app/controllers/scopes/scope/projects/project/targets/target/add-host-sets.js b/ui/core/app/controllers/scopes/scope/projects/project/targets/target/add-host-sets.js deleted file mode 100644 index 8a4cb606e..000000000 --- a/ui/core/app/controllers/scopes/scope/projects/project/targets/target/add-host-sets.js +++ /dev/null @@ -1,17 +0,0 @@ -import Controller from '@ember/controller'; -import { inject as service } from '@ember/service'; - -export default class ScopesScopeProjectsProjectTargetsTargetAddHostSetsController extends Controller { - // =services - - @service intl; - - // =attributes - - /** - * @type {string} - */ - get breadCrumb() { - return this.intl.t('resources.target.actions.add-host-sets'); - } -} diff --git a/ui/core/app/controllers/scopes/scope/projects/project/targets/target/host-sets.js b/ui/core/app/controllers/scopes/scope/projects/project/targets/target/host-sets.js deleted file mode 100644 index 92a90208b..000000000 --- a/ui/core/app/controllers/scopes/scope/projects/project/targets/target/host-sets.js +++ /dev/null @@ -1,18 +0,0 @@ -import Controller from '@ember/controller'; -import { inject as service } from '@ember/service'; - -export default class ScopesScopeProjectsProjectTargetsTargetHostSetsController extends Controller { - // =services - - @service intl; - - // =attributes - - /** - * Host sets breadcrumb - * @type {string} - */ - get breadCrumb() { - return this.intl.t('resources.host-set.title_plural'); - } -} diff --git a/ui/core/app/router.js b/ui/core/app/router.js index 192b9d8c5..88358232c 100644 --- a/ui/core/app/router.js +++ b/ui/core/app/router.js @@ -17,47 +17,6 @@ Router.map(function () { this.route('new'); }); - this.route('projects', function () { - this.route('project', { path: ':project_id' }, function () { - this.route('host-catalogs', function () { - this.route('new'); - this.route( - 'host-catalog', - { path: ':host_catalog_id' }, - function () { - this.route('host-sets', function () { - this.route('host-set', { path: ':host_set_id' }, function () { - this.route('hosts'); - this.route('add-hosts'); - this.route('create-host'); - }); - this.route('new'); - }); - this.route('hosts', function () { - this.route('host', { path: ':host_id' }, function () {}); - this.route('new'); - }); - } - ); - }); - this.route('targets', function () { - this.route('target', { path: ':target_id' }, function () { - this.route('host-sets', function () { - this.route( - 'host-set', - { path: ':host_set_id' }, - function () {} - ); - }); - this.route('add-host-sets'); - }); - this.route('new'); - }); - this.route('sessions', function() {}); - }); - this.route('new'); - }); - this.route('users', function () { this.route('user', { path: ':user_id' }, function () { this.route('accounts'); diff --git a/ui/core/app/routes/scopes/scope.js b/ui/core/app/routes/scopes/scope.js index 4351e112d..179fbc865 100644 --- a/ui/core/app/routes/scopes/scope.js +++ b/ui/core/app/routes/scopes/scope.js @@ -76,18 +76,11 @@ export default class ScopesScopeRoute extends Route { * @param {object} controller * @param {object} model */ - renderTemplate(controller, model) { + renderTemplate() { super.renderTemplate(...arguments); - this.render('scopes/scope/-header-nav', { into: 'application', outlet: 'header-nav', }); - - this.render('scopes/scope/-sidebar', { - into: 'scopes/scope', - outlet: 'sidebar', - model: model, - }); } } diff --git a/ui/core/app/routes/scopes/scope/authenticate.js b/ui/core/app/routes/scopes/scope/authenticate.js index 883bbb704..53bafba60 100644 --- a/ui/core/app/routes/scopes/scope/authenticate.js +++ b/ui/core/app/routes/scopes/scope/authenticate.js @@ -10,14 +10,7 @@ export default class ScopesScopeAuthenticateRoute extends Route { // =methods beforeModel() { - if (this.session.isAuthenticated) { - const scope = this.modelFor('scopes.scope'); - if (scope.isGlobal) { - this.transitionTo('scopes.scope.orgs'); - } else { - this.transitionTo('scopes.scope.projects'); - } - } + if (this.session.isAuthenticated) this.transitionTo('scopes.scope.index'); } /** diff --git a/ui/core/app/routes/scopes/scope/index.js b/ui/core/app/routes/scopes/scope/index.js index 36261b82d..796253603 100644 --- a/ui/core/app/routes/scopes/scope/index.js +++ b/ui/core/app/routes/scopes/scope/index.js @@ -1,12 +1,19 @@ import Route from '@ember/routing/route'; +import { inject as service } from '@ember/service'; export default class ScopesScopeIndexRoute extends Route { + // =services + + @service session; + // =methods /** * Redirects to scopes/scope/authenticate for further processing. */ redirect() { - this.transitionTo('scopes.scope.authenticate'); + if (!this.session.isAuthenticated) { + this.transitionTo('scopes.scope.authenticate'); + } } } diff --git a/ui/core/app/routes/scopes/scope/orgs.js b/ui/core/app/routes/scopes/scope/orgs.js deleted file mode 100644 index 5aad80343..000000000 --- a/ui/core/app/routes/scopes/scope/orgs.js +++ /dev/null @@ -1,60 +0,0 @@ -import Route from '@ember/routing/route'; -import { inject as service } from '@ember/service'; -import { action } from '@ember/object'; -import loading from 'ember-loading/decorator'; -import { notifySuccess, notifyError } from '../../../decorators/notify'; - -export default class ScopesScopeOrgsRoute extends Route { - // =services - - @service intl; - @service notify; - @service session; - - // =methods - - /** - * If arriving here unauthenticated or from a non-global scope, - * redirect to index for further processing. - */ - beforeModel() { - if (!this.session.isAuthenticated) this.transitionTo('index'); - const scope = this.modelFor('scopes.scope'); - if(!scope.isGlobal) this.transitionTo('index'); - } - - /** - * Loads all scopes under the global scope. - * @return {Promise{[ScopeModel]}} - */ - async model() { - return this.store.query('scope', { scope_id: 'global' }); - } - - // =actions - - /** - * Rollback changes on org. - * @param {ScopeModel} org - */ - @action - cancel(org) { - org.rollbackAttributes(); - this.transitionTo('scopes.scope.orgs'); - } - - /** - * Handle save org. - * @param {ScopeModel} org - * @param {Event} e - */ - @action - @loading - @notifyError(({ message }) => message, { catch: true }) - @notifySuccess('notifications.create-success') - async save(org) { - await org.save(); - await this.transitionTo('scopes.scope.projects', org); - this.refresh(); - } -} diff --git a/ui/core/app/routes/scopes/scope/orgs/index.js b/ui/core/app/routes/scopes/scope/orgs/index.js deleted file mode 100644 index e41a21c19..000000000 --- a/ui/core/app/routes/scopes/scope/orgs/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class ScopesScopeOrgsIndexRoute extends Route {} diff --git a/ui/core/app/routes/scopes/scope/orgs/new.js b/ui/core/app/routes/scopes/scope/orgs/new.js deleted file mode 100644 index a8819e58c..000000000 --- a/ui/core/app/routes/scopes/scope/orgs/new.js +++ /dev/null @@ -1,16 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class ScopesScopeOrgsNewRoute extends Route { - // =methods - - /** - * Creates a new unsaved org scope belonging to the global scope. - * @return {ScopeModel} - */ - model() { - return this.store.createRecord('scope', { - type: 'org', - scopeID: 'global', - }); - } -} diff --git a/ui/core/app/routes/scopes/scope/projects.js b/ui/core/app/routes/scopes/scope/projects.js deleted file mode 100644 index 7a43e0e71..000000000 --- a/ui/core/app/routes/scopes/scope/projects.js +++ /dev/null @@ -1,90 +0,0 @@ -import Route from '@ember/routing/route'; -import { inject as service } from '@ember/service'; -import { action } from '@ember/object'; -import loading from 'ember-loading/decorator'; -import { confirm } from '../../../decorators/confirm'; -import { notifySuccess, notifyError } from '../../../decorators/notify'; - -export default class ScopesScopeProjectsRoute extends Route { - // =services - - @service intl; - @service notify; - @service session; - @service confirm; - - // =methods - - /** - * If arriving here unauthenticated, redirect to index for further processing. - */ - beforeModel() { - if (!this.session.isAuthenticated) this.transitionTo('index'); - } - - /** - * Loads all scopes under the current scope. - * @return {Promise{[ScopeModel]}} - */ - async model() { - const { id: scope_id } = this.modelFor('scopes.scope'); - return this.store.query('scope', { scope_id }); - } - - /** - * If arriving here within a verifiable project scope, redirect to its - * parent, which is necessarily an org, in order to list projects. - * - * TODO: this conditional redirect based on the scope type is probably - * necessary for many routes directly under scope, so we may want - * to move this into a mixin. - * @param {ScopeModel} - */ - redirect() { - const { isProject, scopeID } = this.modelFor('scopes.scope'); - if (isProject) this.transitionTo('scopes.scope.projects', scopeID); - } - - // =actions - - /** - * Rollback changes on project. - * @param {ProjectModel} project - */ - @action - cancel(project) { - const { isNew } = project; - project.rollbackAttributes(); - if (isNew) this.transitionTo('scopes.scope.projects'); - } - - /** - * Handle save project. - * @param {ProjectModel} project - * @param {Event} e - */ - @action - @loading - @notifyError(({ message }) => message) - @notifySuccess(({ isNew }) => isNew ? 'notifications.create-success' : 'notifications.save-success') - async save(project) { - await project.save(); - await this.transitionTo('scopes.scope.projects.project', project); - this.refresh(); - } - - /** - * Deletes the project and redirects to index. - * @param {ProjectModel} project - */ - @action - @loading - @confirm('questions.delete-confirm') - @notifyError(({ message }) => message, { catch: true }) - @notifySuccess('notifications.delete-success') - async delete(project) { - await project.destroyRecord(); - await this.replaceWith('scopes.scope.projects'); - this.refresh(); - } -} diff --git a/ui/core/app/routes/scopes/scope/projects/index.js b/ui/core/app/routes/scopes/scope/projects/index.js deleted file mode 100644 index d763c183c..000000000 --- a/ui/core/app/routes/scopes/scope/projects/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class ScopesScopeProjectsIndexRoute extends Route {} diff --git a/ui/core/app/routes/scopes/scope/projects/new.js b/ui/core/app/routes/scopes/scope/projects/new.js deleted file mode 100644 index 207ca3dbc..000000000 --- a/ui/core/app/routes/scopes/scope/projects/new.js +++ /dev/null @@ -1,17 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class ScopesScopeProjectsNewRoute extends Route { - // =methods - - /** - * Creates a new unsaved project scope belonging to the current org scope. - * @return {ScopeModel} - */ - model() { - const { id } = this.modelFor('scopes.scope'); - return this.store.createRecord('scope', { - type: 'project', - scopeID: id, - }); - } -} diff --git a/ui/core/app/routes/scopes/scope/projects/project.js b/ui/core/app/routes/scopes/scope/projects/project.js deleted file mode 100644 index 0f3e7dbdb..000000000 --- a/ui/core/app/routes/scopes/scope/projects/project.js +++ /dev/null @@ -1,31 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class ScopesScopeProjectsProjectRoute extends Route { - // =methods - - /** - * Loads a scope by ID (ostensibly a project scope). - * @param {object} params - * @param {string} params.project_id - * @return {ScopeModel} - */ - model({ project_id }) { - return this.store.findRecord('scope', project_id); - } - - /** - * Renders the project-specific sidebar template. - * @override - * @param {object} controller - * @param {object} model - */ - renderTemplate(controller, model) { - super.renderTemplate(...arguments); - - this.render('scopes/scope/projects/project/-sidebar', { - into: 'scopes/scope', - outlet: 'sidebar', - model: model, - }); - } -} diff --git a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs.js b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs.js deleted file mode 100644 index ab01b5b7e..000000000 --- a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs.js +++ /dev/null @@ -1,70 +0,0 @@ -import Route from '@ember/routing/route'; -import { inject as service } from '@ember/service'; -import { action } from '@ember/object'; -import loading from 'ember-loading/decorator'; -import { confirm } from '../../../../../decorators/confirm'; -import { notifySuccess, notifyError } from '../../../../../decorators/notify'; - -export default class ScopesScopeProjectsProjectHostCatalogsRoute extends Route { - // =services - - @service intl; - @service notify; - - // =methods - - /** - * Loads all host catalogs under the current scope. - * @return {Promise{[HostCatalogModel]}} - */ - async model() { - const { id: scope_id } = this.modelFor('scopes.scope.projects.project'); - return this.store.query('host-catalog', { scope_id }); - } - - // =actions - - /** - * Rollback changes on project. - * @param {HostCatalogModel} hostCatalog - */ - @action - cancel(hostCatalog) { - const { isNew } = hostCatalog; - hostCatalog.rollbackAttributes(); - if (isNew) this.transitionTo('scopes.scope.projects.project.host-catalogs'); - } - - /** - * Handle save. - * @param {HostCatalogModel} hostCatalog - * @param {Event} e - */ - @action - @loading - @notifyError(({ message }) => message) - @notifySuccess(({ isNew }) => isNew ? 'notifications.create-success' : 'notifications.save-success') - async save(hostCatalog) { - await hostCatalog.save(); - await this.transitionTo( - 'scopes.scope.projects.project.host-catalogs.host-catalog', - hostCatalog - ); - this.refresh(); - } - - /** - * Deletes the host catalog and redirects to index. - * @param {HostCatalogModel} hostCatalog - */ - @action - @loading - @confirm('questions.delete-confirm') - @notifyError(({ message }) => message, { catch: true }) - @notifySuccess('notifications.delete-success') - async delete(hostCatalog) { - await hostCatalog.destroyRecord(); - await this.replaceWith('scopes.scope.projects.project.host-catalogs'); - this.refresh(); - } -} diff --git a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog.js b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog.js deleted file mode 100644 index 71fbe290b..000000000 --- a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog.js +++ /dev/null @@ -1,52 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogRoute extends Route { - // =methods - - /** - * Load a host catalog. - * @param {object} params - * @param {string} params.host_catalog_id - * @return {HostCatalogModel} - */ - async model({ host_catalog_id }) { - return this.store.findRecord('host-catalog', host_catalog_id); - } - - /** - * Renders the host-catalog specific templates for header, navigation, and actions page sections. - * @override - * @param {object} controller - * @param {object} model - */ - renderTemplate(controller, model) { - super.renderTemplate(...arguments); - - this.render( - 'scopes/scope/projects/project/host-catalogs/host-catalog/-header', - { - into: 'scopes/scope/projects/project/host-catalogs/host-catalog', - outlet: 'header', - model: model, - } - ); - - this.render( - 'scopes/scope/projects/project/host-catalogs/host-catalog/-navigation', - { - into: 'scopes/scope/projects/project/host-catalogs/host-catalog', - outlet: 'navigation', - model: model, - } - ); - - this.render( - 'scopes/scope/projects/project/host-catalogs/host-catalog/-actions', - { - into: 'scopes/scope/projects/project/host-catalogs/host-catalog', - outlet: 'actions', - model: model, - } - ); - } -} diff --git a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets.js b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets.js deleted file mode 100644 index 380250c3e..000000000 --- a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets.js +++ /dev/null @@ -1,76 +0,0 @@ -import Route from '@ember/routing/route'; -import { inject as service } from '@ember/service'; -import { action } from '@ember/object'; -import loading from 'ember-loading/decorator'; -import { confirm } from '../../../../../../../decorators/confirm'; -import { notifySuccess, notifyError } from '../../../../../../../decorators/notify'; - -export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostSetsRoute extends Route { - // =services - - @service intl; - @service notify; - - // =methods - - /** - * Loads all host-sets under the current host catalog and it's parent scope. - * @return {Promise{[HostSetModel]}} - */ - model() { - const { id: host_catalog_id } = this.modelFor( - 'scopes.scope.projects.project.host-catalogs.host-catalog' - ); - return this.store.query('host-set', { host_catalog_id }); - } - - // =actions - - /** - * Rollback changes on a host set. - * @param {HostSetModel} hostSet - */ - @action - cancel(hostSet) { - const { isNew } = hostSet; - hostSet.rollbackAttributes(); - if (isNew) - this.transitionTo( - 'scopes.scope.projects.project.host-catalogs.host-catalog.host-sets' - ); - } - - /** - * Handle save of a host set. - * @param {HostSetModel} hostSet - * @param {Event} e - */ - @action - @loading - @notifyError(({ message }) => message) - @notifySuccess(({ isNew }) => isNew ? 'notifications.create-success' : 'notifications.save-success') - async save(hostSet) { - await hostSet.save(); - await this.transitionTo( - 'scopes.scope.projects.project.host-catalogs.host-catalog.host-sets.host-set', - hostSet - ); - this.refresh(); - } - - /** - * Delete host set in current scope and redirect to index. - * @param {HostSetModel} hostSet - */ - @action - @loading - @confirm('questions.delete-confirm') - @notifyError(({ message }) => message, { catch: true }) - @notifySuccess('notifications.delete-success') - async deleteHostSet(hostSet) { - await hostSet.destroyRecord(); - await this.replaceWith( - 'scopes.scope.projects.project.host-catalogs.host-catalog.host-sets' - ); - } -} diff --git a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set.js b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set.js deleted file mode 100644 index 4d88c52b1..000000000 --- a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set.js +++ /dev/null @@ -1,52 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostSetsHostSetRoute extends Route { - // =methods - - /** - * Load a host-set using current host-catalog and it's parent project scope. - * @param {object} params - * @param {string} params.host_set_id - * @return {HostSetModel} - */ - async model({ host_set_id }) { - return this.store.findRecord('host-set', host_set_id, { reload: true }); - } - - /** - * Renders the host-set specific templates for header, navigation, and action page sections. - * @override - * @param {object} controller - * @param {object} model - */ - renderTemplate(controller, model) { - super.renderTemplate(...arguments); - - this.render( - 'scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/-header', - { - into: 'scopes/scope/projects/project/host-catalogs/host-catalog', - outlet: 'header', - model: model, - } - ); - - this.render( - 'scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/-navigation', - { - into: 'scopes/scope/projects/project/host-catalogs/host-catalog', - outlet: 'navigation', - model: model, - } - ); - - this.render( - 'scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/-actions', - { - into: 'scopes/scope/projects/project/host-catalogs/host-catalog', - outlet: 'actions', - model: model, - } - ); - } -} diff --git a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/add-hosts.js b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/add-hosts.js deleted file mode 100644 index 3b398fcec..000000000 --- a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/add-hosts.js +++ /dev/null @@ -1,92 +0,0 @@ -import Route from '@ember/routing/route'; -import { inject as service } from '@ember/service'; -import { action } from '@ember/object'; -import { hash } from 'rsvp'; -import loading from 'ember-loading/decorator'; -import { notifySuccess, notifyError } from '../../../../../../../../../decorators/notify'; - -export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostSetsHostSetAddHostsRoute extends Route { - // =services - - @service intl; - @service notify; - - // =methods - - /** - * Empty out any previously loaded hosts. - */ - beforeModel() { - this.store.unloadAll('host'); - } - - /** - * Loads current host set and all hosts under the current host catalog. - * @return {Promise{HostSetModel,[HostModel]}} - */ - async model() { - const { id: host_catalog_id } = this.modelFor( - 'scopes.scope.projects.project.host-catalogs.host-catalog' - ); - return hash({ - hostSet: this.modelFor( - 'scopes.scope.projects.project.host-catalogs.host-catalog.host-sets.host-set' - ), - hosts: this.store.query('host', { host_catalog_id }), - }); - } - - /** - * Renders the add-hosts-specific header template. - * Empties the actions and navigation outlets and renders a custom empty header. - * @override - */ - renderTemplate() { - super.renderTemplate(...arguments); - - this.render( - 'scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/add-hosts/-header', - { - into: 'scopes/scope/projects/project/host-catalogs/host-catalog', - outlet: 'header', - } - ); - - this.render('-empty', { - into: 'scopes/scope/projects/project/host-catalogs/host-catalog', - outlet: 'navigation', - }); - - this.render('-empty', { - into: 'scopes/scope/projects/project/host-catalogs/host-catalog', - outlet: 'actions', - }); - } - - // =actions - - /** - * Saves host IDs on the host set. - * @param {HostSetModel} hostSet - */ - @action - @loading - @notifyError(({ message }) => message, { catch: true }) - @notifySuccess('notifications.add-success') - async addHosts(hostSet, hostIDs) { - await hostSet.addHosts(hostIDs); - await this.replaceWith( - 'scopes.scope.projects.project.host-catalogs.host-catalog.host-sets.host-set.hosts' - ); - } - - /** - * Redirect to hosts as if nothing ever happened. - */ - @action - cancel() { - this.replaceWith( - 'scopes.scope.projects.project.host-catalogs.host-catalog.host-sets.host-set.hosts' - ); - } -} diff --git a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/create-host.js b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/create-host.js deleted file mode 100644 index 05aa6ed6f..000000000 --- a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/create-host.js +++ /dev/null @@ -1,90 +0,0 @@ -import Route from '@ember/routing/route'; -import { inject as service } from '@ember/service'; -import { action } from '@ember/object'; -import { hash } from 'rsvp'; -import loading from 'ember-loading/decorator'; -import { notifySuccess, notifyError } from '../../../../../../../../../decorators/notify'; - -export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostSetsHostSetCreateHostRoute extends Route { - // =services - - @service intl; - @service notify; - - // =methods - - /** - * Creates a new unsaved host in current host catalog scope. - * @return {Promise{HostSetModel,HostModel}} - */ - async model() { - const { id: host_catalog_id } = this.modelFor( - 'scopes.scope.projects.project.host-catalogs.host-catalog' - ); - - return hash({ - hostSet: this.modelFor( - 'scopes.scope.projects.project.host-catalogs.host-catalog.host-sets.host-set' - ), - host: this.store.createRecord('host', { - type: 'static', - host_catalog_id, - }), - }); - } - - /** - * Renders the create-host-specific header template. - * Empties the actions and navigation outlets and renders a custom empty header. - * @override - */ - renderTemplate() { - super.renderTemplate(...arguments); - - this.render( - 'scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/create-host/-header', - { - into: 'scopes/scope/projects/project/host-catalogs/host-catalog', - outlet: 'header', - } - ); - - this.render('-empty', { - into: 'scopes/scope/projects/project/host-catalogs/host-catalog', - outlet: 'navigation', - }); - - this.render('-empty', { - into: 'scopes/scope/projects/project/host-catalogs/host-catalog', - outlet: 'actions', - }); - } - - // =actions - - /** - * Saves host and add it to current host set. - * @param {HostSetModel,HostModel} model - */ - @action - @loading - @notifyError(({ message }) => message, { catch: true }) - @notifySuccess('notifications.add-success') - async save(model) { - await model.host.save(); - await model.hostSet.addHost(model.host.id); - await this.replaceWith( - 'scopes.scope.projects.project.host-catalogs.host-catalog.host-sets.host-set.hosts' - ); - } - - /** - * Redirect to hosts in host set as if nothing ever happened. - */ - @action - cancel() { - this.replaceWith( - 'scopes.scope.projects.project.host-catalogs.host-catalog.host-sets.host-set.hosts' - ); - } -} diff --git a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/hosts.js b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/hosts.js deleted file mode 100644 index 8b4a5514d..000000000 --- a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/hosts.js +++ /dev/null @@ -1,55 +0,0 @@ -import Route from '@ember/routing/route'; -import { hash, all } from 'rsvp'; -import { action } from '@ember/object'; -import { inject as service } from '@ember/service'; -import loading from 'ember-loading/decorator'; -import { confirm } from '../../../../../../../../../decorators/confirm'; -import { notifySuccess, notifyError } from '../../../../../../../../../decorators/notify'; - -export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostSetsHostSetHostsRoute extends Route { - // =services - - @service intl; - @service notify; - - // =methods - - /** - * Loads all hosts under the current host set. - * @return {Promise{HostSetModel,[HostModel]}} - */ - async model() { - const hostSet = this.modelFor( - 'scopes.scope.projects.project.host-catalogs.host-catalog.host-sets.host-set' - ); - return hash({ - hostSet, - hosts: all( - hostSet.host_ids.map((host) => - this.store.findRecord('host', host.value, { reload: true }) - ) - ), - }); - } - - /** - * Remove a host from the current host set and redirect to hosts index. - * @param {HostSetModel} hostSet - * @param {HostModel} host - */ - @action - @loading - @confirm('questions.remove-confirm') - @notifyError(({ message }) => message, { catch: true }) - @notifySuccess('notifications.remove-success') - async removeHost(hostSet, host) { - const scopeID = this.modelFor('scopes.scope.projects.project').id; - const hostCatalogID = this.modelFor( - 'scopes.scope.projects.project.host-catalogs.host-catalog' - ).id; - await hostSet.removeHost(host.id, { - adapterOptions: { scopeID, hostCatalogID }, - }); - this.refresh(); - } -} diff --git a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/index.js b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/index.js deleted file mode 100644 index 0f73c321d..000000000 --- a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostSetsHostSetIndexRoute extends Route {} diff --git a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/index.js b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/index.js deleted file mode 100644 index 8243577dc..000000000 --- a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostSetsIndexRoute extends Route {} diff --git a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new.js b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new.js deleted file mode 100644 index 44a134995..000000000 --- a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new.js +++ /dev/null @@ -1,50 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostSetsNewRoute extends Route { - // =methods - - /** - * Creates a new unsaved host set in current host catalog scope. - * @return {HostSetModel} - */ - model() { - const { id: host_catalog_id } = this.modelFor( - 'scopes.scope.projects.project.host-catalogs.host-catalog' - ); - return this.store.createRecord('host-set', { - type: 'static', - host_catalog_id, - }); - } - - /** - * Renders new host-set specific templates for header, navigation, and action page sections. - * @override - * @param {object} controller - * @param {object} model - */ - renderTemplate(controller, model) { - super.renderTemplate(...arguments); - - this.render( - 'scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new/-header', - { - into: 'scopes/scope/projects/project/host-catalogs/host-catalog', - outlet: 'header', - model: model, - } - ); - - this.render('_empty', { - into: 'scopes/scope/projects/project/host-catalogs/host-catalog', - outlet: 'navigation', - model: model, - }); - - this.render('_empty', { - into: 'scopes/scope/projects/project/host-catalogs/host-catalog', - outlet: 'actions', - model: model, - }); - } -} diff --git a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts.js b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts.js deleted file mode 100644 index 9b9732e2a..000000000 --- a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts.js +++ /dev/null @@ -1,77 +0,0 @@ -import Route from '@ember/routing/route'; -import { inject as service } from '@ember/service'; -import { action } from '@ember/object'; -import loading from 'ember-loading/decorator'; -import { confirm } from '../../../../../../../decorators/confirm'; -import { notifySuccess, notifyError } from '../../../../../../../decorators/notify'; - -export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostsRoute extends Route { - // =services - - @service intl; - @service notify; - - // =methods - - /** - * Loads all hosts under the current host catalog and it's parent project scope. - * @return {Promise{[HostModel]}} - */ - model() { - const { id: host_catalog_id } = this.modelFor( - 'scopes.scope.projects.project.host-catalogs.host-catalog' - ); - return this.store.query('host', { host_catalog_id }); - } - - // =actions - - /** - * Rollback changes on a host. - * @param {HostModel} host - */ - @action - cancel(host) { - const { isNew } = host; - host.rollbackAttributes(); - if (isNew) - this.transitionTo( - 'scopes.scope.projects.project.host-catalogs.host-catalog.hosts' - ); - } - - /** - * Handle save of a host. - * @param {HostModel} host - * @param {Event} e - */ - @action - @loading - @notifyError(({ message }) => message) - @notifySuccess(({ isNew }) => isNew ? 'notifications.create-success' : 'notifications.save-success') - async save(host) { - await host.save(); - await this.transitionTo( - 'scopes.scope.projects.project.host-catalogs.host-catalog.hosts.host', - host - ); - this.refresh(); - } - - /** - * Delete host in current scope and redirect to index. - * @param {HostModel} host - */ - @action - @loading - @confirm('questions.delete-confirm') - @notifyError(({ message }) => message, { catch: true }) - @notifySuccess('notifications.delete-success') - async deleteHost(host) { - await host.destroyRecord(); - await this.replaceWith( - 'scopes.scope.projects.project.host-catalogs.host-catalog.hosts' - ); - this.refresh(); - } -} diff --git a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host.js b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host.js deleted file mode 100644 index da1ca0685..000000000 --- a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host.js +++ /dev/null @@ -1,52 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostsHostRoute extends Route { - // =methods - - /** - * Load a host using current host-catalog and it's parent project scope. - * @param {object} params - * @param {string} params.host_id - * @return {HostModel} - */ - async model({ host_id }) { - return this.store.findRecord('host', host_id, { reload: true }); - } - - /** - * Renders the host specific templates for header, navigation, and action page sections. - * @override - * @param {object} controller - * @param {object} model - */ - renderTemplate(controller, model) { - super.renderTemplate(...arguments); - - this.render( - 'scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/-header', - { - into: 'scopes/scope/projects/project/host-catalogs/host-catalog', - outlet: 'header', - model: model, - } - ); - - this.render( - 'scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/-navigation', - { - into: 'scopes/scope/projects/project/host-catalogs/host-catalog', - outlet: 'navigation', - model: model, - } - ); - - this.render( - 'scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/-actions', - { - into: 'scopes/scope/projects/project/host-catalogs/host-catalog', - outlet: 'actions', - model: model, - } - ); - } -} diff --git a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/index.js b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/index.js deleted file mode 100644 index 14e5c2210..000000000 --- a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostsHostIndexRoute extends Route {} diff --git a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/index.js b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/index.js deleted file mode 100644 index d6847d0b1..000000000 --- a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostsIndexRoute extends Route {} diff --git a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/new.js b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/new.js deleted file mode 100644 index 6ea7a3f7b..000000000 --- a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/new.js +++ /dev/null @@ -1,50 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostsNewRoute extends Route { - // =methods - - /** - * Creates a new unsaved host in current host catalog scope. - * @return {HostModel} - */ - model() { - const { id: host_catalog_id } = this.modelFor( - 'scopes.scope.projects.project.host-catalogs.host-catalog' - ); - return this.store.createRecord('host', { - type: 'static', - host_catalog_id, - }); - } - - /** - * Renders new host specific templates for header, navigation, and action page sections. - * @override - * @param {object} controller - * @param {object} model - */ - renderTemplate(controller, model) { - super.renderTemplate(...arguments); - - this.render( - 'scopes/scope/projects/project/host-catalogs/host-catalog/hosts/new/-header', - { - into: 'scopes/scope/projects/project/host-catalogs/host-catalog', - outlet: 'header', - model: model, - } - ); - - this.render('_empty', { - into: 'scopes/scope/projects/project/host-catalogs/host-catalog', - outlet: 'navigation', - model: model, - }); - - this.render('_empty', { - into: 'scopes/scope/projects/project/host-catalogs/host-catalog', - outlet: 'actions', - model: model, - }); - } -} diff --git a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/index.js b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/index.js deleted file mode 100644 index 88bc29fe9..000000000 --- a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogIndexRoute extends Route {} diff --git a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/index.js b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/index.js deleted file mode 100644 index be34e9260..000000000 --- a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class ScopesScopeProjectsProjectHostCatalogsIndexRoute extends Route {} diff --git a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/new.js b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/new.js deleted file mode 100644 index 58e326cb8..000000000 --- a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/new.js +++ /dev/null @@ -1,17 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class ScopesScopeProjectsProjectHostCatalogsNewRoute extends Route { - // =methods - - /** - * Creates a new unsaved host catalog belonging to the current project scope. - * @return {HostCatalogModel} - */ - model() { - const scopeModel = this.modelFor('scopes.scope.projects.project'); - return this.store.createRecord('host-catalog', { - type: 'static', - scopeModel, - }); - } -} diff --git a/ui/core/app/routes/scopes/scope/projects/project/index.js b/ui/core/app/routes/scopes/scope/projects/project/index.js deleted file mode 100644 index a004bac08..000000000 --- a/ui/core/app/routes/scopes/scope/projects/project/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class ScopesScopeProjectsProjectIndexRoute extends Route {} diff --git a/ui/core/app/routes/scopes/scope/projects/project/sessions.js b/ui/core/app/routes/scopes/scope/projects/project/sessions.js deleted file mode 100644 index 3e01b9f44..000000000 --- a/ui/core/app/routes/scopes/scope/projects/project/sessions.js +++ /dev/null @@ -1,103 +0,0 @@ -import Route from '@ember/routing/route'; -import { inject as service } from '@ember/service'; -import { action } from '@ember/object'; -import { all, hash } from 'rsvp'; -import { task, timeout } from 'ember-concurrency'; -import { A } from '@ember/array'; -import { notifySuccess, notifyError } from '../../../../../decorators/notify'; -import config from '../../../../../config/environment'; - -const POLL_TIMEOUT_SECONDS = config.sessionPollingTimeoutSeconds; - -export default class ScopesScopeProjectsProjectSessionsRoute extends Route { - - // =services - - @service intl; - @service notify; - - // =attributes - - /** - * A simple Ember Concurrency-based polling task that refreshes the route - * every POLL_TIMEOUT_SECONDS seconds. This is necessary to display changes - * to session `status` that may occur. - * - * NOTE: tasks are sort of attributes and sort of methods, but they are not - * language-level constructs. Thus we annotate this task as if it - * is an attribute. - * @type {Task} - */ - @task(function * () { - while(true) { - yield timeout(POLL_TIMEOUT_SECONDS * 1000); - yield this.refresh(); - } - }).drop() poller; - - // =methods - - /** - * Loads all sessions under the current scope and encapsulates them into - * an array of objects containing their associated users and targets. - * @return {Promise{[{session: SessionModel, user: UserModel, target: TargetModel}]}} - */ - async model() { - const { id: scope_id } = this.modelFor('scopes.scope.projects.project'); - const sessions = await this.store.query('session', { scope_id }); - const sessionAggregates = await all( - sessions.map(session => hash({ - session, - user: session.user_id - ? ( - this.store.peekRecord('user', session.user_id) || - this.store.findRecord('user', session.user_id) - ) - : null, - target: session.target_id - ? ( - this.store.peekRecord('target', session.target_id) || - this.store.findRecord('target', session.target_id) - ) - : null, - })) - ); - // Sort sessions by time created... - let sortedSessionAggregates = - A(sessionAggregates).sortBy('session.created_time').reverse(); - // Then move active sessions to the top... - sortedSessionAggregates = [ - ...sortedSessionAggregates.filter((aggregate) => aggregate.session.status === 'active'), - ...sortedSessionAggregates.filter((aggregate) => aggregate.session.status !== 'active'), - ]; - return sortedSessionAggregates; - } - - /** - * When this route is activated (entered), begin polling for changes. - */ - activate() { - this.poller.perform(); - } - - /** - * When this route is deactivated (exited), stop polling for changes. - */ - deactivate() { - this.poller.cancelAll(); - } - - // =actions - - /** - * Cancels the specified session and notifies user of success or error. - * @param {SessionModel} - */ - @action - @notifyError(({ message }) => message, { catch: true }) - @notifySuccess('notifications.canceled-success') - async cancelSession(session) { - await session.cancelSession(); - } - -} diff --git a/ui/core/app/routes/scopes/scope/projects/project/sessions/index.js b/ui/core/app/routes/scopes/scope/projects/project/sessions/index.js deleted file mode 100644 index a8ae56692..000000000 --- a/ui/core/app/routes/scopes/scope/projects/project/sessions/index.js +++ /dev/null @@ -1,4 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class ScopesScopeProjectsProjectSessionsIndexRoute extends Route { -} diff --git a/ui/core/app/routes/scopes/scope/projects/project/targets.js b/ui/core/app/routes/scopes/scope/projects/project/targets.js deleted file mode 100644 index 68e0b98d0..000000000 --- a/ui/core/app/routes/scopes/scope/projects/project/targets.js +++ /dev/null @@ -1,67 +0,0 @@ -import Route from '@ember/routing/route'; -import { inject as service } from '@ember/service'; -import { action } from '@ember/object'; -import loading from 'ember-loading/decorator'; -import { confirm } from '../../../../../decorators/confirm'; -import { notifySuccess, notifyError } from '../../../../../decorators/notify'; - -export default class ScopesScopeProjectsProjectTargetsRoute extends Route { - // =services - - @service intl; - @service notify; - - // =methods - - /** - * Loads all targets under current project scope. - * @return {Promise{[TargetModel]}} - */ - async model() { - const { id: scope_id } = this.modelFor('scopes.scope.projects.project'); - return this.store.query('target', { scope_id }); - } - - // =actions - - /** - * Rollback changes on a target. - * @param {TargetModel} target - */ - @action - cancel(target) { - const { isNew } = target; - target.rollbackAttributes(); - if (isNew) this.transitionTo('scopes.scope.projects.project.targets'); - } - - /** - * Handle save. - * @param {TargetModel} target - * @param {Event} e - */ - @action - @loading - @notifyError(({ message }) => message) - @notifySuccess(({ isNew }) => isNew ? 'notifications.create-success' : 'notifications.save-success') - async save(target) { - await target.save(); - await this.transitionTo('scopes.scope.projects.project.targets.target', target); - this.refresh(); - } - - /** - * Deletes a target and redirects to targets index. - * @param {TargetModel} target - */ - @action - @loading - @confirm('questions.delete-confirm') - @notifyError(({ message }) => message, { catch: true }) - @notifySuccess('notifications.delete-success') - async delete(target) { - await target.destroyRecord(); - await this.replaceWith('scopes.scope.projects.project.targets'); - this.refresh(); - } -} diff --git a/ui/core/app/routes/scopes/scope/projects/project/targets/index.js b/ui/core/app/routes/scopes/scope/projects/project/targets/index.js deleted file mode 100644 index 903db12df..000000000 --- a/ui/core/app/routes/scopes/scope/projects/project/targets/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class ScopesScopeProjectsProjectTargetsIndexRoute extends Route {} diff --git a/ui/core/app/routes/scopes/scope/projects/project/targets/new.js b/ui/core/app/routes/scopes/scope/projects/project/targets/new.js deleted file mode 100644 index d6cbcaf99..000000000 --- a/ui/core/app/routes/scopes/scope/projects/project/targets/new.js +++ /dev/null @@ -1,17 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class ScopesScopeProjectsProjectTargetsNewRoute extends Route { - // =methods - - /** - * Creates a new unsaved target in current project scope. - * @return {TargetModel} - */ - model() { - const scopeModel = this.modelFor('scopes.scope.projects.project'); - return this.store.createRecord('target', { - type: 'tcp', - scopeModel, - }); - } -} diff --git a/ui/core/app/routes/scopes/scope/projects/project/targets/target.js b/ui/core/app/routes/scopes/scope/projects/project/targets/target.js deleted file mode 100644 index 83bd76120..000000000 --- a/ui/core/app/routes/scopes/scope/projects/project/targets/target.js +++ /dev/null @@ -1,39 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class ScopesScopeProjectsProjectTargetsTargetRoute extends Route { - // =methods - - /** - * Load a target. - * @param {object} params - * @param {string} params.target_id - * @return {TargetModel} - */ - async model({ target_id }) { - return this.store.findRecord('target', target_id, { reload: true }); - } - - /** - * Renders the target-specific templates for header, navigation, - * and actions page sections. - * @override - */ - renderTemplate() { - super.renderTemplate(...arguments); - - this.render('scopes/scope/projects/project/targets/target/-header', { - into: 'scopes/scope/projects/project/targets/target', - outlet: 'header', - }); - - this.render('scopes/scope/projects/project/targets/target/-navigation', { - into: 'scopes/scope/projects/project/targets/target', - outlet: 'navigation', - }); - - this.render('scopes/scope/projects/project/targets/target/-actions', { - into: 'scopes/scope/projects/project/targets/target', - outlet: 'actions', - }); - } -} diff --git a/ui/core/app/routes/scopes/scope/projects/project/targets/target/add-host-sets.js b/ui/core/app/routes/scopes/scope/projects/project/targets/target/add-host-sets.js deleted file mode 100644 index b747fda00..000000000 --- a/ui/core/app/routes/scopes/scope/projects/project/targets/target/add-host-sets.js +++ /dev/null @@ -1,92 +0,0 @@ -import Route from '@ember/routing/route'; -import { inject as service } from '@ember/service'; -import { action } from '@ember/object'; -import { all } from 'rsvp'; -import loading from 'ember-loading/decorator'; -import { notifySuccess, notifyError } from '../../../../../../../decorators/notify'; - -export default class ScopesScopeProjectsProjectTargetsTargetAddHostSetsRoute extends Route { - // =services - - @service intl; - @service notify; - - // =methods - - /** - * Empty out any previously loaded host sets. - */ - beforeModel() { - this.store.unloadAll('host-set'); - } - - /** - * Returns the current target, all host catalogs, and all host sets. - * @return {{target: TargetModel, hostCatalogs: [HostCatalogModel], hostSets: [HostSetModel]}} - */ - async model() { - const target = this.modelFor( - 'scopes.scope.projects.project.targets.target' - ); - const { id: scope_id } = this.modelFor('scopes.scope.projects.project'); - const hostCatalogs = await this.store.query('host-catalog', { scope_id }); - await all( - hostCatalogs.map(({ id: host_catalog_id }) => - this.store.query('host-set', { host_catalog_id }) - ) - ); - const hostSets = this.store.peekAll('host-set'); - return { - target, - hostCatalogs, - hostSets, - }; - } - - /** - * Renders the add-host-sets-specific header template. - * @override - */ - renderTemplate() { - super.renderTemplate(...arguments); - - this.render( - 'scopes/scope/projects/project/targets/target/add-host-sets/-header', - { - into: 'scopes/scope/projects/project/targets/target', - outlet: 'header', - } - ); - - this.render('-empty', { - into: 'scopes/scope/projects/project/targets/target', - outlet: 'navigation', - }); - - this.render('-empty', { - into: 'scopes/scope/projects/project/targets/target', - outlet: 'actions', - }); - } - - // =actions - - @action - @loading - @notifyError(({ message }) => message, { catch: true }) - @notifySuccess('notifications.add-success') - async save(target, hostSetIDs) { - await target.addHostSets(hostSetIDs); - this.replaceWith( - 'scopes.scope.projects.project.targets.target.host-sets' - ); - } - - /** - * Redirect to target host sets as if nothing ever happened. - */ - @action - cancel() { - this.replaceWith('scopes.scope.projects.project.targets.target.host-sets'); - } -} diff --git a/ui/core/app/routes/scopes/scope/projects/project/targets/target/host-sets.js b/ui/core/app/routes/scopes/scope/projects/project/targets/target/host-sets.js deleted file mode 100644 index 08d839f1f..000000000 --- a/ui/core/app/routes/scopes/scope/projects/project/targets/target/host-sets.js +++ /dev/null @@ -1,67 +0,0 @@ -import Route from '@ember/routing/route'; -import { all, hash } from 'rsvp'; -import { action } from '@ember/object'; -import { inject as service } from '@ember/service'; -import loading from 'ember-loading/decorator'; -import { confirm } from '../../../../../../../decorators/confirm'; -import { notifySuccess, notifyError } from '../../../../../../../decorators/notify'; - -export default class ScopesScopeProjectsProjectTargetsTargetHostSetsRoute extends Route { - // =services - - @service intl; - @service notify; - - // =methods - - /** - * Loads all host-sets and associated host-catalogs under the current target - * and it's parent scope. - * @return {Promise{[HostSetModel, HostCatalogModel]}} - */ - beforeModel() { - const { scopeID, host_sets } = this.modelFor( - 'scopes.scope.projects.project.targets.target' - ); - const promises = host_sets.map( - ({ host_set_id, host_catalog_id: hostCatalogID }) => - hash({ - // TODO: multiple host sets may belong to the same catalog, - // resulting in the catalog being loaded multiple times. - // An improvement would be to find the unique set of catalogs first. - hostCatalog: this.store.findRecord('host-catalog', hostCatalogID, { - adapterOptions: { scopeID }, - }), - hostSet: this.store.findRecord('host-set', host_set_id, { - adapterOptions: { scopeID, hostCatalogID }, - }), - }) - ); - return all(promises); - } - - /** - * Returns the previously loaded target instance. - * @return {TargetModel} - */ - model() { - return this.modelFor('scopes.scope.projects.project.targets.target'); - } - - // =actions - - /** - * Removes a host set from the current target and redirects to index. - * @param {TargetModel} target - * @param {HostSetModel} hostSet - */ - @action - @loading - @confirm('questions.remove-confirm') - @notifyError(({ message }) => message, { catch: true }) - @notifySuccess('notifications.remove-success') - async removeHostSet(target, hostSet) { - await target.removeHostSet(hostSet.id); - this.refresh(); - } -} diff --git a/ui/core/app/routes/scopes/scope/projects/project/targets/target/host-sets/host-set.js b/ui/core/app/routes/scopes/scope/projects/project/targets/target/host-sets/host-set.js deleted file mode 100644 index e7843fca7..000000000 --- a/ui/core/app/routes/scopes/scope/projects/project/targets/target/host-sets/host-set.js +++ /dev/null @@ -1,3 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class ScopesScopeProjectsProjectTargetsTargetHostSetsHostSetRoute extends Route {} diff --git a/ui/core/app/routes/scopes/scope/projects/project/targets/target/host-sets/index.js b/ui/core/app/routes/scopes/scope/projects/project/targets/target/host-sets/index.js deleted file mode 100644 index 80a35e875..000000000 --- a/ui/core/app/routes/scopes/scope/projects/project/targets/target/host-sets/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class ScopesScopeProjectsProjectTargetsTargetHostSetsIndexRoute extends Route {} diff --git a/ui/core/app/routes/scopes/scope/projects/project/targets/target/index.js b/ui/core/app/routes/scopes/scope/projects/project/targets/target/index.js deleted file mode 100644 index 3eb6dfa5f..000000000 --- a/ui/core/app/routes/scopes/scope/projects/project/targets/target/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class ScopesScopeProjectsProjectTargetsTargetIndexRoute extends Route {} diff --git a/ui/core/app/templates/scopes/scope.hbs b/ui/core/app/templates/scopes/scope.hbs index 75c531af1..ec91c3722 100644 --- a/ui/core/app/templates/scopes/scope.hbs +++ b/ui/core/app/templates/scopes/scope.hbs @@ -5,7 +5,7 @@ {{#if @model.isGlobal}} - + @@ -16,7 +16,7 @@ {{#if @model.isOrg}} - + @@ -25,7 +25,51 @@ {{/if}} - {{outlet "sidebar"}} + {{#unless @model.isProject}} + + + + {{t "resources.user.title_plural"}} + + + + {{t "resources.group.title_plural"}} + + + + {{t "resources.role.title_plural"}} + + + + {{t "resources.auth-method.title_plural"}} + + + {{/unless}} + + {{#if @model.isProject}} + + + + {{t "resources.group.title_plural"}} + + + + {{t "resources.role.title_plural"}} + + + {{/if}} {{/if}} diff --git a/ui/core/app/templates/scopes/scope/orgs.hbs b/ui/core/app/templates/scopes/scope/orgs.hbs deleted file mode 100644 index 0f9dd522a..000000000 --- a/ui/core/app/templates/scopes/scope/orgs.hbs +++ /dev/null @@ -1,3 +0,0 @@ -{{title (t "resources.org.title_plural")}} - -{{outlet}} diff --git a/ui/core/app/templates/scopes/scope/orgs/index.hbs b/ui/core/app/templates/scopes/scope/orgs/index.hbs deleted file mode 100644 index 7218551bb..000000000 --- a/ui/core/app/templates/scopes/scope/orgs/index.hbs +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - -

- {{t "resources.org.title_plural"}} - -

- {{#if @model}} -

{{t "resources.org.description"}}

- {{/if}} -
- - - {{#if @model}} - - {{t 'titles.new'}} - - {{/if}} - - - - - {{#if @model}} - - - {{#each @model as |org|}} - - {{/each}} - - - {{else}} - - - - - {{t 'resources.org.description'}} - - - - {{t 'titles.new'}} - - - - - {{/if}} - - - -
diff --git a/ui/core/app/templates/scopes/scope/orgs/new.hbs b/ui/core/app/templates/scopes/scope/orgs/new.hbs deleted file mode 100644 index 390f0f04b..000000000 --- a/ui/core/app/templates/scopes/scope/orgs/new.hbs +++ /dev/null @@ -1,24 +0,0 @@ -{{title (t 'titles.new')}} - - - - - - - - -

- {{t "titles.new"}} - -

-
- - - - - -
diff --git a/ui/core/app/templates/scopes/scope/projects.hbs b/ui/core/app/templates/scopes/scope/projects.hbs deleted file mode 100644 index dd40ba6c8..000000000 --- a/ui/core/app/templates/scopes/scope/projects.hbs +++ /dev/null @@ -1,3 +0,0 @@ -{{title (t "resources.project.title_plural")}} - -{{outlet}} diff --git a/ui/core/app/templates/scopes/scope/projects/index.hbs b/ui/core/app/templates/scopes/scope/projects/index.hbs deleted file mode 100644 index 2c220f15b..000000000 --- a/ui/core/app/templates/scopes/scope/projects/index.hbs +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - -

- {{t "resources.project.title_plural"}} - -

- {{#if @model}} -

{{t "resources.project.description"}}

- {{/if}} -
- - - {{#if @model}} - - {{t 'titles.new'}} - - {{/if}} - - - - - {{#if @model}} - - - {{#each @model as |project|}} - - {{/each}} - - - {{else}} - - - - - {{t 'resources.project.description'}} - - - - {{t 'titles.new'}} - - - - - {{/if}} - - - -
diff --git a/ui/core/app/templates/scopes/scope/projects/new.hbs b/ui/core/app/templates/scopes/scope/projects/new.hbs deleted file mode 100644 index 0e9dedf59..000000000 --- a/ui/core/app/templates/scopes/scope/projects/new.hbs +++ /dev/null @@ -1,24 +0,0 @@ -{{title (t 'titles.new')}} - - - - - - - - -

- {{t "titles.new"}} - -

-
- - - - - -
diff --git a/ui/core/app/templates/scopes/scope/projects/project.hbs b/ui/core/app/templates/scopes/scope/projects/project.hbs deleted file mode 100644 index d66e83390..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project.hbs +++ /dev/null @@ -1,3 +0,0 @@ -{{title @model.displayName}} - -{{outlet}} diff --git a/ui/core/app/templates/scopes/scope/projects/project/-sidebar.hbs b/ui/core/app/templates/scopes/scope/projects/project/-sidebar.hbs deleted file mode 100644 index e82349443..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/-sidebar.hbs +++ /dev/null @@ -1,20 +0,0 @@ - - - - {{t "resources.session.title_plural"}} - - - - {{t "resources.target.title_plural"}} - - - - {{t "resources.host-catalog.title_plural"}} - - diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs.hbs deleted file mode 100644 index abbb6702e..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs.hbs +++ /dev/null @@ -1,3 +0,0 @@ -{{title (t "resources.host-catalog.title_plural")}} - -{{outlet}} diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog.hbs deleted file mode 100644 index 271a98d73..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog.hbs +++ /dev/null @@ -1,25 +0,0 @@ -{{title @model.displayName}} - - - - - - - - - {{outlet "header"}} - - - - {{outlet "actions"}} - - - - {{outlet "navigation"}} - - - - {{outlet}} - - - diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/-actions.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/-actions.hbs deleted file mode 100644 index 96af1687a..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/-actions.hbs +++ /dev/null @@ -1,22 +0,0 @@ - - - {{t "resources.host.actions.create"}} - - - {{t "resources.host-set.actions.create"}} - - - - {{t "resources.host-catalog.actions.delete"}} - - diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/-header.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/-header.hbs deleted file mode 100644 index 58e6f4b02..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/-header.hbs +++ /dev/null @@ -1,12 +0,0 @@ -

- {{t "resources.host-catalog.title"}} - -

-

{{t "resources.host-catalog.description"}}

- - {{@model.id}} - diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/-navigation.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/-navigation.hbs deleted file mode 100644 index 5be44792b..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/-navigation.hbs +++ /dev/null @@ -1,11 +0,0 @@ - - - {{t 'titles.details'}} - - - {{t 'resources.host-set.title_plural'}} - - - {{t 'resources.host.title_plural'}} - - diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets.hbs deleted file mode 100644 index 37ecd2d33..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets.hbs +++ /dev/null @@ -1,3 +0,0 @@ -{{title (t "resources.host-set.title_plural")}} - -{{outlet}} \ No newline at end of file diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set.hbs deleted file mode 100644 index d66e83390..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set.hbs +++ /dev/null @@ -1,3 +0,0 @@ -{{title @model.displayName}} - -{{outlet}} diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/-actions.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/-actions.hbs deleted file mode 100644 index 2eb61121a..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/-actions.hbs +++ /dev/null @@ -1,16 +0,0 @@ - - - {{t 'resources.host-set.actions.create-host'}} - - - {{t 'resources.host-set.actions.add-hosts'}} - - - - {{t 'resources.host-set.actions.delete'}} - - diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/-header.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/-header.hbs deleted file mode 100644 index a101b0a8a..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/-header.hbs +++ /dev/null @@ -1,12 +0,0 @@ -

- {{t "resources.host-set.title"}} - -

-

{{t "resources.host-set.description"}}

- - {{@model.id}} - diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/-navigation.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/-navigation.hbs deleted file mode 100644 index 93590ba90..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/-navigation.hbs +++ /dev/null @@ -1,8 +0,0 @@ - - - {{t 'titles.details'}} - - - {{t 'resources.host.title_plural'}} - - diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/add-hosts.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/add-hosts.hbs deleted file mode 100644 index b185f9550..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/add-hosts.hbs +++ /dev/null @@ -1,8 +0,0 @@ -{{title (t "resources.host-set.actions.add-hosts")}} - - diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/add-hosts/-header.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/add-hosts/-header.hbs deleted file mode 100644 index 6ff650141..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/add-hosts/-header.hbs +++ /dev/null @@ -1,5 +0,0 @@ -

- {{t "resources.host-set.host.messages.add.title"}} - -

-

{{t "resources.host-set.host.messages.add.description"}}

diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/create-host.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/create-host.hbs deleted file mode 100644 index 455daa19b..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/create-host.hbs +++ /dev/null @@ -1,7 +0,0 @@ -{{title (t 'resources.host-set.actions.create-host')}} - - \ No newline at end of file diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/create-host/-header.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/create-host/-header.hbs deleted file mode 100644 index c8ea81660..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/create-host/-header.hbs +++ /dev/null @@ -1,4 +0,0 @@ -

- {{t "resources.host-set.actions.create-host"}} - -

diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/hosts.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/hosts.hbs deleted file mode 100644 index 50b35d364..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/hosts.hbs +++ /dev/null @@ -1,71 +0,0 @@ -{{#if @model.hosts}} - - - - - {{t "form.name.label"}} - {{t "form.type.label"}} - {{t "form.id.label"}} - {{t "titles.actions"}} - - - - {{#each @model.hosts as |host|}} - - - - {{host.displayName}} - -

{{host.description}}

-
- - {{host.type}} - - - - {{host.id}} - - - - - - {{t "actions.remove"}} - - - -
- {{/each}} -
-
- -{{/if}} - -{{#unless @model.hosts}} - - - - {{t "resources.host-set.host.messages.none.description"}} - - - - {{t "resources.host-set.actions.create-host"}} - - - -{{/unless}} diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/index.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/index.hbs deleted file mode 100644 index ac0b64897..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/index.hbs +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/index.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/index.hbs deleted file mode 100644 index bb5f4c14c..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/index.hbs +++ /dev/null @@ -1,56 +0,0 @@ -{{#if @model}} - - - - - {{t "form.name.label"}} - {{t "form.type.label"}} - {{t "form.id.label"}} - - - - {{#each @model as |hostSet|}} - - - - {{hostSet.displayName}} - -

{{hostSet.description}}

-
- - - {{t (concat 'resources.host-set.types.' hostSet.type)}} - - - - - {{hostSet.id}} - - -
- {{/each}} -
-
- -{{else}} - - - - - {{t "resources.host-set.description"}} - - - - {{t "titles.new"}} - - - - -{{/if}} diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new.hbs deleted file mode 100644 index 1d5d73000..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new.hbs +++ /dev/null @@ -1,7 +0,0 @@ -{{title (t 'titles.new')}} - - \ No newline at end of file diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new/-header.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new/-header.hbs deleted file mode 100644 index 38ae01334..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new/-header.hbs +++ /dev/null @@ -1,4 +0,0 @@ -

- {{t "titles.new"}} - -

diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts.hbs deleted file mode 100644 index aff384fe4..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts.hbs +++ /dev/null @@ -1,3 +0,0 @@ -{{title (t "resources.host.title_plural")}} - -{{outlet}} \ No newline at end of file diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host.hbs deleted file mode 100644 index d66e83390..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host.hbs +++ /dev/null @@ -1,3 +0,0 @@ -{{title @model.displayName}} - -{{outlet}} diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/-actions.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/-actions.hbs deleted file mode 100644 index 4c9a91aa3..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/-actions.hbs +++ /dev/null @@ -1,9 +0,0 @@ - - - {{t 'resources.host.actions.delete'}} - - diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/-header.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/-header.hbs deleted file mode 100644 index 7b15e6f0f..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/-header.hbs +++ /dev/null @@ -1,12 +0,0 @@ -

- {{t "resources.host.title"}} - -

-

{{t "resources.host.description"}}

- - {{@model.id}} - diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/-navigation.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/-navigation.hbs deleted file mode 100644 index d79e3afa2..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/-navigation.hbs +++ /dev/null @@ -1,5 +0,0 @@ - - - {{t 'titles.details'}} - - \ No newline at end of file diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/index.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/index.hbs deleted file mode 100644 index 6cc780607..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/index.hbs +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/index.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/index.hbs deleted file mode 100644 index e29e8dca1..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/index.hbs +++ /dev/null @@ -1,60 +0,0 @@ -{{#if @model}} - - - - - {{t "form.name.label"}} - {{t "form.type.label"}} - {{t "form.id.label"}} - {{t "form.address.label"}} - - - - {{#each @model as |host|}} - - - - {{host.displayName}} - -

{{host.description}}

-
- - - {{t (concat 'resources.host.types.' host.type)}} - - - - - {{host.id}} - - - - {{host.attributes.address}} - -
- {{/each}} -
-
- -{{else}} - - - - - {{t "resources.host.description"}} - - - - {{t "titles.new"}} - - - - -{{/if}} diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/new.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/new.hbs deleted file mode 100644 index 29bf7404f..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/new.hbs +++ /dev/null @@ -1,7 +0,0 @@ -{{title (t 'titles.new')}} - - \ No newline at end of file diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/new/-header.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/new/-header.hbs deleted file mode 100644 index 3122f3b43..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/new/-header.hbs +++ /dev/null @@ -1,4 +0,0 @@ -

- {{t "titles.new"}} - -

diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/index.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/index.hbs deleted file mode 100644 index 71bdd4437..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/index.hbs +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/index.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/index.hbs deleted file mode 100644 index 91a17f32d..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/index.hbs +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - -

- {{t "resources.host-catalog.title_plural"}} - -

-

{{t "resources.host-catalog.description"}}

-
- - - {{#if @model}} - - {{t "titles.new"}} - - {{/if}} - - - - - {{#if @model}} - - - - - {{t "form.name.label"}} - {{t "form.type.label"}} - {{t "form.id.label"}} - - - - {{#each @model as |hostCatalog|}} - - - - {{hostCatalog.displayName}} - -

{{hostCatalog.description}}

-
- - - {{t (concat 'resources.host-catalog.types.' hostCatalog.type)}} - - - - - {{hostCatalog.id}} - - -
- {{/each}} -
-
- - {{else}} - - - - - {{t "resources.host-catalog.description"}} - - - - {{t "titles.new"}} - - - - - {{/if}} - -
- -
diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/new.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/new.hbs deleted file mode 100644 index 641fd3ff9..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/new.hbs +++ /dev/null @@ -1,24 +0,0 @@ -{{title (t 'titles.new')}} - - - - - - - - -

- {{t "titles.new"}} - -

-
- - - - - -
diff --git a/ui/core/app/templates/scopes/scope/projects/project/index.hbs b/ui/core/app/templates/scopes/scope/projects/project/index.hbs deleted file mode 100644 index af31fd2e6..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/index.hbs +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - -

- {{t "resources.project.title"}} - -

-

{{t "resources.project.description"}}

- - {{@model.id}} - -
- - - - - {{t 'titles.details'}} - - - - - - - - {{t 'resources.project.actions.delete'}} - - - - - - - - -
diff --git a/ui/core/app/templates/scopes/scope/projects/project/sessions.hbs b/ui/core/app/templates/scopes/scope/projects/project/sessions.hbs deleted file mode 100644 index f7ffb23d4..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/sessions.hbs +++ /dev/null @@ -1,3 +0,0 @@ -{{title (t "resources.session.title_plural")}} - -{{outlet}} diff --git a/ui/core/app/templates/scopes/scope/projects/project/sessions/index.hbs b/ui/core/app/templates/scopes/scope/projects/project/sessions/index.hbs deleted file mode 100644 index 8865b085f..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/sessions/index.hbs +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - -

- {{t "resources.session.title_plural"}} - -

-

{{t "resources.session.description"}}

-
- - - - {{#if @model}} - - - - - {{t "form.id.label"}} - {{t "resources.user.title"}} - {{t "resources.target.title"}} - {{t "form.started.label"}} - {{t "form.status.label"}} - {{t "titles.actions"}} - - - - {{#each @model as |sessionAggregate|}} - - - - - {{sessionAggregate.session.id}} - - - {{sessionAggregate.user.displayName}} - {{sessionAggregate.target.displayName}} - - - - - {{sessionAggregate.session.status}} - - - {{#if sessionAggregate.session.isCancelable}} - - {{t "actions.cancel"}} - - {{/if}} - - - {{/each}} - - - - {{else}} - - - - - {{t "resources.session.messages.none.description"}} - - - - - {{/if}} - - - -
diff --git a/ui/core/app/templates/scopes/scope/projects/project/targets.hbs b/ui/core/app/templates/scopes/scope/projects/project/targets.hbs deleted file mode 100644 index 8b5774916..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/targets.hbs +++ /dev/null @@ -1,3 +0,0 @@ -{{title (t "resources.target.title_plural")}} - -{{outlet}} diff --git a/ui/core/app/templates/scopes/scope/projects/project/targets/index.hbs b/ui/core/app/templates/scopes/scope/projects/project/targets/index.hbs deleted file mode 100644 index 6efba5727..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/targets/index.hbs +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - -

- {{t "resources.target.title_plural"}} - -

- {{#if @model}} -

{{t "resources.target.description"}}

- {{/if}} -
- - - {{#if @model}} - - {{t "titles.new"}} - - {{/if}} - - - - - {{#if @model}} - - - - - {{t "form.name.label"}} - {{t "form.type.label"}} - {{t "form.id.label"}} - - - - {{#each @model as |target|}} - - - - {{target.displayName}} - -

{{target.description}}

-
- - {{#if target.type}} - - {{t (concat "resources.target.types." target.type)}} - - {{/if}} - - - - {{target.id}} - - -
- {{/each}} -
-
- - {{else}} - - - - - {{t "resources.target.description"}} - - - - {{t "titles.new"}} - - - - - {{/if}} - -
- -
diff --git a/ui/core/app/templates/scopes/scope/projects/project/targets/new.hbs b/ui/core/app/templates/scopes/scope/projects/project/targets/new.hbs deleted file mode 100644 index f161f252b..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/targets/new.hbs +++ /dev/null @@ -1,24 +0,0 @@ -{{title (t 'titles.new')}} - - - - - - - - -

- {{t "titles.new"}} - -

-
- - - - - -
diff --git a/ui/core/app/templates/scopes/scope/projects/project/targets/target.hbs b/ui/core/app/templates/scopes/scope/projects/project/targets/target.hbs deleted file mode 100644 index 2a878ff51..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/targets/target.hbs +++ /dev/null @@ -1,25 +0,0 @@ -{{title @model.displayName}} - - - - - - - - - {{outlet "header"}} - - - - {{outlet "navigation"}} - - - - {{outlet "actions"}} - - - - {{outlet}} - - - diff --git a/ui/core/app/templates/scopes/scope/projects/project/targets/target/-actions.hbs b/ui/core/app/templates/scopes/scope/projects/project/targets/target/-actions.hbs deleted file mode 100644 index 46c053cbe..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/targets/target/-actions.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - {{t 'resources.target.actions.add-host-sets'}} - - - - {{t 'resources.target.actions.delete'}} - - diff --git a/ui/core/app/templates/scopes/scope/projects/project/targets/target/-header.hbs b/ui/core/app/templates/scopes/scope/projects/project/targets/target/-header.hbs deleted file mode 100644 index 14e01c1de..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/targets/target/-header.hbs +++ /dev/null @@ -1,12 +0,0 @@ -

- {{t "resources.target.title"}} - -

-

{{t "resources.target.description"}}

- - {{@model.id}} - diff --git a/ui/core/app/templates/scopes/scope/projects/project/targets/target/-navigation.hbs b/ui/core/app/templates/scopes/scope/projects/project/targets/target/-navigation.hbs deleted file mode 100644 index a31f1590c..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/targets/target/-navigation.hbs +++ /dev/null @@ -1,8 +0,0 @@ - - - {{t 'titles.details'}} - - - {{t 'resources.host-set.title_plural'}} - - diff --git a/ui/core/app/templates/scopes/scope/projects/project/targets/target/add-host-sets.hbs b/ui/core/app/templates/scopes/scope/projects/project/targets/target/add-host-sets.hbs deleted file mode 100644 index 15daf752a..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/targets/target/add-host-sets.hbs +++ /dev/null @@ -1,25 +0,0 @@ -{{title (t 'resources.target.actions.add-host-sets')}} - -{{#if @model.hostSets}} - -{{/if}} - -{{#unless @model.hostSets}} - - - - {{t "resources.target.host-set.messages.none.description"}} - - - - {{t "actions.back"}} - - - -{{/unless}} diff --git a/ui/core/app/templates/scopes/scope/projects/project/targets/target/add-host-sets/-header.hbs b/ui/core/app/templates/scopes/scope/projects/project/targets/target/add-host-sets/-header.hbs deleted file mode 100644 index 64fc3df9a..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/targets/target/add-host-sets/-header.hbs +++ /dev/null @@ -1,5 +0,0 @@ -

- {{t "resources.target.host-set.messages.add.title"}} - -

-

{{t "resources.target.host-set.messages.add.description"}}

diff --git a/ui/core/app/templates/scopes/scope/projects/project/targets/target/host-sets.hbs b/ui/core/app/templates/scopes/scope/projects/project/targets/target/host-sets.hbs deleted file mode 100644 index 5e49da20d..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/targets/target/host-sets.hbs +++ /dev/null @@ -1,68 +0,0 @@ -{{title (t "resources.host-set.title_plural")}} - -{{#if @model.hostSets}} - - - - - {{t "form.name.label"}} - {{t "form.type.label"}} - {{t "form.id.label"}} - {{t "titles.actions"}} - - - - {{#each @model.hostSets as |hostSet|}} - - - {{hostSet.model.displayName}} -

{{hostSet.model.description}}

-
- - {{t (concat 'resources.host-set.types.' hostSet.model.type)}} - - - - {{hostSet.model.id}} - - - - - - {{t "actions.remove"}} - - - -
- {{/each}} -
-
- -{{else}} - - - - - {{t "resources.target.host-set.messages.welcome.description"}} - - - - {{t 'resources.target.actions.add-host-sets'}} - - - - -{{/if}} diff --git a/ui/core/app/templates/scopes/scope/projects/project/targets/target/host-sets/host-set.hbs b/ui/core/app/templates/scopes/scope/projects/project/targets/target/host-sets/host-set.hbs deleted file mode 100644 index e2147cab0..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/targets/target/host-sets/host-set.hbs +++ /dev/null @@ -1 +0,0 @@ -{{outlet}} \ No newline at end of file diff --git a/ui/core/app/templates/scopes/scope/projects/project/targets/target/index.hbs b/ui/core/app/templates/scopes/scope/projects/project/targets/target/index.hbs deleted file mode 100644 index 5c39ce009..000000000 --- a/ui/core/app/templates/scopes/scope/projects/project/targets/target/index.hbs +++ /dev/null @@ -1,5 +0,0 @@ - \ No newline at end of file diff --git a/ui/core/tests/acceptance/authentication-test.js b/ui/core/tests/acceptance/authentication-test.js index d8bdb6162..d6c23666f 100644 --- a/ui/core/tests/acceptance/authentication-test.js +++ b/ui/core/tests/acceptance/authentication-test.js @@ -6,7 +6,7 @@ import { click, find, findAll, - setupOnerror, + //setupOnerror, } from '@ember/test-helpers'; import { setupApplicationTest } from 'ember-qunit'; import setupMirage from 'ember-cli-mirage/test-support/setup-mirage'; @@ -72,8 +72,8 @@ module('Acceptance | authentication', function (hooks) { authMethodGlobalAuthenticateURL = `/scopes/global/authenticate/${globalAuthMethodID}`; authMethodAuthenticateURL = `/scopes/${orgScopeID}/authenticate/${authMethodID}`; changePasswordURL = `/account/change-password`; - orgsURL = `/scopes/global/orgs`; - projectsURL = `/scopes/${orgScopeID}/projects`; + orgsURL = `/scopes/global`; + projectsURL = `/scopes/${orgScopeID}`; usersURL = `/scopes/${orgScopeID}/users`; groupsURL = `/scopes/${orgScopeID}/groups`; rolesURL = `/scopes/${orgScopeID}/roles`; @@ -129,10 +129,10 @@ module('Acceptance | authentication', function (hooks) { assert.notOk(currentSession().isAuthenticated); }); - test('visiting projects while unauthenticated redirects to first global authenticate method', async function (assert) { + test('visiting projects while unauthenticated redirects to first org authenticate method', async function (assert) { assert.expect(2); await visit(projectsURL); - assert.equal(currentURL(), authMethodGlobalAuthenticateURL); + assert.equal(currentURL(), authMethodAuthenticateURL); assert.notOk(currentSession().isAuthenticated); }); @@ -263,13 +263,11 @@ module('Acceptance | authentication', function (hooks) { currentSession().isAuthenticated, 'Session begins authenticated, before encountering 401' ); - this.server.get('/scopes', () => new Response(401)); - setupOnerror(() => { - assert.notOk( - currentSession().isAuthenticated, - 'Session is unauthenticated, after encountering 401' - ); - }); - await visit(projectsURL); + this.server.get('/users', () => new Response(401)); + await visit(usersURL); + assert.notOk( + currentSession().isAuthenticated, + 'Session is unauthenticated, after encountering 401' + ); }); }); diff --git a/ui/core/tests/acceptance/bread-crumbs-test.js b/ui/core/tests/acceptance/bread-crumbs-test.js deleted file mode 100644 index 02d7474f2..000000000 --- a/ui/core/tests/acceptance/bread-crumbs-test.js +++ /dev/null @@ -1,249 +0,0 @@ -import { module, test } from 'qunit'; -import { visit, currentURL, click, find, findAll } from '@ember/test-helpers'; -import { setupApplicationTest } from 'ember-qunit'; -import setupMirage from 'ember-cli-mirage/test-support/setup-mirage'; -import { - authenticateSession, - // These are left here intentionally for future reference. - //currentSession, - //invalidateSession, -} from 'ember-simple-auth/test-support'; - -module('Acceptance | breadcrumbs', function (hooks) { - setupApplicationTest(hooks); - setupMirage(hooks); - - let orgScope; - let getProjectScope; - let project; - let hostCatalog; - let user; - let role; - let group; - let projectsURL, projectURL, newProjectURL; - let hostCatalogsURL, hostCatalogURL, newHostCatalogURL; - let usersURL, userURL, newUserURL; - let rolesURL, roleURL, newRoleURL; - let groupsURL, groupURL, newGroupURL; - - let crumbPath; - - hooks.beforeEach(function () { - authenticateSession({}); - orgScope = this.server.create( - 'scope', - { - type: 'org', - }, - 'withChildren' - ); - - getProjectScope = () => - this.server.schema.scopes.where({ type: 'project' }).models[0]; - - project = getProjectScope(); - user = this.server.create('user', { scope: orgScope }); - role = this.server.create('role', { scope: orgScope }); - group = this.server.create('group', { scope: orgScope }); - hostCatalog = this.server.create('host-catalog', { - scope: getProjectScope(), - }); - - projectsURL = `/scopes/${orgScope.id}/projects`; - newProjectURL = `${projectsURL}/new`; - projectURL = `${projectsURL}/${project.id}`; - - rolesURL = `/scopes/${orgScope.id}/roles`; - newRoleURL = `${rolesURL}/new`; - roleURL = `${rolesURL}/${role.id}`; - - groupsURL = `/scopes/${orgScope.id}/groups`; - newGroupURL = `${groupsURL}/new`; - groupURL = `${groupsURL}/${group.id}`; - - usersURL = `/scopes/${orgScope.id}/users`; - newUserURL = `${usersURL}/${user.id}`; - userURL = `${usersURL}/new`; - - hostCatalogsURL = `${projectURL}/host-catalogs`; - newHostCatalogURL = `${hostCatalogsURL}/new`; - hostCatalogURL = `${hostCatalogsURL}/${hostCatalog.id}`; - }); - - test('can navigate via breadcrumbs to projects from project', async function (assert) { - assert.expect(3); - await visit(projectURL); - assert.equal(currentURL(), projectURL, 'We begin on the expected page.'); - crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href) - .pathname; - assert.equal(crumbPath, projectURL, 'Last crumb has expected URL.'); - await click(find('.rose-nav-breadcrumbs-link:first-child')); - assert.equal( - currentURL(), - projectsURL, - 'After navigating via breadcrumbs, we are one level up.' - ); - }); - - test('can navigate via breadcrumbs to projects from new project', async function (assert) { - assert.expect(3); - await visit(newProjectURL); - assert.equal(currentURL(), newProjectURL, 'We begin on the expected page.'); - crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href) - .pathname; - assert.equal(crumbPath, newProjectURL, 'Last crumb has expected URL.'); - await click(find('.rose-nav-breadcrumbs-link:first-child')); - assert.equal( - currentURL(), - projectsURL, - 'After navigating via breadcrumbs, we are one level up.' - ); - }); - - test('can navigate via breadcrumbs to project from host catalogs', async function (assert) { - assert.expect(3); - await visit(hostCatalogsURL); - assert.equal( - currentURL(), - hostCatalogsURL, - 'We begin on the expected page.' - ); - crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href) - .pathname; - assert.equal(crumbPath, hostCatalogsURL, 'Last crumb has expected URL.'); - await click(findAll('.rose-nav-breadcrumbs-link')[1]); - assert.equal( - currentURL(), - projectURL, - 'After navigating via breadcrumbs, we are one level up.' - ); - }); - - test('can navigate via breadcrumbs to host catalogs from host catalog', async function (assert) { - assert.expect(3); - await visit(hostCatalogURL); - assert.equal( - currentURL(), - hostCatalogURL, - 'We begin on the expected page.' - ); - crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href) - .pathname; - assert.equal(crumbPath, hostCatalogURL, 'Last crumb has expected URL.'); - await click(findAll('.rose-nav-breadcrumbs-link')[2]); - assert.equal( - currentURL(), - hostCatalogsURL, - 'After navigating via breadcrumbs, we are one level up.' - ); - }); - - test('can navigate via breadcrumbs to host catalogs from new host catalog', async function (assert) { - assert.expect(3); - await visit(newHostCatalogURL); - assert.equal( - currentURL(), - newHostCatalogURL, - 'We begin on the expected page.' - ); - crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href) - .pathname; - assert.equal(crumbPath, newHostCatalogURL, 'Last crumb has expected URL.'); - await click(findAll('.rose-nav-breadcrumbs-link')[2]); - assert.equal( - currentURL(), - hostCatalogsURL, - 'After navigating via breadcrumbs, we are one level up.' - ); - }); - - test('can navigate via breadcrumbs to roles from role', async function (assert) { - assert.expect(3); - await visit(roleURL); - assert.equal(currentURL(), roleURL, 'We begin on the expected page.'); - crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href) - .pathname; - assert.equal(crumbPath, roleURL, 'Last crumb has expected URL.'); - await click(find('.rose-nav-breadcrumbs-link:first-child')); - assert.equal( - currentURL(), - rolesURL, - 'After navigating via breadcrumbs, we are one level up.' - ); - }); - - test('can navigate via breadcrumbs to roles from new role', async function (assert) { - assert.expect(3); - await visit(newRoleURL); - assert.equal(currentURL(), newRoleURL, 'We begin on the expected page.'); - crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href) - .pathname; - assert.equal(crumbPath, newRoleURL, 'Last crumb has expected URL.'); - await click(find('.rose-nav-breadcrumbs-link:first-child')); - assert.equal( - currentURL(), - rolesURL, - 'After navigating via breadcrumbs, we are one level up.' - ); - }); - - test('can navigate via breadcrumbs to groups from group', async function (assert) { - assert.expect(3); - await visit(groupURL); - assert.equal(currentURL(), groupURL, 'We begin on the expected page.'); - crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href) - .pathname; - assert.equal(crumbPath, groupURL, 'Last crumb has expected URL.'); - await click(find('.rose-nav-breadcrumbs-link:first-child')); - assert.equal( - currentURL(), - groupsURL, - 'After navigating via breadcrumbs, we are one level up.' - ); - }); - - test('can navigate via breadcrumbs to groups from new group', async function (assert) { - assert.expect(3); - await visit(newGroupURL); - assert.equal(currentURL(), newGroupURL, 'We begin on the expected page.'); - crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href) - .pathname; - assert.equal(crumbPath, newGroupURL, 'Last crumb has expected URL.'); - await click(find('.rose-nav-breadcrumbs-link:first-child')); - assert.equal( - currentURL(), - groupsURL, - 'After navigating via breadcrumbs, we are one level up.' - ); - }); - - test('can navigate via breadcrumbs to users from user', async function (assert) { - assert.expect(3); - await visit(userURL); - assert.equal(currentURL(), userURL, 'We begin on the expected page.'); - crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href) - .pathname; - assert.equal(crumbPath, userURL, 'Last crumb has expected URL.'); - await click(find('.rose-nav-breadcrumbs-link:first-child')); - assert.equal( - currentURL(), - usersURL, - 'After navigating via breadcrumbs, we are one level up.' - ); - }); - - test('can navigate via breadcrumbs to users from new user', async function (assert) { - assert.expect(3); - await visit(newUserURL); - assert.equal(currentURL(), newUserURL, 'We begin on th expected page.'); - crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href) - .pathname; - assert.equal(crumbPath, newUserURL, 'Last crumb has expected URL.'); - await click(find('.rose-nav-breadcrumbs-link:first-child')); - assert.equal( - currentURL(), - usersURL, - 'After navigating via breadcrumbs, we are one level up.' - ); - }); -}); diff --git a/ui/core/tests/acceptance/host-catalogs-test.js b/ui/core/tests/acceptance/host-catalogs-test.js deleted file mode 100644 index bcb07a0a3..000000000 --- a/ui/core/tests/acceptance/host-catalogs-test.js +++ /dev/null @@ -1,217 +0,0 @@ -import { module, test } from 'qunit'; -import { visit, currentURL, fillIn, click, find } from '@ember/test-helpers'; -import { setupApplicationTest } from 'ember-qunit'; -import setupMirage from 'ember-cli-mirage/test-support/setup-mirage'; -import a11yAudit from 'ember-a11y-testing/test-support/audit'; -import { Response } from 'miragejs'; -import { - authenticateSession, - // These are left here intentionally for future reference. - //currentSession, - //invalidateSession, -} from 'ember-simple-auth/test-support'; - -module('Acceptance | host catalogs', function (hooks) { - setupApplicationTest(hooks); - setupMirage(hooks); - - const instances = { - scopes: { - global: null, - org: null, - project: null, - }, - hostCatalog: null, - }; - const urls = { - orgScope: null, - projects: null, - project: null, - hostCatalogs: null, - newHostCatalog: null, - hostCatalog: null, - }; - - hooks.beforeEach(function () { - // Setup Mirage mock resources for this test - authenticateSession(); - instances.scopes.global = this.server.create('scope', { id: 'global' }); - instances.scopes.org = this.server.create('scope', { - type: 'org', - scope: { id: 'global', type: 'global' }, - }); - instances.scopes.project = this.server.create('scope', { - type: 'project', - scope: { id: instances.scopes.org.id, type: 'org' }, - }); - instances.hostCatalog = this.server.create('host-catalog', { - scope: instances.scopes.project, - }); - - // Generate route URLs for resources - urls.orgScope = `/scopes/${instances.scopes.org.id}`; - urls.projects = `${urls.orgScope}/projects`; - urls.project = `${urls.projects}/${instances.hostCatalog.scope.id}`; - urls.hostCatalogs = `${urls.project}/host-catalogs`; - urls.newHostCatalog = `${urls.hostCatalogs}/new`; - urls.hostCatalog = `${urls.hostCatalogs}/${instances.hostCatalog.id}`; - }); - - test('visiting host catalogs', async function (assert) { - assert.expect(1); - await visit(urls.hostCatalogs); - await a11yAudit(); - assert.equal(currentURL(), urls.hostCatalogs); - }); - - test('can navigate to host catalog form', async function (assert) { - assert.expect(1); - await visit(urls.hostCatalogs); - await click('main tbody .rose-table-header-cell:nth-child(1) a'); - await a11yAudit(); - assert.equal(currentURL(), urls.hostCatalog); - }); - - test('can delete host catalog', async function (assert) { - assert.expect(2); - const hostCatalogsCount = this.server.db.hostCatalogs.length; - await visit(urls.hostCatalog); - assert.equal(currentURL(), urls.hostCatalog); - await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(this.server.db.hostCatalogs.length, hostCatalogsCount - 1); - }); - - test('can update host catalog and save changes', async function (assert) { - assert.expect(1); - await visit(urls.hostCatalog); - await click('form [type="button"]', 'Activate edit mode'); - await fillIn('[name="name"]', 'Test Name'); - await click('form [type="submit"]:not(:disabled)'); - assert.equal(this.server.db.hostCatalogs[0].name, 'Test Name'); - }); - - test('can update host catalog and cancel changes', async function (assert) { - assert.expect(1); - await visit(urls.hostCatalog); - await click('form [type="button"]', 'Activate edit mode'); - await fillIn('[name="name"]', 'Test Name'); - await click('form button:not([type="submit"])'); - assert.notEqual(this.server.db.hostCatalogs[0].name, 'Test Name'); - }); - - test('can create host catalog and save changes', async function (assert) { - assert.expect(1); - const hostCatalogsCount = this.server.db.hostCatalogs.length; - await visit(urls.newHostCatalog); - await fillIn('[name="name"]', 'Test Name'); - await click('form [type="submit"]:not(:disabled)'); - assert.equal(this.server.db.hostCatalogs.length, hostCatalogsCount + 1); - }); - - test('can create host catalog and cancel changes', async function (assert) { - assert.expect(1); - const hostCatalogsCount = this.server.db.hostCatalogs.length; - await visit(urls.newHostCatalog); - await fillIn('[name="name"]', 'Test Name'); - await click('form button:not([type="submit"])'); - assert.equal(this.server.db.hostCatalogs.length, hostCatalogsCount); - }); - - test('errors are displayed when delete host catalog fails', async function (assert) { - assert.expect(1); - this.server.del('/host-catalogs/:id', () => { - return new Response( - 490, - {}, - { - status: 490, - code: 'error', - message: 'Oops.', - } - ); - }); - await visit(urls.hostCatalog); - await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - await a11yAudit(); - assert.ok( - find('[role="alert"]').textContent.trim(), - 'Oops.', - 'Displays primary error message.' - ); - }); - - test('saving a new host catalog with invalid fields displays error messages', async function (assert) { - assert.expect(2); - this.server.post('/host-catalogs', () => { - return new Response( - 400, - {}, - { - status: 400, - code: 'invalid_argument', - message: 'The request was invalid.', - details: { - request_fields: [ - { - name: 'name', - description: 'Name is required.', - }, - ], - }, - } - ); - }); - await visit(urls.newHostCatalog); - await fillIn('[name="name"]', 'random string'); - await click('form [type="submit"]'); - await a11yAudit(); - assert.ok( - find('[role="alert"]').textContent.trim(), - 'The request was invalid.', - 'Displays primary error message.' - ); - assert.ok( - find('.rose-form-error-message').textContent.trim(), - 'Name is required.', - 'Displays field-level errors.' - ); - }); - - test('saving an existing host catalog with invalid fields displays error messages', async function (assert) { - assert.expect(2); - this.server.patch('/host-catalogs/:id', () => { - return new Response( - 400, - {}, - { - status: 400, - code: 'invalid_argument', - message: 'The request was invalid.', - details: { - request_fields: [ - { - name: 'name', - description: 'Name is required.', - }, - ], - }, - } - ); - }); - await visit(urls.hostCatalog); - await click('form [type="button"]', 'Activate edit mode'); - await fillIn('[name="name"]', 'random string'); - await click('form [type="submit"]'); - await a11yAudit(); - assert.ok( - find('[role="alert"]').textContent.trim(), - 'The request was invalid.', - 'Displays primary error message.' - ); - assert.ok( - find('.rose-form-error-message').textContent.trim(), - 'Name is required.', - 'Displays field-level errors.' - ); - }); -}); diff --git a/ui/core/tests/acceptance/host-sets-test.js b/ui/core/tests/acceptance/host-sets-test.js deleted file mode 100644 index 1b69b06a3..000000000 --- a/ui/core/tests/acceptance/host-sets-test.js +++ /dev/null @@ -1,203 +0,0 @@ -import { module, test } from 'qunit'; -import { visit, currentURL, fillIn, click, find, findAll } from '@ember/test-helpers'; -import { setupApplicationTest } from 'ember-qunit'; -import setupMirage from 'ember-cli-mirage/test-support/setup-mirage'; -import a11yAudit from 'ember-a11y-testing/test-support/audit'; -import { Response } from 'miragejs'; -import { - authenticateSession, - // These are left here intentionally for future reference. - //currentSession, - //invalidateSession, -} from 'ember-simple-auth/test-support'; - -module('Acceptance | host sets', function (hooks) { - setupApplicationTest(hooks); - setupMirage(hooks); - - const instances = { - scopes: { - global: null, - org: null, - project: null, - }, - hostCatalog: null, - hostSet: null, - }; - const urls = { - orgScope: null, - projects: null, - project: null, - hostCatalogs: null, - hostCatalog: null, - hostSets: null, - hostSet: null, - newHostSet: null - }; - - hooks.beforeEach(function () { - // Setup Mirage mock resources for this test - authenticateSession(); - instances.scopes.global = this.server.create('scope', { id: 'global' }); - instances.scopes.org = this.server.create('scope', { - type: 'org', - scope: { id: 'global', type: 'global' }, - }); - instances.scopes.project = this.server.create('scope', { - type: 'project', - scope: { id: instances.scopes.org.id, type: 'org' }, - }); - instances.hostCatalog = this.server.create('host-catalog', { - scope: instances.scopes.project, - }); - instances.hostSet = this.server.create('host-set', { - scope: instances.scopes.project, - hostCatalog: instances.hostCatalog - }); - // Generate route URLs for resources - urls.orgScope = `/scopes/${instances.scopes.org.id}`; - urls.projects = `${urls.orgScope}/projects`; - urls.project = `${urls.projects}/${instances.hostCatalog.scope.id}`; - urls.hostCatalogs = `${urls.project}/host-catalogs`; - urls.hostCatalog = `${urls.hostCatalogs}/${instances.hostCatalog.id}`; - urls.hostSets = `${urls.hostCatalog}/host-sets`; - urls.hostSet = `${urls.hostSets}/${instances.hostSet.id}`; - urls.newHostSet = `${urls.hostSets}/new`; - }); - - test('visiting a host set', async function (assert) { - assert.expect(1); - await visit(urls.hostSet); - await a11yAudit(); - assert.equal(currentURL(), urls.hostSet); - }); - - test('can update a host set and save changes', async function (assert) { - assert.expect(3); - await visit(urls.hostSet); - await click('form [type="button"]', 'Activate edit mode'); - await fillIn('[name="name"]', 'Updated name'); - await fillIn('[name="description"]', 'Updated description'); - await click('.rose-form-actions [type="submit"]'); - assert.equal(currentURL(), urls.hostSet); - assert.equal(this.server.db.hostSets[0].name, 'Updated name'); - assert.equal(this.server.db.hostSets[0].description, 'Updated description'); - }); - - test('can update a host set and cancel changes', async function (assert) { - assert.expect(1); - await visit(urls.hostSet); - await click('form [type="button"]', 'Activate edit mode'); - await fillIn('[name="name"]', 'Updated name'); - await click('.rose-form-actions [type="button"]'); - assert.notEqual(find('[name="name"]').value, 'Updated name'); - }); - - test('can delete host set', async function (assert) { - assert.expect(2); - const hostSetsCount = this.server.db.hostSets.length; - await visit(urls.hostSet); - await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(currentURL(), urls.hostSets); - assert.equal(this.server.db.hostSets.length, hostSetsCount - 1); - }); - - test('saving an existing host set with invalid fields displays error messages', async function (assert) { - assert.expect(2); - this.server.patch('/host-sets/:id', () => { - return new Response( - 400, - {}, - { - status: 400, - code: 'invalid_argument', - message: 'The request was invalid.', - details: { - request_fields: [ - { - name: 'name', - description: 'Name is required.', - }, - ], - }, - } - ); - }); - await visit(urls.hostSet); - await click('form [type="button"]', 'Activate edit mode'); - await fillIn('[name="name"]', 'existing host'); - await click('[type="submit"]'); - await a11yAudit(); - assert.ok(find('[role="alert"]')); - assert.ok(find('.rose-form-error-message')); - }); - - test('errors are displayed when delete on a host set fails', async function (assert) { - assert.expect(1); - this.server.del('/host-sets/:id', () => { - return new Response( - 490, - {}, - { - status: 490, - code: 'error', - message: 'Oops.', - } - ); - }); - await visit(urls.hostSet); - await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - await a11yAudit(); - assert.ok(find('[role="alert"]')); - }); - - test('can create host set and save changes', async function (assert) { - assert.expect(1); - const hostSetsCount = this.server.db.hostSets.length; - await visit(urls.newHostSet); - await fillIn('[name="name"]', 'Test Name'); - await fillIn('[name="description"]', 'description'); - await click('form [type="submit"]:not(:disabled)'); - await visit(urls.hostSets); - assert.equal(findAll('tbody tr').length, hostSetsCount + 1); - }); - - test('can create host set and cancel changes', async function (assert) { - assert.expect(2); - const hostSetsCount = this.server.db.hostSets.length; - await visit(urls.newHostSet); - await fillIn('[name="name"]', 'Test Name'); - await click('form button:not([type="submit"])'); - assert.equal(currentURL(), urls.hostSets); - assert.equal(findAll('tbody tr').length, hostSetsCount); - }); - - test('saving a new host set with invalid fields displays error messages', async function (assert) { - assert.expect(2); - this.server.post('/host-sets', () => { - return new Response( - 400, - {}, - { - status: 400, - code: 'invalid_argument', - message: 'The request was invalid.', - details: { - request_fields: [ - { - name: 'name', - description: 'Name is required.', - }, - ], - }, - } - ); - }); - await visit(urls.newHostSet); - await fillIn('[name="name"]', 'new target'); - await click('form [type="submit"]'); - await a11yAudit(); - assert.ok(find('[role="alert"]')); - assert.ok(find('.rose-form-error-message')); - }); -}); diff --git a/ui/core/tests/acceptance/host-sets/hosts-test.js b/ui/core/tests/acceptance/host-sets/hosts-test.js deleted file mode 100644 index f7ca0eb8b..000000000 --- a/ui/core/tests/acceptance/host-sets/hosts-test.js +++ /dev/null @@ -1,235 +0,0 @@ -import { module, test } from 'qunit'; -import { visit, currentURL, click, find, findAll, fillIn } from '@ember/test-helpers'; -import { setupApplicationTest } from 'ember-qunit'; -import setupMirage from 'ember-cli-mirage/test-support/setup-mirage'; -import a11yAudit from 'ember-a11y-testing/test-support/audit'; -import { Response } from 'miragejs'; -import { - authenticateSession, - // These are left here intentionally for future reference. - //currentSession, - //invalidateSession, -} from 'ember-simple-auth/test-support'; - -module('Acceptance | host-sets | hosts', function (hooks) { - setupApplicationTest(hooks); - setupMirage(hooks); - - const instances = { - scopes: { - global: null, - org: null, - project: null, - }, - hostCatalog: null, - hostSet: null, - }; - const urls = { - orgScope: null, - projects: null, - project: null, - hostCatalogs: null, - hostCatalog: null, - hostSets: null, - hostSet: null, - hostSetHosts: null, - addHosts: null, - newHost: null, - }; - let hostSetHostsCount; - - hooks.beforeEach(function () { - // Setup Mirage mock resources for this test - authenticateSession(); - instances.scopes.global = this.server.create('scope', { id: 'global' }); - instances.scopes.org = this.server.create('scope', { - type: 'org', - scope: { id: 'global', type: 'global' }, - }); - instances.scopes.project = this.server.create('scope', { - type: 'project', - scope: { id: instances.scopes.org.id, type: 'org' }, - }); - instances.hostCatalog = this.server.create('host-catalog', { - scope: instances.scopes.project, - }, 'withChildren'); - instances.hostSet = this.server.schema.hostSets.all().models[0]; - // Generate route URLs for resources - urls.orgScope = `/scopes/${instances.scopes.org.id}`; - urls.projects = `${urls.orgScope}/projects`; - urls.project = `${urls.projects}/${instances.hostCatalog.scope.id}`; - urls.hostCatalogs = `${urls.project}/host-catalogs`; - urls.hostCatalog = `${urls.hostCatalogs}/${instances.hostCatalog.id}`; - urls.hostSets = `${urls.hostCatalog}/host-sets`; - urls.hostSet = `${urls.hostSets}/${instances.hostSet.id}`; - urls.hostSetHosts = `${urls.hostSet}/hosts`; - urls.addHosts = `${urls.hostSet}/add-hosts`; - urls.newHost = `${urls.hostSet}/create-host`; - // Counts - hostSetHostsCount = instances.hostSet.hosts.length; - }); - - test('visiting host set hosts', async function (assert) { - assert.expect(2); - await visit(urls.hostSetHosts); - await a11yAudit(); - assert.equal(currentURL(), urls.hostSetHosts); - assert.equal(findAll('tbody tr').length, hostSetHostsCount); - }); - - test('can remove a host', async function (assert) { - assert.expect(2); - await visit(urls.hostSetHosts); - assert.equal(findAll('tbody tr').length, hostSetHostsCount); - await click('tbody tr .rose-dropdown-button-danger'); - assert.equal(findAll('tbody tr').length, hostSetHostsCount - 1); - }); - - test('shows error message on host remove error', async function (assert) { - assert.expect(2); - this.server.post('/host-sets/:idMethod', () => { - return new Response( - 400, - {}, - { - status: 400, - code: 'invalid_argument', - message: 'The request was invalid.', - details: {}, - } - ); - }); - await visit(urls.hostSetHosts); - assert.equal(findAll('tbody tr').length, hostSetHostsCount); - await click('tbody tr .rose-dropdown-button-danger'); - assert.ok(find('[role="alert"]')); - }); - - test('visiting add hosts', async function(assert) { - assert.expect(1); - await visit(urls.addHosts); - await a11yAudit(); - assert.equal(currentURL(), urls.addHosts); - }); - - test('select and save hosts to add', async function (assert) { - assert.expect(3); - instances.hostSet.update({ hostIds: [] }); - await visit(urls.hostSetHosts); - assert.equal(findAll('tbody tr').length, 0); - await click('.rose-layout-page-actions a:nth-child(2)') - assert.equal(currentURL(), urls.addHosts); - // Click three times to select, unselect, then reselect (for coverage) - await click('tbody label'); - await click('tbody label'); - await click('tbody label'); - await click('form [type="submit"]'); - await visit(urls.hostSetHosts); - assert.equal(findAll('tbody tr').length, 1); - }); - - test('select and cancel hosts to add', async function (assert) { - assert.expect(4); - await visit(urls.hostSetHosts); - assert.equal(findAll('tbody tr').length, hostSetHostsCount); - await click('tbody tr .rose-dropdown-button-danger'); - assert.equal(findAll('tbody tr').length, hostSetHostsCount - 1); - await click('.rose-layout-page-actions a:nth-child(2)') - assert.equal(currentURL(), urls.addHosts); - await click('tbody label'); - await click('form [type="button"]'); - await visit(urls.hostSetHosts); - assert.equal(findAll('tbody tr').length, hostSetHostsCount - 1); - }); - - test('shows error message on host add error', async function (assert) { - assert.expect(1); - this.server.post('/host-sets/:idMethod', () => { - return new Response( - 400, - {}, - { - status: 400, - code: 'invalid_argument', - message: 'The request was invalid.', - details: {}, - } - ); - }); - instances.hostSet.update({ hostIds: [] }); - await visit(urls.addHosts); - await click('tbody label'); - await click('form [type="submit"]'); - assert.ok(find('[role="alert"]')); - }); - - test('visiting host creation from a host set', async function (assert) { - assert.expect(1); - await visit(urls.newHost); - await a11yAudit(); - assert.equal(currentURL(), urls.newHost); - }); - - test('create and add host to host set', async function (assert) { - assert.expect(3); - instances.hostSet.update({ hostIds: [] }); - await visit(urls.hostSet); - assert.equal(findAll('tbody tr').length, 0); - await click('.rose-layout-page-actions a:nth-child(1)') - assert.equal(currentURL(), urls.newHost); - await fillIn('[name="name"]', 'Test Name'); - await fillIn('[name="description"]', 'description'); - await click('form [type="submit"]:not(:disabled)'); - await visit(urls.hostSetHosts); - assert.equal(findAll('tbody tr').length, 1); - }); - - test('create and cancel host add to host set', async function (assert) { - assert.expect(1); - await visit(urls.newHost); - await click('form [type="button"]'); - assert.equal(currentURL(), urls.hostSetHosts); - }); - - test('shows error message on host creation error', async function (assert) { - assert.expect(1); - this.server.post('/hosts', () => { - return new Response( - 400, - {}, - { - status: 400, - code: 'invalid_argument', - message: 'The request was invalid.', - details: {}, - } - ); - }); - instances.hostSet.update({ hostIds: [] }); - await visit(urls.newHost); - await fillIn('[name="name"]', 'New Host'); - await click('form [type="submit"]'); - assert.ok(find('[role="alert"]')); - }); - - test('shows error message on host addition to host set error', async function (assert) { - assert.expect(1); - this.server.post('/host-sets/:idMethod', () => { - return new Response( - 400, - {}, - { - status: 400, - code: 'invalid_argument', - message: 'The request was invalid.', - details: {}, - } - ); - }); - instances.hostSet.update({ hostIds: [] }); - await visit(urls.newHost); - await fillIn('[name="name"]', 'New Host'); - await click('form [type="submit"]'); - assert.ok(find('[role="alert"]')); - }); -}); diff --git a/ui/core/tests/acceptance/hosts-test.js b/ui/core/tests/acceptance/hosts-test.js deleted file mode 100644 index d04904da9..000000000 --- a/ui/core/tests/acceptance/hosts-test.js +++ /dev/null @@ -1,205 +0,0 @@ -import { module, test } from 'qunit'; -import { visit, currentURL, fillIn, click, find, findAll } from '@ember/test-helpers'; -import { setupApplicationTest } from 'ember-qunit'; -import setupMirage from 'ember-cli-mirage/test-support/setup-mirage'; -import a11yAudit from 'ember-a11y-testing/test-support/audit'; -import { Response } from 'miragejs'; -import { - authenticateSession, - // These are left here intentionally for future reference. - //currentSession, - //invalidateSession, -} from 'ember-simple-auth/test-support'; - -module('Acceptance | hosts', function (hooks) { - setupApplicationTest(hooks); - setupMirage(hooks); - - const instances = { - scopes: { - global: null, - org: null, - project: null, - }, - hostCatalog: null, - host: null, - }; - const urls = { - orgScope: null, - projects: null, - project: null, - hostCatalogs: null, - hostCatalog: null, - hosts: null, - host: null, - newHost: null - }; - - hooks.beforeEach(function () { - // Setup Mirage mock resources for this test - authenticateSession(); - instances.scopes.global = this.server.create('scope', { id: 'global' }); - instances.scopes.org = this.server.create('scope', { - type: 'org', - scope: { id: 'global', type: 'global' }, - }); - instances.scopes.project = this.server.create('scope', { - type: 'project', - scope: { id: instances.scopes.org.id, type: 'org' }, - }); - instances.hostCatalog = this.server.create('host-catalog', { - scope: instances.scopes.project, - }); - instances.host = this.server.create('host', { - scope: instances.scopes.project, - hostCatalog: instances.hostCatalog - }); - // Generate route URLs for resources - urls.orgScope = `/scopes/${instances.scopes.org.id}`; - urls.projects = `${urls.orgScope}/projects`; - urls.project = `${urls.projects}/${instances.hostCatalog.scope.id}`; - urls.hostCatalogs = `${urls.project}/host-catalogs`; - urls.hostCatalog = `${urls.hostCatalogs}/${instances.hostCatalog.id}`; - urls.hosts = `${urls.hostCatalog}/hosts`; - urls.host = `${urls.hosts}/${instances.host.id}`; - urls.newHost = `${urls.hosts}/new`; - }); - - test('visiting a host', async function (assert) { - assert.expect(1); - await visit(urls.host); - await a11yAudit(); - assert.equal(currentURL(), urls.host); - }); - - test('can update a host and save changes', async function (assert) { - assert.expect(4); - await visit(urls.host); - await click('form [type="button"]', 'Activate edit mode'); - await fillIn('[name="name"]', 'Updated name'); - await fillIn('[name="description"]', 'Updated description'); - await fillIn('[name="address"]', '::1'); - await click('.rose-form-actions [type="submit"]'); - assert.equal(currentURL(), urls.host); - assert.equal(this.server.db.hosts[0].name, 'Updated name'); - assert.equal(this.server.db.hosts[0].description, 'Updated description'); - assert.equal(this.server.db.hosts[0].attributes.address, '::1'); - }); - - test('can update a host and cancel changes', async function (assert) { - assert.expect(1); - await visit(urls.host); - await click('form [type="button"]', 'Activate edit mode'); - await fillIn('[name="name"]', 'Updated name'); - await click('.rose-form-actions [type="button"]'); - assert.notEqual(find('[name="name"]').value, 'Updated name'); - }); - - test('can delete host', async function (assert) { - assert.expect(2); - const hostsCount = this.server.db.hosts.length; - await visit(urls.host); - await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(currentURL(), urls.hosts); - assert.equal(this.server.db.hosts.length, hostsCount - 1); - }); - - test('saving an existing host with invalid fields displays error messages', async function (assert) { - assert.expect(2); - this.server.patch('/hosts/:id', () => { - return new Response( - 400, - {}, - { - status: 400, - code: 'invalid_argument', - message: 'The request was invalid.', - details: { - request_fields: [ - { - name: 'name', - description: 'Name is required.', - }, - ], - }, - } - ); - }); - await visit(urls.host); - await click('form [type="button"]', 'Activate edit mode'); - await fillIn('[name="name"]', 'existing host'); - await click('[type="submit"]'); - await a11yAudit(); - assert.ok(find('[role="alert"]')); - assert.ok(find('.rose-form-error-message')); - }); - - test('errors are displayed when delete on a host fails', async function (assert) { - assert.expect(1); - this.server.del('/hosts/:id', () => { - return new Response( - 490, - {}, - { - status: 490, - code: 'error', - message: 'Oops.', - } - ); - }); - await visit(urls.host); - await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - await a11yAudit(); - assert.ok(find('[role="alert"]')); - }); - - test('can create host and save changes', async function (assert) { - assert.expect(1); - const hostsCount = this.server.db.hosts.length; - await visit(urls.newHost); - await fillIn('[name="name"]', 'Test Name'); - await fillIn('[name="description"]', 'description'); - await click('form [type="submit"]:not(:disabled)'); - await visit(urls.hosts); - assert.equal(findAll('tbody tr').length, hostsCount + 1); - }); - - test('can create host and cancel changes', async function (assert) { - assert.expect(2); - const hostsCount = this.server.db.hosts.length; - await visit(urls.newHost); - await fillIn('[name="name"]', 'Test Name'); - await click('form button:not([type="submit"])'); - assert.equal(currentURL(), urls.hosts); - assert.equal(findAll('tbody tr').length, hostsCount); - }); - - test('saving a new host with invalid fields displays error messages', async function (assert) { - assert.expect(2); - this.server.post('/hosts', () => { - return new Response( - 400, - {}, - { - status: 400, - code: 'invalid_argument', - message: 'The request was invalid.', - details: { - request_fields: [ - { - name: 'name', - description: 'Name is required.', - }, - ], - }, - } - ); - }); - await visit(urls.newHost); - await fillIn('[name="name"]', 'new target'); - await click('form [type="submit"]'); - await a11yAudit(); - assert.ok(find('[role="alert"]')); - assert.ok(find('.rose-form-error-message')); - }); -}); diff --git a/ui/core/tests/acceptance/orgs-test.js b/ui/core/tests/acceptance/orgs-test.js deleted file mode 100644 index 4215d3db7..000000000 --- a/ui/core/tests/acceptance/orgs-test.js +++ /dev/null @@ -1,148 +0,0 @@ -import { module, test } from 'qunit'; -import { visit, currentURL, click, find, findAll, fillIn } from '@ember/test-helpers'; -import { setupApplicationTest } from 'ember-qunit'; -import setupMirage from 'ember-cli-mirage/test-support/setup-mirage'; -import a11yAudit from 'ember-a11y-testing/test-support/audit'; -import { Response } from 'miragejs'; -import { - authenticateSession, - // These are left here intentionally for future reference. - //currentSession, - //invalidateSession, -} from 'ember-simple-auth/test-support'; - -module('Acceptance | org', function (hooks) { - setupApplicationTest(hooks); - setupMirage(hooks); - - const instances = { - scopes: { - global: null, - }, - orgs: null, - }; - const urls = { - root: null, - scopes: null, - globalScope: null, - orgs: null, - newOrg: null, - }; - let orgsCount; - - hooks.beforeEach(function () { - // Setup Mirage mock resources for this test - authenticateSession({}); - instances.scopes.global = this.server.create('scope', { id: 'global' }); - instances.orgs = this.server.createList('scope', 2, { - type: 'org', - scope: { id: 'global', type: 'global' }, - }); - orgsCount = instances.orgs.length; - // Generate route URLs for resources - urls.root = '/'; - urls.scopes = `/scopes`; - urls.globalScope = `${urls.scopes}/global`; - urls.orgs = `${urls.globalScope}/orgs`; - urls.newOrg = `${urls.orgs}/new`; - }); - - test('visiting orgs', async function (assert) { - assert.expect(3); - await visit(urls.orgs); - await a11yAudit(); - assert.ok(orgsCount); - assert.equal(currentURL(), urls.orgs); - assert.equal(findAll('article').length, orgsCount); - }); - - test('visiting orgs when endpoint 404s shows an error message', async function (assert) { - assert.expect(1); - this.server.get('/scopes', () => new Response(404)); - await visit(urls.orgs); - await a11yAudit(); - assert.ok(find('.rose-message')); - }); - - test('visiting orgs is successful even when the global scope cannot be fetched', async function (assert) { - assert.expect(3); - this.server.get('/scopes/:id', ({ scopes }, { params: { id } }) => { - const scope = scopes.find(id); - return (id === 'global') - ? new Response(404) - : scope; - }); - await visit(urls.orgs); - await a11yAudit(); - assert.ok(orgsCount); - assert.equal(currentURL(), urls.orgs); - assert.equal(findAll('article').length, orgsCount); - }); - - test('visiting scopes redirects to index', async function (assert) { - assert.expect(1); - await visit(urls.scopes); - assert.equal(currentURL(), urls.orgs); - }); - - test('visiting root redirects to index', async function (assert) { - assert.expect(1); - await visit(urls.root); - assert.equal(currentURL(), urls.orgs); - }); - - test('visiting orgs within a non global scope redirects to index', async function (assert) { - const nonGlobalScopeURL = `${urls.scopes}/123/orgs`; - assert.expect(1); - await visit(nonGlobalScopeURL); - assert.equal(currentURL(), urls.orgs); - }); - - test('can create a new org', async function (assert) { - assert.expect(1); - await visit(urls.newOrg); - await fillIn('[name="name"]', 'Org name'); - await fillIn('[name="description"]', 'description'); - await click('form [type="submit"]:not(:disabled)'); - assert.equal(this.server.db.scopes.where(scope => scope.type === 'org').length, orgsCount + 1); - }); - - test('can cancel new org creation', async function (assert) { - assert.expect(2); - await visit(urls.newOrg); - await fillIn('[name="name"]', 'Org name'); - await fillIn('[name="description"]', 'description'); - await click('form button:not([type="submit"])'); - assert.equal(currentURL(), urls.orgs); - assert.equal(this.server.db.scopes.where(scope => scope.type === 'org').length, orgsCount); - }); - - test('saving a new org with invalid fields displays error messages', async function (assert) { - assert.expect(2); - this.server.post('/scopes', () => { - return new Response( - 400, - {}, - { - status: 400, - code: 'invalid_argument', - message: 'The request was invalid.', - details: { - request_fields: [ - { - name: 'name', - description: 'Name is required.', - }, - ], - }, - } - ); - }); - await visit(urls.newOrg); - await fillIn('[name="name"]', 'new org'); - await click('form [type="submit"]'); - await a11yAudit(); - assert.ok(find('[role="alert"]')); - assert.ok(find('.rose-form-error-message')); - }); -}); diff --git a/ui/core/tests/acceptance/projects-test.js b/ui/core/tests/acceptance/projects-test.js deleted file mode 100644 index 068323951..000000000 --- a/ui/core/tests/acceptance/projects-test.js +++ /dev/null @@ -1,264 +0,0 @@ -import { module, test } from 'qunit'; -import { visit, currentURL, click, fillIn, find } from '@ember/test-helpers'; -import { setupApplicationTest } from 'ember-qunit'; -import setupMirage from 'ember-cli-mirage/test-support/setup-mirage'; -import a11yAudit from 'ember-a11y-testing/test-support/audit'; -import { Response } from 'miragejs'; -import { resolve, reject } from 'rsvp'; -import { - authenticateSession, - // These are left here intentionally for future reference. - //currentSession, - //invalidateSession, -} from 'ember-simple-auth/test-support'; -import sinon from 'sinon'; - -module('Acceptance | projects', function (hooks) { - setupApplicationTest(hooks); - setupMirage(hooks); - - let org; - let orgID; - let projectsURL; - let newProjectURL; - let existingProject; - let existingProjectURL; - let getProjectScopesCount; - let getFirstProjectScope; - let initialProjectScopesCount; - - hooks.beforeEach(function () { - authenticateSession({}); - org = this.server.create('scope', { type: 'org' }, 'withChildren'); - getProjectScopesCount = () => - this.server.schema.scopes.where({ type: 'project' }).length; - getFirstProjectScope = () => - this.server.schema.scopes.where({ type: 'project' }).models[0]; - initialProjectScopesCount = getProjectScopesCount(); - orgID = org.id; - projectsURL = `/scopes/${orgID}/projects`; - newProjectURL = `/scopes/${orgID}/projects/new`; - existingProject = getFirstProjectScope(); - existingProjectURL = `/scopes/${orgID}/projects/${existingProject.id}`; - }); - - test('visiting projects', async function (assert) { - assert.expect(1); - await visit(projectsURL); - await a11yAudit(); - assert.equal(currentURL(), projectsURL); - }); - - test('visiting projects within a project scope redirects to the parent org scope', async function (assert) { - assert.expect(2); - const wrongProjectsURL = `/scopes/${existingProject.id}/projects`; - assert.notEqual(wrongProjectsURL, projectsURL); - await visit(wrongProjectsURL); - await a11yAudit(); - assert.equal( - currentURL(), - projectsURL, - 'Wrong projects path was redirected to correct path.' - ); - }); - - test('can create new projects', async function (assert) { - assert.expect(1); - await visit(newProjectURL); - await fillIn('[name="name"]', 'random string'); - await click('[type="submit"]'); - assert.equal(getProjectScopesCount(), initialProjectScopesCount + 1); - }); - - test('can cancel create new projects', async function (assert) { - assert.expect(3); - assert.equal(getProjectScopesCount(), initialProjectScopesCount); - await visit(newProjectURL); - await fillIn('[name="name"]', 'random string'); - await click('.rose-form-actions [type="button"]'); - assert.equal(currentURL(), projectsURL); - assert.equal(getProjectScopesCount(), initialProjectScopesCount); - }); - - test('saving a new project with invalid fields displays error messages', async function (assert) { - assert.expect(2); - this.server.post('/scopes', () => { - return new Response( - 400, - {}, - { - status: 400, - code: 'invalid_argument', - message: 'The request was invalid.', - details: { - request_fields: [ - { - name: 'name', - description: 'Name is required.', - }, - ], - }, - } - ); - }); - await visit(newProjectURL); - await click('[type="submit"]'); - assert.ok( - find('[role="alert"]').textContent.trim(), - 'The request was invalid.', - 'Displays primary error message.' - ); - assert.ok( - find('.rose-form-error-message').textContent.trim(), - 'Name is required.', - 'Displays field-level errors.' - ); - }); - - test('can save changes to existing project', async function (assert) { - assert.expect(3); - assert.notEqual(existingProject.name, 'random string'); - await visit(existingProjectURL); - await click('form [type="button"]', 'Activate edit mode'); - await fillIn('[name="name"]', 'random string'); - await click('.rose-form-actions [type="submit"]'); - assert.equal(currentURL(), existingProjectURL); - assert.equal(getFirstProjectScope().name, 'random string'); - }); - - test('can cancel changes to existing project', async function (assert) { - assert.expect(2); - await visit(existingProjectURL); - await click('form [type="button"]', 'Activate edit mode'); - await fillIn('[name="name"]', 'random string'); - await click('.rose-form-actions [type="button"]'); - assert.notEqual(existingProject.name, 'random string'); - assert.equal(find('[name="name"]').value, existingProject.name); - }); - - test('can discard unsaved changes via dialog', async function (assert) { - assert.expect(5); - const confirmService = this.owner.lookup('service:confirm'); - confirmService.enabled = true; - assert.notEqual(existingProject.name, 'random string'); - await visit(existingProjectURL); - await click('form [type="button"]', 'Activate edit mode'); - await fillIn('[name="name"]', 'random string'); - assert.equal(currentURL(), existingProjectURL); - try { - await visit(projectsURL); - } catch (e) { - assert.ok(find('.rose-dialog')); - await click('.rose-dialog-footer button:first-child'); - assert.equal(currentURL(), projectsURL); - assert.notEqual(getFirstProjectScope().name, 'random string'); - } - }); - - test('can cancel discard unsaved changes via dialog', async function (assert) { - assert.expect(5); - const confirmService = this.owner.lookup('service:confirm'); - confirmService.enabled = true; - assert.notEqual(existingProject.name, 'random string'); - await visit(existingProjectURL); - await click('form [type="button"]', 'Activate edit mode'); - await fillIn('[name="name"]', 'random string'); - assert.equal(currentURL(), existingProjectURL); - try { - await visit(projectsURL); - } catch (e) { - assert.ok(find('.rose-dialog')); - await click('.rose-dialog-footer button:last-child'); - assert.equal(currentURL(), existingProjectURL); - assert.notEqual(getFirstProjectScope().name, 'random string'); - } - }); - - test('can delete project', async function (assert) { - assert.expect(1); - await visit(existingProjectURL); - await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(getProjectScopesCount(), initialProjectScopesCount - 1); - }); - - test('can delete project with confirmation acceptance', async function (assert) { - assert.expect(2); - const confirmService = this.owner.lookup('service:confirm'); - confirmService.enabled = true; - confirmService.confirm = sinon.fake.returns(resolve()); - await visit(existingProjectURL); - await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(getProjectScopesCount(), initialProjectScopesCount - 1); - assert.ok(confirmService.confirm.calledOnce); - }); - - test('cannot delete project with confirmation denial', async function (assert) { - assert.expect(2); - const confirmService = this.owner.lookup('service:confirm'); - confirmService.enabled = true; - confirmService.confirm = sinon.fake.returns(reject()); - await visit(existingProjectURL); - await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(getProjectScopesCount(), initialProjectScopesCount); - assert.ok(confirmService.confirm.calledOnce); - }); - - test('saving an existing project with invalid fields displays error messages', async function (assert) { - assert.expect(2); - this.server.patch('/scopes/:id', () => { - return new Response( - 400, - {}, - { - status: 400, - code: 'invalid_argument', - message: 'The request was invalid.', - details: { - request_fields: [ - { - name: 'name', - description: 'Name is required.', - }, - ], - }, - } - ); - }); - await visit(existingProjectURL); - await click('form [type="button"]', 'Activate edit mode'); - await fillIn('[name="name"]', 'random string'); - await click('[type="submit"]'); - assert.ok( - find('[role="alert"]').textContent.trim(), - 'The request was invalid.', - 'Displays primary error message.' - ); - assert.ok( - find('.rose-form-error-message').textContent.trim(), - 'Name is required.', - 'Displays field-level errors.' - ); - }); - - test('errors are displayed when delete project fails', async function (assert) { - assert.expect(1); - this.server.del('/scopes/:id', () => { - return new Response( - 490, - {}, - { - status: 490, - code: 'error', - message: 'Oops.', - } - ); - }); - await visit(existingProjectURL); - await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.ok( - find('[role="alert"]').textContent.trim(), - 'Oops.', - 'Displays primary error message.' - ); - }); -}); diff --git a/ui/core/tests/acceptance/sessions-test.js b/ui/core/tests/acceptance/sessions-test.js deleted file mode 100644 index 2757712f6..000000000 --- a/ui/core/tests/acceptance/sessions-test.js +++ /dev/null @@ -1,104 +0,0 @@ -import { module, test } from 'qunit'; -import { visit, currentURL, findAll, find, click } from '@ember/test-helpers'; -import { setupApplicationTest } from 'ember-qunit'; -import setupMirage from 'ember-cli-mirage/test-support/setup-mirage'; -import a11yAudit from 'ember-a11y-testing/test-support/audit'; -import { run, later } from '@ember/runloop'; -import { Response } from 'miragejs'; -import { - authenticateSession, - // These are left here intentionally for future reference. - //currentSession, - //invalidateSession, -} from 'ember-simple-auth/test-support'; - -module('Acceptance | sessions', function (hooks) { - setupApplicationTest(hooks); - setupMirage(hooks); - - const instances = { - scopes: { - global: null, - org: null, - }, - sessions: null, - }; - const urls = { - orgScope: null, - sessions: null, - }; - - hooks.beforeEach(function () { - authenticateSession({}); - instances.scopes.global = this.server.create('scope', { id: 'global' }); - instances.scopes.org = this.server.create('scope', { - type: 'org', - scope: { id: 'global', type: 'global' }, - }); - instances.scopes.project = this.server.create('scope', { - type: 'project', - scope: { id: instances.scopes.org.id, type: instances.scopes.org.type }, - }); - this.server.createList('group', 1, { scope: instances.scopes.org }, 'withMembers'); - this.server.createList('host-catalog', 1, { scope: instances.scopes.project }, 'withChildren'); - this.server.createList('target', 1, { scope: instances.scopes.project }, 'withRandomHostSets'); - instances.sessions = this.server.createList('session', 3, { - scope: instances.scopes.project, - status: 'active' - }, 'withAssociations'); - urls.sessions = `/scopes/${instances.scopes.org.id}/projects/${instances.scopes.project.id}/sessions`; - }); - - test('visiting sessions', async function (assert) { - assert.expect(2); - authenticateSession({}); - later(async () => { - run.cancelTimers(); - await a11yAudit(); - assert.equal(currentURL(), urls.sessions); - assert.equal(findAll('tbody tr').length, instances.sessions.length); - }, 750); - await visit(urls.sessions); - }); - - test('visiting sessions without users or targets is OK', async function (assert) { - assert.expect(2); - instances.sessions[0].update({ - userId: null, - targetId: null - }); - authenticateSession({}); - later(async () => { - run.cancelTimers(); - await a11yAudit(); - assert.equal(currentURL(), urls.sessions); - assert.equal(findAll('tbody tr').length, instances.sessions.length); - }, 750); - await visit(urls.sessions); - }); - - test('cancelling a session', async function (assert) { - assert.expect(2); - authenticateSession({}); - later(async () => { - run.cancelTimers(); - await click('tbody tr:first-child td:last-child button'); - assert.ok(find('[role="alert"].is-success')); - }, 750); - await visit(urls.sessions); - assert.equal(currentURL(), urls.sessions); - }); - - test('cancelling a session with error shows notification', async function (assert) { - assert.expect(2); - this.server.post('/sessions/:id_method', () => new Response(400)); - authenticateSession({}); - later(async () => { - run.cancelTimers(); - await click('tbody tr:first-child td:last-child button'); - assert.ok(find('[role="alert"].is-error')); - }, 750); - await visit(urls.sessions); - assert.equal(currentURL(), urls.sessions); - }); -}); diff --git a/ui/core/tests/acceptance/targets-test.js b/ui/core/tests/acceptance/targets-test.js deleted file mode 100644 index 76e87a931..000000000 --- a/ui/core/tests/acceptance/targets-test.js +++ /dev/null @@ -1,316 +0,0 @@ -import { module, test } from 'qunit'; -import { visit, currentURL, click, find, findAll, fillIn } from '@ember/test-helpers'; -import { setupApplicationTest } from 'ember-qunit'; -import setupMirage from 'ember-cli-mirage/test-support/setup-mirage'; -import a11yAudit from 'ember-a11y-testing/test-support/audit'; -import { Response } from 'miragejs'; -import { - authenticateSession, - // These are left here intentionally for future reference. - //currentSession, - //invalidateSession, -} from 'ember-simple-auth/test-support'; - -module('Acceptance | targets', function (hooks) { - setupApplicationTest(hooks); - setupMirage(hooks); - - const instances = { - scopes: { - global: null, - org: null, - project: null, - }, - target: null, - hostSets: null, - }; - const urls = { - orgScope: null, - projects: null, - project: null, - targets: null, - newTarget: null, - target: null, - targetHostSets: null, - targetAddHostSets: null, - }; - - hooks.beforeEach(function () { - // Setup Mirage mock resources for this test - authenticateSession({}); - instances.scopes.global = this.server.create('scope', { id: 'global' }); - instances.scopes.org = this.server.create('scope', { - type: 'org', - scope: { id: 'global', type: 'global' }, - }); - instances.scopes.project = this.server.create('scope', { - type: 'project', - scope: { id: instances.scopes.org.id, type: 'org' }, - }); - - instances.hostCatalog = this.server.create('host-catalog', { - scope: instances.scopes.project - }, 'withChildren'); - instances.target = this.server.create('target', { - scope: instances.scopes.project, - hostSets: instances.hostCatalog.hostSets - }); - - // Generate route URLs for resources - urls.orgScope = `/scopes/${instances.scopes.org.id}`; - urls.projects = `${urls.orgScope}/projects`; - urls.project = `${urls.projects}/${instances.scopes.project.id}`; - urls.targets = `${urls.project}/targets`; - urls.newTarget = `${urls.targets}/new`; - urls.target = `${urls.targets}/${instances.target.id}`; - urls.targetHostSets = `${urls.target}/host-sets`; - urls.targetAddHostSets = `${urls.target}/add-host-sets`; - }); - - hooks.afterEach(async function() { - const notification = find('.rose-notification'); - if(notification) { - await click('.rose-notification-dismiss'); - } - }); - - test('visiting targets', async function (assert) { - assert.expect(1); - await visit(urls.targets); - await a11yAudit(); - assert.equal(currentURL(), urls.targets); - }); - - test('can navigate to a target form', async function (assert) { - assert.expect(1); - await visit(urls.targets); - await click('main tbody .rose-table-header-cell:nth-child(1) a'); - await a11yAudit(); - assert.equal(currentURL(), urls.target); - }); - - test('can update a target and save changes', async function (assert) { - assert.expect(2); - await visit(urls.target); - await click('form [type="button"]', 'Activate edit mode'); - await fillIn('[name="name"]', 'update name'); - await fillIn('[name="default_port"]', '1234'); - await click('form [type="submit"]:not(:disabled)'); - assert.equal(this.server.db.targets[0].name, 'update name'); - assert.equal(this.server.db.targets[0].attributes.default_port, '1234'); - }); - - test('can update a target and cancel changes', async function (assert) { - assert.expect(2); - await visit(urls.target); - await click('form [type="button"]', 'Activate edit mode'); - await fillIn('[name="name"]', 'update name'); - await fillIn('[name="default_port"]', '1234'); - await click('form button:not([type="submit"])'); - assert.notEqual(this.server.db.targets[0].name, 'update name'); - assert.notEqual(this.server.db.targets[0].port, '1234'); - }); - - test('can create new target', async function (assert) { - assert.expect(1); - const targetsCount = this.server.db.targets.length; - await visit(urls.newTarget); - await fillIn('[name="name"]', 'Target name'); - await fillIn('[name="description"]', 'description'); - await fillIn('[name="default_port"]', '1234'); - await click('form [type="submit"]:not(:disabled)'); - assert.equal(this.server.db.targets.length, targetsCount + 1); - }); - - test('can cancel new target creation', async function (assert) { - assert.expect(2); - const targetsCount = this.server.db.targets.length; - await visit(urls.newTarget); - await fillIn('[name="name"]', 'Target Name'); - await click('form button:not([type="submit"])'); - assert.equal(this.server.db.targets.length, targetsCount); - assert.equal(currentURL(), urls.targets); - }); - - test('can delete a target', async function(assert) { - assert.expect(1); - const targetsCount = this.server.db.targets.length; - await visit(urls.target); - await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - assert.equal(this.server.db.targets.length, targetsCount - 1); - }); - - test('saving a new target with invalid fields displays error messages', async function (assert) { - assert.expect(2); - this.server.post('/targets', () => { - return new Response( - 400, - {}, - { - status: 400, - code: 'invalid_argument', - message: 'The request was invalid.', - details: { - request_fields: [ - { - name: 'name', - description: 'Name is required.', - }, - ], - }, - } - ); - }); - await visit(urls.newTarget); - await fillIn('[name="name"]', 'new target'); - await click('form [type="submit"]'); - await a11yAudit(); - assert.ok(find('[role="alert"]')); - assert.ok(find('.rose-form-error-message')); - }); - - test('errors are displayed when delete on a target fails', async function (assert) { - assert.expect(1); - this.server.del('/targets/:id', () => { - return new Response( - 490, - {}, - { - status: 490, - code: 'error', - message: 'Oops.', - } - ); - }); - await visit(urls.target); - await click('.rose-layout-page-actions .rose-dropdown-button-danger'); - await a11yAudit(); - assert.ok(find('[role="alert"]')); - }); - - test('saving an existing target with invalid fields displays error messages', async function (assert) { - assert.expect(2); - this.server.patch('/targets/:id', () => { - return new Response( - 400, - {}, - { - status: 400, - code: 'invalid_argument', - message: 'The request was invalid.', - details: { - request_fields: [ - { - name: 'name', - description: 'Name is required.', - }, - ], - }, - } - ); - }); - await visit(urls.target); - await click('form [type="button"]', 'Activate edit mode'); - await fillIn('[name="name"]', 'existing target'); - await click('form [type="submit"]'); - await a11yAudit(); - assert.ok(find('[role="alert"]')); - assert.ok(find('.rose-form-error-message')); - }); - - test('visiting target host sets', async function (assert) { - assert.expect(3); - const targetHostSetCount = instances.target.hostSets.length; - await visit(urls.targetHostSets); - await a11yAudit(); - assert.equal(currentURL(), urls.targetHostSets); - assert.ok(targetHostSetCount); - assert.equal(findAll('tbody tr').length, targetHostSetCount); - }); - - test('can remove a host sets', async function (assert) { - assert.expect(2); - const targetHostSetCount = instances.target.hostSets.length; - await visit(urls.targetHostSets); - assert.equal(findAll('tbody tr').length, targetHostSetCount); - await click('tbody tr .rose-dropdown-button-danger'); - assert.equal(findAll('tbody tr').length, targetHostSetCount - 1); - }); - - test('shows error message on host set remove', async function (assert) { - assert.expect(2); - this.server.post('/targets/:idMethod', () => { - return new Response( - 400, - {}, - { - status: 400, - code: 'invalid_argument', - message: 'The request was invalid.', - details: {}, - } - ); - }); - const targetHostSetCount = instances.target.hostSets.length; - await visit(urls.targetHostSets); - assert.equal(findAll('tbody tr').length, targetHostSetCount); - await click('tbody tr .rose-dropdown-button-danger'); - assert.ok(find('[role="alert"]')); - }); - - test('select and save host sets to add', async function (assert) { - assert.expect(3); - instances.target.update({ hostSetIds: [] }); - await visit(urls.targetHostSets); - assert.equal(findAll('tbody tr').length, 0); - await click('.rose-layout-page-actions a') - assert.equal(currentURL(), urls.targetAddHostSets); - // Click three times to select, unselect, then reselect (for coverage) - await click('tbody label'); - await click('tbody label'); - await click('tbody label'); - await click('form [type="submit"]'); - await visit(urls.targetHostSets); - assert.equal(findAll('tbody tr').length, 1); - }); - - test('select and cancel host sets to add', async function (assert) { - assert.expect(4); - const targetHostSetCount = instances.target.hostSets.length; - await visit(urls.targetHostSets); - assert.equal(findAll('tbody tr').length, targetHostSetCount); - // first, remove a target host set (otherwise none would be available to add) - await click('tbody tr .rose-dropdown-button-danger'); - assert.equal(findAll('tbody tr').length, targetHostSetCount - 1); - await click('.rose-layout-page-actions a') - assert.equal(currentURL(), urls.targetAddHostSets); - await click('tbody label'); - await click('form [type="button"]'); - await visit(urls.targetHostSets); - assert.equal(findAll('tbody tr').length, targetHostSetCount - 1); - }); - - test('shows error message on host set add', async function (assert) { - assert.expect(4); - this.server.post('/targets/:idMethod', () => { - return new Response( - 400, - {}, - { - status: 400, - code: 'invalid_argument', - message: 'The request was invalid.', - details: {}, - } - ); - }); - instances.target.update({ hostSetIds: [] }); - await visit(urls.targetAddHostSets); - assert.equal(instances.target.hostSets.length, 0); - assert.equal(currentURL(), urls.targetAddHostSets); - await click('tbody label'); - await click('form [type="submit"]'); - assert.equal(currentURL(), urls.targetAddHostSets); - assert.equal(instances.target.hostSets.length, 0); - }); -}); diff --git a/ui/core/tests/integration/components/form/host-catalog-test.js b/ui/core/tests/integration/components/form/host-catalog-test.js deleted file mode 100644 index 20dbd545f..000000000 --- a/ui/core/tests/integration/components/form/host-catalog-test.js +++ /dev/null @@ -1,23 +0,0 @@ -import { module, test } from 'qunit'; -import { setupRenderingTest } from 'ember-qunit'; -import { render, find } from '@ember/test-helpers'; -import { hbs } from 'ember-cli-htmlbars'; - -module('Integration | Component | form/host-catalog', function (hooks) { - setupRenderingTest(hooks); - - test('it renders', async function (assert) { - // Set any properties with this.set('myProperty', 'value'); - // Handle any actions with this.set('myAction', function(val) { ... }); - this.submit = () => {}; - this.cancel = () => {}; - - await render(hbs` - `); - - assert.ok(find('form')); - }); -}); diff --git a/ui/core/tests/integration/components/form/host-set-test.js b/ui/core/tests/integration/components/form/host-set-test.js deleted file mode 100644 index 849ca7651..000000000 --- a/ui/core/tests/integration/components/form/host-set-test.js +++ /dev/null @@ -1,23 +0,0 @@ -import { module, test } from 'qunit'; -import { setupRenderingTest } from 'ember-qunit'; -import { render, find } from '@ember/test-helpers'; -import { hbs } from 'ember-cli-htmlbars'; - -module('Integration | Component | form/host-set', function (hooks) { - setupRenderingTest(hooks); - - test('it renders', async function (assert) { - // Set any properties with this.set('myProperty', 'value'); - // Handle any actions with this.set('myAction', function(val) { ... }); - this.submit = () => {}; - this.cancel = () => {}; - - await render(hbs` - `); - - assert.ok(find('form')); - }); -}); diff --git a/ui/core/tests/integration/components/form/host-set/add-hosts-test.js b/ui/core/tests/integration/components/form/host-set/add-hosts-test.js deleted file mode 100644 index 2614047a0..000000000 --- a/ui/core/tests/integration/components/form/host-set/add-hosts-test.js +++ /dev/null @@ -1,12 +0,0 @@ -import { module, test } from 'qunit'; -import { setupRenderingTest } from 'ember-qunit'; -// import { render } from '@ember/test-helpers'; -// import { hbs } from 'ember-cli-htmlbars'; - -module('Integration | Component | form/host-set/add-hosts', function (hooks) { - setupRenderingTest(hooks); - - test('it renders', async function (assert) { - assert.expect(0); - }); -}); diff --git a/ui/core/tests/integration/components/form/host-test.js b/ui/core/tests/integration/components/form/host-test.js deleted file mode 100644 index bb4420a6f..000000000 --- a/ui/core/tests/integration/components/form/host-test.js +++ /dev/null @@ -1,23 +0,0 @@ -import { module, test } from 'qunit'; -import { setupRenderingTest } from 'ember-qunit'; -import { render, find } from '@ember/test-helpers'; -import { hbs } from 'ember-cli-htmlbars'; - -module('Integration | Component | form/host', function (hooks) { - setupRenderingTest(hooks); - - test('it renders', async function (assert) { - // Set any properties with this.set('myProperty', 'value'); - // Handle any actions with this.set('myAction', function(val) { ... }); - this.submit = () => {}; - this.cancel = () => {}; - - await render(hbs` - `); - - assert.ok(find('form')); - }); -}); diff --git a/ui/core/tests/integration/components/form/org-test.js b/ui/core/tests/integration/components/form/org-test.js deleted file mode 100644 index cfc7d25e5..000000000 --- a/ui/core/tests/integration/components/form/org-test.js +++ /dev/null @@ -1,23 +0,0 @@ -import { module, test } from 'qunit'; -import { setupRenderingTest } from 'ember-qunit'; -import { render, find } from '@ember/test-helpers'; -import { hbs } from 'ember-cli-htmlbars'; - -module('Integration | Component | form/org', function (hooks) { - setupRenderingTest(hooks); - - test('it renders', async function (assert) { - // Set any properties with this.set('myProperty', 'value'); - // Handle any actions with this.set('myAction', function(val) { ... }); - this.submit = () => {}; - this.cancel = () => {}; - - await render(hbs` - `); - - assert.ok(find('form')); - }); -}); diff --git a/ui/core/tests/integration/components/form/project-test.js b/ui/core/tests/integration/components/form/project-test.js deleted file mode 100644 index d4cb276ed..000000000 --- a/ui/core/tests/integration/components/form/project-test.js +++ /dev/null @@ -1,23 +0,0 @@ -import { module, test } from 'qunit'; -import { setupRenderingTest } from 'ember-qunit'; -import { render, find } from '@ember/test-helpers'; -import { hbs } from 'ember-cli-htmlbars'; - -module('Integration | Component | form/project', function (hooks) { - setupRenderingTest(hooks); - - test('it renders', async function (assert) { - // Set any properties with this.set('myProperty', 'value'); - // Handle any actions with this.set('myAction', function(val) { ... }); - this.submit = () => {}; - this.cancel = () => {}; - - await render(hbs` - `); - - assert.ok(find('form')); - }); -}); diff --git a/ui/core/tests/integration/components/form/target-test.js b/ui/core/tests/integration/components/form/target-test.js deleted file mode 100644 index e0246833f..000000000 --- a/ui/core/tests/integration/components/form/target-test.js +++ /dev/null @@ -1,23 +0,0 @@ -import { module, test } from 'qunit'; -import { setupRenderingTest } from 'ember-qunit'; -import { render, find } from '@ember/test-helpers'; -import { hbs } from 'ember-cli-htmlbars'; - -module('Integration | Component | form/target', function (hooks) { - setupRenderingTest(hooks); - - test('it renders', async function (assert) { - // Set any properties with this.set('myProperty', 'value'); - // Handle any actions with this.set('myAction', function(val) { ... }); - this.submit = () => {}; - this.cancel = () => {}; - - await render(hbs` - `); - - assert.ok(find('form')); - }); -}); diff --git a/ui/core/tests/integration/components/form/target/add-host-sets-test.js b/ui/core/tests/integration/components/form/target/add-host-sets-test.js deleted file mode 100644 index ce93c7a02..000000000 --- a/ui/core/tests/integration/components/form/target/add-host-sets-test.js +++ /dev/null @@ -1,12 +0,0 @@ -import { module, test } from 'qunit'; -import { setupRenderingTest } from 'ember-qunit'; -// import { render } from '@ember/test-helpers'; -// import { hbs } from 'ember-cli-htmlbars'; - -module('Integration | Component | form/target/add-host-sets', function (hooks) { - setupRenderingTest(hooks); - - test('it renders', async function (assert) { - assert.expect(0); - }); -}); diff --git a/ui/core/tests/unit/controllers/scopes/scope/orgs-test.js b/ui/core/tests/unit/controllers/scopes/scope/orgs-test.js deleted file mode 100644 index 2833aba29..000000000 --- a/ui/core/tests/unit/controllers/scopes/scope/orgs-test.js +++ /dev/null @@ -1,12 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module('Unit | Controller | scopes/scope/orgs', function (hooks) { - setupTest(hooks); - - // Replace this with your real tests. - test('it exists', function (assert) { - let controller = this.owner.lookup('controller:scopes/scope/orgs'); - assert.ok(controller); - }); -}); diff --git a/ui/core/tests/unit/controllers/scopes/scope/orgs/new-test.js b/ui/core/tests/unit/controllers/scopes/scope/orgs/new-test.js deleted file mode 100644 index e11003833..000000000 --- a/ui/core/tests/unit/controllers/scopes/scope/orgs/new-test.js +++ /dev/null @@ -1,12 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module('Unit | Controller | scopes/scope/orgs/new', function (hooks) { - setupTest(hooks); - - // Replace this with your real tests. - test('it exists', function (assert) { - let controller = this.owner.lookup('controller:scopes/scope/orgs/new'); - assert.ok(controller); - }); -}); diff --git a/ui/core/tests/unit/controllers/scopes/scope/projects-test.js b/ui/core/tests/unit/controllers/scopes/scope/projects-test.js deleted file mode 100644 index 052687cd2..000000000 --- a/ui/core/tests/unit/controllers/scopes/scope/projects-test.js +++ /dev/null @@ -1,12 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module('Unit | Controller | scopes/scope/projects', function (hooks) { - setupTest(hooks); - - // Replace this with your real tests. - test('it exists', function (assert) { - let controller = this.owner.lookup('controller:scopes/scope/projects'); - assert.ok(controller); - }); -}); diff --git a/ui/core/tests/unit/controllers/scopes/scope/projects/new-test.js b/ui/core/tests/unit/controllers/scopes/scope/projects/new-test.js deleted file mode 100644 index 8da2a6f6d..000000000 --- a/ui/core/tests/unit/controllers/scopes/scope/projects/new-test.js +++ /dev/null @@ -1,12 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module('Unit | Controller | scopes/scope/projects/new', function (hooks) { - setupTest(hooks); - - // Replace this with your real tests. - test('it exists', function (assert) { - let controller = this.owner.lookup('controller:scopes/scope/projects/new'); - assert.ok(controller); - }); -}); diff --git a/ui/core/tests/unit/controllers/scopes/scope/projects/project-test.js b/ui/core/tests/unit/controllers/scopes/scope/projects/project-test.js deleted file mode 100644 index ee20af93d..000000000 --- a/ui/core/tests/unit/controllers/scopes/scope/projects/project-test.js +++ /dev/null @@ -1,14 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module('Unit | Controller | scopes/scope/projects/project', function (hooks) { - setupTest(hooks); - - // Replace this with your real tests. - test('it exists', function (assert) { - let controller = this.owner.lookup( - 'controller:scopes/scope/projects/project' - ); - assert.ok(controller); - }); -}); diff --git a/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs-test.js b/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs-test.js deleted file mode 100644 index 76cfc0a4d..000000000 --- a/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs-test.js +++ /dev/null @@ -1,17 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Controller | scopes/scope/projects/project/host-catalogs', - function (hooks) { - setupTest(hooks); - - // Replace this with your real tests. - test('it exists', function (assert) { - let controller = this.owner.lookup( - 'controller:scopes/scope/projects/project/host-catalogs' - ); - assert.ok(controller); - }); - } -); diff --git a/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog-test.js b/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog-test.js deleted file mode 100644 index a7f2eed72..000000000 --- a/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog-test.js +++ /dev/null @@ -1,17 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Controller | scopes/scope/projects/project/host-catalogs/host-catalog', - function (hooks) { - setupTest(hooks); - - // Replace this with your real tests. - test('it exists', function (assert) { - let controller = this.owner.lookup( - 'controller:scopes/scope/projects/project/host-catalogs/host-catalog' - ); - assert.ok(controller); - }); - } -); diff --git a/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets-test.js b/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets-test.js deleted file mode 100644 index ac959ef1c..000000000 --- a/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets-test.js +++ /dev/null @@ -1,17 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Controller | scopes/scope/projects/project/host-catalogs/host-catalog/host-sets', - function (hooks) { - setupTest(hooks); - - // Replace this with your real tests. - test('it exists', function (assert) { - let controller = this.owner.lookup( - 'controller:scopes/scope/projects/project/host-catalogs/host-catalog/host-sets' - ); - assert.ok(controller); - }); - } -); diff --git a/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set-test.js b/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set-test.js deleted file mode 100644 index 10fc9c009..000000000 --- a/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set-test.js +++ /dev/null @@ -1,17 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Controller | scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set', - function (hooks) { - setupTest(hooks); - - // Replace this with your real tests. - test('it exists', function (assert) { - let controller = this.owner.lookup( - 'controller:scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set' - ); - assert.ok(controller); - }); - } -); diff --git a/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/create-host-test.js b/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/create-host-test.js deleted file mode 100644 index aba1c7c22..000000000 --- a/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/create-host-test.js +++ /dev/null @@ -1,12 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module('Unit | Controller | scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/create-host', function(hooks) { - setupTest(hooks); - - // TODO: Replace this with your real tests. - test('it exists', function(assert) { - let controller = this.owner.lookup('controller:scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/create-host'); - assert.ok(controller); - }); -}); diff --git a/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new-test.js b/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new-test.js deleted file mode 100644 index 5781b7eaa..000000000 --- a/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new-test.js +++ /dev/null @@ -1,17 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Controller | scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new', - function (hooks) { - setupTest(hooks); - - // Replace this with your real tests. - test('it exists', function (assert) { - let controller = this.owner.lookup( - 'controller:scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new' - ); - assert.ok(controller); - }); - } -); diff --git a/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/hosts-test.js b/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/hosts-test.js deleted file mode 100644 index 21d65d16a..000000000 --- a/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/hosts-test.js +++ /dev/null @@ -1,17 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Controller | scopes/scope/projects/project/host-catalogs/host-catalog/hosts', - function (hooks) { - setupTest(hooks); - - // Replace this with your real tests. - test('it exists', function (assert) { - let controller = this.owner.lookup( - 'controller:scopes/scope/projects/project/host-catalogs/host-catalog/hosts' - ); - assert.ok(controller); - }); - } -); diff --git a/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host-test.js b/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host-test.js deleted file mode 100644 index 48b020001..000000000 --- a/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host-test.js +++ /dev/null @@ -1,17 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Controller | scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host', - function (hooks) { - setupTest(hooks); - - // Replace this with your real tests. - test('it exists', function (assert) { - let controller = this.owner.lookup( - 'controller:scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host' - ); - assert.ok(controller); - }); - } -); diff --git a/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/new-test.js b/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/new-test.js deleted file mode 100644 index 8823785d6..000000000 --- a/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/new-test.js +++ /dev/null @@ -1,17 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Controller | scopes/scope/projects/project/host-catalogs/host-catalog/hosts/new', - function (hooks) { - setupTest(hooks); - - // Replace this with your real tests. - test('it exists', function (assert) { - let controller = this.owner.lookup( - 'controller:scopes/scope/projects/project/host-catalogs/host-catalog/hosts/new' - ); - assert.ok(controller); - }); - } -); diff --git a/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/new-test.js b/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/new-test.js deleted file mode 100644 index f6fe63dbd..000000000 --- a/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/new-test.js +++ /dev/null @@ -1,17 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Controller | scopes/scope/projects/project/host-catalogs/new', - function (hooks) { - setupTest(hooks); - - // Replace this with your real tests. - test('it exists', function (assert) { - let controller = this.owner.lookup( - 'controller:scopes/scope/projects/project/host-catalogs/new' - ); - assert.ok(controller); - }); - } -); diff --git a/ui/core/tests/unit/controllers/scopes/scope/projects/project/sessions-test.js b/ui/core/tests/unit/controllers/scopes/scope/projects/project/sessions-test.js deleted file mode 100644 index 8361f91f2..000000000 --- a/ui/core/tests/unit/controllers/scopes/scope/projects/project/sessions-test.js +++ /dev/null @@ -1,12 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module('Unit | Controller | scopes/scope/projects/project/sessions', function(hooks) { - setupTest(hooks); - - // Replace this with your real tests. - test('it exists', function(assert) { - let controller = this.owner.lookup('controller:scopes/scope/projects/project/sessions'); - assert.ok(controller); - }); -}); diff --git a/ui/core/tests/unit/controllers/scopes/scope/projects/project/targets-test.js b/ui/core/tests/unit/controllers/scopes/scope/projects/project/targets-test.js deleted file mode 100644 index 738a97d05..000000000 --- a/ui/core/tests/unit/controllers/scopes/scope/projects/project/targets-test.js +++ /dev/null @@ -1,16 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module('Unit | Controller | scopes/scope/projects/project/targets', function ( - hooks -) { - setupTest(hooks); - - // Replace this with your real tests. - test('it exists', function (assert) { - let controller = this.owner.lookup( - 'controller:scopes/scope/projects/project/targets' - ); - assert.ok(controller); - }); -}); diff --git a/ui/core/tests/unit/controllers/scopes/scope/projects/project/targets/new-test.js b/ui/core/tests/unit/controllers/scopes/scope/projects/project/targets/new-test.js deleted file mode 100644 index d4e27841c..000000000 --- a/ui/core/tests/unit/controllers/scopes/scope/projects/project/targets/new-test.js +++ /dev/null @@ -1,17 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Controller | scopes/scope/projects/project/targets/new', - function (hooks) { - setupTest(hooks); - - // Replace this with your real tests. - test('it exists', function (assert) { - let controller = this.owner.lookup( - 'controller:scopes/scope/projects/project/targets/new' - ); - assert.ok(controller); - }); - } -); diff --git a/ui/core/tests/unit/controllers/scopes/scope/projects/project/targets/target-test.js b/ui/core/tests/unit/controllers/scopes/scope/projects/project/targets/target-test.js deleted file mode 100644 index 982aa3005..000000000 --- a/ui/core/tests/unit/controllers/scopes/scope/projects/project/targets/target-test.js +++ /dev/null @@ -1,17 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Controller | scopes/scope/projects/project/targets/target', - function (hooks) { - setupTest(hooks); - - // Replace this with your real tests. - test('it exists', function (assert) { - let controller = this.owner.lookup( - 'controller:scopes/scope/projects/project/targets/target' - ); - assert.ok(controller); - }); - } -); diff --git a/ui/core/tests/unit/controllers/scopes/scope/projects/project/targets/target/add-host-sets-test.js b/ui/core/tests/unit/controllers/scopes/scope/projects/project/targets/target/add-host-sets-test.js deleted file mode 100644 index 2c14ea978..000000000 --- a/ui/core/tests/unit/controllers/scopes/scope/projects/project/targets/target/add-host-sets-test.js +++ /dev/null @@ -1,17 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Controller | scopes/scope/projects/project/targets/target/add-host-sets', - function (hooks) { - setupTest(hooks); - - // Replace this with your real tests. - test('it exists', function (assert) { - let controller = this.owner.lookup( - 'controller:scopes/scope/projects/project/targets/target/add-host-sets' - ); - assert.ok(controller); - }); - } -); diff --git a/ui/core/tests/unit/controllers/scopes/scope/projects/project/targets/target/host-sets-test.js b/ui/core/tests/unit/controllers/scopes/scope/projects/project/targets/target/host-sets-test.js deleted file mode 100644 index 4708b25e9..000000000 --- a/ui/core/tests/unit/controllers/scopes/scope/projects/project/targets/target/host-sets-test.js +++ /dev/null @@ -1,17 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Controller | scopes/scope/projects/project/targets/target/host-sets', - function (hooks) { - setupTest(hooks); - - // Replace this with your real tests. - test('it exists', function (assert) { - let controller = this.owner.lookup( - 'controller:scopes/scope/projects/project/targets/target/host-sets' - ); - assert.ok(controller); - }); - } -); diff --git a/ui/core/tests/unit/routes/scopes/scope/orgs-test.js b/ui/core/tests/unit/routes/scopes/scope/orgs-test.js deleted file mode 100644 index 860f214b3..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/orgs-test.js +++ /dev/null @@ -1,11 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module('Unit | Route | scopes/scope/orgs', function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup('route:scopes/scope/orgs'); - assert.ok(route); - }); -}); diff --git a/ui/core/tests/unit/routes/scopes/scope/orgs/index-test.js b/ui/core/tests/unit/routes/scopes/scope/orgs/index-test.js deleted file mode 100644 index 9dde8b948..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/orgs/index-test.js +++ /dev/null @@ -1,11 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module('Unit | Route | scopes/scope/orgs/index', function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup('route:scopes/scope/orgs/index'); - assert.ok(route); - }); -}); diff --git a/ui/core/tests/unit/routes/scopes/scope/orgs/new-test.js b/ui/core/tests/unit/routes/scopes/scope/orgs/new-test.js deleted file mode 100644 index 15aa7691f..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/orgs/new-test.js +++ /dev/null @@ -1,11 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module('Unit | Route | scopes/scope/orgs/new', function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup('route:scopes/scope/orgs/new'); - assert.ok(route); - }); -}); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects-test.js b/ui/core/tests/unit/routes/scopes/scope/projects-test.js deleted file mode 100644 index 127213dac..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects-test.js +++ /dev/null @@ -1,11 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module('Unit | Route | scopes/scope/projects', function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup('route:scopes/scope/projects'); - assert.ok(route); - }); -}); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/index-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/index-test.js deleted file mode 100644 index 74a15f224..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects/index-test.js +++ /dev/null @@ -1,11 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module('Unit | Route | scopes/scope/projects/index', function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup('route:scopes/scope/projects/index'); - assert.ok(route); - }); -}); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/new-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/new-test.js deleted file mode 100644 index 8c28e87b5..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects/new-test.js +++ /dev/null @@ -1,11 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module('Unit | Route | scopes/scope/projects/new', function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup('route:scopes/scope/projects/new'); - assert.ok(route); - }); -}); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project-test.js deleted file mode 100644 index ed0ffe51a..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects/project-test.js +++ /dev/null @@ -1,11 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module('Unit | Route | scopes/scope/projects/project', function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup('route:scopes/scope/projects/project'); - assert.ok(route); - }); -}); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs-test.js deleted file mode 100644 index 30ac55d7a..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs-test.js +++ /dev/null @@ -1,15 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module('Unit | Route | scopes/scope/projects/project/host-catalogs', function ( - hooks -) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup( - 'route:scopes/scope/projects/project/host-catalogs' - ); - assert.ok(route); - }); -}); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog-test.js deleted file mode 100644 index 4855fd74a..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog-test.js +++ /dev/null @@ -1,16 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Route | scopes/scope/projects/project/host-catalogs/host-catalog', - function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup( - 'route:scopes/scope/projects/project/host-catalogs/host-catalog' - ); - assert.ok(route); - }); - } -); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets-test.js deleted file mode 100644 index f57da0c59..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets-test.js +++ /dev/null @@ -1,16 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Route | scopes/scope/projects/project/host-catalogs/host-catalog/host-sets', - function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup( - 'route:scopes/scope/projects/project/host-catalogs/host-catalog/host-sets' - ); - assert.ok(route); - }); - } -); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set-test.js deleted file mode 100644 index 6b6057ddf..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set-test.js +++ /dev/null @@ -1,16 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Route | scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set', - function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup( - 'route:scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set' - ); - assert.ok(route); - }); - } -); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/add-hosts-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/add-hosts-test.js deleted file mode 100644 index b93eea3c7..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/add-hosts-test.js +++ /dev/null @@ -1,16 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Route | scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/add-hosts', - function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup( - 'route:scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/add-hosts' - ); - assert.ok(route); - }); - } -); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/create-host-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/create-host-test.js deleted file mode 100644 index ad9e0c61e..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/create-host-test.js +++ /dev/null @@ -1,11 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module('Unit | Route | scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/create-host', function(hooks) { - setupTest(hooks); - - test('it exists', function(assert) { - let route = this.owner.lookup('route:scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/create-host'); - assert.ok(route); - }); -}); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/hosts-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/hosts-test.js deleted file mode 100644 index c527a620f..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/hosts-test.js +++ /dev/null @@ -1,16 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Route | scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/hosts', - function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup( - 'route:scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/hosts' - ); - assert.ok(route); - }); - } -); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/index-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/index-test.js deleted file mode 100644 index 3454fcc25..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/index-test.js +++ /dev/null @@ -1,16 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Route | scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/index', - function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup( - 'route:scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/index' - ); - assert.ok(route); - }); - } -); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/index-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/index-test.js deleted file mode 100644 index 781e1b605..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/index-test.js +++ /dev/null @@ -1,16 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Route | scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/index', - function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup( - 'route:scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/index' - ); - assert.ok(route); - }); - } -); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new-test.js deleted file mode 100644 index 74cda4552..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new-test.js +++ /dev/null @@ -1,16 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Route | scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new', - function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup( - 'route:scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new' - ); - assert.ok(route); - }); - } -); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts-test.js deleted file mode 100644 index 24a7ab5e9..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts-test.js +++ /dev/null @@ -1,16 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Route | scopes/scope/projects/project/host-catalogs/host-catalog/hosts', - function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup( - 'route:scopes/scope/projects/project/host-catalogs/host-catalog/hosts' - ); - assert.ok(route); - }); - } -); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host-test.js deleted file mode 100644 index 4c1510f8b..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host-test.js +++ /dev/null @@ -1,16 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Route | scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host', - function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup( - 'route:scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host' - ); - assert.ok(route); - }); - } -); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/index-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/index-test.js deleted file mode 100644 index cb7589b5a..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/index-test.js +++ /dev/null @@ -1,16 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Route | scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/index', - function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup( - 'route:scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/index' - ); - assert.ok(route); - }); - } -); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/index-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/index-test.js deleted file mode 100644 index 4250615d8..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/index-test.js +++ /dev/null @@ -1,16 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Route | scopes/scope/projects/project/host-catalogs/host-catalog/hosts/index', - function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup( - 'route:scopes/scope/projects/project/host-catalogs/host-catalog/hosts/index' - ); - assert.ok(route); - }); - } -); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/new-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/new-test.js deleted file mode 100644 index c4f727b6e..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/new-test.js +++ /dev/null @@ -1,16 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Route | scopes/scope/projects/project/host-catalogs/host-catalog/hosts/new', - function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup( - 'route:scopes/scope/projects/project/host-catalogs/host-catalog/hosts/new' - ); - assert.ok(route); - }); - } -); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/index-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/index-test.js deleted file mode 100644 index e440523af..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/index-test.js +++ /dev/null @@ -1,16 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Route | scopes/scope/projects/project/host-catalogs/host-catalog/index', - function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup( - 'route:scopes/scope/projects/project/host-catalogs/host-catalog/index' - ); - assert.ok(route); - }); - } -); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/index-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/index-test.js deleted file mode 100644 index aa6495519..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/index-test.js +++ /dev/null @@ -1,16 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Route | scopes/scope/projects/project/host-catalogs/index', - function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup( - 'route:scopes/scope/projects/project/host-catalogs/index' - ); - assert.ok(route); - }); - } -); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/new-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/new-test.js deleted file mode 100644 index 60ca74f13..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/new-test.js +++ /dev/null @@ -1,16 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Route | scopes/scope/projects/project/host-catalogs/new', - function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup( - 'route:scopes/scope/projects/project/host-catalogs/new' - ); - assert.ok(route); - }); - } -); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/index-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/index-test.js deleted file mode 100644 index f14370229..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects/project/index-test.js +++ /dev/null @@ -1,11 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module('Unit | Route | scopes/scope/projects/project/index', function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup('route:scopes/scope/projects/project/index'); - assert.ok(route); - }); -}); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/sessions-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/sessions-test.js deleted file mode 100644 index 70769438e..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects/project/sessions-test.js +++ /dev/null @@ -1,11 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module('Unit | Route | scopes/scope/projects/project/sessions', function(hooks) { - setupTest(hooks); - - test('it exists', function(assert) { - let route = this.owner.lookup('route:scopes/scope/projects/project/sessions'); - assert.ok(route); - }); -}); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/sessions/index-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/sessions/index-test.js deleted file mode 100644 index a774bf223..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects/project/sessions/index-test.js +++ /dev/null @@ -1,11 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module('Unit | Route | scopes/scope/projects/project/sessions/index', function(hooks) { - setupTest(hooks); - - test('it exists', function(assert) { - let route = this.owner.lookup('route:scopes/scope/projects/project/sessions/index'); - assert.ok(route); - }); -}); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/targets-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/targets-test.js deleted file mode 100644 index 24a8476c4..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects/project/targets-test.js +++ /dev/null @@ -1,15 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module('Unit | Route | scopes/scope/projects/project/targets', function ( - hooks -) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup( - 'route:scopes/scope/projects/project/targets' - ); - assert.ok(route); - }); -}); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/targets/index-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/targets/index-test.js deleted file mode 100644 index 7d77e93a0..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects/project/targets/index-test.js +++ /dev/null @@ -1,15 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module('Unit | Route | scopes/scope/projects/project/targets/index', function ( - hooks -) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup( - 'route:scopes/scope/projects/project/targets/index' - ); - assert.ok(route); - }); -}); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/targets/new-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/targets/new-test.js deleted file mode 100644 index a4b79d78c..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects/project/targets/new-test.js +++ /dev/null @@ -1,15 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module('Unit | Route | scopes/scope/projects/project/targets/new', function ( - hooks -) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup( - 'route:scopes/scope/projects/project/targets/new' - ); - assert.ok(route); - }); -}); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/targets/target-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/targets/target-test.js deleted file mode 100644 index 22acb8b9e..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects/project/targets/target-test.js +++ /dev/null @@ -1,15 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module('Unit | Route | scopes/scope/projects/project/targets/target', function ( - hooks -) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup( - 'route:scopes/scope/projects/project/targets/target' - ); - assert.ok(route); - }); -}); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/targets/target/add-host-sets-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/targets/target/add-host-sets-test.js deleted file mode 100644 index 3238718e1..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects/project/targets/target/add-host-sets-test.js +++ /dev/null @@ -1,16 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Route | scopes/scope/projects/project/targets/target/add-host-sets', - function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup( - 'route:scopes/scope/projects/project/targets/target/add-host-sets' - ); - assert.ok(route); - }); - } -); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/targets/target/host-sets-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/targets/target/host-sets-test.js deleted file mode 100644 index 063b787d5..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects/project/targets/target/host-sets-test.js +++ /dev/null @@ -1,16 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Route | scopes/scope/projects/project/targets/target/host-sets', - function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup( - 'route:scopes/scope/projects/project/targets/target/host-sets' - ); - assert.ok(route); - }); - } -); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/targets/target/host-sets/host-set-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/targets/target/host-sets/host-set-test.js deleted file mode 100644 index afc25f627..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects/project/targets/target/host-sets/host-set-test.js +++ /dev/null @@ -1,16 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Route | scopes/scope/projects/project/targets/target/host-sets/host-set', - function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup( - 'route:scopes/scope/projects/project/targets/target/host-sets/host-set' - ); - assert.ok(route); - }); - } -); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/targets/target/index-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/targets/target/index-test.js deleted file mode 100644 index ec0c8507b..000000000 --- a/ui/core/tests/unit/routes/scopes/scope/projects/project/targets/target/index-test.js +++ /dev/null @@ -1,16 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Route | scopes/scope/projects/project/targets/target/index', - function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup( - 'route:scopes/scope/projects/project/targets/target/index' - ); - assert.ok(route); - }); - } -);