-
-
-
-
-
-
- {{backend.engineType}}
-
-
-
-
- {{backend.path}}
-
-
-
- {{#if (eq backend.options.version 2)}}
- v2
- {{/if}}
-
-
- {{backend.accessor}}
-
+ )) as |backendLink|}}
+ {{#linked-block
+ backendLink
+ backend.id
+ class="list-item-row"
+ data-test-secret-backend-row=backend.id
+ }}
+
+
+
+
+
+
+
+
+
+ {{backend.engineType}}
+
+
+
+
+ {{backend.path}}
+
+
+
+ {{#if (eq backend.options.version 2)}}
+ v2
+ {{/if}}
+
+
+ {{backend.accessor}}
+
+
-
-
- {{/linked-block}}
+ {{/linked-block}}
+ {{/let}}
{{/each}}
{{#each unsupportedBackends as |backend|}}
diff --git a/ui/lib/core/addon/components/empty-state.js b/ui/lib/core/addon/components/empty-state.js
index 2a2f36ac4..4a455e0d3 100644
--- a/ui/lib/core/addon/components/empty-state.js
+++ b/ui/lib/core/addon/components/empty-state.js
@@ -12,8 +12,10 @@ import layout from '../templates/components/empty-state';
* ```
*
* @param title=null{String} - A short label for the empty state
+ * @param subTitle=null{String} - A sub title that goes underneath the main title
* @param message=null{String} - A description of why a user might be seeing the empty state and possibly instructions for actions they may take.
- * @param [icon='']{String} - A optional param to display icon to the right of the title
+ * @param [icon='']{String} - An optional param to display icon to the right of the title
+ * @param bottomBorder=false{Boolean} - A bottom border underneath the message. Generally used when you have links under the message
*/
export default Component.extend({
@@ -22,4 +24,5 @@ export default Component.extend({
title: null,
message: null,
icon: '',
+ bottomBorder: false,
});
diff --git a/ui/lib/core/addon/components/form-field.js b/ui/lib/core/addon/components/form-field.js
index 3ade5a22f..1447b93c7 100644
--- a/ui/lib/core/addon/components/form-field.js
+++ b/ui/lib/core/addon/components/form-field.js
@@ -84,6 +84,9 @@ export default Component.extend({
model: null,
+ // This is only used internally for `optional-text` editType
+ showInput: false,
+
/*
* @private
* @param object
@@ -130,5 +133,13 @@ export default Component.extend({
this.onChange(path, valToSet);
}
},
+
+ toggleShow(path) {
+ const value = !this.showInput;
+ this.set('showInput', value);
+ if (!value) {
+ this.send('setAndBroadcast', path, null);
+ }
+ },
},
});
diff --git a/ui/lib/core/addon/components/info-table-row.js b/ui/lib/core/addon/components/info-table-row.js
index 3c2eef0c3..2ab9083e8 100644
--- a/ui/lib/core/addon/components/info-table-row.js
+++ b/ui/lib/core/addon/components/info-table-row.js
@@ -23,7 +23,9 @@ import layout from '../templates/components/info-table-row';
* @param [modelType=null] {string} - Passed through to InfoTableItemArray. Tells what model you want data for the allOptions to be returned from. Used in conjunction with the the isLink.
* @param [queryParam] {String} - Passed through to InfoTableItemArray. If you want to specific a tab for the View All XX to display to. Ex: role
* @param [backend] {String} - Passed through to InfoTableItemArray. To specify secrets backend to point link to Ex: transformation
- * @param [viewAll] {String} - Passed through to InfoTableItemArray. Specify the word at the end of the link View all xx.
+ * @param [viewAll] {String} - Passed through to InfoTableItemArray. Specify the word at the end of the link View all.
+ * @param [tooltipText] {String} - Text if a tooltip should display over the value.
+ * @param [defaultShown] {String} - Text that renders as value if alwaysRender=true. Eg. "Vault default"
*/
export default Component.extend({
@@ -36,6 +38,8 @@ export default Component.extend({
label: null,
helperText: null,
value: null,
+ tooltipText: '',
+ defaultShown: '',
valueIsBoolean: computed('value', function() {
return typeOf(this.value) === 'boolean';
diff --git a/ui/lib/core/addon/components/readonly-form-field.js b/ui/lib/core/addon/components/readonly-form-field.js
new file mode 100644
index 000000000..181a937dc
--- /dev/null
+++ b/ui/lib/core/addon/components/readonly-form-field.js
@@ -0,0 +1,36 @@
+/**
+ * @module ReadonlyFormField
+ * ReadonlyFormField components are used to...
+ *
+ * @example
+ * ```js
+ *
+ * ```
+ * @param {object} attr - Should be an attribute from a model exported with expandAttributeMeta
+ * @param {any} value - The value that should be displayed on the input
+ */
+
+import Component from '@glimmer/component';
+import { setComponentTemplate } from '@ember/component';
+import { capitalize, dasherize } from '@ember/string';
+import { humanize } from 'vault/helpers/humanize';
+import layout from '../templates/components/readonly-form-field';
+
+class ReadonlyFormField extends Component {
+ get labelString() {
+ if (!this.args.attr) {
+ return '';
+ }
+ const label = this.args.attr.options ? this.args.attr.options.label : '';
+ const name = this.args.attr.name;
+ if (label) {
+ return label;
+ }
+ if (name) {
+ return capitalize(humanize([dasherize(name)]));
+ }
+ return '';
+ }
+}
+
+export default setComponentTemplate(layout, ReadonlyFormField);
diff --git a/ui/lib/core/addon/components/search-select.js b/ui/lib/core/addon/components/search-select.js
index a0a6c4d73..ede02da56 100644
--- a/ui/lib/core/addon/components/search-select.js
+++ b/ui/lib/core/addon/components/search-select.js
@@ -12,7 +12,7 @@ import layout from '../templates/components/search-select';
*
*
* @param id {String} - The name of the form field
- * @param models {String} - An array of model types to fetch from the API.
+ * @param models {Array} - An array of model types to fetch from the API.
* @param onChange {Func} - The onchange action for this form field.
* @param inputValue {String | Array} - A comma-separated string or an array of strings.
* @param label {String} - Label for this form field
@@ -147,6 +147,7 @@ export default Component.extend({
},
discardSelection(selected) {
this.selectedOptions.removeObject(selected);
+ // fire off getSelectedValue action higher up in get-credentials-card component
if (!selected.new) {
this.options.pushObject(selected);
}
diff --git a/ui/lib/core/addon/templates/components/empty-state.hbs b/ui/lib/core/addon/templates/components/empty-state.hbs
index eccbf8274..8d3996680 100644
--- a/ui/lib/core/addon/templates/components/empty-state.hbs
+++ b/ui/lib/core/addon/templates/components/empty-state.hbs
@@ -7,13 +7,23 @@
{{title}}
+ {{#if subTitle}}
+
+ {{subTitle}}
+
+ {{/if}}
{{else}}
{{title}}
+ {{#if subTitle}}
+
+ {{subTitle}}
+
+ {{/if}}
{{/if}}
{{#if message}}
-
+
{{message}}
{{/if}}
diff --git a/ui/lib/core/addon/templates/components/form-field-groups.hbs b/ui/lib/core/addon/templates/components/form-field-groups.hbs
index ee0329d9e..44fc0c5c6 100644
--- a/ui/lib/core/addon/templates/components/form-field-groups.hbs
+++ b/ui/lib/core/addon/templates/components/form-field-groups.hbs
@@ -4,8 +4,12 @@
{{#if (eq group "default")}}
{{#each fields as |attr|}}
{{#unless (and (not-eq mode "create") (eq attr.name "name"))}}
- {{form-field data-test-field attr=attr model=model onChange=onChange
- }}
+
{{/unless}}
{{/each}}
{{else}}
@@ -20,7 +24,11 @@
{{#if (get this (concat "show" (camelize group)))}}
{{#each fields as |attr|}}
- {{form-field data-test-field attr=attr model=model}}
+
{{/each}}
{{/if}}
diff --git a/ui/lib/core/addon/templates/components/form-field.hbs b/ui/lib/core/addon/templates/components/form-field.hbs
index fd9c3fe0e..5bba74133 100644
--- a/ui/lib/core/addon/templates/components/form-field.hbs
+++ b/ui/lib/core/addon/templates/components/form-field.hbs
@@ -5,6 +5,7 @@
attr.options.editType
(array
"boolean"
+ "optionalText"
"searchSelect"
"mountAccessor"
"kv"
@@ -37,6 +38,11 @@
(action "setAndBroadcast" valuePath)
value="target.value"
}} data-test-input={{attr.name}}>
+ {{#unless attr.options.defaultValue}}
+
+ {{/unless}}
{{#each (path-or-array attr.options.possibleValues model) as |val|}}