Compare commits

...
382 Commits
Author SHA1 Message Date
Michael Li fc5121c41e test(e2e): Update test to select other options from Items Per Page (#2417) 2024-07-31 12:12:09 -04:00
Zhihe Li 6e7ededc30 chore: 🤖 Update CLI version and changelog (#2396) 2024-07-30 19:03:22 -04:00
Zhihe Li 0867ba08f4 fix: 🐛 Fix intel macs not getting proper auto-update prompt (#2419) 2024-07-30 18:51:09 -04:00
Wadi 21ec3b30ad refactor: Update Manage Dropdown in Groups Form (#2415)
* Updated the Manage Dropdown button to reflect HDS Design

* refactor: HDS Upgrade for Manage Dropdown inside of groups

* refactor: 💡 Lint fixes

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-14343
2024-07-26 17:19:50 -04:00
219eba67bc fix: 🐛 tag count in list view (#2413)
* fix: 🐛 tag count in list view

* Update addons/api/addon/models/worker.js

Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>

* fix: 🐛 error & test

* Update addons/api/addon/models/worker.js

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>

---------

Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>
Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
2024-07-25 12:40:36 -07:00
Lisbet Alvarez 7c51776c57 fix: 🐛 hide search & pagination for project role grant scopes (#2411)
* fix: 🐛 hide search & pagination for project role grant scopes
2024-07-25 08:09:06 -07:00
Michael Li e73bded6ae test(e2e): Update tests due to 0.17.0 changes (#2401)
* test(e2e): Only clean up org if org hasn't been deleted yet

* test(e2e): Use new worker filter tab

* test(e2e): Update selector for updated Manage button

Some pages now use a Manage button instead of a Manage link. The "Title" selector was not being picked up on the Manage button.

* test(e2e): Fix flakiness due to race condition

The test should navigate to the home page after creating all of the resources using the API

* test(e2e): Add cleanup to test
2024-07-24 14:55:51 -04:00
Lisbet Alvarez 25a99a4fb6 refactor: 💡 small text updates & loading state (#2410)
* refactor: 💡 small text updates & loading state
2024-07-23 09:20:51 -07:00
Zhihe Li 10c128ee3b feat: 🎸 Add debug logging for search times (#2406) 2024-07-19 16:53:50 -04:00
Cameron Perera 1efc3a08aa fix: 🐛 add trim() to values when creating tags (#2405) 2024-07-19 13:14:30 -05:00
Cameron PereraandLisbet Alvarez 03376f0ae6 Fix text formating (#2404)
* refactor: 💡 update create new tags description

✅ Closes: ICU-14463

---------

Co-authored-by: Lisbet Alvarez <lisbet.alvarez@hashicorp.com>
2024-07-19 07:11:03 -07:00
Lisbet Alvarez 13d5c46b1a refactor: 💡 update page title from "add" to "manage" (#2402) 2024-07-18 15:28:47 -07:00
Cameron Perera 96b648634f feat: 🎸 add doc link for create tags view (#2400) 2024-07-17 17:07:01 -05:00
Zhihe Li ec59ee2b1c fix: 🐛 Fix breaking change for changing page size (#2398) 2024-07-17 16:17:17 -04:00
Zhihe Li bea40ec622 chore: 🤖 Add feature flag for client-agent work (#2397) 2024-07-17 15:58:51 -04:00
Wadi cc0edf311c Updated the Manage Dropdown button to reflect HDS Design (#2392) 2024-07-16 21:41:36 -04:00
Cameron Perera 66fb4b2451 feat: 🎸 update workers tags filter to include api_tags (#2394)
✅ Closes: ICU-14436
2024-07-16 17:48:35 -05:00
Zhihe Li ec6ec7511e refactor: 💡 Remove stack traces and add logs for version info (#2391) 2024-07-16 17:51:16 -04:00
Carlos Alcaide Corvo 9404300a9e Fix linux deb artifact name (#2389)
* Avoid adding platform to the .deb binary
2024-07-16 14:29:48 -07:00
Cameron Perera 8cb16dc46c Icu 13894 create edit tags modal (#2384)
* feat: 🎸 add "no tags" state for worker tags

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13894

* feat: 🎸 add edit workflow for worker tags

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13894

* refactor: 💡 update tag action permissions logic

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13894

* refactor: 💡 small change to updateApiTags

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13894

* feat: 🎸 show different tooltip for hcp managed worker tags

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13894

* refactor: 💡 address PR feedback

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13894

* refactor: 💡 address more PR feedback

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13894
2024-07-16 15:49:30 -05:00
Cameron Perera f9af4f0092 Icu 13897 create remove tag modal (#2377)
* feat: 🎸 add action dropdown in tags table

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13897

* feat: 🎸 add removeApiTags method to worker

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13897

* feat: 🎸 add tag removal workflow

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13897

* test: 💍 add tests for removing a worker tag

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13897

* test: 💍 add tests for removing a tag

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13897

* refactor: 💡 fix spelling issue

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13897

* refactor: 💡 use mirage worker serializer to remove empty tag

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13897

* refactor: 💡 update modal id to class

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13897

* refactor: 💡 add autofocus to remove tag modal

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13897

* feat: 🎸 update tags controller attributes

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13897

* refactor: 💡 create normalizer to add empty object for api_tags

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13897

* refactor: 💡 update getter signature

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13897

* refactor: 💡 remove unneeded parens

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13897

* refactor: 💡 remove type from Hds::Button

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13897

* refactor: 💡 update confirmation modal class name

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13897

* feat: 🎸 add emptyObjectIfMissing model attribute

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13897

* refactor: 💡 PR feedback

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13897

* refactor: 💡 remove default to null in toggleModal

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13897
2024-07-16 15:49:30 -05:00
Lisbet Alvarez 723101b779 refactor: 💡 move workers section in a target to be in a tab (#2379)
* refactor: 💡 move workers section in a target to be in a tab

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-14332
2024-07-16 15:49:23 -05:00
Cameron Perera 825c9556b6 refactor: 💡 remove worker tags from detail view of worker (#2380)
* refactor: 💡 remove worker tags from detail view of worker

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13890

* refactor: 💡 remove unused styles

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13890

* style: 💄 fix lint error

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13890

* style: 💄 fix stylelint rules

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13890
2024-07-16 15:48:24 -05:00
Cameron Perera 071e0bd617 feat: 🎸 add link to worker docs for creat-tags view (#2381) 2024-07-16 15:48:24 -05:00
Cameron Perera 4e57c863ab Icu 13895 create create new tags route and view (#2368)
* feat: 🎸 create canSetWorkerTags ability for workers

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13895

* feat: 🎸 add create-tags route

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13895

* feat: 🎸 update worker serializer for adding api_tags

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13895

* feat: 🎸 add setApiTags method on worker model

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13895

* style: 💄 update list-wrapper styles after hds upgrade

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13895

* feat: 🎸 add create-tags component for workers

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13895

* feat: 🎸 add creat-tags route and view

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13895

* test: 💍 add acceptance tests for worker create-tags workflow

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13895

* test: 💍 add test for worker tag creation

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13895

* test: 💍 fix test setup for workers

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13895

* test: 💍 add license headers and update setupTest import

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13895

* test: 💍 fix normal serialize test for worker

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13895

* refactor: 💡 create worker PKI type const

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13895

* refactor: 💡 add comments to methods and actions

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13895

* feat: 🎸 create Tag class to use in multiple places

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13895

* refactor: 💡 move apiTags to route controller

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13895

* refactor: 💡 move routeWillChange logic to route

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13895

* refactor: 💡 routeWillChange logic updates

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13895

* refactor: 💡 remove unused services

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13895

* test: 💍 add missing controller tests

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13895

* refactor: 💡 small update to API tags description

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13895

* refactor: 💡 add tracked to Tag class

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13895

* refactor: 💡 use willTransition vs routeWillChange event

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13895

* refactor: 💡 use controllerFor in route

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13895
2024-07-16 15:48:23 -05:00
Cameron PereraandLisbet Alvarez 87f84e0c24 feat: 🎸 add tooltip to config tags in table (#2375)
* feat: 🎸 add tooltip to config tags in table

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-14331

* Update addons/core/translations/resources/en-us.yaml

Co-authored-by: Lisbet Alvarez <107949262+lisbet-alvarez@users.noreply.github.com>

* test: 💍 fix translation in test

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-14331

---------

Co-authored-by: Lisbet Alvarez <107949262+lisbet-alvarez@users.noreply.github.com>
2024-07-16 15:48:23 -05:00
Cameron Perera fd5143286f Icu 13892 create tags tab route and view (#2362)
* feat: 🎸 add workers/worker/tags route

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13892

* feat: 🎸 create workers/worker/header component

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13892

* feat: 🎸 create workers/worker/nav component

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13892

* feat: 🎸 create workers/worker/actions component

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13892

* feat: 🎸 add breadcrumbs, header, nav, and actions for tags

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13892

* feat: 🎸 create table to display worker tags

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13892

* chore: 🤖 add license headers

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13892

* refactor: 💡 small changes after flyout changes added

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13892

* refactor: 💡 update manage dropdown to use hds::dropdown

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13892

* test: 💍 fix failing test after HDS refactor

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13892
2024-07-16 15:48:23 -05:00
Cameron Perera 40ebbf8b09 Icu 13889 update tags column to action that opens hds flyout and add link to tags tab if more than 10 tags (#2355)
* refactor: 💡 update worker factory to include api_tags

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13889

* feat: 🎸 add tags flyout for workers table

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13889

* refactor: 💡 move test selector to const

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13889

* refactor: 💡 only show 'view more tags' if more than 10 tags

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13889

* test: 💍 update test name

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13889

* refactor: 💡 update how worker tags are shown in flyout

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13889

* refactor: 💡 add one more api tag for worker in mirage

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13889

* refactor: 💡 fix tagDisplayName signature

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13889

* refactor: 💡 update tag shortener styling

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13889
2024-07-16 15:48:10 -05:00
Cameron Perera f51124cfdb feat: 🎸 create get allTags method that includes tag type (#2349)
* feat: 🎸 create getAllTags method that includes tag type

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13891

* refactor: 💡 use canonical_tags to get tagCount on a worker

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13891

* refactor: 💡 add type to api and config tag list methods

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13891

* refactor: 💡 change worker functions to getters

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13891
2024-07-16 15:46:05 -05:00
Lisbet Alvarez 1bea4882ca docs: ✏️ add doclinks for multi-scope grant work (#2390) 2024-07-16 12:03:22 -07:00
Lisbet Alvarez ea3d040b53 refactor: 💡 update messages & update button to match new change (#2382)
* refactor: 💡 update messages & update button to match new change
2024-07-15 17:23:00 -07:00
Cameron Perera 80d9ce2ec1 refactor: 💡 update button text to Manage custom scopes (#2378) 2024-07-15 17:23:00 -07:00
Lisbet Alvarez 45931be4da refactor: 💡 add grant scopes applied badge (#2374)
* refactor: 💡 add grant scopes applied badge

* test: 💍 add extra asserts
2024-07-15 17:23:00 -07:00
Lisbet Alvarez c340d9ab89 feat: 🎸 add search and filtering to scopes tab in a role (#2371)
* feat: 🎸 add search and filtering to scopes tab in a role

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13886
2024-07-15 17:23:00 -07:00
Wadi 3bcc5aabd8 ICU-13879 (#2372)
* Updated Dropdown in Roles menu to reflect Hds Dropdown

* Added data-test attributes

* Removed mixed rose code

* Fixed lint issues

* Fixed up tests and removed bare text to be replaced with translation.

* Fixed lint issues

* Updated Manage Scopes to reflect HDS self-closing element

* Lint issues
2024-07-15 17:23:00 -07:00
Lisbet Alvarez 4004431c6a chore: 🤖 add missing headers in llb (#2373) 2024-07-15 17:23:00 -07:00
3064e51bc1 feat: 🎸 create manage projects in org route and view (#2365)
* feat: 🎸 create manage projects in org route and view

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13882

---------

Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>
Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
2024-07-15 17:23:00 -07:00
Cameron Perera e83bb425af refactor: 💡 remove old unused code (#2367) 2024-07-15 17:23:00 -07:00
Lisbet AlvarezandZhihe Li 27abf9e2d9 feat: 🎸 create manage custom scopes route and view (#2359)
* feat: 🎸 create manage custom scopes route and view

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13881

---------

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
2024-07-15 17:23:00 -07:00
Lisbet AlvarezandZhihe Li 89e072401c Icu 13880 create manage scopes route and view with keyword values (#2342)
* feat: 🎸 manage scopes route and page

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13880

* Update addons/core/translations/resources/en-us.yaml

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>

* Update ui/admin/app/abilities/role.js

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>

* Update ui/admin/app/components/form/role/manage-scopes/index.hbs

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
---------

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
2024-07-15 17:23:00 -07:00
Cameron Perera 85bce84356 feat: 🎸 add No scopes add to roles/role/scopes route (#2338)
* feat: 🎸 add No scopes add to roles/role/scopes route

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13878

* feat: 🎸 add new role ability

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13878

* refactor: 💡 fix permission for setting grant scopes on role

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13878
2024-07-15 17:23:00 -07:00
Cameron Perera 2bc314d271 Icu 12708 add scopes tab route in role route (#2322)
* feat: 🎸 add roles/role/scopes route

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12708

* refactor: 💡 update role and scope mirage factories

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12708

* feat: 🎸 add grantScopes to role model

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12708

* feat: 🎸 fetch all scopes recursively

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12708

* feat: 🎸 add new role grant scopes translations

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12708

* feat: 🎸 add table to list grant scopes on a role

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12708

* test: 💍 acceptance test for grant scope table and controller

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12708

* test: 💍 add unit tests for grantScopes method on role model

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12708

* refactor: 💡 small updates from PR feedback

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12708

* refactor: 💡 update grantScopes to use sort

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12708

* feat: 🎸 update role scope description for each scope type

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12708

* refactor: 💡 make grant_scope_ids sort better

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12708

* refactor: 💡 update global scope to show as Global vs global

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12708

* refactor: 💡 update logic for display grant scope keywords

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12708

* refactor: 💡 small improvement in role.grantScopes

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12708

* refactor: 💡 move scope query to roles/scope route

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12708

* refactor: 💡 remove console.log

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12708
2024-07-15 17:23:00 -07:00
Cameron Perera e60b774d05 refactor: 💡 remove grant_scope_id and its uses (#2325)
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13877
2024-07-15 17:23:00 -07:00
Cameron Perera c6a917d21b Icu 12707 update role mirage (#2319)
* feat: 🎸 add grant_scope_ids to role mirage

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12707

* feat: 🎸 set grant_scope_ids in onboarding workflow

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12707

* refactor: 💡 set grant_scope_ids when calling updateGrantScopeID

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12707

* refactor: 💡 add TODO for removal of grant_scope_id

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12707
2024-07-15 17:23:00 -07:00
Cameron Perera f9e85aa9aa feat: 🎸 add grant_scope_ids to role model (#2308)
* feat: 🎸 add grant_scope_ids to role model

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12709

* refactor: 💡 remove removeGrantScopes method

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12709

* style: 💄 add braces around if statement

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12709
2024-07-15 17:23:00 -07:00
Lisbet Alvarez c0cecda312 refactor: 💡 use new baseURL and update topic paths (#2109)
* refactor: 💡 use new baseURL and update topic paths
2024-07-15 17:09:08 -07:00
Carlos Alcaide Corvo bfd984d248 Add a postMake arch conversion from x64 to amd64 (#2376)
* Add a postMake arch conversion from x64 to amd64

* Add platform conversion from win32 to windows
2024-07-15 11:30:12 -07:00
Dharini Jeeva ae5a03250f fix: 🐛 add visuallyhidden to empty table columns (#2383) 2024-07-15 10:15:55 -07:00
hashicorp-tsccr[bot]andhashicorp-tsccr[bot] 07c25d766e Result of tsccr-helper -log-level=info gha update -latest . (#2369)
Co-authored-by: hashicorp-tsccr[bot] <hashicorp-tsccr[bot]@users.noreply.github.com>
2024-07-03 10:43:51 -07:00
Michael Li 12a986b2ba test(e2e): Add test for search and pagination (#2366)
* test(e2e): Add test for search and pagination

* CR: Add comment
2024-06-28 15:04:11 -04:00
Michael Li 5e5c25be82 test(e2e): Add alias test (#2363)
* test(e2e): Add alias test

* test(e2e): Cleanup
2024-06-28 10:24:50 -04:00
Dharini Jeeva 17db3cba68 workflow action for copyright headers (#2345) 2024-06-27 11:06:41 -07:00
Zhihe Li 7de68bacae Revert "fix: 🐛 Fix active session display in targets table (#2321)" (#2364)
This reverts commit fc82980d68.
2024-06-26 17:47:07 -04:00
Zhihe Li 74f3ce516b chore: 🤖 Fix unzip permissions part 2: electric boogaloo (#2360)
* Revert "fix: 🐛 Fix unzipping changing cli permissions (#2356)"

This reverts commit e9d2f249b8.

* chore: 🤖 Fix permissions after unzipping
2024-06-26 13:02:13 -04:00
Carlos Alcaide Corvo 6d97b15591 fix: 🐛 appUpdater support ARM64 (#2327)
Add ARM64 support for the appUpdater
2024-06-25 12:50:17 -07:00
dependabot[bot]andZhihe Li 72cf7b0d71 chore(deps): bump socket.io from 4.6.1 to 4.7.5 (#2358)
Bumps [socket.io](https://github.com/socketio/socket.io) from 4.6.1 to 4.7.5.
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/4.6.1...4.7.5)

---
updated-dependencies:
- dependency-name: socket.io
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
2024-06-24 11:31:15 -04:00
Michael Li 45db2ad5a6 test(e2e): Add check to detach storage bucket from target (#2352) 2024-06-24 09:35:33 -04:00
Cameron PereraandZhihe Li 2f27a4cfc0 chore: 🤖 Update electron version (#2332)
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13697

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
2024-06-21 18:40:46 -04:00
Michael Li e6642959be test(e2e): Fix flakiness when selecting org links (#2348)
* test(e2e): Fix flakiness when selecting links

Some links exist on both the "Global" and "Org" scope (i.e. Storage Policies, Auth Methods). There was some flakiness observed where the test intends to select the "Org" variant of the link, but the test moves too quickly and selects the "Global" variant instead.

This commit ensures that the Org page has loaded after clicking the Org link before trying to navigate to the next thing.

* test(e2e): Address flake due to OK conflict

* test(e2e): Address flake due to OK conflict part 2

* CR: Fix more race conditions
2024-06-21 13:26:13 -04:00
Dharini Jeeva 11009d6f33 fix: 🐛 copyright syntax (#2357) 2024-06-20 14:10:04 -07:00
Zhihe Li e9d2f249b8 fix: 🐛 Fix unzipping changing cli permissions (#2356) 2024-06-20 10:59:52 -04:00
Zhihe Li ff6f1ab2ff chore: 🤖 Update CLI version (#2354) 2024-06-18 14:50:34 -04:00
Lisbet Alvarez ea578c4207 fix: 🐛 styles import file not being found (#2353) 2024-06-18 09:29:26 -07:00
dependabot[bot]andZhihe Li 4d02503790 chore(deps): bump ws from 7.5.3 to 7.5.10 (#2351)
Bumps [ws](https://github.com/websockets/ws) from 7.5.3 to 7.5.10.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/7.5.3...7.5.10)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
2024-06-18 11:52:52 -04:00
Zhihe Li 355ebb12db feat: 🎸 Add more logging for desktop client (#2344) 2024-06-17 18:18:58 -04:00
Lisbet Alvarez c177abb978 chore: 🤖 udate hds from v3.5 to v4 (#2350)
* chore: 🤖 udate hds from v3.5 to v4
2024-06-17 14:31:33 -07:00
Zhihe Li 0094cef9f5 refactor: 💡 Rename client daemon to cache daemon (#2346) 2024-06-17 17:16:07 -04:00
dependabot[bot]andZhihe Li 80b992668d chore(deps): bump braces from 3.0.2 to 3.0.3 in /ui/desktop/electron-app (#2347)
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
2024-06-17 13:59:45 -04:00
Michael Li 365545d61c test(e2e): Add checks for LDAP account attributes (#2343)
* test(e2e): Add check for LDAP account attributes

* test(e2e): Refactor to use expect assertions
2024-06-17 10:42:08 -04:00
Michael Li 1a7b3f578c test(e2e): Add multiple credentials to target (#2333) 2024-06-17 10:14:44 -04:00
Michael Li 40c1b3c6b5 test(e2e): Add check for multiple host sources (#2331)
* test(e2e): Add check for multiple host sets

* CR: TCP targets don't have injected credentials

* test(e2e): Add "exact: true" for OK button locators

Sometimes, the OK button will get interfered by resource ids that contain an OK.
2024-06-17 10:01:13 -04:00
Michael Li 09c60c7bcb test(e2e): Add test for worker (#2320)
* test(e2e): Add test for worker

* CR: Fix selector

* test(e2e): Skip test on safari

* test(e2e): Check create config
2024-06-14 14:59:23 -04:00
Wadi 7b6f625d3e Fixed Markdown in Node supported versions (#2340) 2024-06-14 10:21:39 -04:00
Dharini Jeeva 3797bc3a60 fix: 🐛 labels were changed during the refactor (#2341) 2024-06-13 14:18:56 -07:00
Wadi 26adb96396 Readme update to change Node supported versions (#2339)
* Readme update to change Node supported versions
2024-06-13 16:08:30 -04:00
Dharini Jeeva e419b8ee6a chore: 🤖 headers update (#2337) 2024-06-13 10:05:01 -07:00
Zhihe Li bca65d8d5a feat: 🎸 Fix text and persist windows notification (#2330)
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13977
2024-06-12 16:40:19 -04:00
Zhihe Li f20723df37 fix: 🐛 Fix session erroring out when getting session from ferry (#2315) 2024-06-12 16:40:19 -04:00
Zhihe Li 3f238140b4 feat: 🎸 Change the default notification on mac to be alert (#2311)
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13931
2024-06-12 16:40:19 -04:00
Zhihe Li 8788b5ec9a feat: 🎸 Add support for polling transparent sessions (#2304)
* feat: 🎸 Add support for polling transparent sessions

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13831
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13830
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13832
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13833
2024-06-12 16:40:19 -04:00
Dharini Jeeva e66efa7cc3 recreate LICENSE file (#2335) 2024-06-12 11:09:29 -07:00
Dharini Jeeva bc0fc1aa87 Delete LICENSE (#2334) 2024-06-12 10:24:35 -07:00
Michael Li fc4344c6c5 test(e2e): Update test to add a DHC host set as a source (#2324) 2024-06-11 18:57:10 -04:00
Michael Li 7106f36686 test(e2e): Add test for global settings (#2323) 2024-06-11 18:42:24 -04:00
Michael Li 28e65dbf4f test(e2e): Update ldap test to log in with ldap account (#2314) 2024-06-11 18:30:34 -04:00
Dharini Jeeva 0a9a6c5a67 fix: quotes (#2329)
* chore: 🤖 same as boundary repo

* fix: 🐛 quotes
2024-06-11 13:41:31 -07:00
Dharini Jeeva 720a9b56ee chore: 🤖 update LICENSE txt and fix license (#2328) 2024-06-11 13:00:43 -07:00
hashicorp-copywrite[bot]andCarlos Alcaide Corvo 3157525eb6 [COMPLIANCE] Add Copyright and License Headers (#2326)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
Co-authored-by: Carlos Alcaide Corvo <ccorvo@hashicorp.com>
2024-06-11 08:54:49 -07:00
Lisbet Alvarez 12e0982d4b refactor: 💡 remove route-action usage for workers (#2302)
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12613
2024-06-10 17:12:49 -07:00
Lisbet Alvarez ea460c1391 refactor: 💡 remove route-action usage for users (#2299)
* refactor: 💡 remove route-action usage for users

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12612
2024-06-10 17:00:57 -07:00
Lisbet Alvarez 2f6e36c035 refactor: 💡 remove route-action usage for targets (#2297)
* refactor: 💡 remove route-action usage for targets

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12611
2024-06-10 16:45:06 -07:00
Zhihe Li fc82980d68 fix: 🐛 Fix active session display in targets table (#2321)
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13981
2024-06-10 17:14:40 -04:00
Michael Li 8d217aab2b test(e2e): Update password test to log in with new account (#2313)
* test(e2e): Update password test to log in with new account

* CR: Don't break other tests

Performing a log out in a test when using authenticatedState causes subsequent tests that use the state to fail (it will show up as logged out)

* CR: Only do clean up steps when necessary

* CR: Use const
2024-06-07 13:09:24 -04:00
Zhihe Li 7e89f28949 Icu 13451 desktop client logging (#2318)
* feat: 🎸 Add initial logging for desktop client
2024-06-07 12:12:28 -04:00
Michael Li 5a7e09c70c test(e2e): Add test for minio storage bucket (#2312) 2024-06-06 14:59:13 -04:00
a92701701c Result of tsccr-helper -log-level=info gha update -latest . (#2316)
Co-authored-by: hashicorp-tsccr[bot] <hashicorp-tsccr[bot]@users.noreply.github.com>
Co-authored-by: Carlos Alcaide Corvo <ccorvo@hashicorp.com>
2024-06-04 14:44:17 -07:00
Dharini Jeeva 6397cd80a6 Refactor key value comp (#2180)
* refactor: 💡 keyvalue comp
2024-06-03 13:38:42 -07:00
hashicorp-copywrite[bot] 9b403b3159 [COMPLIANCE] Add Copyright and License Headers (#2317)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2024-06-03 11:52:01 -05:00
Dharini Jeeva 9b1f052a56 chore: Update desktop client license from MPL to BSL (#2307)
* chore: 🤖 license
2024-05-31 11:29:24 -07:00
Carlos Alcaide Corvo 7e5db0bc3d Poc share domain test selectors (#2278)
* Share domain (storage-buckets) selectors and refactor the previous test to rely only on standard selectors and data-test-* when need.
2024-05-31 11:02:55 -07:00
hashicorp-copywrite[bot]andDharini Jeeva 966e16863a [COMPLIANCE] Add Copyright and License Headers (#2309)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
Co-authored-by: Dharini Jeeva <dharini@hashicorp.com>
2024-05-30 10:30:44 -07:00
Michael Li c0b1373851 test(e2e): 0.16.1 updates (#2310)
* test(e2e): Use AWS region specified in environment

* test(e2e): Update storage bucket label
2024-05-28 17:54:21 -04:00
Lisbet Alvarez b9b4e33f5a refactor: 💡 remove route-action usage for roles (#2292)
* refactor: 💡 remove route-action usage for roles

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12608
2024-05-23 15:35:49 -07:00
Carlos Alcaide Corvo 534c4419e7 As per warning updated browserslist (#2306) 2024-05-23 15:18:53 -07:00
Dharini Jeeva 1c65de4a80 fix: 🐛 target patch with_Aliases field (#2305) 2024-05-23 10:23:49 -07:00
Cameron Perera 5c8e93f5e9 Doc update desktop readme (#2303)
* docs: ✏️ add troubleshooting info for node-gyp errors

* docs: ✏️ clean up linting errors in desktop/README.md

* docs: ✏️ include python install command
2024-05-22 15:03:59 -05:00
hashicorp-copywrite[bot] 5e3e61bc49 [COMPLIANCE] Add Copyright and License Headers (#2301)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2024-05-21 10:01:10 -04:00
Cameron Perera 2394df8435 chore: 🤖 update PR template (#2300) 2024-05-16 13:13:54 -05:00
Lisbet Alvarez a1655312fd refactor: 💡 remove route-action usage for host-catalogs (#2284)
* refactor: 💡 remove route-action usage for host-catalogs

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12606
2024-05-15 11:01:54 -07:00
Carlos Alcaide Corvo fcb9468c59 Add minio missing unit tests (#2253)
* Add MinIO storage bucket creation for scope org

* Add update acceptance tests
2024-05-14 13:39:23 -07:00
hashicorp-copywrite[bot] 3692922b3b [COMPLIANCE] Add Copyright and License Headers (#2296)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2024-05-13 12:59:37 -05:00
Cameron Perera 0691b57e40 Icu 11936 support node 20 stop support node 16 (#2282)
* chore: 🤖 remove .mdx format script in rose addon

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11936

* chore: 🤖 deprecate use of node v16 and include node v20

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11936

* chore: 🤖 update github workflows to use node v18

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11936

* chore: 🤖 update workflows to use node v20

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11936
2024-05-10 13:03:43 -05:00
Michael Li 87e0a075c1 chore: Lint action (#2294) 2024-05-09 11:13:00 -04:00
dependabot[bot]andCarlos Alcaide Corvo a6b9ae4610 chore(deps): bump semver from 5.7.1 to 7.6.0 in /ui/desktop/electron-app (#2285)
Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 7.6.0.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v7.6.0)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carlos Alcaide Corvo <ccorvo@hashicorp.com>
2024-05-08 12:25:55 -07:00
Carlos Alcaide Corvo e75e908340 Fix icu 13758 refactor node decompress (#2290)
* Uninstall decompress and rely on unzipper
2024-05-08 07:59:26 -07:00
Lisbet Alvarez 9ca1beaa0e refactor: 💡 remove route-action usage for storage-policies (#2286)
* refactor: 💡 remove route-action usage for storage-policies

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12607
2024-05-07 14:02:03 -07:00
Michael Li 91fe148df4 chore: Fix error in Jira Sync workflow (#2289) 2024-05-06 12:37:05 -04:00
Michael Li 4cb9565ca0 chore: Update to use Node20 version of Actions (#2283)
atlassian/gajira-* actions are no longer maintained, but they are using node16, which is soon to be deprecated. This change removes the use of those actions.
2024-05-06 09:55:17 -04:00
eddbdb23d0 Result of tsccr-helper -log-level=info gha update -latest . (#2281)
Co-authored-by: hashicorp-tsccr[bot] <hashicorp-tsccr[bot]@users.noreply.github.com>
Co-authored-by: Lisbet Alvarez <107949262+lisbet-alvarez@users.noreply.github.com>
2024-05-03 11:03:45 -07:00
hashicorp-copywrite[bot]andCameron Perera 5762b0df4d [COMPLIANCE] Add Copyright and License Headers (#2277)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>
2024-05-01 12:29:06 -05:00
Carlos Alcaide Corvo e421b8efc0 chore: 🤖 Add vscode specific to gitignore (#2221)
Add vscode specific stuff for gitignore
2024-05-01 07:39:35 -07:00
Carlos Alcaide Corvo 2d1e15a7bb Update changelog and cli version (#2280)
* Update changelog and cli version
2024-04-30 10:21:25 -07:00
Lisbet Alvarez dd92321b81 fix: 🐛 update label & description (#2279) 2024-04-29 11:52:45 -07:00
Lisbet Alvarez dce45031cb fix: 🐛 recording storage path not being set (#2276) 2024-04-26 15:49:29 -07:00
Zhihe Li 2666ec8244 fix: 🐛 Fix account password not being properly set (#2275) 2024-04-26 13:40:30 -04:00
Michael Li 3674d07762 test(e2e): Address flake (#2274)
Observed a flake when the Recording ID also contained an `OK`, causing a conflict with finding this OK button.
2024-04-25 13:52:26 -04:00
Zhihe Li dccf06cb0c fix: 🐛 Fix error when deleting auth method (#2273)
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13624
2024-04-25 11:48:55 -04:00
Carlos Alcaide CorvoandZhihe Li c64e8a2993 Fix storage bucket empty state message (#2272)
* Fix text

* Update addons/core/translations/resources/en-us.yaml

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>

---------

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
2024-04-24 15:08:04 -07:00
Lisbet Alvarez 5ae490c28c fix: 🐛 small updates to cred-library, cred-store & host-catalog (#2271) 2024-04-24 11:16:06 -07:00
Dharini Jeeva bedcdee048 fix: 🐛 permissions (#2269)
* fix: 🐛 permissions
2024-04-24 11:04:11 -07:00
Michael Li bd394d9517 fix: Update LDAP address example (#2270) 2024-04-24 12:22:04 -04:00
Lisbet Alvarez a6bdc4fa24 fix: 🐛 action errors on auth-method refresh (#2268) 2024-04-23 16:37:01 -07:00
Zhihe Li 3e9a06a5b5 fix: 🐛 Fix adding host set error in targets (#2267) 2024-04-23 10:49:33 -04:00
Zhihe Li 19908768a4 fix: 🐛 Fix HDS labels and helpers in host sets (#2266)
* fix: 🐛 Fix HDS labels and helpers in host sets
2024-04-22 20:56:26 -04:00
Dharini Jeeva 4274a045f7 fix: 🐛 add details (#2265) 2024-04-22 13:00:00 -07:00
Lisbet Alvarez 1270458430 fix: 🐛 add missing pagination component to cred stores (#2264)
* fix: 🐛 add missing pagination component to cred stores

* test: 💍 fix cred store acceptance tests
2024-04-22 12:43:39 -07:00
Dharini Jeeva 4c342061d3 fix: 🐛 aliasing bugs (#2257)
* fix: 🐛 aliasing bugs
2024-04-22 12:16:00 -07:00
Dharini Jeeva 5ce83d9239 fix: 🐛 title (#2263) 2024-04-22 10:57:40 -07:00
Lisbet Alvarez 148f2db941 refactor: 💡 remove route-action usage for auth-methods (#2178)
* refactor: 💡 remove route-action usage for auth-methods

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12603
2024-04-22 10:33:06 -07:00
hashicorp-copywrite[bot] f65f483611 [COMPLIANCE] Add Copyright and License Headers (#2262)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2024-04-22 11:47:53 -05:00
Lisbet Alvarez cc9003a118 fix: 🐛 required & optional labels in oidc auth-methods form (#2261) 2024-04-22 09:05:29 -07:00
Michael Li 20f8c99013 test(e2e): Fixes for 0.16.0 (#2258) 2024-04-22 10:39:53 -04:00
Dharini Jeeva 536ebc1c0f chore: 🤖 add doc links for aliases (#2260) 2024-04-19 13:37:51 -07:00
Zhihe Li 79a932bebb feat: 🎸 Add aliases to list view (#2256)
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13487
2024-04-19 16:18:32 -04:00
Carlos Alcaide Corvo f246c24a08 Add field validation for scope within Storage bucket creation (#2259) 2024-04-19 11:42:24 -07:00
Michael Li d31cfca138 chore(e2e): Update playwright to 1.43 (#2254)
When running the Admin UI e2e tests against 0.16.0, there were some issues with trying to click on a link on the new pagination tables (links were not seen as visible). For some reason, updating the playwright version fixed this.
2024-04-18 11:49:46 -04:00
Carlos Alcaide Corvo 298e804500 Fix an afterModel check to avoid reloading the page when the queryParam gets updated (#2255) 2024-04-18 08:03:13 -07:00
Dharini Jeeva f9cd1c331f feat: 🎸 show associated aliases in target detail page (#2249)
* feat: 🎸 show associated aliases in target detail page
2024-04-17 12:39:34 -07:00
Dharini Jeeva a0fa66a14d fix: 🐛 plural title (#2252) 2024-04-17 12:26:58 -07:00
Dharini Jeeva 086d9da028 fix: 🐛 place modal outside table (#2251) 2024-04-17 11:40:23 -07:00
Cameron Perera 9b20b150eb fix: 🐛 transition aborted error when deleting group (#2250) 2024-04-17 11:13:58 -05:00
Zhihe Li 6bbddc56b1 fix: 🐛 Fix windows being unable to search client daemon (#2245)
When using the client daemon to search on windows, we use
the CLI instead of the unix socket for our requests.
Unfortunately that means we spawn a separate process to
retrive the results and one idiosyncracy of this is that
`spawnSync` buffers its outputs which means we were hitting
the default max buffer size. `spawn` doesn't have this
issue because it streams its outputs and we didn't previously
use `spawnSync` for any command that produced large amounts
of output.

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13466
2024-04-17 07:40:09 -07:00
Carlos Alcaide Corvo 0870a8f623 MinIO support for Admin UI (#2248)
Add support for MinIO creation form and list
2024-04-16 14:17:23 -07:00
Cameron Perera 98c16ad422 fix: 🐛 add missing scope_id from credential sources for targets (#2247) 2024-04-16 11:31:54 -05:00
Zhihe LiandCameron Perera 9156c8612e fix: 🐛 Add back scope_id as part of request query parameter (#2246)
Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>
2024-04-16 11:15:16 -05:00
Lisbet Alvarez a43756895d fix: 🐛 auth-methods deleted items are showing on table view (#2244)
* fix: 🐛 auth-methods deleted items are showing on table view
2024-04-15 16:30:43 -07:00
Lisbet Alvarez adc50a939f refactor: 💡 remove uneeded rose cards component (#2243)
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13321
2024-04-15 10:37:26 -07:00
hashicorp-copywrite[bot] 37cbb74c76 [COMPLIANCE] Add Copyright and License Headers (#2242)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2024-04-15 11:51:03 -05:00
Dharini Jeeva 80b633a063 Alias clear modal (#2239)
* fix: 🐛 permissions to create aliases within targets
2024-04-15 09:15:38 -07:00
Dharini Jeeva bd65c91ff9 chore: 🤖 alias target route (#2228) 2024-04-12 16:36:17 -07:00
Lisbet Alvarez c550faddb4 Icu 13218 update indexed db parser unit tests to test for filtering on boolean fields (#2238)
* test: 💍 unit tests for bool fields
* chore: 🤖 add deprecation handling

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13218
2024-04-12 16:22:27 -07:00
Cameron Perera 5e7c25a1fa refactor: 💡 update groups and workers "new" button to HDS (#2236) 2024-04-12 14:55:34 -04:00
ded8bdadd1 Icu 12592 add filtering pagination support for auth methods (#2209)
* feat: 🎸 add filtering & pagination to auth methods

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12592

---------

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>
2024-04-12 14:55:34 -04:00
Cameron Perera 13da35c06b Icu 13357 create loading screen for admin UI list routes (#2231)
* test: 💍 fix failing tests

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13357

* feat: 🎸 add generic loading indicator for admin ui

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13357

* feat: 🎸 add custom loading logic for search and filtering

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13357

* chore: 🤖 fix lint error

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13357

* refactor: 💡 remove commented helper for sessions list

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13357

* style: 💄 update loading indicator margin to relative unit

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13357

* refactor: 💡 remove unneeded custom loading action

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13357
2024-04-12 14:55:34 -04:00
Lisbet Alvarez d52957d87b fix: 🐛 breadcrumbs on scopes route not showing since model move (#2235) 2024-04-12 14:55:34 -04:00
Zhihe Liandcameronperera 33d359e692 Fix tests from rebase (#2233)
* fix: 🐛 Fix tests broken by rebase onto main

---------

Co-authored-by: cameronperera <cameron.perera@hashicorp.com>
2024-04-12 14:55:34 -04:00
Cameron Perera 626bdc2c92 Icu 13374 add permission checks for filtering resources in sessions and targets (#2226)
* refactor: 💡 hide active sessions filter if no list permissions

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13374

* test: 💍 add active sessions filter permissions test

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13374

* refactor: 💡 add permissions check for targets and users

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13374

* refactor: 💡 address PR feedback

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13374

* refactor: 💡 move user permission check to a helper func

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13374

* refactor: 💡 move permissions logic to user and target helper

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13374
2024-04-12 14:55:34 -04:00
Lisbet Alvarez edba33bbda Icu 13359 refactor query requests for resources added to indexed db (#2224)
* refactor: 💡 update query requests for resources in indexedDB

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13359
2024-04-12 14:55:34 -04:00
Zhihe Li 5d32d987bc feat: 🎸 Update how we store tokens in indexed-db (#2223)
Added logic to make the list tokens stored in indexed DB more granular.
I get a hash of the query parameters that will get sent to the controller
and use that as the id for the token. This also means extra logic for when
a token is invalid as we will need to delete all tokens of the same
resource type.
2024-04-12 14:55:34 -04:00
Lisbet Alvarez 6c59baa413 refactor: 💡 reduce network requests & call indexedDB directly (#2217)
* refactor: 💡 reduce network requests & call indexedDB directly

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13251
2024-04-12 14:55:34 -04:00
Cameron Perera c2c0b38187 fix: 🐛 move query inside list permission check (#2222)
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13356
2024-04-12 14:55:34 -04:00
Lisbet Alvarez 1d7892230c Icu 13302 add filtering pagination support for scopes (#2216)
* feat: 🎸 add filtering and pagination to scopes

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13302
2024-04-12 14:55:34 -04:00
Cameron Perera ece9c9b0c8 refactor: 💡 add include_terminated param to sessions query (#2219)
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13130
2024-04-12 14:55:34 -04:00
Lisbet Alvarez 9a43c74e60 refactor: 💡 add active sessions column to targets table (#2196)
* refactor: 💡 add active sessions column to targets table

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13085

* test: 💍 add test case

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13085
2024-04-12 14:55:33 -04:00
Cameron Perera eb4ec5f6de refactor: 💡 update Dropdown component to have name & toggleText (#2218)
* refactor: 💡 update Dropdown component to have name & toggleText

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13336

* test: 💍 remove hds class selector

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13336
2024-04-12 14:55:33 -04:00
Zhihe Li a39b208b48 Icu 12781 add filtering pagination support for host catalogs (#2213)
* feat: 🎸 Add searching for host catalogs

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12781
2024-04-12 14:55:33 -04:00
Lisbet AlvarezandZhihe Li 22353e7df6 Icu 12782 add filtering pagination support for credential stores (#2212)
* feat: 🎸 add filtering & pagination support for credential-store

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12782

---------

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
2024-04-12 14:55:33 -04:00
Cameron Perera 713ffd8d1b fix: 🐛 add parentScope.id to refresh action for sessions (#2215)
* fix: 🐛 add parentScope.id to refresh action for sessions

* refactor: 💡 remove scope_id from users and targets query
2024-04-12 14:55:33 -04:00
Cameron Perera 6e75439652 Icu 12587 add filtering pagination support for sessions (#2194)
* feat: 🎸 add pagination and filtering to sessions page

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12587

* refactor: 💡 fix handling of null values in indexed-db-query

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12587

* refactor: 💡 add method signatures where missing

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12587

* refactor: 💡 address PR feedback

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12587

* fix: 🐛 add override for table header color when sortable

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12587

* refactor: 💡 remove poller and add manual refresh action

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12587

* refactor: 💡 remove force_refresh from sessions route queries

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12587

* refactor: 💡 add user getter to session model

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12587

* refactor: 💡 remove logicalOperator value from queries

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12587

* refactor: 💡 move action to controller from router

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12587

* refactor: 💡 remove cleanValues from indexed-db-query

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12587

* refactor: 💡 remove potential null values for user/target ids

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12587

* refactor: 💡 add async/await back to cancelSession

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12587

* refactor: 💡 update sessions route

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12587

* refactor: 💡 use translation string for Sessions

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12587

* test: 💍 fix controller test

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12587

* refactor: 💡 add scope_id to filters for query

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12587

* refactor: 💡 remove scope_id and recursive in sessions query

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12587

* refactor: 💡 how user query to use global and org scope

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12587
2024-04-12 14:55:33 -04:00
Cameron PereraandZhihe Li be96daa499 Icu 12591 add filtering pagination support for groups (#2205)
* refactor: 💡 move model hook to groups/index

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12591

* feat: 🎸 add pagination to groups list view

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12591

* feat: 🎸 add searching to groups

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12591

* fix: 🐛 update scopeId to scope_id

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12591

* test: 💍 clean up test refactor

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12591

* refactor: 💡 update how groupsExisit is set

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12591

* refactor: 💡 update mirage config for groups

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12591

* test: 💍 fix failing groups create tests

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12591

* refactor: 💡 add groups mirage config back

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12591

* refactor: 💡 use translation string for Groups

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12591

* refactor: 💡 update how groups are queried

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12591

* Update ui/admin/tests/acceptance/groups/list-test.js

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>

* refactor: 💡 update groups translation to title_plural

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12591

---------

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
2024-04-12 14:55:33 -04:00
Zhihe Li 9f11e8a25d fix: 🐛 Fix setting up indexed db when user logins first time (#2211) 2024-04-12 14:55:33 -04:00
Lisbet Alvarez 8be4e93a3c Icu 12590 add filtering pagination support for roles (#2204)
* feat: 🎸 add search & pagination for roles

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12590
2024-04-12 14:55:33 -04:00
Lisbet Alvarez a78522e09a feat: 🎸 add search & pagination support for users (#2195)
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12589
2024-04-12 14:55:33 -04:00
Zhihe LiandLisbet Alvarez a26662eca5 feat: 🎸 Add filtering/pagination for admin ui targets (#2072)
* feat: 🎸 Add filtering/pagination for admin ui targets

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12193

* test: 💍 add acceptance test cases

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12193

* test: 💍 cleanup tests and add controller tests

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12193

---------

Co-authored-by: Lisbet Alvarez <lisbet.alvarez@hashicorp.com>
2024-04-12 14:55:33 -04:00
Zhihe LiandLisbet Alvarez d72fa0d6e3 feat: 🎸 Add indexedDb parser (#2068)
* feat: 🎸 Add indexedDb parser

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12164

---------

Co-authored-by: Lisbet Alvarez <lisbet.alvarez@hashicorp.com>
2024-04-12 14:55:33 -04:00
Zhihe Li bd5e3da1f4 feat: 🎸 Initial setup of IndexedDB (#2064)
* feat: 🎸 Initial setup of IndexedDB

* fix: 🐛 Rethrow errors up from indexed db handler
2024-04-12 14:55:33 -04:00
Dharini Jeeva f74f4d4a20 Target aliases list view (#2225)
target aliases list view
2024-04-11 14:18:38 -07:00
dependabot[bot]andZhihe Li 9bd45164bf chore(deps): bump tar from 6.1.11 to 6.2.1 in /ui/desktop/electron-app (#2230)
Bumps [tar](https://github.com/isaacs/node-tar) from 6.1.11 to 6.2.1.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v6.1.11...v6.2.1)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
2024-04-11 14:05:30 -04:00
dependabot[bot] 363879c3c3 chore(deps): bump tar from 6.1.15 to 6.2.1 (#2232)
Bumps [tar](https://github.com/isaacs/node-tar) from 6.1.15 to 6.2.1.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v6.1.15...v6.2.1)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-11 13:41:15 -04:00
Lisbet Alvarez 0b4fd6765e fix: 🐛 modal bubbling up when user has not updated model (#2227)
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13106
2024-04-09 12:05:15 -07:00
Dharini Jeeva c8839d6db1 Icu 12933 updates to target model to support aliasing (#2214)
* feat: 🎸 target aliases association API, form creation
2024-04-05 16:35:23 -07:00
Johan Brandhorst-SatzkornandZhihe Li ac5110d94a feat: 🎸 authenticate to ferry on authentication (#2203)
* feat: 🎸 authenticate to ferry on authentication

Replace the 'boundary daemon add-token' command with a simple
'boundary auth-tokens read -id <token_id>', relying on the boundary
CLI to do the work of sending the token to the client and Ferry
daemons.

* refactor: 💡 Use CLI to add tokens to daemons for all platforms

---------

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
2024-04-03 12:41:13 -04:00
hashicorp-tsccr[bot]andhashicorp-tsccr[bot] 78bcc103c2 Result of tsccr-helper -log-level=info gha update -latest . (#2210)
Co-authored-by: hashicorp-tsccr[bot] <hashicorp-tsccr[bot]@users.noreply.github.com>
2024-04-02 10:21:39 -07:00
dependabot[bot]andZhihe Li fe0cffdf0b chore(deps): bump express from 4.18.2 to 4.19.2 (#2208)
Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
2024-03-28 17:45:02 -04:00
Michael Li 79f4c2bc5d test(e2e): Update credential library form behavior (#2207)
* test(e2e): Update credential library form behavior

* fix(e2e):  Fix some locators due to form updates
2024-03-28 15:05:57 -04:00
Devon AndersonandZhihe Li 9843310dfb Icu 12860 retain values in form fields in credential library when switching types (#2169)
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12860

---------

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
2024-03-27 15:18:58 -04:00
Dharini Jeeva db75b2e292 chore: 🤖 aliases list view (#2197)
* chore: 🤖 aliases list view
2024-03-25 16:54:15 -07:00
Cameron Perera ac1d98bbec fix: 🐛 show change cluster url when no auth methods (#2201)
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13133
2024-03-25 14:24:53 -05:00
Cameron Perera 0c6744581d fix: 🐛 remove recursive param from list scopes endpoint (#2199)
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12543
2024-03-25 13:47:07 -05:00
hashicorp-copywrite[bot] fb345f045e [COMPLIANCE] Add Copyright and License Headers (#2202)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2024-03-25 10:31:51 -07:00
Michael Li b1085def48 test(e2e): Add check for playing back session recording (#2198) 2024-03-25 12:13:27 -04:00
Michael Li 499b0fde31 refact(e2e): Convert to match "create" helper convention (#2200) 2024-03-22 16:22:34 -04:00
dependabot[bot]andCameron Perera bbf9c95267 chore(deps): bump follow-redirects from 1.15.4 to 1.15.6 (#2187)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.4 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.4...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>
2024-03-22 11:07:56 -05:00
Dharini Jeeva 2dbcc1c0af Alias create (#2193)
* feat: 🎸 create alias
2024-03-21 09:50:51 -07:00
Michael Li 6d88206491 refact(e2e): Update create helper methods (#2191) 2024-03-20 09:38:59 -04:00
de20df445c [COMPLIANCE] Add Copyright and License Headers (#2188)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
Co-authored-by: Carlos Alcaide Corvo <ccorvo@hashicorp.com>
Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>
2024-03-19 21:56:39 -05:00
Michael Li 45ad7a8f3b fix(e2e): Address flake in log in/log out test (#2189) 2024-03-19 16:52:30 -04:00
798cfc6828 chore: 🤖 Update desktop client changelog (#2183)
Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>
Co-authored-by: Lisbet Alvarez <107949262+lisbet-alvarez@users.noreply.github.com>
2024-03-19 12:23:50 -07:00
Lisbet Alvarez d93986c4e2 refactor: 💡 remove route-action usage from credential-stores (#2172)
* refactor: 💡 remove route-action usage from credential-stores

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12604
2024-03-18 16:34:37 -07:00
Michael Li 879c196887 refact(e2e): Move env outside of helper methods (#2186)
* refact(e2e): Move env outside of UI helper methods

* refact(e2e): Move env outside of CLI helpers
2024-03-18 15:53:39 -04:00
Lisbet Alvarez 98170ed01e refactor: 💡 Remove route-action usage for managed-groups (#2168)
* refactor: 💡 Remove route-action usage for managed-groups

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12619
2024-03-18 10:34:54 -07:00
Dharini Jeeva 47a218cf8f chore: Add routes for aliases (#2185)
alias resource routes
2024-03-15 14:48:32 -07:00
Dharini Jeeva 879a58dcb8 feat: 🎸 mirage support and initial route for aliases (#2181)
* feat: 🎸 mirage support and initial route for aliases
2024-03-15 14:24:20 -07:00
Stan RyzhovandMichael Li f100190ac1 test: 💍 Add storage policies e2e-test (#2175)
* test: 💍 Add storage policies e2e-test

✅ Closes: ICU-12883

* chore: Adjust required env for e2e-tests

✅ Closes: ICU-12883

* CR: Refactor helper method to pass in env

---------

Co-authored-by: Michael Li <michael.li@hashicorp.com>
2024-03-15 11:55:13 -04:00
Lisbet Alvarez 0902e42cb0 refactor: 💡 remove route-action usage for groups (#2176)
* refactor: 💡 remove route-action usage for groups

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12605
2024-03-14 13:28:43 -07:00
Michael Li 6b0958e4d8 test(e2e): Admin UI test fixes (#2182) 2024-03-14 14:17:54 -04:00
Cameron Perera 82ea70f44b fix: 🐛 update destination path for autoUpdater workflow (#2179)
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12878
2024-03-13 10:46:22 -05:00
hashicorp-copywrite[bot] 0bb72040db [COMPLIANCE] Add Copyright and License Headers (#2177)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2024-03-11 11:51:45 -05:00
Michael Li 9d9a38510b test(e2e): Add test for SSH certification injection (#2170) 2024-03-07 17:05:45 -05:00
Lisbet Alvarez a54aecee07 refactor: 💡 remove route-action usage in accounts (#2134)
* refactor: 💡 remove route-action usage in accounts

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12616
2024-03-07 09:24:28 -08:00
Devon Anderson 7dab184bb9 chore: 🤖 Migrate form.input to Hds:TExtInput::Field (#2149)
* chore: 🤖 Migrate `form.input` to `Hds:TExtInput::Field`

Migrate `form/account/oidc` and `form/account/password` forms to use
`Hds::TextInput::Field` instead of `form.input`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12457

* refactor: 💡 argument clean up

argument clean up

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12457

* refactor: 💡 switch to `readonly` arument instead of `disabled`

switch to `readonly` arument instead of `disabled`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12457

* refactor: 💡 fix incorrect attributes

fix incorrect attributes

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12457

* refactor: 💡 fix failing test

fix failing test

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12457
2024-03-07 10:12:33 -05:00
Lisbet Alvarez f068ac0b0c refactor: 💡 remove usage of route-action for app route (#2135)
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12615
2024-03-04 10:13:59 -08:00
Michael Li d07c33ca41 test(e2e): Add test for SSH Credential Injection with Vault SSH Private Key (#2166) 2024-03-01 13:35:47 -05:00
hashicorp-tsccr[bot]andhashicorp-tsccr[bot] f073de774d Result of tsccr-helper -log-level=info gha update -latest . (#2167)
Co-authored-by: hashicorp-tsccr[bot] <hashicorp-tsccr[bot]@users.noreply.github.com>
2024-03-01 09:48:29 -08:00
Michael Li 1040a05880 test(e2e): Add LDAP Admin UI e2e test (#2164) 2024-02-29 16:51:32 -05:00
Lisbet Alvarez 002f64d676 update cli version and update changelog (#2165)
* docs: ✏️ update cli version and update changelog
2024-02-28 10:31:34 -08:00
Devon Anderson c09efbae10 chore: 🤖 Migrate form.inut to Hds::TextInput::Field (#2151)
* chore: 🤖 Migrate `form.inut` to `Hds::TextInput::Field`

Migrate `form/create-worker-led` form to use `Hds:Text::InputField`
instead of `form.input`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12477

* refactor: 💡 Added `optional` and `requred` arguments for fields

Added `optional` and `require` arguments for all needed fields.

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12477

* refactor: 💡 fix failing test

fix failing test

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12477
2024-02-28 13:02:02 -05:00
Devon Anderson 060f995f94 chore: 🤖 Migrate form.input to Hds::TextInput::Field (#2143)
* chore: 🤖 Migrate `form.input` to `Hds::TextInput::Field`

Migrate `form/credential` forms for for `json`, `ssh_private_key`,
`username_password`, and `form/credential-store` forms for `static` and
`vault` to use `Hds::TextInput::Field` instead of `form.input`.

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12461

* refactor: 💡 fix broken test

fix broken test

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12461

* refactor: 💡 fix broken test

fix broken test

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12461

* refactor: 💡 added `@hasVisibilityToggle` back and clean up test

Added `@hasVisibilityToggle` back and clean up test by use `data-test-*`
attributes for error messaging

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12461

* refactor: 💡 set `@hasVisiblityToggle` to default

set `@hasVisiblityToggle` to default

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12461

* refactor: 💡 field argument clean up

field argument cleanup

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12461

* refactor: 💡 switch `disabled` argument to `readonly`

switch `disabled` argument to `readonly`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12461

* refactor: 💡 clean up attribute order

clean up field attribute order

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12461
2024-02-28 12:21:37 -05:00
Devon Anderson f1c5c99664 chore: 🤖 Migrate form.input to Hds::TextInput::Field (#2147)
* chore: 🤖 Migrate `form.input` to `Hds::TextInput::Field`

Migrate `form/host-set/aws`, `form/host-set/azure` and
`form/host-set/static` forms to use `Hds::TextInputField` instead of
`form.input`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12469

* Update index.hbs

removed `@isOptional` field.

* Update index.hbs

removed `@isOptional` argument

* refactor: 💡 fix lint errors

fix lint

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12469

* refactor: 💡 field argument cleanup

field argument cleanup

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12469

* refactor: 💡 switch `disabled` argument to `readonly`

switch `disabled` argument to `readonly`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12469

* refactor: 💡 order of attributes

change order of attributes

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12469
2024-02-28 10:18:22 -05:00
af5fb8e814 chore(deps): bump es5-ext from 0.10.53 to 0.10.63 (#2162)
Bumps [es5-ext](https://github.com/medikoo/es5-ext) from 0.10.53 to 0.10.63.
- [Release notes](https://github.com/medikoo/es5-ext/releases)
- [Changelog](https://github.com/medikoo/es5-ext/blob/main/CHANGELOG.md)
- [Commits](https://github.com/medikoo/es5-ext/compare/v0.10.53...v0.10.63)

---
updated-dependencies:
- dependency-name: es5-ext
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dharini Jeeva <dharini@hashicorp.com>
Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
2024-02-27 16:49:29 -05:00
Devon Anderson cf5334556f chore: 🤖 Migrate form.input to Hds::TextInput:Field (#2150)
* chore: 🤖 Migrate `form.input` to `Hds::TextInput:Field`

Migrate  `form/manage-groups/oidc`, `form/user` and `form/worker` forms
to use `Hds::TextInput::Field` instead of `form.input`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12473

* refactor: 💡 argument clean up

argument clean up

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12473

* refactor: 💡 refactor InfoField arguments for `readonly`

Refactor InfoField component's arguments for `readonly` instead of
`disabled`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12473
2024-02-27 14:57:54 -05:00
Dharini Jeeva 5c6c9bb69f fix: 🐛 move config processing to mirage serializer (#2163) 2024-02-27 11:25:51 -08:00
Devon Anderson 26a77edbc7 chore: 🤖 Migrate form.inpu to use Hds::TextInput::Field` (#2145)
* chore: 🤖 Migrate `form.inpu` to use Hds::TextInput::Field`

Migrate `form/group`, `form/host-static`, `form/host-catalog/aws` and
`form/host-catalog/azure` forms to use `Hds::TextInputField instead of
`form.input`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12466

* refactor: 💡 use `data-test` attributes for testing

use `data-test` attributes for testing error messaging.

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12466

* refactor: 💡 field argument cleanup

field argument cleanup

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12466

* refactor: 💡 switch `disabled` argument to `readonly`

switch `disabled` argument to `readonly`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12466
2024-02-27 13:52:50 -05:00
Dharini Jeeva 3fc865d226 Fix credential library mocks (#2161)
* fix: 🐛 vault cred library mocks
2024-02-27 09:41:28 -08:00
Devon Anderson 47d7ceccf7 chore: Migrate form.input to use Hds text input field (#2154)
* chore: 🤖 Migrate `form.input` to use `Hds` form input field

Migrate `form.input` for `clusterurl.hbs` to use
`Hds::Form::TextInput::Field`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12478

* refactor: 💡 removed unused `data-test` attribute

removed unused `data-test` attribute

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12478
2024-02-27 09:31:48 -05:00
Dharini Jeeva 38df28be55 fix: 🐛 change delete to detach Storage policy from a scope (#2160)
* fix: 🐛 change delete to detach Storage policy from a scope
2024-02-26 12:50:38 -08:00
Dharini Jeeva 6d7c86a08c fix: 🐛 spelling (#2159)
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12813
2024-02-26 11:18:34 -08:00
Michael Li 58a31b880b test(e2e): Add enterprise tests for creating TCP/SSH targets (#2158) 2024-02-26 12:59:34 -05:00
Dharini Jeeva 453ab7911d doc: var name (#2140)
* fix: 🐛 var name
2024-02-23 15:52:08 -08:00
Dharini Jeeva 93c8d481fd Icu 12567 add new field credential mapping overrides (#2156)
* chore: 🤖 add credential type select list
2024-02-23 10:07:52 -08:00
Carlos Alcaide Corvo 956f6fd04d refactor: 💡 Adopt HDS copy snippet Desktop UI (#2146)
* refactor: 💡 Adopt HDS copy snippet Desktop UI

Adopt HDS copy snippet and delete usage of Copyable custom component
2024-02-22 13:56:56 -08:00
dependabot[bot]andZhihe Li 912be13744 chore(deps): bump ip from 1.1.8 to 1.1.9 in /ui/desktop/electron-app (#2155)
Bumps [ip](https://github.com/indutny/node-ip) from 1.1.8 to 1.1.9.
- [Commits](https://github.com/indutny/node-ip/compare/v1.1.8...v1.1.9)

---
updated-dependencies:
- dependency-name: ip
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
2024-02-22 15:28:18 -05:00
dependabot[bot]andZhihe Li fc1b91c8f9 chore(deps): bump ip from 1.1.5 to 1.1.9 (#2153)
Bumps [ip](https://github.com/indutny/node-ip) from 1.1.5 to 1.1.9.
- [Commits](https://github.com/indutny/node-ip/compare/v1.1.5...v1.1.9)

---
updated-dependencies:
- dependency-name: ip
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
2024-02-22 15:10:54 -05:00
Devon Anderson 8e40b01caf refactor: 💡 Quick fix for client_secret attributes (#2157)
`client_secret` attribute needed to be `@type` instead of `type`
2024-02-22 14:52:31 -05:00
Devon Anderson 20181c978f refactor: 💡 Migrate form.input to Hds::TextInput::Field (#2142)
* refactor: 💡 Migrate `form.input` to `Hds::TextInput::Field`

Migrate the use of `form.input` to `Hds::TextInput::Field` for OIDC and
Password auth-method form

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12459

* Update index.hbs

move `name` attribute to top of attribute list for readers

* refactor: 💡 fix `step` and `min` arguments

fix `step` and `min` arguments

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12459

* refactor: 💡 clean up order of arguments and add `data-test` att

clean up order of arguments and add `data-test` attributes

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12459

* refactor: 💡 Add `@isOptional` attribute to all needed fields

Add `@isOptiona` attributes to all needed fields

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12459

* Update index.hbs

add `@hasVisibilityToggle`

* refactor: 💡 fix lint

fix lint

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12459

* refactor: 💡 quick attribute refactor

quick attribute refactor

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12459
2024-02-22 13:22:18 -05:00
Lisbet Alvarez db78f1ae4d docs: ✏️ update enos readme (#2139)
* docs: ✏️ update enos readme

* docs: ✏️ update cmd

* docs: ✏️ update wording

* docs: ✏️ add link

* docs: ✏️ use diff slack channel
2024-02-20 17:57:21 -08:00
Dharini Jeeva 592bb15022 chore: 🤖 add credential type select list (#2144)
* chore: 🤖 add credential type select list
2024-02-16 15:57:14 -08:00
Carlos Alcaide Corvo f002e14673 [Admin UI] Adopt HDS::Copy::Snippet (#2141)
* refactor: 💡 Adopt HDS copy snippet

Adopt HDS copy snippet and delete usage of Copyable custom component
within Admin UI.
2024-02-16 02:19:43 -08:00
Devon Anderson a1b455e5eb refactor: 💡 Migrate last form.fieldset over to use Hds (#2138)
* refactor: 💡 Migrate last `form.fieldset` over to use Hds

Migrate last `form.fieldset` over to use `Hds::FormFieldset`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-9427

* refactor: 💡 removed `fieldset` from `RadioCard`

Removed unneeded `fieldset` from `RadioCard`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-9427
2024-02-15 09:51:39 -05:00
Dharini Jeeva 786e6130cd feat: 🎸 allow session recording deletion (#2132)
* feat: 🎸 allow session recording deletion
2024-02-13 13:26:23 -08:00
hashicorp-copywrite[bot] 4db8b8e1e7 [COMPLIANCE] Add Copyright and License Headers (#2137)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2024-02-12 16:31:46 -05:00
Lisbet Alvarez 4be8d10323 Icu 12557 refresh not working as intended on windows (#2133)
* fix: 🐛 add flag

* refactor: 💡 add true val

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12557
2024-02-09 11:58:41 -08:00
Devon Anderson c79a1fca79 chore: 🤖 Create select field render for the Form::Field::ListWrapper (#2112)
* chore: 🤖 Create `select` field render for the `Form::Field::ListWrapper`
component

Create a `select` field render for the `Form::Field::ListWrapper`
component.

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12271

* refactor: 💡 Added additional test

Added additional testing around removing and adding an option, and
refactored for better usability

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12271

* refactor: 💡 Refactored getter to check for option and model arg

Refactore getter to check for options and model args.

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12271

* refactor: 💡 Use select field with `signing_algorithms`

Use select field with `signing_algorithms`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12271

* refactor: 💡 fix test

fix test

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12271

* refactor: 💡 fix failing test

fix failing test

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12271

* refactor: 💡 fix update auth-method test

fix update auth-method test

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12271
2024-02-09 08:42:15 -05:00
Cameron Perera d2d332b7d1 refactor: 💡 only show scopes with auth methods at authenticate (#2129)
* refactor: 💡 only show scopes with auth methods at authenticate

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-2355

* test: 💍 verify scopes with no auth methods are hidden

when authenticating

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-2355

* refactor: 💡 update logic for fetching scopes and auth methods

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-2355

* refactor: 💡 PR feedback changes

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-2355

* refactor: 💡 added unless block back to template

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-2355

* refactor: 💡 update admin authenticate route and template

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-2355

* test: 💍 add test for orgs with no auth methods admin ui

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-2355
2024-02-08 10:01:20 -06:00
022ac0fffe Result of tsccr-helper -log-level=info gha update -latest . (#2126)
Co-authored-by: hashicorp-tsccr[bot] <hashicorp-tsccr[bot]@users.noreply.github.com>
Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
Co-authored-by: Lisbet Alvarez <107949262+lisbet-alvarez@users.noreply.github.com>
2024-02-07 16:42:38 -08:00
Cameron Perera f3622fb92b feat: 🎸 remove Type of Worker from worker details page (#2131)
* feat: 🎸 remove Type of Worker from worker details page

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12409

* refactor: 💡 remove unused translation

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12409
2024-02-06 14:48:28 -06:00
Zhihe Li f8b5dcd824 fix: 🐛 Add error notification if adding token to daemon fails (#2127)
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12488
2024-02-05 14:21:13 -05:00
Alex 056008e13e chore: 🤖 replace Rose::CodeEditor with Hds::CodeBlock on new worker page (#2128)
* chore: 🤖 replace `Rose::CodeEditor` with `Hds::CodeBlock` for new workers
2024-02-05 09:50:08 -08:00
Alex ea03d6e488 chore: 🤖 update HDS to 3.5.0 (#2116)
* chore: update to 3.4.1

`@hashicorp/design-system-components` to `3.4.1`
 - `@hashicorp/ember-flight-icons` to `4.0.5`

* chore: update to 3.5.0
2024-01-31 15:49:02 -05:00
Zhihe Li 06cc64e6af fix: 🐛 Add refresh button back (#2124) 2024-01-30 19:54:34 -05:00
Lisbet Alvarez 4d3c993b0f refactor: 💡 move token call to be inside try-catch (#2123) 2024-01-30 16:01:00 -08:00
Cameron Perera cb972cfc8a refactor: 💡 update how we determine is pagination is supported (#2122) 2024-01-30 17:41:57 -06:00
Lisbet Alvarez 13f1c5cc23 docs: ✏️ remove bug fix from changelog (#2121) 2024-01-30 08:45:22 -08:00
Cameron Perera f366f0a858 fix: 🐛 update id to ids for target onboarding creation (#2120)
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12412
2024-01-30 09:13:20 -06:00
Cameron Perera 08d9801829 refactor: 💡 add -addr flag to add-token command (#2118)
* refactor: 💡 add -addr flag to add-token command

* style: 💄 remove old comment
2024-01-29 14:44:50 -06:00
Lisbet Alvarez 3f17435507 fix: 🐛 fix transition aborted error on storage bucket creation (#2119)
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12402
2024-01-29 12:00:07 -08:00
Lisbet Alvarez b63ddadf45 chore: 🤖 update changelog and version for v2.0.0 (#2117)
* chore: 🤖 update changelog and version for v2.0.0

* chore: 🤖 add pr link
2024-01-26 15:43:57 -08:00
Zhihe LiandCameron Perera 3721f63edf fix: 🐛 Fix client daemon usage on windows (#2115)
* fix: 🐛 Fix client daemon usage on windows

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12365

* refactor: 💡 Fix error handling

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12365

---------

Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>
2024-01-26 16:57:15 -06:00
Dharini Jeeva 8f34d83c15 Redirect on reapply error (#2114)
* chore: 🤖 redirect to list on reapply error
2024-01-26 10:13:16 -08:00
Cameron Perera def6959ee7 feat: 🎸 user can update clusterURL when controller unsupported (#2113)
* feat: 🎸 user can update clusterURL when controller unsupported

* test: 💍 add cluster url tests
2024-01-26 11:33:40 -06:00
Michael Li e76cc2eeeb test(admin/e2e): Fix yarn scripts (#2111) 2024-01-25 15:49:09 -05:00
Lisbet Alvarez 9a47a3ac5a Icu 12179 add doc links for storage policies (#2107)
* chore: 🤖 add doclinks for storage policies

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12179
2024-01-24 16:18:39 -08:00
Dharini Jeeva 2e1cba641c chore: 🤖 translation check and label (#2110) 2024-01-24 15:21:51 -08:00
Cameron Perera 842a84296a refactor: 💡 remove icon from sessions table for session id (#2108) 2024-01-24 16:12:07 -06:00
Cameron PereraandZhihe Li b86ce41e68 fix: 🐛 use filter query param to filter by org scope id (#2103)
* fix: 🐛 use filter query param to filter by org scope id

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12309

* refactor: 💡 remove duplicate call for scopes.scope model

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12309

* refactor: 💡 add filter to allTargets and sessions query

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12309

* refactor: 💡 reset query params for targets and sessions

on org scope change

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12309

* refactor: 💡 remove open/close parens from filter string

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12309

* refactor: 💡 Update logic on when to reset query parameters

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12309

* refactor: 💡 filter sessions query by parent scope isOrg

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12309

* refactor: 💡 update to & from transition references

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12309

* refactor: 💡 update to & from transition references for sessions

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12309

---------

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
2024-01-24 10:18:28 -06:00
Zhihe Li 5f9a66e421 fix: 🐛 Handle when requests to client daemon are returning 403 (#2105) 2024-01-23 16:31:21 -05:00
Dharini Jeeva 24fdd926f1 chore: 🤖 toggle translation based on state (#2106) 2024-01-23 12:13:50 -08:00
Dharini Jeeva db50bfc9df fix: 🐛 delete and retain_until should be readonly and Scope level policies (#2104)
* fix: 🐛 delete and retain_until should be readonly

* fix: 🐛 global scope should have policies from self and orgs
2024-01-23 11:31:43 -08:00
Zhihe Li 3f4beaada8 feat: 🎸 Add warning when upgrading to 2.0 for desktop client (#2101) 2024-01-22 19:06:01 -05:00
Lisbet Alvarez 5a9cbdd913 refactor: 💡 change filter name (#2102) 2024-01-22 14:07:11 -08:00
hashicorp-copywrite[bot] 314c1b36f4 [COMPLIANCE] Add Copyright and License Headers (#2100)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2024-01-22 12:12:44 -05:00
Zhihe Li f71fc3a0a4 fix: 🐛 Fix errors not getting propagated up from client daemon (#2099) 2024-01-19 18:13:33 -05:00
Dharini Jeeva 5a74220f38 fix: 🐛 policy UI bug fix (#2098)
* fix: 🐛 policy UI bug fix
2024-01-19 14:06:51 -08:00
Cameron Perera 3f2fc63b5b fix: 🐛 remove client daemon params and pass remaining params (#2097)
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12301
2024-01-19 11:44:01 -06:00
Zhihe Li c0793cd254 test: 💍 Add tests for MQL expression generator (#2096) 2024-01-18 11:39:29 -05:00
Dharini JeevaandLisbet Alvarez fb9a080d2e feat: reapply storage policies to session recording (#2095)
* refactor: 💡 add global settings link

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12257

* fix: 🐛 route

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12257

* fix: 🐛 comment

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12257

* feat: 🎸 add reapply sp to session recording page

* fix: 🐛 normalize

* feat: 🎸 upates

* fix: 🐛 logs

* fix: 🐛 comment

* test: 💍 add tests

* fix: 🐛 normalizer, style

* fix: 🐛 normalize

* fix: 🐛 normalizw

* fix: 🐛 normalize

* test: 💍 add tests for serializer n normalizer

* fix: 🐛 name

* fix: 🐛 do not delete, send null

* fix: 🐛 return

---------

Co-authored-by: Lisbet Alvarez <lisbet.alvarez@hashicorp.com>
2024-01-17 14:37:54 -05:00
Lisbet Alvarez 9e0467cbf0 refactor: 💡 add global settings link (#2093)
refactor: 💡 add global settings link (#2093)
2024-01-17 08:37:09 -08:00
Devon Anderson c48fdb2017 refactor: 💡 Migrate worker detail view table to Hds::Table (#2081)
* refactor: 💡 Migrate `worker` detail view table to `Hds::Table`

Migrate `worker` detail view for `config_tags` table to `Hds::Table`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11720

* refactor: 💡 fix lint errors

fix lint errors

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11720

* refactor: 💡 quick clean up of specificity for worker detail
view

Quick refactor and clean up of specificity for worker detail view

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11720

* refactor: 💡 include styles in `.list-wrapper-field` selector

Include styles in `.list-wrapper-field` selector

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11720
2024-01-17 09:34:08 -05:00
hashicorp-copywrite[bot]andCarlos Alcaide Corvo 60c5e25902 [COMPLIANCE] Add Copyright and License Headers (#2094)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
Co-authored-by: Carlos Alcaide Corvo <ccorvo@hashicorp.com>
2024-01-16 11:14:56 -08:00
Cameron Perera 1488bdf95e Icu 12027 let the user know if the dc isnt compatible with the controller and link them to the previous version (#2073)
* chore: 🤖 allow use of hashicorp release endpoints in desktop

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12027

* refactor: 💡 use page_size to bypass pagination in query adapter

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12027

* refactor: 💡 add list_token mirage scopes list response

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12027

* feat: 🎸 add logic for unsupported controllers

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12027

* refactor: 💡 add comment to application adapter change

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12027

* refactor: 💡 rename scopes controller method

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12027

* refactor: 💡 remove scopes controller

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12027

* refactor: 💡 use beforeModel and setupController hook for scopes

along with converting scopes model back to original state

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12027

* refactor: 💡 remove styling to hide modal dismiss button

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12027

* refactor: 💡 update comment for opening external links

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12027

* refactor: 💡 revert model hook changes for scopes

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12027

* test: 💍 remove target connect test from scopes acceptance tests

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12027

* test: 💍 add tests for unsupported controller logic

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12027

* test: 💍 update modal test to waitFor elements to render

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12027

* refactor: 💡 remove use of set and get from scopes router

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12027

* refactor: 💡 default isPaginationSupported to false

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12027

* test: 💍 remove unsupported controller tests

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12027

* test: 💍 add tests back but skip them

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12027

* test: 💍 fix failing tests

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12027
2024-01-16 10:17:47 -05:00
Lisbet AlvarezandZhihe Li 9e6d647949 Icu 12137 add additional session sorting and add default filters (#2084)
* chore: 🤖 add additional session sorting and add default filters

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12137

* test: 💍 fix test

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12137

* Update ui/desktop/app/controllers/scopes/scope/projects/sessions/index.js

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>

---------

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
2024-01-16 10:17:46 -05:00
Zhihe Li 2e36d3c3e2 feat: 🎸 Add fallback if client daemon is down or errors (#2085)
* feat: 🎸 Add fallback if client daemon is down or errors
* test: 💍 Add tests for client daemon being down

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12026
2024-01-16 10:17:46 -05:00
Cameron Perera 9046c01238 feat: 🎸 target list will update according to org scope selected (#2083)
* feat: 🎸 target list will update according to org scope selected

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12205

* refactor: 💡 add comment to resetController logic

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12205

* feat: 🎸 filter sessions by org selected at global level

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12205
2024-01-16 10:17:46 -05:00
Zhihe Li ba0c7d5683 feat: 🎸 Add loading indicators for initial loads of resources (#2074)
* feat: 🎸 Add loading indicators for initial loads of resources

* refactor: 💡 Use HDS application state component

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12025
2024-01-16 10:17:46 -05:00
Zhihe Li 16a054519f fix: 🐛 Fix display of no results from type filter (#2075) 2024-01-16 10:17:46 -05:00
Lisbet Alvarez a1fbfdc1ad Icu 11804 filter targets by type (#2063)
* feat: 🎸 filter targets by type

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11804

* refactor: 💡 remove console.log

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11804

* docs: ✏️ fix comment typo

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11804
2024-01-16 10:17:46 -05:00
Lisbet Alvarez 21122f1f29 Icu-12125 cap the number of items rendered in dropdown component (#2060)
* perf: ⚡️ cap the number of items rendered in dropdown component

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12125
2024-01-16 10:17:46 -05:00
Cameron Perera a899ad0b74 refactor: 💡 uncomment on click handler for dropdown component (#2061)
* refactor: 💡 uncomment on click handler for dropdown component

* test: 💍 fix test
2024-01-16 10:17:46 -05:00
Lisbet Alvarez c7483e5602 feat: 🎸 filter sessions by status & scope (#2058)
* feat: 🎸 filter sessions by status

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12067
2024-01-16 10:17:46 -05:00
Cameron Perera 7fa2541ddb Icu 12069 clear current filters component for scopes filter (#2051)
* feat: 🎸 add filters applied tags under search/filter bar

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12069

* feat: 🎸 create Rose::FilterTags component

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12069

* refactor: 💡 use Rose::FilterTags component in targets list

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12069

* refactor: 💡 update FilterTags to handle multiple queryParams

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12069

* test: 💍 update dropdown component tests -  applyFilter

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12069

* feat: 🎸 create filter-tags component in core

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12069

* chore: 🤖 update core addon to export styles

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12069

* refactor: 💡 remove filter-tags component from rose addon

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12069

* chore: 🤖 update sass package version

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12069

* feat: 🎸 use FilterTags component in targets list screen

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12069

* refactor: 💡 reduce component complexity

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12069

* chore: 🤖 add sinon to core

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12069

* refactor: 💡 update how FilterTags displays filters

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12069

* refactor: 💡 trucate long tag names

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12069

* refactor: 💡 wrap FilterTags component in if this.filters

to fix issue of static text displaying before the dynamic tags

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12069

* refactor: 💡 address feedback

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12069
2024-01-16 10:17:46 -05:00
Lisbet AlvarezandZhihe Li 05553643a6 feat: 🎸 filter sessions by target (#2053)
* feat: 🎸 filter sessions by target

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12066

* docs: ✏️ add missing comment

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12066

* refactor: 💡 make action reusable

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12066

* refactor: 💡 remove unnecessary block

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12066

* refactor: 💡 fix tests, add hds app state

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12066

* perf: ⚡️ set limit of targets rendered in dropdown

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12066

* fix: 🐛 change from displayName to name

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12066

* Update addons/core/addon/components/dropdown/index.hbs

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>

* refactor: 💡 remove # from if statement and remove .slice

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12066

---------

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
2024-01-16 10:17:46 -05:00
Zhihe Li 47cf7995d3 feat: 🎸 Add active session filter (#2052)
* feat: 🎸 Add active session filter

* fix: 🐛 Fix tests and verify client daemon calls are correct

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11803
2024-01-16 10:17:46 -05:00
Lisbet AlvarezandZhihe Li c06d18940d Icu 11916 add flyout for session in prgoress field (#2042)
* feat: 🎸 sessions flyout for targets list view

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11916

---------

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
2024-01-16 10:17:46 -05:00
Zhihe Li 1122735b87 fix: 🐛 Fix returning mirage data from client daemon mock (#2050) 2024-01-16 10:17:46 -05:00
Cameron Perera 9fec047506 Icu 12060 move rose filterable dropdown to core (#2048)
* feat: 🎸 generate new dropdown component in core

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12060

* feat: 🎸 add template and class code to new dropdown component

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12060

* chore: 🤖 add lodash package to core addon

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12060

* test: 💍 add tests for core/dropdown component

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12060

* refactor: 💡 use new core/dropdown in targets list screen

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12060

* refactor: 💡 remove rose/filterabledropdown

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12060

* feat: 🎸 add maxHeight to core/dropdown component

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12060

* style: 💄 fix lint errors in dropdown/index-tests

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12060

* refactor: 💡 update height to match designs

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12060

* chore: 🤖 remove lodash from ui/admin

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12060

* chore: 🤖 remove lodash from ui/desktop

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12060

* chore: 🤖 move lodash to devDep in core

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12060

* chore: 🤖 add lodash as core dependency

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12060

* test: 💍 use waitUntil & findAll instead of setTimeout

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12060

* chore: 🤖 add lodash as peerDependency for core

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12060

* refactor: 💡 update waitUntil with suggestion from PR

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12060
2024-01-16 10:17:46 -05:00
Zhihe Li 916b261cdf refactor: 💡 Optimize the retrieval of targets for scopes filter (#2047) 2024-01-16 10:17:46 -05:00
Zhihe Li 15da4ea69f fix: 🐛 Fix failing tests from rebase onto main (#2045) 2024-01-16 10:17:46 -05:00
Lisbet Alvarez f801f595f7 Icu 11915 add session in progress field to the table and populate it (#2028)
* initial support for sessions in targets list view
2024-01-16 10:17:46 -05:00
Cameron Perera 7af8e71a2d Icu 11802 filter targets by project scope (#2022)
* feat: 🎸 add ability to filter targets by scope

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11802

* refactor: 💡 update model hook signature comment

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11802

* refactor: 💡 remove await from cancel session route transition

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11802

* refactor: 💡 add comments to new controller methods

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11802

* refactor: 💡 add options to query for all targets

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11802

* refactor: 💡 handle ESC key press for dropdown

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11802

* feat: 🎸 add searching within scope dropdown list

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11802

* refactor: 💡 set pushToStore to false for all target query

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11802

* refactor: 💡 handle scopes not having names

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11802

* refactor: 💡 move fetch allTargets to controller

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11802

* refactor: 💡 fix rebase conflicts

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11802

* test: 💍 fix test

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11802

* refactor: 💡 update allTargets query to have empty query

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11802

* refactor: 💡 change let to const

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11802

* refactor: 💡 add replace: true to scopes query param

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11802

* refactor: 💡 add allTargets fetch back to model hook

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11802

* refactor: 💡 change on search to on input to trigger action

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11802

* test: 💍 fix test by adding more target returns to stub

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11802

* feat: 🎸 create filterable-dropdown rose component

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11802

* feat: 🎸 finish Rose::FilterableDropdown component

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11802

* feat: 🎸 use FilterableDropdown in targets table

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11802

* refactor: 🤖 move methods comment

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11802

* refactor: 💡 render Rose::FilterableDropdown correctly in test

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11802

* test: 💍 remove generated comments from tests

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11802

* refactor: 💡 improve readability of itemOptions getter

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11802

* refactor: 💡 change block parameters to uppercase

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11802

* test: 💍 skip generated tests until adding more

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11802
2024-01-16 10:17:46 -05:00
Zhihe Li 15d815c271 feat: 🎸 Add pagination component to targets (#2023)
* feat: 🎸 Add pagination component to targets
* test: 💍 Fix tests and add helper for client daemon search
* refactor: 💡 Update the returns from client daemon

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11905
2024-01-16 10:17:45 -05:00
Zhihe Li dfd484dbca fix: 🐛 Add support for not equals in MQL expression parsing (#2029) 2024-01-16 10:17:45 -05:00
Zhihe Li 50e4a2adbc feat: 🎸 Do not stop client daemon if it was already started (#2021)
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11932
2024-01-16 10:17:45 -05:00
Zhihe Li 7bc2ccb5ae refactor: 💡 Use a native class for the client daemon handler (#2026) 2024-01-16 10:17:45 -05:00
Zhihe Li 3f11019ef0 feat: 🎸 Add pagination support to client daemon handler (#2016)
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11743
2024-01-16 10:17:45 -05:00
Zhihe Li 1135f88cb7 feat: 🎸 Add debouncing for the search bar (#2008)
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11851
2024-01-16 10:17:45 -05:00
221ab1f7bd Icu 11748 add free search for targets (#1995)
* refactor: 💡 fix how we access socket_address from status call

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11748

* feat: 🎸 add free search capability to targets list

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11748

* test: 💍 update test asserts to look for hds appl state title

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11748

* refactor: 💡 remove filtering for yes, no, & narrow-results

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11748

* refactor: 💡 add aria-label to dropdown search input

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11748

* refactor: 💡 add to handleInput signature comment

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11748

* refactor: 💡 move buildQuery to client daemon handler

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11748

* refactor: 💡 Add new parser for MQL expressions

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11748

* refactor: 💡 use queryParams for searching

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11748

* fix: 🐛 Fix some MQL expressions not being properly filtered

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11748

* style: 💄 update handleSearchInput comment signature

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11748

* Update addons/api/addon/utils/mqlQuery.js

Co-authored-by: Lisbet Alvarez <107949262+lisbet-alvarez@users.noreply.github.com>

---------

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
Co-authored-by: Lisbet Alvarez <107949262+lisbet-alvarez@users.noreply.github.com>
2024-01-16 10:17:45 -05:00
Zhihe Li 4bf1a88764 feat: 🎸 Add handler to make search requests to client daemon (#1989)
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11691
2024-01-16 10:17:45 -05:00
Zhihe Li b8b970ce4d feat: 🎸 Add initial setup for client daemon integration (#1987)
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11702
2024-01-16 10:17:45 -05:00
dharini 25c6ed6100 chore: 🤖 fieldname update 2024-01-16 10:17:45 -05:00
Lisbet AlvarezandZhihe Li 550dee9ae0 Icu 11861 add sorting to session recording (#2005)
* refactor: 💡 add sorting to session recordings & sessions

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11861

* Update ui/admin/app/routes/scopes/scope/session-recordings.js

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>

---------

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
2024-01-16 10:17:45 -05:00
Lisbet Alvarez 776c46f129 refactor: 💡 replace store.findAll with store.query (#2002)
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11825
2024-01-16 10:17:45 -05:00
Lisbet Alvarez 6ae3067dd9 refactor: 💡 remove unnecessary sorting due to pagination change (#1996)
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11787
2024-01-16 10:17:45 -05:00
Dharini Jeeva 459029530b chore: 🤖 Add support for pagination in query method (#1991)
* chore: 🤖 Add support for pagination in query method
2024-01-16 10:17:45 -05:00
Zhihe Li 7dbd581a37 feat: 🎸 Add setup for api handlers 2024-01-16 10:17:45 -05:00
Devon Anderson 9bbd914a3a refactor: 💡 Added middle alignment to all Hds::Tables (#2088)
Added middle alignment using `@valign='middle'` to all `Hds::Tables`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12168
2024-01-15 10:23:32 -05:00
Dharini Jeeva 276713697a chore: 🤖 move overridable next to select (#2092)
* chore: 🤖 move overridable next to select

* fix: 🐛 lint
2024-01-12 17:20:30 -08:00
Dharini Jeeva ba786d2172 policy association form (#2089)
* feat: 🎸 add storage policy api and mirage
2024-01-12 15:01:16 -08:00
Dharini Jeeva ee4e19ace7 Add more options retain (#2090)
* chore: 🤖 add more options to rentention policy

* fix: 🐛 log

* fix: 🐛 exclude days
2024-01-12 14:33:36 -08:00
Dharini Jeeva eefb9eba4f feat: 🎸 scope policy association api changes (#2086)
scope policy association API changes
2024-01-12 11:29:19 -08:00
Dharini Jeeva 1cb3b708a2 feat: 🎸 create storage policy (#2079)
* feat: 🎸 add storage policy
2024-01-12 11:07:18 -08:00
Devon Anderson 8ad4e93ff7 refactor: 💡 Migrate workers-tags over to use Hds::Table (#2070)
* refactor: 💡 Migrate `workers-tags` over to use `Hds::Table`

Migrate `workers-tags` in `worker-create` form to use `Hds::Table`
instead of `Rose::Table`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11722

* refactor: 💡 Use `Form::Field::List::Wrapper` for table

Use `Form::Field::List::Wrapper` for table implementation.

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11722

* refactor: 💡 Refactored how `worker_tags` is used in `table`

Cleaned up how `worker_tags` is used in the `Form::Field::ListWrapper`
component

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11722

* refactor: 💡 removed `console.log`

removed console.log

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11722
2024-01-11 17:23:24 -05:00
Devon Anderson 9241b7dd0e refactor: 💡 Migrate hostslist within host-set to Hds::Table (#2049)
* refactor: 💡 Migrate `hosts`list within host-set to `Hds::Table`

Migrate `hosts` list within host-set to `Hds::Table` from `Rose::Table`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11728

* Update index.hbs

Not using `data-test` attribute for testing

* Update index.hbs

removed unused `data-test` selector

* refactor: 💡 quick lint error fix

Fix lint error in `hosts/index.hbs`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11728

* refactor: 💡 refactor test to use `data-test` selector

Refactored hosts-test to use `data-test` selectors for grabbing
`Hds::Dropdown` toggle and interactive instead of long nested selector.

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11728

* Update index.hbs

spelling fix

* Update hosts-test.js

fixed spelling errors

* refactor: 💡 fix lint errors

Fix lint errors

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11728

* refactor: 💡 Use `Hds::Code::Snippet`

Migrate from `Copyable` component to use `Hds::Code::Snippet`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11728

* refactor: 💡 refactor incorrect use of `Hds::Code::Snippet`

Refactor the incorrect usage of `Hds::Code::Snippet`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11728

* refactor: 💡 refactor header of `Hds::Table`

Refactor conditional header of `Hds::Table`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11728

* refactor: 💡 Refactored conditional header translations

Refactored conditional header translations to live in controller file
for `scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11728

* refactor: 💡 Move conditional check for header labels into `js`

Move conditional logic for checking header lables into `controller` file

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11728

* refactor: 💡 Quick refactor for columns getter

Quick refactor to clean up getter that conditionally renders column
header label based on `isStatic` boolean

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11728

* refactor: 💡 Refactor `host-sets/host-set/hosts` tablee

Refactor `host-sets/host-set/hosts` table to adhere more to codebase

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11728

* refactor: 💡 rearrange attributes order for table

Rearrange attributes order for `Hds::Table` to keep inline with codebase
patterns.

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11728
2024-01-11 16:49:47 -05:00
0beec7b8fe [COMPLIANCE] Add Copyright and License Headers (#2077)
* [COMPLIANCE] Add Copyright and License Headers

* style: 💄 fix linting error

---------

Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
Co-authored-by: Lisbet Alvarez <lisbet.alvarez@hashicorp.com>
2024-01-10 16:49:12 -08:00
dependabot[bot] 9bcaa6dc68 chore(deps): bump follow-redirects from 1.15.2 to 1.15.4 (#2082)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.2 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.2...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-10 14:39:48 -05:00
Dharini Jeeva 3f178363d9 chore: 🤖 add attach and detach storage policy permissions (#2080)
* chore: 🤖 add attach and detach storage policy permissions
2024-01-09 11:39:28 -08:00
Devon Anderson 3810217ce7 refactor: 💡 Migrate credential-libraries-list to Hds::Table (#2067)
* refactor: 💡 Migrate `credential-libraries-list` to `Hds::Table`

Migrate `credential-libraries-list` to `Hds::Table` instead of
`Rose::Table`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11724

* refactor: 💡 Fix broken test for navigating to `credentials-libraries`

Fix broken test for navigating to `credentials-libraries`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11724
2024-01-09 10:27:44 -05:00
Dharini Jeeva b79eebf73a feat: storage policies list view (#2071)
policies list view
2024-01-08 15:12:49 -08:00
Zhihe Li b3abb658ab chore: 🤖 Fix breaking change in labeler when upgrading to v5 (#2078) 2024-01-08 15:06:46 -05:00
hashicorp-tsccr[bot]andhashicorp-tsccr[bot] 245cfb395e Result of tsccr-helper -log-level=info gha update -latest . (#2065)
Co-authored-by: hashicorp-tsccr[bot] <hashicorp-tsccr[bot]@users.noreply.github.com>
2024-01-08 14:10:13 -05:00
Devon Anderson adfa118ae5 refactor: 💡 Migrate credentials-list to Hds::Table (#2059)
* refactor: 💡 Migrate `credentials-list` to `Hds::Table`

Migrate `credentials-list` to `Hds::Table`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11725

* refactor: 💡 Refactor table to use `B.data`

Originally the Proxy(Array) was not being taking in as a correct model
object when using the `@columns` synthax, now it seems to work perfectly
fine.

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11725
2024-01-05 12:23:46 -05:00
Devon Anderson cf0f4ab56a refactor: 💡 Refactor credential-stores-list to use Hds (#2066)
Refactor `credential-stores-list` to use `Hds::Tables`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11723
2024-01-05 11:18:22 -05:00
Dharini Jeeva f40878034d fix: 🐛 transform (#2069)
* fix: 🐛 transform

* fix: 🐛 return null if undefined

* fix: 🐛 return null if no object
2024-01-03 17:37:14 -08:00
Dharini Jeeva 01a986e08b chore: 🤖 new routes for storage policy (#2056)
chore: 🤖 new routes for storage policy (#2056)
2024-01-03 12:05:23 -08:00
Dharini Jeeva e3406d9a95 feat: storage policy API and mirage changes (#2054)
* feat: 🎸 add storage policy API and mirage
2024-01-03 11:52:17 -08:00
Devon Anderson d4adbe4317 refactor: 💡 Migrate host-catalogs list to Hds::Table (#2055)
* refactor: 💡 Migrate host-catalogs list to `Hds::Table`

Migrated host-catalogs list to use `Hds::Table` instead of `Rose::Table`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11726

* refactor: 💡 use `Hds::Text` component

Use `Hds::Text::Code` component for `code` element.

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11726

* refactor: 💡 Use `Hds::Text` and `Hds::Code::Snippet`

Refactor element to use `Hds`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11726

* refactor: 💡 refactor incorrect usage of `Hds::Code::Snippet`

Refactor incorrect usage of `Hds::Code::Snippet`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11726
2024-01-02 12:02:26 -05:00
Devon Anderson 01d4a329ab refactor: 💡 Migrate host-sets-list in host catalog to Hds (#2057)
* refactor: 💡 Migrate host-sets-list in host catalog to `Hds`

Migrate `host-catalog` `host-sets` list to use `Hds::Table`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11727

* refactor: 💡 refactor incorrect use of `Hds::Code::Snippet`

Revactor incorrect use of `Hds::Code::Snippet`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11727

* Update index.hbs

color for text should be `secondary`

* Update index.hbs

lint error

* refactor: 💡 quick lint fix

quick lint fix

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11727
2024-01-02 10:15:19 -05:00
Michael Li 659067dd08 test(admin/e2e): Add tags to tests (#2046) 2023-12-20 15:06:38 -05:00
Devon AndersonandCameron Perera ade1601d8d refactor: 💡 Refactor sessions-list to use Hds::Table (#2043)
* refactor: 💡 Refactor `sessions-list` to use `Hds::Table`

Refactor `sessions-list` to use `Hds::Table` instead of `Rose::table`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11732

* refactor: 💡 Use `Hds::Text` component for `code` elements

Refactor `code` elements to use `Hds::Text::Code` component for text.

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11732

* Update ui/admin/app/templates/scopes/scope/sessions/index.hbs

Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>

* refactor: 💡 Refactor the condition around the `cancelSession`
 route-action, to use the `SessionAbility` for permssion to cancel
 session. Upgrade `Rose::Button` to `Hds::Button`.

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11732

---------

Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>
2023-12-14 17:27:09 -05:00
Devon Anderson 4550cd0965 refactor: 💡 Migrate host-catalog/host-list to use Hds (#2044)
* refactor: 💡 Migrate `host-catalog/host-list` to use `Hds`

Migrate `host-catalog/host-list` to use `Hds::Table`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11729

* refactor: 💡 `Hds::Text` refactor

Refactored `code` and `p` tag elements to use new `HDS::Text` elements

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11729
2023-12-14 14:48:10 -05:00
Devon Anderson 0bbc33d073 refactor: 💡 Refactor targets-list to use Hds (#2041)
Migrate `targets-list` from `Rose::Table` to `Hds::Table`.

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11733
2023-12-13 10:28:32 -05:00
Devon Anderson 69a4eb53b9 refactor: 💡 Refactor workers list to use Hds::Table (#2038)
* refactor: 💡 Refactor workers list to use `Hds::Table`

Refactor workers list to use `Hds::Table` instead of `Rose`.

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11734

* Refactored `workers-list` table to use `margin-top` custom css instead
of removing the background from `Rose::Toolbar`
2023-12-12 14:52:31 -05:00
Dharini Jeeva d06111c803 fix: 🐛 target cred sources association (#2040) 2023-12-11 16:32:58 -08:00
Carlos Alcaide Corvo b51c8203ee chore: 🤖 Upgrade eslint-plugin-qunit (#2011)
* chore: 🤖 Upgrade eslint-plugin-qunit

* Delete unnecessary assert.expect from tests
2023-12-08 12:56:00 -08:00
Carlos Alcaide Corvo a94572214c chore: 🤖 Refactor main element padding (#2030)
* chore: 🤖 Refactor main element padding

Refactor main element padding to achieve consistency within all our
UI's. This is a quick solution until we adopt app-frame and follow the
same layouting pattern within all our UI's

✅ Closes: ICU-11960

* Delete unnecessasry @use size
2023-12-08 12:31:13 -08:00
Dharini Jeeva 751b5bef78 chore: 🤖 add skip prompts toggle (#2036)
* chore: 🤖 add skip prompts toggle
2023-12-08 09:17:36 -08:00
Kristin BradleyandDharini Jeeva 77f8235ebf Replace Rose::CodeEditor with Hds::CodeBlock within Desktop client (HDS-2827) (#2020)
* HDS-2827 Replace Rose::CodeEditor with Hds::CodeBlock on Create New Worker page

* HDS-2827 Replace Rose::CodeEditor with Hds::CodeBlock in credentials panel

* HDS-2827 Remove un-needed getters, fix formatting errors

* HDS-2827 Revert instances of Hds::CodeBlock added to create workers page

* HDS-2827 Fix failing test

* Apply suggestions from code review

* HDS-2827 Delete old unused css

* HDS-2827 Delete old css

---------

Co-authored-by: Dharini Jeeva <dharini@hashicorp.com>
2023-12-08 12:03:47 -05:00
9782f7e243 feat: 🎸 Implement time-remaining helper into desktop UI (#2018)
* feat: 🎸 implement helper

Implement `time-remainig` helper to display duration of a session for
desktop app.

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-10487

* refactor: 💡 Refactored scenarios

Refactored `ipc.js` scenario to include `expiration_time` for a new
session.

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-10487

* fix: 🐛 Fix add expiration_time when user has no grants to read (#2024)

* refactor: 💡 refactor styles

Removed `div` and added `Hds::Badge` to `h1` element.  Condensed and
renamed styling for title to `session-details-info`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-10487

* Refactored `projects/targets` controller to return the correct `expiration_time` field returned from CLI.  Cleaned up CSS for `session-details-info` attribute and wrapped `@model.displayname` in span tag.

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-10487

* Update ui/desktop/app/controllers/scopes/scope/projects/targets/index.js

mixed naming expiration field on payload to store

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>

* refactor: 💡 refactored page header

Refactored `sessions` header to use `<Hds::Text::Dislpay/>` instead of a
span.

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-10487

* refactor: 💡 refactor cli response

Refactor `expiration` field from CLI response to be the correct
definition

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-10487

* refactor: 💡 refactor sessions layout

Removed span as parent of header information, and pushed styles to
yielded page.header. Fixed stub in test

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-10487

---------

Co-authored-by: Carlos Alcaide Corvo <ccorvo@hashicorp.com>
Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
2023-12-07 16:01:57 -05:00
Michael Li 6328cc1fcf test(admin/e2e): Update tests to account for changes in 0.14.3 (#2033)
* test(admin/e2e): Modify password locators due to new Show Password button

* test(admin/e2e): Update breadcrumbs locators due to design updates

Previously, all breadcrumb items were links, but that is no longer the case for the active breadcrumb.
2023-12-07 11:42:04 -05:00
Dharini Jeeva b986064447 fix: 🐛 name (#2035) 2023-12-07 08:14:09 -08:00
Dharini Jeeva 6fbf243c31 fix: 🐛 oidc account id (#2034) 2023-12-06 16:10:44 -08:00
Carlos Alcaide Corvo 66eca93f56 chore: 🤖 Upgrade electron-forge (#2031)
Upgrade electron-forge to the latest version
2023-12-05 14:11:02 -08:00
45d706dd40 Result of tsccr-helper -log-level=info -pin-all-workflows . (#2025)
Co-authored-by: hashicorp-tsccr[bot] <hashicorp-tsccr[bot]@users.noreply.github.com>
Co-authored-by: Dharini Jeeva <dharini@hashicorp.com>
Co-authored-by: Carlos Alcaide Corvo <ccorvo@hashicorp.com>
2023-12-04 15:06:17 -08:00
Carlos Alcaide Corvo 99cf4c8d81 chore: 🤖 Update DC main element padding (#2009)
Update Desktop Client main element padding to look like app-frame HDS implementation within cloud-ui.

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-10497
2023-12-04 14:06:45 -08:00
Carlos Alcaide Corvo 49923d968e chore: 🤖 Upgrade browserslist (#2019) 2023-12-04 10:44:58 -08:00
hashicorp-copywrite[bot] b4a83a46d1 [COMPLIANCE] Add Copyright and License Headers (#2027)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2023-12-04 09:13:32 -08:00
Kristin Bradleyanddharini 238ced63f7 HDS-2827 Bump HDS to latest version (#2017)
* HDS-2827 Bump HDS to latest version

* HDS-2827 Bump up to latest version

* chore: 🤖 yarn lock

---------

Co-authored-by: dharini <dharini@hashicorp.com>
2023-11-30 13:02:08 -05:00
dependabot[bot]andDharini Jeeva 602e4e62c3 chore(deps): bump semver from 5.7.1 to 5.7.2 (#2014)
Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dharini Jeeva <dharini@hashicorp.com>
2023-11-28 18:13:08 -08:00
Devon Anderson f282dbb5b1 feat: 🎸 Create time-remaining helper (#2012)
* feat: 🎸 create helper

Create `time-remaining` helper to track remaining session time.

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-10519

* refactor: 💡 Clean up code for time-remaining helper

Moved time remaining helper into `core` addons folder. Cleaned up the
`time-remaining` helper to use the `DurationUnitFormat` service.

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-10519

* Update session.hbs

removed test implementation

* refactor: 💡 files added for helper

files added for helper

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-10519

* Update session.hbs

fix linting

* refactor: 💡 fix uneeded spacing

Fix spacing on hbs file used for testing time-remaining helper

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-10519

* refactor: 💡 refactor time-remaining helper

Cleaned up code that was returning a string if `differenceInSeconds` was
less than or equal to zero. Code is now conditionally checking in the
`differenceInSeconds` variable if the `difference` is greater than zero.
If it is not then it will return zero and let the `DurationUnitFormat`
handle the rest.

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-10519

* refactor: 💡 fix failing test

Fix failing `time-remaining` test

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-10519
2023-11-28 17:42:22 -05:00
Dharini Jeeva 3f2f2ba756 feat: 🎸 Allow prompts in oidc auth method form (#2007)
* feat: 🎸 Allow prompts in OIDC auth method form
2023-11-28 11:59:16 -08:00
Carlos Alcaide Corvo 02a89bd7ba Chore upgrade eslint and deps (#2010)
* chore: 🤖 Upgrade eslint 

* chore: 🤖 Upgrade eslint-config-prettier

* chore: 🤖 Upgrade eslint-plugin-ember 

* chore: 🤖 Upgrade eslint-plugin-n
2023-11-27 15:31:39 -08:00
Kristin Bradley a891f7a1a5 Boundary: Delete RoseFooter files (HDS-2805) (#2003)
* HDS-2805 Delete RoseFooter files
2023-11-27 07:58:54 -08:00
Devon Anderson 019b3e7390 chore: 🤖 Update stylelint config dependency (#2000)
* chore: 🤖 Update dependency

Updated `styelint-config-standard-scss` to fix incorrect peer dependency
warning for `styelint`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11818

* Update _notify.scss

remove test for media query

* refactor: 💡 refactor media queries

Refactor all media queries to include `context` notation.

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11818
2023-11-22 15:42:24 -05:00
Zhihe Li bcf004b8a4 Reformat codebase with trailing commas in functions (#2006)
* style: 💄 Update trailing commas in API

* style: 💄 Update trailing commas in core

* style: 💄 Update trailing commas in rose

* style: 💄 Update trailing commas in admin

* style: 💄 Update trailing commas in desktop
2023-11-22 14:07:41 -05:00
Carlos Alcaide Corvo cb3a9e3bdc chore: 🤖 Add custom key handler for windows (#2001)
* chore: 🤖 Add custom key handler for windows

Add custom key handler only for Windows OS so we achieve Ctrl+C to copy
within the embedded terminal

* Await for clipboard promise to complete
2023-11-22 09:21:25 -08:00
Lisbet AlvarezandCarlos Alcaide Corvo 4127f6abd7 chore: 🤖 update test release trigger (#1978)
* chore: 🤖 add trigger for new workflow
---------

Co-authored-by: Carlos Alcaide Corvo <ccorvo@hashicorp.com>
2023-11-20 13:12:23 -08:00
hashicorp-copywrite[bot] 45a3cb8d34 [COMPLIANCE] Add Copyright and License Headers (#1999)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2023-11-20 08:41:36 -08:00
Kristin Bradley e96171cab0 Replace Rose::Footer with Hds::AppFooter component (HDS-2805) (#1994)
* HDS-2805 Replace Rose::Footer with Hds::AppFooter
2023-11-17 15:30:44 -08:00
Devon Anderson a7bf9a1071 fix: 🐛 testing upgrading ember-electron (#1997)
This is a test to see if upgrading ember-electron will fix issues with
`yarn start:desktop` build failures
2023-11-17 12:38:53 -05:00
Devon Anderson 3b3a00e1ee Upgrade desktop UI to Ember 4.12.2 (#1990)
* Upgrade desktop UI to Ember 4.12.2

* refactor: 💡 refactor scripts

Refactor concurrently scripts, and removed duplicate entries in
`eslintrc.js`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11747

* refactor: 💡 peer dependencies

Revert changes to `peerDependencies`.

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11747

* refactor: 💡 revert config back before upgrade

Revert `styelint-standard-config-scss` back to 6.0.0 so that it can be
put into seperate ticket.

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11747

* Update _notify.scss

fix misspelling

* refactor: 💡 revert dependency

Revert `stylelint-config-standard-scss` back to original version

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11747
2023-11-15 11:29:24 -05:00
Carlos Alcaide Corvo 222f0c35b8 Upgrade playwright within desktop as blocker to run node 18 within gh runners (#1993) 2023-11-10 17:10:26 -08:00
Zhihe Li 666491548d fix: 🐛 Fix broken hot reloading for desktop client (#1992) 2023-11-10 14:23:32 -05:00
Devon Anderson 2558ee1353 chore: 🤖 Upgrading to Ember 4.12.2 (#1988)
* chore: 🤖 Upgrading to Ember 4.12.2

Upgrading `admin/ui` to Ember 4.12.2

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11330

* refactor: 💡 Removed unused package

Removed unused `stylelint` package for `css`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11330

* refactor: 💡 removed unused dependency

Removed `stylelint-prettier` dependency

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11330
2023-11-10 11:21:52 -05:00
2212 changed files with 45227 additions and 18636 deletions

No files matched your search

+2 -2
View File
@@ -1,8 +1,8 @@
schema_version = 1
project {
license = "MPL-2.0"
copyright_year = 2020
license = "BUSL-1.1"
copyright_year = 2024
# (OPTIONAL) A list of globs that should not have copyright/license headers.
# Supports doublestar glob patterns for more flexibility in defining which
+1 -1
View File
@@ -1,5 +1,5 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
# SPDX-License-Identifier: BUSL-1.1
contact_links:
- name: Ask a question
+15 -8
View File
@@ -1,23 +1,30 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
# SPDX-License-Identifier: BUSL-1.1
addons:
- addons/**/*
- changed-files:
- any-glob-to-any-file: "addons/**/*"
api-addon:
- addons/api/**/*
- changed-files:
- any-glob-to-any-file: "addons/api/**/*"
auth-addon:
- addons/auth/**/*
- changed-files:
- any-glob-to-any-file: "addons/auth/**/*"
styles-addon:
- addons/rose/**/*
- changed-files:
- any-glob-to-any-file: "addons/rose/**/*"
ui:
- ui/**/*
- changed-files:
- any-glob-to-any-file: "ui/**/*"
admin:
- ui/admin/**/*
- changed-files:
- any-glob-to-any-file: "ui/admin/**/*"
desktop:
- ui/desktop/**/*
- changed-files:
- any-glob-to-any-file: "ui/desktop/**/*"
+6 -15
View File
@@ -1,24 +1,15 @@
:tickets: [Jira ticket](https://hashicorp.atlassian.net/browse/JIRA_TICKET_NUMBER)
## Description
# Description
<!-- Add a brief description of changes here -->
## Screenshots (if appropriate):
<!-- Uncomment line below to manually add link to JIRA ticket -->
<!-- :tickets: [Jira ticket](https://hashicorp.atlassian.net/browse/JIRA_TICKET_NUMBER) -->
## Screenshots (if appropriate)
## How to Test
<!-- Add steps to test this change. Include any other necessary relevant links -->
<!--
Replace PATH_TO_FEATURE with Vercel link
-->
:technologist: [Admin preview](PATH_TO_FEATURE)
:desktop_computer: [Desktop preview](PATH_TO_FEATURE)
## Checklist:
## Checklist
<!-- strikethrough the checklist item that is not relevant to your change -->
- [ ] I have added before and after screenshots for UI changes
+1 -1
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
# SPDX-License-Identifier: BUSL-1.1
set -euo pipefail
+20 -20
View File
@@ -11,25 +11,25 @@ jobs:
name: Install dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
id: node-modules-cache
with:
path: "**/node_modules"
key: node-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
node-modules-
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 16
node-version: 20
- run: yarn install
build-admin-ui-oss:
name: Build Admin UI OSS
needs: [dependencies]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
id: node-modules-cache
with:
path: "**/node_modules"
@@ -37,17 +37,17 @@ jobs:
restore-keys: |
node-modules-
- name: Build
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 16
node-version: 20
- run: yarn run build:ui:admin:oss
- name: Upload artifact admin-ui
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: admin-ui
path: ./ui/admin/dist/
- name: Upload artifact OSS admin UI
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: admin-ui-oss
path: ./ui/admin/dist/
@@ -56,8 +56,8 @@ jobs:
needs: [dependencies]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
id: node-modules-cache
with:
path: "**/node_modules"
@@ -65,12 +65,12 @@ jobs:
restore-keys: |
node-modules-
- name: Build
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 16
node-version: 20
- run: yarn run build:ui:admin:enterprise
- name: Upload artifact enterprise admin UI
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: admin-ui-ent
path: ./ui/admin/dist/
@@ -79,8 +79,8 @@ jobs:
needs: [dependencies]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
id: node-modules-cache
with:
path: "**/node_modules"
@@ -88,12 +88,12 @@ jobs:
restore-keys: |
node-modules-
- name: Build
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 16
node-version: 20
- run: yarn run build:ui:admin:hcp
- name: Upload artifact HCP admin UI
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: admin-ui-hcp
path: ./ui/admin/dist/
@@ -0,0 +1,34 @@
name: "Trigger Build Artifacts for Testing"
on:
workflow_dispatch:
inputs:
branch:
description: Please use tag-like format n.n.n-someword (1.111.11-beta)
required: true
product_version:
required: true
type: string
description: The version number belonging to the oss binary to be used
commit:
required: true
type: string
description: The git SHA of the oss artifacts to be used
jobs:
trigger-gha-build-artifacts-for-testing:
runs-on: ubuntu-latest
steps:
- name: Release description
if: github.event_name == 'workflow_dispatch'
run: |
echo "Triggering Build Artifacts for Testing using BRANCH and TEST_TAG ${{ github.event.inputs.branch }}"
- name: Trigger Build Artifacts for Testing in boundary-ui-releases
run: |
export GITHUB_TOKEN="${{ secrets.ELEVATED_GITHUB_TOKEN }}"
gh workflow run build-artifacts-for-testing.yml \
--repo hashicorp/boundary-ui-releases \
--ref main \
-f TAG="${{ inputs.branch }}" \
-f PRODUCT_VERSION="${{ inputs.product_version }}" \
-f COMMIT="${{ inputs.commit }}" \
+3 -3
View File
@@ -30,11 +30,11 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@bad341350a2f5616f9e048e51360cedc49181ce8 # codeql-bundle-v2.15.1
uses: github/codeql-action/init@8f1a6fed33af5212fab8a999d004627ae8901d1b # codeql-bundle-v2.17.5
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -54,4 +54,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@bad341350a2f5616f9e048e51360cedc49181ce8 # codeql-bundle-v2.15.1
uses: github/codeql-action/analyze@8f1a6fed33af5212fab8a999d004627ae8901d1b # codeql-bundle-v2.17.5
+10
View File
@@ -0,0 +1,10 @@
name: Check Copyright Headers
on: pull_request
jobs:
copywrite:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: hashicorp/setup-copywrite@32638da2d4e81d56a0764aa1547882fc4d209636 # v1.1.3
- name: Check Header Compliance
run: copywrite headers --plan
+39 -20
View File
@@ -29,13 +29,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.JIRA_SYNC_GITHUB_TOKEN }}
- name: Login
uses: atlassian/gajira-login@45fd029b9f1d6d8926c6f04175aa80c0e42c9026 # v3.0.1
env:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
- name: Set ticket type
if: github.event.action == 'opened' && !steps.boundary-team-role.outputs.role
id: set-ticket-type
@@ -49,6 +42,10 @@ jobs:
- name: Create ticket
if: github.event.action == 'opened' && !steps.boundary-team-role.outputs.role
uses: tomhjp/gh-action-jira-create@3ed1789cad3521292e591a7cfa703215ec1348bf # v0.2.1
env:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
with:
project: ICU
issuetype: "GH Issue"
@@ -62,27 +59,49 @@ jobs:
if: github.event.action != 'opened'
id: search
uses: tomhjp/gh-action-jira-search@04700b457f317c3e341ce90da5a3ff4ce058f2fa # v0.2.2
env:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
with:
# cf[10089] is Issue Link custom field
jql: 'issuetype = "GH Issue" and cf[10089]="${{ github.event.issue.html_url || github.event.pull_request.html_url }}"'
- name: Sync comment
if: github.event.action == 'created' && steps.search.outputs.issue
uses: atlassian/gajira-comment@164913891625fe50e9836957902e0bf7d9ef99a8 # v3.0.1
uses: tomhjp/gh-action-jira-comment@6eb6b9ead70221916b6badd118c24535ed220bd9 # v0.2.0
env:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
with:
issue: ${{ steps.search.outputs.issue }}
comment: "${{ github.actor }} ${{ github.event.review.state || 'commented' }}:\n\n${{ github.event.comment.body || github.event.review.body }}\n\n${{ github.event.comment.html_url || github.event.review.html_url }}"
- name: Close ticket
if: (github.event.action == 'closed' || github.event.action == 'deleted') && steps.search.outputs.issue
uses: atlassian/gajira-transition@38fc9cd61b03d6a53dd35fcccda172fe04b36de3 # v3.0.1
with:
issue: ${{ steps.search.outputs.issue }}
transition: Done
- name: Transitions
id: transitions
if: steps.search.outputs.issue
run: |
if [[ "${{ github.event.action }}" == "closed" || "${{ github.event.action }}" == "deleted" ]]; then
echo "Closing ticket"
echo "name=Done" >> "$GITHUB_OUTPUT"
elif [[ "${{ github.event.action }}" == "reopened" ]]; then
echo "Reopening ticket"
echo "name=Reopen" >> "$GITHUB_OUTPUT"
fi
- name: Reopen ticket
if: github.event.action == 'reopened' && steps.search.outputs.issue
uses: atlassian/gajira-transition@38fc9cd61b03d6a53dd35fcccda172fe04b36de3 # v3.0.1
with:
issue: ${{ steps.search.outputs.issue }}
transition: "To Do"
# Transition issue API reference: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-transitions-post
- name: Transition ticket
if: steps.transitions.outputs.name
run: |
transitions="$(curl --silent \
--url "${{ secrets.JIRA_BASE_URL }}rest/api/3/issue/${{ steps.search.outputs.issue }}/transitions" \
--user "${{ secrets.JIRA_USER_EMAIL }}:${{ secrets.JIRA_API_TOKEN }}" \
--header "Accept: application/json")"
id="$(echo "${transitions}" | jq -r '.transitions[] | select(.name == "${{ steps.transitions.outputs.name }}") | .id')"
curl --silent \
--url "${{ secrets.JIRA_BASE_URL }}rest/api/3/issue/${{ steps.search.outputs.issue }}/transitions" \
--user "${{ secrets.JIRA_USER_EMAIL }}:${{ secrets.JIRA_API_TOKEN }}" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data "$(printf '{"transition": {"id": "%s"}}' "${id}")"
+1 -1
View File
@@ -6,6 +6,6 @@ jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@ac9175f8a1f3625fd0d4fb234536d26811351594 # v4.3.0
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
+16 -16
View File
@@ -6,17 +6,17 @@ jobs:
name: Install dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
id: node-modules-cache
with:
path: '**/node_modules'
key: node-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
node-modules-
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 16
node-version: 20
- run: yarn install
compliance:
@@ -24,17 +24,17 @@ jobs:
needs: [dependencies]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
id: node-modules-cache
with:
path: '**/node_modules'
key: node-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
node-modules-
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 16
node-version: 20
- run: yarn run compliance:licenses
lint:
@@ -43,17 +43,17 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
id: node-modules-cache
with:
path: '**/node_modules'
key: node-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
node-modules-
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 16
node-version: 20
- run: yarn lint
test:
@@ -62,13 +62,13 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
id: node-modules-cache
with:
path: '**/node_modules'
key: node-modules-${{ hashFiles('**/yarn.lock') }}
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 16
node-version: 20
- run: yarn test
+1 -1
View File
@@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
- run: |
+1 -1
View File
@@ -9,7 +9,7 @@ jobs:
trigger-gha-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Release description
run: |
echo "Triggering release with a TAG ${GITHUB_REF#refs/tags/}"
+19
View File
@@ -21,3 +21,22 @@ npm-debug.log*
testem.log
yarn-error.log
.watchman-cookie*
### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets
# Local History for Visual Studio Code
.history/
# Built Visual Studio Code Extensions
*.vsix
### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide
+1 -1
View File
@@ -1,5 +1,5 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
# SPDX-License-Identifier: BUSL-1.1
url_license = "https://github.com/hashicorp/boundary-ui/blob/main/LICENSE"
url_project_website = "https://learn.hashicorp.com/tutorials/boundary/getting-started-desktop-app"
+91 -364
View File
@@ -1,364 +1,91 @@
Copyright (c) 2020 HashiCorp, Inc.
Mozilla Public License, version 2.0
1. Definitions
1.1. "Contributor"
means each individual or legal entity that creates, contributes to the
creation of, or owns Covered Software.
1.2. "Contributor Version"
means the combination of the Contributions of others (if any) used by a
Contributor and that particular Contributor's Contribution.
1.3. "Contribution"
means Covered Software of a particular Contributor.
1.4. "Covered Software"
means Source Code Form to which the initial Contributor has attached the
notice in Exhibit A, the Executable Form of such Source Code Form, and
Modifications of such Source Code Form, in each case including portions
thereof.
1.5. "Incompatible With Secondary Licenses"
means
a. that the initial Contributor has attached the notice described in
Exhibit B to the Covered Software; or
b. that the Covered Software was made available under the terms of
version 1.1 or earlier of the License, but not also under the terms of
a Secondary License.
1.6. "Executable Form"
means any form of the work other than Source Code Form.
1.7. "Larger Work"
means a work that combines Covered Software with other material, in a
separate file or files, that is not Covered Software.
1.8. "License"
means this document.
1.9. "Licensable"
means having the right to grant, to the maximum extent possible, whether
at the time of the initial grant or subsequently, any and all of the
rights conveyed by this License.
1.10. "Modifications"
means any of the following:
a. any file in Source Code Form that results from an addition to,
deletion from, or modification of the contents of Covered Software; or
b. any new file in Source Code Form that contains any Covered Software.
1.11. "Patent Claims" of a Contributor
means any patent claim(s), including without limitation, method,
process, and apparatus claims, in any patent Licensable by such
Contributor that would be infringed, but for the grant of the License,
by the making, using, selling, offering for sale, having made, import,
or transfer of either its Contributions or its Contributor Version.
1.12. "Secondary License"
means either the GNU General Public License, Version 2.0, the GNU Lesser
General Public License, Version 2.1, the GNU Affero General Public
License, Version 3.0, or any later versions of those licenses.
1.13. "Source Code Form"
means the form of the work preferred for making modifications.
1.14. "You" (or "Your")
means an individual or a legal entity exercising rights under this
License. For legal entities, "You" includes any entity that controls, is
controlled by, or is under common control with You. For purposes of this
definition, "control" means (a) the power, direct or indirect, to cause
the direction or management of such entity, whether by contract or
otherwise, or (b) ownership of more than fifty percent (50%) of the
outstanding shares or beneficial ownership of such entity.
2. License Grants and Conditions
2.1. Grants
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license:
a. under intellectual property rights (other than patent or trademark)
Licensable by such Contributor to use, reproduce, make available,
modify, display, perform, distribute, and otherwise exploit its
Contributions, either on an unmodified basis, with Modifications, or
as part of a Larger Work; and
b. under Patent Claims of such Contributor to make, use, sell, offer for
sale, have made, import, and otherwise transfer either its
Contributions or its Contributor Version.
2.2. Effective Date
The licenses granted in Section 2.1 with respect to any Contribution
become effective for each Contribution on the date the Contributor first
distributes such Contribution.
2.3. Limitations on Grant Scope
The licenses granted in this Section 2 are the only rights granted under
this License. No additional rights or licenses will be implied from the
distribution or licensing of Covered Software under this License.
Notwithstanding Section 2.1(b) above, no patent license is granted by a
Contributor:
a. for any code that a Contributor has removed from Covered Software; or
b. for infringements caused by: (i) Your and any other third party's
modifications of Covered Software, or (ii) the combination of its
Contributions with other software (except as part of its Contributor
Version); or
c. under Patent Claims infringed by Covered Software in the absence of
its Contributions.
This License does not grant any rights in the trademarks, service marks,
or logos of any Contributor (except as may be necessary to comply with
the notice requirements in Section 3.4).
2.4. Subsequent Licenses
No Contributor makes additional grants as a result of Your choice to
distribute the Covered Software under a subsequent version of this
License (see Section 10.2) or under the terms of a Secondary License (if
permitted under the terms of Section 3.3).
2.5. Representation
Each Contributor represents that the Contributor believes its
Contributions are its original creation(s) or it has sufficient rights to
grant the rights to its Contributions conveyed by this License.
2.6. Fair Use
This License is not intended to limit any rights You have under
applicable copyright doctrines of fair use, fair dealing, or other
equivalents.
2.7. Conditions
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in
Section 2.1.
3. Responsibilities
3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including any
Modifications that You create or to which You contribute, must be under
the terms of this License. You must inform recipients that the Source
Code Form of the Covered Software is governed by the terms of this
License, and how they can obtain a copy of this License. You may not
attempt to alter or restrict the recipients' rights in the Source Code
Form.
3.2. Distribution of Executable Form
If You distribute Covered Software in Executable Form then:
a. such Covered Software must also be made available in Source Code Form,
as described in Section 3.1, and You must inform recipients of the
Executable Form how they can obtain a copy of such Source Code Form by
reasonable means in a timely manner, at a charge no more than the cost
of distribution to the recipient; and
b. You may distribute such Executable Form under the terms of this
License, or sublicense it under different terms, provided that the
license for the Executable Form does not attempt to limit or alter the
recipients' rights in the Source Code Form under this License.
3.3. Distribution of a Larger Work
You may create and distribute a Larger Work under terms of Your choice,
provided that You also comply with the requirements of this License for
the Covered Software. If the Larger Work is a combination of Covered
Software with a work governed by one or more Secondary Licenses, and the
Covered Software is not Incompatible With Secondary Licenses, this
License permits You to additionally distribute such Covered Software
under the terms of such Secondary License(s), so that the recipient of
the Larger Work may, at their option, further distribute the Covered
Software under the terms of either this License or such Secondary
License(s).
3.4. Notices
You may not remove or alter the substance of any license notices
(including copyright notices, patent notices, disclaimers of warranty, or
limitations of liability) contained within the Source Code Form of the
Covered Software, except that You may alter any license notices to the
extent required to remedy known factual inaccuracies.
3.5. Application of Additional Terms
You may choose to offer, and to charge a fee for, warranty, support,
indemnity or liability obligations to one or more recipients of Covered
Software. However, You may do so only on Your own behalf, and not on
behalf of any Contributor. You must make it absolutely clear that any
such warranty, support, indemnity, or liability obligation is offered by
You alone, and You hereby agree to indemnify every Contributor for any
liability incurred by such Contributor as a result of warranty, support,
indemnity or liability terms You offer. You may include additional
disclaimers of warranty and limitations of liability specific to any
jurisdiction.
4. Inability to Comply Due to Statute or Regulation
If it is impossible for You to comply with any of the terms of this License
with respect to some or all of the Covered Software due to statute,
judicial order, or regulation then You must: (a) comply with the terms of
this License to the maximum extent possible; and (b) describe the
limitations and the code they affect. Such description must be placed in a
text file included with all distributions of the Covered Software under
this License. Except to the extent prohibited by statute or regulation,
such description must be sufficiently detailed for a recipient of ordinary
skill to be able to understand it.
5. Termination
5.1. The rights granted under this License will terminate automatically if You
fail to comply with any of its terms. However, if You become compliant,
then the rights granted under this License from a particular Contributor
are reinstated (a) provisionally, unless and until such Contributor
explicitly and finally terminates Your grants, and (b) on an ongoing
basis, if such Contributor fails to notify You of the non-compliance by
some reasonable means prior to 60 days after You have come back into
compliance. Moreover, Your grants from a particular Contributor are
reinstated on an ongoing basis if such Contributor notifies You of the
non-compliance by some reasonable means, this is the first time You have
received notice of non-compliance with this License from such
Contributor, and You become compliant prior to 30 days after Your receipt
of the notice.
5.2. If You initiate litigation against any entity by asserting a patent
infringement claim (excluding declaratory judgment actions,
counter-claims, and cross-claims) alleging that a Contributor Version
directly or indirectly infringes any patent, then the rights granted to
You by any and all Contributors for the Covered Software under Section
2.1 of this License shall terminate.
5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user
license agreements (excluding distributors and resellers) which have been
validly granted by You or Your distributors under this License prior to
termination shall survive termination.
6. Disclaimer of Warranty
Covered Software is provided under this License on an "as is" basis,
without warranty of any kind, either expressed, implied, or statutory,
including, without limitation, warranties that the Covered Software is free
of defects, merchantable, fit for a particular purpose or non-infringing.
The entire risk as to the quality and performance of the Covered Software
is with You. Should any Covered Software prove defective in any respect,
You (not any Contributor) assume the cost of any necessary servicing,
repair, or correction. This disclaimer of warranty constitutes an essential
part of this License. No use of any Covered Software is authorized under
this License except under this disclaimer.
7. Limitation of Liability
Under no circumstances and under no legal theory, whether tort (including
negligence), contract, or otherwise, shall any Contributor, or anyone who
distributes Covered Software as permitted above, be liable to You for any
direct, indirect, special, incidental, or consequential damages of any
character including, without limitation, damages for lost profits, loss of
goodwill, work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses, even if such party shall have been
informed of the possibility of such damages. This limitation of liability
shall not apply to liability for death or personal injury resulting from
such party's negligence to the extent applicable law prohibits such
limitation. Some jurisdictions do not allow the exclusion or limitation of
incidental or consequential damages, so this exclusion and limitation may
not apply to You.
8. Litigation
Any litigation relating to this License may be brought only in the courts
of a jurisdiction where the defendant maintains its principal place of
business and such litigation shall be governed by laws of that
jurisdiction, without reference to its conflict-of-law provisions. Nothing
in this Section shall prevent a party's ability to bring cross-claims or
counter-claims.
9. Miscellaneous
This License represents the complete agreement concerning the subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. Any law or regulation which provides that
the language of a contract shall be construed against the drafter shall not
be used to construe this License against a Contributor.
10. Versions of the License
10.1. New Versions
Mozilla Foundation is the license steward. Except as provided in Section
10.3, no one other than the license steward has the right to modify or
publish new versions of this License. Each version will be given a
distinguishing version number.
10.2. Effect of New Versions
You may distribute the Covered Software under the terms of the version
of the License under which You originally received the Covered Software,
or under the terms of any subsequent version published by the license
steward.
10.3. Modified Versions
If you create software not governed by this License, and you want to
create a new license for such software, you may create and use a
modified version of this License if you rename the license and remove
any references to the name of the license steward (except to note that
such modified license differs from this License).
10.4. Distributing Source Code Form that is Incompatible With Secondary
Licenses If You choose to distribute Source Code Form that is
Incompatible With Secondary Licenses under the terms of this version of
the License, the notice described in Exhibit B of this License must be
attached.
Exhibit A - Source Code Form License Notice
This Source Code Form is subject to the
terms of the Mozilla Public License, v.
2.0. If a copy of the MPL was not
distributed with this file, You can
obtain one at
http://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular file,
then You may include the notice in a location (such as a LICENSE file in a
relevant directory) where a recipient would be likely to look for such a
notice.
You may add additional accurate notices of copyright ownership.
Exhibit B - "Incompatible With Secondary Licenses" Notice
This Source Code Form is "Incompatible
With Secondary Licenses", as defined by
the Mozilla Public License, v. 2.0.
License text copyright (c) 2020 MariaDB Corporation Ab, All Rights Reserved.
"Business Source License" is a trademark of MariaDB Corporation Ab.
Parameters
Licensor: HashiCorp, Inc.
Licensed Work: The Licensed Work is (c) 2024 HashiCorp, Inc.
Additional Use Grant: You may make production use of the Licensed Work, provided
Your use does not include offering the Licensed Work to third
parties on a hosted or embedded basis in order to compete with
HashiCorp's paid version(s) of the Licensed Work. For purposes
of this license:
A "competitive offering" is a Product that is offered to third
parties on a paid basis, including through paid support
arrangements, that significantly overlaps with the capabilities
of HashiCorp's paid version(s) of the Licensed Work. If Your
Product is not a competitive offering when You first make it
generally available, it will not become a competitive offering
later due to HashiCorp releasing a new version of the Licensed
Work with additional capabilities. In addition, Products that
are not provided on a paid basis are not competitive.
"Product" means software that is offered to end users to manage
in their own environments or offered as a service on a hosted
basis.
"Embedded" means including the source code or executable code
from the Licensed Work in a competitive offering. "Embedded"
also means packaging the competitive offering in such a way
that the Licensed Work must be accessed or downloaded for the
competitive offering to operate.
Hosting or using the Licensed Work(s) for internal purposes
within an organization is not considered a competitive
offering. HashiCorp considers your organization to include all
of your affiliates under common control.
For binding interpretive guidance on using HashiCorp products
under the Business Source License, please visit our FAQ.
(https://www.hashicorp.com/license-faq)
Change Date: Four years from the date the Licensed Work is published.
Change License: MPL 2.0
For information about alternative licensing arrangements for the Licensed Work,
please contact licensing@hashicorp.com.
Notice
Business Source License 1.1
Terms
The Licensor hereby grants you the right to copy, modify, create derivative
works, redistribute, and make non-production use of the Licensed Work. The
Licensor may make an Additional Use Grant, above, permitting limited production use.
Effective on the Change Date, or the fourth anniversary of the first publicly
available distribution of a specific version of the Licensed Work under this
License, whichever comes first, the Licensor hereby grants you rights under
the terms of the Change License, and the rights granted in the paragraph
above terminate.
If your use of the Licensed Work does not comply with the requirements
currently in effect as described in this License, you must purchase a
commercial license from the Licensor, its affiliated entities, or authorized
resellers, or you must refrain from using the Licensed Work.
All copies of the original and modified Licensed Work, and derivative works
of the Licensed Work, are subject to this License. This License applies
separately for each version of the Licensed Work and the Change Date may vary
for each version of the Licensed Work released by Licensor.
You must conspicuously display this License on each original or modified copy
of the Licensed Work. If you receive the Licensed Work in original or
modified form from a third party, the terms and conditions set forth in this
License apply to your use of that work.
Any use of the Licensed Work in violation of this License will automatically
terminate your rights under this License for the current and all other
versions of the Licensed Work.
This License does not grant you any right in any trademark or logo of
Licensor or its affiliates (provided that you may use a trademark or logo of
Licensor as expressly required by this License).
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
TITLE.
+1 -1
View File
@@ -67,7 +67,7 @@ You will need the following things properly installed on your computer.
* [Git][git]
* [Node.js][node]
* Supported versions: `v16` and `v18`.
* Supported versions: `v18` and `v20`.
* [Yarn][yarn] installed globally
* [Google Chrome][chrome]
* [Firefox][firefox]
+4 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
'use strict';
@@ -59,6 +59,9 @@ module.exports = {
// Test files:
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
rules: {
'qunit/require-expect': [2, 'except-simple'],
},
},
],
};
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
module.exports = {
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
'use strict';
@@ -0,0 +1,110 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import sinon from 'sinon';
import { typeOf } from '@ember/utils';
import { resourceNames } from 'api/handlers/cache-daemon-handler';
import { singularize } from 'ember-inflector';
/**
* This test helper can be used to help setup your sinon stubs in your tests.
* Must be called after setupMirage.
*
* ```js
* import setupStubs from 'api/test-support/handlers/cache-daemon-search';
*
* module('Acceptance | my test', function(hooks) {
* setupApplicationTest(hooks);
* setupMirage(hooks);
* setupStubs(hooks);
*
* // add your actual tests here
* });
* ```
*
* This will setup a stub for the IPC service and include helper methods to
* help setup what the cache daemon search command returns.
*
* @module Test Helpers
* @public
*/
export default function setupStubs(hooks) {
let stubTypes = [];
hooks.beforeEach(function () {
const ipcService = this.owner.lookup('service:ipc');
this.ipcStub = sinon.stub(ipcService, 'invoke');
/**
* We aim to still use mirage data when stubbing out the cache daemon
* search. However, the handler expects the search data to be raw JSON from
* the API which will get serialized. We add back the scope object for it to
* get correctly normalized and other fields such as "attributes" from the
* API will already be hoisted and will not be re-normalized from mirage data.
*
* This convenience method can take in multiple types,
* e.g. this.stubCacheDaemonSearch('targets', 'sessions').
* This will have sinon stub out each call so the first call to search will
* provide all the models from the first parameter you specify,
* the second call will provide all the models from the second argument, etc.
* @param types
*/
this.stubCacheDaemonSearch = (...types) => {
stubTypes = types;
types.forEach((type, i) => {
let models;
let resourceName;
if (typeOf(type) === 'object') {
models = type.func();
resourceName = type.resource;
} else {
models = this.server.schema[type].all().models;
resourceName = type;
}
this.ipcStub
.withArgs('searchCacheDaemon')
.onCall(i)
.returns({
[resourceName]: models.map((model) => {
// Use internal serializer to serialize the model correctly
// according to our mirage serializers
const modelData =
this.server.serializerOrRegistry.serialize(model);
// Serialize the data properly to standard JSON as that is what
// we're expecting from the cache daemon response
return JSON.parse(JSON.stringify(modelData));
}),
});
});
};
});
hooks.afterEach(function () {
// Verify the number of mocks we set up match with how
// many times the cache daemon was called with
sinon.assert.callCount(
this.ipcStub.withArgs('searchCacheDaemon'),
stubTypes.length,
);
stubTypes.forEach((type, i) => {
// Assert that the stub was called with the resource we're trying to mock
// so we don't mistakenly mock the wrong resource
const ipcCall = this.ipcStub.withArgs('searchCacheDaemon').getCall(i);
let resource = type;
if (typeOf(type) === 'object') {
resource = type.resource;
}
const mappedResourceName = resourceNames[singularize(resource)];
sinon.assert.match(ipcCall.args[1], { resource: mappedResourceName });
});
sinon.restore();
});
}
@@ -0,0 +1,35 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
/**
* This test helper can help set up and cleanup the database in your tests.
*
* ```js
* import { setupIndexedDb } from 'api/test-support/helpers/indexed-db';
*
* module('Acceptance | my test', function(hooks) {
* setupApplicationTest(hooks);
* setupIndexedDb(hooks);
*
* // add your actual tests here
* });
* ```
*
* @param hooks
*/
export function setupIndexedDb(hooks) {
hooks.beforeEach(function () {
const indexedDb = this.owner.lookup('service:indexed-db');
indexedDb.setup(`test-indexed-db-${Date.now()}`);
});
hooks.afterEach(async function () {
const indexedDb = this.owner.lookup('service:indexed-db');
await indexedDb.db.delete();
});
}
export default setupIndexedDb;
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import ModelAbility from './model';
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import ModelAbility from './model';
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import ModelAbility from './model';
@@ -18,7 +18,7 @@ export default class ChannelRecordingAbility extends ModelAbility {
const sessionRecording = this.model.connection_recording.session_recording;
const sessionRecordingAbility = this.abilities.abilityFor(
'session-recording',
sessionRecording
sessionRecording,
);
return this.model.isAsciicast && sessionRecordingAbility.canDownload;
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import ModelAbility from './model';
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import ModelAbility from './model';
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import ModelAbility from './model';
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import ModelAbility from './model';
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import ModelAbility from './model';
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import ModelAbility from './model';
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import ModelAbility from './model';
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import { Ability } from 'ember-can';
+46
View File
@@ -0,0 +1,46 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import ModelAbility from './model';
import { service } from '@ember/service';
/**
* Provides abilities for storage policies.
*/
export default class PolicyAbility extends ModelAbility {
// =services
@service features;
// =permissions
/**
* This ensures that storage policies may be read only if the
* session-recording feature flag is enabled.
*/
get canRead() {
return this.features.isEnabled('ssh-session-recording')
? super.canRead
: false;
}
/**
* This ensures that storage policies may be updated only if the
* session-recording feature flag is enabled.
*/
get canUpdate() {
return this.features.isEnabled('ssh-session-recording')
? super.canUpdate
: false;
}
/**
* This ensures that storage policies may be deleted only if the
* session-recording feature flag is enabled.
*/
get canDelete() {
return this.features.isEnabled('ssh-session-recording')
? super.canDelete
: false;
}
}
+9 -2
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import ModelAbility from './model';
@@ -27,6 +27,13 @@ export default class RoleAbility extends ModelAbility {
return this.hasAuthorizedAction('set-grants');
}
/**
* @type {boolean}
*/
get canSetGrantScopes() {
return this.hasAuthorizedAction('set-grant-scopes');
}
/**
* @type {boolean}
*/
@@ -54,7 +61,7 @@ export default class RoleAbility extends ModelAbility {
type === 'user' || type === 'group' || type === 'managed-group';
if (!typeIsValid)
throw new InvalidRolePrincipalTypeError(
`Expected a role principal of type 'user', 'group', or 'managed-group'. Got '${type}'.`
`Expected a role principal of type 'user', 'group', or 'managed-group'. Got '${type}'.`,
);
return this.can.can(`read ${type}`, this.model);
}
+28
View File
@@ -0,0 +1,28 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import ModelAbility from './model';
/**
* Provides abilities for scopes.
*/
export default class ScopeAbility extends ModelAbility {
// =permissions
/**
* Permission that checks whether a policy can be attached to a scope
* @type {boolean}
*/
get canAttachStoragePolicy() {
return this.hasAuthorizedAction('attach-storage-policy');
}
/**
* Permission that checks whether a policy can be detached to a scope
* @type {boolean}
*/
get canDetachStoragePolicy() {
return this.hasAuthorizedAction('detach-storage-policy');
}
}
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import ModelAbility from './model';
@@ -21,7 +21,22 @@ export default class SessionRecordingAbility extends ModelAbility {
return !this.model.isUnknown && super.canRead;
}
/**
* Only "known" session recording types may be deleted.
* @type {boolean}
*/
get canDelete() {
return !this.model.isUnknown && super.canDelete && this.model.isAvailable;
}
get canDownload() {
return this.hasAuthorizedAction('download');
}
/* Permission that checks whether a policy can be reapplied to a session recording
* @type {boolean}
*/
get canReapplyStoragePolicy() {
return this.hasAuthorizedAction('reapply-storage-policy');
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import ModelAbility from './model';
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import ModelAbility from './model';
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import ModelAbility from './model';
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import ModelAbility from './model';
+15 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import ModelAbility from './model';
@@ -17,4 +17,18 @@ export default class WorkerAbility extends ModelAbility {
get canCreateWorkerLed() {
return this.hasAuthorizedCollectionAction('create:worker-led');
}
/**
* @type {boolean}
*/
get canSetWorkerTags() {
return this.hasAuthorizedAction('set-worker-tags');
}
/**
* @type {boolean}
*/
get canRemoveTags() {
return this.hasAuthorizedAction('remove-worker-tags');
}
}
+40 -20
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import RESTAdapter from '@ember-data/adapter/rest';
@@ -45,7 +45,7 @@ function prenormalizeArrayResponse(response) {
}
export default class ApplicationAdapter extends RESTAdapter.extend(
AdapterBuildURLMixin
AdapterBuildURLMixin,
) {
// =attributes
@@ -108,22 +108,38 @@ export default class ApplicationAdapter extends RESTAdapter.extend(
/**
* Intercepts "empty" responses and adds an empty `items` array.
* @override
* @method findAll
* @return {Promise} promise
*/
findAll() {
return super.findAll(...arguments).then(prenormalizeArrayResponse);
}
/**
* Intercepts "empty" responses and adds an empty `items` array.
* This query method now supports pagination by checking the responseType and
* passing in the list token if the responseType indicates more data
* @override
* @method query
* @return {Promise} promise
*/
query() {
return super.query(...arguments).then(prenormalizeArrayResponse);
async query(store, schema, query) {
const queryObject = structuredClone(query);
let result;
let data = [];
// If the query has a page_size, we skip the pagination logic
// and return the initial result. This is being used to determine
// if the controller supports pagination
if (query.page_size) {
result = await super.query(store, schema, query);
return prenormalizeArrayResponse(result);
}
// Run this loop as long as the response_type is delta,
// which indicates that there are more items in the list
do {
result = await super.query(store, schema, queryObject);
//add the result items to a data array
if (result && result.items) {
data.push(...result.items);
//pass in the list token for subsequent calls to fetch the remaining list items
queryObject.list_token = result.list_token;
}
} while (result && result.response_type === 'delta');
result.items = data;
return prenormalizeArrayResponse(result);
}
/**
@@ -196,7 +212,10 @@ export default class ApplicationAdapter extends RESTAdapter.extend(
handleResponse(status, headers, payload, requestData) {
if (this.isInvalid(status, headers, payload)) {
const detailedMessage = this.generatedDetailedMessage(...arguments);
const transformedPayload = this.transformValidationErrors(payload);
const transformedPayload = this.transformValidationErrors(
payload,
status,
);
return new InvalidError(transformedPayload.errors, detailedMessage);
}
return super.handleResponse(status, headers, payload, requestData);
@@ -254,17 +273,18 @@ export default class ApplicationAdapter extends RESTAdapter.extend(
* error format.
*
* @param {object} payload
* @param status
* @return {object}
*/
transformValidationErrors(payload) {
transformValidationErrors(payload, status) {
const fieldErrors = get(payload, 'details.request_fields') || [];
// Normalize the primary error message into "base", which is an error
// that applies to the whole model instance
const baseError = {
isInvalid: true,
status: payload.source,
code: payload.code,
detail: payload.message,
status,
code: payload?.kind,
detail: payload?.message,
source: { pointer: '/data' },
};
// Normalize field-specific errors, if any.
@@ -299,6 +319,6 @@ export default class ApplicationAdapter extends RESTAdapter.extend(
* @return {String} detailed error message
*/
generatedDetailedMessage(status, headers, payload /*, requestData*/) {
return payload.message;
return payload?.message;
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import ApplicationAdapter from './application';
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import ApplicationAdapter from './application';
@@ -55,7 +55,7 @@ export default class SessionRecordingAdapter extends ApplicationAdapter {
throw this.handleResponse(
response.status,
response.headers,
await response.text()
await response.text(),
);
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import ApplicationAdapter from './application';
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import BaseModel from '../../models/base';
@@ -0,0 +1,64 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import BaseModel from '../../models/base';
import { attr } from '@ember-data/model';
/**
* Alias contains all fields related to an Alias resource
*/
export default class GeneratedAliasModel extends BaseModel {
// =attributes
@attr('string', {
description: 'The type of the resource, to help differentiate schemas',
})
type;
@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\nOutput only.',
readOnly: true,
})
created_time;
@attr('date', {
description: 'The time this resource was last updated\nOutput only.',
readOnly: true,
})
updated_time;
@attr('number', {
description: 'Current version number of this resource.',
})
version;
@attr('string', {
description:
'This is the value referenced by the user that is resolved to the destination id.',
})
value;
@attr('string', {
description: 'This is the id of the resource that this Alias points to.',
})
destination_id;
@attr('object', {
isNestedAttribute: true,
description:
'This contains a host_id which is the id of the host that the session will be authorized for.',
})
authorize_session_arguments;
}
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import BaseModel from '../../models/base';
@@ -158,6 +158,13 @@ export default class GeneratedAuthMethodModel extends BaseModel {
})
account_claim_maps;
@attr('string-array', {
for: 'oidc',
emptyArrayIfMissing: true,
isNestedAttribute: true,
})
prompts;
// =attributes(ldap)
@attr('boolean', {
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import BaseModel from '../../models/base';
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import BaseModel from '../../models/base';
@@ -31,7 +31,7 @@ export default class GeneratedChannelRecordingModel extends BaseModel {
'The total number of errors that occurred during the use of this Channel.',
readOnly: true,
})
errors;
errors_number;
@attr('date', {
description: 'The time the Channel started.',
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import BaseModel from '../../models/base';
@@ -38,7 +38,7 @@ export default class GeneratedConnectionRecordingModel extends BaseModel {
'The total number of errors that occurred during the use of this Connection.',
readOnly: true,
})
errors;
errors_number;
@attr('date', {
description: 'The time the Connection started.',
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import BaseModel from '../../models/base';
@@ -75,6 +75,18 @@ export default class GeneratedCredentialLibraryModel extends BaseModel {
})
path;
@attr('string', {
for: 'vault-generic',
description: 'It indicates the type of credential the library returns.',
})
credential_type;
@attr('object-as-array', {
for: 'vault-generic',
description: 'It indicates the credential mapping overrides.',
})
credential_mapping_overrides;
@attr('string', {
for: 'vault-ssh-certificate',
isNestedAttribute: true,
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import BaseModel from '../../models/base';
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import BaseModel from '../../models/base';
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import BaseModel from '../../models/base';
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import BaseModel from '../../models/base';
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import BaseModel from '../../models/base';
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import BaseModel from '../../models/base';
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import BaseModel from '../../models/base';
@@ -0,0 +1,61 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import BaseModel from '../../models/base';
import { attr } from '@ember-data/model';
/**
* Storage Policy is a resource that manages the lifecycle of Session Recordings,
* particularly to meet compliance frameworks.
*/
export default class GeneratedPolicyModel extends BaseModel {
// =attributes
@attr('string', {
description: 'The type of the resource, to help differentiate schemas',
})
type;
@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\nOutput only.',
readOnly: true,
})
created_time;
@attr('date', {
description: 'The time this resource was last updated\nOutput only.',
readOnly: true,
})
updated_time;
@attr('number', {
description: 'Current version number of this resource.',
})
version;
@attr('object', {
isNestedAttribute: true,
description:
'Days is the number of days for which a session recording will be retained.',
})
retain_for;
@attr('object', {
isNestedAttribute: true,
description:
'Days is the number of days for which a session recording will be automatically deleted.',
})
delete_after;
}
+5 -4
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import BaseModel from '../../models/base';
@@ -22,11 +22,12 @@ export default class GeneratedRoleModel extends BaseModel {
})
description;
@attr('string', {
@attr('array', {
emptyArrayIfMissing: true,
description:
"The scope to which this role applies. Defaults to the role's scope.",
"The scopes to which this role applies. Defaults to the role's scope.",
})
grant_scope_id;
grant_scope_ids;
@attr('date', {
description: 'The time this resource was created\nOutput only.',
+6 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import BaseModel from '../../models/base';
@@ -49,4 +49,9 @@ export default class GeneratedScopeModel extends BaseModel {
description: 'Current version number of this resource.',
})
version;
@attr('string', {
description: 'The ID of the associated storage policy',
})
storage_policy_id;
}
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import BaseModel from '../../models/base';
@@ -70,7 +70,7 @@ export default class GeneratedSessionRecordingModel extends BaseModel {
'The total number of errors that occurred during the use of the Session.',
readOnly: true,
})
errors;
errors_number;
@attr('date', {
description: 'The time the Session started.',
@@ -109,4 +109,17 @@ export default class GeneratedSessionRecordingModel extends BaseModel {
readOnly: true,
})
error_details;
@attr('date', {
description: 'The time until a session recording is required to be stored.',
readOnly: true,
})
retain_until;
@attr('date', {
description:
'The time a session recording is scheduled to be automatically deleted.',
readOnly: true,
})
delete_after;
}
+8 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import BaseModel from '../../models/base';
@@ -32,6 +32,13 @@ export default class GeneratedSessionModel extends BaseModel {
})
updated_time;
@attr('date', {
description:
'After this time the connection will be expired, e.g. forcefully terminated.\nOutput only.',
readOnly: true,
})
expiration_time;
@attr('number', {
description: 'Current version number of this resource.',
})
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import BaseModel from '../../models/base';
@@ -73,6 +73,12 @@ export default class GeneratedStorageBucketModel extends BaseModel {
})
region;
@attr('string', {
isNestedAttribute: true,
description: 'The MinIO location server.',
})
endpoint_url;
//this field is not used in the UI, but this is kept here to replicate the API
@attr('string', {
readOnly: true,
+14 -7
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import BaseModel from '../../models/base';
@@ -38,12 +38,6 @@ export default class GeneratedTargetModel extends BaseModel {
})
session_connection_limit;
@attr('string', {
description:
'Optional boolean expression to filter the workers that are allowed to satisfy this request.',
})
worker_filter;
@attr('string', {
description:
'Optional boolean expressions to filter the egress workers that are allowed to satisfy this request.',
@@ -108,4 +102,17 @@ export default class GeneratedTargetModel extends BaseModel {
isNestedAttribute: true,
})
enable_session_recording;
@attr('array', {
description:
'with_aliases specify the aliases that should be created when the target is created. ',
})
with_aliases;
@attr('array', {
readOnly: true,
description:
'with_aliases specify the aliases that should be created when the target is created. ',
})
aliases;
}
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import BaseModel from '../../models/base';
+24 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import BaseModel from '../../models/base';
@@ -72,4 +72,27 @@ export default class GeneratedWorkerModel extends BaseModel {
readOnly: true,
})
type;
@attr({
description:
'The deduplicated union of the tags reported by the worker ' +
'from its configuration and any tags added through other means.\nOutput only.',
readOnly: true,
emptyObjectIfMissing: true,
})
canonical_tags;
@attr({
description:
"The tags set in the worker's configuration file.\nOutput only.",
readOnly: true,
emptyObjectIfMissing: true,
})
config_tags;
@attr({
description: 'The api tags set for the worker.\nOutput only.',
emptyObjectIfMissing: true,
})
api_tags;
}
@@ -0,0 +1,177 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
/* global __electronLog */
import { inject as service } from '@ember/service';
import { getOwner, setOwner } from '@ember/application';
import { generateMQLExpression } from '../utils/mql-query';
import { paginateResults } from '../utils/paginate-results';
/**
* Not all types are yet supported by the cache daemon so we'll
* just whitelist the ones we need to start with. Keys are the resource
* types and the values are the fields that are searchable by the client.
* @type {{session: string[], alias: string[], target: string[]}}
*/
const supportedTypes = {
target: ['id', 'name', 'description', 'address', 'scope_id'],
session: ['id', 'type', 'status', 'endpoint', 'scope_id', 'target_id'],
alias: ['id', 'type', 'value', 'destination_id'],
};
/**
* Map the model resource name to the cache daemon resource name
* @type {{session: string, alias: string, target: string}}
*/
export const resourceNames = {
target: 'targets',
session: 'sessions',
alias: 'resolvable-aliases',
};
const fetchControllerData = async (context, next) => {
const { data } = context.request;
const { query: originalQuery } = data;
// remove cache daemon specific query params
// eslint-disable-next-line no-unused-vars
const { query, page, pageSize, ...remainingQuery } = originalQuery;
// If we get an error or cache daemon is unavailable, fall back to calling the API
context.request.data.query = remainingQuery;
const results = await next(context.request);
const models = results.content.toArray();
const paginatedResult = paginateResults(models, page, pageSize);
paginatedResult.meta = { totalItems: models.length };
return paginatedResult;
};
/**
* Handler to sit in front of the API request layer
* so we can request from the daemon first
*/
export default class CacheDaemonHandler {
@service session;
@service ipc;
constructor(context) {
setOwner(this, getOwner(context));
}
async request(context, next) {
switch (context.request.op) {
case 'query': {
const { store, data } = context.request;
const { type, query, options: { pushToStore = true } = {} } = data;
const isCacheDaemonRunning = await this.ipc.invoke(
'isCacheDaemonRunning',
);
// eslint-disable-next-line no-unused-vars
let { recursive, scope_id, page, pageSize, ...remainingQuery } = query;
let searchQuery = '';
if (
!Object.keys(supportedTypes).includes(type) ||
!isCacheDaemonRunning
) {
return fetchControllerData(context, next);
}
if (remainingQuery.query) {
const { search, filters } = remainingQuery.query;
searchQuery = generateMQLExpression({
search: {
text: search,
fields: supportedTypes[type],
},
filters,
});
}
const sessionData = this.session.data?.authenticated;
const auth_token_id = sessionData?.id;
const token = sessionData?.token;
remainingQuery = {
...remainingQuery,
query: searchQuery,
auth_token_id,
token,
resource: resourceNames[type],
};
let cacheDaemonResults = {};
try {
cacheDaemonResults = await this.ipc.invoke(
'searchCacheDaemon',
remainingQuery,
);
} catch (e) {
// If we got a 403, most likely the cache daemon was restarted and our token is no longer valid
// I'm not sure if we can get a 401 since we always send a token but we'll handle it in the same way
if (e.statusCode === 403 || e.statusCode === 401) {
try {
await this.ipc.invoke('addTokenToDaemons', {
tokenId: auth_token_id,
token,
});
cacheDaemonResults = await this.ipc.invoke(
'searchCacheDaemon',
remainingQuery,
);
} catch (err) {
// If it fails again just fall back to fetching controller data
__electronLog?.error(
'Failed to add token to daemons',
err.message,
);
}
} else {
__electronLog?.error(
'Failed to search cache daemon; falling back to search controller',
e.message,
);
return fetchControllerData(context, next);
}
}
// Currently returns with a singular top level field with resource name
// e.g. { targets: [...] } or { sessions: [..] }
// So this just unwraps to the array, or undefined
const [results] = Object.values(cacheDaemonResults);
const payload = { items: paginateResults(results, page, pageSize) };
const schema = store.modelFor(type);
const serializer = store.serializerFor(type);
const normalizedPayload = serializer.normalizeResponse(
store,
schema,
payload,
null,
'query',
);
// Return the raw data if we don't push to the store.
let records = normalizedPayload.data.map((record) => ({
...record.attributes,
id: record.id,
}));
if (pushToStore) {
records = store.push(normalizedPayload);
}
// Set a meta property on the array to store the total items of the results.
// This isn't conventional but is better than returning an ArrayProxy
// or EmberArray since the ember store query method asserts it has to be an array
// so we can't just return an object.
records.meta = { totalItems: results?.length ?? 0 };
return records;
}
default:
return next(context.request);
}
}
}
@@ -0,0 +1,172 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import { modelIndexes } from 'api/services/indexed-db';
import { inject as service } from '@ember/service';
import { getOwner, setOwner } from '@ember/application';
import { queryIndexedDb } from '../utils/indexed-db-query';
import { paginateResults } from '../utils/paginate-results';
import { hashCode } from '../utils/hash-code';
/**
* Handler to sit in front of the API request layer
* so we can handle any caching with indexedDb first
*/
export default class IndexedDbHandler {
@service indexedDb;
constructor(context) {
setOwner(this, getOwner(context));
}
async request(context, next) {
switch (context.request.op) {
case 'query': {
const { store, data } = context.request;
// TODO: Remove storeToken option as this is a temporary fix for auth-methods.
const {
type,
query,
options: {
pushToStore = true,
peekIndexedDB = false,
storeToken = true,
} = {},
} = data;
const supportedModels = Object.keys(modelIndexes);
const { db: indexedDb } = this.indexedDb ?? {};
// Go through normal flow if we don't yet support the model
// or if we don't have an indexedDb instance
if (!supportedModels.includes(type) || !indexedDb) {
return next(context.request);
}
let { page, pageSize, query: queryObj, ...remainingQuery } = query;
const adapter = store.adapterFor(type);
const schema = store.modelFor(type);
const serializer = store.serializerFor(type);
if (!peekIndexedDB) {
const tokenKey = `${type}-${hashCode(remainingQuery)}`;
let listToken;
if (storeToken) {
listToken = await indexedDb.token.get(tokenKey);
}
let payload;
try {
payload = await adapter.query(store, schema, {
...remainingQuery,
list_token: listToken?.token,
});
} catch (e) {
// If we get an invalid list token, we'll delete the token and
// clear the DB and try again without a token.
if (
e?.errors[0].status === 400 &&
e?.errors[0].code === 'invalid list token'
) {
await indexedDb[type].clear();
// Delete all tokens of the same resource type so we don't keep clearing the DB.
// Even if other tokens may still be valid, we might have cleared data that they
// depended on so we should clear all tokens of the same type when clearing the DB.
const tokenKeys = await indexedDb.token
.where(':id')
.startsWith(type)
.primaryKeys();
await indexedDb.token.bulkDelete(tokenKeys);
payload = await adapter.query(store, schema, {
...remainingQuery,
});
} else {
throw e;
}
}
// Store the token we just got back from the payload if it exists
if (payload.list_token && storeToken) {
await indexedDb.token.put({
id: tokenKey,
token: payload.list_token,
});
}
// Remove any records from the DB if the API indicates they've been deleted
if (payload.removed_ids?.length > 0) {
await indexedDb[type].bulkDelete(payload.removed_ids);
}
// This is a temporary fix of clearing the DB (specifically for auth-methods)
// since we are not storing the token we do not get back a list of removed_ids
// from the API call and we do not want deleted items from showing in list view.
if (!storeToken) {
await indexedDb[type].clear();
}
const normalizedPayload = serializer.normalizeResponse(
store,
schema,
payload,
null,
'query',
);
const { data: payloadData } = normalizedPayload;
// Store the new data we just got back from the API refresh
const items = payloadData.map((datum) =>
this.indexedDb.normalizeData({
data: datum,
cleanData: true,
schema,
serializer,
}),
);
await indexedDb[type].bulkPut(items);
}
const indexedDbResults = await queryIndexedDb(
indexedDb,
type,
queryObj,
);
const dbRecords = paginateResults(indexedDbResults, page, pageSize).map(
(item) =>
this.indexedDb.normalizeData({
data: item,
cleanData: false,
schema,
serializer,
}),
);
// Return the raw data if we don't push to the store.
let records = dbRecords.map((record) => ({
...record.attributes,
id: record.id,
}));
if (pushToStore) {
records = store.push({ data: dbRecords });
}
// Set a meta property on the array to store the total items of the results.
// This isn't conventional but is better than returning an ArrayProxy
// or EmberArray since the ember store query method asserts it has to be an array
// so we can't just return an object.
records.meta = { totalItems: indexedDbResults.length };
return records;
}
default:
return next(context.request);
}
}
}
@@ -0,0 +1,27 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import { registerDeprecationHandler } from '@ember/debug';
const deprecationList = ['ember-data:deprecate-early-static'];
export function initialize() {
registerDeprecationHandler((message, options, next) => {
// TODO: Remove deprecation handling for `deprecate-early-static` warning
// once we upgrade to ember-cli-mirage v3.0.0 which fixes this issue.
// More info about this issue here: https://github.com/miragejs/ember-cli-mirage/issues/2441
if (options?.id && deprecationList.includes(options.id)) {
return;
}
if (options?.url) {
message += options.url;
}
next(message, options);
});
}
export default {
initialize,
};
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import Mixin from '@ember/object/mixin';
+2 -2
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import GeneratedAccountModel from '../generated/models/account';
@@ -87,7 +87,7 @@ export default class AccountModel extends GeneratedAccountModel {
changePassword(
currentPassword,
newPassword,
options = { adapterOptions: {} }
options = { adapterOptions: {} },
) {
const defaultAdapterOptions = {
method: 'change-password',
+10
View File
@@ -0,0 +1,10 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import GeneratedAliasModel from '../generated/models/alias';
export const TYPE_ALIAS_TARGET = 'target';
export const TYPES_ALIAS = Object.freeze([TYPE_ALIAS_TARGET]);
export default class AliasModel extends GeneratedAliasModel {}
+2 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import GeneratedAuthMethodModel from '../generated/models/auth-method';
@@ -37,6 +37,7 @@ export const options = {
account_claim_maps: {
to: ['sub', 'name', 'email'],
},
prompts: ['consent', 'select_account', 'login'],
},
ldap: {
account_attribute_maps: {
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import GeneratedAuthTokenModel from '../generated/models/auth-token';
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import Model from '@ember-data/model';
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import GeneratedChannelRecordingModel from '../generated/models/channel-recording';
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import GeneratedConnectionRecordingModel from '../generated/models/connection-recording';
+10 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import GeneratedCredentialLibraryModel from '../generated/models/credential-library';
@@ -11,6 +11,15 @@ import GeneratedCredentialLibraryModel from '../generated/models/credential-libr
export const options = {
http_method: ['GET', 'POST'],
key_type: ['ed25519', 'ecdsa', 'rsa'],
credential_types: ['ssh_private_key', 'username_password'],
mapping_overrides: {
username_password: ['username_attribute', 'password_attribute'],
ssh_private_key: [
'private_key_attribute',
'private_key_passphrase_attribute',
'username_attribute',
],
},
};
export const TYPE_CREDENTIAL_LIBRARY_VAULT_GENERIC = 'vault-generic';
+8 -2
View File
@@ -1,12 +1,18 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import GeneratedCredentialStoreModel from '../generated/models/credential-store';
import { equal } from '@ember/object/computed';
export const types = ['static', 'vault'];
export const TYPE_CREDENTIAL_STORE_STATIC = 'static';
export const TYPE_CREDENTIAL_STORE_VAULT = 'vault';
export const TYPES_CREDENTIAL_STORE = Object.freeze([
TYPE_CREDENTIAL_STORE_STATIC,
TYPE_CREDENTIAL_STORE_VAULT,
]);
export default class CredentialStoreModel extends GeneratedCredentialStoreModel {
// =attributes
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import GeneratedCredentialModel from '../generated/models/credential';
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import GeneratedGroupModel from '../generated/models/group';
+17 -4
View File
@@ -1,12 +1,23 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import GeneratedHostCatalogModel from '../generated/models/host-catalog';
export const types = ['static', 'plugin'];
export const pluginTypes = ['aws', 'azure'];
export const TYPE_HOST_CATALOG_STATIC = 'static';
export const TYPE_HOST_CATALOG_DYNAMIC = 'plugin';
export const TYPES_HOST_CATALOG = Object.freeze([
TYPE_HOST_CATALOG_STATIC,
TYPE_HOST_CATALOG_DYNAMIC,
]);
export const TYPE_HOST_CATALOG_PLUGIN_AWS = 'aws';
export const TYPE_HOST_CATALOG_PLUGIN_AZURE = 'azure';
export const TYPES_HOST_CATALOG_PLUGIN = [
TYPE_HOST_CATALOG_PLUGIN_AWS,
TYPE_HOST_CATALOG_PLUGIN_AZURE,
];
export default class HostCatalogModel extends GeneratedHostCatalogModel {
// =attributes
@@ -32,7 +43,9 @@ export default class HostCatalogModel extends GeneratedHostCatalogModel {
* @type {boolean}
*/
get isUnknown() {
return this.isPlugin && !pluginTypes.includes(this.plugin?.name);
return (
this.isPlugin && !TYPES_HOST_CATALOG_PLUGIN.includes(this.plugin?.name)
);
}
/**
+5 -3
View File
@@ -1,10 +1,10 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import GeneratedHostSetModel from '../generated/models/host-set';
import { pluginTypes } from './host-catalog';
import { TYPES_HOST_CATALOG_PLUGIN } from './host-catalog';
export default class HostSetModel extends GeneratedHostSetModel {
// =attributes
@@ -30,7 +30,9 @@ export default class HostSetModel extends GeneratedHostSetModel {
* @type {boolean}
*/
get isUnknown() {
return this.isPlugin && !pluginTypes.includes(this.plugin?.name);
return (
this.isPlugin && !TYPES_HOST_CATALOG_PLUGIN.includes(this.plugin?.name)
);
}
/**
+5 -3
View File
@@ -1,11 +1,11 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import GeneratedHostModel from '../generated/models/host';
import { attr } from '@ember-data/model';
import { pluginTypes } from './host-catalog';
import { TYPES_HOST_CATALOG_PLUGIN } from './host-catalog';
export default class HostModel extends GeneratedHostModel {
// =attributes
@@ -64,7 +64,9 @@ export default class HostModel extends GeneratedHostModel {
* @type {boolean}
*/
get isUnknown() {
return this.isPlugin && !pluginTypes.includes(this.plugin?.name);
return (
this.isPlugin && !TYPES_HOST_CATALOG_PLUGIN.includes(this.plugin?.name)
);
}
/**
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import GeneratedManagedGroupModel from '../generated/models/managed-group';
+9
View File
@@ -0,0 +1,9 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import GeneratedPolicyModel from '../generated/models/policy';
export const TYPE_POLICY = 'storage';
export default class PolicyModel extends GeneratedPolicyModel {}
+89 -101
View File
@@ -1,22 +1,36 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import GeneratedRoleModel from '../generated/models/role';
import { attr } from '@ember-data/model';
import { inject as service } from '@ember/service';
import { all, resolve } from 'rsvp';
import {
TYPE_AUTH_METHOD_OIDC,
TYPE_AUTH_METHOD_LDAP,
} from 'api/models/auth-method';
export const GRANT_SCOPE_THIS = 'this';
export const GRANT_SCOPE_CHILDREN = 'children';
export const GRANT_SCOPE_DESCENDANTS = 'descendants';
export const GRANT_SCOPE_KEYWORDS = Object.freeze([
GRANT_SCOPE_THIS,
GRANT_SCOPE_CHILDREN,
GRANT_SCOPE_DESCENDANTS,
]);
// Sort the grant scope IDs by the order in which they should be displayed
// in the UI as the API will return them in an arbitrary order.
const sortOrder = {
[GRANT_SCOPE_THIS]: 0,
[GRANT_SCOPE_CHILDREN]: 1,
[GRANT_SCOPE_DESCENDANTS]: 2,
global: 3,
o: 4,
p: 5,
};
export default class RoleModel extends GeneratedRoleModel {
// =services
@service store;
@service resourceFilterStore;
// =attributes
@@ -27,7 +41,7 @@ export default class RoleModel extends GeneratedRoleModel {
* see obvious. Instead, the application layer is expected to load referenced
* users and groups as needed.
*/
@attr('principal-array', {
@attr('array', {
readOnly: true,
emptyArrayIfMissing: true,
})
@@ -40,12 +54,57 @@ export default class RoleModel extends GeneratedRoleModel {
@attr({ readOnly: true, emptyArrayIfMissing: true }) grant_strings;
/**
* Convenience for looking up the grant scope, if loaded.
* Convenience for looking up the grant scopes, if loaded.
*/
get grantScope() {
return this.grant_scope_id
? this.store.peekRecord('scope', this.grant_scope_id)
: null;
get grantScopes() {
const grantScopes = [];
if (this.grant_scope_ids) {
const sortedScopeIDs = [...this.grant_scope_ids].sort((a, b) => {
const aSplit = a.split('_')[0];
const bSplit = b.split('_')[0];
return sortOrder[aSplit] - sortOrder[bSplit];
});
sortedScopeIDs.forEach((id) => {
if (GRANT_SCOPE_KEYWORDS.includes(id)) {
grantScopes.push({ id });
} else {
const scope = this.store.peekRecord('scope', id);
if (scope) {
grantScopes.push(scope);
}
}
});
}
return grantScopes;
}
/**
* Helper for retrieving grant scope ids that are keywords.
* @type {string[]}
*/
get grantScopeKeywords() {
return this.grant_scope_ids.filter((id) =>
GRANT_SCOPE_KEYWORDS.includes(id),
);
}
/**
* Helper for retrieving grant_scope_ids that are orgs.
* @type {string[]}
*/
get grantScopeOrgIDs() {
return this.grant_scope_ids.filter((id) => id.startsWith('o_'));
}
/**
* Helper for retrieving grant_scope_ids that are projects.
* @type {string[]}
*/
get grantScopeProjectIDs() {
return this.grant_scope_ids.filter((id) => id.startsWith('p_'));
}
/**
@@ -55,7 +114,7 @@ export default class RoleModel extends GeneratedRoleModel {
get userIDs() {
return this.principals
.filter(({ type }) => type === 'user')
.map(({ principal_id }) => principal_id);
.map(({ id }) => id);
}
/**
@@ -65,7 +124,7 @@ export default class RoleModel extends GeneratedRoleModel {
get groupIDs() {
return this.principals
.filter(({ type }) => type === 'group')
.map(({ principal_id }) => principal_id);
.map(({ id }) => id);
}
/**
@@ -75,96 +134,25 @@ export default class RoleModel extends GeneratedRoleModel {
get managedGroupIDs() {
return this.principals
.filter(({ type }) => type === 'managed group')
.map(({ principal_id }) => principal_id);
.map(({ id }) => id);
}
/**
* A promise that resolves to an array of User instances.
* When calling this getter, be sure to await resolution
* before interacting with the results.
* @type {Promise[UserModel]}
*/
get users() {
const ids = this.userIDs;
// Role has prinicipal IDs,
// return a promise which resolves model instances for those IDs
if (ids?.length) {
return this.resourceFilterStore
.queryBy('user', { id: ids }, { scope_id: 'global', recursive: true })
.then((models) => models.map((model) => model));
}
// No principal IDs,
// return a promise resolving to an empty array
return resolve([]);
}
/**
* A promise that resolves to an array of Group instances.
* When calling this getter, be sure to await resolution
* before interacting with the results.
* @type {Promise[GroupModel]}
*/
get groups() {
const ids = this.groupIDs;
// Role has prinicipal IDs,
// return a promise which resolves model instances for those IDs
if (ids?.length) {
return this.resourceFilterStore
.queryBy('group', { id: ids }, { scope_id: 'global', recursive: true })
.then((models) => models.map((model) => model));
}
// No principal IDs,
// return a promise resolving to an empty array
return resolve([]);
}
/**
* A promise that resolves to an array of ManagedGroup instances.
* When calling this getter, be sure to await resolution
* before interacting with the results.
* @type {Promise[ManagedGroupModel]}
*/
get managedGroups() {
const ids = this.managedGroupIDs;
// Role has prinicipal IDs
// return a promise which resolves model instances for those IDs
if (ids?.length) {
// Collect all auth methods.
const authMethods = this.resourceFilterStore.queryBy(
'auth-method',
{ type: [TYPE_AUTH_METHOD_OIDC, TYPE_AUTH_METHOD_LDAP] },
{ scope_id: 'global', recursive: true }
);
// For each auth method, query all managed groups with IDs
// that match the role's manage group principal IDs.
const managedGroups = authMethods
.then((methods) =>
all(
methods.map(({ id: auth_method_id }) =>
this.resourceFilterStore
.queryBy('managed-group', { id: ids }, { auth_method_id })
.then((models) => models.map((model) => model))
)
)
)
// The result is an array of arrays of model instances (grouped by
// auth methods), so these must be flattened.
.then((grouped) => grouped.flat());
return managedGroups;
}
// No principal IDs,
// return a promise resolving to an empty array
return resolve([]);
}
// =methods
/**
* Saves grant scope ids on the role via the `set-grant-scopes` method.
* @param {[string]} grantScopeIDs
* @return {Promise}
*/
setGrantScopes(grantScopeIDs) {
return this.save({
adapterOptions: {
method: 'set-grant-scopes',
grantScopeIDs,
},
});
}
/**
* Saves grant strings on the role via the `set-grants` method.
* See serializer and adapter for more information.
+58 -15
View File
@@ -1,16 +1,18 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import GeneratedScopeModel from '../generated/models/scope';
import { computed } from '@ember/object';
export const scopeTypes = {
global: 'global',
org: 'org',
project: 'project',
};
export const TYPE_SCOPE_GLOBAL = 'global';
export const TYPE_SCOPE_ORG = 'org';
export const TYPE_SCOPE_PROJECT = 'project';
export const TYPES_SCOPE = Object.freeze([
TYPE_SCOPE_GLOBAL,
TYPE_SCOPE_ORG,
TYPE_SCOPE_PROJECT,
]);
export default class ScopeModel extends GeneratedScopeModel {
// =attributes
@@ -18,9 +20,8 @@ export default class ScopeModel extends GeneratedScopeModel {
/**
* @type {boolean}
*/
@computed('type')
get isGlobal() {
return this.type === scopeTypes.global;
return this.type === TYPE_SCOPE_GLOBAL;
}
// There is only one global scope and it cannot be created by clients,
// thus no set.
@@ -28,22 +29,64 @@ export default class ScopeModel extends GeneratedScopeModel {
/**
* @type {boolean}
*/
@computed('type')
get isOrg() {
return this.type === scopeTypes.org;
return this.type === TYPE_SCOPE_ORG;
}
set isOrg(value) {
if (value) this.type = scopeTypes.org;
if (value) this.type = TYPE_SCOPE_ORG;
}
/**
* @type {boolean}
*/
@computed('type')
get isProject() {
return this.type === scopeTypes.project;
return this.type === TYPE_SCOPE_PROJECT;
}
set isProject(value) {
if (value) this.type = scopeTypes.project;
if (value) this.type = TYPE_SCOPE_PROJECT;
}
/**
* Attach policy via the `attach-staorage-policy` method.
* @param {[string]} policyId
* @param {object} options
* @param {object} options.adapterOptions
* @return {Promise}
*/
attachStoragePolicy(policyId, options = { adapterOptions: {} }) {
const defaultAdapterOptions = {
method: 'attach-storage-policy',
policyId,
};
// There is no "deep merge" in ES.
return this.save({
...options,
adapterOptions: {
...defaultAdapterOptions,
...options.adapterOptions,
},
});
}
/**
* Detaches policy via the `detach-storage-policy` method.
* @param {[string]} policyId
* @param {object} options
* @param {object} options.adapterOptions
* @return {Promise}
*/
detachStoragePolicy(policyId, options = { adapterOptions: {} }) {
const defaultAdapterOptions = {
method: 'detach-storage-policy',
policyId,
};
// There is no "deep merge" in ES.
return this.save({
...options,
adapterOptions: {
...defaultAdapterOptions,
...options.adapterOptions,
},
});
}
}
+20 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import GeneratedSessionRecordingModel from '../generated/models/session-recording';
@@ -69,4 +69,23 @@ export default class SessionRecordingModel extends GeneratedSessionRecordingMode
this.create_time_values?.user?.name || this.create_time_values?.user?.id
);
}
/**
* Reapply policy dates via the `reapply-staorage-policy` method.
* @param {object} options
* @param {object} options.adapterOptions
* @return {Promise}
*/
reapplyStoragePolicy(options = { adapterOptions: {} }) {
const defaultAdapterOptions = {
method: 'reapply-storage-policy',
};
return this.save({
...options,
adapterOptions: {
...defaultAdapterOptions,
...options.adapterOptions,
},
});
}
}
+13 -2
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import GeneratedSessionModel from '../generated/models/session';
@@ -76,7 +76,7 @@ class SessionCredential {
if (this.#payloadSecret?.decoded) {
const secretJSON = this.#payloadSecret.decoded;
return Object.keys(secretJSON).map(
(key) => new SessionCredential.SecretItem(key, secretJSON[key])
(key) => new SessionCredential.SecretItem(key, secretJSON[key]),
);
} else {
// decode from base64
@@ -151,6 +151,17 @@ export default class SessionModel extends GeneratedSessionModel {
return this.store.peekRecord('target', this.target_id);
}
/**
* The user associated with this session (if loaded).
* @type {UserModel}
*/
get user() {
if (!this.user_id) {
return null;
}
return this.store.peekRecord('user', this.user_id);
}
// =methods
/**
+11 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import GeneratedStorageBucketModel from '../generated/models/storage-bucket';
@@ -9,8 +9,10 @@ export const TYPE_STORAGE_BUCKET_PLUGIN = 'plugin';
export const TYPES_STORAGE_BUCKET = Object.freeze([TYPE_STORAGE_BUCKET_PLUGIN]);
export const TYPE_STORAGE_BUCKET_PLUGIN_AWS_S3 = 'aws';
export const TYPE_STORAGE_BUCKET_PLUGIN_MINIO = 'minio';
export const TYPES_STORAGE_BUCKET_PLUGIN = Object.freeze([
TYPE_STORAGE_BUCKET_PLUGIN_AWS_S3,
TYPE_STORAGE_BUCKET_PLUGIN_MINIO,
]);
export const TYPE_CREDENTIAL_STATIC = 'static';
@@ -75,6 +77,14 @@ export default class StorageBucketModel extends GeneratedStorageBucketModel {
return this.compositeType === TYPE_STORAGE_BUCKET_PLUGIN_AWS_S3;
}
/**
* True if the storage bucket plugin type is MinIO
* @type {boolean}
*/
get isMinIO() {
return this.compositeType === TYPE_STORAGE_BUCKET_PLUGIN_MINIO;
}
/**
* If the storage bucket is a plugin return `plugin.name`,
* otherwise return the storage bucket type.
+23 -9
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import GeneratedTargetModel from '../generated/models/target';
@@ -108,6 +108,14 @@ export default class TargetModel extends GeneratedTargetModel {
.filter((s) => s && s.target_id === this.id);
}
/**
* Available sessions associated with this target (but only already loaded sessions).
* @type {SessionModel[]}
*/
get availableSessions() {
return this.sessions.filter((session) => session.isAvailable);
}
/**
* The project associated with this target (if already loaded).
* @type {ScopeModel}
@@ -122,11 +130,17 @@ export default class TargetModel extends GeneratedTargetModel {
*/
get isActive() {
const pendingOrActiveSessions = this.sessions.filter(
(s) => s.isActive || s.isPending
(s) => s.isActive || s.isPending,
);
return Boolean(pendingOrActiveSessions.length);
}
get associatedAliases() {
return this.store
.peekAll('alias')
.filter((alias) => alias?.destination_id === this.id);
}
// =methods
/**
@@ -195,7 +209,7 @@ export default class TargetModel extends GeneratedTargetModel {
*/
addBrokeredCredentialSources(
brokeredCredentialSourceIDs,
options = { adapterOptions: {} }
options = { adapterOptions: {} },
) {
const defaultAdapterOptions = {
method: 'add-credential-sources',
@@ -221,7 +235,7 @@ export default class TargetModel extends GeneratedTargetModel {
*/
addInjectedApplicationCredentialSources(
injectedApplicationCredentialSourceIDs,
options = { adapterOptions: {} }
options = { adapterOptions: {} },
) {
const defaultAdapterOptions = {
method: 'add-credential-sources',
@@ -247,7 +261,7 @@ export default class TargetModel extends GeneratedTargetModel {
*/
removeBrokeredCredentialSources(
brokeredCredentialSourceIDs,
options = { adapterOptions: {} }
options = { adapterOptions: {} },
) {
const defaultAdapterOptions = {
method: 'remove-credential-sources',
@@ -272,7 +286,7 @@ export default class TargetModel extends GeneratedTargetModel {
removeBrokeredCredentialSource(brokeredCredentialSourceID, options) {
return this.removeBrokeredCredentialSources(
[brokeredCredentialSourceID],
options
options,
);
}
@@ -286,7 +300,7 @@ export default class TargetModel extends GeneratedTargetModel {
*/
removeInjectedApplicationCredentialSources(
injectedApplicationCredentialSourceIDs,
options = { adapterOptions: {} }
options = { adapterOptions: {} },
) {
const defaultAdapterOptions = {
method: 'remove-credential-sources',
@@ -310,11 +324,11 @@ export default class TargetModel extends GeneratedTargetModel {
*/
removeInjectedApplicationCredentialSource(
injectedApplicationCredentialSourceID,
options
options,
) {
return this.removeInjectedApplicationCredentialSources(
[injectedApplicationCredentialSourceID],
options
options,
);
}
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import GeneratedUserModel from '../generated/models/user';
+60 -25
View File
@@ -1,10 +1,16 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import GeneratedWorkerModel from '../generated/models/worker';
import { attr } from '@ember-data/model';
export const TYPE_WORKER_PKI = 'pki';
export const TAG_TYPE_CONFIG = 'config';
export const TAG_TYPE_API = 'api';
export const HCP_MANAGED_KEY = 'boundary.cloud.hashicorp.com:managed';
export default class WorkerModel extends GeneratedWorkerModel {
// =attributes
@@ -23,21 +29,21 @@ export default class WorkerModel extends GeneratedWorkerModel {
* @type {boolean}
*/
get isPki() {
return this.type === 'pki';
return this.type === TYPE_WORKER_PKI;
}
/**
* Returns the number of config tags present on the worker.
* Returns the number of tags present on the worker.
* @type {number}
*/
get tagCount() {
if (!this.config_tags) {
return 0;
}
return Object.values(this.config_tags).reduce(
const allTags = [
...Object.values(this.config_tags ?? {}),
...Object.values(this.api_tags ?? {}),
];
return allTags.reduce(
(previousCount, currentTags) => previousCount + currentTags.length,
0
0,
);
}
@@ -45,30 +51,37 @@ export default class WorkerModel extends GeneratedWorkerModel {
* Returns the config tags as an array of key/value pair objects.
* @type {[object]}
*/
getConfigTagList() {
get configTagList() {
if (!this.config_tags) {
return null;
}
return Object.entries(this.config_tags).flatMap(([key, value]) =>
value.map((tag) => ({ key, value: tag }))
value.map((tag) => ({ key, value: tag, type: TAG_TYPE_CONFIG })),
);
}
@attr({
description:
'The deduplicated union of the tags reported by the worker ' +
'from its configuration and any tags added through other means.\nOutput only.',
readOnly: true,
})
canonical_tags;
/**
* Returns the api tags as an array of key/value pair objects.
* @type {[object]}
*/
get apiTagList() {
if (!this.api_tags) {
return null;
}
@attr({
description:
"The tags set in the worker's configuration file.\nOutput only.",
readOnly: true,
})
config_tags;
return Object.entries(this.api_tags).flatMap(([key, value]) =>
value.map((tag) => ({ key, value: tag, type: TAG_TYPE_API })),
);
}
/**
* Returns all tags as an array of key/value pair objects with tag type.
* @type {[object]}
*/
get allTags() {
return [...(this.configTagList ?? []), ...(this.apiTagList ?? [])];
}
/**
* Method to modify the adapter to handle custom POST route for creating worker.
@@ -90,4 +103,26 @@ export default class WorkerModel extends GeneratedWorkerModel {
},
});
}
/**
* Method to set api tags on the worker.
* @param {object} apiTags
* @return {Promise}
*/
setApiTags(apiTags) {
return this.save({
adapterOptions: { method: 'set-worker-tags', apiTags },
});
}
/**
* Method to remove api tags on the worker.
* @param {object} apiTags
* @return {Promise}
*/
removeApiTags(apiTags) {
return this.save({
adapterOptions: { method: 'remove-worker-tags', apiTags },
});
}
}
+2 -2
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import ApplicationSerializer from './application';
@@ -110,7 +110,7 @@ export default class AccountSerializer extends ApplicationSerializer {
serialized = this.serializeForChangePassword(
snapshot,
currentPassword,
newPassword
newPassword,
);
}
return serialized;
+35 -9
View File
@@ -1,6 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
* SPDX-License-Identifier: BUSL-1.1
*/
import RESTSerializer from '@ember-data/serializer/rest';
@@ -145,18 +145,18 @@ export default class ApplicationSerializer extends RESTSerializer {
const transformedPayload = {};
// Find the Ember-data-expected root key name.
const payloadKey = this.payloadKeyFromModelName(
primaryModelClass.modelName
primaryModelClass.modelName,
);
// Copy the data rooted under `items` in the existing payload into the new
// payload under the expected root key name.
transformedPayload[payloadKey] = structuredClone(payload.items);
transformedPayload[payloadKey] = structuredClone(payload?.items);
// Return the result of normalizing the transformed payload.
return super.normalizeArrayResponse(
store,
primaryModelClass,
transformedPayload,
id,
requestType
requestType,
);
}
@@ -179,11 +179,13 @@ export default class ApplicationSerializer extends RESTSerializer {
payload = structuredClone(payload);
// Check for and normalize missing arrays
payload = this.normalizeMissingArrays(store, primaryModelClass, payload);
// Check for and normalize missing objects
payload = this.normalizeMissingObjects(store, primaryModelClass, payload);
// Setup a new payload data structure.
const transformedPayload = {};
// Find the Ember-data-expected root key name.
const payloadKey = this.payloadKeyFromModelName(
primaryModelClass.modelName
primaryModelClass.modelName,
);
// Copy the unrooted payload under the expected root key name.
transformedPayload[payloadKey] = payload;
@@ -193,13 +195,13 @@ export default class ApplicationSerializer extends RESTSerializer {
primaryModelClass,
transformedPayload,
id,
requestType
requestType,
);
}
/**
* Resets missing array fields to an empty array if they are annotated by
* `normalizeToEmptyArray: true` in the associated model attribute
* `emptyArrayIfMissing: true` in the associated model attribute
* declaration. Our API excludes arrays when they are empty from
* singular responses.
*
@@ -222,6 +224,30 @@ export default class ApplicationSerializer extends RESTSerializer {
return payload;
}
/**
* Resets missing object fields to an empty object if they are annotated by
* `emptyObjectIfMissing: true` in the associated model attribute
* declaration.
*
* @param {Store} store
* @param {Model} primaryModelClass
* @param {object} payload
* @return {object}
*/
normalizeMissingObjects(store, primaryModelClass, payload) {
const attrDefs = store
.getSchemaDefinitionService()
.attributesDefinitionFor({ type: primaryModelClass.modelName });
if (attrDefs) {
Object.keys(attrDefs).forEach((key) => {
if (!payload[key] && attrDefs[key]?.options?.emptyObjectIfMissing) {
payload[key] = {};
}
});
}
return payload;
}
/**
* Hydrates the incoming scope JSON with additional boolean fields and
* delegates nested attributes and secrets normalization.
@@ -318,7 +344,7 @@ export default class ApplicationSerializer extends RESTSerializer {
primaryModelClass,
payload,
id,
requestType
requestType,
) {
const newPayload = structuredClone(payload);
@@ -338,7 +364,7 @@ export default class ApplicationSerializer extends RESTSerializer {
primaryModelClass,
newPayload,
id,
requestType
requestType,
);
}
}
Loaded 100 of 2212 files, more files were not shown because too many files have changed in this diff. Show more