Compare commits

..
510 Commits
Author SHA1 Message Date
Susmitha Girumala f7a2f28e06 Merge pull request #869 from hashicorp/cli-version-bump-desktop-client
Bump desktop client version
2021-11-18 22:18:20 -05:00
Carlos Alcaide Corvo 6f5e6e2b92 Bump desktop client version 2021-11-18 18:39:45 -08:00
Dharini Jeeva c19037c04d Merge pull request #868 from hashicorp/enable-filter-desktop
chore: 🤖 enable filters on desktop
2021-11-18 09:19:28 -08:00
dharini e5a12a99d0 chore: 🤖 enable filters on desktop 2021-11-18 09:05:47 -08:00
Susmitha Girumala 7cde3c1143 Merge pull request #867 from hashicorp/doc-changelog
docs:  update changelog for 1.4.0
2021-11-18 10:13:17 -05:00
Susmitha Girumala 7463f5875f Merge branch 'main' into doc-changelog 2021-11-18 10:01:22 -05:00
Randall Morey da3321cd2d docs: update changelog for 1.4.0 2021-11-18 09:59:47 -05:00
Susmitha Girumala c460e29f75 Merge pull request #866 from hashicorp/fix-cli-version
Fix: Trim CLI version in Desktop Config
2021-11-18 09:58:06 -05:00
Susmitha Girumala 9191b413d5 fix: Trim cli version 2021-11-18 09:45:46 -05:00
Susmitha Girumala ee40b2bbef Fix: remove newline in version file 2021-11-18 09:39:42 -05:00
Dharini Jeeva c5e6eb5bb7 Merge pull request #865 from hashicorp/bump-version
Change CLI version
2021-11-17 15:49:06 -08:00
Carlos Alcaide Corvo 8985528343 Change CLI version 2021-11-17 15:17:07 -08:00
Dharini Jeeva 8193aac845 Merge pull request #863 from hashicorp/add-default-filters
Add default filters
2021-11-16 13:42:53 -08:00
Dharini Jeeva 4500e7cfe8 Merge branch 'main' into add-default-filters 2021-11-16 13:32:34 -08:00
Susmitha Girumala 5e84ffa663 Merge pull request #861 from hashicorp/feature-activate-feature-flag-production
feat: 🎸 Add managed groups featuer flag for production
2021-11-16 16:30:43 -05:00
Carlos Alcaide Corvo 08b994a4eb Activate managed-groups feature flag by default, remove environment specific flags 2021-11-16 13:00:13 -08:00
Carlos Alcaide Corvo b9351cec5b feat: 🎸 Add managed groups featuer flag for production 2021-11-16 12:59:19 -08:00
Dharini Jeeva 48f65b1389 Merge branch 'main' into add-default-filters 2021-11-16 12:47:02 -08:00
Susmitha Girumala 4b00b28814 Merge pull request #862 from hashicorp/enable-resource-filters-admin
feat: enable resource filter flags and clean up dev flags
2021-11-16 15:46:55 -05:00
dharini 5a4e9d17ec add default filters to desktop sessions 2021-11-16 12:42:22 -08:00
dharini 018733b1b9 Merge branch 'main' into add-default-filters 2021-11-16 12:39:56 -08:00
dharini 1b662a40df chore: 🤖 add default filters to sessions admin 2021-11-16 12:39:16 -08:00
Susmitha Girumala b64eff482f Merge branch 'main' into enable-resource-filters-admin 2021-11-16 15:31:03 -05:00
Susmitha Girumala 3c4a093bf7 Merge pull request #860 from hashicorp/feature-desktop-sessions-filter
Feature desktop sessions filter
2021-11-16 15:30:53 -05:00
dharini 3921e69fa8 chore: 🤖 cleanup dev flags 2021-11-16 11:02:29 -08:00
dharini 6efebd7f45 fix: 🐛 undo dev mode 2021-11-16 10:40:14 -08:00
dharini 3e87ea6c1b feat: 🎸 add toolbar to desktop sessions 2021-11-16 10:30:00 -08:00
dharini e25b36d50e Merge branch 'main' into feature-desktop-sessions-filter 2021-11-16 09:25:47 -08:00
dharini 6c3a3ecb71 updates 2021-11-16 09:08:00 -08:00
Dharini Jeeva ff5f6c42f3 Merge pull request #858 from hashicorp/fix-bexp-generator
fix: 🐛 eliminate null clauses from expression output
2021-11-16 09:06:40 -08:00
Randall Morey e6fe453222 fix: 🐛 eliminate null clauses from expression output 2021-11-16 11:27:59 -05:00
Dharini Jeeva 327dc71c00 Merge pull request #857 from hashicorp/feature-sessions-admin-filters
Feature sessions admin filters
2021-11-15 14:38:36 -08:00
dharini ac3d42ba41 chore: 🤖 add feature flag to toolbar 2021-11-15 13:49:19 -08:00
dharini bfa240cc9e fix: 🐛 lint 2021-11-15 11:42:02 -08:00
Dharini Jeeva cdba23e4cc Update index.hbs 2021-11-15 11:26:48 -08:00
Dharini Jeeva 6310a26661 Update index.hbs 2021-11-15 11:26:13 -08:00
dharini 9c7b0e529e fix: 🐛 lint again! 2021-11-15 11:19:22 -08:00
dharini 3ce3e598bf fix: 🐛 lint 2021-11-15 11:06:16 -08:00
dharini c0164f7e66 fix: 🐛 lint 2021-11-15 10:57:38 -08:00
dharini 63872ce36c feat: 🎸 add filters to sessions 2021-11-15 10:38:21 -08:00
dharini a096824b20 init 2021-11-15 10:11:07 -08:00
Randall Morey 297f2b158b Merge pull request #845 from hashicorp/feature-auth-methods-filters
Auth methods filters
2021-11-15 09:39:43 -05:00
Randall Morey 22b522dba1 Merge branch 'main' into feature-auth-methods-filters 2021-11-13 09:45:51 -05:00
Randall Morey 0ac7d96919 Merge pull request #853 from hashicorp/checkbox-style-updates
Checkbox style updates
2021-11-13 09:45:09 -05:00
Randall Morey 374614b7d1 make dropdown badge darker 2021-11-13 09:41:39 -05:00
dharini a763498b1f Merge branch 'checkbox-style-updates' of github.com:hashicorp/boundary-ui into checkbox-style-updates 2021-11-12 15:16:04 -08:00
dharini 743b281c72 fix: 🐛 vertically align checkbox 2021-11-12 15:15:52 -08:00
Dharini Jeeva 6d47193fcc Merge branch 'main' into checkbox-style-updates 2021-11-12 14:49:16 -08:00
Randall Morey 9c95e77597 Merge branch 'main' into feature-auth-methods-filters 2021-11-12 17:37:04 -05:00
dharini ece0a09872 fix: 🐛 add padding 2021-11-12 14:16:38 -08:00
Susmitha Girumala a5650ea104 Merge pull request #855 from hashicorp/feature-managed-groups-members
feat: List accounts within a managed group
2021-11-12 17:10:50 -05:00
dharini 5bb4cfc853 fix: 🐛 updates to checkbox- border color, size 2021-11-12 13:43:44 -08:00
Carlos Alcaide Corvo ba048922bb Get back a deleted file 2021-11-12 13:37:44 -08:00
Carlos Alcaide Corvo 16daed592d Delete commented code 2021-11-12 13:24:31 -08:00
Carlos Alcaide Corvo b3809b2051 Refactor members controller location 2021-11-12 13:21:46 -08:00
Carlos Alcaide Corvo 7700603735 Refactor translation files 2021-11-12 13:17:57 -08:00
Randall Morey f7dd4e6b99 feature: add clear all filters feature 2021-11-12 16:11:45 -05:00
Carlos Alcaide CorvoandSusmitha Girumala c22a4c08f5 Update addons/core/translations/resources/en-us.yaml
Co-authored-by: Susmitha Girumala <susmitha@hashicorp.com>
2021-11-12 12:57:33 -08:00
Carlos Alcaide CorvoandSusmitha Girumala 27d25808f0 Update addons/core/translations/resources/en-us.yaml
Co-authored-by: Susmitha Girumala <susmitha@hashicorp.com>
2021-11-12 12:57:26 -08:00
Randall Morey f44c3d783f feature: show filter selection count in auth methods 2021-11-12 15:37:58 -05:00
Randall Morey be866ecf0c feat: 🎸 dropdown should support @count to display a count badge 2021-11-12 15:33:29 -05:00
dharini 79d1936755 undo outline changes 2021-11-12 11:37:08 -08:00
dharini 3191197cbf Merge branch 'checkbox-style-updates' of github.com:hashicorp/boundary-ui into checkbox-style-updates 2021-11-12 11:33:04 -08:00
dharini a71c31b685 style: 💄 make style consistent 2021-11-12 11:32:50 -08:00
Carlos Alcaide Corvo 7223f5a468 Merge branch 'main' into feature-managed-groups-members 2021-11-12 11:18:39 -08:00
Carlos Alcaide Corvo 21a70217f4 refactor: 💡 Refactor accounts to members 2021-11-12 11:18:03 -08:00
Carlos Alcaide Corvo 9e005a73bb Remove accounts route in favour of members 2021-11-12 10:31:13 -08:00
Carlos Alcaide Corvo 23c461fd3e Create members route 2021-11-12 10:24:46 -08:00
Dharini Jeeva 53abd4a941 Merge branch 'main' into checkbox-style-updates 2021-11-12 09:23:19 -08:00
Susmitha Girumala 651a9140e0 Merge pull request #850 from hashicorp/test-managed-groups-create
test: 💍 Add acceptance tests to create managed groups
2021-11-12 11:22:57 -05:00
Susmitha Girumala be5f033712 feat: List accounts within a managed group 2021-11-12 11:22:16 -05:00
Randall Morey 655d590353 chore: 🤖 reduce mock auth methods in global to 1 2021-11-12 10:26:30 -05:00
Susmitha Girumala cc151b001b test: Removed skipped managed group error notification test 2021-11-12 09:27:07 -05:00
Randall Morey 6b363b9dad Merge branch 'main' into feature-auth-methods-filters 2021-11-12 09:26:33 -05:00
Randall Morey 665e7445d3 feat: 🎸 add "no results" messaging when filtering down to zero 2021-11-12 09:25:43 -05:00
Susmitha Girumala df843b9632 Merge branch 'main' into test-managed-groups-create 2021-11-12 09:15:57 -05:00
dharini 58106a3f45 checkbox style updates 2021-11-11 16:43:43 -08:00
dharini c3c5282a04 fix: 🐛 checkbox filter
--
2021-11-11 16:41:08 -08:00
Susmitha Girumala ff5cc71f60 Merge pull request #854 from hashicorp/feature-managed-groups-edit
Managed Groups Edit Integration
2021-11-11 18:11:56 -05:00
Susmitha Girumala 590c19e839 Merge branch 'main' into feature-managed-groups-edit 2021-11-11 17:59:23 -05:00
Susmitha Girumala 6ba9ffc3af chore: Managed groups edit integration fix 2021-11-11 17:58:08 -05:00
Susmitha Girumala a63218131c Merge pull request #848 from hashicorp/feature-managed-groups-breadcrumbs
feat: 🎸 Add breadcrumbs to managed groups
2021-11-11 17:08:46 -05:00
Susmitha Girumala afec300c99 Merge branch 'main' into feature-managed-groups-breadcrumbs 2021-11-11 16:57:43 -05:00
Susmitha Girumala 8061bff752 Merge pull request #847 from hashicorp/feature-managed-groups-capabilities
feat: 🎸 Add capabilities to managed groups
2021-11-11 16:57:35 -05:00
Susmitha Girumala fa9e3e576b Merge pull request #849 from hashicorp/test-managed-groups-list
test: 💍 Add acceptance test to list managed groups
2021-11-11 16:57:07 -05:00
Susmitha Girumala dec18e3d6a Merge pull request #851 from hashicorp/test-managed-groups-delete
test: 💍 Add acceptance test to delete managed groups
2021-11-11 16:20:16 -05:00
Susmitha Girumala d1dbc3090c Merge pull request #852 from hashicorp/test-managed-groups-read
test: 💍 Add acceptance test to read managed groups
2021-11-11 15:56:49 -05:00
Susmitha Girumala d328e3ce69 Merge branch 'main' into feature-managed-groups-capabilities 2021-11-11 15:56:07 -05:00
Randall Morey d1726e9907 Merge pull request #844 from hashicorp/feature-resource-filter-system
Resource filter param system
2021-11-11 14:56:39 -05:00
Dharini Jeeva 75d7f7dac7 Merge branch 'main' into feature-resource-filter-system 2021-11-11 10:55:45 -08:00
Dharini Jeeva 6d8fddc3cb Merge branch 'main' into checkbox-style-updates 2021-11-11 10:52:46 -08:00
dharini 4d3fb11606 Merge branch 'checkbox-style-updates' of github.com:hashicorp/boundary-ui into checkbox-style-updates 2021-11-11 10:52:15 -08:00
dharini 6b2286a66c lint 2021-11-11 10:52:10 -08:00
Dharini Jeeva 8714627d6f Update _item.scss 2021-11-11 10:47:37 -08:00
Dharini Jeeva 2cbde35248 Update index.stories.mdx 2021-11-11 10:32:46 -08:00
dharini 1ff91f5757 style: 💄 right align checkbox and toggle outline 2021-11-11 09:51:41 -08:00
Susmitha Girumala 19f4ea609a Merge branch 'main' into feature-managed-groups-capabilities 2021-11-11 11:45:40 -05:00
Susmitha Girumala b7214c55a4 Merge pull request #846 from hashicorp/feature-managed-group-create
Feature managed group create
2021-11-11 11:45:22 -05:00
Susmitha Girumala 05cf14e8b4 style: Remove commented mirage config for managed groups 2021-11-11 10:05:04 -05:00
Susmitha Girumala 80520a2f4d Merge branch 'main' into feature-managed-group-create 2021-11-11 09:36:01 -05:00
Susmitha Girumala e11ae54f4d Merge pull request #842 from hashicorp/feature-managed-group-delete
feat: 🎸 Add managed groups delete CRUD operation
2021-11-11 09:35:36 -05:00
dharini a4dca84e62 dropdown- checkbox styles 2021-11-10 21:36:42 -08:00
Carlos Alcaide Corvo 50a9a980ed test: 💍 Add acceptance test to read managed groups
Add acceptance test to read managed groups
2021-11-10 17:34:31 -08:00
Carlos Alcaide Corvo 19d8bc44c8 Fix lint error 2021-11-10 17:26:27 -08:00
Carlos Alcaide Corvo bf8392ff9f test: 💍 Add acceptance test to delete managed groups
Add acceptance test to delete managed groups
2021-11-10 17:19:04 -08:00
Carlos Alcaide Corvo 74d161f6f5 test: 💍 Add acceptance tests to create managed groups
Add acceptance test to create managed groups
2021-11-10 16:49:41 -08:00
Carlos Alcaide Corvo b646e78e0f test: 💍 Add acceptance test to list managed groups
Add acceptance tests to list managed groups
2021-11-10 16:07:18 -08:00
Carlos Alcaide Corvo 412f4a8008 Merge branch 'main' into feature-managed-group-delete 2021-11-10 15:18:23 -08:00
Carlos Alcaide Corvo ba73a89d8f feat: 🎸 Add breadcrumbs to managed groups
Add breadcrumbs to managed groups
2021-11-10 15:10:51 -08:00
Carlos Alcaide Corvo 1225774806 Fix lint error 2021-11-10 14:51:17 -08:00
Carlos Alcaide Corvo 6cb056eba3 Merge pull request #841 from hashicorp/feature-managed-group-read
Feature managed groups read CRUD
2021-11-10 14:49:31 -08:00
Carlos Alcaide Corvo 07aaa8fcde Fix typo on description 2021-11-10 14:40:16 -08:00
Carlos Alcaide Corvo 8a11a76b49 feat: 🎸 Add capabilities to managed groups
Add capabilities to managed groups
2021-11-10 14:24:46 -08:00
Randall Morey 08c5f1db22 chore: i18n filters 2021-11-10 16:18:41 -05:00
Susmitha Girumala 7c762c1050 fix: Mirage post issue for managed-groups 2021-11-10 16:12:42 -05:00
Randall Morey bbd0847a21 chore: 🤖 initial auth methods resource filtering by type 2021-11-10 12:40:07 -05:00
Carlos Alcaide Corvo 4e41ac531d WIP fixing creation mirage model error 2021-11-10 09:07:17 -08:00
Randall Morey a47657edf4 fix: checkboxgroup should be exposed on form 2021-11-10 11:46:48 -05:00
Randall Morey 1935771a70 apply filtering to auth-methods mocks and fix null handling 2021-11-10 11:25:02 -05:00
Randall Morey 80a82ea925 fix: use paramsFor 2021-11-10 11:01:00 -05:00
Carlos Alcaide Corvo deb9847617 feat: 🎸 Add managed groups create CRUD operation 2021-11-10 07:54:49 -08:00
Carlos Alcaide Corvo 2f1feab9d3 feat: 🎸 Add managed groups delete CRUD operation 2021-11-10 07:49:50 -08:00
Carlos Alcaide Corvo f3d8db6aaf Fix typo 2021-11-10 07:47:51 -08:00
Carlos Alcaide Corvo 259840808c Fix linting errors 2021-11-10 07:47:51 -08:00
Carlos Alcaide Corvo 9541d2ed5c Add helper text for filter field 2021-11-10 07:47:51 -08:00
Carlos Alcaide Corvo f8bb37e5af Add managed groups to auth method JUST if is type oidc. Within auth method, show the managed groups tabs JUST if type is oidc 2021-11-10 07:47:51 -08:00
Carlos Alcaide Corvo b7bf44b997 feat: 🎸 Add managed groups read CRUD
Add managed groups Read CRUD operation
2021-11-10 07:47:51 -08:00
Randall Morey f21627a9ba fix: value handling and helper recomputation 2021-11-10 10:38:16 -05:00
Carlos Alcaide Corvo 6bedc710d3 Merge pull request #838 from hashicorp/feature-list-managed-groups
Add managed-groups basic list route to admin
2021-11-10 07:09:15 -08:00
Randall Morey dca54b2040 fix: key names 2021-11-10 09:59:28 -05:00
Randall Morey c1b60c634e fix: currentroute again 2021-11-10 09:45:53 -05:00
Randall Morey 1562f0ff07 fix: router 2021-11-10 09:37:46 -05:00
Randall Morey 4f8ea30d9d fix: bad variable name 2021-11-10 09:35:19 -05:00
Randall Morey 4472b17fc5 chore: add export 2021-11-10 09:31:59 -05:00
Randall Morey 9ae05e3cc4 chore: add support for defaultValue 2021-11-10 09:12:02 -05:00
Randall Morey 84511ba6d4 feat: 🎸 initial resource filter param system 2021-11-09 20:09:23 -05:00
Carlos Alcaide Corvo 1fc0d3eae8 Merge branch 'main' into feature-list-managed-groups 2021-11-09 11:38:23 -08:00
Randall Morey ac1d54565c Merge pull request #840 from hashicorp/filterable-store-api-addon
ResourceFilterStoreService
2021-11-09 14:30:16 -05:00
Randall MoreyandDharini Jeeva c2ebbcb735 Update addons/api/addon/services/resource-filter-store.js
Co-authored-by: Dharini Jeeva <dharini@hashicorp.com>
2021-11-09 13:50:10 -05:00
Randall Morey d1ce2ac9ea docs: improve doc comments 2021-11-09 13:34:35 -05:00
Randall Morey 27e0daaee0 Merge branch 'main' into filterable-store-api-addon 2021-11-09 12:44:49 -05:00
Randall Morey 751a72a2d8 feat: 🎸 tweak resource-filter service and apply to sessions 2021-11-09 12:42:39 -05:00
Carlos Alcaide Corvo ff88e97bfe feat: 🎸 List managed groups 2021-11-08 11:16:32 -08:00
Carlos Alcaide Corvo 288b32f862 Add managed-groups basic route to admin. Wrap all in a feature flag 2021-11-08 07:48:57 -08:00
Carlos Alcaide Corvo 31575b900b Merge pull request #829 from hashicorp/feature-mirage-managed-groups
feat: 🎸 API managed groups mock mirage
2021-11-08 07:39:58 -08:00
Carlos Alcaide Corvo 8c0dbd0558 Merge branch 'main' into feature-mirage-managed-groups 2021-11-08 07:22:25 -08:00
Carlos Alcaide Corvo aa066b197c Merge pull request #827 from hashicorp/feature-api-modeling-managed-groups
Feature API modeling managed groups
2021-11-08 07:22:05 -08:00
Carlos Alcaide Corvo 6e8fd95cdb Merge branch 'main' into feature-api-modeling-managed-groups 2021-11-08 07:04:17 -08:00
Randall Morey d7c9d0f45b Merge pull request #837 from hashicorp/refactor-remove-get-config
Remove ember-get-config
2021-11-07 08:52:31 -05:00
Carlos Alcaide Corvo 7890513889 Delete sub collection of managed-group 2021-11-05 13:21:57 -07:00
Carlos Alcaide Corvo d417a084ed Merge branch 'main' into feature-api-modeling-managed-groups 2021-11-05 11:55:38 -07:00
Randall Morey 824188977d Merge branch 'main' into refactor-remove-get-config 2021-11-05 14:51:59 -04:00
Randall Morey bb605564ea Merge pull request #836 from hashicorp/fix-link-button
fix: 🐛 fix broken LinkButton component and associated new tests
2021-11-05 14:50:43 -04:00
Randall Morey 4496a42b16 refactor: 💡 remove last get-config use case 2021-11-05 14:50:29 -04:00
Randall Morey 02b97f8734 Merge branch 'fix-link-button' into refactor-remove-get-config 2021-11-05 14:25:25 -04:00
Randall Morey c68e1d9f49 fix: 🐛 fix broken LinkButton component and associated new tests 2021-11-05 14:23:20 -04:00
Carlos Alcaide Corvo 5534b25fa3 feat: 🎸 Refactor managed-groups to managed-group
Refactor naming from managed-groups to managed-group
2021-11-05 10:42:09 -07:00
Carlos Alcaide Corvo 202a22a170 feat: 🎸 Refactor managed-groups mirage serializer and model
Refactor managed-groups mirage serializer and model. Accomodate factory
and admin UI acceptance test.
2021-11-05 10:42:09 -07:00
Carlos Alcaide Corvo ef73f8dacd Refactor auth-method and managhed-group factory. This work is not finish. 2021-11-05 10:42:09 -07:00
Carlos Alcaide Corvo 101e6653d4 Suggestions from PR 2021-11-05 10:42:09 -07:00
Carlos Alcaide Corvo bd8b9d738f Add authMethodId to the mirage model 2021-11-05 10:42:09 -07:00
Carlos Alcaide Corvo 52b5739cdc feat: 🎸 API managed groups mock mirage
Add API managed groups mock in mirage
2021-11-05 10:42:09 -07:00
Carlos Alcaide Corvo 148b40195e Fix typo in key/value object for testing 2021-11-05 10:32:32 -07:00
Randall Morey 8000002b1b refactor: 💡 remove ember-get-config dep from core 2021-11-05 13:20:45 -04:00
Randall Morey 3aae7c124b chore: 🤖 remove lingering get-config instance 2021-11-05 12:33:09 -04:00
Carlos Alcaide Corvo 087e1346d3 feat: 🎸 Refactor serializer and model for managed-group
Refactor serializer and model with suggestions from previous PR for
managed-group.
2021-11-05 08:55:37 -07:00
Carlos Alcaide Corvo 14623a6386 feat: 🎸 Refactor all managed-group plurals to singular
Refactor all file names and classes declaration from managed-groups
(plural) to managed-group (singular)
2021-11-05 08:55:37 -07:00
Carlos Alcaide Corvo d506d4a015 Change typo on tests 2021-11-05 08:55:37 -07:00
Carlos Alcaide Corvo 285f711e78 Delete default value at model level for managed group type 2021-11-05 08:55:37 -07:00
Carlos Alcaide Corvo 5df6b6de11 feat: 🎸 Refactor modeling
Remove OIDC as default value for fragment field filter. Applied default
value OIDC to type field. Accomodate tests for the changes. Add a
readOnly serializer test. Delete from fragment serializer not
serializing readOnly, because that is a case it will never reproduce on
such model.
2021-11-05 08:55:37 -07:00
Carlos Alcaide Corvo 2620607cc3 feat: 🎸 Finish fragment serializer and tests
Finish fragment serializer and refactor the tests of the model to
accomadate the change.
2021-11-05 08:55:37 -07:00
Carlos Alcaide Corvo 499432522a Unfinished fragment managed groups modeling 2021-11-05 08:55:37 -07:00
Carlos Alcaide Corvo 6022d7fc36 Made member_ids readOnly 2021-11-05 08:55:37 -07:00
Carlos Alcaide Corvo 360bf0ffdd Refactor model 2021-11-05 08:55:37 -07:00
Carlos Alcaide Corvo 322828ccc4 First iteration API modeling managed groups 2021-11-05 08:55:37 -07:00
Randall Morey 9ad9bdbf5e refactor: 💡 remove dependency on ember-get-config 2021-11-05 11:52:12 -04:00
Randall Morey ae50e27725 Merge pull request #834 from hashicorp/chore-deprecations
Address deprecations
2021-11-04 14:37:21 -04:00
Randall Morey 91b8516cf0 Merge branch 'main' into chore-deprecations 2021-11-04 13:35:13 -04:00
Randall Morey 74c5e1593d Merge pull request #833 from hashicorp/chore-drop-ie11
Drop IE11 support
2021-11-04 13:35:03 -04:00
Randall Morey c1ae2e1c5b Merge branch 'main' into chore-drop-ie11 2021-11-04 11:23:18 -04:00
Randall Morey 76913eb2e3 Merge pull request #817 from hashicorp/chore-storybook-enhancement
add a11y addon to rose storybook
2021-11-04 11:22:00 -04:00
Randall Morey 6f35594f2a chore: 🤖 manual merge from main 2021-11-04 10:46:12 -04:00
Randall Morey fcfcc4e42a chore: convert LinkButton to template-only 2021-11-03 13:12:04 -04:00
Randall Morey fa50bb425a chore: 🤖 resolve to ember-cli-babel v7.26.6 2021-11-03 11:49:40 -04:00
Randall Morey 1f0720ecb4 chore: drop IE11 support 2021-11-03 11:15:55 -04:00
Susmitha Girumala cd6f87b796 test: Skip WIP test 2021-11-01 20:25:33 -04:00
Susmitha Girumala 82636e3ee9 feat: Refactor to ResourceFilteringStore service 2021-11-01 20:23:26 -04:00
Dharini Jeeva cedaad95c2 Merge pull request #831 from hashicorp/integration-toolbar
feat: 🎸 integrate toolbar onto session admin
2021-11-01 13:58:34 -07:00
dharini 35e0e969e2 feat: 🎸 integrate toolbar onto session admin 2021-11-01 12:05:09 -07:00
Susmitha Girumala 8c4a076367 test: Init filter store test for sessions 2021-11-01 15:01:12 -04:00
Susmitha Girumala df7bd5671a feat: Refactor to a filterable-store 2021-11-01 15:01:11 -04:00
Susmitha Girumala 8bf9a5f21e Merge pull request #810 from hashicorp/toolbar
feat: 🎸 toolbar component
2021-11-01 14:04:57 -04:00
dharini 0dbe073fc3 Merge branch 'toolbar' of github.com:hashicorp/boundary-ui into toolbar 2021-10-28 12:45:27 -07:00
dharini bdde9cc21d chore: 🤖 branch out sessions int logiv 2021-10-28 12:45:02 -07:00
Dharini Jeeva 2c8370a8a8 Merge branch 'main' into toolbar 2021-10-28 12:04:17 -07:00
Carlos Alcaide Corvo 766d232022 Merge pull request #825 from hashicorp/fix-forgot-run-yarn-install
fix: 🐛 Missed yarn.lock update
2021-10-28 12:02:59 -07:00
Carlos Alcaide Corvo 97d0d9057b fix: 🐛 Missed yarn.lock update
We miss to run `yarn install` at root level after deps change so did not
reflect changes on yarn.lock
2021-10-28 11:47:28 -07:00
Randall Morey 184aaa8f64 Merge pull request #824 from hashicorp/tweak-toolbar
Tweak toolbar
2021-10-28 13:08:16 -04:00
Randall Morey 6ed14cb1f1 chore: linting 2021-10-28 12:46:56 -04:00
Randall Morey c040f1188d chore: merge 2021-10-28 12:44:51 -04:00
dharini 715681b020 resolve merge conflicts 2021-10-28 09:19:20 -07:00
dharini 3254f4a050 fix: 🐛 remove grid layout 2021-10-28 09:10:31 -07:00
Randall Morey 324c5dd98c chore: fix formatting and update yarn lock 2021-10-28 11:53:31 -04:00
Randall Morey e9e6ad31fb Merge branch 'toolbar' into tweak-toolbar 2021-10-28 11:50:15 -04:00
Dharini Jeeva 1518b32a43 Update _toolbar.scss 2021-10-27 15:00:54 -07:00
Randall Morey 3209ac3a52 chore: 🤖 merge from main 2021-10-27 17:53:16 -04:00
Randall Morey ca03aca886 chore: 🤖 tweak tests and remove unused class file 2021-10-27 17:35:00 -04:00
dharini dfb2673c91 refactor: 💡 refactoring toolbar style using grid 2021-10-27 14:27:42 -07:00
Randall Morey 4328b4c6da tweak filter i18n label 2021-10-27 17:23:18 -04:00
dharini 6645eca25d chore: 🤖 enable feature flags in dev n test 2021-10-27 10:33:55 -07:00
dharini cf070fd5c4 Merge branch 'toolbar' of github.com:hashicorp/boundary-ui into toolbar 2021-10-26 10:42:49 -07:00
dharini 81a381b1e7 chore: 🤖 add feature flag for filter 2021-10-26 10:42:28 -07:00
Dharini Jeeva 95bea7a83b Merge branch 'main' into toolbar 2021-10-26 09:15:07 -07:00
dharini 085e901512 fix: 🐛 use sizing variable 2021-10-26 09:14:46 -07:00
Randall Morey b421d15e4e Merge pull request #822 from hashicorp/feature-checkbox-group
feat: 🎸 implement checkbox group component
2021-10-26 12:14:32 -04:00
Randall Morey 03b6d1aa9b chore: 🤖 update yarn lock 2021-10-26 10:42:46 -04:00
Randall Morey 5efc617299 Merge branch 'main' into feature-checkbox-group 2021-10-26 10:29:53 -04:00
Randall Morey f4065d9b6e Merge pull request #823 from hashicorp/chore-filter-deprecations
chore: 🤖 silence deprecation warnings
2021-10-26 10:28:48 -04:00
Randall Morey 544531a325 chore: 🤖 silence deprecation warnings 2021-10-26 09:02:33 -04:00
Carlos Alcaide Corvo 29939f02fe Merge pull request #816 from hashicorp/fix-rose-webpack-unmeet-peer-dep
fix: 🐛 Fix rose webpack unmet peer dep
2021-10-25 14:08:41 -07:00
Randall Morey f3a3c24542 feat: 🎸 implement checkbox group component 2021-10-25 16:56:16 -04:00
Carlos Alcaide Corvo 051add8e7d fix: 🐛 Fix rose webpack unmet peer dep
Fix Rose webpack unmet peer dependency
2021-10-25 13:24:34 -07:00
Randall Morey dda80dbb25 Merge pull request #821 from hashicorp/chore-ember-upgrade
Upgrade to Ember 3.28
2021-10-25 16:22:26 -04:00
Randall Morey ffa774e972 Merge branch 'main' into chore-ember-3.28 2021-10-25 15:07:00 -04:00
Randall Morey 449cdfe190 chore: 🤖 change let to const 2021-10-25 15:06:51 -04:00
Randall Morey 2d3c94b57e Merge pull request #818 from hashicorp/refactor-checkbox-changed
refactor: 💡 pass @onChange to checkbox components
2021-10-25 14:36:33 -04:00
Susmitha Girumala 3ede705fe1 Merge branch 'main' into refactor-checkbox-changed 2021-10-24 22:38:45 -04:00
Susmitha Girumala 119efb6911 Merge pull request #813 from hashicorp/fix-storybook-components-unmet-dep
fix: 🐛 Fix storybook/components unmet peer dependency
2021-10-24 22:35:16 -04:00
Susmitha Girumala 234793b06d Merge branch 'main' into fix-storybook-components-unmet-dep 2021-10-24 22:21:46 -04:00
Susmitha Girumala 984b3f6bce Merge pull request #815 from hashicorp/test-add-login-test-helper
Test add login test helper
2021-10-24 22:21:36 -04:00
Dharini Jeeva bfee928e45 Merge branch 'main' into toolbar 2021-10-24 16:32:37 -07:00
dharini 76975942de fix: 🐛 move store logic to route, replace height with padding 2021-10-24 16:19:29 -07:00
dharini 093019ba33 move store logic to route 2021-10-23 22:18:20 -07:00
Randall Morey 682ec89ddc chore: 🤖 upgrade to ember source 3.28 2021-10-23 12:55:23 -04:00
Randall Morey 0879a0430d chore: 🤖 upgrade deps for ember 3.28 and fix qunit lint errors 2021-10-23 11:48:10 -04:00
Randall Morey 22c5140dce chore: 🤖 remove ember-cli-update deps 2021-10-23 10:44:46 -04:00
Randall Morey 6397acb103 refactor: 💡 pass @onChange to checkbox components
this enables contextual usage
2021-10-22 18:06:32 -04:00
Carlos Alcaide Corvo eb5c88ac85 Merge branch 'main' into test-add-login-test-helper 2021-10-22 14:51:41 -07:00
Randall Morey d8dd0cf8bb add a11y addon to rose storybook 2021-10-22 17:19:06 -04:00
Randall Morey 966e18b1d7 Merge pull request #814 from hashicorp/refactor-filter-mocks
fix: 🐛 revert to quick serialization in bexpr-filter
2021-10-22 13:26:02 -04:00
Carlos Alcaide Corvo fd13808cc9 test: 💍 Add login test helper
Add login test helper and use such helper in the tests
2021-10-22 09:11:10 -07:00
Carlos Alcaide Corvo dbadbff1b9 Add login test helper. Use the new login test helper in targets test 2021-10-22 08:43:03 -07:00
Randall Morey b8f4053c23 fix: 🐛 revert to quick serialization in bexpr-filter 2021-10-22 09:20:21 -04:00
Carlos Alcaide Corvo 4d7c269d62 fix: 🐛 Fix storybook/components unmet peer dependency
Fix storybook/components unmet peer dependency
2021-10-21 17:01:41 -07:00
Randall Morey ace9e2a3ae Merge pull request #812 from hashicorp/refactor-filter-mocks
refactor: 💡 simplify/improve evaluator record serialization
2021-10-21 15:55:36 -04:00
Dharini Jeeva b17592402b Merge branch 'main' into toolbar 2021-10-21 12:34:41 -07:00
Dharini Jeeva 51f8a11555 Merge branch 'main' into refactor-filter-mocks 2021-10-21 12:30:41 -07:00
Dharini Jeeva a54a79715e Merge pull request #808 from hashicorp/input-icon-support
Input icon support
2021-10-21 10:17:16 -07:00
Dharini Jeeva f8655421ec Merge branch 'main' into input-icon-support 2021-10-21 09:42:01 -07:00
dharini 24ffef643f fix: 🐛 specificity 2021-10-21 09:41:03 -07:00
Randall Morey 55fca43361 Merge branch 'main' into refactor-filter-mocks 2021-10-21 11:52:11 -04:00
Randall Morey 96b1646614 refactor: 💡 simplify/improve evaluator record serialization 2021-10-21 11:39:53 -04:00
Randall Morey 02950980e2 Merge pull request #811 from hashicorp/chore-resource-filtering-mocks
chore: implement initial boolean expression filter for mirage mocks i…
2021-10-21 09:40:02 -04:00
Randall Morey 18aef45e63 Merge branch 'main' into chore-resource-filtering-mocks 2021-10-21 09:16:46 -04:00
Randall Morey 0c20ccfde0 fix: 🐛 quick-serialize records before applying boolean filter 2021-10-21 09:08:50 -04:00
Dharini Jeeva 833125a296 Merge branch 'main' into toolbar 2021-10-19 13:53:12 -07:00
Susmitha Girumala 3d7a40c88f Merge branch 'main' into input-icon-support 2021-10-19 16:50:50 -04:00
Randall Morey 0c14f16bbb Merge pull request #803 from hashicorp/amy/add-sb-metadata-2
Add Storybook metadata.json
2021-10-19 11:24:01 -04:00
Randall Morey 71108c3509 chore: implement initial boolean expression filter for mirage mocks in sessions index 2021-10-19 11:23:43 -04:00
Randall Morey fc0212c3fc Merge branch 'main' into amy/add-sb-metadata-2 2021-10-19 11:04:44 -04:00
Carlos Alcaide Corvo 3a9110ade6 Merge pull request #806 from hashicorp/refactor-click-workaround-test-helper
Refactor click workaround test helper
2021-10-19 07:47:00 -07:00
Dharini Jeeva f1a3a3bfb2 Update index.hbs 2021-10-18 15:11:28 -07:00
Randall Morey 497652efb2 Merge branch 'main' into amy/add-sb-metadata-2 2021-10-18 18:04:21 -04:00
dharini e13757aabb Merge branch 'input-icon-support' of github.com:hashicorp/boundary-ui into input-icon-support 2021-10-18 15:03:15 -07:00
dharini 18025e7493 fix: 🐛 undo 2021-10-18 15:02:42 -07:00
dharini 5c091e1b72 fix: 🐛 input updates 2021-10-18 14:55:40 -07:00
dharini 1dc4c396f8 fix: 🐛 class name update, css 2021-10-18 13:45:23 -07:00
dharini 8f5c60768c fix: 🐛 add height 2021-10-18 13:25:14 -07:00
Carlos Alcaide Corvo fd43d8ef59 refactor: 💡 Change function name and import 2021-10-18 12:52:39 -07:00
dharini 30049481fe :wq
:wq
`Merge branch 'toolbar' of github.com:hashicorp/boundary-ui into toolbar
2021-10-18 12:31:33 -07:00
dharini 1603aff862 fix: 🐛 style 2021-10-18 12:31:18 -07:00
Dharini Jeeva f8bb1aa605 Update index.stories.mdx 2021-10-18 12:14:36 -07:00
Dharini Jeeva 85e881aa8b Merge branch 'main' into toolbar 2021-10-18 12:12:07 -07:00
dharini f4b3b4a205 fix: 🐛 simplifying toolbar 2021-10-18 12:11:55 -07:00
Dharini Jeeva bf555f71bf Merge branch 'main' into input-icon-support 2021-10-18 12:04:26 -07:00
Carlos Alcaide Corvo a220b25449 Missed customClick refactor 2021-10-18 11:08:19 -07:00
Carlos Alcaide Corvo 50ef25fda1 Enhance function comments 2021-10-18 11:08:19 -07:00
Carlos Alcaide Corvo 9e6b051353 refactor: 💡 Add a custom click for test helpers
Add a custom click function, it does a workaround for an issue within
playwright. That function has been created in test helpers file
2021-10-18 11:08:19 -07:00
Carlos Alcaide Corvo c056b27176 refactor: 💡 Move returnExecutablePath to e2e test helpers
Move returnExecutablePath to end to end test helpers file. Now the two
test files are importing the function from the test helpers file.
2021-10-18 11:08:19 -07:00
Carlos Alcaide Corvo 4db7dc89c7 refactor: 💡 Create generateScreenshotPath as test helper
Create generateScreenshotPath as test helper
2021-10-18 11:08:19 -07:00
Carlos Alcaide Corvo 2a3c65678e Merge pull request #807 from hashicorp/fix-storybook-api-unmet-dep
fix: 🐛 Fix storybook/api unmet peer dependency
2021-10-18 11:07:24 -07:00
Randall Morey 09b119f71b Merge branch 'main' into amy/add-sb-metadata-2 2021-10-18 13:35:37 -04:00
dharini 116f86b51d test: 💍 fix style 2021-10-18 10:30:25 -07:00
dharini 2b7d3a327a test: 💍 fix classnames 2021-10-18 10:18:38 -07:00
dharini 6b7b5fd45d Merge branch 'toolbar' of github.com:hashicorp/boundary-ui into toolbar 2021-10-18 09:32:53 -07:00
dharini 684aa4a9f6 fix: 🐛 add flext to toolbar 2021-10-18 09:29:47 -07:00
Dharini Jeeva 6ca5b5eaea Merge branch 'main' into toolbar 2021-10-15 15:12:43 -07:00
Dharini Jeeva fa15aa4076 Merge branch 'main' into input-icon-support 2021-10-15 14:45:47 -07:00
Carlos Alcaide Corvo fe0ab37bdf Merge branch 'main' into fix-storybook-api-unmet-dep 2021-10-15 14:10:48 -07:00
Carlos Alcaide Corvo f2bbeb2c67 Merge pull request #804 from hashicorp/refactor-return-executable-path-test-helper
Move returnExecutablePath to e2e test helpers
2021-10-15 13:55:14 -07:00
Carlos Alcaide Corvo 6bcbf2b2ba Simplify conditionals with a switch 2021-10-15 13:40:14 -07:00
dharini 5874438705 feat: 🎸 sessions toolbar implement 2021-10-15 12:08:34 -07:00
Dharini Jeeva c0accf1eb8 Merge branch 'main' into input-icon-support 2021-10-15 11:13:11 -07:00
dharini b4e6dded82 fix: 🐛 undod 2021-10-15 10:48:56 -07:00
dharini 2a0174505f chore: 🤖 lint 2021-10-15 10:38:39 -07:00
Carlos Alcaide Corvo 4717af1530 Merge branch 'main' into fix-storybook-api-unmet-dep 2021-10-15 10:28:04 -07:00
dharini c0642f393f feat: 🎸 add icon support to input field 2021-10-15 10:25:09 -07:00
Carlos Alcaide Corvo a07e3f4e41 Forgot to commit change 2021-10-15 10:20:16 -07:00
Carlos Alcaide Corvo 5dd59a6c14 refactor: 💡 Move returnExecutablePath to e2e test helpers
Move returnExecutablePath to end to end test helpers file. Now the two
test files are importing the function from the test helpers file.
2021-10-15 09:58:04 -07:00
Carlos Alcaide Corvo 3600222178 refactor: 💡 Create generateScreenshotPath as test helper
Create generateScreenshotPath as test helper
2021-10-15 09:57:26 -07:00
Carlos Alcaide Corvo efe6108673 Merge pull request #801 from hashicorp/refactor-generate-screenshot-path-test-helper
refactor: 💡 Create generateScreenshotPath as test helper
2021-10-15 09:55:13 -07:00
Carlos Alcaide Corvo af2e111dcd Delete trailing slashes from path 2021-10-15 09:35:28 -07:00
Carlos Alcaide Corvo fe48e0eba2 refactor: 💡 Create generateScreenshotPath as test helper
Create generateScreenshotPath as test helper
2021-10-15 09:34:18 -07:00
Carlos Alcaide Corvo e0cee85ad4 test: 💍 Add connect to target e2e test
First iteration of connect to target end to end test
2021-10-15 09:34:18 -07:00
Carlos Alcaide Corvo 04d8b11dcd Merge pull request #795 from hashicorp/e2e-connect-to-target
test: 💍 Add connect to target e2e test
2021-10-15 09:28:45 -07:00
Carlos Alcaide Corvo 20172626cb Change selector for origin input field 2021-10-15 08:54:08 -07:00
Carlos Alcaide Corvo 960e91c8e5 Change the way we check we are in targets section. Now we check the url rather than the h2 title 2021-10-15 08:45:22 -07:00
Carlos Alcaide Corvo 9ad765327d Rename function 2021-10-15 08:45:22 -07:00
Carlos Alcaide Corvo 82c7638277 test: 💍 Add connect to target e2e test
First iteration of connect to target end to end test
2021-10-15 08:45:22 -07:00
Carlos Alcaide Corvo c21e7b9f20 fix: 🐛 Fix storybook/api unmet peer dependency 2021-10-14 13:53:09 -07:00
Amy Lam d19a251583 Add sb metadata
design-system-website is reading /metadata.json as HTML

Ref: https://github.com/hashicorp/structure/pull/81 and https://github.com/hashicorp/design-system-website/pull/20
2021-10-13 16:54:18 -07:00
Dharini Jeeva f35bd9c12a Merge pull request #802 from hashicorp/fix-forgot-run-install-deps
fix: 🐛 Forgot install deps after change
2021-10-13 16:28:23 -07:00
Carlos Alcaide Corvo 4eaf483b12 fix: 🐛 Forgot install deps after change 2021-10-13 15:02:33 -07:00
Carlos Alcaide Corvo 8aa7cfe5ee Merge pull request #799 from hashicorp/docs-add-temporary-manual-end-to-end-test-procedure
Docs add temporary manual end to end test procedure
2021-10-13 14:20:03 -07:00
Carlos Alcaide Corvo 944ccfb1b9 Simplify e2e yarn scripts 2021-10-13 10:42:32 -07:00
Carlos Alcaide Corvo 9bfe3a97fb docs: ✏️ Add temporary process to run e2e test suite
Add documentation to temporary process to run the end to end test suite.
2021-10-13 10:42:32 -07:00
Carlos Alcaide Corvo 94431c9dba Add documentation to readme. Add function to determinate where to execute Boundary Binary during tests 2021-10-13 10:42:32 -07:00
Randall Morey 3a3988827d Merge pull request #798 from hashicorp/amy/add-sb-extract
Add sb extract to enable Storybook composition
2021-10-13 12:28:07 -04:00
Amy Lam 3786054f0b Upgrade Storybook 2021-10-13 08:39:35 -07:00
Amy Lam 0bf6247936 Add sb extract to enable Storybook composition
Ref: https://github.com/hashicorp/cloud-ui/pull/1457 and https://github.com/hashicorp/design-system-website/blob/main/taskbox/.storybook/main.js
2021-10-13 08:39:32 -07:00
Susmitha Girumala 8cd3f4671f Merge pull request #772 from hashicorp/poc-authentication-playwright-end2end-desktop-client
test: 💍 Add Authentication end to end test
2021-10-13 09:23:15 -04:00
Carlos Alcaide Corvo e43e2fd4a8 Rename returnScreenshotPath to generateScreenshotPath function 2021-10-12 11:59:01 -07:00
Carlos Alcaide Corvo 9b3b7ed39f Delete forgoten testing code 2021-10-12 11:00:19 -07:00
Carlos Alcaide Corvo 83c2adb681 Separate AUTH tests suite per type 2021-10-12 08:45:12 -07:00
Carlos Alcaide 2e542109b0 test: 💍 Add Authenticate wrong user e2e test
Add Authenticate with worng user end to end test.
2021-10-12 08:45:12 -07:00
Carlos Alcaide 4d2cf122a1 Change yarn script name so CI does not run e2e tests 2021-10-12 08:45:12 -07:00
Carlos Alcaide ebe08911b5 test: 💍 Add Authentication end to end test
Add first suite of end to end tests using playwright. The first test is
Authentication with user/password
2021-10-12 08:45:12 -07:00
Randall Morey c39f706ec8 Merge pull request #791 from hashicorp/chore-enhanced-user-info
Show user "account name" wherever users are listed (if possible)
2021-10-12 10:07:07 -04:00
Randall Morey a01874ed57 style: tweak dropdown alignment 2021-10-12 09:49:55 -04:00
Randall Morey d398041e3a Merge branch 'chore-enhanced-user-info' of https://github.com/hashicorp/boundary-ui into chore-enhanced-user-info 2021-10-11 14:10:34 -04:00
Randall Morey c7e901ffd6 chore: 🤖 tweak whitespace and formatting 2021-10-11 14:10:21 -04:00
Dharini Jeeva 67aef56986 Merge branch 'main' into chore-enhanced-user-info 2021-10-07 12:19:29 -07:00
Carlos Alcaide Corvo 4dfaa057bf Merge pull request #794 from hashicorp/fix-changes-in-lock-file
fix: 🐛 Forgot to push yarn.lock changes
2021-10-07 07:16:56 -07:00
Carlos Alcaide Corvo 83d55ab3a6 fix: 🐛 Forgot to push yarn.lock changes
Forgot to push yarn.lock changes.
2021-10-07 07:02:49 -07:00
Carlos Alcaide Corvo 3ddde0d9b8 Merge pull request #793 from hashicorp/fix-api-babel-core-unmet-dependency
fix: 🐛 Fix API babel/core unmet dependency
2021-10-07 06:36:57 -07:00
Carlos Alcaide Corvo 35b69b1cbc Merge branch 'main' into fix-api-babel-core-unmet-dependency 2021-10-07 06:20:04 -07:00
Carlos Alcaide Corvo 9df876f218 Merge pull request #792 from hashicorp/fix-rose-react-unmet-dependency
fix: 🐛 Rose react unmet dependency
2021-10-07 06:19:09 -07:00
Carlos Alcaide Corvo 51b00c730f Add react-dom as dev dependency 2021-10-06 14:38:48 -07:00
Carlos Alcaide Corvo 04bfed87fe fix: 🐛 Fix API babel/core unmet dependency
Fix babel/core unmet dependency in API addon
2021-10-06 14:17:09 -07:00
Carlos Alcaide Corvo 034551d317 fix: 🐛 Rose react unmet dependency
Fix react unmet dependency in Rose
2021-10-06 13:43:49 -07:00
Randall Morey ca150daf25 Merge branch 'main' into chore-enhanced-user-info 2021-10-06 16:19:06 -04:00
Randall Morey 02682cb008 chore: 🤖 add user "account name" wherever users are listed 2021-10-06 16:00:23 -04:00
Carlos Alcaide Corvo f0dae60c4c Merge pull request #790 from hashicorp/docs-enhance-desktop-ui-yarn-scripts
Docs enhance desktop UI yarn scripts
2021-10-06 15:12:38 +02:00
Carlos Alcaide Corvo aed22a174b Merge branch 'main' into docs-enhance-desktop-ui-yarn-scripts 2021-10-05 22:29:58 +02:00
Carlos Alcaide Corvo 23341da979 Apply PR suggestions 2021-10-05 13:29:28 -07:00
Randall Morey adc64b6db4 Merge pull request #787 from hashicorp/feature-host-set-host-capabilities
feat: 🎸 implement host set host association capabilities
2021-10-05 13:06:40 -04:00
Randall Morey 5874ad8d30 Merge branch 'main' into feature-host-set-host-capabilities 2021-10-05 12:37:16 -04:00
Randall Morey 3386c3bba2 Merge pull request #786 from hashicorp/feature-group-member-capabilities
feat: 🎸 implement group members abilities
2021-10-05 12:37:04 -04:00
Randall Morey a2f23d5172 Merge branch 'main' into feature-group-member-capabilities 2021-10-04 16:23:15 -04:00
Randall Morey acceca3a43 Merge pull request #785 from hashicorp/feature-user-account-capabilities
feat: 🎸 implement user account association abilities
2021-10-04 16:23:04 -04:00
Randall Morey a3a5c21098 Merge branch 'main' into feature-user-account-capabilities 2021-10-04 16:00:39 -04:00
Randall Morey e8090b9d91 Merge pull request #783 from hashicorp/feature-role-capabilities
Feature role capabilities
2021-10-04 16:00:30 -04:00
Carlos Alcaide Corvo d8d22cd787 docs: ✏️ Enhance desktop UI yarn commands documentation
Enhance desktop UI yarn commands documentation
2021-10-04 12:54:44 -07:00
Randall Morey 07a3db19c5 Merge branch 'main' into feature-role-capabilities 2021-10-04 15:41:08 -04:00
Carlos Alcaide Corvo 10ec87eff6 Merge pull request #788 from hashicorp/fix-rose-storybook-addons-unmet-dependency
fix: 🐛 Fix rose storybook/addons unmet dependency
2021-10-04 21:18:46 +02:00
Randall Morey eab78bfe2c Merge branch 'main' into feature-role-capabilities 2021-10-04 15:13:42 -04:00
Carlos Alcaide Corvo 74eaed8bb6 fix: 🐛 Fix rose storybook/addons unmet dependency
Fix storybook/addoncs unmet peer dependency in Rose
2021-10-04 11:05:23 -07:00
Carlos Alcaide Corvo 841495d453 Update documentation for lint and format scripts 2021-10-04 11:02:24 -07:00
Carlos Alcaide Corvo 435cd8800b Merge pull request #784 from hashicorp/fix-rose-babel-core-unmet-dependency
fix: 🐛 Fix babel-core unmet peer dependency in Rose
2021-10-04 19:54:01 +02:00
Dharini Jeeva f8b91bd9e7 Merge branch 'main' into fix-rose-babel-core-unmet-dependency 2021-10-04 10:42:44 -07:00
Randall Morey a9e7b0267a Merge branch 'main' into feature-role-capabilities 2021-10-04 13:32:09 -04:00
Randall Morey 4036577f6e Merge pull request #782 from hashicorp/feature-account-capabilities
Feature account capabilities
2021-10-04 13:31:58 -04:00
Randall Morey b1f594b122 Merge branch 'main' into feature-account-capabilities 2021-10-04 12:53:25 -04:00
Randall Morey 3be27cc632 Merge pull request #789 from hashicorp/feature-theme-color
feature: apply theme-color meta for more immersive UX
2021-10-04 12:53:03 -04:00
Randall Morey 84242dc014 feature: apply theme-color meta for more immersive UX 2021-10-04 09:38:58 -04:00
Randall Morey c5222c4b54 feat: 🎸 implement host set host association capabilities 2021-10-01 17:22:50 -04:00
Randall Morey 61f75970a4 feat: 🎸 implement group members abilities 2021-10-01 17:00:36 -04:00
Randall Morey 8deaaa312a feat: 🎸 implement user account association abilities 2021-10-01 14:19:06 -04:00
Carlos Alcaide Corvo 4260402a90 Move babel-core and babel-loader to devDependencies 2021-10-01 15:00:40 +02:00
Carlos Alcaide Corvo 3b10ddb8ea fix: 🐛 Fix babel-core unmet peer dependency in Rose
Fix @babel-core unmet peer dependency in Rose
2021-10-01 11:56:45 +02:00
Carlos Alcaide Corvo eb1a5db958 Merge pull request #767 from hashicorp/chore-fix-ember-fetch-unmet-dependency
chore: 🤖 Fix ember-fetch unmet dependency
2021-10-01 11:43:28 +02:00
Carlos Alcaide f449c10650 chore: 🤖 Fix ember-fetch unmet dependency
Fix ember-fetch unmet dependency warning from Yarn.
2021-10-01 11:26:21 +02:00
Randall Morey 8da8fddf29 feat: 🎸 implement add- and remove-principals abilities 2021-09-30 16:04:02 -04:00
Randall Morey 3022ca5a53 feat: 🎸 add role set-grants ability 2021-09-30 15:21:45 -04:00
Randall Morey e913140055 Merge branch 'main' into feature-account-capabilities 2021-09-30 12:38:57 -04:00
Randall Morey 1646132db3 feat: 🎸 apply set-password ability to template 2021-09-30 11:17:20 -04:00
Randall Morey 20836b7717 Merge pull request #780 from hashicorp/feature-add-sources-capability
Feature add sources capability
2021-09-30 08:54:22 -04:00
Randall Morey c5c8bcf165 Merge branch 'main' into feature-add-sources-capability 2021-09-30 08:39:30 -04:00
Randall Morey 1e02e9a6cc Merge pull request #779 from hashicorp/feature-remove-sources-capability
Feature remove sources capability
2021-09-30 08:39:20 -04:00
Randall Morey cfa6c42506 feature: add account set-password ability 2021-09-29 17:47:48 -04:00
Randall MoreyandDharini Jeeva d51388e4d7 Update addons/api/tests/unit/abilities/target-test.js
Co-authored-by: Dharini Jeeva <dharini@hashicorp.com>
2021-09-29 15:11:09 -04:00
Randall Morey bf05a9913d Merge branch 'main' into feature-remove-sources-capability 2021-09-29 15:10:45 -04:00
Randall Morey 9774ec6cc3 Merge pull request #773 from hashicorp/amy/flight-icons-v1
Bump @hashicorp/flight-icons to 1.0.0 with ^
2021-09-29 15:09:22 -04:00
Randall Morey ad884bbf7f Merge branch 'main' into amy/flight-icons-v1 2021-09-29 10:59:39 -04:00
Carlos Alcaide Corvo ef65dcdfc6 Merge pull request #781 from hashicorp/revert-778-chore-update-electron-forge
Revert "chore: 🤖 Update electron-forge for desktop client"
2021-09-29 09:42:53 +02:00
Carlos Alcaide Corvo b965fb3dd7 Revert "chore: 🤖 Update electron-forge for desktop client" 2021-09-29 09:28:09 +02:00
Randall Morey bc7543265c Merge branch 'main' into feature-remove-sources-capability 2021-09-28 18:40:14 -04:00
Randall Morey 4ed09ddacc Merge branch 'main' into amy/flight-icons-v1 2021-09-28 14:12:24 -04:00
Randall Morey 5921e34e83 Merge pull request #778 from hashicorp/chore-update-electron-forge
chore: 🤖 Update electron-forge for desktop client
2021-09-28 14:12:13 -04:00
Randall Morey e85e2c4317 Merge branch 'main' into amy/flight-icons-v1 2021-09-28 14:12:04 -04:00
Randall Morey 021be5d689 feat: 🎸 implement add sources on targets 2021-09-28 14:09:11 -04:00
Carlos Alcaide Corvo 4727a2536f Merge branch 'main' into chore-update-electron-forge 2021-09-28 18:46:29 +02:00
Carlos Alcaide Corvo 05f61271a6 Merge pull request #777 from hashicorp/chore-add-nth-check-desktop-resolutions
chore: 🤖 Add nth-check desktop resolutions
2021-09-28 18:15:52 +02:00
Carlos Alcaide Corvo 2fbfa8093e Merge branch 'main' into chore-add-nth-check-desktop-resolutions 2021-09-28 17:16:10 +02:00
Carlos Alcaide Corvo 51b45ffd03 Merge pull request #776 from hashicorp/chore-update-electron-minor-version
chore: 🤖 Update electron minor version
2021-09-28 17:14:13 +02:00
Carlos Alcaide Corvo 9db7b4d88b Merge branch 'main' into chore-update-electron-minor-version 2021-09-28 16:51:45 +02:00
Carlos Alcaide Corvo 799dcbdccb Merge pull request #775 from hashicorp/chore-add-ansi-regex-resolutions
chore: 🤖 Add ansi-regex transtitive dependency to resolutions
2021-09-28 16:51:26 +02:00
Carlos Alcaide Corvo 5874eb5d55 Merge branch 'main' into chore-add-ansi-regex-resolutions 2021-09-28 16:37:09 +02:00
Susmitha Girumala 3c6e2e01ea Merge pull request #757 from hashicorp/chromeless-window-desktop-option
Add chromeless window option for desktop
2021-09-28 09:33:00 -04:00
Susmitha Girumala bfb8cd0663 Merge branch 'main' into chromeless-window-desktop-option 2021-09-28 09:12:58 -04:00
Randall Morey b59f654774 Merge branch 'main' into chore-add-ansi-regex-resolutions 2021-09-28 09:09:06 -04:00
Randall Morey feebe4d8bc Merge pull request #774 from hashicorp/chore-desktop-update-ansi-regex-resolutions
chore: 🤖 Add ansi-regex to desktop resolutions
2021-09-28 09:08:53 -04:00
Randall Morey 3ecb8b8ea9 chore: 🤖 implement remove sources abilities on targets 2021-09-27 16:55:19 -04:00
Carlos Alcaide 73e1f4ed55 chore: 🤖 Update electron-forge for desktop client
Update electron-forge and all the packages related to for desktop client
2021-09-27 17:46:22 +02:00
Carlos Alcaide 02c6c28b8b chore: 🤖 Add nth-check desktop resolutions
Add nth-check, transitive dependency, to desktop resolutions to avoid
security vulnerability
2021-09-27 17:21:10 +02:00
Carlos Alcaide 224169c636 chore: 🤖 Update electron minor version
Update electron minor version
2021-09-27 16:32:40 +02:00
Carlos Alcaide cc42e2fbe0 chore: 🤖 Add ansi-regex transtitive dependency to resolutions
Add ansi-regex transitive dependency to resolutions to avoid security
vulnerability.
2021-09-27 16:17:52 +02:00
Carlos Alcaide 545f10b675 chore: 🤖 Add ansi-regex to desktop resolutions
Add ansi-regex transitive dependency to electron-app resolutions to
avoid security vulnerability
2021-09-27 15:42:37 +02:00
Susmitha Girumala 7265e483d4 Merge branch 'main' into chromeless-window-desktop-option 2021-09-27 08:43:18 -04:00
Randall Morey f29a6bc5d9 Merge pull request #771 from hashicorp/chore-nth-check-resolutions
chore: 🤖 Add nth-check to resolutions
2021-09-24 19:23:00 -04:00
Randall Morey f42d4cddd7 Merge branch 'main' into chore-nth-check-resolutions 2021-09-24 18:06:06 -04:00
Randall Morey 7cdded9f22 Merge pull request #768 from hashicorp/chore-fix-tmpl-resolutions
chore: 🤖 Update tmpl resolutions
2021-09-24 18:05:26 -04:00
Randall Morey a4c1124fcb Merge branch 'main' into chore-fix-tmpl-resolutions 2021-09-24 17:42:17 -04:00
Randall Morey 212b6a98b8 Merge pull request #766 from hashicorp/chore-prismjs-resolutions
chore: 🤖 Update prismjs resolutions
2021-09-24 17:39:54 -04:00
Randall Morey acafe97f76 Merge branch 'main' into chore-prismjs-resolutions 2021-09-24 17:01:55 -04:00
Randall Morey 68f9a9ba7f Merge pull request #765 from hashicorp/chore-update-set-value-resolutions
chore: 🤖 Update set-value resolutions
2021-09-24 17:01:40 -04:00
Randall Morey 75614b5d08 Merge branch 'main' into chore-update-set-value-resolutions 2021-09-24 16:44:56 -04:00
Amy Lam 5a541fc7b0 Bump package to 1.0.0 with ^ 2021-09-24 13:44:50 -07:00
Randall Morey add826007d chore: add sources-related grants to mock target authorized actions 2021-09-24 16:42:41 -04:00
Randall Morey 4b2e319e33 Merge pull request #770 from hashicorp/chore-target-sources
Change target attributes and custom methods
2021-09-24 16:08:24 -04:00
Susmitha Girumala f987b908fc fix: Use DISABLE_WINDOW_CHROME check before platform -desktop 2021-09-23 21:08:21 -04:00
Randall Morey 1e4aa6631a chore: 🤖 misc name changes 2021-09-23 10:04:23 -04:00
Carlos Alcaide 554d7362e5 chore: 🤖 Add ntch-check to resolutions
Add nth-check to yarn resolutions to avoid security vulnerability
2021-09-23 11:53:27 +02:00
Randall Morey 94f6316b4a chore: 🤖 update host source attribute ames 2021-09-22 19:15:09 -04:00
Randall Morey 4e3a167ef7 chore: 🤖 change host source custom methods 2021-09-22 18:52:38 -04:00
Randall Morey 77420d29c6 chore: 🤖 rename credential source custom methods 2021-09-22 18:34:35 -04:00
Randall Morey 8b09f132e0 chore: rename to application_credential_source_ids 2021-09-22 17:39:15 -04:00
Susmitha Girumala 52b5a06755 chore: Refactor custom desktop window actions check 2021-09-22 17:10:40 -04:00
Carlos Alcaide c9e4369928 chore: 🤖 Update tmpl resolutions
Update tmpl transitive dependency resolution to avoid security
vulnerability
2021-09-22 16:14:49 +02:00
Carlos Alcaide 5858fc2827 chore: 🤖 Update prismjs resolutions
Update prismjs resolutions to avoid security vulnerability
2021-09-22 15:38:23 +02:00
Randall Morey 735878b7ef chore: 🤖 update internal variable names 2021-09-22 08:49:38 -04:00
Carlos Alcaide 7542b512e8 chore: 🤖 Update set-value resolutions
Update set-value resolutions to avoid a security vulnerability
2021-09-22 13:03:03 +02:00
Randall Morey c7c01dc35e fix: 🐛 host set reconciliation on targets 2021-09-21 16:58:25 -04:00
Randall Morey 614b98b8fb chore: 🤖 change method names 2021-09-21 14:53:56 -04:00
Randall Morey bb8920a90c chore: 🤖 rename ember resources to *-sources 2021-09-21 14:32:39 -04:00
Randall Morey 64fccf8753 chore: 🤖 rename translations and comments 2021-09-21 10:57:01 -04:00
Randall Morey fb734eb61b chore: 🤖 rename host_set_id to host_source_id internally 2021-09-21 09:37:47 -04:00
Randall Morey 10da4af957 chore: 🤖 change fragment-host-set to fragment-host-source 2021-09-20 15:10:04 -04:00
Susmitha Girumala 7767804426 Merge remote-tracking branch 'origin/main' into chromeless-window-desktop-option 2021-09-20 14:38:19 -04:00
Susmitha Girumala 789d8d5f5a Merge pull request #760 from hashicorp/feature-authorize-session-capability
feat: 🎸 add connect target capability UI
2021-09-20 11:04:43 -04:00
Randall Morey 18f6bc469c Merge branch 'main' into feature-authorize-session-capability 2021-09-17 16:36:42 -04:00
Randall Morey e24a4778ad Merge pull request #756 from hashicorp/chore-dep-upgrades
Chore dep upgrades
2021-09-17 16:33:57 -04:00
Randall Morey dfa05e003f chore: rebump flight version 2021-09-17 09:57:16 -04:00
Randall Morey b740277c03 Merge branch 'feature-authorize-session-capability' of https://github.com/hashicorp/boundary-ui into feature-authorize-session-capability 2021-09-17 09:28:17 -04:00
Randall Morey f3c10de6a1 Merge branch 'main' into feature-authorize-session-capability 2021-09-17 09:28:05 -04:00
Randall Morey ffaf972063 docs: tweak comment 2021-09-17 09:27:51 -04:00
Randall Morey 8afb80cf18 Merge branch 'main' into chore-dep-upgrades 2021-09-17 09:26:18 -04:00
Randall Morey 97adee1181 Merge pull request #761 from hashicorp/amy/bump-flight-icons
Bump flight icons
2021-09-17 09:25:33 -04:00
Susmitha Girumala 2d25f8571d Merge branch 'main' into chore-dep-upgrades 2021-09-17 09:11:47 -04:00
Amy Lam aa5b813791 Ran a find and replace
New namespacing. `flight-icons/` replace with `flight-icons/svg/`
2021-09-16 14:24:38 -07:00
Amy Lam 5c72168310 Bump package 2021-09-16 13:42:04 -07:00
Susmitha Girumala cd72397f24 Merge pull request #759 from hashicorp/cleanup-forge-config
refactor: Add forge config checks into electron forge
2021-09-16 15:06:39 -04:00
Susmitha Girumala 5f2885ae35 Merge branch 'main' into cleanup-forge-config 2021-09-16 14:56:29 -04:00
Susmitha Girumala 7a16aba50e Merge pull request #758 from hashicorp/add-app-updater-feature-bypass-flag
chore: Add dev flag to disable app updater prompts - desktop
2021-09-16 14:56:13 -04:00
Randall Morey 21759e809f Merge branch 'main' into feature-authorize-session-capability 2021-09-16 14:55:54 -04:00
Randall Morey b109b8e008 feat: 🎸 add connect target capability UI 2021-09-16 14:49:48 -04:00
Susmitha Girumala 5a36cb59c8 Merge branch 'main' into add-app-updater-feature-bypass-flag 2021-09-16 14:46:24 -04:00
Susmitha Girumala df698a8dd3 Merge pull request #753 from hashicorp/vancluever-manual-cli-install
desktop: Update README with instructions for using non-release versions
2021-09-16 14:45:32 -04:00
Susmitha Girumala 12403e40b0 Merge branch 'main' into vancluever-manual-cli-install 2021-09-16 14:23:36 -04:00
Susmitha Girumala 4e705931fc refactor: Add forge config checks into electron forge 2021-09-16 11:04:09 -04:00
Susmitha Girumala 469c1b7a6e chore: Add dev flag to disable app updater prompts - desktop 2021-09-16 10:56:51 -04:00
Susmitha Girumala 631d90869f chore: Refactor DISABLE_WINDOW_CHROME var 2021-09-16 10:33:56 -04:00
Randall Morey 41ffb196e4 chore: 🤖 upgrade stylelint deps 2021-09-16 10:29:07 -04:00
Randall Morey 627e9cc3af chore: 🤖 upgrade to "ember-autofocus-modifier": "^2.0.0" 2021-09-16 09:37:30 -04:00
Randall Morey dd38bd934c chore: 🤖 upgrade to "@doyensec/electronegativity": "^1.9.1" 2021-09-16 09:18:01 -04:00
Randall Morey b5c1a9d7f3 chore: 🤖 upgrade to "sinon": "^11.1.2" 2021-09-16 09:00:10 -04:00
Randall Morey a25455f314 chore: 🤖 upgrade to "ember-notify": "^6.0.1" 2021-09-16 08:39:02 -04:00
Randall Morey a815fc47e2 chore: 🤖 upgrade to "ember-modifier": "^2.1.2" 2021-09-15 16:14:59 -04:00
Randall Morey d19abc0dff chore: 🤖 upgraade to "ember-exam": "^6.1.0" 2021-09-15 16:03:00 -04:00
Randall Morey ad2f1cf0d1 chore: 🤖 upgrade to "ember-cli-code-coverage": "^1.0.3" 2021-09-15 15:14:52 -04:00
Randall Morey a02b43fc4e chore: 🤖 upgrade to "ember-a11y-testing": "^4.2.0" 2021-09-15 14:50:13 -04:00
Randall Morey d1a2bfa378 chore: 🤖 upgrade to "clipboard": "^2.0.8" 2021-09-15 14:42:27 -04:00
Randall Morey 9e347ac98f chore: 🤖 upgrade to "@babel/core": "^7.15.5" 2021-09-15 13:48:50 -04:00
Randall Morey 4b57f84165 chore: 🤖 upgrade to "ember-intl": "^5.7.0" 2021-09-15 13:13:18 -04:00
Randall Morey c6b7b4f845 chore: 🤖 upgrade to "ember-browser-services": "^2.0.0" 2021-09-15 11:24:57 -04:00
Randall Morey 7d504c1eb5 chore: 🤖 upgrade storybook deps 2021-09-15 10:55:38 -04:00
Susmitha Girumala 9c423ec05b chore: Fix tests for macos frame 2021-09-15 10:54:28 -04:00
Randall Morey 7a413820b7 chore: 🤖 upgrade to "sass": "^1.41.0" 2021-09-15 09:49:19 -04:00
Randall Morey 3480d66dd7 chore: 🤖 upgrade to "ember-focus-trap": "^0.7.0" 2021-09-15 09:17:55 -04:00
Randall Morey 33e86e5f26 chore: 🤖 upgrade to "babel-loader": "^8.2.2" 2021-09-15 09:10:54 -04:00
Susmitha Girumala aecfdbb635 fix: Lint fix 2021-09-15 09:09:16 -04:00
Randall Morey 0db37f9530 chore: 🤖 upgrade to "ember-simple-auth": "^4.0.0" 2021-09-15 09:03:48 -04:00
Randall Morey 64553a99d5 chore: 🤖 upgrade to "qunit-dom": "^2.0.0" 2021-09-15 08:53:38 -04:00
Randall Morey abd20f9bd9 chore: 🤖 upgrade to "qunit": "^2.17.1" 2021-09-15 08:46:17 -04:00
Randall Morey bedace7c4b chore: 🤖 upgrade to "prettier": "^2.4.0" 2021-09-15 08:38:38 -04:00
Randall Morey e44cfb6ce7 chore: 🤖 upgrade to "eslint-plugin-prettier": "^4.0.0" 2021-09-15 08:28:39 -04:00
Susmitha Girumala 1e405b318f chore: Allow disabling electron frame on all desktop OSs 2021-09-14 17:36:17 -04:00
Randall Morey c1c1a808ec chore: 🤖 upgrade to "eslint-plugin-ember": "^10.5.4" 2021-09-14 16:40:16 -04:00
Randall Morey d91088cc05 chore: 🤖 upgrade to "eslint": "^7.32.0" 2021-09-14 16:25:10 -04:00
Randall Morey be9b46f673 chore: 🤖 upgrade to "ember-template-lint": "^3.7.0" 2021-09-14 16:09:24 -04:00
Randall Morey 612a7981eb chore: 🤖 upgrade to "ember-resolver": "^8.0.3" 2021-09-14 15:37:23 -04:00
Randall Morey 705a210ed1 chore: 🤖 upgrade to "ember-qunit": "^5.1.4" 2021-09-14 14:24:13 -04:00
Randall Morey 39de905559 chore: 🤖 upgrade to "ember-page-title": "^6.2.2" 2021-09-14 14:14:42 -04:00
Randall Morey 131c809b89 chore: 🤖 upgrade to "ember-maybe-import-regenerator": "^1.0.0" 2021-09-14 13:26:55 -04:00
Randall Morey 2a63d977fb chore: 🤖 upgrade to "ember-copy": "^2.0.1" 2021-09-14 13:08:07 -04:00
Randall Morey f75d9458b8 chore: 🤖 upgrade to "ember-cli-terser": "^4.0.2" 2021-09-14 12:50:09 -04:00
Randall Morey 39bf97a2ef chore: 🤖 upgrade to "ember-auto-import": "^1.12.0" 2021-09-14 12:40:27 -04:00
Randall Morey 93672019d6 chore: 🤖 upgrade to "doctoc": "^2.0.1" 2021-09-14 12:19:35 -04:00
Randall Morey e670c138a3 chore: 🤖 upgrade to "@glimmer/tracking": "^1.0.4" 2021-09-14 12:06:18 -04:00
Randall Morey 126a1a6b53 chore: 🤖 upgrade to "@glimmer/component": "^1.0.4" 2021-09-14 11:52:56 -04:00
Randall Morey afe58c3823 chore: 🤖 upgrade to "@ember/test-helpers": "^2.4.2" 2021-09-13 19:12:02 -04:00
Randall Morey f89cd5d05e chore: 🤖 upgrade to "ember-fetch": "^8.1.1" 2021-09-13 19:02:34 -04:00
Randall Morey 33e97bfe62 chore: 🤖 upgrade to "ember-cli-mirage": "^2.2.0" 2021-09-13 17:57:40 -04:00
Randall Morey 6a42964614 chore: 🤖 upgrade to "ember-cli-htmlbars": "^5.7.1" 2021-09-13 17:46:26 -04:00
Randall Morey 20036c2d00 chore: 🤖 upgrade to "ember-cli-babel": "^7.26.6" 2021-09-13 17:39:52 -04:00
Susmitha Girumala fabab3e36c Merge pull request #742 from hashicorp/chore-update-immer-resolutions
chore: 🤖 Update immer transitive dependency resolution
2021-09-13 13:11:16 -04:00
Susmitha Girumala 4f76e5fe84 Merge branch 'main' into chore-update-immer-resolutions 2021-09-13 09:12:26 -04:00
Susmitha Girumala 73ec06abfc Merge branch 'main' into vancluever-manual-cli-install 2021-09-09 10:09:52 -04:00
Chris Marchesi 80d6cbc07c desktop: Update README with instructions for using non-release versions
This documents the use of BYPASS_CLI_SETUP to allow desktop development
to use the version of Boundary manually placed in
ui/desktop/electron-app/cli rather than downloading a release version.
2021-09-08 13:56:01 -07:00
Carlos Alcaide 9d19b72f46 chore: 🤖 Update immer transitive dependency resolution
Update Immer transitive dependency resolutions to avoid a security issue
reported by dependanbot.
2021-09-03 15:40:28 -07:00
364 changed files with 8159 additions and 2826 deletions

No files matched your search

-3
View File
@@ -12,8 +12,5 @@ insert_final_newline = true
indent_style = space
indent_size = 2
[*.hbs]
insert_final_newline = false
[*.{diff,md}]
trim_trailing_whitespace = false
+5
View File
@@ -56,5 +56,10 @@ module.exports = {
plugins: ['node'],
extends: ['plugin:node/recommended'],
},
{
// Test files:
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
},
],
};
+15
View File
@@ -0,0 +1,15 @@
import ModelAbility from './model';
/**
* Provides abilities for accounts.
*/
export default class AccountAbility extends ModelAbility {
// =permissions
/**
* @type {boolean}
*/
get canSetPassword() {
return this.hasAuthorizedAction('set-password');
}
}
+22
View File
@@ -0,0 +1,22 @@
import ModelAbility from './model';
/**
* Provides abilities for groups.
*/
export default class GroupAbility extends ModelAbility {
// =permissions
/**
* @type {boolean}
*/
get canAddMembers() {
return this.hasAuthorizedAction('add-members');
}
/**
* @type {boolean}
*/
get canRemoveMembers() {
return this.hasAuthorizedAction('remove-members');
}
}
+22
View File
@@ -0,0 +1,22 @@
import ModelAbility from './model';
/**
* Provides abilities for host sets.
*/
export default class UserAbility extends ModelAbility {
// =permissions
/**
* @type {boolean}
*/
get canAddHosts() {
return this.hasAuthorizedAction('add-hosts');
}
/**
* @type {boolean}
*/
get canRemoveHosts() {
return this.hasAuthorizedAction('remove-hosts');
}
}
+29
View File
@@ -0,0 +1,29 @@
import ModelAbility from './model';
/**
* Provides abilities for roles.
*/
export default class RoleAbility extends ModelAbility {
// =permissions
/**
* @type {boolean}
*/
get canSetGrants() {
return this.hasAuthorizedAction('set-grants');
}
/**
* @type {boolean}
*/
get canAddPrincipals() {
return this.hasAuthorizedAction('add-principals');
}
/**
* @type {boolean}
*/
get canRemovePrincipals() {
return this.hasAuthorizedAction('remove-principals');
}
}
+43
View File
@@ -0,0 +1,43 @@
import ModelAbility from './model';
/**
* Provides abilities for targets.
*/
export default class TargetAbility extends ModelAbility {
// =permissions
/**
* @type {boolean}
*/
get canConnect() {
return this.hasAuthorizedAction('authorize-session');
}
/**
* @type {boolean}
*/
get canAddHostSources() {
return this.hasAuthorizedAction('add-host-sources');
}
/**
* @type {boolean}
*/
get canRemoveHostSources() {
return this.hasAuthorizedAction('remove-host-sources');
}
/**
* @type {boolean}
*/
get canAddCredentialSources() {
return this.hasAuthorizedAction('add-credential-sources');
}
/**
* @type {boolean}
*/
get canRemoveCredentialSources() {
return this.hasAuthorizedAction('remove-credential-sources');
}
}
+22
View File
@@ -0,0 +1,22 @@
import ModelAbility from './model';
/**
* Provides abilities for users.
*/
export default class UserAbility extends ModelAbility {
// =permissions
/**
* @type {boolean}
*/
get canAddAccounts() {
return this.hasAuthorizedAction('add-accounts');
}
/**
* @type {boolean}
*/
get canRemoveAccounts() {
return this.hasAuthorizedAction('remove-accounts');
}
}
+20 -3
View File
@@ -2,7 +2,7 @@ import RESTAdapter from '@ember-data/adapter/rest';
import { serializeIntoHash } from '@ember-data/adapter/-private';
/* eslint-disable-next-line ember/no-mixins */
import AdapterBuildURLMixin from '../mixins/adapter-build-url';
import config from 'ember-get-config';
import { getOwner } from '@ember/application';
import { get } from '@ember/object';
import { InvalidError } from '@ember-data/adapter/error';
import { dasherize } from '@ember/string';
@@ -44,19 +44,36 @@ export default class ApplicationAdapter extends RESTAdapter.extend(
) {
// =attributes
#host;
#namespace;
/**
* Sets host to the `api.host` string in the application's config,
* if set.
* @type {string}
*/
host = get(config, 'api.host');
get host() {
const config = getOwner(this).resolveRegistration('config:environment');
return this.#host || get(config, 'api.host');
}
set host(value) {
// Setting this value is useful for testing purposes.
this.#host = value;
}
/**
* Sets namespace to the `api.namespace` string in the application's config,
* if set.
* @type {string}
*/
namespace = get(config, 'api.namespace');
get namespace() {
const config = getOwner(this).resolveRegistration('config:environment');
return this.#namespace || get(config, 'api.namespace');
}
set namespace(value) {
// Setting this value is useful for testing purposes.
this.#namespace = value;
}
// =methods
@@ -0,0 +1,47 @@
import BaseModel from '../../models/base';
import { attr } from '@ember-data/model';
/**
* A managed group is a resource that represents a collection of accounts.
*/
export default class GeneratedManagedGroupModel extends BaseModel {
// =attributes
@attr('string', {
description: 'Optional name for identification purposes.',
})
name;
@attr('string', {
description: 'Optional user-set description for identification purposes.',
})
description;
@attr('date', {
description: 'The time this resource was created',
readOnly: true,
})
created_time;
@attr('date', {
description: 'The time this resource was last updated.',
readOnly: true,
})
updated_time;
@attr('number', {
description: 'Current version number of this resource.',
})
version;
@attr('string', {
description: 'The type of this ManagedGroup.',
})
type;
@attr('string', {
description:
'The ID of the Auth Method that is associated with this ManagedGroup',
})
auth_method_id;
}
@@ -1,13 +1,13 @@
import Fragment from 'ember-data-model-fragments/fragment';
import { attr } from '@ember-data/model';
export default class FragmentHostSetModel extends Fragment {
export default class FragmentHostSourceModel extends Fragment {
// =attributes
@attr('string', {
description: 'ID of the related host set',
description: 'ID of the related host source',
})
host_set_id;
host_source_id;
@attr('string', {
description: 'ID of the catalog to which the host set belongs',
@@ -0,0 +1,12 @@
import Fragment from 'ember-data-model-fragments/fragment';
import { attr } from '@ember-data/model';
export default class FragmentManagedGroupAttributesModel extends Fragment {
// =attributes (OIDC)
@attr('string', {
description:
'The boolean expression filter to use to determine membership.',
})
filter;
}
+29
View File
@@ -0,0 +1,29 @@
import GeneratedManagedGroupModel from '../generated/models/managed-group';
import { attr } from '@ember-data/model';
import { fragment } from 'ember-data-model-fragments/attributes';
import { A } from '@ember/array';
export default class ManagedGroupModel extends GeneratedManagedGroupModel {
// =attributes
// =error attributes
// These attributes exist solely to capture errors on nested fields.
// See the application adapter's error normalization method for
// more information.
@attr('string', { readOnly: true }) attributes_filter;
/**
* Members is read-only under normal circumstances. But members can
* be persisted via calls to `addMembers()` or `removeMembers()`.
*/
@attr({
readOnly: true,
defaultValue: () => A(),
emptyArrayIfMissing: true,
})
member_ids;
@fragment('fragment-managed-group-attributes', { defaultValue: {} })
attributes;
}
+32 -38
View File
@@ -12,23 +12,23 @@ export default class TargetModel extends GeneratedTargetModel {
@fragment('fragment-target-attributes', { defaultValue: {} }) attributes;
/**
* @type {[FragmentHostSetModel]}
* @type {[FragmentHostSourceModel]}
*/
@fragmentArray('fragment-host-set', {
@fragmentArray('fragment-host-source', {
readOnly: true,
emptyArrayIfMissing: true,
})
host_sets;
host_sources;
/**
* Credential library ids are read only and can be
* persisted via a dedicated call to `addCredentialLibraries()`.
* Credential source ids are read only and can be
* persisted via a dedicated call to `addCredentialSources()`.
*/
@fragmentArray('fragment-string', {
readOnly: true,
emptyArrayIfMissing: true,
})
application_credential_library_ids;
application_credential_source_ids;
/**
* An array of resolved host set and host catalog instances. Model instances
@@ -36,11 +36,11 @@ export default class TargetModel extends GeneratedTargetModel {
* instances). Unresolvable instances are excluded from the array.
* @type {[{model: HostSetModel, hostCatalog: HostCatalogModel}]}
*/
@computed('host_sets.[]', 'store')
@computed('host_sources.[]', 'store')
get hostSets() {
return this.host_sets
.map(({ host_set_id, host_catalog_id }) => ({
model: this.store.peekRecord('host-set', host_set_id),
return this.host_sources
.map(({ host_source_id, host_catalog_id }) => ({
model: this.store.peekRecord('host-set', host_source_id),
hostCatalog: this.store.peekRecord('host-catalog', host_catalog_id),
}))
.filter((hostSetRef) => hostSetRef.model !== null);
@@ -52,14 +52,11 @@ export default class TargetModel extends GeneratedTargetModel {
* instances). Unresolvable instances are excluded from the array.
* @type {[CredentialLibraryModel]}
*/
@computed('application_credential_library_ids.[]', 'store')
@computed('application_credential_source_ids.[]', 'store')
get credentialLibraries() {
return this.application_credential_library_ids
.map((credential_library_fragment) =>
this.store.peekRecord(
'credential-library',
credential_library_fragment.value
)
return this.application_credential_source_ids
.map((source) =>
this.store.peekRecord('credential-library', source.value)
)
.filter(Boolean);
}
@@ -96,16 +93,16 @@ export default class TargetModel extends GeneratedTargetModel {
// =methods
/**
* Adds host sets via the `add-host-sets` method.
* Adds host sets via the `add-host-sources` method.
* See serializer and adapter for more information.
* @param {[string]} hostSetIDs
* @param {object} options
* @param {object} options.adapterOptions
* @return {Promise}
*/
addHostSets(hostSetIDs, options = { adapterOptions: {} }) {
addHostSources(hostSetIDs, options = { adapterOptions: {} }) {
const defaultAdapterOptions = {
method: 'add-host-sets',
method: 'add-host-sources',
hostSetIDs,
};
// There is no "deep merge" in ES.
@@ -119,16 +116,16 @@ export default class TargetModel extends GeneratedTargetModel {
}
/**
* Delete host sets via the `remove-host-sets` method.
* Delete host sets via the `remove-host-sources` method.
* See serializer and adapter for more information.
* @param {[string]} hostSetIDs
* @param {object} options
* @param {object} options.adapterOptions
* @return {Promise}
*/
removeHostSets(hostSetIDs, options = { adapterOptions: {} }) {
removeHostSources(hostSetIDs, options = { adapterOptions: {} }) {
const defaultAdapterOptions = {
method: 'remove-host-sets',
method: 'remove-host-sources',
hostSetIDs,
};
// There is no "deep merge" in ES.
@@ -142,29 +139,26 @@ export default class TargetModel extends GeneratedTargetModel {
}
/**
* Delete a single host set via the `remove-host-sets` method.
* Delete a single host set via the `remove-host-sources` method.
* @param {number} hostSetID
* @param {object} options
* @return {Promise}
*/
removeHostSet(hostSetID, options) {
return this.removeHostSets([hostSetID], options);
removeHostSource(hostSetID, options) {
return this.removeHostSources([hostSetID], options);
}
/**
* Adds credential libraries via the `add-credential-libraries` method.
* Adds credential libraries via the `add-credential-sources` method.
* See serializer and adapter for more information.
* @param {[string]} credentialLibraryIDs
* @param {object} options
* @param {object} options.adapterOptions
* @return {Promise}
*/
addCredentialLibraries(
credentialLibraryIDs,
options = { adapterOptions: {} }
) {
addCredentialSources(credentialLibraryIDs, options = { adapterOptions: {} }) {
const defaultAdapterOptions = {
method: 'add-credential-libraries',
method: 'add-credential-sources',
credentialLibraryIDs,
};
// There is no "deep merge" in ES.
@@ -178,19 +172,19 @@ export default class TargetModel extends GeneratedTargetModel {
}
/**
* Delete credential libraries via the `remove-credential-libraries` method.
* Delete credential libraries via the `remove-credential-sources` method.
* See serializer and adapter for more information.
* @param {[string]} credentialLibraryIDs
* @param {object} options
* @param {object} options.adapterOptions
* @return {Promise}
*/
removeCredentialLibraries(
removeCredentialSources(
credentialLibraryIDs,
options = { adapterOptions: {} }
) {
const defaultAdapterOptions = {
method: 'remove-credential-libraries',
method: 'remove-credential-sources',
credentialLibraryIDs,
};
// There is no "deep merge" in ES.
@@ -204,12 +198,12 @@ export default class TargetModel extends GeneratedTargetModel {
}
/**
* Delete a single credential library set via the `remove-credential-libraries` method.
* Delete a single credential library set via the `remove-credential-sources` method.
* @param {number} credentialLibraryID
* @param {object} options
* @return {Promise}
*/
removeCredentialLibrary(credentialLibraryID, options) {
return this.removeCredentialLibraries([credentialLibraryID], options);
removeCredentialSource(credentialLibraryID, options) {
return this.removeCredentialSources([credentialLibraryID], options);
}
}
+30
View File
@@ -1,5 +1,6 @@
import GeneratedUserModel from '../generated/models/user';
import { attr } from '@ember-data/model';
import { computed } from '@ember/object';
import { A } from '@ember/array';
export default class UserModel extends GeneratedUserModel {
@@ -16,6 +17,35 @@ export default class UserModel extends GeneratedUserModel {
})
account_ids;
/**
* Represents the user's primary account email, if any.
* @type {string}
*/
@attr('string', { readOnly: true }) email;
/**
* Represents the user's primary account full_name, if any.
* @type {string}
*/
@attr('string', { readOnly: true }) full_name;
/**
* Represents the user's primary account login_name, if any.
* @type {string}
*/
@attr('string', { readOnly: true }) login_name;
/**
* Convenience for getting a reasonable string that names the account.
* There are many options, so we fallback in order of precedence.
* @type {string}
*/
@computed('email,full_name,login_name,displayName')
get accountName() {
const { email, full_name, login_name } = this;
return email || full_name || login_name;
}
// =methods
/**
@@ -1,6 +1,6 @@
import JSONSerializer from '@ember-data/serializer/json';
export default class FragmentHostSetSerializer extends JSONSerializer {
export default class FragmentHostSourceSerializer extends JSONSerializer {
// =methods
/**
@@ -1,16 +0,0 @@
import JSONSerializer from '@ember-data/serializer/json';
export default class FragmentHostSetSerializer extends JSONSerializer {
// =methods
/**
* Renames `id` to `host_set_id` because fragments may not have IDs.
* Otherwise normalizes as normal.
* @param {ModelClass} typeClass
* @param {object} resourceHash
* @return {object}
*/
normalize(typeClass, { id: host_set_id, ...obj }) {
return super.normalize(typeClass, { host_set_id, ...obj });
}
}
@@ -0,0 +1,16 @@
import JSONSerializer from '@ember-data/serializer/json';
export default class FragmentHostSourceSerializer extends JSONSerializer {
// =methods
/**
* Renames `id` to `host_source_id` because fragments may not have IDs.
* Otherwise normalizes as normal.
* @param {ModelClass} typeClass
* @param {object} resourceHash
* @return {object}
*/
normalize(typeClass, { id: host_source_id, ...obj }) {
return super.normalize(typeClass, { host_source_id, ...obj });
}
}
@@ -0,0 +1,27 @@
import JSONSerializer from '@ember-data/serializer/json';
export default class FragmentManagedGroupAttributesSerializer extends JSONSerializer {
/**
* If an attribute is annotated as readOnly in the model, don't serialize it.
* Otherwise delegate to default attribute serializer.
* @override
* @method serializeAttribute
* @param {Snapshot} snapshot
* @param {Object} json
* @param {String} key
* @param {Object} attribute
*/
serializeAttribute(snapshot, json, key, attribute) {
const { type, options } = attribute;
let value = super.serializeAttribute(...arguments);
// Convert empty string to null.
if (type === 'string' && json[key] === '') json[key] = null;
// Do not serialize read-only attributes.
if (options.readOnly) delete json[key];
// Version is sent only if it has a non-nullish value
if (key === 'version') {
if (json[key] === null || json[key] === undefined) delete json[key];
}
return value;
}
}
@@ -0,0 +1,10 @@
import ApplicationSerializer from './application';
export default class ManagedGroupSerializer extends ApplicationSerializer {
// =properties
/**
* @type {boolean}
*/
serializeScopeID = false;
}
+17 -16
View File
@@ -17,43 +17,44 @@ export default class TargetSerializer extends ApplicationSerializer {
*/
serialize(snapshot) {
let serialized = super.serialize(...arguments);
const hostSetIDs = snapshot?.adapterOptions?.hostSetIDs;
if (hostSetIDs)
serialized = this.serializeWithHostSets(snapshot, hostSetIDs);
const credentialLibraryIDs = snapshot?.adapterOptions?.credentialLibraryIDs;
if (credentialLibraryIDs)
serialized = this.serializeWithCredentialLibraries(
const hostSourceIDs = snapshot?.adapterOptions?.hostSetIDs;
if (hostSourceIDs) {
serialized = this.serializeWithHostSources(snapshot, hostSourceIDs);
}
const credentialSourceIDs = snapshot?.adapterOptions?.credentialLibraryIDs;
if (credentialSourceIDs)
serialized = this.serializeWithCredentialSources(
snapshot,
credentialLibraryIDs
credentialSourceIDs
);
return serialized;
}
/**
* Returns a payload containing only the host_set_ids array using IDs
* passed into the function (rather than existing host sets on the model).
* Returns a payload containing only version and an array of passed IDs,
* rather than existing instances on the model.
* @param {Snapshot} snapshot
* @param {[string]} hostSetIDs
* @return {object}
*/
serializeWithHostSets(snapshot, hostSetIDs) {
serializeWithHostSources(snapshot, hostSourceIDs) {
return {
version: snapshot.attr('version'),
host_set_ids: hostSetIDs,
host_source_ids: hostSourceIDs,
};
}
/**
* Returns a payload containing only the credential_library_ids array using IDs
* passed into the function (rather than existing credential libraries on the model).
* Returns a payload containing only version and an array of passed IDs,
* rather than existing instances on the model.
* @param {Snapshot} snapshot
* @param {[string]} credentialLibraryIDs
* @param {[string]} credentialSourceIDs
* @return {object}
*/
serializeWithCredentialLibraries(snapshot, credentialLibraryIDs) {
serializeWithCredentialSources(snapshot, credentialSourceIDs) {
return {
version: snapshot.attr('version'),
application_credential_library_ids: credentialLibraryIDs,
application_credential_source_ids: credentialSourceIDs,
};
}
}
@@ -0,0 +1,110 @@
import Service from '@ember/service';
import { inject as service } from '@ember/service';
/**
* Takes a POJO representing a query and converts it to a boolean expression
* string which is understood by the API.
*
* @example
* const filter = new ResourceFilter({
* type: 'oidc',
* status: ['active', 'pending']
* });
* log(filter.queryExpression);
* // ("/item/type" == "oidc") and ("/item/status" == "active" or "/item/status" == "pending")
*/
export class ResourceFilter {
// =attributes
/**
* @type {?object}
*/
#filterObject;
/**
* @type {string}
*/
get queryExpression() {
const clauses = Object.keys(this.#filterObject)
.map((key) => {
const value = this.#filterObject[key];
const valuesArray = Array.isArray(value) ? value : [value];
return this.parenthetical(
this.or(valuesArray.map((value) => this.equals(key, value)))
);
})
.flat()
.filter((item) => item);
return this.and(clauses);
}
// =methods
/**
* @param {object} filterObject
*/
constructor(filterObject = {}) {
this.#filterObject = Object.assign({}, filterObject);
}
/**
* @param {string} key
* @param value
* @return {string}
*/
equals(key, value) {
return value !== null ? `"/item/${key}" == "${value}"` : null;
}
/**
* @param {string[]} clauses
* @return {string}
*/
and(clauses) {
return clauses.join(' and ');
}
/**
* @param {string[]} clauses
* @return {string}
*/
or(clauses) {
return clauses.join(' or ');
}
/**
* @param {string} expression
* @return {string}
*/
parenthetical(expression) {
return expression ? `(${expression})` : null;
}
}
/**
*
*/
export default class ResourceFilterStoreService extends Service {
// =services
@service store;
// =methods
/**
* Similar to Ember's built-in `store.query`, except this method accepts
* an additional argument `filterObject` representing a query filter
* (see ResourceFilter class above).
* @param {string} modelName
* @param {object} filterObject
* @param {?object} storeQuery
* @return {Promise}
*/
queryBy(modelName, filterObject = {}, storeQuery = {}) {
const filter = new ResourceFilter(filterObject);
const query = Object.assign({}, storeQuery);
// Apply filters to store query when available
if (filter.queryExpression) query.filter = filter.queryExpression;
return this.store.query(modelName, query);
}
}
+1
View File
@@ -0,0 +1 @@
export { default } from 'api/abilities/account';
+1
View File
@@ -0,0 +1 @@
export { default } from 'api/abilities/group';
+1
View File
@@ -0,0 +1 @@
export { default } from 'api/abilities/host-set';
+1
View File
@@ -0,0 +1 @@
export { default } from 'api/abilities/role';
+1
View File
@@ -0,0 +1 @@
export { default } from 'api/abilities/target';
+1
View File
@@ -0,0 +1 @@
export { default } from 'api/abilities/user';
@@ -1 +0,0 @@
export { default } from 'api/models/fragment-host-set';
@@ -0,0 +1 @@
export { default } from 'api/models/fragment-host-source';
@@ -0,0 +1 @@
export { default } from 'api/models/fragment-managed-group-attributes';
+1
View File
@@ -0,0 +1 @@
export { default } from 'api/models/managed-group';
@@ -1 +0,0 @@
export { default } from 'api/serializers/fragment-host-set';
@@ -0,0 +1 @@
export { default } from 'api/serializers/fragment-host-source';
@@ -0,0 +1 @@
export { default } from 'api/serializers/fragment-managed-group-attributes';
@@ -0,0 +1 @@
export { default } from 'api/serializers/managed-group';
@@ -0,0 +1 @@
export { default } from 'api/services/resource-filter-store';
+50 -24
View File
@@ -1,12 +1,14 @@
import Ember from 'ember';
import config from '../config/environment';
import { authHandler, deauthHandler } from './route-handlers/auth';
import { pickRandomStatusString } from './factories/session';
import { Response } from 'miragejs';
import initializeMockIPC from './scenarios/ipc';
import makeBooleanFilter from './helpers/bexpr-filter';
const isTesting = config.environment === 'test';
export default function () {
initializeMockIPC(this);
initializeMockIPC(this, config);
// make this `http://localhost:8080`, for example, if your API is on a different server
// this.urlPrefix = '';
@@ -53,8 +55,9 @@ export default function () {
this.get(
'/auth-methods',
({ authMethods }, { queryParams: { scope_id: scopeId } }) => {
return authMethods.where({ scopeId });
({ authMethods }, { queryParams: { scope_id: scopeId, filter } }) => {
const resultSet = authMethods.where({ scopeId });
return resultSet.filter(makeBooleanFilter(filter));
}
);
this.post('/auth-methods');
@@ -75,8 +78,17 @@ export default function () {
// Auth Method Accounts
this.get(
'/accounts',
({ accounts }, { queryParams: { auth_method_id: authMethodId } }) => {
return accounts.where({ authMethodId });
(
{ accounts },
{ queryParams: { auth_method_id: authMethodId, filter } }
) => {
let resultSet;
if (authMethodId) {
resultSet = accounts.where({ authMethodId });
} else {
resultSet = accounts.all();
}
return resultSet.filter(makeBooleanFilter(filter));
}
);
this.post('/accounts');
@@ -367,37 +379,37 @@ export default function () {
const updatedAttrs = {
version: attrs.version,
};
// If adding host sets, push them into the array
if (method === 'add-host-sets') {
// If adding host sources, push them into the array
if (method === 'add-host-sources') {
updatedAttrs.hostSetIds = target.hostSetIds;
attrs.hostSetIds.forEach((id) => {
attrs.hostSourceIds.forEach((id) => {
if (!updatedAttrs.hostSetIds.includes(id)) {
updatedAttrs.hostSetIds.push(id);
}
});
}
// If deleting host sets, filter them out of the array
if (method === 'remove-host-sets') {
// If deleting host sources, filter them out of the array
if (method === 'remove-host-sources') {
updatedAttrs.hostSetIds = target.hostSetIds;
updatedAttrs.hostSetIds = updatedAttrs.hostSetIds.filter((id) => {
return !attrs.hostSetIds.includes(id);
return !attrs.hostSourceIds.includes(id);
});
}
// If adding credential libraries, push them into the array
if (method === 'add-credential-libraries') {
// If adding credential sources, push them into the array
if (method === 'add-credential-sources') {
updatedAttrs.credentialLibraryIds = target.credentialLibraryIds;
attrs.applicationCredentialLibraryIds.forEach((id) => {
attrs.applicationCredentialSourceIds.forEach((id) => {
if (!updatedAttrs.credentialLibraryIds.includes(id)) {
updatedAttrs.credentialLibraryIds.push(id);
}
});
}
// If deleting credential libraries, filter them out of the array
if (method === 'remove-credential-libraries') {
// If deleting credential sources, filter them out of the array
if (method === 'remove-credential-sources') {
updatedAttrs.credentialLibraryIds = target.credentialLibraryIds;
updatedAttrs.credentialLibraryIds =
updatedAttrs.credentialLibraryIds.filter((id) => {
return !attrs.applicationCredentialLibraryIds.includes(id);
return !attrs.applicationCredentialSourceIds.includes(id);
});
}
return target.update(updatedAttrs);
@@ -408,14 +420,15 @@ export default function () {
this.get(
'/sessions',
function ({ sessions }, { queryParams: { scope_id, recursive } }) {
function ({ sessions }, { queryParams: { scope_id, recursive, filter } }) {
let resultSet;
// To simulate changes to `session.status` that may occur in the backend,
// we quietly randomize the value of the field on GET.
// To populate sessions for logged in user,
// update alternate sessions to auth user.
// But only if not in testing mode.
// In tests, we need deterministic statuses.
if (!Ember.testing) {
if (!isTesting) {
sessions.all().models.forEach((session) => {
session.update({
status: pickRandomStatusString(),
@@ -427,22 +440,24 @@ export default function () {
});
}
if (recursive && scope_id === 'global') {
return sessions.all();
resultSet = sessions.all();
} else if (recursive) {
return sessions.where((session) => {
resultSet = sessions.where((session) => {
const sessionModel = sessions.find(session.id);
return (
session.scopeId === scope_id ||
sessionModel?.scope?.scope?.id === scope_id
);
});
} else {
resultSet = sessions.where((session) => session.scopeId === scope_id);
}
return sessions.where((session) => session.scopeId === scope_id);
return resultSet.filter(makeBooleanFilter(filter));
}
);
this.get('/sessions/:id', function ({ sessions }, { params: { id } }) {
const session = sessions.find(id);
if (!Ember.testing) {
if (!isTesting) {
session.update({
status: pickRandomStatusString(),
});
@@ -509,6 +524,17 @@ export default function () {
this.del('/credential-libraries/:id');
this.patch('/credential-libraries/:id');
// managed-groups
this.get(
'/managed-groups',
({ managedGroups }, { queryParams: { auth_method_id: authMethodId } }) => {
return managedGroups.where({ authMethodId });
}
);
this.get('/managed-groups/:id');
this.del('/managed-groups/:id');
this.post('/managed-groups');
/* Uncomment the following line and the Response import above
* Then change the response code to simulate error responses.
* this.get('/scopes', () => new Response(505));
+1
View File
@@ -9,6 +9,7 @@ export default factory.extend({
'read',
'update',
'delete',
'set-password',
],
attributes() {
switch (this.type) {
+18 -2
View File
@@ -15,6 +15,7 @@ export default factory.extend({
authorized_collection_actions: () => {
return {
accounts: ['create', 'list'],
'managed-groups': ['create', 'list'],
};
},
id: (i) => `auth-method-id-${i}`,
@@ -23,15 +24,30 @@ export default factory.extend({
type: (i) => types[i % types.length],
/**
* Adds accounts (with associated users) to auth method.
* Adds accounts (with associated users) to auth method and managed groups.
*/
withAccountsAndUsers: trait({
withAccountsAndUsersAndManagedGroups: trait({
afterCreate(authMethod, server) {
const { scope, type } = authMethod;
server.createList('user', 5, { scope }).map((user) => {
const { id } = server.create('account', { scope, type, authMethod });
user.update({ accountIds: [id] });
});
if (type === 'oidc') {
server
.createList('managed-group', 2, { scope, authMethod })
.map((managedGroup) => {
const accounts = server.createList('account', 2, {
scope,
type,
authMethod,
});
const accountIds = accounts.map((account) => account.id);
managedGroup.update({ memberIds: accountIds });
});
}
},
}),
});
+2
View File
@@ -9,6 +9,8 @@ export default factory.extend({
'read',
'update',
'delete',
'add-members',
'remove-members',
],
id: (i) => `group-${i}`,
+2
View File
@@ -8,6 +8,8 @@ export default factory.extend({
'read',
'update',
'delete',
'add-hosts',
'remove-hosts',
],
id: (i) => `host-set-id-${i}`,
});
@@ -0,0 +1,27 @@
import factory from '../generated/factories/managed-group';
import { random } from 'faker';
import permissions from '../helpers/permissions';
const types = ['oidc'];
export default factory.extend({
id: (i) => `managed-groups-id-${i}`,
type: (i) => types[i % types.length],
authorized_actions: () =>
permissions.authorizedActionsFor('managed-group') || [
'no-op',
'read',
'update',
'delete',
],
attributes() {
switch (this.type) {
case 'oidc':
return {
filter: random.words(),
};
}
},
});
+3
View File
@@ -9,6 +9,9 @@ export default factory.extend({
'read',
'update',
'delete',
'set-grants',
'add-principals',
'remove-principals',
],
// eslint-disable-next-line ember/avoid-leaking-state-in-ember-objects
grant_strings: () => [
+6
View File
@@ -13,7 +13,13 @@ export default factory.extend({
'read',
'update',
'delete',
'authorize-session',
'add-host-sources',
'remove-host-sources',
'add-credential-sources',
'remove-credential-sources',
],
/**
* -1 means "unlimited" and we want to generate these on occasion.
*/
+2
View File
@@ -8,6 +8,8 @@ export default factory.extend({
'read',
'update',
'delete',
'add-accounts',
'remove-accounts',
],
id: (i) => `user-${i}`,
});
@@ -0,0 +1,14 @@
import { Factory } from 'ember-cli-mirage';
import { random, date, datatype } from 'faker';
/**
* GeneratedManagedGroupFactory
* A managed group is a resource that represents a collection of accounts.
*/
export default Factory.extend({
name: () => random.words(),
description: () => random.words(),
created_time: () => date.recent(),
updated_time: () => date.recent(),
version: () => datatype.number(),
});
@@ -1,5 +1,5 @@
import { Factory } from 'ember-cli-mirage';
import { random, date, datatype } from 'faker';
import { random, date, datatype, internet } from 'faker';
/**
* GeneratedUserModelFactory
@@ -11,4 +11,5 @@ export default Factory.extend({
created_time: () => date.recent(),
updated_time: () => date.recent(),
disabled: () => datatype.boolean(),
email: () => internet.email().toLowerCase(),
});
+35
View File
@@ -0,0 +1,35 @@
import { makeEvaluator } from 'js-bexpr';
import { underscore } from '@ember/string';
/**
* Because Mirage, a record cannot be serialized outside of a route handler
* context. Here is a quick and dirty attempt to serialize attribute names
* to underscore format. This is not entirely realistic, but may suffice.
*/
const quickSerialize = (item) => {
const json = item.toJSON();
Object.keys(json).forEach((key) => {
const newKey = underscore(key);
json[newKey] = json[key];
});
return json;
};
/**
* Creates a filter function that operates on a single object, which itself
* returns the result of evaluating the expression against the object.
*/
export default (expression) => {
if (expression) {
const evaluator = makeEvaluator(expression);
// Since API query selectors begin with `/item`, the instance is wrapped.
return (record) => {
const item = quickSerialize(record);
return evaluator({ item });
};
} else {
// If no expression was passed, always return true,
// thus filtering out none.
return () => true;
}
};
@@ -0,0 +1,6 @@
import { Model, belongsTo } from 'ember-cli-mirage';
export default Model.extend({
scope: belongsTo(),
authMethod: belongsTo(),
});
+2 -2
View File
@@ -24,13 +24,13 @@ export default function (server) {
'auth-method',
1,
{ scope: globalScope },
'withAccountsAndUsers'
'withAccountsAndUsersAndManagedGroups'
);
const orgAuthMethods = server.createList(
'auth-method',
3,
{ scope: orgScope },
'withAccountsAndUsers'
'withAccountsAndUsersAndManagedGroups'
);
// Assign primary auth methods per scope
// TODO make this generic
+10 -10
View File
@@ -1,8 +1,8 @@
import Ember from 'ember';
import config from 'ember-get-config';
import { datatype } from 'faker';
export default function initializeMockIPC(server) {
export default function initializeMockIPC(server, config) {
const isTesting = config.environment === 'test';
/**
* We strive to make this application runnable in a regular web browser, since
* it is a convenient environment for development and testing. But only an
@@ -120,17 +120,17 @@ export default function initializeMockIPC(server) {
}
/**
* Check for browsers running on mac OS
* Check for window chrome on MacOS
*/
isMacOS() {
return Boolean(window.navigator.userAgent.match(/(macintosh)/i));
hasMacOSChrome() {
return false;
}
/**
* Check for browsers running on windows OS
* Check for OS chrome state
*/
isWindowsOS() {
return Boolean(window.navigator.userAgent.match(/(windows)/i));
showWindowActions() {
return true;
}
/**
@@ -149,7 +149,7 @@ export default function initializeMockIPC(server) {
*
* Initializes mock IPC only in a non-Electron non-testing context.
*/
if (!config.isElectron && !Ember.testing) {
if (!config.isElectron && !isTesting) {
const mockIPC = new MockIPC();
window.addEventListener('message', async function (event) {
if (event.origin !== window.location.origin) return;
@@ -0,0 +1,14 @@
import ApplicationSerializer from './application';
export default ApplicationSerializer.extend({
modelName: 'managed-group',
_hashForModel(model) {
const json = ApplicationSerializer.prototype._hashForModel.apply(
this,
arguments
);
json.auth_method_id = model.authMethodId;
return json;
},
});
+2 -2
View File
@@ -17,14 +17,14 @@ export default ApplicationSerializer.extend({
);
const { hostSets } = this.schema;
if (model.hostSetIds?.length) {
json.host_sets = model.hostSetIds.map((host_set_id) => {
json.host_sources = model.hostSetIds.map((host_set_id) => {
const hostSet = hostSets.find(host_set_id);
const host_catalog_id = hostSet?.hostCatalog?.id;
return { id: host_set_id, host_catalog_id };
});
}
if (model.credentialLibraryIds?.length) {
json.application_credential_library_ids = model.credentialLibraryIds;
json.application_credential_source_ids = model.credentialLibraryIds;
}
return json;
},
+28 -27
View File
@@ -25,54 +25,55 @@
},
"dependencies": {
"ember-can": "^3.1.0",
"ember-cli-babel": "^7.23.0",
"ember-cli-htmlbars": "^5.3.1",
"ember-cli-mirage": "^1.1.8",
"ember-cli-babel": "^7.26.6",
"ember-cli-htmlbars": "^5.7.1",
"ember-cli-mirage": "^2.2.0",
"ember-data": "^3.20.0",
"ember-data-model-fragments": "5.0.0-beta.2",
"ember-fetch": "^8.1.0"
"ember-fetch": "^8.1.1"
},
"devDependencies": {
"js-bexpr": "hashicorp/js-bexpr#9b4a4b54d85eba67fdfc0990133d1518d890b1e1",
"@babel/core": "^7.15.8",
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^2.2.8",
"@glimmer/component": "^1.0.3",
"@glimmer/tracking": "^1.0.3",
"@ember/test-helpers": "^2.4.2",
"@glimmer/component": "^1.0.4",
"@glimmer/tracking": "^1.0.4",
"babel-eslint": "^10.1.0",
"broccoli-asset-rev": "^3.0.0",
"doctoc": "^2.0.0",
"ember-auto-import": "^1.10.1",
"ember-cli": "~3.28.0",
"doctoc": "^2.0.1",
"ember-auto-import": "^1.12.0",
"ember-cli": "~3.28.3",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.1",
"ember-cli-update": "^0.54.6",
"ember-copy": "^1.0.0",
"ember-cli-terser": "^4.0.2",
"ember-copy": "^2.0.1",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.1",
"ember-get-config": "^0.3.0",
"ember-load-initializers": "^2.1.2",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-page-title": "^6.0.3",
"ember-qunit": "^5.1.1",
"ember-resolver": "^8.0.2",
"ember-source": "~3.24.0",
"ember-maybe-import-regenerator": "^1.0.0",
"ember-page-title": "^6.2.2",
"ember-qunit": "^5.1.4",
"ember-resolver": "^8.0.3",
"ember-source": "~3.28.4",
"ember-source-channel-url": "^3.0.0",
"ember-template-lint": "^2.15.0",
"ember-template-lint": "^3.7.0",
"ember-try": "^1.4.0",
"eslint": "^7.31.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-ember": "^10.1.1",
"eslint-plugin-ember": "^10.5.4",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-qunit": "^6.2.0",
"loader.js": "^4.7.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.2.1",
"qunit": "^2.13.0",
"qunit-dom": "^1.6.0"
"prettier": "^2.4.0",
"qunit": "^2.17.1",
"qunit-dom": "^2.0.0"
},
"engines": {
"node": ">=10 <=15"
"node": ">=12 <=17"
},
"ember": {
"edition": "octane"
-7
View File
@@ -6,13 +6,6 @@ const browsers = [
'last 1 Safari versions',
];
const isCI = Boolean(process.env.CI);
const isProduction = process.env.EMBER_ENV === 'production';
if (isCI || isProduction) {
browsers.push('ie 11');
}
module.exports = {
browsers,
};
@@ -0,0 +1,17 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('Unit | Abilities | Account', function (hooks) {
setupTest(hooks);
test('it reflects when a given account may set password based on authorized_actions', function (assert) {
assert.expect(2);
const service = this.owner.lookup('service:can');
const model = {
authorized_actions: ['set-password'],
};
assert.ok(service.can('setPassword target', model));
model.authorized_actions = [];
assert.notOk(service.can('setPassword target', model));
});
});
@@ -0,0 +1,28 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('Unit | Abilities | Group', function (hooks) {
setupTest(hooks);
test('it reflects when a given group resource may add members based on authorized_actions', function (assert) {
assert.expect(2);
const service = this.owner.lookup('service:can');
const model = {
authorized_actions: ['add-members'],
};
assert.ok(service.can('addMembers group', model));
model.authorized_actions = [];
assert.notOk(service.can('addMembers group', model));
});
test('it reflects when a given group resource may remove members based on authorized_actions', function (assert) {
assert.expect(2);
const service = this.owner.lookup('service:can');
const model = {
authorized_actions: ['remove-members'],
};
assert.ok(service.can('removeMembers group', model));
model.authorized_actions = [];
assert.notOk(service.can('removeMembers group', model));
});
});
@@ -0,0 +1,28 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('Unit | Abilities | Host Set', function (hooks) {
setupTest(hooks);
test('it reflects when a given host set resource may add hosts based on authorized_actions', function (assert) {
assert.expect(2);
const service = this.owner.lookup('service:can');
const model = {
authorized_actions: ['add-hosts'],
};
assert.ok(service.can('addHosts hostSet', model));
model.authorized_actions = [];
assert.notOk(service.can('addHosts hostSet', model));
});
test('it reflects when a given hostSet resource may remove hosts based on authorized_actions', function (assert) {
assert.expect(2);
const service = this.owner.lookup('service:can');
const model = {
authorized_actions: ['remove-hosts'],
};
assert.ok(service.can('removeHosts hostSet', model));
model.authorized_actions = [];
assert.notOk(service.can('removeHosts hostSet', model));
});
});
@@ -0,0 +1,39 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('Unit | Abilities | Role', function (hooks) {
setupTest(hooks);
test('it reflects when a given role may set grants based on authorized_actions', function (assert) {
assert.expect(2);
const service = this.owner.lookup('service:can');
const model = {
authorized_actions: ['set-grants'],
};
assert.ok(service.can('setGrants role', model));
model.authorized_actions = [];
assert.notOk(service.can('setGrants role', model));
});
test('it reflects when a given role may add principals based on authorized_actions', function (assert) {
assert.expect(2);
const service = this.owner.lookup('service:can');
const model = {
authorized_actions: ['add-principals'],
};
assert.ok(service.can('addPrincipals role', model));
model.authorized_actions = [];
assert.notOk(service.can('addPrincipals role', model));
});
test('it reflects when a given role may remove principals based on authorized_actions', function (assert) {
assert.expect(2);
const service = this.owner.lookup('service:can');
const model = {
authorized_actions: ['remove-principals'],
};
assert.ok(service.can('removePrincipals role', model));
model.authorized_actions = [];
assert.notOk(service.can('removePrincipals role', model));
});
});
@@ -0,0 +1,61 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('Unit | Abilities | Target', function (hooks) {
setupTest(hooks);
test('it reflects when a given target may connect based on authorized_actions', function (assert) {
assert.expect(2);
const service = this.owner.lookup('service:can');
const model = {
authorized_actions: ['authorize-session'],
};
assert.ok(service.can('connect target', model));
model.authorized_actions = [];
assert.notOk(service.can('connect target', model));
});
test('it reflects when a given target may add host sources', function (assert) {
assert.expect(2);
const service = this.owner.lookup('service:can');
const model = {
authorized_actions: ['add-host-sources'],
};
assert.ok(service.can('addHostSources target', model));
model.authorized_actions = [];
assert.notOk(service.can('addHostSources target', model));
});
test('it reflects when a given target may remove host sources', function (assert) {
assert.expect(2);
const service = this.owner.lookup('service:can');
const model = {
authorized_actions: ['remove-host-sources'],
};
assert.ok(service.can('removeHostSources target', model));
model.authorized_actions = [];
assert.notOk(service.can('removeHostSources target', model));
});
test('it reflects when a given target may add credential sources', function (assert) {
assert.expect(2);
const service = this.owner.lookup('service:can');
const model = {
authorized_actions: ['add-credential-sources'],
};
assert.ok(service.can('addCredentialSources target', model));
model.authorized_actions = [];
assert.notOk(service.can('addCredentialSources target', model));
});
test('it reflects when a given target may remove crednetial sources', function (assert) {
assert.expect(2);
const service = this.owner.lookup('service:can');
const model = {
authorized_actions: ['remove-credential-sources'],
};
assert.ok(service.can('removeCredentialSources target', model));
model.authorized_actions = [];
assert.notOk(service.can('removeCredentialSources target', model));
});
});
@@ -0,0 +1,28 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('Unit | Abilities | User', function (hooks) {
setupTest(hooks);
test('it reflects when a given user resource may add accounts based on authorized_actions', function (assert) {
assert.expect(2);
const service = this.owner.lookup('service:can');
const model = {
authorized_actions: ['add-accounts'],
};
assert.ok(service.can('addAccounts user', model));
model.authorized_actions = [];
assert.notOk(service.can('addAccounts user', model));
});
test('it reflects when a given user resource may remove accounts based on authorized_actions', function (assert) {
assert.expect(2);
const service = this.owner.lookup('service:can');
const model = {
authorized_actions: ['remove-accounts'],
};
assert.ok(service.can('removeAccounts user', model));
model.authorized_actions = [];
assert.notOk(service.can('removeAccounts user', model));
});
});
@@ -1,6 +1,5 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import config from 'ember-get-config';
import RESTAdapter from '@ember-data/adapter/rest';
import { InvalidError } from '@ember-data/adapter/error';
import setupMirage from 'ember-cli-mirage/test-support/setup-mirage';
@@ -10,6 +9,12 @@ module('Unit | Adapter | application', function (hooks) {
setupTest(hooks);
setupMirage(hooks);
let config;
hooks.beforeEach(function () {
config = this.owner.resolveRegistration('config:environment');
});
test('its namespace is equal to the configured namespace', function (assert) {
assert.expect(2);
const adapter = this.owner.lookup('adapter:application');
+9 -9
View File
@@ -47,7 +47,7 @@ module('Unit | Model | base', function (hooks) {
assert.notEqual(model.scopeID, scope.id);
model.scopeModel = scope;
assert.equal(model.scopeID, scope.id);
assert.equal(model.scope.isOrg, true);
assert.true(model.scope.isOrg);
});
test('it has a displayName attribute', function (assert) {
@@ -78,18 +78,18 @@ module('Unit | Model | base', function (hooks) {
},
});
const model = store.peekRecord('user', '1');
assert.equal(model.canSave, false);
assert.equal(model.cannotSave, true);
assert.false(model.canSave);
assert.true(model.cannotSave);
// Should be able to save if dirty
model.name = 'User';
assert.equal(model.hasDirtyAttributes, true);
assert.equal(model.canSave, true);
assert.equal(model.cannotSave, false);
assert.true(model.hasDirtyAttributes);
assert.true(model.canSave);
assert.false(model.cannotSave);
// Should not be able to save while currently saving
model.transitionTo('updated.inFlight');
assert.equal(model.isSaving, true);
assert.equal(model.canSave, false);
assert.equal(model.cannotSave, true);
assert.true(model.isSaving);
assert.false(model.canSave);
assert.true(model.cannotSave);
model.transitionTo('loaded');
});
@@ -0,0 +1,12 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('Unit | Model | fragment host source', function (hooks) {
setupTest(hooks);
test('it exists', function (assert) {
let store = this.owner.lookup('service:store');
let model = store.createRecord('fragment-host-source', {});
assert.ok(model);
});
});
@@ -0,0 +1,13 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('Unit | Model | fragment managed group attributes', function (hooks) {
setupTest(hooks);
// Replace this with your real tests.
test('it exists', function (assert) {
let store = this.owner.lookup('service:store');
let model = store.createRecord('fragment-managed-group-attributes', {});
assert.ok(model);
});
});
@@ -68,7 +68,7 @@ module('Unit | Model | host set', function (hooks) {
await model.addHost('foobar');
});
test('it has a `removeHostSets` method that targets a specific POST API endpoint and serialization', async function (assert) {
test('it has a `removeHosts` method that targets a specific POST API endpoint and serialization', async function (assert) {
assert.expect(1);
this.server.post('/v1/host-sets/123abc:remove-hosts', (schema, request) => {
const body = JSON.parse(request.requestBody);
@@ -1,12 +1,12 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('Unit | Model | fragment host set', function (hooks) {
module('Unit | Model | managed group', function (hooks) {
setupTest(hooks);
test('it exists', function (assert) {
let store = this.owner.lookup('service:store');
let model = store.createRecord('fragment-host-set', {});
let model = store.createRecord('managed-group', {});
assert.ok(model);
});
});
+84 -81
View File
@@ -14,18 +14,18 @@ module('Unit | Model | target', function (hooks) {
id: '123abc',
type: 'target',
attributes: {
host_sets: [
{ host_set_id: '1', host_catalog_id: '2' },
{ host_set_id: '3', host_catalog_id: '2' },
host_sources: [
{ host_source_id: '1', host_catalog_id: '2' },
{ host_source_id: '3', host_catalog_id: '2' },
],
},
},
});
const target = store.peekRecord('target', '123abc');
assert.equal(
target.host_sets.length,
target.host_sources.length,
2,
'Target has two entires in host_sets'
'Target has two entires in host_sources'
);
assert.equal(
target.hostSets.length,
@@ -46,14 +46,14 @@ module('Unit | Model | target', function (hooks) {
attributes: {},
},
});
// Since `hostSets` is computed on `host_sets`, not the store itself,
// Since `hostSets` is computed on `host_sources`, not the store itself,
// it's necessary to do this assignment to kick-off the computed update.
// eslint-disable-next-line no-self-assign
target.host_sets = target.host_sets;
target.host_sources = target.host_sources;
assert.equal(
target.host_sets.length,
target.host_sources.length,
2,
'Target has two entires in host_sets'
'Target has two entires in host_sources'
);
assert.equal(target.hostSets.length, 2, 'Target has two resolved hostSets');
assert.notOk(
@@ -68,52 +68,18 @@ module('Unit | Model | target', function (hooks) {
},
});
// eslint-disable-next-line no-self-assign
target.host_sets = target.host_sets;
target.host_sources = target.host_sources;
assert.ok(target.hostSets[0].hostCatalog, 'Host catalog is resolved');
});
test('it has an `addHostSets` method that targets a specific POST API endpoint and serialization', async function (assert) {
assert.expect(1);
this.server.post('/v1/targets/123abc:add-host-sets', (schema, request) => {
const body = JSON.parse(request.requestBody);
assert.deepEqual(body, {
host_set_ids: ['123_abc', 'foobar'],
version: 1,
});
return { id: '123abc' };
});
const store = this.owner.lookup('service:store');
store.push({
data: {
id: '123abc',
type: 'target',
attributes: {
name: 'Target',
description: 'Description',
host_sets: [
{ host_set_id: '1', host_catalog_id: '2' },
{ host_set_id: '3', host_catalog_id: '4' },
],
version: 1,
scope: {
scope_id: 'o_1',
type: 'scope',
},
},
},
});
const model = store.peekRecord('target', '123abc');
await model.addHostSets(['123_abc', 'foobar']);
});
test('it has a `removeHostSets` method that targets a specific POST API endpoint and serialization', async function (assert) {
test('it has an `addHostSources` method that targets a specific POST API endpoint and serialization', async function (assert) {
assert.expect(1);
this.server.post(
'/v1/targets/123abc:remove-host-sets',
'/v1/targets/123abc:add-host-sources',
(schema, request) => {
const body = JSON.parse(request.requestBody);
assert.deepEqual(body, {
host_set_ids: ['1', '3'],
host_source_ids: ['123_abc', 'foobar'],
version: 1,
});
return { id: '123abc' };
@@ -127,9 +93,9 @@ module('Unit | Model | target', function (hooks) {
attributes: {
name: 'Target',
description: 'Description',
host_sets: [
{ host_set_id: '1', host_catalog_id: '2' },
{ host_set_id: '3', host_catalog_id: '4' },
host_sources: [
{ host_source_id: '1', host_catalog_id: '2' },
{ host_source_id: '3', host_catalog_id: '4' },
],
version: 1,
scope: {
@@ -140,17 +106,17 @@ module('Unit | Model | target', function (hooks) {
},
});
const model = store.peekRecord('target', '123abc');
await model.removeHostSets(['1', '3']);
await model.addHostSources(['123_abc', 'foobar']);
});
test('it has a `removeHostSet` method that deletes a single host set using `removeHostSets` method', async function (assert) {
test('it has a `removeHostSources` method that targets a specific POST API endpoint and serialization', async function (assert) {
assert.expect(1);
this.server.post(
'/v1/targets/123abc:remove-host-sets',
'/v1/targets/123abc:remove-host-sources',
(schema, request) => {
const body = JSON.parse(request.requestBody);
assert.deepEqual(body, {
host_set_ids: ['3'],
host_source_ids: ['1', '3'],
version: 1,
});
return { id: '123abc' };
@@ -164,9 +130,9 @@ module('Unit | Model | target', function (hooks) {
attributes: {
name: 'Target',
description: 'Description',
host_sets: [
{ host_set_id: '1', host_catalog_id: '2' },
{ host_set_id: '3', host_catalog_id: '4' },
host_sources: [
{ host_source_id: '1', host_catalog_id: '2' },
{ host_source_id: '3', host_catalog_id: '4' },
],
version: 1,
scope: {
@@ -177,7 +143,44 @@ module('Unit | Model | target', function (hooks) {
},
});
const model = store.peekRecord('target', '123abc');
await model.removeHostSet('3');
await model.removeHostSources(['1', '3']);
});
test('it has a `removeHostSource` method that deletes a single host set using `removeHostSources` method', async function (assert) {
assert.expect(1);
this.server.post(
'/v1/targets/123abc:remove-host-sources',
(schema, request) => {
const body = JSON.parse(request.requestBody);
assert.deepEqual(body, {
host_source_ids: ['3'],
version: 1,
});
return { id: '123abc' };
}
);
const store = this.owner.lookup('service:store');
store.push({
data: {
id: '123abc',
type: 'target',
attributes: {
name: 'Target',
description: 'Description',
host_sources: [
{ host_source_id: '1', host_catalog_id: '2' },
{ host_source_id: '3', host_catalog_id: '4' },
],
version: 1,
scope: {
scope_id: 'o_1',
type: 'scope',
},
},
},
});
const model = store.peekRecord('target', '123abc');
await model.removeHostSource('3');
});
test('it has a `sessions` array of session instances associated with the target (if those instances are already in the store)', function (assert) {
@@ -232,15 +235,15 @@ module('Unit | Model | target', function (hooks) {
id: '123abc',
type: 'target',
attributes: {
application_credential_library_ids: [{ value: '1' }, { value: '2' }],
application_credential_source_ids: [{ value: '1' }, { value: '2' }],
},
},
});
const target = store.peekRecord('target', '123abc');
assert.equal(
target.application_credential_library_ids.length,
target.application_credential_source_ids.length,
2,
'Target has two entires in application_credential_library_ids'
'Target has two entires in application_credential_source_ids'
);
assert.equal(
target.credentialLibraries.length,
@@ -261,17 +264,17 @@ module('Unit | Model | target', function (hooks) {
attributes: {},
},
});
// Since `credentialLibraries` is computed on `application_credential_library_ids`,
// Since `credentialLibraries` is computed on `application_credential_source_ids`,
// not the store itself, it's necessary to do this assignment to kick-off the
// computed update.
/* eslint-disable no-self-assign */
target.application_credential_library_ids =
target.application_credential_library_ids;
target.application_credential_source_ids =
target.application_credential_source_ids;
/* eslint-enable no-self-assign */
assert.equal(
target.application_credential_library_ids.length,
target.application_credential_source_ids.length,
2,
'Target has two entires in application_credential_library_ids'
'Target has two entires in application_credential_source_ids'
);
assert.equal(
target.credentialLibraries.length,
@@ -280,14 +283,14 @@ module('Unit | Model | target', function (hooks) {
);
});
test('it has an `addCredentialLibraries` method that targets a specific POST API endpoint and serialization', async function (assert) {
test('it has an `addCredentialSources` method that targets a specific POST API endpoint and serialization', async function (assert) {
assert.expect(1);
this.server.post(
'/v1/targets/123abc:add-credential-libraries',
'/v1/targets/123abc:add-credential-sources',
(schema, request) => {
const body = JSON.parse(request.requestBody);
assert.deepEqual(body, {
application_credential_library_ids: ['123_abc', 'foobar'],
application_credential_source_ids: ['123_abc', 'foobar'],
version: 1,
});
return { id: '123abc' };
@@ -301,7 +304,7 @@ module('Unit | Model | target', function (hooks) {
attributes: {
name: 'Target',
description: 'Description',
application_credential_library_ids: [{ value: '1' }, { value: '2' }],
application_credential_source_ids: [{ value: '1' }, { value: '2' }],
version: 1,
scope: {
scope_id: 'o_1',
@@ -311,17 +314,17 @@ module('Unit | Model | target', function (hooks) {
},
});
const model = store.peekRecord('target', '123abc');
await model.addCredentialLibraries(['123_abc', 'foobar']);
await model.addCredentialSources(['123_abc', 'foobar']);
});
test('it has a `removeCredentialLibraries` method that targets a specific POST API endpoint and serialization', async function (assert) {
test('it has a `removeCredentialSources` method that targets a specific POST API endpoint and serialization', async function (assert) {
assert.expect(1);
this.server.post(
'/v1/targets/123abc:remove-credential-libraries',
'/v1/targets/123abc:remove-credential-sources',
(schema, request) => {
const body = JSON.parse(request.requestBody);
assert.deepEqual(body, {
application_credential_library_ids: ['1', '2'],
application_credential_source_ids: ['1', '2'],
version: 1,
});
return { id: '123abc' };
@@ -335,7 +338,7 @@ module('Unit | Model | target', function (hooks) {
attributes: {
name: 'Target',
description: 'Description',
application_credential_library_ids: [{ value: '1' }, { value: '2' }],
application_credential_source_ids: [{ value: '1' }, { value: '2' }],
version: 1,
scope: {
scope_id: 'o_1',
@@ -345,17 +348,17 @@ module('Unit | Model | target', function (hooks) {
},
});
const model = store.peekRecord('target', '123abc');
await model.removeCredentialLibraries(['1', '2']);
await model.removeCredentialSources(['1', '2']);
});
test('it has a `removeCredentialLibrary` method that deletes a single credential library using `removeCredentialLibraries` method', async function (assert) {
test('it has a `removeCredentialSource` method that deletes a single credential library using `removeCredentialSources` method', async function (assert) {
assert.expect(1);
this.server.post(
'/v1/targets/123abc:remove-credential-libraries',
'/v1/targets/123abc:remove-credential-sources',
(schema, request) => {
const body = JSON.parse(request.requestBody);
assert.deepEqual(body, {
application_credential_library_ids: ['2'],
application_credential_source_ids: ['2'],
version: 1,
});
return { id: '123abc' };
@@ -369,7 +372,7 @@ module('Unit | Model | target', function (hooks) {
attributes: {
name: 'Target',
description: 'Description',
application_credential_library_ids: [{ value: '1' }, { value: '2' }],
application_credential_source_ids: [{ value: '1' }, { value: '2' }],
version: 1,
scope: {
scope_id: 'o_1',
@@ -379,6 +382,6 @@ module('Unit | Model | target', function (hooks) {
},
});
const model = store.peekRecord('target', '123abc');
await model.removeCredentialLibrary('2');
await model.removeCredentialSource('2');
});
});
@@ -204,8 +204,8 @@ module('Unit | Serializer | application', function (hooks) {
authorized_actions: [],
name: 'Target 1',
scope: { scope_id: 'o_123' },
host_sets: [],
application_credential_library_ids: [],
host_sources: [],
application_credential_source_ids: [],
},
relationships: {},
},
@@ -1,27 +1,27 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import FragmentHostSet from 'api/models/fragment-host-set';
import FragmentHostSource from 'api/models/fragment-host-source';
module('Unit | Serializer | fragment host set', function (hooks) {
module('Unit | Serializer | fragment host source', function (hooks) {
setupTest(hooks);
test('it normalizes `id` into `host_set_id`', function (assert) {
test('it normalizes `id` into `host_source_id`', function (assert) {
assert.expect(1);
const store = this.owner.lookup('service:store');
const serializer = store.serializerFor('fragment-host-set');
const normalized = serializer.normalize(FragmentHostSet, {
const serializer = store.serializerFor('fragment-host-source');
const normalized = serializer.normalize(FragmentHostSource, {
id: '2',
host_catalog_id: '1',
});
assert.deepEqual(normalized, {
data: {
attributes: {
host_set_id: '2',
host_source_id: '2',
host_catalog_id: '1',
},
id: null,
relationships: {},
type: 'fragment-host-set',
type: 'fragment-host-source',
},
});
});
@@ -0,0 +1,21 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module(
'Unit | Serializer | fragment managed groups attributes',
function (hooks) {
setupTest(hooks);
test('it serializes empty string to null', function (assert) {
assert.expect(1);
const store = this.owner.lookup('service:store');
const record = store.createRecord('fragment-managed-group-attributes', {
filter: '',
});
const serializedRecord = record.serialize();
assert.deepEqual(serializedRecord, {
filter: null,
});
});
}
);
@@ -0,0 +1,161 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('Unit | Serializer | Managed group', function (hooks) {
setupTest(hooks);
test('it serializes correctly on create with no filter provided', function (assert) {
assert.expect(1);
const store = this.owner.lookup('service:store');
const serializer = store.serializerFor('managed-group');
const record = store.createRecord('managed-group', {
name: 'Group',
description: 'Description',
member_ids: ['1', '2'],
version: 1,
auth_method_id: '1234',
});
const snapshot = record._createSnapshot();
snapshot.adapterOptions = {};
const serializedRecord = serializer.serialize(snapshot);
assert.deepEqual(serializedRecord, {
name: 'Group',
description: 'Description',
version: 1,
auth_method_id: '1234',
type: null,
attributes: {
filter: null,
},
});
});
test('it serializes correctly on create when filter provided', function (assert) {
assert.expect(1);
const store = this.owner.lookup('service:store');
const serializer = store.serializerFor('managed-group');
const record = store.createRecord('managed-group', {
name: 'Group',
description: 'Description',
member_ids: ['1', '2'],
version: 1,
auth_method_id: '1234',
type: 'oidc',
attributes: {
filter: 'key=value',
},
});
const snapshot = record._createSnapshot();
snapshot.adapterOptions = {};
const serializedRecord = serializer.serialize(snapshot);
assert.deepEqual(serializedRecord, {
name: 'Group',
description: 'Description',
version: 1,
auth_method_id: '1234',
type: 'oidc',
attributes: {
filter: 'key=value',
},
});
});
test('it does not serialize version when it has null or undefined value', function (assert) {
assert.expect(1);
const store = this.owner.lookup('service:store');
const serializer = store.serializerFor('managed-group');
store.push({
data: {
id: '1',
type: 'managed-group',
attributes: {
name: 'Group Test',
description: 'Description for the test',
member_ids: ['1', '2'],
version: undefined,
auth_method_id: '1234',
type: 'oidc',
attributes: {
filter: 'key=value',
},
},
},
});
const record = store.peekRecord('managed-group', '1');
const snapshot = record._createSnapshot();
const serializedRecord = serializer.serialize(snapshot);
assert.deepEqual(serializedRecord, {
name: 'Group Test',
description: 'Description for the test',
auth_method_id: '1234',
type: 'oidc',
attributes: {
filter: 'key=value',
},
});
});
test('it does not serialize readOnly attributes', function (assert) {
assert.expect(1);
const store = this.owner.lookup('service:store');
const serializer = store.serializerFor('managed-group');
const record = store.createRecord('managed-group', {
name: 'Group',
description: 'Description',
version: 1,
auth_method_id: '1234',
member_ids: ['1', '2'],
created_time: Date.now(),
updated_time: Date.now(),
});
const snapshot = record._createSnapshot();
snapshot.adapterOptions = {};
const serializedRecord = serializer.serialize(snapshot);
assert.deepEqual(serializedRecord, {
name: 'Group',
description: 'Description',
version: 1,
auth_method_id: '1234',
type: null,
attributes: {
filter: null,
},
});
});
test('it serializes correctly on update', function (assert) {
assert.expect(1);
const store = this.owner.lookup('service:store');
const serializer = store.serializerFor('managed-group');
store.push({
data: {
id: '1',
type: 'managed-group',
attributes: {
name: 'Group Test',
description: 'Description for the test',
member_ids: ['1', '2'],
version: 1,
auth_method_id: '1234',
type: 'oidc',
attributes: {
filter: 'key=value',
},
},
},
});
const record = store.peekRecord('managed-group', '1');
const snapshot = record._createSnapshot();
const serializedRecord = serializer.serialize(snapshot);
assert.deepEqual(serializedRecord, {
name: 'Group Test',
description: 'Description for the test',
version: 1,
auth_method_id: '1234',
type: 'oidc',
attributes: {
filter: 'key=value',
},
});
});
});
@@ -11,11 +11,11 @@ module('Unit | Serializer | target', function (hooks) {
const record = store.createRecord('target', {
name: 'User',
description: 'Description',
host_sets: [
{ host_set_id: '1', host_catalog_id: '2' },
{ host_set_id: '3', host_catalog_id: '4' },
host_sources: [
{ host_source_id: '1', host_catalog_id: '2' },
{ host_source_id: '3', host_catalog_id: '4' },
],
application_credential_library_ids: [{ value: '1' }, { value: '2' }],
application_credential_source_ids: [{ value: '1' }, { value: '2' }],
scope: {
scope_id: 'org_1',
type: 'org',
@@ -40,16 +40,16 @@ module('Unit | Serializer | target', function (hooks) {
});
});
test('it serializes only host sets and version when an `adapterOptions.hostSetIDs` array is passed', function (assert) {
test('it serializes only host sources and version when an `adapterOptions.hostSetIDs` array is passed', function (assert) {
assert.expect(1);
const store = this.owner.lookup('service:store');
const serializer = store.serializerFor('target');
const record = store.createRecord('target', {
name: 'User',
description: 'Description',
host_sets: [
{ host_set_id: '1', host_catalog_id: '2' },
{ host_set_id: '3', host_catalog_id: '4' },
host_sources: [
{ host_source_id: '1', host_catalog_id: '2' },
{ host_source_id: '3', host_catalog_id: '4' },
],
version: 1,
});
@@ -59,19 +59,19 @@ module('Unit | Serializer | target', function (hooks) {
};
const serializedRecord = serializer.serialize(snapshot);
assert.deepEqual(serializedRecord, {
host_set_ids: ['4', '5'],
host_source_ids: ['4', '5'],
version: 1,
});
});
test('it serializes only credential libraries and version when an `adapterOptions.credentialLibraryIDs` array is passed', function (assert) {
test('it serializes only credential sources and version when an `adapterOptions.credentialLibraryIDs` array is passed', function (assert) {
assert.expect(1);
const store = this.owner.lookup('service:store');
const serializer = store.serializerFor('target');
const record = store.createRecord('target', {
name: 'User',
description: 'Description',
application_credential_library_ids: [{ value: '1' }, { value: '2' }],
application_credential_source_ids: [{ value: '1' }, { value: '2' }],
version: 1,
});
const snapshot = record._createSnapshot();
@@ -80,7 +80,7 @@ module('Unit | Serializer | target', function (hooks) {
};
const serializedRecord = serializer.serialize(snapshot);
assert.deepEqual(serializedRecord, {
application_credential_library_ids: ['4', '5'],
application_credential_source_ids: ['4', '5'],
version: 1,
});
});
@@ -93,11 +93,11 @@ module('Unit | Serializer | target', function (hooks) {
const payload = {
id: '1',
name: 'Target 1',
host_sets: [
{ host_set_id: '1', host_catalog_id: '2' },
{ host_set_id: '3', host_catalog_id: '4' },
host_sources: [
{ host_source_id: '1', host_catalog_id: '2' },
{ host_source_id: '3', host_catalog_id: '4' },
],
application_credential_library_ids: ['1'],
application_credential_source_ids: ['1'],
};
const normalized = serializer.normalizeSingleResponse(
store,
@@ -112,18 +112,18 @@ module('Unit | Serializer | target', function (hooks) {
attributes: {
authorized_actions: [],
name: 'Target 1',
host_sets: [
{ host_set_id: '1', host_catalog_id: '2' },
{ host_set_id: '3', host_catalog_id: '4' },
host_sources: [
{ host_source_id: '1', host_catalog_id: '2' },
{ host_source_id: '3', host_catalog_id: '4' },
],
application_credential_library_ids: [{ value: '1' }],
application_credential_source_ids: [{ value: '1' }],
},
relationships: {},
},
});
});
test('it normalizes missing host_sets and credential libraries to empty array', function (assert) {
test('it normalizes missing host_sources and application_credential_source_ids to empty array', function (assert) {
assert.expect(1);
const store = this.owner.lookup('service:store');
const serializer = store.serializerFor('target');
@@ -147,8 +147,8 @@ module('Unit | Serializer | target', function (hooks) {
authorized_actions: [],
name: 'Target 1',
scope: { scope_id: 'o_123' },
host_sets: [],
application_credential_library_ids: [],
host_sources: [],
application_credential_source_ids: [],
},
relationships: {},
},
@@ -0,0 +1,18 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import { ResourceFilter } from 'api/services/resource-filter-store';
module('Unit | Service | resource-filter-store', function (hooks) {
setupTest(hooks);
test('it exports a ResourceFilter class that converts filterObjects to query expressions', function (assert) {
assert.ok(ResourceFilter);
const filter = new ResourceFilter({
type: 'oidc',
status: ['active', 'pending'],
});
const expected =
'("/item/type" == "oidc") and ("/item/status" == "active" or "/item/status" == "pending")';
assert.equal(filter.queryExpression, expected);
});
});
@@ -30,7 +30,7 @@ module('Unit | Service | storage', function (hooks) {
assert.equal(service.getItem('foo'), 'bar');
});
test("it's in-memory storage is implicitly refreshed for every test case", function (assert) {
test("it's in-memory storage is implicitly refreshed for every test case, and thus values from previous runs are not present", function (assert) {
assert.expect(1);
const service = this.owner.lookup('service:storage');
assert.notOk(service.getItem('foo'));
-3
View File
@@ -12,8 +12,5 @@ insert_final_newline = true
indent_style = space
indent_size = 2
[*.hbs]
insert_final_newline = false
[*.{diff,md}]
trim_trailing_whitespace = false
+5
View File
@@ -56,5 +56,10 @@ module.exports = {
plugins: ['node'],
extends: ['plugin:node/recommended'],
},
{
// Test files:
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
},
],
};
+25 -24
View File
@@ -21,51 +21,52 @@
"doc:toc": "doctoc README.md"
},
"dependencies": {
"ember-cli-babel": "^7.23.0",
"ember-cli-htmlbars": "^5.3.1",
"ember-simple-auth": "^3.0.1"
"ember-cli-babel": "^7.26.6",
"ember-cli-htmlbars": "^5.7.1",
"ember-fetch": "^8.1.1",
"ember-simple-auth": "^4.0.0"
},
"devDependencies": {
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^2.2.8",
"@glimmer/component": "^1.0.3",
"@glimmer/tracking": "^1.0.3",
"@ember/test-helpers": "^2.4.2",
"@glimmer/component": "^1.0.4",
"@glimmer/tracking": "^1.0.4",
"babel-eslint": "^10.1.0",
"broccoli-asset-rev": "^3.0.0",
"core": "*",
"doctoc": "^2.0.0",
"ember-auto-import": "^1.10.1",
"ember-cli": "~3.28.0",
"doctoc": "^2.0.1",
"ember-auto-import": "^1.12.0",
"ember-cli": "~3.28.3",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.1",
"ember-cli-update": "^0.54.6",
"ember-cli-terser": "^4.0.2",
"ember-cookies": "^0.5.2",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.1",
"ember-load-initializers": "^2.1.2",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-page-title": "^6.0.3",
"ember-qunit": "^5.1.1",
"ember-resolver": "^8.0.2",
"ember-source": "~3.24.0",
"ember-maybe-import-regenerator": "^1.0.0",
"ember-page-title": "^6.2.2",
"ember-qunit": "^5.1.4",
"ember-resolver": "^8.0.3",
"ember-source": "~3.28.4",
"ember-source-channel-url": "^3.0.0",
"ember-template-lint": "^2.15.0",
"ember-template-lint": "^3.7.0",
"ember-try": "^1.4.0",
"eslint": "^7.31.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-ember": "^10.1.1",
"eslint-plugin-ember": "^10.5.4",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-qunit": "^6.2.0",
"loader.js": "^4.7.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.2.1",
"qunit": "^2.13.0",
"qunit-dom": "^1.6.0"
"prettier": "^2.4.0",
"qunit": "^2.17.1",
"qunit-dom": "^2.0.0"
},
"engines": {
"node": ">=10 <=15"
"node": ">=12 <=17"
},
"ember": {
"edition": "octane"
@@ -6,13 +6,6 @@ const browsers = [
'last 1 Safari versions',
];
const isCI = Boolean(process.env.CI);
const isProduction = process.env.EMBER_ENV === 'production';
if (isCI || isProduction) {
browsers.push('ie 11');
}
module.exports = {
browsers,
};
-3
View File
@@ -12,8 +12,5 @@ insert_final_newline = true
indent_style = space
indent_size = 2
[*.hbs]
insert_final_newline = false
[*.{diff,md}]
trim_trailing_whitespace = false
+5
View File
@@ -56,5 +56,10 @@ module.exports = {
plugins: ['node'],
extends: ['plugin:node/recommended'],
},
{
// Test files:
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
},
],
};
@@ -4,5 +4,5 @@
target="_blank"
rel="noreferrer noopener"
title={{t "actions.get-topic-help"}}>
<Rose::Icon @name="flight-icons/help-24" @size={{@iconSize}} />
<Rose::Icon @name="flight-icons/svg/help-24" @size={{@iconSize}} />
</a>
@@ -28,11 +28,11 @@ export default class ErrorMessageComponent extends MessageComponent {
get icon() {
switch (this.args.status) {
case '404':
return 'flight-icons/help-16';
return 'flight-icons/svg/help-16';
case '401':
case '403':
default:
return 'flight-icons/alert-circle-16';
return 'flight-icons/svg/alert-circle-16';
}
}
@@ -0,0 +1,92 @@
/**
* A resource filter param is a concise way to express a route query parameter.
* Resource filter params abstract away a route's query parameter
* interface, treating a query param as a simple attribute on a route instance.
* Getting the attribute value is equivalent to looking up the associated query
* parameter. Setting the attribute is equivalent to transitioning to the route
* and passing the associated query parameter value.
*
* Additionally, resource filter params may declare `allowedValues`, an array
* containing the set of values the parameter may take. While unenforced,
* `allowedValues` are useful metadata about a resource filter and may be fetch
* via `ResourceFilterParamHelper`. An optional default value may be specified
* via `defaultValue` passed to the decorator.
*
* @see ResourceFilterParamHelper
*
* @example
*
* export default class MyRoute extends Route {
*
* @resourceFilterParam(['active', 'pending'], ['active'])
* status;
*
* @action
* changeStatus(status) {
* // Sets query param `filter-status` on the current route, which occurs
* // via a route transition.
* this.status = status;
* // Log the value of query param `filter-status`.
* log(this.status);
* }
* }
*
*/
export function resourceFilterParam(allowedValues, defaultValue) {
/**
* @param {object} target
* @param {string} name
* @param {object} descriptor
* @return {object{get, set}}
*/
return function (target, name /*, descriptor*/) {
const filterKey = `filter-${name}`;
const filterAllowedValuesKey = `filter-allowed-values-${name}`;
// If the route has no query params specified yet, declare them.
if (!Object.keys(target.queryParams).length) target.queryParams = {};
// If the route has no resource filters list specified yet, create one.
if (!target.resourceFilterParams) target.resourceFilterParams = [];
// Add the resource filter query parameter to the route. Resource filter
// param changes refresh the model but do not contribute to browser history.
// See https://guides.emberjs.com/release/routing/query-params/
target.queryParams[filterKey] = {
refreshModel: true,
replace: true,
};
// Note the name of this filter param.
target.resourceFilterParams.push(name);
// Store the allowed values for future lookup
// (via `ResourceFilterParamHelper`).
target[filterAllowedValuesKey] = allowedValues;
// Override the decorated attribute with a getter and setter.
return {
/**
* Returns the JSON-parsed query parameter value OR defaultValue.
*/
get() {
const value =
this.paramsFor(this.routeName)[filterKey] ||
JSON.stringify(defaultValue);
return value ? JSON.parse(value) : null;
},
/**
* Sets the resource filter param to the stringified representation
* of `value`. NOTE: this is equivalent to transitioning into the
* current route, changing the associated query param.
* @param value
*/
set(value) {
const queryParams = {};
queryParams[filterKey] = JSON.stringify(value);
this.transitionTo({ queryParams });
},
};
};
}
+8 -5
View File
@@ -1,6 +1,9 @@
import { helper } from '@ember/component/helper';
import config from 'ember-get-config';
import Helper from '@ember/component/helper';
import { getOwner } from '@ember/application';
export default helper(function appName() {
return config.appName;
});
export default class extends Helper {
compute() {
const config = getOwner(this).resolveRegistration('config:environment');
return config.appName;
}
}
@@ -1,7 +1,10 @@
import { helper } from '@ember/component/helper';
import config from 'ember-get-config';
import Helper from '@ember/component/helper';
import { getOwner } from '@ember/application';
export default helper(function companyCopyright() {
const currentYear = new Date().getFullYear();
return `© ${currentYear} ${config.companyName}`;
});
export default class extends Helper {
compute() {
const config = getOwner(this).resolveRegistration('config:environment');
const currentYear = new Date().getFullYear();
return `© ${currentYear} ${config.companyName}`;
}
}
+8 -5
View File
@@ -1,6 +1,9 @@
import { helper } from '@ember/component/helper';
import config from 'ember-get-config';
import Helper from '@ember/component/helper';
import { getOwner } from '@ember/application';
export default helper(function companyName() {
return config.companyName;
});
export default class extends Helper {
compute() {
const config = getOwner(this).resolveRegistration('config:environment');
return config.companyName;
}
}
+20 -17
View File
@@ -1,20 +1,23 @@
import { helper } from '@ember/component/helper';
import Helper from '@ember/component/helper';
import { getOwner } from '@ember/application';
import { assert } from '@ember/debug';
import config from 'ember-get-config';
export default helper(function docUrl(params /*, hash*/) {
const baseURL = config.documentation.baseURL;
const docKey = params[0] || '';
const configuredPath = config.documentation.topics[docKey];
if (docKey) {
assert(
`
Documentation for "${docKey}" could not be found. Please ensure that
this key exists under "documentation" in your app config.
`,
configuredPath
);
export default class extends Helper {
compute(params) {
const config = getOwner(this).resolveRegistration('config:environment');
const baseURL = config.documentation.baseURL;
const docKey = params[0] || '';
const configuredPath = config.documentation.topics[docKey];
if (docKey) {
assert(
`
Documentation for "${docKey}" could not be found. Please ensure that
this key exists under "documentation" in your app config.
`,
configuredPath
);
}
const path = configuredPath || '';
return `${baseURL}${path}`;
}
const path = configuredPath || '';
return `${baseURL}${path}`;
});
}
@@ -0,0 +1,73 @@
import Helper from '@ember/component/helper';
import { inject as service } from '@ember/service';
import { getOwner } from '@ember/application';
import { action } from '@ember/object';
/**
* Use this helper to determine if a resource filter for a route has any
* currently selected value.
*
* @see resourceFilterParam (decorator)
*
* @example
*
* {{#if (has-resource-filter-param-selections 'route.name' 'field')}}
* Field has filter selections.
* {{/if}}
*/
export default class HasResourceFilterParamSelectionsHelper extends Helper {
// =services
@service router;
// =methods
// =lifecycle management methods
/**
* Recompute this helper when the route changes.
*/
constructor() {
super(...arguments);
this.router.on('routeDidChange', this.routeDidChange);
}
/**
* Stop listening to route events when this helper is destroyed.
*/
willDestroy() {
this.router.off('routeDidChange', this.routeDidChange);
super.willDestroy();
}
// =compute method
/**
* Returns true if the specified route has a value set for
* any resource filter.
* @param {string} routeName
* @return {boolean}
*/
compute([routeName]) {
const owner = getOwner(this);
const route = owner.lookup(`route:${routeName}`);
const names = route.resourceFilterParams;
const selectedValues = names.map((name) => route[name] || null).flat();
const anyTruthy = selectedValues.reduce(
(previousValue, currentValue) => previousValue || currentValue,
false
);
return Boolean(anyTruthy);
}
// =actions
/**
* Triggers a recompute (see above) when the route changes, especially when
* route query params change.
*/
@action
routeDidChange() {
this.recompute();
}
}
@@ -0,0 +1,73 @@
import Helper from '@ember/component/helper';
import { inject as service } from '@ember/service';
import { getOwner } from '@ember/application';
import { action } from '@ember/object';
/**
* Use this helper to fetch the current value of a resource filter param,
* as well as its allowedValues.
*
* @see resourceFilterParam (decorator)
*
* @example
*
* {{#with resource-filter-param 'status' as |param|}}
* {{param.name}} / {{param.value}} / {{param.selectedValue}}
* {{/with}}
*/
export default class ResourceFilterParamHelper extends Helper {
// =services
@service router;
// =methods
// =lifecycle management methods
/**
* Recompute this helper when the route changes.
*/
constructor() {
super(...arguments);
this.router.on('routeDidChange', this.routeDidChange);
}
/**
* Stop listening to route events when this helper is destroyed.
*/
willDestroy() {
this.router.off('routeDidChange', this.routeDidChange);
super.willDestroy();
}
// =compute method
/**
* Returns an object containing `name`, `value`, and `selectedValue`.
* `name` - The name of the resource filter param.
* `value` - The value of the resource filter param
* @return {object}
*/
compute([routeName, name]) {
const owner = getOwner(this);
// Filter options
const route = owner.lookup(`route:${routeName}`);
const filterAllowedValuesKey = `filter-allowed-values-${name}`;
const allowedValues = route[filterAllowedValuesKey];
// Selected filters
const rawValue = route[name];
const selectedValue = rawValue || null;
return { name, allowedValues, selectedValue };
}
// =actions
/**
* Triggers a recompute (see above) when the route changes, especially when
* route query params change.
*/
@action
routeDidChange() {
this.recompute();
}
}
@@ -0,0 +1,16 @@
import { registerDeprecationHandler } from '@ember/debug';
export function initialize(application) {
const config = application.resolveRegistration('config:environment');
const isTesting = config.environment === 'test';
if (isTesting) {
// Disable all deprecations for now in tests.
registerDeprecationHandler((/*message, options, next*/) => {
return;
});
}
}
export default {
initialize,
};
+10 -2
View File
@@ -3,7 +3,7 @@ import { filterBy } from '@ember/object/computed';
import { A } from '@ember/array';
import { tracked } from '@glimmer/tracking';
import { defer, resolve } from 'rsvp';
import config from 'ember-get-config';
import { getOwner } from '@ember/application';
/**
* A simple service that emits Confirmation instances and
@@ -17,13 +17,21 @@ import config from 'ember-get-config';
export default class ConfirmationsService extends Service {
// =attributes
#enabled;
/**
* When the confirm service is disabled, it always returns resolving promises.
* By default the service is enabled but it is useful to disable it for test
* purposes.
* @type {boolean}
*/
enabled = config.enableConfirmService ?? true;
get enabled() {
const config = getOwner(this).resolveRegistration('config:environment');
return this.#enabled ?? config.enableConfirmService ?? true;
}
set enabled(value) {
this.#enabled = value;
}
/**
* @type {Array}
@@ -0,0 +1 @@
export { default } from 'core/decorators/resource-filter-param';
@@ -0,0 +1 @@
export { default } from 'core/helpers/has-resource-filter-param-selections';
@@ -0,0 +1 @@
export { default } from 'core/helpers/resource-filter-param';
@@ -0,0 +1 @@
export { default, initialize } from 'core/initializers/deprecations';
+27 -27
View File
@@ -30,58 +30,58 @@
"dependencies": {
"api": "*",
"auth": "*",
"ember-browser-services": "^1.1.6",
"ember-cli-babel": "^7.23.0",
"ember-cli-htmlbars": "^5.3.1",
"ember-browser-services": "^2.0.0",
"ember-cli-babel": "^7.26.6",
"ember-cli-htmlbars": "^5.7.1",
"ember-feature-flags": "^6.0.0",
"ember-get-config": "^0.3.0",
"ember-intl": "^5.5.0",
"ember-intl": "^5.7.0",
"ember-loading": "^0.4.0",
"ember-page-title": "^6.0.3",
"ember-route-action-helper": "^2.0.8",
"ember-truth-helpers": "^3.0.0",
"rose": "*"
},
"devDependencies": {
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^2.2.8",
"@glimmer/component": "^1.0.3",
"@glimmer/tracking": "^1.0.3",
"@ember/test-helpers": "^2.4.2",
"@glimmer/component": "^1.0.4",
"@glimmer/tracking": "^1.0.4",
"babel-eslint": "^10.1.0",
"broccoli-asset-rev": "^3.0.0",
"doctoc": "^2.0.0",
"ember-auto-import": "^1.10.1",
"ember-cli": "~3.28.0",
"doctoc": "^2.0.1",
"ember-auto-import": "^1.12.0",
"ember-cli": "~3.28.3",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.1",
"ember-cli-terser": "^4.0.2",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.1",
"ember-inline-svg": "^1.0.0",
"ember-intl": "^5.5.0",
"ember-load-initializers": "^2.1.2",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-page-title": "^6.0.3",
"ember-qunit": "^5.1.1",
"ember-resolver": "^8.0.2",
"ember-source": "~3.24.0",
"ember-maybe-import-regenerator": "^1.0.0",
"ember-page-title": "^6.2.2",
"ember-qunit": "^5.1.4",
"ember-resolver": "^8.0.3",
"ember-source": "~3.28.4",
"ember-source-channel-url": "^3.0.0",
"ember-template-lint": "^2.15.0",
"ember-template-lint": "^3.7.0",
"ember-try": "^1.4.0",
"eslint": "^7.31.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-ember": "^10.1.1",
"eslint-plugin-ember": "^10.5.4",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-qunit": "^6.2.0",
"faker": "^5.5.3",
"js-bexpr": "hashicorp/js-bexpr#9b4a4b54d85eba67fdfc0990133d1518d890b1e1",
"loader.js": "^4.7.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.2.1",
"qunit": "^2.13.0",
"qunit-dom": "^1.6.0"
"prettier": "^2.4.0",
"qunit": "^2.17.1",
"qunit-dom": "^2.0.0"
},
"engines": {
"node": ">=10 <=15"
"node": ">=12 <=17"
},
"ember": {
"edition": "octane"
@@ -6,13 +6,6 @@ const browsers = [
'last 1 Safari versions',
];
const isCI = Boolean(process.env.CI);
const isProduction = process.env.EMBER_ENV === 'production';
if (isCI || isProduction) {
browsers.push('ie 11');
}
module.exports = {
browsers,
};
@@ -2,13 +2,13 @@ import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render } from '@ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars';
import config from 'ember-get-config';
module('Integration | Helper | doc-url', function (hooks) {
setupRenderingTest(hooks);
test('it renders a URL generated from the documentation config', async function (assert) {
assert.expect(3);
const config = this.owner.resolveRegistration('config:environment');
const baseURL = config.documentation.baseURL;
const path = config.documentation.topics.account;
await render(hbs`{{doc-url 'account'}}`);
@@ -19,7 +19,8 @@ module('Integration | Helper | doc-url', function (hooks) {
test('it throws an error if the specified documentation path cannot be found', async function (assert) {
assert.expect(2);
const helper = this.owner.lookup('helper:doc-url');
const Helper = this.owner.lookup('helper:doc-url');
const helper = new Helper(this.owner);
assert.ok(helper.compute(['account']), 'Specified document exists.');
assert.throws(() => {
helper.compute(['no.such.doc']);
Loaded 100 of 364 files, more files were not shown because too many files have changed in this diff. Show more