92 Commits

Author SHA1 Message Date
Zack Moore
e6ce95acd3
Replace codemirror 6 code editor with HDS CodeEditor component (#30188)
* Completed initial replacement of editor

* fixing ts issues

* removing codemirror modifier and deps

* working on replacing the code editor

* addressing linting concerns

* cleaning up policy-form editor

* fixing linting issues

* fixing linting issues

* fixing tests

* fixing tests

* fixing tests

* fixing tests

* fixing failing tests

* cleaning up PR

* fixing tests

* remove outdated message for navigating editor

* fix linting in tests

* add changelog

* fix tests

* update naming

* remove unused lint param + name changes

* update test selector usage

* update test selector usage

* update test selector usage

* lint fixes

* replace page object selectors

* lint fix

* fix lint

* fix lint after merge

* update tests

* remove import

---------

Co-authored-by: Lane Wetmore <lane.wetmore@hashicorp.com>
2025-07-23 11:12:20 -07:00
claire bontempo
8da4386cac
UI: Fixes kv v2 secret overview for failed subkeys policy check for secrets with underscores (#31136)
* default subkeyData to an empty object

* add changelog and extra check

* m rewrite test stubbing capabilities intead
2025-06-27 22:13:24 +00:00
Jordan Reimer
2417aa9aad
[UI] Ember Data Migration - Secrets Engine (#30829)
* [UI] Ember Data Migration - Secrets Engine Resource (#30791)

* adds base factory for resources and secrets engine resource

* updates dashboard and secret-engine list route to fetch mounts from api service

* updates secret backends routes to use api service

* updates secrets engine config routes to use api service

* updates secrets backend route to use internal mounts endpoint and fixes error handling

* updates property casing in config details card component

* fixes dashboard tests

* fixes issues with engine configuration

* updates api service to only set token header if value is defined in auth service

* fixes more tests

* Update ui/app/routes/vault/cluster/secrets/backend/configuration/index.js

Co-authored-by: Angel Garbarino <Monkeychip@users.noreply.github.com>

* removes alwaysRender from publicKey field in secret engine configuration details component

* removes unused hideToggle arg from secret engine mount config template

* updates kv config route to load secret-engine model

* fixes kv config route

---------

Co-authored-by: Angel Garbarino <Monkeychip@users.noreply.github.com>

* [UI] Ember Data Migration - Secrets Engine Forms (#30951)

* adds secrets engine form class

* updates mount-secret-backend route and form component to use secrets engine form class and api service

* updates to form class proxy for nested form data properties

* adds form classes for configurable secrets engines

* updates secrets engine config edit route and components to use form classes and api service

* adds missing copyright header

* fixes tests

* fixes type error

* updates configure-ssh component to use form class and api service

* updates configure-ssh tests

* updates configuration-wif component tests

* fixes mount secret backend and form tests

* adds method to normalize request key casing to api service

* addresses pr review feedback

* removes unused secrets engine config models, adapters and serializers (#30980)

* fixes azure config tests

* fixes more ent tests

---------

Co-authored-by: Angel Garbarino <Monkeychip@users.noreply.github.com>
2025-06-16 14:29:17 -06:00
Angel Garbarino
a51c5ed362
Clean up button test selectors (#30694)
* clean up selectors file and then update testButton to buttonByAttr

* a lot but not really in the scheme of things

* fix component test failures

* fix acceptance test failures

* fix namespace selector

* clean up remaining tests

* another test

* last test

* small changes, but I have test failures

* a mess in custom messages, really hard to test because of test pollution.

* make data-test-submit vs data-test-save

* change other-methods to sign in with other methods

* clean up of failing test

* buttonByAttr to button

* clean up test pollution on config messages

* sweep of clean ups

* another round of small cleanups

* fix some message things, remaining oidc issue?

* use a runCmd to better delete things

* fix to amend for recent auth test changes

* remove skip
2025-06-10 16:25:34 -04:00
Jaired Jawed
1150bc2c87
Replace e.keyCode with e.key (#30493)
* remove e.keyCode in favor of e.key

* remove key-codes.js

* add changelog

* update to satisfy pr comments

* changes

* changes
2025-05-05 10:06:52 -07:00
Jordan Reimer
681a3b8563
[UI] Ember Data Migration - Form Class (#30232)
* moves validators from model-helpers to forms directory

* creates validate util and updates model-validations directory to use it

* adds form and field classes

* updates validation types

* updates validators import in test

* adds readme for forms

* Update ui/app/utils/forms/validate.ts

Co-authored-by: lane-wetmore <lane.wetmore@hashicorp.com>

---------

Co-authored-by: lane-wetmore <lane.wetmore@hashicorp.com>
2025-04-15 09:35:56 -06:00
Jordan Reimer
b959cab17b
update capabilities service to use api service (#30222) 2025-04-15 09:35:05 -06:00
Jordan Reimer
df843a859a
updates copyright header formatting in hbs files (#29890) 2025-03-11 11:10:20 -06:00
lane-wetmore
4051cb4d4c
UI: Remove custom tag class and replace with Hds::Badge (#29475)
* replace custom tag class with Hds::Badge

* another wave of custom class replacements

* remove tag class styles and cleanup

* add changelog entry

* fix changelog name

* remove changelog entry and old styles and clean up

* remove extra classes and clean up

* one more clean up section

* update tests

* fix value check

* updated test

* update tests

* switch to code elements with specific styling and cleanup
2025-02-07 15:29:12 -06:00
claire bontempo
6d566cb6d0
UI: Remove kv data download button (#29290)
* remove download button

* add changelog
2025-01-06 15:41:08 -06:00
Angel Garbarino
c7ca295816
Solve cntrl+f issue on KVv2 JSON details and edit views (#28808)
* initial changes need to add test coverage

* change icon

* replace original idea with hds::codeblock on kvv2 details view

* changelog

* fixing edit view by addressing viewportMargin

* fix failing test

* missedone

* Update 28808.txt

* Update json-editor.js

* test coverage

* update codeblock selector

* Update general-selectors.ts

* Update kv-data-fields.js

* Update ui/lib/core/addon/components/json-editor.js

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>

* Update ui/lib/kv/addon/components/kv-data-fields.js

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>

* update test name

* add default to modifier

---------

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
2024-11-08 18:23:01 +00:00
claire bontempo
1fbbf9d76b
UI: Ember-data upgrade 5.3.2 prep: use custom service instead of extending ember-data store (#28695)
* rename store to pagination, remove store extension

* initial update of service test

* remove superfluous helper

* replace store with pagination service in main app

* update kmip engine syntax

* add pagination to kmip engine

* update to pagination in config-ui engine

* update sync engine to use pagination service

* use pagination service in kv engine

* use pagination service in ldap engine

* use pagination in pki engine

* update renaming clearDataset functions

* link to jira VAULT-31721

* remove comment
2024-10-17 10:00:57 -07:00
Angel Garbarino
f2041b00e5
Remove decodeURIComponent method for KVv2 secret path on list view (#28698)
* remove encoding for KVv2

* test coverage

* changelog

* validations

* Revert "validations"

This reverts commit d6fd291d856a2005ed8f3a1a4f0f42add4ecb272.

* update subtext for secret path

* Update list.js

* Update secret-edit.js

* test coverage for data-octets

* Update list-directory.js

* fix modelForm test

* amend subText

* test selector things
2024-10-16 23:06:52 +00:00
claire bontempo
902d853f7a
UI: Add copy button for secret path (#28629)
* add copy button to secret headers

* add changelog

* add test
2024-10-08 14:06:39 -07:00
claire bontempo
7774261c15
UI: Ember upgrade: Handle deprecation router service from host (#28603)
* use alias for router injection

* update @router declarations in engine files

* fix remaining pki router imports

* dynamically set router based on owner

* address replication routers

* update markdown docs

* use non-deprecated import for getOwner

* revert out of scope changes

* add transition-to test
2024-10-08 09:01:46 -07:00
claire bontempo
05f32b69ee
UI: upgrade HDS to 4.12.0 (#28525)
* update hds to latest version

* yield dropdown Interactive text instead of use @text arg, results after running codemod

* remaining dropdown changes

* address sidebar nav IconButton deprecation, fix secret tests

* revert

* explicitly select popupmenu

* more test changes

* fix pki toggle button

* remove tracked prop in oidc client controller

* aaand more test updates

* change to tilde

* tilde yarn lock changes

* small cleanup items
2024-10-04 20:07:48 +00:00
Chelsea Shaw
74c4e0bd86
UI: Update model docs (#28495)
* rename validators util into model-helpers folder

* move kmip-role-fields to model-helpers

* fill out docs

* Move database-helpers into model-helpers

* broom
2024-09-24 14:07:06 -07:00
Chelsea Shaw
6c270af47b
UI Remove obscured json (#28261) 2024-09-06 18:13:59 +00:00
claire bontempo
73fbdb4565
UI: Hide patch for deleted or destroyed secrets (#28301)
* hide patch action for deleted or destroyed versions

* update jsdoc

* add conditional chaining for CE versions that dont have subkeys

* stub version for CE tests

* add comments

* Update ui/lib/kv/addon/routes/secret.js
2024-09-05 15:52:38 -07:00
claire bontempo
de87c7f3c0
add isPatchAllowed to jsdoc (#28260) 2024-09-03 14:48:36 -05:00
claire bontempo
3a9db72792
UI: improve control group UX (#28232)
* wip control group fix?

* dont rely on models for capabilities;

* Revert "wip control group fix?"

This reverts commit cf3e896ba05d2fdfe1f6287bba5c862df4e5d553.

* make explicit request for data

* remove dangerous triple curlies

* cleanup template logic and reuse each-in

* remove capability checks from model

* update tests to reflect new behavior

* add test coverage

* fix mirage factory, update details tests

* test control groups VAULT-29471

* finish patch test

* alphabetize!

* does await help?

* fix factory

* add conditionals for control group error
2024-09-03 10:49:41 -07:00
claire bontempo
f634808ed4
UI: Implement KV patch+subkey [enterprise] (#28212)
* UI: Implement overview page for KV v2 (#28162)

* build json editor patch form

* finish patch component and tests

* add tab to each route

* and path route

* add overview tab to tests

* update overview to use updated_time instead of created_time

* redirect relevant secret.details to secret.index

* compute secretState in component instead of pass as arg

* add capabilities service

* add error handling to fetchSubkeys adapter request

* add overview tabs to test

* add subtext to overview card

* remaining redirects in secret edit

* remove create new version from popup menu

* fix breadcrumbs for overview

* separate adding capabilities service

* add service to kv engine

* Revert "separate adding capabilities service"

This reverts commit bb70b12ab7dbcde0fbd2d4d81768e5c8b1c420cc.

* Revert "add service to kv engine"

This reverts commit bfa880535ef7d529d7610936b2c1aae55673d23f.

* update navigation test

* consistently navigate to secret.index route to be explicit

* finish overview navigation tests

* add copyright header

* update delete tests

* fix nav testrs

* cleanup secret edit redirects

* remove redundant async/awaits

* fix create test

* edge case tests

* secret acceptance tests

* final component tests

* rename kvSecretDetails external route to kvSecretOverview

* add comment

* UI: Add patch route and implement Page::Secret::Patch page component (sidebranch) (#28192)

* add tab to each route

* and path route

* add overview tab to tests

* update overview to use updated_time instead of created_time

* redirect relevant secret.details to secret.index

* compute secretState in component instead of pass as arg

* add capabilities service

* add error handling to fetchSubkeys adapter request

* add patch route and put in page component

* add patch secret action to subkeys card

* fix component name

* add patch capability

* alphabetize computed capabilities

* update links, cleanup selectors

* fix more merge conflict stuff

* add capabilities test

* add models to patch link

* add test for patch route

* rename external route

* add error templates

* make notes about enterprise tests, filter one

* remove errors, transition (redirect) instead

* redirect patch routes

* UI: Move fetching secret data to child route (#28198)

* remove @secret from metadata details

* use metadata model instead of secret in paths page

* put delete back into kv/data adapter

* grant access in control group test

* update metadata route and permissions

* remove secret from parent route, only fetch in details route

* change more permissions to route perms, add tests

* revert overview redirect from list view

* wrap model in conditional for perms

* remove redundant canReadCustomMetadata check

* rename adapter method

* handle overview 404

* remove comment

* add customMetadata as an arg

* update grantAccess in test

* make version param easier to follow

* VAULT-30494 handle 404 jira

* refactor capabilities to return an object

* update create tests

* add test for default truthy capabilities

* remove destroy-all-versions from kv/data adapter

* UI: Add enterprise checks (#28215)

* add enterprise check for subkey card

* add max height and scroll to subkey card

* only fetch subkeys if enterprise

* remove check in overview

* add test

* Update ui/tests/integration/components/kv/page/kv-page-overview-test.js

* fix test failures (#28222)

* add assertion

* add optional chaining

* create/delete versioned secret in each module

* wait for transition

* add another waitUntil

* UI: Add patch latest version to toolbar (#28223)

* add patch latest version action to toolbar

* make isPatchAllowed arg all encompassing

* no longer need model check

* use hash so both promises fire at the same time

* add subkeys to policy

* Update ui/lib/kv/addon/routes/secret.js

* add changelog

* small cleanup items! (#28229)

* add conditional for enterprise checking tabs

* cleanup fetchMultiplePaths method

* add test

* remove todo comment, ticket created and design wants to hold off

* keep transition, update comments

* cleanup tests, add index to breadcrumbs

* add some test coverage

* toggle so value is readable
2024-08-29 16:38:39 -07:00
claire bontempo
581c999f56
UI: Build kv v2 patch page (#28114)
* build patch component

* pass submit error to child component

* add copyright header

* aphabetize

* rename kv-patch components

* build json editor patch form

* finish patch component and tests

* use baseSetup in other kv tests

* small styling changes

* remove linting conditional, set json editor value on change

* rename subkeys card

* add reveal component to both patch forms

* implement subkeys card

* add copyright header, add transition assertions

* assert flash spy

* add assertion for empty values

* separate tests into it does not submit module

* update flash copy
2024-08-22 12:47:59 -07:00
claire bontempo
30da9aef46
UI: Build KV v2 overview page (#28106)
* move date-from-now helper to addon

* make overview cards consistent across engines

* make kv-paths-card component

* remove overview margin all together

* small styling changes for paths card

* small selector additions

* add overview card test

* add overview page and test

* add default timestamp format

* cleanup paths test

* fix dateFromNow import

* fix selectors, cleanup pki selectors

* and more selector cleanup

* make deactivated state single arg

* fix template and remove @isDeleted and @isDestroyed

* add test and hide badge unless deactivated

* address failings from changing selectors

* oops, not ready to show overview tab just yet!

* add deletionTime to currentSecret metadata getter
2024-08-16 14:40:23 -07:00
claire bontempo
08a999f0fa
UI: Fix toast message text when deleting a kv v2 secret (#28093)
* VAULT-29995 fix flash grabbing status from state

* add test

* add changelog

* add test for destroyed copy
2024-08-15 10:49:43 -07:00
claire bontempo
eaf47c4c00
UI: Build kv-patch-editor form (#28060)
* build kv-patch-editor component

* add tests

* use validator helpers in kv-object-editor

* update class name in version-history

* remove is- from css class

* move whitespace warning and non-string values warning messages to validators util

* break editor component into smaller ones

* fix typo

* add docs

* rename files and move to directory, add tests for new templates

* fix some bugs and add tests!

* fix validation bug and update tests

* capitalize item in helper

* remove comment

* and one more comment change
2024-08-14 11:52:33 -07:00
Chelsea Shaw
ec5dfceaa2
update imports of getOwner to be from @ember/owner (#27953) 2024-08-02 10:58:15 -05:00
claire bontempo
fe18e6ca87
UI: add subkey request to kv v2 adapter (#27804)
* add subkey request to ui

* WIP kv subkey display

* revert subkey changes to see view in ui

* finish subkey component

* remove reamining user facing changes

* update jsdoc

* add subtext depending on toggle

* finish tests

* organize adapter tests into modules

* add adapter tests

* woops, make beforeEach

* encode paths and add wrap secret test

* reword subkey component

* extract subkey path logic into util

* extract subkey path logic into util

* rename yielded subtext block
2024-07-29 13:12:40 -07:00
Angel Garbarino
d5e836b143
Title case all static breadcrumbs (#27808)
* title case all static breadcrumb labels

* test fixes

* add missing model
2024-07-19 11:57:53 -06:00
claire bontempo
e88b6b117e
UI: update overview card action handling (#27785)
* yield all overview card actions

* yield remaining overview card content to the correct block

* close overview card in test

* fix typo

* fix route typo, add selectors where needed

* fix class typo add one more selector
2024-07-16 12:40:35 -07:00
Angel Garbarino
2e0db217c2
Title case "Secrets" in breadcrumbs to route secret (#27144)
* title case all Secrets to route secret breadcrumbs

* fix kv navigation test

* welp missed some kv tests
2024-05-21 08:19:28 -06:00
Angel Garbarino
66268d6648
UI Bug fix, cursor jumps in KVv2 after initial input (#27120)
* the fix

* changelog

* fix tests

* fix kv test

* fix
2024-05-20 09:03:38 -06:00
Angel Garbarino
5a1c454a56
replace clipboard copy text (#27045) 2024-05-15 10:40:44 -06:00
claire bontempo
477aa73c75
remove slash (#26898) 2024-05-09 14:27:33 +00:00
Chelsea Shaw
c02787cd8f
UI: upgrade Ember to 5.4 (#26708) 2024-05-07 11:34:21 -05:00
Chelsea Shaw
2a99b3651f
UI: Update engine dropdowns (#26806)
* Update search-select component
- Add aria-label arg
- use label or humanized ID as fallback aria-label
- protect against non-array options arg

* remove overflow-x rule on toolbar-scroller so dropdowns can render in place

* add renderInPlace to dropdowns in pki engine

* Update replication package.json and add renderInPlace

* Add renderInPlace to search-select and basic-dropdown in engines (kubernetes, kv, ldap, sync)

* small cleanup
2024-05-03 12:09:03 -05:00
Chelsea Shaw
aa95f003a8
UI: Ember 5 deprecation stragglers (#26666)
* use router for transitions within replication engine

* fix inverse value on group-alias belongsTo relationship

* Always call super.willDestroy after custom hooks

* fix deprecation ember-engines.deprecation-camelized-engine-names

* graceful fallback on message-error if adapterError does not include errors

* use router.replaceWith during tests on logout

* fix more links
2024-04-30 11:22:08 -05:00
Chelsea Shaw
9efa76ac4c
UI: Add necessary params to links in Access & KV v2 (#26561)
* refactor tabs-for-auth-section helper

* Fill out route params in generated-item + list compoenents

* Add optional route params to ListView pagination

* Add backend to KV breadcrumb link route models

* fix links in kv v2 pages, update kv-breadcrumbs-test

* remove todo
2024-04-23 14:36:08 +00:00
Noelle Daley
f08c91dfa5
[Embroider] fix imports to unblock Embroider adoption (#26296)
* chore: use ember-cli-babel for TS compliation instead of ember-cli-typescript

* chore: fix import paths to be ES module compatible

* chore(test): fix setupControlGroup helper import

* chore: fix engine definitions and swagger-ui imports

* update lockfile

* chore: remove babel inline-json-import

---------

Co-authored-by: Matthew Irish <matthew@hashicorp.com>
2024-04-22 12:03:44 -07:00
Angel Garbarino
ef3293fe35
remove action class that no longer has a defintion (#26191) 2024-03-27 13:19:21 -06:00
Noelle Daley
4f6aef6664
update HDS and ember-flight-icons (#25946)
* chore: update hds and flight-icons

* fix: add missing deps and use .css from HDS

* update HDS components to new syntax

* database-connection-edit: add @waitFor to fix rotate-related acceeptance tests

* use stub to fix confirm-modal-test

---------

Co-authored-by: Alexey Kulakov <uni_que@me.com>
2024-03-18 10:42:45 -07:00
Chelsea Shaw
aa5d9f7b49
UI: Ember 5 deprecations: filterBy, mapBy, auto location (#25546)
* Replace all mapBy

* Replace findBys

* Remove auto location https://deprecations.emberjs.com/v4.x/\#toc_deprecate-auto-location

* fixes

Co-authored-by: Kianna <30884335+kiannaquach@users.noreply.github.com>
2024-02-21 18:45:00 +00:00
Chelsea Shaw
36c24e76f5
UI: add message when copy fails (#25479)
* Add flash message when copy fails for copy button

* Add flash message when copy fails for copy snippet

* changelog

* Fix config-ssh onError
2024-02-16 11:29:29 -06:00
Angel Garbarino
44af0978e6
Replace all service injects with updated import syntax (#25367)
* replace all injects with import syntax

* Delete ui/app/components/identity/_popup-base.js
2024-02-13 10:00:31 -07:00
claire bontempo
fe56069f67
UI: Hds::Dropdown replace PopupMenu (#25321) 2024-02-09 12:38:14 -06:00
Chelsea Shaw
7c14aa6e00
UI: KV version 2 advanced secret updates (#25235)
* Show JSON editor by default if secret data is complex, but do not disable JSON toggle

* Add text object warning to kv object editor

* a11y fix: do not disable show diff toggle

* test and language cleanup

* update language

* Update tests for expected behavior

* language!

* Add changelog
2024-02-06 11:50:22 -06:00
claire bontempo
79ed357954
UI: Make empty state links consistent (#25209)
* round one of updating empty state actions

* second round of empty states

* update tests

* add changelog
2024-02-02 16:56:53 -08:00
Angel Garbarino
a4c8ce62fc
Bug fix: Update KV data when you change the version of a nested secret (#25152)
* wip need to address testing but want to test something quick on 1.13

* add test coverage

* changelog

* update test comment

* rename getter

* Update kv-data-fields.hbs

revert accidental next step

* linting things
2024-02-01 12:24:21 -07:00
Chelsea Shaw
e09fd3fbbe
UI: Update flight icons (#24823) 2024-01-11 15:19:16 -06:00
claire bontempo
2cabfe0143
Secrets Sync UI: Add purge delete progress and error banner to destination header (#24761)
* add deletion in progress banner

* update kv details banner to inline alert

* add logic for purge error

* add params to mirage

* comment in purge_initiated_at for mirage

* update flash message for deleting

* add test for banner

* transition to destination associations after delete

* redirect to details after delete instead of list

* remove attrs from serializer

* update mirage handler to mock purge_initiated_at
2024-01-10 21:07:10 -07:00