Ember upgrade to 3.28.6 (#14763)
* initial upgrade running ember-cli-update --to 3.28 * bumps node-sass version * fragments bump * fixes overriding errors prop on policy model causing issues * bumps some addon versions related to Ember Global deprecation warning on build * bumps back ember-test-selectors version for now * removes ember-promise-helpers addon and creates await helper * upgrades ember-template-lint and adds prettier plugin * Ember 3.28 Upgrade Lint Fixes (#14890) * fixes js lint errors * fixes hbs lint errors * allow multiple node versions for now to get tests runinng * fixes tests * Upgrade ember-test-selectors (#14937) * updates ember-test-selectors, ember-cli-page-object and ember-cli-string-helpers * adds attributeBindings to classic components with data-test property * glimmerizes toolbar-link component and removes data-test args * glimmerizes toolbar-secret-link and secret-link components and removes data-test and class args * glimmerizes linked-block component * glimmerizes toggle-button component * updates toggle-button test * fixes remaining test selector issues * comments out test assertions related to cp-validations bug * adds todo to comment * Model Validations (#14991) * adds model-validations decorator and validators util * converts key-mixin to decorator * updates models to use validations decorator instead of ember-cp-validations * updates invocation of model validations * removes ember-cp-validations * reverts secret-v2 model updates * adds initials to TODO comment * flight-icons (#14993) * flight-icons * basic dropdown * UI/merge main (#14997) * Vault documentation: changing references from learn to tutorial (#14844) * changed learn to tutorial references * changed learn to tutorial * Update website/content/docs/plugins/plugin-portal.mdx Co-authored-by: Yoko Hyakuna <yoko@hashicorp.com> * Update website/content/docs/platform/aws/run.mdx Co-authored-by: Yoko Hyakuna <yoko@hashicorp.com> Co-authored-by: Yoko Hyakuna <yoko@hashicorp.com> * UI/Only show form values if have read access (#14794) * only show value in edit form if has read capabilities * revert messing with form * delete secret data from secret * add check for selected version * remove added line * add changelog * modified text (#14854) * fixed a link issue (#14850) * docs: add known issue to 1.10 release notes (#14859) * Vault 3999 Change permissions for directory/archive created by debug command (#14846) * adding debug changes from ent * adding changelog * Vault 3992 ToB Config and Plugins Permissions (#14817) * updating changes from ent PR * adding changelog * fixing err * fixing semgrep error * updated references from learn to tutorial (#14866) * updated references from learn to tutorial (#14867) * changed reference from learn to tutorial (#14868) * Fix handling of default zero SignatureBits value with Any key type in PKI Secrets Engine (#14875) * Correctly handle minimums, default SignatureBits When using KeyType = "any" on a role (whether explicitly or implicitly via a sign-verbatim like operation), we need to update the value of SignatureBits from its new value 0 to a per-key-type default value. This will allow sign operations on these paths to function correctly, having the correctly inferred default signature bit length. Additionally, this allows the computed default value for key type to be used for minimum size validation in the RSA/ECDSA paths. We additionally enforce the 2048-minimum in this case as well. Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com> * Fix defaults and validation of "any" KeyType When certutil is given the placeholder any keytype, it attempts to validate and update the default zero value. However, in lacking a default value for SignatureBits, it cannot update the value from the zero value, thus causing validation to fail. Add more awareness to the placeholder "any" value to certutil. Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com> * Add role-based regression tests for key bits This adds regression tests for Key Type, Key Bits, and Signature Bits parameters on the role. We test several values, including the "any" value to ensure it correctly restricts key sizes. Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com> * Add sign-verbatim test for key type This ensures that we test sign-verbatim against a variety of key types. Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com> * Add changelog entry Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com> Co-authored-by: Steven Clark <steven.clark@hashicorp.com> * Subtle docs change for allow_store_key (#14889) * Subtle docs change for allow_store_key * errant space * Adds Vault version prerelease and metadata to logical.PluginEnvironment (#14851) * docs: fix formatting on plugin upgrade page (#14874) * docs: fix formatting on plugin upgrade page * fix more formatting issues * Update CC docs (#14714) * Update CC docs * Add sample response * Address review feedback * Update website/content/api-docs/system/internal-counters.mdx Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com> * Update website/content/api-docs/system/internal-counters.mdx Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com> * Update website/content/api-docs/system/internal-counters.mdx Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com> * Update website/content/api-docs/system/internal-counters.mdx Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com> * Update website/content/api-docs/system/internal-counters.mdx Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com> * Update website/content/api-docs/system/internal-counters.mdx Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com> * Update website/content/api-docs/system/internal-counters.mdx Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com> * Update website/content/api-docs/system/internal-counters.mdx Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com> * Update website/content/api-docs/system/internal-counters.mdx Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com> * Update website/content/api-docs/system/internal-counters.mdx Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com> * Update website/content/api-docs/system/internal-counters.mdx Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com> * Update website/content/api-docs/system/internal-counters.mdx Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com> * Update website/content/api-docs/system/internal-counters.mdx Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com> * Update website/content/api-docs/system/internal-counters.mdx Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com> * Update website/content/api-docs/system/internal-counters.mdx Co-authored-by: Meggie <meggie@hashicorp.com> * Update website/content/api-docs/system/internal-counters.mdx Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com> * Update website/content/api-docs/system/internal-counters.mdx Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com> * Minor edits * Update partial month API Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com> Co-authored-by: Meggie <meggie@hashicorp.com> * Docs improvements for Managed Keys (#14756) * Add more color around managed keys in their concepts page, and create additional links between the various docs pages related to them. * Typos * sdk/useragent: plugin version string consistent with Vault version string (#14912) * clean up (#14911) * website: fix usages of img tag (#14910) * fix usages of img tag and integrate dev-portal workflows * Adjust Makefile * remove mount_accessor from the docs (#14927) * Add extra test coverage to PKI (#14767) * Add PKI test for delete role - Create a role, validate that defaults are what we expect and delete the role, verifying it is gone on subsequent read attempts. * Add PKI test for crl/rotate command - Missing a unit test that validates the crl/rotate command works. The test validates the rotate command was successful by checking if we have a different/new update time on the CRL. * Rework PKI TestBackend_PathFetchValidRaw test to not write directly to storage - Rework the existing test to not write directly to storage as we might change that in the future. - Add tests that validate the ca_chain behaviour of not returning the root authority cert * PR Feedback * Additional PR feedback * Use WriteWithContext in auth helpers (#14775) * Add ability to pass certificate PEM bytes to vault/api (#14753) * Respect increment value in grace period calculations (api/LifetimeWatcher) (#14836) * Mount flag syntax to mitigate confusion from KV-v2 path discrepancies (#14807) * Add explanation to help text and flag usage text * KV get with new mount flag * Clearer naming * KV Put, Patch, Metadata Get + corresponding tests * KV Delete, Destroy, Rollback, Undelete, MetadataDelete, MetadataPatch, MetadataPut * Update KV-v2 docs to use mount flag syntax * Add changelog * Run make fmt * Clarify deprecation message in help string * Address style comments * Update vault-plugin-auth-gcp to newest pseudo-version (#14923) * docs: added hello-vault-spring repo link to developer-qs.mdx. (#14928) * Update developer-qs.mdx docs: added link to Java / Spring Boot sample app repo in developer quick start. * removed space. * trigger ci Co-authored-by: taoism4504 <loann@hashicorp.com> * OIDC Login Bug (#14916) * fixes issue logging in with oidc from listed auth path tab * adds changelog entry * adds more tests for oidc auth workflow * updates oidc auth method test to use non-standard path * Fix handling of SignatureBits for ECDSA issuers (#14943) When adding SignatureBits control logic, we incorrectly allowed specification of SignatureBits in the case of an ECDSA issuer. As noted in the original request, NIST and Mozilla (and others) are fairly prescriptive in the choice of signatures (matching the size of the NIST P-curve), and we shouldn't usually use a smaller (or worse, larger and truncate!) hash. Ignore the configuration of signature bits and always use autodetection for ECDSA like ed25519. Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com> * Bug Fix and Glimmerize secret-edit component (#14941) * inital glimmerize * wip * wip * wip * fix maybeQueryRecord * fix * fix * fix test * cleanup * add changelog * clean up * Agent error log level is mismatched (#14424) * [VAULT-1618] Agent error log level is mismatched `logLevelToStringPtr` translates `go-hclog`'s `ERROR` to `"ERROR"` for Consul Template's runner, but that expects `ERR` and is quite strict about it. This will address https://github.com/hashicorp/vault-k8s/issues/223 after it is set as the default image in `vault-k8s`. I didn't find a simple way to test this other than starting up a full server and agent and letting them run, which is unfortunately fairly slow. I confirmed that this addresses the original issue by modifying the helm chart with the values in this commit and patching the log level to `err`. * VAULT-1618 Add changelog/14424.txt * VAULT-1618 Update changelog/14424.txt based on @kalafut suggestion Co-authored-by: Jim Kalafut <jkalafut@hashicorp.com> * VAULT-1618 Move cancel and server stop into defer in tests * VAULT-1618 Triggering CircleCI tests * VAULT-1618 Replace ioutil with os functions for agent template tests Co-authored-by: Jim Kalafut <jkalafut@hashicorp.com> * UI/Add months to activity serializer (#14942) * add mock monthly data to mirage handler * add months to serializer for activity response * change selectors Co-authored-by: Chelsea Shaw <82459713+hashishaw@users.noreply.github.com> * clean up serializer * please stop being flakey <3 Co-authored-by: Chelsea Shaw <82459713+hashishaw@users.noreply.github.com> * Revert the WithContext changes to vault tests (#14947) * adding env var (#14958) * Fix dead link for JWT supported algorithms (#14953) * Don't clone OutputCurlString value (#14968) * Don't clone OutputCurlString value, add flag to docs * Add changelog * Ensure initialMmapSize is 0 on Windows (#14977) * ensure initialMmapSize is 0 on windows * add changelog * Vault 3992 documentation changes (#14918) * doc changes * adding config changes * adding chnages to plugins * using include * making doc changes * adding newline * aws auth displayName (#14954) * set displayName to include RoleSessionName * Add Windows error (#14982) * Warnings indicating ignored and replaced parameters (#14962) * Warnings indicating ignored and replaced parameters * Avoid additional var creation * Add warnings only if the response is non-nil * Return the response even when error is non-nil * Fix tests * Rearrange comments * Print warning in the log * Fix another test * Add CL * Fix edit capabilities call in auth method (#14966) * Fix edit capabilities call in auth method - Capabilities call was not getting triggered correctly as apiPath method was missing the correct context. * Added changelog * make linting fix Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com> Co-authored-by: Yoko Hyakuna <yoko@hashicorp.com> Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com> Co-authored-by: Austin Gebauer <34121980+austingebauer@users.noreply.github.com> Co-authored-by: akshya96 <87045294+akshya96@users.noreply.github.com> Co-authored-by: Alexander Scheel <alex.scheel@hashicorp.com> Co-authored-by: Steven Clark <steven.clark@hashicorp.com> Co-authored-by: Scott Miller <smiller@hashicorp.com> Co-authored-by: John-Michael Faircloth <fairclothjm@users.noreply.github.com> Co-authored-by: Vishal Nayak <vishalnayak@users.noreply.github.com> Co-authored-by: Meggie <meggie@hashicorp.com> Co-authored-by: Bryce Kalow <bkalow@hashicorp.com> Co-authored-by: Josh Black <raskchanky@users.noreply.github.com> Co-authored-by: Anton Averchenkov <84287187+averche@users.noreply.github.com> Co-authored-by: VAL <val@hashicorp.com> Co-authored-by: Robert <17119716+robmonte@users.noreply.github.com> Co-authored-by: mryan-hashi <88851444+mryan-hashi@users.noreply.github.com> Co-authored-by: taoism4504 <loann@hashicorp.com> Co-authored-by: Jordan Reimer <zofskeez@gmail.com> Co-authored-by: Christopher Swenson <swenson@swenson.io> Co-authored-by: Jim Kalafut <jkalafut@hashicorp.com> Co-authored-by: Chelsea Shaw <82459713+hashishaw@users.noreply.github.com> Co-authored-by: Tom Proctor <tomhjp@users.noreply.github.com> Co-authored-by: Jose Estrada <jose.estrada@tradeshift.com> Co-authored-by: Arnav Palnitkar <arnav@hashicorp.com> * skips kmip tests with concurrency issues for now * changelog * skips another test * Remove ModelWrap Component (#15001) * removes ModelWrap component which was not working in Ember 3.28 * removes kmip test skips * updates role controller class name * adds annotations to model-validations file * pr feedback * lint fixes after main merge Co-authored-by: Jordan Reimer <zofskeez@gmail.com> Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com> Co-authored-by: Yoko Hyakuna <yoko@hashicorp.com> Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com> Co-authored-by: Austin Gebauer <34121980+austingebauer@users.noreply.github.com> Co-authored-by: akshya96 <87045294+akshya96@users.noreply.github.com> Co-authored-by: Alexander Scheel <alex.scheel@hashicorp.com> Co-authored-by: Steven Clark <steven.clark@hashicorp.com> Co-authored-by: Scott Miller <smiller@hashicorp.com> Co-authored-by: John-Michael Faircloth <fairclothjm@users.noreply.github.com> Co-authored-by: Vishal Nayak <vishalnayak@users.noreply.github.com> Co-authored-by: Meggie <meggie@hashicorp.com> Co-authored-by: Bryce Kalow <bkalow@hashicorp.com> Co-authored-by: Josh Black <raskchanky@users.noreply.github.com> Co-authored-by: Anton Averchenkov <84287187+averche@users.noreply.github.com> Co-authored-by: VAL <val@hashicorp.com> Co-authored-by: Robert <17119716+robmonte@users.noreply.github.com> Co-authored-by: mryan-hashi <88851444+mryan-hashi@users.noreply.github.com> Co-authored-by: taoism4504 <loann@hashicorp.com> Co-authored-by: Christopher Swenson <swenson@swenson.io> Co-authored-by: Jim Kalafut <jkalafut@hashicorp.com> Co-authored-by: Chelsea Shaw <82459713+hashishaw@users.noreply.github.com> Co-authored-by: Tom Proctor <tomhjp@users.noreply.github.com> Co-authored-by: Jose Estrada <jose.estrada@tradeshift.com> Co-authored-by: Arnav Palnitkar <arnav@hashicorp.com>
This commit is contained in:
parent
8ebdf1ee5a
commit
3e2028441f
|
@ -0,0 +1,3 @@
|
|||
```release-note:change
|
||||
ui: Upgrade Ember to version 3.28
|
||||
```
|
|
@ -17,6 +17,7 @@
|
|||
# misc
|
||||
/coverage/
|
||||
!.*
|
||||
.*/
|
||||
.eslintcache
|
||||
|
||||
# ember-try
|
||||
|
|
|
@ -32,16 +32,15 @@ module.exports = {
|
|||
// node files
|
||||
{
|
||||
files: [
|
||||
'.eslintrc.js',
|
||||
'.prettierrc.js',
|
||||
'.template-lintrc.js',
|
||||
'ember-cli-build.js',
|
||||
'testem.js',
|
||||
'blueprints/*/index.js',
|
||||
'config/**/*.js',
|
||||
'lib/*/index.js',
|
||||
'scripts/start-vault.js',
|
||||
'server/**/*.js',
|
||||
'./.eslintrc.js',
|
||||
'./.prettierrc.js',
|
||||
'./.template-lintrc.js',
|
||||
'./ember-cli-build.js',
|
||||
'./testem.js',
|
||||
'./blueprints/*/index.js',
|
||||
'./config/**/*.js',
|
||||
'./lib/*/index.js',
|
||||
'./server/**/*.js',
|
||||
],
|
||||
parserOptions: {
|
||||
sourceType: 'script',
|
||||
|
@ -58,5 +57,10 @@ module.exports = {
|
|||
'node/no-unpublished-require': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
// Test files:
|
||||
files: ['tests/**/*-test.{js,ts}'],
|
||||
extends: ['plugin:qunit/recommended'],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
|
@ -1,14 +1,40 @@
|
|||
'use strict';
|
||||
const recommended = require('ember-template-lint/lib/config/recommended').rules; // octane extends recommended - no additions as of 3.14
|
||||
const stylistic = require('ember-template-lint/lib/config/stylistic').rules;
|
||||
|
||||
const testOverrides = { ...recommended, ...stylistic };
|
||||
for (const key in testOverrides) {
|
||||
testOverrides[key] = false;
|
||||
const fs = require('fs');
|
||||
let testOverrides = {};
|
||||
try {
|
||||
// ember-template-lint no longer exports anything so we cannot access the rule definitions conventionally
|
||||
// read file, convert to json string and parse
|
||||
const toJSON = (str) => {
|
||||
return JSON.parse(
|
||||
str
|
||||
.slice(str.indexOf(':') + 2) // get rid of export statement
|
||||
.slice(0, -(str.length - str.lastIndexOf(','))) // remove trailing brackets from export
|
||||
.replace(/:.*,/g, `: ${false},`) // convert values to false
|
||||
.replace(/,([^,]*)$/, '$1') // remove last comma
|
||||
.replace(/'/g, '"') // convert to double quotes
|
||||
.replace(/(\w[^"].*[^"]):/g, '"$1":') // wrap quotes around single word keys
|
||||
.trim()
|
||||
);
|
||||
};
|
||||
const recommended = toJSON(
|
||||
fs.readFileSync('node_modules/ember-template-lint/lib/config/recommended.js').toString()
|
||||
);
|
||||
const stylistic = toJSON(
|
||||
fs.readFileSync('node_modules/ember-template-lint/lib/config/stylistic.js').toString()
|
||||
);
|
||||
testOverrides = {
|
||||
...recommended,
|
||||
...stylistic,
|
||||
prettier: false,
|
||||
};
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
extends: ['octane', 'stylistic'],
|
||||
plugins: ['ember-template-lint-plugin-prettier'],
|
||||
extends: ['recommended', 'ember-template-lint-plugin-prettier:recommended'],
|
||||
rules: {
|
||||
'no-bare-strings': 'off',
|
||||
'no-action': 'off',
|
||||
|
@ -22,7 +48,7 @@ module.exports = {
|
|||
},
|
||||
ignore: ['lib/story-md', 'tests/**'],
|
||||
// ember language server vscode extension does not currently respect the ignore field
|
||||
// override all rules manually as workround to align with cli
|
||||
// override all rules manually as workaround to align with cli
|
||||
overrides: [
|
||||
{
|
||||
files: ['**/*-test.js'],
|
||||
|
|
|
@ -8,7 +8,7 @@ const B64 = 'base64';
|
|||
const UTF8 = 'utf-8';
|
||||
export default Component.extend({
|
||||
tagName: 'button',
|
||||
attributeBindings: ['type'],
|
||||
attributeBindings: ['type', 'data-test-transit-b64-toggle'],
|
||||
type: 'button',
|
||||
classNames: ['button', 'b64-toggle'],
|
||||
classNameBindings: ['isInput:is-input:is-textarea'],
|
||||
|
|
|
@ -2,4 +2,5 @@ import Component from '@ember/component';
|
|||
|
||||
export default Component.extend({
|
||||
'data-test-component': 'console/log-json',
|
||||
attributeBindings: ['data-test-component'],
|
||||
});
|
||||
|
|
|
@ -2,4 +2,5 @@ import Component from '@ember/component';
|
|||
|
||||
export default Component.extend({
|
||||
'data-test-component': 'console/log-text',
|
||||
attributeBindings: ['data-test-component'],
|
||||
});
|
||||
|
|
|
@ -2,5 +2,6 @@ import Component from '@ember/component';
|
|||
|
||||
export default Component.extend({
|
||||
'data-test-component': 'console/output-log',
|
||||
attributeBindings: ['data-test-component'],
|
||||
log: null,
|
||||
});
|
||||
|
|
|
@ -20,6 +20,7 @@ export default Component.extend({
|
|||
controlGroup: service(),
|
||||
store: service(),
|
||||
'data-test-component': 'console/ui-panel',
|
||||
attributeBindings: ['data-test-component'],
|
||||
|
||||
classNames: 'console-ui-panel',
|
||||
classNameBindings: ['isFullscreen:fullscreen'],
|
||||
|
|
|
@ -67,16 +67,16 @@ export default Component.extend({
|
|||
actions: {
|
||||
onKeyUp(name, value) {
|
||||
this.model.set(name, value);
|
||||
if (this.model.validations) {
|
||||
if (this.model.validate) {
|
||||
// Set validation error message for updated attribute
|
||||
this.model.validations.attrs[name] && this.model.validations.attrs[name].isValid
|
||||
? set(this.validationMessages, name, '')
|
||||
: set(this.validationMessages, name, this.model.validations.attrs[name].message);
|
||||
|
||||
const { isValid, state } = this.model.validate();
|
||||
if (state[name]) {
|
||||
state[name].isValid
|
||||
? set(this.validationMessages, name, '')
|
||||
: set(this.validationMessages, name, state[name].errors.join('. '));
|
||||
}
|
||||
// Set form button state
|
||||
this.model.validate().then(({ validations }) => {
|
||||
this.set('isFormInvalid', !validations.isValid);
|
||||
});
|
||||
this.set('isFormInvalid', !isValid);
|
||||
} else {
|
||||
this.set('isFormInvalid', false);
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ import Component from '@ember/component';
|
|||
|
||||
export default Component.extend({
|
||||
'data-test-hover-copy': true,
|
||||
attributeBindings: ['data-test-hover-copy'],
|
||||
classNameBindings: 'alwaysShow:hover-copy-button-static:hover-copy-button',
|
||||
copyValue: null,
|
||||
alwaysShow: false,
|
||||
|
|
|
@ -8,6 +8,7 @@ import { waitFor } from '@ember/test-waiters';
|
|||
export default Component.extend({
|
||||
flashMessages: service(),
|
||||
'data-test-component': 'identity-edit-form',
|
||||
attributeBindings: ['data-test-component'],
|
||||
model: null,
|
||||
|
||||
// 'create', 'edit', 'merge'
|
||||
|
|
|
@ -45,7 +45,7 @@ export default Component.extend({
|
|||
|
||||
showEnable: false,
|
||||
|
||||
// cp-validation related properties
|
||||
// validation related properties
|
||||
validationMessages: null,
|
||||
isFormInvalid: false,
|
||||
|
||||
|
@ -166,27 +166,24 @@ export default Component.extend({
|
|||
|
||||
actions: {
|
||||
onKeyUp(name, value) {
|
||||
this.mountModel.set(name, value);
|
||||
const {
|
||||
isValid,
|
||||
state: { path, maxVersions },
|
||||
} = this.mountModel.validate();
|
||||
// validate path
|
||||
if (name === 'path') {
|
||||
this.mountModel.set('path', value);
|
||||
this.mountModel.validations.attrs.path.isValid
|
||||
path.isValid
|
||||
? set(this.validationMessages, 'path', '')
|
||||
: set(this.validationMessages, 'path', this.mountModel.validations.attrs.path.message);
|
||||
: set(this.validationMessages, 'path', path.errors.join('. '));
|
||||
}
|
||||
// check maxVersions is a number
|
||||
if (name === 'maxVersions') {
|
||||
this.mountModel.set('maxVersions', value);
|
||||
this.mountModel.validations.attrs.maxVersions.isValid
|
||||
maxVersions.isValid
|
||||
? set(this.validationMessages, 'maxVersions', '')
|
||||
: set(
|
||||
this.validationMessages,
|
||||
'maxVersions',
|
||||
this.mountModel.validations.attrs.maxVersions.message
|
||||
);
|
||||
: set(this.validationMessages, 'maxVersions', maxVersions.errors.join('. '));
|
||||
}
|
||||
this.mountModel.validate().then(({ validations }) => {
|
||||
this.set('isFormInvalid', !validations.isValid);
|
||||
});
|
||||
this.set('isFormInvalid', !isValid);
|
||||
},
|
||||
onTypeChange(path, value) {
|
||||
if (path === 'type') {
|
||||
|
|
|
@ -5,6 +5,7 @@ import { computed } from '@ember/object';
|
|||
export default Component.extend({
|
||||
router: service(),
|
||||
'data-test-navheader': true,
|
||||
attributeBindings: ['data-test-navheader'],
|
||||
classNameBindings: 'consoleFullscreen:panel-fullscreen',
|
||||
tagName: 'header',
|
||||
navDrawerOpen: false,
|
||||
|
|
|
@ -7,6 +7,7 @@ const BASE_64_REGEX = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]
|
|||
|
||||
export default Component.extend({
|
||||
'data-test-pgp-file': true,
|
||||
attributeBindings: ['data-test-pgp-file'],
|
||||
classNames: ['box', 'is-fullwidth', 'is-marginless', 'is-shadowless'],
|
||||
key: null,
|
||||
index: null,
|
||||
|
|
|
@ -5,7 +5,7 @@ export default Component.extend({
|
|||
'data-test-radial-progress': true,
|
||||
tagName: 'svg',
|
||||
classNames: 'radial-progress',
|
||||
attributeBindings: ['size:width', 'size:height', 'viewBox'],
|
||||
attributeBindings: ['size:width', 'size:height', 'viewBox', 'data-test-radial-progress'],
|
||||
progressDecimal: null,
|
||||
size: 20,
|
||||
strokeWidth: 1,
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
spellcheck="false"
|
||||
value={{this.testValue}}
|
||||
{{on "change" this.updateTestValue}}
|
||||
class="input {{if this.regexError "has-error"}}"
|
||||
class="input {{if this.regexError 'has-error'}}"
|
||||
/>
|
||||
|
||||
{{#if this.testValue}}
|
||||
|
|
|
@ -54,6 +54,7 @@ export default class SecretEditMetadata extends Component {
|
|||
if (value) {
|
||||
if (name === 'customMetadata') {
|
||||
// cp validations won't work on an object so performing validations here
|
||||
// JLR TODO: review this and incorporate into model-validations system
|
||||
/* eslint-disable no-useless-escape */
|
||||
let regex = /^[^\\]+$/g; // looking for a backward slash
|
||||
value.match(regex)
|
||||
|
@ -62,9 +63,12 @@ export default class SecretEditMetadata extends Component {
|
|||
}
|
||||
if (name === 'maxVersions') {
|
||||
this.args.model.maxVersions = value;
|
||||
this.args.model.validations.attrs.maxVersions.isValid
|
||||
const {
|
||||
state: { maxVersions },
|
||||
} = this.args.model.validate();
|
||||
maxVersions.isValid
|
||||
? set(this.validationMessages, name, '')
|
||||
: set(this.validationMessages, name, this.args.model.validations.attrs.maxVersions.message);
|
||||
: set(this.validationMessages, name, maxVersions.errors.join('. '));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,28 +1,26 @@
|
|||
import { computed } from '@ember/object';
|
||||
import Component from '@ember/component';
|
||||
import Component from '@glimmer/component';
|
||||
import { action } from '@ember/object';
|
||||
import { encodePath } from 'vault/utils/path-encoding-helpers';
|
||||
|
||||
export default Component.extend({
|
||||
onLinkClick() {},
|
||||
tagName: '',
|
||||
// so that ember-test-selectors doesn't log a warning
|
||||
supportsDataTestProperties: true,
|
||||
mode: 'list',
|
||||
|
||||
secret: null,
|
||||
queryParams: null,
|
||||
ariaLabel: null,
|
||||
|
||||
link: computed('mode', 'secret', function () {
|
||||
const route = `vault.cluster.secrets.backend.${this.mode}`;
|
||||
if ((this.mode !== 'versions' && !this.secret) || this.secret === ' ') {
|
||||
export default class SecretLink extends Component {
|
||||
get link() {
|
||||
const { mode, secret } = this.args;
|
||||
const route = `vault.cluster.secrets.backend.${mode}`;
|
||||
if ((mode !== 'versions' && !secret) || secret === ' ') {
|
||||
return { route: `${route}-root`, models: [] };
|
||||
} else {
|
||||
return { route, models: [encodePath(this.secret)] };
|
||||
return { route, models: [encodePath(secret)] };
|
||||
}
|
||||
}),
|
||||
query: computed('queryParams', function () {
|
||||
const qp = this.queryParams || {};
|
||||
}
|
||||
get query() {
|
||||
const qp = this.args.queryParams || {};
|
||||
return qp.isQueryParams ? qp.values : qp;
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
||||
@action
|
||||
onLinkClick() {
|
||||
if (this.args.onLinkClick) {
|
||||
this.args.onLinkClick(...arguments);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import Component from '@glimmer/component';
|
||||
/**
|
||||
* @module ToolbarSecretLink
|
||||
* `ToolbarSecretLink` styles SecretLink for the Toolbar.
|
||||
|
@ -16,18 +17,8 @@
|
|||
*
|
||||
* @param type="" {String} - Use "add" to change icon
|
||||
*/
|
||||
|
||||
import OuterHTML from './outer-html';
|
||||
import { computed } from '@ember/object';
|
||||
|
||||
export default OuterHTML.extend({
|
||||
glyph: computed('type', function () {
|
||||
if (this.type == 'add') {
|
||||
return 'plus';
|
||||
} else {
|
||||
return 'chevron-right';
|
||||
}
|
||||
}),
|
||||
tagName: '',
|
||||
supportsDataTestProperties: true,
|
||||
});
|
||||
export default class ToolbarSecretLink extends Component {
|
||||
get glyph() {
|
||||
return this.args.type === 'add' ? 'plus' : 'chevron-right';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,94 @@
|
|||
/* eslint-disable no-console */
|
||||
import validators from 'vault/utils/validators';
|
||||
|
||||
/**
|
||||
* used to validate properties on a class
|
||||
*
|
||||
* decorator expects validations object with the following shape:
|
||||
* { [propertyKeyName]: [{ type, options, message }] }
|
||||
* each key in the validations object should refer to the property on the class to apply the validation to
|
||||
* type refers to the type of validation to apply -- must be exported from validators util for lookup
|
||||
* options is an optional object for given validator -- min, max, nullable etc. -- see validators in util
|
||||
* message is added to the errors array and returned from the validate method if validation fails
|
||||
* each property supports multiple validations provided as an array -- for example, presence and length for string
|
||||
*
|
||||
* validations must be invoked using the validate method which is added directly to the decorated class
|
||||
* const { isValid, state } = this.model.validate();
|
||||
* isValid represents the validity of the full class -- if no properties provided in the validations object are invalid this will be true
|
||||
* state represents the error state of the properties defined in the validations object
|
||||
* const { isValid, errors } = state[propertyKeyName];
|
||||
* isValid represents the validity of the property
|
||||
* errors will be populated with messages defined in the validations object when validations fail
|
||||
* since a property can have multiple validations, errors is always returned as an array
|
||||
*
|
||||
* full example
|
||||
*
|
||||
* import Model from '@ember-data/model';
|
||||
* import withModelValidations from 'vault/decorators/model-validations';
|
||||
*
|
||||
* const validations = { foo: [{ type: 'presence', message: 'foo is a required field' }] };
|
||||
* @withModelValidations(validations)
|
||||
* class SomeModel extends Model { foo = null; }
|
||||
*
|
||||
* const model = new SomeModel();
|
||||
* const { isValid, state } = model.validate();
|
||||
* -> isValid = false;
|
||||
* -> state.foo.isValid = false;
|
||||
* -> state.foo.errors = ['foo is a required field'];
|
||||
*/
|
||||
|
||||
export function withModelValidations(validations) {
|
||||
return function decorator(SuperClass) {
|
||||
return class ModelValidations extends SuperClass {
|
||||
static _validations;
|
||||
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
if (!validations || typeof validations !== 'object') {
|
||||
throw new Error('Validations object must be provided to constructor for setup');
|
||||
}
|
||||
this._validations = validations;
|
||||
}
|
||||
|
||||
validate() {
|
||||
let isValid = true;
|
||||
const state = {};
|
||||
|
||||
for (const key in this._validations) {
|
||||
const rules = this._validations[key];
|
||||
|
||||
if (!Array.isArray(rules)) {
|
||||
console.error(
|
||||
`Must provide validations as an array for property "${key}" on ${this.modelName} model`
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
state[key] = { errors: [] };
|
||||
|
||||
for (const rule of rules) {
|
||||
const { type, options, message } = rule;
|
||||
if (!validators[type]) {
|
||||
console.error(
|
||||
`Validator type: "${type}" not found. Available validators: ${Object.keys(validators).join(
|
||||
', '
|
||||
)}`
|
||||
);
|
||||
continue;
|
||||
}
|
||||
if (!validators[type](this[key], options)) {
|
||||
// consider setting a prop like validationErrors directly on the model
|
||||
// for now return an errors object
|
||||
state[key].errors.push(message);
|
||||
if (isValid) {
|
||||
isValid = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
state[key].isValid = !state[key].errors.length;
|
||||
}
|
||||
return { isValid, state };
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
import Helper from '@ember/component/helper';
|
||||
import { Promise } from 'rsvp';
|
||||
|
||||
export default class AwaitHelper extends Helper {
|
||||
compute([promise]) {
|
||||
if (!promise || typeof promise.then !== 'function') {
|
||||
return promise;
|
||||
}
|
||||
if (promise !== this.lastPromise) {
|
||||
this.lastPromise = promise;
|
||||
this.value = null;
|
||||
this.resolve(promise);
|
||||
}
|
||||
return this.value;
|
||||
}
|
||||
async resolve(promise) {
|
||||
let value;
|
||||
try {
|
||||
value = await Promise.resolve(promise);
|
||||
} catch (error) {
|
||||
value = error;
|
||||
} finally {
|
||||
// ensure this promise is still the newest promise
|
||||
// otherwise avoid firing recompute since a newer promise is in flight
|
||||
if (promise === this.lastPromise) {
|
||||
this.value = value;
|
||||
this.recompute();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -36,8 +36,9 @@ export default Mixin.create({
|
|||
}
|
||||
return this.transitionToRoute('vault.cluster.policy.show', m.get('policyType'), m.get('name'));
|
||||
})
|
||||
.catch((e) => {
|
||||
model.set('errors', e.errors);
|
||||
.catch(() => {
|
||||
// swallow error -- model.errors set by Adapter
|
||||
return;
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
import Model, { hasMany, attr } from '@ember-data/model';
|
||||
import { alias } from '@ember/object/computed';
|
||||
import { computed } from '@ember/object';
|
||||
import { alias } from '@ember/object/computed'; // eslint-disable-line
|
||||
import { computed } from '@ember/object'; // eslint-disable-line
|
||||
import { fragment } from 'ember-data-model-fragments/attributes';
|
||||
import fieldToAttrs, { expandAttributeMeta } from 'vault/utils/field-to-attrs';
|
||||
import { memberAction } from 'ember-api-actions';
|
||||
import { validator, buildValidations } from 'ember-cp-validations';
|
||||
|
||||
import apiPath from 'vault/utils/api-path';
|
||||
import attachCapabilities from 'vault/lib/attach-capabilities';
|
||||
import { withModelValidations } from 'vault/decorators/model-validations';
|
||||
|
||||
const Validations = buildValidations({
|
||||
path: validator('presence', {
|
||||
presence: true,
|
||||
message: "Path can't be blank.",
|
||||
}),
|
||||
});
|
||||
const validations = {
|
||||
path: [{ type: 'presence', message: "Path can't be blank." }],
|
||||
};
|
||||
|
||||
let ModelExport = Model.extend(Validations, {
|
||||
// unsure if ember-api-actions will work on native JS class model
|
||||
// for now create class to use validations and then use classic extend pattern
|
||||
@withModelValidations(validations)
|
||||
class AuthMethodModel extends Model {}
|
||||
const ModelExport = AuthMethodModel.extend({
|
||||
authConfigs: hasMany('auth-config', { polymorphic: true, inverse: 'backend', async: false }),
|
||||
path: attr('string'),
|
||||
accessor: attr('string'),
|
||||
|
|
|
@ -4,7 +4,6 @@ import { computed } from '@ember/object';
|
|||
import lazyCapabilities, { apiPath } from 'vault/macros/lazy-capabilities';
|
||||
|
||||
export default Model.extend({
|
||||
errors: attr('array'),
|
||||
name: attr('string'),
|
||||
policy: attr('string'),
|
||||
policyType: computed('constructor.modelName', function () {
|
||||
|
|
|
@ -1,34 +1,25 @@
|
|||
import Model, { attr } from '@ember-data/model';
|
||||
import { computed } from '@ember/object';
|
||||
import { equal } from '@ember/object/computed';
|
||||
import { computed } from '@ember/object'; // eslint-disable-line
|
||||
import { equal } from '@ember/object/computed'; // eslint-disable-line
|
||||
import { fragment } from 'ember-data-model-fragments/attributes';
|
||||
import fieldToAttrs, { expandAttributeMeta } from 'vault/utils/field-to-attrs';
|
||||
import { validator, buildValidations } from 'ember-cp-validations';
|
||||
import { withModelValidations } from 'vault/decorators/model-validations';
|
||||
|
||||
// identity will be managed separately and the inclusion
|
||||
// of the system backend is an implementation detail
|
||||
const LIST_EXCLUDED_BACKENDS = ['system', 'identity'];
|
||||
|
||||
const Validations = buildValidations({
|
||||
path: validator('presence', {
|
||||
presence: true,
|
||||
message: "Path can't be blank.",
|
||||
}),
|
||||
const validations = {
|
||||
path: [{ type: 'presence', message: "Path can't be blank." }],
|
||||
maxVersions: [
|
||||
validator('number', {
|
||||
allowString: true,
|
||||
integer: true,
|
||||
message: 'Maximum versions must be a number.',
|
||||
}),
|
||||
validator('length', {
|
||||
min: 1,
|
||||
max: 16,
|
||||
message: 'You cannot go over 16 characters.',
|
||||
}),
|
||||
{ type: 'number', options: { asString: true }, message: 'Maximum versions must be a number.' },
|
||||
{ type: 'length', options: { min: 1, max: 16 }, message: 'You cannot go over 16 characters.' },
|
||||
],
|
||||
});
|
||||
};
|
||||
|
||||
export default Model.extend(Validations, {
|
||||
@withModelValidations(validations)
|
||||
class SecretEngineModel extends Model {}
|
||||
export default SecretEngineModel.extend({
|
||||
path: attr('string'),
|
||||
accessor: attr('string'),
|
||||
name: attr('string'),
|
||||
|
|
|
@ -1,27 +1,21 @@
|
|||
import Model, { belongsTo, hasMany, attr } from '@ember-data/model';
|
||||
import { computed } from '@ember/object';
|
||||
import { alias } from '@ember/object/computed';
|
||||
import { computed } from '@ember/object'; // eslint-disable-line
|
||||
import { alias } from '@ember/object/computed'; // eslint-disable-line
|
||||
import { expandAttributeMeta } from 'vault/utils/field-to-attrs';
|
||||
import KeyMixin from 'vault/mixins/key-mixin';
|
||||
import lazyCapabilities, { apiPath } from 'vault/macros/lazy-capabilities';
|
||||
import { validator, buildValidations } from 'ember-cp-validations';
|
||||
import { withModelValidations } from 'vault/decorators/model-validations';
|
||||
|
||||
const Validations = buildValidations({
|
||||
const validations = {
|
||||
maxVersions: [
|
||||
validator('number', {
|
||||
allowString: true,
|
||||
integer: true,
|
||||
message: 'Maximum versions must be a number.',
|
||||
}),
|
||||
validator('length', {
|
||||
min: 1,
|
||||
max: 16,
|
||||
message: 'You cannot go over 16 characters.',
|
||||
}),
|
||||
{ type: 'number', options: { asString: true }, message: 'Maximum versions must be a number.' },
|
||||
{ type: 'length', options: { min: 1, max: 16 }, message: 'You cannot go over 16 characters.' },
|
||||
],
|
||||
});
|
||||
};
|
||||
|
||||
export default Model.extend(KeyMixin, Validations, {
|
||||
@withModelValidations(validations)
|
||||
class SecretV2Model extends Model {}
|
||||
export default SecretV2Model.extend(KeyMixin, {
|
||||
failedServerRead: attr('boolean'),
|
||||
engine: belongsTo('secret-engine', { async: false }),
|
||||
engineId: attr('string'),
|
||||
|
|
|
@ -36,8 +36,8 @@ export default Route.extend({
|
|||
case 'alphabet':
|
||||
modelType = 'transform/alphabet';
|
||||
break;
|
||||
default:
|
||||
modelType = 'transform'; // CBS TODO: transform/transformation
|
||||
default: // CBS TODO: transform/transformation
|
||||
modelType = 'transform';
|
||||
break;
|
||||
}
|
||||
return modelType;
|
||||
|
|
|
@ -14,7 +14,7 @@ import { resolve, reject } from 'rsvp';
|
|||
import { debug } from '@ember/debug';
|
||||
import { dasherize, capitalize } from '@ember/string';
|
||||
import { singularize } from 'ember-inflector';
|
||||
import buildValidations from 'vault/utils/build-api-validators';
|
||||
import { withModelValidations } from 'vault/decorators/model-validations';
|
||||
|
||||
import generatedItemAdapter from 'vault/adapters/generated-item-list';
|
||||
export function sanitizePath(path) {
|
||||
|
@ -36,6 +36,7 @@ export default Service.extend({
|
|||
getNewModel(modelType, backend, apiPath, itemType) {
|
||||
let owner = getOwner(this);
|
||||
const modelName = `model:${modelType}`;
|
||||
|
||||
const modelFactory = owner.factoryFor(modelName);
|
||||
let newModel, helpUrl;
|
||||
// if we have a factory, we need to take the existing model into account
|
||||
|
@ -298,8 +299,17 @@ export default Service.extend({
|
|||
// Build and add validations on model
|
||||
// NOTE: For initial phase, initialize validations only for user pass auth
|
||||
if (backend === 'userpass') {
|
||||
let validations = buildValidations(fieldGroups);
|
||||
newModel = newModel.extend(validations);
|
||||
const validations = fieldGroups.reduce((obj, element) => {
|
||||
if (element.default) {
|
||||
element.default.forEach((v) => {
|
||||
obj[v.name] = [{ type: 'presence', message: `${v.name} can't be black` }];
|
||||
});
|
||||
}
|
||||
return obj;
|
||||
}, {});
|
||||
@withModelValidations(validations)
|
||||
class GeneratedItemModel extends newModel {}
|
||||
newModel = GeneratedItemModel;
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
{{this.type.text}}
|
||||
</div>
|
||||
{{#if this.message}}
|
||||
<p class="message-body {{if @isPreformatted "pre"}}" data-test-flash-message-body="true">{{this.message}}</p>
|
||||
<p class="message-body {{if @isPreformatted 'pre'}}" data-test-flash-message-body="true">{{this.message}}</p>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<ToolbarSecretLink
|
||||
@secret={{concat this.model.idPrefix this.model.id}}
|
||||
@mode="edit"
|
||||
@data-test-edit-link={{true}}
|
||||
data-test-edit-link={{true}}
|
||||
@replace={{true}}
|
||||
>
|
||||
Edit alphabet
|
||||
|
@ -89,7 +89,7 @@
|
|||
</button>
|
||||
<SecretLink
|
||||
@mode={{if (eq this.mode "create") "list" "show"}}
|
||||
@class="button"
|
||||
class="button"
|
||||
@secret={{concat this.model.idPrefix this.model.id}}
|
||||
>
|
||||
Cancel
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<button
|
||||
type="submit"
|
||||
data-test-save-config="true"
|
||||
class="button is-primary {{if this.saveModel.isRunning "loading"}}"
|
||||
class="button is-primary {{if this.saveModel.isRunning 'loading'}}"
|
||||
disabled={{this.saveModel.isRunning}}
|
||||
>
|
||||
Save
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<button
|
||||
type="submit"
|
||||
data-test-save-config="true"
|
||||
class="button is-primary {{if this.saveModel.isRunning "loading"}}"
|
||||
class="button is-primary {{if this.saveModel.isRunning 'loading'}}"
|
||||
disabled={{this.saveModel.isRunning}}
|
||||
>
|
||||
Update Options
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{{#unless this.selectedAuthIsPath}}
|
||||
<div class="box has-slim-padding is-shadowless">
|
||||
<ToggleButton @toggleTarget={{this}} @toggleAttr="isOpen" />
|
||||
<ToggleButton @isOpen={{this.isOpen}} @onClick={{fn (mut this.isOpen)}} />
|
||||
{{#if this.isOpen}}
|
||||
<div class="field">
|
||||
<label for="custom-path" class="is-label">
|
||||
|
|
|
@ -156,7 +156,7 @@
|
|||
data-test-auth-submit={{true}}
|
||||
type="submit"
|
||||
disabled={{this.authenticate.isRunning}}
|
||||
class="button is-primary {{if this.authenticate.isRunning "is-loading"}}"
|
||||
class="button is-primary {{if this.authenticate.isRunning 'is-loading'}}"
|
||||
id="auth-submit"
|
||||
>
|
||||
Sign In
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
@type="warning"
|
||||
@message="We've stopped auto-renewing your token due to inactivity.
|
||||
It will expire in {{date-from-now this.auth.tokenExpirationDate interval=1000 hideSuffix=true}}.
|
||||
On {{date-format this.auth.tokenExpirationDate "MMMM do yyyy, h:mm:ss a"}}"
|
||||
On {{date-format this.auth.tokenExpirationDate 'MMMM do yyyy, h:mm:ss a'}}"
|
||||
/>
|
||||
</li>
|
||||
{{/if}}
|
||||
|
@ -34,7 +34,7 @@
|
|||
{{#if (is-before (now interval=1000) this.auth.tokenExpirationDate)}}
|
||||
{{#if this.auth.authData.renewable}}
|
||||
<li class="action">
|
||||
<button type="button" {{on "click" this.renewToken}} class="link button {{if this.isRenewing "is-loading"}}">
|
||||
<button type="button" {{on "click" this.renewToken}} class="link button {{if this.isRenewing 'is-loading'}}">
|
||||
Renew token
|
||||
</button>
|
||||
</li>
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
data-test-auth-submit={{true}}
|
||||
type="submit"
|
||||
disabled={{@disabled}}
|
||||
class="button is-primary {{if @disabled "is-loading"}}"
|
||||
class="button is-primary {{if @disabled 'is-loading'}}"
|
||||
id="auth-submit"
|
||||
>
|
||||
{{#if this.isOIDC}}
|
||||
|
|
|
@ -138,7 +138,7 @@
|
|||
@runningTotals={{this.totalUsageCounts}}
|
||||
@timestamp={{this.responseTimestamp}}
|
||||
/>
|
||||
{{!-- TODO CMB: remove UsageStats component from history tab (and update associated tests) --}}
|
||||
{{! TODO CMB: remove UsageStats component from history tab (and update associated tests) }}
|
||||
<Clients::UsageStats @title="Total usage" @totalUsageCounts={{this.totalUsageCounts}} />
|
||||
{{#if this.hasAttributionData}}
|
||||
<Clients::Attribution
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
<div class="chart-header has-bottom-margin-xl">
|
||||
<h2 class="chart-title">Vault client counts</h2>
|
||||
<p class="chart-description">
|
||||
A client is any user or service that interacts with Vault. They are made up of entity clients and non-entity clients. The total client count number is an important consideration for Vault billing.
|
||||
A client is any user or service that interacts with Vault. They are made up of entity clients and non-entity clients.
|
||||
The total client count number is an important consideration for Vault billing.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
<button
|
||||
data-test-submit
|
||||
type="submit"
|
||||
class="button is-primary {{if this.loading "is-loading"}}"
|
||||
class="button is-primary {{if this.loading 'is-loading'}}"
|
||||
disabled={{this.loading}}
|
||||
>
|
||||
Save
|
||||
|
@ -158,7 +158,7 @@
|
|||
<button
|
||||
data-test-submit
|
||||
type="submit"
|
||||
class="button is-primary {{if this.loading "is-loading"}}"
|
||||
class="button is-primary {{if this.loading 'is-loading'}}"
|
||||
disabled={{this.loading}}
|
||||
>
|
||||
Save
|
||||
|
@ -199,7 +199,7 @@
|
|||
<button
|
||||
data-test-submit
|
||||
type="submit"
|
||||
class="button is-primary {{if this.loading "is-loading"}}"
|
||||
class="button is-primary {{if this.loading 'is-loading'}}"
|
||||
disabled={{this.loading}}
|
||||
>
|
||||
Save
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<button
|
||||
data-test-submit
|
||||
type="submit"
|
||||
class="button is-primary {{if this.loading "is-loading"}}"
|
||||
class="button is-primary {{if this.loading 'is-loading'}}"
|
||||
disabled={{this.loading}}
|
||||
>
|
||||
Save
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<ToggleButton @toggleAttr="showOptions" @toggleTarget={{this}} @openLabel="Hide options" @closedLabel="More options" />
|
||||
<ToggleButton @isOpen={{this.showOptions}} @onClick={{fn (mut this.showOptions)}} />
|
||||
{{#if this.showOptions}}
|
||||
<div class="box is-marginless">
|
||||
<div class="field">
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
<div class="control">
|
||||
<button
|
||||
type="submit"
|
||||
class="button is-primary {{if this.loading "is-loading"}}"
|
||||
class="button is-primary {{if this.loading 'is-loading'}}"
|
||||
disabled={{this.loading}}
|
||||
data-test-ssh-input="configure-submit"
|
||||
>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</div>
|
||||
{{else}}
|
||||
{{#if this.unwrapData}}
|
||||
<div class="control-group-success {{if this.unwrapData "is-editor"}}">
|
||||
<div class="control-group-success {{if this.unwrapData 'is-editor'}}">
|
||||
<div class="has-copy-button">
|
||||
<JsonEditor
|
||||
data-test-json-viewer
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="box is-fullwidth is-bottomless is-sideless">
|
||||
<MessageError @model={{this.model}} />
|
||||
<div class="control-group-header {{if this.isSuccess "is-success"}}">
|
||||
<div class="control-group-header {{if this.isSuccess 'is-success'}}">
|
||||
<p>
|
||||
<Icon @name={{if this.isSuccess "check-circle-fill" "lock-fill"}} />
|
||||
<strong data-test-banner-prefix>{{this.bannerPrefix}}</strong>
|
||||
|
@ -98,7 +98,7 @@
|
|||
{{else}}
|
||||
<button
|
||||
type="button"
|
||||
class="button is-primary {{if this.authorize.isRunning "is-loading"}}"
|
||||
class="button is-primary {{if this.authorize.isRunning 'is-loading'}}"
|
||||
{{action (perform this.authorize)}}
|
||||
data-test-authorize-button
|
||||
>
|
||||
|
@ -108,7 +108,7 @@
|
|||
{{else}}
|
||||
<button
|
||||
type="button"
|
||||
class="button is-primary {{if this.refresh.isRunning "is-loading"}}"
|
||||
class="button is-primary {{if this.refresh.isRunning 'is-loading'}}"
|
||||
{{action (perform this.refresh)}}
|
||||
data-test-refresh-button
|
||||
>
|
||||
|
|
|
@ -64,13 +64,13 @@
|
|||
@mode="create"
|
||||
@type="add"
|
||||
@queryParams={{query-params initialKey=@model.name itemType="role"}}
|
||||
@data-test-secret-create={{true}}
|
||||
data-test-secret-create={{true}}
|
||||
>
|
||||
Add role
|
||||
</ToolbarSecretLink>
|
||||
{{/if}}
|
||||
{{#if @model.canEdit}}
|
||||
<ToolbarSecretLink @secret={{@model.id}} @mode="edit" @data-test-edit-link={{true}} @replace={{true}}>
|
||||
<ToolbarSecretLink @secret={{@model.id}} @mode="edit" data-test-edit-link={{true}} @replace={{true}}>
|
||||
Edit configuration
|
||||
</ToolbarSecretLink>
|
||||
{{/if}}
|
||||
|
@ -120,21 +120,23 @@
|
|||
{{/each}}
|
||||
</div>
|
||||
{{else}}
|
||||
<ToggleButton
|
||||
@class="is-block"
|
||||
@toggleAttr={{camelize (concat "show" group)}}
|
||||
@toggleTarget={{this}}
|
||||
@openLabel={{concat "Hide " group}}
|
||||
@closedLabel={{group}}
|
||||
@data-test-toggle-group={{group}}
|
||||
/>
|
||||
{{#if (get this (camelize (concat "show" group)))}}
|
||||
<div class="box is-marginless">
|
||||
{{#each fields as |attr|}}
|
||||
<FormField data-test-field={{true}} @attr={{attr}} @model={{@model}} />
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#let (camelize (concat "show" group)) as |prop|}}
|
||||
<ToggleButton
|
||||
@isOpen={{get this prop}}
|
||||
@openLabel={{concat "Hide " group}}
|
||||
@closedLabel={{group}}
|
||||
@onClick={{fn (mut (get this prop))}}
|
||||
class="is-block"
|
||||
data-test-toggle-group={{group}}
|
||||
/>
|
||||
{{#if (get this prop)}}
|
||||
<div class="box is-marginless">
|
||||
{{#each fields as |attr|}}
|
||||
<FormField data-test-field={{true}} @attr={{attr}} @model={{@model}} />
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/let}}
|
||||
{{/if}}
|
||||
{{/each-in}}
|
||||
{{/each}}
|
||||
|
@ -167,7 +169,7 @@
|
|||
</button>
|
||||
</div>
|
||||
<div class="control">
|
||||
<SecretLink @mode="list" @class="button">
|
||||
<SecretLink @mode="list" class="button">
|
||||
Cancel
|
||||
</SecretLink>
|
||||
</div>
|
||||
|
@ -246,21 +248,23 @@
|
|||
{{/each}}
|
||||
</div>
|
||||
{{else}}
|
||||
<ToggleButton
|
||||
@class="is-block"
|
||||
@toggleAttr={{camelize (concat "show" group)}}
|
||||
@toggleTarget={{this}}
|
||||
@openLabel={{concat "Hide " group}}
|
||||
@closedLabel={{group}}
|
||||
@data-test-toggle-group={{group}}
|
||||
/>
|
||||
{{#if (get this (camelize (concat "show" group)))}}
|
||||
<div class="box is-marginless">
|
||||
{{#each fields as |attr|}}
|
||||
<FormField data-test-field={{true}} @attr={{attr}} @model={{@model}} />
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#let (camelize (concat "show" group)) as |prop|}}
|
||||
<ToggleButton
|
||||
@isOpen={{get this prop}}
|
||||
@openLabel={{concat "Hide " group}}
|
||||
@closedLabel={{group}}
|
||||
@onClick={{fn (mut (get this prop))}}
|
||||
class="is-block"
|
||||
data-test-toggle-group={{group}}
|
||||
/>
|
||||
{{#if (get this prop)}}
|
||||
<div class="box is-marginless">
|
||||
{{#each fields as |attr|}}
|
||||
<FormField data-test-field={{true}} @attr={{attr}} @model={{@model}} />
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/let}}
|
||||
{{/if}}
|
||||
{{/each-in}}
|
||||
{{/each}}
|
||||
|
@ -287,7 +291,7 @@
|
|||
</button>
|
||||
</div>
|
||||
<div class="control">
|
||||
<SecretLink @mode="list" @class="button">
|
||||
<SecretLink @mode="list" class="button">
|
||||
Cancel
|
||||
</SecretLink>
|
||||
</div>
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
@mode="edit"
|
||||
@replace={{true}}
|
||||
@queryParams={{query-params itemType="role"}}
|
||||
@data-test-edit-link={{true}}
|
||||
data-test-edit-link={{true}}
|
||||
>
|
||||
Edit role
|
||||
</ToolbarSecretLink>
|
||||
|
@ -119,7 +119,7 @@
|
|||
data-test-secret-save
|
||||
type="submit"
|
||||
disabled={{this.loading}}
|
||||
class="button is-primary {{if this.loading "is-loading"}}"
|
||||
class="button is-primary {{if this.loading 'is-loading'}}"
|
||||
>
|
||||
{{#if (eq @mode "create")}}
|
||||
Create role
|
||||
|
@ -145,7 +145,7 @@
|
|||
{{/if}}
|
||||
</div>
|
||||
<div class="control">
|
||||
<SecretLink @mode="list" @class="button">
|
||||
<SecretLink @mode="list" class="button">
|
||||
Cancel
|
||||
</SecretLink>
|
||||
</div>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
{{leftSideSecretVersion.version}}
|
||||
{{#if
|
||||
(and
|
||||
(eq leftSideSecretVersion.version (or this.leftSideVersionSelected @args.model.currentVersion))
|
||||
(eq leftSideSecretVersion.version (or this.leftSideVersionSelected @model.currentVersion))
|
||||
(not leftSideSecretVersion.destroyed)
|
||||
(not leftSideSecretVersion.deleted)
|
||||
)
|
||||
|
|
|
@ -8,21 +8,23 @@
|
|||
{{/unless}}
|
||||
{{/each}}
|
||||
{{else}}
|
||||
<ToggleButton
|
||||
@class="is-block"
|
||||
@toggleAttr={{camelize (concat "show" group)}}
|
||||
@toggleTarget={{@model}}
|
||||
@openLabel={{concat "Hide " group}}
|
||||
@closedLabel={{group}}
|
||||
@data-test-toggle-group={{group}}
|
||||
/>
|
||||
{{#if (get @model (camelize (concat "show" group)))}}
|
||||
<div class="box is-marginless">
|
||||
{{#each fields as |attr|}}
|
||||
<FormField data-test-field={{true}} @attr={{attr}} @model={{@model}} />
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#let (camelize (concat "show" group)) as |prop|}}
|
||||
<ToggleButton
|
||||
@isOpen={{get @model prop}}
|
||||
@openLabel={{concat "Hide " group}}
|
||||
@closedLabel={{group}}
|
||||
@onClick={{fn (mut (get @model prop))}}
|
||||
class="is-block"
|
||||
data-test-toggle-group={{group}}
|
||||
/>
|
||||
{{#if (get @model prop)}}
|
||||
<div class="box is-marginless">
|
||||
{{#each fields as |attr|}}
|
||||
<FormField data-test-field={{true}} @attr={{attr}} @model={{@model}} />
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/let}}
|
||||
{{/if}}
|
||||
{{/each-in}}
|
||||
{{/each}}
|
|
@ -145,7 +145,7 @@
|
|||
<button
|
||||
type="submit"
|
||||
disabled={{this.loading}}
|
||||
class="button is-primary {{if this.loading "is-loading"}}"
|
||||
class="button is-primary {{if this.loading 'is-loading'}}"
|
||||
data-test-secret-generate={{true}}
|
||||
>
|
||||
Generate
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<Toolbar>
|
||||
<ToolbarActions>
|
||||
<ToolbarLink
|
||||
@data-test-entity-create-link={{this.itemType}}
|
||||
data-test-entity-create-link={{this.itemType}}
|
||||
@type="add"
|
||||
@params={{array "vault.cluster.access.method.item.create" this.itemType}}
|
||||
>
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
<div class="toolbar-separator"></div>
|
||||
<ToolbarLink
|
||||
@params={{array "vault.cluster.access.method.item.edit" this.itemType this.model.id}}
|
||||
@data-test-configure-link="true"
|
||||
data-test-configure-link="true"
|
||||
>
|
||||
Edit
|
||||
{{singularize this.itemType}}
|
||||
|
@ -72,7 +72,7 @@
|
|||
<button
|
||||
type="submit"
|
||||
data-test-save-config="true"
|
||||
class="button is-primary {{if this.saveModel.isRunning "loading"}}"
|
||||
class="button is-primary {{if this.saveModel.isRunning 'loading'}}"
|
||||
disabled={{or this.saveModel.isRunning this.isFormInvalid}}
|
||||
>
|
||||
Save
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
<button
|
||||
type="submit"
|
||||
data-test-identity-submit={{true}}
|
||||
class="button is-primary {{if this.save.isRunning "loading"}}"
|
||||
class="button is-primary {{if this.save.isRunning 'loading'}}"
|
||||
disabled={{this.save.isRunning}}
|
||||
>
|
||||
{{#if (eq this.mode "create")}}
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
{{#if (eq this.identityType "entity")}}
|
||||
<ToolbarLink
|
||||
@params={{array "vault.cluster.access.identity.merge" (pluralize this.identityType)}}
|
||||
@data-test-entity-merge-link={{true}}
|
||||
data-test-entity-merge-link={{true}}
|
||||
>
|
||||
Merge
|
||||
{{pluralize this.identityType}}
|
||||
|
@ -36,7 +36,7 @@
|
|||
<ToolbarLink
|
||||
@type="add"
|
||||
@params={{array "vault.cluster.access.identity.create" (pluralize this.identityType)}}
|
||||
@data-test-entity-create-link={{true}}
|
||||
data-test-entity-create-link={{true}}
|
||||
>
|
||||
Create
|
||||
{{this.identityType}}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{#each (if @model.alias.id (array @model.alias) @model.aliases) as |item|}}
|
||||
{{#linked-block "vault.cluster.access.identity.aliases.show" item.id "details" class="list-item-row"}}
|
||||
<LinkedBlock @params={{array "vault.cluster.access.identity.aliases.show" item.id "details"}} class="list-item-row">
|
||||
<div class="columns is-mobile">
|
||||
<div class="column is-10">
|
||||
<LinkTo
|
||||
|
@ -22,7 +22,7 @@
|
|||
<Identity::PopupAlias @params={{array item}} />
|
||||
</div>
|
||||
</div>
|
||||
{{/linked-block}}
|
||||
</LinkedBlock>
|
||||
{{else}}
|
||||
<EmptyState @title="No {{@model.identityType}} aliases for {{@model.name}} yet" />
|
||||
{{/each}}
|
|
@ -5,12 +5,12 @@
|
|||
</LinkTo>
|
||||
{{/each}}
|
||||
{{#each @model.inheritedGroupIds as |gid|}}
|
||||
{{#linked-block "vault.cluster.access.identity.show" "groups" gid "details" class="list-item-row"}}
|
||||
<LinkedBlock @params={{array "vault.cluster.access.identity.show" "groups" gid "details"}} class="list-item-row">
|
||||
<LinkTo @route="vault.cluster.access.identity.show" @models={{array "groups" gid "details"}} class="has-text-black">
|
||||
<Icon @name="folder" class="has-text-grey-light" />{{gid}}
|
||||
</LinkTo>
|
||||
<span class="tag has-text-grey is-size-8">inherited</span>
|
||||
{{/linked-block}}
|
||||
</LinkedBlock>
|
||||
{{/each}}
|
||||
{{else}}
|
||||
<EmptyState @title="{{@model.name}} is not a member of any groups." />
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{{#if @model.hasMembers}}
|
||||
{{#each @model.memberGroupIds as |gid|}}
|
||||
{{#linked-block "vault.cluster.access.identity.show" "groups" gid this.details class="list-item-row"}}
|
||||
<LinkedBlock @params={{array "vault.cluster.access.identity.show" "groups" gid this.details}} class="list-item-row">
|
||||
<div class="columns is-mobile">
|
||||
<div class="column is-10">
|
||||
<LinkTo
|
||||
|
@ -17,10 +17,10 @@
|
|||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/linked-block}}
|
||||
</LinkedBlock>
|
||||
{{/each}}
|
||||
{{#each @model.memberEntityIds as |gid|}}
|
||||
{{#linked-block "vault.cluster.access.identity.show" "groups" gid this.details class="list-item-row"}}
|
||||
<LinkedBlock @params={{array "vault.cluster.access.identity.show" "groups" gid this.details}} class="list-item-row">
|
||||
<div class="columns">
|
||||
<div class="column is-10">
|
||||
<LinkTo
|
||||
|
@ -37,7 +37,7 @@
|
|||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/linked-block}}
|
||||
</LinkedBlock>
|
||||
{{/each}}
|
||||
{{else}}
|
||||
<EmptyState @title="No members in this group yet" />
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{{#if @model.parentGroupIds.length}}
|
||||
{{#each @model.parentGroupIds as |gid|}}
|
||||
{{#linked-block "vault.cluster.access.identity.show" "groups" gid this.details class="list-item-row"}}
|
||||
<LinkedBlock @params={{array "vault.cluster.access.identity.show" "groups" gid this.details}} class="list-item-row">
|
||||
<div class="columns is-mobile">
|
||||
<div class="column is-10">
|
||||
<LinkTo
|
||||
|
@ -14,7 +14,7 @@
|
|||
<div class="column has-text-right">
|
||||
</div>
|
||||
</div>
|
||||
{{/linked-block}}
|
||||
</LinkedBlock>
|
||||
{{/each}}
|
||||
{{else}}
|
||||
<EmptyState @title="This group has no parent groups yet" />
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{#each @model.policies as |policyName|}}
|
||||
{{#linked-block "vault.cluster.policy.show" "acl" this.item class="list-item-row"}}
|
||||
<LinkedBlock @params={{array "vault.cluster.policy.show" "acl" this.item}} class="list-item-row">
|
||||
<div class="columns is-mobile">
|
||||
<div class="column is-10">
|
||||
<LinkTo
|
||||
|
@ -16,7 +16,7 @@
|
|||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/linked-block}}
|
||||
</LinkedBlock>
|
||||
{{else}}
|
||||
<EmptyState @title="No policies associated with {{@model.name}} yet" />
|
||||
{{/each}}
|
|
@ -29,7 +29,7 @@
|
|||
<Textarea
|
||||
data-test-kv-value={{index}}
|
||||
name={{row.name}}
|
||||
class="input {{if @validationError "has-error-border"}}"
|
||||
class="input {{if @validationError 'has-error-border'}}"
|
||||
@value={{row.value}}
|
||||
wrap="off"
|
||||
placeholder={{this.placeholders.value}}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
@title="License expired"
|
||||
@message="Your Vault license expired on {{date-format
|
||||
@expiry
|
||||
"MMM d, yyyy"
|
||||
'MMM d, yyyy'
|
||||
}}. Add a new license to your configuration and restart Vault."
|
||||
@marginless={{true}}
|
||||
>
|
||||
|
@ -25,11 +25,11 @@
|
|||
@title="Vault license expiring"
|
||||
@message="Your Vault license will expire in {{this.licenseExpiringInDays}} days at {{date-format
|
||||
@expiry
|
||||
"hh:mm:ss a"
|
||||
}} on {{date-format @expiry "MMM d, yyyy"}}. {{if
|
||||
'hh:mm:ss a'
|
||||
}} on {{date-format @expiry 'MMM d, yyyy'}}. {{if
|
||||
@autoloaded
|
||||
"Add a new license to your configuration."
|
||||
"Keep in mind that your next license will need to be autoloaded"
|
||||
'Add a new license to your configuration.'
|
||||
'Keep in mind that your next license will need to be autoloaded'
|
||||
}}"
|
||||
@marginless={{true}}
|
||||
>
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
{{/if}}
|
||||
{{#if constraint.selectedMethod.uses_passcode}}
|
||||
<div class="control">
|
||||
{{! template-lint-disable no-autofocus-attribute}}
|
||||
<Input
|
||||
id="passcode"
|
||||
name="passcode"
|
||||
|
@ -41,6 +42,7 @@
|
|||
@value={{constraint.passcode}}
|
||||
data-test-mfa-passcode={{index}}
|
||||
/>
|
||||
{{! template-lint-enable no-autofocus-attribute}}
|
||||
</div>
|
||||
{{else if (eq constraint.methods.length 1)}}
|
||||
<p class="has-text-grey-400">
|
||||
|
@ -62,7 +64,7 @@
|
|||
id="validate"
|
||||
type="submit"
|
||||
disabled={{or this.validate.isRunning this.newCodeDelay.isRunning}}
|
||||
class="button is-primary {{if this.validate.isRunning "is-loading"}}"
|
||||
class="button is-primary {{if this.validate.isRunning 'is-loading'}}"
|
||||
data-test-mfa-validate
|
||||
>
|
||||
Verify
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
<button
|
||||
type="submit"
|
||||
data-test-mount-submit="true"
|
||||
class="button is-primary {{if this.mountBackend.isRunning "loading"}}"
|
||||
class="button is-primary {{if this.mountBackend.isRunning 'loading'}}"
|
||||
disabled={{or this.mountBackend.isRunning this.isFormInvalid}}
|
||||
>
|
||||
{{#if (eq this.mountType "auth")}}
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
</header>
|
||||
</div>
|
||||
</div>
|
||||
<div class="namespace-list {{if this.isAnimating "animated-list"}}">
|
||||
<div class="namespace-list {{if this.isAnimating 'animated-list'}}">
|
||||
<div class="is-mobile level-left">
|
||||
{{#unless this.isUserRootNamespace}}
|
||||
<NamespaceLink
|
||||
|
@ -65,7 +65,7 @@
|
|||
</div>
|
||||
{{#if (contains "" this.lastMenuLeaves)}}
|
||||
{{! leaf is '' which is the root namespace, and then we need to iterate the root leaves }}
|
||||
<div class="leaf-panel {{if (eq "" this.currentLeaf) "leaf-panel-current" "leaf-panel-left"}} ">
|
||||
<div class="leaf-panel {{if (eq '' this.currentLeaf) 'leaf-panel-current' 'leaf-panel-left'}} ">
|
||||
{{~#each this.rootLeaves as |rootLeaf|}}
|
||||
<NamespaceLink @targetNamespace={{rootLeaf}} @class="namespace-link" @showLastSegment={{true}} />
|
||||
{{/each~}}
|
||||
|
@ -74,9 +74,9 @@
|
|||
{{#each this.lastMenuLeaves as |leaf|}}
|
||||
<div
|
||||
class="leaf-panel
|
||||
{{if (eq leaf this.currentLeaf) "leaf-panel-current" "leaf-panel-left"}}
|
||||
{{if (and this.isAdding (eq leaf this.changedLeaf)) "leaf-panel-adding"}}
|
||||
{{if (and (not this.isAdding) (eq leaf this.changedLeaf)) "leaf-panel-exiting"}}
|
||||
{{if (eq leaf this.currentLeaf) 'leaf-panel-current' 'leaf-panel-left'}}
|
||||
{{if (and this.isAdding (eq leaf this.changedLeaf)) 'leaf-panel-adding'}}
|
||||
{{if (and (not this.isAdding) (eq leaf this.changedLeaf)) 'leaf-panel-exiting'}}
|
||||
"
|
||||
>
|
||||
{{~#each-in (get this.namespaceTree leaf) as |leafName|}}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
{{/unless}}
|
||||
|
||||
{{#unless this.hideLinks}}
|
||||
<div class="navbar-drawer{{if this.navDrawerOpen " is-active"}}">
|
||||
<div class="navbar-drawer{{if this.navDrawerOpen ' is-active'}}">
|
||||
<div class="navbar-drawer-scroll">
|
||||
<div data-test-navheader-main>
|
||||
{{yield (hash main=(component "nav-header/main") closeDrawer=(action "toggleNavDrawer" false))}}
|
||||
|
@ -30,7 +30,7 @@
|
|||
{{/unless}}
|
||||
|
||||
<div
|
||||
class="navbar-drawer-overlay{{if this.navDrawerOpen " is-active"}}"
|
||||
class="navbar-drawer-overlay{{if this.navDrawerOpen ' is-active'}}"
|
||||
role="button"
|
||||
onclick={{action "toggleNavDrawer" (not this.navDrawerOpen)}}
|
||||
></div>
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
<div class="toolbar-separator"></div>
|
||||
{{/if}}
|
||||
{{#if this.model.canGenerate}}
|
||||
<ToolbarSecretLink @secret={{this.model.id}} @mode="credentials" @data-test-backend-credentials="iam">
|
||||
<ToolbarSecretLink @secret={{this.model.id}} @mode="credentials" data-test-backend-credentials="iam">
|
||||
Generate credentials
|
||||
</ToolbarSecretLink>
|
||||
{{/if}}
|
||||
|
@ -54,7 +54,7 @@
|
|||
{{#if (gt this.model.credentialTypes.length 1)}}
|
||||
<AlertBanner
|
||||
@type="warning"
|
||||
@message="This role has more than one credential_type, currently: {{join ", " this.model.credentialTypes}}.
|
||||
@message="This role has more than one credential_type, currently: {{join ', ' this.model.credentialTypes}}.
|
||||
Multiple credential types is deprecated and you must choose one in order to save this role."
|
||||
/>
|
||||
{{/if}}
|
||||
|
@ -71,7 +71,7 @@
|
|||
Save
|
||||
{{/if}}
|
||||
</button>
|
||||
<SecretLink @mode={{if (eq this.mode "create") "list" "show"}} @class="button" @secret={{this.model.id}}>
|
||||
<SecretLink @mode={{if (eq this.mode "create") "list" "show"}} class="button" @secret={{this.model.id}}>
|
||||
Cancel
|
||||
</SecretLink>
|
||||
</div>
|
||||
|
@ -82,7 +82,7 @@
|
|||
{{#if (gt this.model.credentialTypes.length 1)}}
|
||||
<AlertBanner
|
||||
@type="warning"
|
||||
@message="This role has more than one credential_type, currently: {{join ", " this.model.credentialTypes}}.
|
||||
@message="This role has more than one credential_type, currently: {{join ', ' this.model.credentialTypes}}.
|
||||
When you next edit this role, you will have to choose a single credential type."
|
||||
/>
|
||||
{{/if}}
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
@secret={{this.model.id}}
|
||||
@mode="credentials"
|
||||
@queryParams={{query-params action="issue"}}
|
||||
@data-test-credentials-link={{true}}
|
||||
data-test-credentials-link={{true}}
|
||||
>
|
||||
Generate Certificate
|
||||
</ToolbarSecretLink>
|
||||
|
@ -46,13 +46,13 @@
|
|||
@secret={{this.model.id}}
|
||||
@mode="credentials"
|
||||
@queryParams={{query-params action="sign"}}
|
||||
@data-test-sign-link={{true}}
|
||||
data-test-sign-link={{true}}
|
||||
>
|
||||
Sign Certificate
|
||||
</ToolbarSecretLink>
|
||||
{{/if}}
|
||||
{{#if this.model.canEdit}}
|
||||
<ToolbarSecretLink @secret={{this.model.id}} @mode="edit" @data-test-edit-link={{true}} @replace={{true}}>
|
||||
<ToolbarSecretLink @secret={{this.model.id}} @mode="edit" data-test-edit-link={{true}} @replace={{true}}>
|
||||
Edit role
|
||||
</ToolbarSecretLink>
|
||||
{{/if}}
|
||||
|
@ -75,7 +75,7 @@
|
|||
Save
|
||||
{{/if}}
|
||||
</button>
|
||||
<SecretLink @mode={{if (eq this.mode "create") "list" "show"}} @class="button" @secret={{this.model.id}}>
|
||||
<SecretLink @mode={{if (eq this.mode "create") "list" "show"}} class="button" @secret={{this.model.id}}>
|
||||
Cancel
|
||||
</SecretLink>
|
||||
</div>
|
||||
|
|
|
@ -35,18 +35,18 @@
|
|||
<ToolbarSecretLink
|
||||
@secret={{this.model.id}}
|
||||
@mode="credentials"
|
||||
@data-test-backend-credentials={{true}}
|
||||
data-test-backend-credentials={{true}}
|
||||
@replace={{true}}
|
||||
>
|
||||
Generate Credential
|
||||
</ToolbarSecretLink>
|
||||
{{else}}
|
||||
<ToolbarSecretLink @secret={{this.model.id}} @mode="sign" @data-test-backend-credentials={{true}} @replace={{true}}>
|
||||
<ToolbarSecretLink @secret={{this.model.id}} @mode="sign" data-test-backend-credentials={{true}} @replace={{true}}>
|
||||
Sign Keys
|
||||
</ToolbarSecretLink>
|
||||
{{/if}}
|
||||
{{#if (or this.model.canUpdate this.model.canDelete)}}
|
||||
<ToolbarSecretLink @secret={{this.model.id}} @mode="edit" @data-test-edit-link={{true}} @replace={{true}}>
|
||||
<ToolbarSecretLink @secret={{this.model.id}} @mode="edit" data-test-edit-link={{true}} @replace={{true}}>
|
||||
Edit role
|
||||
</ToolbarSecretLink>
|
||||
{{/if}}
|
||||
|
@ -70,7 +70,7 @@
|
|||
Save
|
||||
{{/if}}
|
||||
</button>
|
||||
<SecretLink @mode={{if (eq this.mode "create") "list" "show"}} @class="button" @secret={{this.model.id}}>
|
||||
<SecretLink @mode={{if (eq this.mode "create") "list" "show"}} class="button" @secret={{this.model.id}}>
|
||||
Cancel
|
||||
</SecretLink>
|
||||
</div>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
spellcheck="false"
|
||||
data-test-secret-path="true"
|
||||
id="kv-key"
|
||||
class="input {{if (get this.validationMessages "path") "has-error-border"}}"
|
||||
class="input {{if (get this.validationMessages 'path') 'has-error-border'}}"
|
||||
@value={{get @modelForData @modelForData.pathAttr}}
|
||||
{{on "keyup" (perform this.waitForKeyUp "path" value="target.value")}}
|
||||
/>
|
||||
|
@ -112,11 +112,11 @@
|
|||
{{! must have UPDATE permissions to add secret metadata. Create only will not work }}
|
||||
{{#if (and @isV2 @canUpdateSecretMetadata)}}
|
||||
<ToggleButton
|
||||
@class="is-block"
|
||||
@toggleAttr={{"showMetadata"}}
|
||||
@toggleTarget={{this}}
|
||||
@isOpen={{this.showMetadata}}
|
||||
@openLabel="Hide secret metadata"
|
||||
@closedLabel="Show secret metadata"
|
||||
@onClick={{fn (mut this.showMetadata)}}
|
||||
class="is-block"
|
||||
data-test-show-metadata-toggle
|
||||
/>
|
||||
{{#if this.showMetadata}}
|
||||
|
@ -139,7 +139,7 @@
|
|||
</button>
|
||||
</div>
|
||||
<div class="control">
|
||||
<SecretLink @mode="list" @secret={{@model.parentKey}} @class="button">
|
||||
<SecretLink @mode="list" @secret={{@model.parentKey}} class="button">
|
||||
Cancel
|
||||
</SecretLink>
|
||||
</div>
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
</button>
|
||||
</div>
|
||||
<div class="control">
|
||||
<SecretLink @secret={{@model.id}} @class="button" @mode="show">
|
||||
<SecretLink @secret={{@model.id}} class="button" @mode="show">
|
||||
Cancel
|
||||
</SecretLink>
|
||||
</div>
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
<li class="action">
|
||||
{{#if this.showWrapButton}}
|
||||
<button
|
||||
class="link link-plain has-text-weight-semibold is-ghost {{if this.isWrapping "is-loading"}}"
|
||||
class="link link-plain has-text-weight-semibold is-ghost {{if this.isWrapping 'is-loading'}}"
|
||||
type="button"
|
||||
{{on "click" this.handleWrapClick}}
|
||||
data-test-wrap-button
|
||||
|
@ -97,14 +97,14 @@
|
|||
@model.id
|
||||
(query-params version=(if @model.canReadMetadata @modelForData.version ""))
|
||||
}}
|
||||
@data-test-secret-edit="true"
|
||||
data-test-secret-edit="true"
|
||||
@replace={{true}}
|
||||
@type="add"
|
||||
>
|
||||
Create new version
|
||||
</ToolbarLink>
|
||||
{{else}}
|
||||
<ToolbarLink @params={{array targetRoute @model.id}} @data-test-secret-edit="true" @replace={{true}}>
|
||||
<ToolbarLink @params={{array targetRoute @model.id}} data-test-secret-edit="true" @replace={{true}}>
|
||||
Edit secret
|
||||
</ToolbarLink>
|
||||
{{/if}}
|
||||
|
|
|
@ -2,18 +2,8 @@
|
|||
@route={{this.link.route}}
|
||||
@models={{this.link.models}}
|
||||
@query={{this.query}}
|
||||
class={{this.class}}
|
||||
data-test-secret-create={{this.data-test-secret-create}}
|
||||
data-test-credentials-link={{this.data-test-credentials-link}}
|
||||
data-test-backend-credentials={{this.data-test-backend-credentials}}
|
||||
data-test-edit-link={{this.data-test-edit-link}}
|
||||
data-test-sign-link={{this.data-test-sign-link}}
|
||||
data-test-transit-link={{this.data-test-transit-link}}
|
||||
data-test-transit-key-actions-link={{this.data-test-transit-key-actions-link}}
|
||||
data-test-transit-action-link={{this.data-test-transit-action-link}}
|
||||
data-test-version-history={{this.data-test-version-history}}
|
||||
data-test-version={{this.data-test-version}}
|
||||
{{on "click" this.onLinkClick}}
|
||||
...attributes
|
||||
>
|
||||
{{yield}}
|
||||
</LinkTo>
|
|
@ -1,10 +1,9 @@
|
|||
{{#linked-block
|
||||
(concat "vault.cluster.secrets.backend." "credentials" (unless @item.id "-root"))
|
||||
@item.id
|
||||
<LinkedBlock
|
||||
@params={{array (concat "vault.cluster.secrets.backend." "credentials" (unless @item.id "-root")) @item.id}}
|
||||
class="list-item-row"
|
||||
data-test-secret-link=@item.id
|
||||
encode=true
|
||||
}}
|
||||
data-test-secret-link={{@item.id}}
|
||||
@encode={{true}}
|
||||
>
|
||||
<div class="columns is-mobile">
|
||||
<div class="column is-10">
|
||||
<LinkTo
|
||||
|
@ -78,4 +77,4 @@
|
|||
</PopupMenu>
|
||||
</div>
|
||||
</div>
|
||||
{{/linked-block}}
|
||||
</LinkedBlock>
|
|
@ -2,8 +2,8 @@
|
|||
@params={{array "vault.cluster.secrets.backend.show" (if this.keyTypeValue (concat "role/" @item.id) @item.id)}}
|
||||
class="list-item-row"
|
||||
data-test-secret-link={{@item.id}}
|
||||
encode={{true}}
|
||||
queryParams={{secret-query-params @backendType @item.type}}
|
||||
@encode={{true}}
|
||||
@queryParams={{secret-query-params @backendType @item.type}}
|
||||
>
|
||||
<div class="columns is-mobile">
|
||||
<div class="column is-10">
|
||||
|
@ -26,18 +26,14 @@
|
|||
<ul class="menu-list">
|
||||
{{#if @item.canEdit}}
|
||||
<li class="action">
|
||||
<SecretLink @mode="show" @secret={{@item.id}} @class="has-text-black has-text-weight-semibold">
|
||||
<SecretLink @mode="show" @secret={{@item.id}} class="has-text-black has-text-weight-semibold">
|
||||
Edit connection
|
||||
</SecretLink>
|
||||
</li>
|
||||
{{/if}}
|
||||
{{#if @item.canEditRole}}
|
||||
<li class="action">
|
||||
<SecretLink
|
||||
@mode="edit"
|
||||
@secret={{concat "role/" @item.id}}
|
||||
@class="has-text-black has-text-weight-semibold"
|
||||
>
|
||||
<SecretLink @mode="edit" @secret={{concat "role/" @item.id}} class="has-text-black has-text-weight-semibold">
|
||||
Edit Role
|
||||
</SecretLink>
|
||||
</li>
|
||||
|
|
|
@ -1,18 +1,20 @@
|
|||
{{#linked-block
|
||||
(concat "vault.cluster.secrets.backend." (if @item.isFolder "list" "show") (unless @item.id "-root"))
|
||||
@item.id
|
||||
<LinkedBlock
|
||||
@params={{array
|
||||
(concat "vault.cluster.secrets.backend." (if @item.isFolder "list" "show") (unless @item.id "-root"))
|
||||
@item.id
|
||||
}}
|
||||
class="list-item-row"
|
||||
data-test-secret-link=@item.id
|
||||
encode=true
|
||||
queryParams=(secret-query-params @backendModel.type)
|
||||
}}
|
||||
data-test-secret-link={{@item.id}}
|
||||
@encode={{true}}
|
||||
@queryParams={{secret-query-params @backendModel.type}}
|
||||
>
|
||||
<div class="columns is-mobile">
|
||||
<div class="column is-10">
|
||||
<SecretLink
|
||||
@mode={{if @item.isFolder "list" "show"}}
|
||||
@secret={{@item.id}}
|
||||
@queryParams={{if (eq @backendModel.type "transit") (query-params tab="actions") ""}}
|
||||
@class="has-text-black has-text-weight-semibold"
|
||||
class="has-text-black has-text-weight-semibold"
|
||||
>
|
||||
{{#if (eq @backendModel.type "transit")}}
|
||||
<Icon @name="key" class="has-text-grey-light" />
|
||||
|
@ -28,7 +30,7 @@
|
|||
<nav class="menu">
|
||||
<ul class="menu-list">
|
||||
{{#if @item.isFolder}}
|
||||
<SecretLink @mode="list" @secret={{@item.id}} @class="has-text-black has-text-weight-semibold">
|
||||
<SecretLink @mode="list" @secret={{@item.id}} class="has-text-black has-text-weight-semibold">
|
||||
Contents
|
||||
</SecretLink>
|
||||
{{else}}
|
||||
|
@ -41,13 +43,13 @@
|
|||
{{else}}
|
||||
{{#if (or @item.canReadSecretData @item.canRead)}}
|
||||
<li class="action">
|
||||
<SecretLink @mode="show" @secret={{@item.id}} @class="has-text-black has-text-weight-semibold">
|
||||
<SecretLink @mode="show" @secret={{@item.id}} class="has-text-black has-text-weight-semibold">
|
||||
Details
|
||||
</SecretLink>
|
||||
</li>
|
||||
{{#if @backendModel.isV2KV}}
|
||||
<li class="action">
|
||||
<SecretLink @mode="versions" @secret={{@item.id}} @class="has-text-black has-text-weight-semibold">
|
||||
<SecretLink @mode="versions" @secret={{@item.id}} class="has-text-black has-text-weight-semibold">
|
||||
View version history
|
||||
</SecretLink>
|
||||
</li>
|
||||
|
@ -55,7 +57,7 @@
|
|||
{{/if}}
|
||||
{{#if (or @item.canEditSecretData @item.canEdit)}}
|
||||
<li class="action">
|
||||
<SecretLink @mode="edit" @secret={{@item.id}} @class="has-text-black has-text-weight-semibold">
|
||||
<SecretLink @mode="edit" @secret={{@item.id}} class="has-text-black has-text-weight-semibold">
|
||||
{{if @backendModel.isV2KV "Create new version" "Edit"}}
|
||||
</SecretLink>
|
||||
</li>
|
||||
|
@ -78,4 +80,4 @@
|
|||
</PopupMenu>
|
||||
</div>
|
||||
</div>
|
||||
{{/linked-block}}
|
||||
</LinkedBlock>
|
|
@ -1,11 +1,9 @@
|
|||
{{#linked-block
|
||||
(concat "vault.cluster.secrets.backend." "show" (unless @item.id "-root"))
|
||||
@item.idForNav
|
||||
<LinkedBlock
|
||||
@params={{array (concat "vault.cluster.secrets.backend." "show" (unless @item.id "-root")) @item.idForNav}}
|
||||
class="list-item-row"
|
||||
data-test-secret-link=@item.id
|
||||
tagName="div"
|
||||
encode=true
|
||||
}}
|
||||
data-test-secret-link={{@item.id}}
|
||||
@encode={{true}}
|
||||
>
|
||||
<div class="columns is-mobile">
|
||||
<div class="column is-10">
|
||||
<LinkTo
|
||||
|
@ -23,4 +21,4 @@
|
|||
<PkiCertPopup @item={{@item}} />
|
||||
</div>
|
||||
</div>
|
||||
{{/linked-block}}
|
||||
</LinkedBlock>
|
|
@ -1,13 +1,10 @@
|
|||
{{#linked-block
|
||||
(concat "vault.cluster.secrets.backend." "credentials" (unless @item.id "-root"))
|
||||
@item.backend
|
||||
@item.id
|
||||
queryParams=(hash action="issue")
|
||||
<LinkedBlock
|
||||
@params={{array (concat "vault.cluster.secrets.backend." "credentials" (unless @item.id "-root")) @item.backend @item.id}}
|
||||
@queryParams={{hash action="issue"}}
|
||||
class="list-item-row"
|
||||
data-test-secret-link=@item.id
|
||||
tagName="div"
|
||||
encode=true
|
||||
}}
|
||||
data-test-secret-link={{@item.id}}
|
||||
@encode={{true}}
|
||||
>
|
||||
<div class="columns is-mobile">
|
||||
<div class="column is-10">
|
||||
<LinkTo
|
||||
|
@ -101,4 +98,4 @@
|
|||
</PopupMenu>
|
||||
</div>
|
||||
</div>
|
||||
{{/linked-block}}
|
||||
</LinkedBlock>
|
|
@ -1,10 +1,12 @@
|
|||
{{#linked-block
|
||||
(concat "vault.cluster.secrets.backend." (if (eq @item.keyType "ca") "sign" "credentials") (unless @item.id "-root"))
|
||||
@item.id
|
||||
<LinkedBlock
|
||||
@params={{array
|
||||
(concat "vault.cluster.secrets.backend." (if (eq @item.keyType "ca") "sign" "credentials") (unless @item.id "-root"))
|
||||
@item.id
|
||||
}}
|
||||
class="list-item-row"
|
||||
data-test-secret-link=@item.id
|
||||
encode=true
|
||||
}}
|
||||
data-test-secret-link={{@item.id}}
|
||||
@encode={{true}}
|
||||
>
|
||||
<div class="columns is-mobile">
|
||||
<div class="column is-10">
|
||||
<LinkTo
|
||||
|
@ -76,7 +78,7 @@
|
|||
<button
|
||||
type="button"
|
||||
disabled={{get this (concat "loading-" @item.id)}}
|
||||
class="link button is-transparent {{if (get this (concat "loading-" @item.id)) "is-loading"}} "
|
||||
class="link button is-transparent {{if (get this (concat 'loading-' @item.id)) 'is-loading'}} "
|
||||
{{on "click" @toggleZeroAddress}}
|
||||
>
|
||||
Disable Zero Address
|
||||
|
@ -87,7 +89,7 @@
|
|||
<button
|
||||
type="button"
|
||||
disabled={{get this (concat "loading-" @item.id)}}
|
||||
class="link button is-transparent {{if (get this (concat "loading-" @item.id)) "is-loading"}}"
|
||||
class="link button is-transparent {{if (get this (concat 'loading-' @item.id)) 'is-loading'}}"
|
||||
{{on "click" @toggleZeroAddress}}
|
||||
>
|
||||
Enable Zero Address
|
||||
|
@ -134,4 +136,4 @@
|
|||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/linked-block}}
|
||||
</LinkedBlock>
|
|
@ -1,19 +1,18 @@
|
|||
{{#if (and @item.updatePath.canRead (not this.isBuiltin))}}
|
||||
{{#linked-block
|
||||
"vault.cluster.secrets.backend.show"
|
||||
@itemPath
|
||||
<LinkedBlock
|
||||
@params={{array "vault.cluster.secrets.backend.show" @itemPath}}
|
||||
class="list-item-row"
|
||||
data-test-secret-link=@itemPath
|
||||
encode=true
|
||||
queryParams=(secret-query-params @backendType)
|
||||
}}
|
||||
data-test-secret-link={{@itemPath}}
|
||||
@encode={{true}}
|
||||
@queryParams={{secret-query-params @backendType}}
|
||||
>
|
||||
<div class="columns is-mobile">
|
||||
<div class="column is-10">
|
||||
<SecretLink
|
||||
@mode="show"
|
||||
@secret={{@itemPath}}
|
||||
@queryParams={{query-params type=@modelType}}
|
||||
@class="has-text-black has-text-weight-semibold"
|
||||
class="has-text-black has-text-weight-semibold"
|
||||
>
|
||||
<Icon @name="file" class="has-text-grey-light" />
|
||||
{{if (eq @item.id " ") "(self)" (or @item.keyWithoutParent @item.id)}}
|
||||
|
@ -26,14 +25,14 @@
|
|||
<ul class="menu-list">
|
||||
{{#if @item.updatePath.canRead}}
|
||||
<li class="action">
|
||||
<SecretLink @mode="show" @secret={{@itemPath}} @class="has-text-black has-text-weight-semibold">
|
||||
<SecretLink @mode="show" @secret={{@itemPath}} class="has-text-black has-text-weight-semibold">
|
||||
Details
|
||||
</SecretLink>
|
||||
</li>
|
||||
{{/if}}
|
||||
{{#if @item.updatePath.canUpdate}}
|
||||
<li class="action">
|
||||
<SecretLink @mode="edit" @secret={{@itemPath}} @class="has-text-black has-text-weight-semibold">
|
||||
<SecretLink @mode="edit" @secret={{@itemPath}} class="has-text-black has-text-weight-semibold">
|
||||
Edit
|
||||
</SecretLink>
|
||||
</li>
|
||||
|
@ -44,7 +43,7 @@
|
|||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/linked-block}}
|
||||
</LinkedBlock>
|
||||
{{else}}
|
||||
<div class="list-item-row" data-test-view-only-list-item>
|
||||
<div class="columns is-mobile">
|
||||
|
|
|
@ -1,20 +1,19 @@
|
|||
{{! CBS TODO do not let click if !canRead }}
|
||||
{{#if (eq @options.item "transformation")}}
|
||||
{{#linked-block
|
||||
"vault.cluster.secrets.backend.show"
|
||||
@item.id
|
||||
<LinkedBlock
|
||||
@params={{array "vault.cluster.secrets.backend.show" @item.id}}
|
||||
class="list-item-row"
|
||||
data-test-secret-link=@item.id
|
||||
encode=true
|
||||
queryParams=(secret-query-params @backendModel.type)
|
||||
}}
|
||||
data-test-secret-link={{@item.id}}
|
||||
@encode={{true}}
|
||||
@queryParams={{secret-query-params @backendModel.type}}
|
||||
>
|
||||
<div class="columns is-mobile">
|
||||
<div class="column is-10">
|
||||
<SecretLink
|
||||
@mode="show"
|
||||
@secret={{@item.id}}
|
||||
@queryParams={{if (eq @backendModel.type "transform") (query-params tab="actions") ""}}
|
||||
@class="has-text-black has-text-weight-semibold"
|
||||
class="has-text-black has-text-weight-semibold"
|
||||
>
|
||||
<Icon @name="file" class="has-text-grey-light" />
|
||||
{{if (eq @item.id " ") "(self)" (or @item.keyWithoutParent @item.id)}}
|
||||
|
@ -34,14 +33,14 @@
|
|||
{{else}}
|
||||
{{#if @item.updatePath.canRead}}
|
||||
<li class="action">
|
||||
<SecretLink @mode="show" @secret={{@item.id}} @class="has-text-black has-text-weight-semibold">
|
||||
<SecretLink @mode="show" @secret={{@item.id}} class="has-text-black has-text-weight-semibold">
|
||||
Details
|
||||
</SecretLink>
|
||||
</li>
|
||||
{{/if}}
|
||||
{{#if @item.updatePath.canUpdate}}
|
||||
<li class="action">
|
||||
<SecretLink @mode="edit" @secret={{@item.id}} @class="has-text-black has-text-weight-semibold">
|
||||
<SecretLink @mode="edit" @secret={{@item.id}} class="has-text-black has-text-weight-semibold">
|
||||
Edit
|
||||
</SecretLink>
|
||||
</li>
|
||||
|
@ -53,7 +52,7 @@
|
|||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/linked-block}}
|
||||
</LinkedBlock>
|
||||
{{else}}
|
||||
<div class="list-item-row">
|
||||
<div class="columns is-mobile">
|
||||
|
|
|
@ -36,10 +36,10 @@
|
|||
{{/each}}
|
||||
<li class="action">
|
||||
<SecretLink
|
||||
@data-test-version-history
|
||||
data-test-version-history={{true}}
|
||||
@mode="versions"
|
||||
@secret={{@model.id}}
|
||||
@class="has-text-black has-text-weight-semibold has-bottom-shadow"
|
||||
class="has-text-black has-text-weight-semibold has-bottom-shadow"
|
||||
@onLinkClick={{D.actions.close}}
|
||||
>
|
||||
View version history
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
{{yield}}
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="selectable-card is-rounded {{if this.actionCard "no-flex"}}">
|
||||
<div class="selectable-card is-rounded {{if this.actionCard 'no-flex'}}">
|
||||
{{#if this.actionCard}}
|
||||
<div class="is-flex-between is-fullwidth card-details" data-test-selectable-card={{this.formattedCardTitle}}>
|
||||
<h3 class="title is-5">{{this.formattedCardTitle}}</h3>
|
||||
|
|
|
@ -35,20 +35,20 @@
|
|||
</div>
|
||||
{{/unless}}
|
||||
<div
|
||||
class="field text-file box is-fullwidth is-marginless is-shadowless {{if this.inputOnly "is-paddingless"}}"
|
||||
class="field text-file box is-fullwidth is-marginless is-shadowless {{if this.inputOnly 'is-paddingless'}}"
|
||||
data-test-component="text-file"
|
||||
>
|
||||
{{#if @file.enterAsText}}
|
||||
<div class="control has-icon-right">
|
||||
<textarea
|
||||
class="textarea {{unless this.showValue "masked-font"}}"
|
||||
class="textarea {{unless this.showValue 'masked-font'}}"
|
||||
{{on "input" this.updateData}}
|
||||
data-test-text-file-textarea={{true}}
|
||||
>{{@file.value}}</textarea>
|
||||
<button
|
||||
{{on "click" this.toggleMask}}
|
||||
type="button"
|
||||
class="{{if (eq this.value "") "has-text-grey"}} masked-input-toggle button {{if this.displayOnly "is-compact"}}"
|
||||
class="{{if (eq this.value '') 'has-text-grey'}} masked-input-toggle button {{if this.displayOnly 'is-compact'}}"
|
||||
data-test-button
|
||||
>
|
||||
<Icon @name={{if this.showValue "eye" "eye-off"}} />
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<AlertBanner
|
||||
@type="danger"
|
||||
@message="Your auth token expired on
|
||||
{{date-format @expirationDate "MMMM do yyyy, h:mm:ss a"}}
|
||||
{{date-format @expirationDate 'MMMM do yyyy, h:mm:ss a'}}
|
||||
. You will need to re-authenticate."
|
||||
>
|
||||
<LinkTo @route="vault.cluster.logout" class="button link">
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
</label>
|
||||
<div class="control">
|
||||
<Textarea id="input-hash" name="input" @value={{@input}} class="textarea" data-test-tools-input="hash-input" />
|
||||
<B64Toggle @value={{@input}} @isInput={{false}} @data-test-tools-b64-toggle="input" />
|
||||
<B64Toggle @value={{@input}} @isInput={{false}} @data-test-transit-b64-toggle="input" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="field is-horizontal">
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
<ul>
|
||||
{{! template-lint-configure no-nested-interactive "warn" }}
|
||||
<li
|
||||
role="tab"
|
||||
aria-selected={{if (eq @unwrapActiveTab "data") "true" "false"}}
|
||||
class={{if (eq @unwrapActiveTab "data") "is-active"}}
|
||||
>
|
||||
|
@ -26,7 +25,6 @@
|
|||
</button>
|
||||
</li>
|
||||
<li
|
||||
role="tab"
|
||||
aria-selected={{if (eq @unwrapActiveTab "data") "true" "false"}}
|
||||
class={{if (eq @unwrapActiveTab "details") "is-active"}}
|
||||
>
|
||||
|
|
|
@ -1,17 +1,10 @@
|
|||
<SecretLink
|
||||
@class="toolbar-link"
|
||||
@mode={{this.mode}}
|
||||
@secret={{this.secret}}
|
||||
@replace={{this.replace}}
|
||||
@queryParams={{this.queryParams}}
|
||||
@data-test-edit-link={{this.data-test-edit-link}}
|
||||
@data-test-sign-link={{this.data-test-sign-link}}
|
||||
@data-test-transit-link={{this.data-test-transit-link}}
|
||||
@data-test-secret-create={{this.data-test-secret-create}}
|
||||
@data-test-credentials-link={{this.data-test-credentials-link}}
|
||||
@data-test-backend-credentials={{this.data-test-backend-credentials}}
|
||||
@data-test-transit-action-link={{this.data-test-transit-action-link}}
|
||||
@data-test-transit-key-actions-link={{this.data-test-transit-key-actions-link}}
|
||||
@mode={{@mode}}
|
||||
@secret={{@secret}}
|
||||
@replace={{@replace}}
|
||||
@queryParams={{@queryParams}}
|
||||
class="toolbar-link"
|
||||
...attributes
|
||||
>
|
||||
{{yield}}
|
||||
<Icon @name={{this.glyph}} />
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<ToggleButton
|
||||
@toggleAttr={{"showForm"}}
|
||||
@toggleTarget={{this}}
|
||||
@isOpen={{this.showForm}}
|
||||
@openLabel="Advanced templating"
|
||||
@closedLabel="Advanced templating"
|
||||
@onClick={{fn (mut this.showForm)}}
|
||||
data-test-toggle-advanced={{true}}
|
||||
/>
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
Save
|
||||
{{/if}}
|
||||
</button>
|
||||
<SecretLink @mode={{if (eq this.mode "create") "list" "show"}} @class="button" @secret={{this.model.id}}>
|
||||
<SecretLink @mode={{if (eq this.mode "create") "list" "show"}} class="button" @secret={{this.model.id}}>
|
||||
Cancel
|
||||
</SecretLink>
|
||||
</div>
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
Save
|
||||
{{/if}}
|
||||
</button>
|
||||
<SecretLink @mode={{if (eq this.mode "create") "list" "show"}} @class="button" @secret={{this.model.id}}>
|
||||
<SecretLink @mode={{if (eq this.mode "create") "list" "show"}} class="button" @secret={{this.model.id}}>
|
||||
Cancel
|
||||
</SecretLink>
|
||||
</div>
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
<ToolbarSecretLink
|
||||
@secret={{concat this.model.idPrefix this.model.id}}
|
||||
@mode="edit"
|
||||
@data-test-edit-link={{true}}
|
||||
data-test-edit-link={{true}}
|
||||
@replace={{true}}
|
||||
>
|
||||
Edit role
|
||||
|
@ -77,7 +77,7 @@
|
|||
</button>
|
||||
<SecretLink
|
||||
@mode={{if (eq this.mode "create") "list" "show"}}
|
||||
@class="button"
|
||||
class="button"
|
||||
@secret={{concat "role/" this.model.id}}
|
||||
>
|
||||
Cancel
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<ToolbarSecretLink
|
||||
@secret={{concat this.model.idPrefix this.model.id}}
|
||||
@mode="edit"
|
||||
@data-test-edit-link={{true}}
|
||||
data-test-edit-link={{true}}
|
||||
@replace={{true}}
|
||||
>
|
||||
Edit template
|
||||
|
@ -92,7 +92,7 @@
|
|||
</button>
|
||||
<SecretLink
|
||||
@mode={{if (eq this.mode "create") "list" "show"}}
|
||||
@class="button"
|
||||
class="button"
|
||||
@secret={{concat this.model.idPrefix this.model.id}}
|
||||
>
|
||||
Cancel
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
Edit transformation
|
||||
</button>
|
||||
{{else}}
|
||||
<ToolbarSecretLink @secret={{this.model.id}} @mode="edit" @data-test-edit-link={{true}} @replace={{true}}>
|
||||
<ToolbarSecretLink @secret={{this.model.id}} @mode="edit" data-test-edit-link={{true}} @replace={{true}}>
|
||||
Edit transformation
|
||||
</ToolbarSecretLink>
|
||||
{{/if}}
|
||||
|
|
|
@ -124,13 +124,13 @@
|
|||
data-test-transit-key-create
|
||||
type="submit"
|
||||
disabled={{@requestInFlight}}
|
||||
class="button is-primary {{if @requestInFlight "is-loading"}}"
|
||||
class="button is-primary {{if @requestInFlight 'is-loading'}}"
|
||||
>
|
||||
Create encryption key
|
||||
</button>
|
||||
</div>
|
||||
<div class="control">
|
||||
<SecretLink @mode="list" @class="button">
|
||||
<SecretLink @mode="list" class="button">
|
||||
Cancel
|
||||
</SecretLink>
|
||||
</div>
|
||||
|
|
|
@ -86,13 +86,13 @@
|
|||
<div class="field is-grouped">
|
||||
{{#if @capabilities.canUpdate}}
|
||||
<div class="control">
|
||||
<button type="submit" disabled={{@requestInFlight}} class="button is-primary {{if @requestInFlight "is-loading"}}">
|
||||
<button type="submit" disabled={{@requestInFlight}} class="button is-primary {{if @requestInFlight 'is-loading'}}">
|
||||
Update transit key
|
||||
</button>
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="control">
|
||||
<SecretLink @mode="show" @secret={{@key.id}} @class="button">
|
||||
<SecretLink @mode="show" @secret={{@key.id}} class="button">
|
||||
Cancel
|
||||
</SecretLink>
|
||||
</div>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
@mode="show"
|
||||
@replace={{true}}
|
||||
@queryParams={{query-params tab="actions"}}
|
||||
@data-test-transit-key-actions-link={{true}}
|
||||
data-test-transit-key-actions-link={{true}}
|
||||
>
|
||||
Key Actions
|
||||
</SecretLink>
|
||||
|
@ -19,7 +19,7 @@
|
|||
@mode="show"
|
||||
@replace={{true}}
|
||||
@queryParams={{query-params tab="details"}}
|
||||
@data-test-transit-link="details"
|
||||
data-test-transit-link="details"
|
||||
>
|
||||
Details
|
||||
</SecretLink>
|
||||
|
@ -31,7 +31,7 @@
|
|||
@mode="show"
|
||||
@replace={{true}}
|
||||
@queryParams={{query-params tab="versions"}}
|
||||
@data-test-transit-link="versions"
|
||||
data-test-transit-link="versions"
|
||||
>
|
||||
Versions
|
||||
</SecretLink>
|
||||
|
@ -59,13 +59,12 @@
|
|||
{{#if (eq @tab "actions")}}
|
||||
<div class="transit-card-container">
|
||||
{{#each @model.supportedActions as |supportedAction|}}
|
||||
{{#linked-block
|
||||
"vault.cluster.secrets.backend.actions"
|
||||
@model.id
|
||||
queryParams=(hash action=supportedAction.name)
|
||||
<LinkedBlock
|
||||
@params={{array "vault.cluster.secrets.backend.actions" @model.id}}
|
||||
@queryParams={{hash action=supportedAction.name}}
|
||||
class="transit-card"
|
||||
data-test-transit-card=supportedAction.name
|
||||
}}
|
||||
data-test-transit-card={{supportedAction.name}}
|
||||
>
|
||||
<div class="transit-icon">
|
||||
<Icon
|
||||
@name={{supportedAction.glyph}}
|
||||
|
@ -85,7 +84,7 @@
|
|||
</h2>
|
||||
<p class="transit-action-description">{{supportedAction.description}}</p>
|
||||
</div>
|
||||
{{/linked-block}}
|
||||
</LinkedBlock>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{else if (eq @tab "versions")}}
|
||||
|
|
|
@ -109,7 +109,7 @@
|
|||
</div>
|
||||
<div class="field is-grouped box is-fullwidth is-bottomless">
|
||||
<div class="control">
|
||||
<button type="submit" disabled={{@loading}} class="button is-primary {{if @loading "is-loading"}}">
|
||||
<button type="submit" disabled={{@loading}} class="button is-primary {{if @loading 'is-loading'}}">
|
||||
Sign
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -181,7 +181,7 @@
|
|||
</div>
|
||||
<div class="field is-grouped box is-fullwidth is-bottomless">
|
||||
<div class="control">
|
||||
<button type="submit" disabled={{@loading}} class="button is-primary {{if @loading "is-loading"}}">
|
||||
<button type="submit" disabled={{@loading}} class="button is-primary {{if @loading 'is-loading'}}">
|
||||
Verify
|
||||
</button>
|
||||
</div>
|
||||
|
@ -192,7 +192,7 @@
|
|||
<AlertBanner
|
||||
@type={{if @valid "success" "danger"}}
|
||||
@title={{if @valid "Valid" "Not Valid"}}
|
||||
@message="The input is {{if @valid "valid" "not valid"}} for the given {{if @signature "signature" "HMAC"}}"
|
||||
@message="The input is {{if @valid 'valid' 'not valid'}} for the given {{if @signature 'signature' 'HMAC'}}"
|
||||
data-test-transit-verify="true"
|
||||
/>
|
||||
</section>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="app-content {{if (and this.shouldRender this.featureComponent) "wizard-open"}}">
|
||||
<div class="app-content {{if (and this.shouldRender this.featureComponent) 'wizard-open'}}">
|
||||
{{yield}}
|
||||
</div>
|
||||
{{#if this.featureComponent}}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<span class="feature-progress" style={{bar.style}} {{! template-lint-disable }}></span>
|
||||
</span>
|
||||
{{#if bar.showIcon}}
|
||||
<Icon @name="check-circle-fill" class="feature-check {{if bar.completed "completed-check" "incomplete-check"}}" />
|
||||
<Icon @name="check-circle-fill" class="feature-check {{if bar.completed 'completed-check' 'incomplete-check'}}" />
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/each}}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue