Commit Graph

367 Commits

Author SHA1 Message Date
Matthew Irish 07613fc4a6
pgp list fix (#7542)
* add data selectors

* add tests for pgp-list component and refactor so initialization works

* fix comment

* fix linting

* add else statement
2019-10-09 21:09:25 -05:00
Matthew Irish 2658f902bc
don't abort transitions if you're already on that route (#7602) 2019-10-09 11:38:20 -05:00
Matthew Irish 7f80626162
UI - namespace fixes (#7587)
* check for model in the edit form before rolling back

* make sure namespace service name is consistent in the auth service

* actually tell it what service to inject
2019-10-07 20:41:04 -05:00
Noelle Daley 899f0dc2cb
do not swallow ControlGroupErrors when viewing or editing kvv2 secrets (#7504)
* do not swallow ControlGroupErrors when viewing or editing kvv2 secrets

* test kv v2 control group workflow

* do not manually clearModelCache when logging out since this already happens when leaving the logout route

* remove pauseTest

* update comments

* wip - looking into why restricted user can see the control group protected secret after it has already been unwrapped once

* strip version from query params so we can unwrap a secret after it is authorized

* use attachCapabilities instead of lazyCapabilities to ensure models are cleaned up properly

* remove comment

* make ControlGroupError extend AdapterError

* fix broken redirect_to test

* one day i will remember to remove my debugger statements; today is not that day

* no need to check for a ControlGroupError since it extends an AdapterError

* see if using EmberError instead of AdapterError fixes the browserstack tests

* Revert "see if using EmberError instead of AdapterError fixes the browserstack tests"

This reverts commit 14ddd67cacbf1ccecb8cc2d1f59a2c273866da72.
2019-10-04 13:15:33 -07:00
Matthew Irish 8d9d8e3d0e
UI wrapped token fix (#7398)
* default to token auth method

* pass in selectedValue to the AuthForm

* adjust when and if tasks are called so there's no race condition with wrapped_token query param

* add some tests for wrapped_token

* adjust redirect_to behavior so that it also works with the logout route and the wrapped_token query param

* fix linting
2019-10-01 15:30:56 -05:00
Matthew Irish c5ade0897e
UI CI exit 1 if there's an error (#7399)
* exit 1 if there's an error

* fix failing confirm tests

* still need to exit the process 😂
2019-10-01 14:57:37 -05:00
Matthew Irish a237d66213
fix typo (#7394) 2019-09-03 14:15:57 -05:00
Noelle Daley d52d324df4
Ui/fix component story generators (#7377)
* remove ember-cli-valid-component-name since we no longer need it

* component names no longer need to contain a hyphen

* remove Husky from README since we no longer use it

* update Storybook example

* update JSDoc examples and fix params table header
2019-08-28 14:47:43 -07:00
Noelle Daley 716f25162a
Ui/redesign delete confirmation (#7271)
* add initial Confirm component to secrets list page

* use ember-wormholes to render confirmation message

* use maybe-in-element instead of ember-wormhole

* hide overlay initially

* animate confirm overlay left and right on click

* hide overlay in the DOM to properly set height

* adjust height when showing/hiding confirm-overlay

* disable confirmation buttons until trigger has been rendered

* adjust height of confirm-wrapper instead of confirm

* move Confirm/ to core

* only add style attribute when a height property exists

* fix indentation

* wip - use new Confirm inside status menu

* add Confirm to Storybook

* ensure confirm links have proper styling in Storybook and outside popup-menu

* fix height transition

* disable no-inline-styles

* add test selector

* remove comment

* consolidate Message into Trigger to make Confirm easier to use

* use new Trigger API in status menu

* remove height transition

* fix binding inline style warning

* rename confirmMessage to message

* update Confirm for Storybook

* fix indentation

* do not pass in onCancel from outer template because it is static

* add jsdoc comments to Trigger

* wip - add trigger and confirm to storybook

* fix status menu styling

* fix styling of confirm stories

* use new Confirm on secrets engine list

* use bulma speed variable

* fix indentation

* re-renable eslint no-inline-styles

* showConfirm when rendered trigger matches id

* fix background color on namespace picker

* do not expose onTrigger

* Revert "re-renable eslint no-inline-styles"

This reverts commit c7b2a9097f177a2876afaaec6020f73b07bad3c7.

* rename Confirm Trigger to Message

* add tests

* update JSDocs

* focus trigger after cancelling the confirm message

* update Confirm JSDocs

* differentiate between ConfirmAction and Confirm

* add Message to Storybook

* re-enable eslint import/extensions

* update confirmButtonText to Revoke token

* remove linebreak and extra whitespace

* fix typo

* add loading to empty button

* fix more typos

* only show Message contents when showConfirm is true

* no need to disable the confirm buttons since they only render in the DOM when showConfirm is true

* use Confirm to delete aws roles

* use Confirm to delete pki roles

* use Confirm to delete ssh roles

* add Confirm to entity alias page

* fix confirm button text on Revoke token in status menu

* ensure you can use tab to revoke a token from status menu

* reset the open trigger after the confirm has been confirmed

* use Confirm on identity list pages

* fix Disable engine confirmation text

* use <PopupMenu /> angle brack syntax

* use Confirm on policies list page

* use Confirm for namespaces

* use Confirm for kmip scopes

* use Confirm for deleting kmip roles

* use Confirm for revoking KMIP credentials

* fix Revoke token triggerText
2019-08-27 15:50:53 -07:00
Matthew Irish ca80c9fa79
fix namespace picker so that it always expands into an object when co… (#7333)
* fix namespace picker so that it always expands into an object when constructing a tree

* sort namespaces lexicographically

* fix linting
2019-08-22 14:00:53 -05:00
Matthew Irish 9147ae64bc
Ui search select fix (#7338)
* update to latest ember-power-select-with-create

* guard against options and model not being defined

* add test for select with no options
2019-08-22 13:57:02 -05:00
Noelle Daley 1e58c46ca9
Ui/dismiss status menu click (#7337)
* dismiss status menu on click instead of hover

* allow redirect on 204
2019-08-19 14:36:22 -07:00
Matthew Irish 4a1013e915
Update ui dependencies (#7244)
* be more specific about node version, and specify a yarn version

* update ember, ember-cli, ember-data, ember-data-model-fragments

* use router handlers to access transition information

* fix shadowing of component helper

* update ivy-codemirror, ember-cli-inject-live-reload

* remove custom router service

* don't use transition.queryParams

* update ember-cli-deprecation-workflow

* refactor kv v1 to use 'path' instead of 'id' on creation

* fix auth-jwt-test and toolbar-link-test

* update ember composable helpers

* remove Ember.copy from test file

* no more deprecations in the workflow

* fix more secret tests

* fix remaining failed tests

* move select component to core because it's used by ttl-picker

* generate new model class for each test instead of reusing an existing one

* fix selectors on kmip tests

* refactor how control groups construct urls from the new transition objects

* add router service override back in, and have it be evented so that we can trigger router events on it

* move stories and markdown files to core if the component lives in core

* update ember-cli, ember-cli-babel, ember-auto-import

* update base64js, date-fns, deepmerge, codemirror, broccoli-asset-rev

* update linting rules

* fix test selectors

* update ember-api-actions, ember-concurrency, ember-load-initializers, escape-string-regexp, normalize.css, prettier-eslint-cli, jsdoc-to-markdown

* remove test-results dir

* update base64js, ember-cli-clipboard, ember-cli-sass, ember-cli-string-helpers, ember-cli-template-lint, ember-cli-uglify, ember-link-action

* fix linting

* run yarn install without restoring from cache

* refactor how tests are run and handle the vault server subprocess

* update makefile for new test task names

* update circle config to use the new yarn task

* fix writing the seal keys when starting the dev server

* remove optional deps from the lockfile

* don't ignore-optional on yarn install

* remove errant console.log

* update ember-basic-dropdown-hover, jsonlint, yargs-parser

* update ember-cli-flash

* add back optionalDeps

* update @babel/core@7.5.5, ember-basic-dropdown@1.1.3, eslint-plugin-ember@6.8.2

* update storybook to the latest release

* add a babel config with targets so that the ember babel plugin works properly

* update ember-resolver, move ember-cli-storybook to devDependencies

* revert normalize.css upgrade

* silence fetchadapter warning for now

* exclude 3rd party array helper now that ember includes one

* fix switch and entity lookup styling

* only add -root suffix if it's not in versions mode

* make sure drop always has an array on the aws role form

* fix labels like we did with the backport

* update eslintignore

* update the yarn version in the docker build file

* update eslint ignore
2019-08-19 15:45:39 -05:00
Matthew Irish effe7320d5
change input to textarea and use autosize on them (#7254)
* change input to textarea and use autosize on them

* fix some tests
2019-08-14 10:02:16 -05:00
Matthew Irish a4b6bb8626
kv v2 display bugs (#7307)
* fix switch css

* allow breadcrumbs container to grow if it's overflowed so that it's still usable

* close the dropdowns on destructive actions that cause a route refresh

* use new attachCapabilities for context menus on auth methods to get rid of an error
2019-08-13 16:54:51 -05:00
Madalyn d3bc388b31
remove double slash from generated api endopints in generated adapter (#7299)
remove double slash from generated api endopints
2019-08-12 14:27:37 -04:00
Matthew Irish c642b814d4
move replication-actions into core addon so that secondary recovery works (#7226)
* move replication-actions component into core addon so that secondary recovery works

* move the rest of replication action components
2019-08-05 14:05:32 -05:00
Matthew Irish 3da6487cf4
UI - support redirecting to an intended URL after authentication (#7088)
* add redirect_to query param

* alias auth controller state to vault controller where the query param is defined

* capture the current url before redirecting a user to auth if they're being redirected

* consume and reset the redirectTo query param when authenticating

* make sure that the current url when logging out does not get set as the redirect_to query param

* add unit tests for the mixin and make it so that redirects from the root don't end up in redirect_to

* acceptance tests for redirect
2019-08-01 18:50:43 -05:00
Matthew Irish 1a7a71385a
parse web CLI input as shell input (#7206)
* add shell quote

* use shell quote's parse method to properly escape strings entered in the web cli

* add and update tests for the web CLI

* fix linting and skip test for ' in a path

* skip the correct test
2019-08-01 17:12:04 -05:00
Matthew Irish 88cf9e6a76
clear namespaces on logout and properly render nested namespaces in the namepace picker (#7186)
* reset namespace cache when a user logs out

* fix issue where if you log in to a namespace with an initial /, nested namespaces would not show up in the navigation

* set an empty list of namespaces instead of ignoring error

* add tests for namespace bugs

* use this consistently in template
2019-08-01 16:53:57 -05:00
Noelle Daley 828185db49
UI/add select dropdown (#7102)
* add SelectDropdown

* use SelectDropdown instead of HttpRequestsDropdown

* use html selector instead of class name

* ensure SelectDropdown still works when rendered inside a Toolbar

* add tests

* remove old HttpRequests component

* make SelectDropdown example easier to read in Storybook

* add isFullwidth prop

* add SelectDropbown inside a Toolbar story

* fix tests

* remove actions block and call this.onChange directly

* replace dropdownLabel with label

* rename SelectDropdown to SelecT

* add test for onChange

* remove selectedItem prop since we don't need it

* make Select accept options as an array of strings or objects

* Revert "remove selectedItem prop since we don't need it"

This reverts commit 7278516de87bb1df60482edb005137252819931e.

* use Select inside TtlPicker

* remove debugger

* use a test selector

* fix pki test selectors

* improve storybook docs

* fix selected value in ttl picker

* ensure httprequests dropdown updates the selected item

* ensure select dropdown correctly matches selectedItem

* rename selectedItem to selectedValue

* remove debugger lol

* update selectedItem test

* add valueAttribute and labelAttribute to Storybook knobs

* udpate jsdocs

* remove old httprequestsdropdown component

* add note that onChange will receive value of select

* use Select inside AuthForm

* use correct test selector
2019-08-01 14:35:18 -07:00
Matthew Irish 11508c78a4
add a test to verify the api explorer basic loading and funtionality works (#7200) 2019-08-01 16:18:47 -05:00
Matthew Irish 29a85fa1c5
UI kmip acceptance (#7129)
* change the story blueprint so that using -ir will generate a story in the expected place for in-repo addons and engines

* update gen-story-md script to do output md to stories folder inside of in-repo addons and engines

* update storybook config to look for story files in /lib

* add story for list-view component

* add list view page object

* add kmip page objects and tests

* update storybook commands in the README

* split tests up more

* update var name in storybook
2019-08-01 16:04:59 -05:00
Matthew Irish 7437dc9821
ancestorKeysForKey always returns an array (#6205) 2019-08-01 15:49:37 -05:00
Sam Salisbury e211a081ce
ci: remove travis config + all refs (#7122) 2019-07-25 11:10:31 +01:00
Matthew Irish cc3c9e3072
don't specify yarn in engines for now (#7181) 2019-07-24 10:37:33 -05:00
Sam Salisbury 75b84a40b6
ci: re-enable browserstack tests (#7123)
* ci: re-enable browserstack tests ...

- Also sets "strict mode" bash with -euo pipefail at executor level.

* ci: Makefile: more compatible SHELL var

* ci: remove some trailing whitespace

* ci: remove redundant set -eux -o pipefail

- In some cases, just replace with -x where debug output might be useful.
- In most cases, don't bother with -x, it is a secret leak risk, and
  circleci prints the command body before executing it anyway.

* try specifying yarn version

* set yarn version

* Revert "try specifying yarn version"

This reverts commit 6b4e57a304d999d72d4b07468a6b4a30880f1f4c.
2019-07-24 14:13:41 +01:00
Matthew Irish b0dfbde741
UI kmip scope delete and role form (#7169)
* always use ?force for kmip scope delete

* update the delete message when deleting a scope

* support disabling and not showing help text for checkboxes

* group TLS fields and render new allowed operations widget

* add operation-field-display component for kmip roles

* use operation-field-display component

* switch glyph for false value in info-table-row

* divvy up roles and tls

* fix JSDoc - showHelpText defaults to true

* fix tests and linting

* rename vars in operation-field-display component

* make the action name clearer re: what it's actually doing

* align the allowed-ops header

* show all operations as checked if you check to allow all
2019-07-23 16:00:00 -05:00
Madalyn 18fa9e418c
UI OpenAPI fixes: itemType pluralization, hide deprecated attrs, utilize apiPath, fix get param label (#7166) 2019-07-23 15:56:22 -04:00
Noelle Daley 2c65f5d313
update selected item on httprequestsdropdown (#7164) 2019-07-22 11:26:45 -07:00
Noelle Daley c5b5127fc4
check for the correct path when showing entities sidenav item (#7141)
* check for the correct path when showing entities sidenav item

* update tests to check for correct api path

* remove trailing slash
2019-07-18 14:24:30 -07:00
Noelle Daley 4ac26156c8
Ui/http request fixes (#7128)
* ensure dropdown updates selected item

* ensure no duplicate ticks

* handle case where counters are Dates instead of strings so bar chart filters in Storybook
2019-07-16 16:26:49 -07:00
Matthew Irish 96eea4f7f9
update handlebars (#7084) 2019-07-08 08:20:12 -05:00
Matthew Irish d23bef606a
Actually lazy load swagger ui (#7067)
* switch to dynamic imports so that bundling doesn't include swagger-ui-dist in its vendor file

* remove ember-ajax

* delete comment

* update comment about lazy loading in the engine index.js
2019-07-05 10:28:41 -05:00
Noelle Daley a045f206f8
Fix barchart bugs (#7063)
* ensure dropdown works in storybook by handling Dates and strings

* camelcase fix

* ensure tooltip doesn't blink
2019-07-03 13:52:56 -07:00
Noelle Daley 5cd7e924fe
Http request volume/dropdown (#7016)
* init dropdown

* add dropdown to storybook

* move http requests components into container

* add event handler for selecting new time window

* no need for this. in the template

* filter bar chart and table

* add bar chart transitions

* handle Last 12 Months in dropdown

* don't use fake data

* start tests

* add jsdoc and notes for storybook

* add container to storybook

* compute filteredCounters when counters change

* move static dropdown options to template

* add tests

* style the dropdown

* use this.elementId

* fix linting errors

* use ember array extensions

* use fillIn instead of page object and make dom assertions consistent

* calculate the correct percent change between months

* use data-test selector instead of id

* show plus or minus next to percent change
2019-07-03 10:46:40 -07:00
Matthew Irish 267d5e7e40
make style overrides more specific because loading order isn't guaranteed (#7049) 2019-07-03 08:17:14 -05:00
Matthew Irish 311cc49c61
UI - Vault API explorer engine (#7044)
* open-api-explorer engine with embedded swagger-ui

* move swagger config to a component, rely directly on swagger-ui

* filter operations by endpoint, hook up filter to query param, add namespace handling

* fix namespace handling

* update ember-engines so that we can app.import in a lazy engine

* use engine's included hook to move swagger-ui to engine-vendor.* files

* show flash message about this being a live vault server

* show a namespace reminder and override some styles from swagger-ui

* switch filter to use includes instead of startsWith

* move flash-message to alert-banner and fix namespace reminder with a block

* adds explore web-cli command to navigate to the api-explorer engine

* allow passing a preformatted string to flash messages

* add multi-line flash-message to api explorer

* invert control and trigger events on react app so we can control the layout more and use our components

* tweak styling some more and adjust message on the flash

* change web cli command from 'explore' to 'api'

* shorten namespace warning

* fix console

* fix comments
2019-07-02 17:41:23 -05:00
Matthew Irish ddf8c20219
UI - add delete for the various kmip models (#7015)
* add menu-loader component to show menu loading button when the model relationship isPending

* list what keys we've got in api-path error

* fix spacing issue on error flash

* add an action on list-controller that bubbles to the list-route mixin to refresh the route

* empty store when creating scopes

* don't delete _requestQuery in the loop, do it after

* add scope deletion from the scope list

* add deleteRecord to kmip adapters

* add model-wrap component

* delete role from detail page and list

* add revoke credentials functionality

* fix comment

* treat all operations fields specially on kmip roles

* adjust kmip role edit form for new fields

* fix api-path test

* update document blocks for menu-loader and model-wrap components
2019-07-02 16:23:07 -05:00
Madalyn 910f615bf5
UI: Clean up Dynamic UI for CRUD (#6994) 2019-07-01 16:35:18 -04:00
Matthew Irish 887e2febf8
UI - dynamic related capabilities (#7013)
* lay groundwork for application serializer to setup capabilities relationships

* add api path util and tests, and attach-capabilites fn

* make attach-capabilities work with array responses, add tests
2019-06-28 16:07:45 -05:00
Matthew Irish 9fccccb0ec
UI KMIP CA (#6983)
* move download-button and toolbar-download-button to core addon

* add ca model and adapter and show CA on the engine configuration page

* add other side of model relationship for kmip ca<->config
2019-06-26 11:02:05 -05:00
Noelle Daley 4c9dec60b7
UI: Add HTTP Requests Bar Chart Tooltip (#6972)
* initialize tooltip

* style tooltip

* show date in tooltip

* show tooltip on hover

* style tooltip

* add hover padding for when bar is very short

* add tooltip test and format tooltip date

* revert to using real data

* update comment about binding the tooltip to shadowBars

* remove d3array

* use double colons for pseudo elements

* use elementId in bars-container id name to prevent clashing

* use Object.freeze to eliminate linting error
2019-06-25 15:36:33 -07:00
Matthew Irish 68f3b90978
UI - kmip role edit form (#6973)
* extend edit form with a custom kmip role form

* adjust model fields and use new kmip role edit form

* customize serialize adapter hook for kmip/role

* refresh list routes in the list mixin

* style up kmip role edit form

* return a promise from preSave so that the queue helper waits to call save

* add serialize tests for the kmip/role adapter

* rename component to edit-form-kmip-role

* add tests for edit-form-kmip-role

* add some clarifying comments

* make input more realistic in tests

* remove delete toolbar
2019-06-25 15:57:50 -05:00
Matthew Irish 2fdfc7a667
only use ember-qunit, ember-cli-qunit is deprecated (#6978) 2019-06-25 11:19:01 -05:00
Matthew Irish f0d7dc9a6d
UI - add kmip engine (#6936)
* add kmip engine

* adjust where kmip engine is mounted and sketch out routes

* add secret mount path service to share params to engines

* move list-controller and list-route mixins to core addon and adjust imports

* properly link kmip secrets from the secrets list page

* tweak routes and add list controllers

* stub out some models and adapters

* fix mixin exports

* move a bunch of components into the core addon

* use new empty yield in list-view in the namespace template

* scopes list using list-view and list-item components

* simplify and flatten routes, templates for all of the list pages

* role show route and template and scope create template

* add ember-router-helpers

* add more packages to the dependencies of the core addon

* add field-group-show component for listing fields from a model

* move more components to the shared addon

* make configure and configuration routes work and save a generated model

* save and list scopes

* role create, list, read

* list credentials properly

* move allowed attributes to field group

* show allowed operations on role details page

* add kmip logo to mount secrets engine list page

* add role edit page

* show all model attributes on role show page

* enable role edit

* fix newFields error by creating open api role model on the role list route

* only show selected fields on role edit page

* do not send scope and backend attrs to api

* move path-or-array to core addon

* move string-list component to core addon

* remove extra top border when there is only one field group

* add icons for all of the list pages

* update kmip config model so defaultValue doesn't error

* generate credentials

* credential create and show

* only show kmip when feature is enabled

* fix saving of TTL fields generated from Open API

* move masked-input and list-pagination components to core addon

* add param on edit form to allow for calling onSave after render happens

* polish credential show page and redirect there after generating credentials

* add externalLink for kmip engine

* add kmip-breadcrumb component

* use kmip-breadcrumb component

* add linkPrefix param to linked-block component to allow for routing programmatically inside an engine

* redirect to the right place when enabling kmip

* fix linting

* review feedback

* update signature for path-help usage

* fix ttl field expansion test

* remove role filed from role form, fix generate redirect

* remove field-group-show because it's in the core addon

* remove bottom rule from show pages

* fix Max TTL displayAttrs for ssh role

* update edit-form to take fields or attrs

* fix linting

* remove listenAddrs and set default val on ttl if a val is passed in
2019-06-21 16:05:45 -05:00
Madalyn 8338b9b0e3
OpenAPI CRUD views (#6702)
Dynamically generate views from OpenAPI document to List/CRUD LDAP users and groups in the UI
2019-06-21 11:18:26 -04:00
Matthew Irish 99899a3ebb
UI - cross-browser svg scaling fixes (#6933)
* fix icon sizing in firefox

* specify height becuase IE likes to make things way too tall
2019-06-20 10:55:23 -05:00
Matthew Irish c49fb2e512
UI transit date fix (#6827)
* fix timestamp for aes-gcm and chacha-poly transit keys

* add test for transit-key serializer
2019-06-20 08:39:23 -05:00
Matthew Irish 757afb4de9
UI - no jquery (#6768)
* add no-jquery rule and move event listeners to ember-concurrency tasks

* remove unnecessary onchange and handleKeyDown actions

* add element.closest polyfill and convert linked-block to use native dom apis

* update pretender, fetch, page-object, add optional-features, remove ember/jquery

* turn off jquery inclusion

* remove jQuery.isPlainObject usage

* violatedDirective isn't always formatted the same

* use fetch and the ember-fetch adapter mixin

* move to fetch and lowercase headers for pretender

* display non-ember-data errors

* use new async fn test style and lowercase headers in auth service test

* setContext is not necessary with the new style tests and ember-cli-page-object - it actually triggers jquery usage

* update ember-fetch, ember-cli-pretender

* wait for permissions check

* lowercase header name in auth test

* refactor transit tests to one test per key type

* simplify pollCluster helper

* stop flakey tests by prefering the native fetch

* avoid uncaught TransitionAborted error by navigating directly to unseal

* unset model on controller after unloading it because controllers are singletons

* update yarn.lock
2019-06-20 08:37:27 -05:00