diff --git a/ui/README.md b/ui/README.md
index b5fb1a5110..338c34618b 100644
--- a/ui/README.md
+++ b/ui/README.md
@@ -17,6 +17,7 @@
- [Writing Stories](#writing-stories)
- [Adding a new story](#adding-a-new-story)
- [Code Generators](#code-generators-1)
+ - [Storybook Deployment](#storybook-deployment)
- [Further Reading / Useful Links](#further-reading--useful-links)
@@ -67,6 +68,11 @@ long-form version of the npm script:
Make use of the many generators for code, try `ember help generate` for more details. If you're using a component that can be widely-used, consider making it an `addon` component instead (see [this PR](https://github.com/hashicorp/vault/pull/6629) for more details)
+eg. a reusable component named foo that you'd like in the core engine
+
+- `ember g component foo --in lib/core`
+- `echo "export { default } from 'core/components/foo';" > lib/core/app/components/foo.js`
+
### Running Tests
Running tests will spin up a Vault dev server on port 9200 via a
@@ -158,7 +164,7 @@ Note that placing a param inside brackets (e.g. `[closedLabel=More options]` ind
2. Generate a new story with `ember generate story [name-of-component]`
3. Inside the newly generated `stories` file, add at least one example of the component. If the component should be interactive, enable the [Storybook Knobs addon](https://github.com/storybooks/storybook/tree/master/addons/knobs).
-4. Generate the `notes` file for the component with `yarn gen-story-md [name-of-component]` (e.g. `yarn gen-md alert-banner`). This will generate markdown documentation of the component and place it at `vault/ui/stories/[name-of-component].md`. If your component is a template-only component, you will need to manually create the markdown file.
+4. Generate the `notes` file for the component with `yarn gen-story-md [name-of-component] [name-of-engine-or-addon]` (e.g. `yarn gen-md alert-banner core`). This will generate markdown documentation of the component and place it at `vault/ui/stories/[name-of-component].md`. If your component is a template-only component, you will need to manually create the markdown file.
See the [Storybook Docs](https://storybook.js.org/docs/basics/introduction/) for more information on writing stories.
diff --git a/ui/app/adapters/cluster.js b/ui/app/adapters/cluster.js
index 110060a6ea..dd7d17220a 100644
--- a/ui/app/adapters/cluster.js
+++ b/ui/app/adapters/cluster.js
@@ -183,7 +183,10 @@ export default ApplicationAdapter.extend({
},
generateDrOperationToken(data, options) {
- const verb = options && options.checkStatus ? 'GET' : 'PUT';
+ let verb = options && options.checkStatus ? 'GET' : 'PUT';
+ if (options.cancel) {
+ verb = 'DELETE';
+ }
let url = `${this.buildURL()}/replication/dr/secondary/generate-operation-token/`;
if (!data || data.pgp_key || data.attempt) {
// start the generation
diff --git a/ui/app/adapters/replication-mode.js b/ui/app/adapters/replication-mode.js
new file mode 100644
index 0000000000..baa09570f8
--- /dev/null
+++ b/ui/app/adapters/replication-mode.js
@@ -0,0 +1,14 @@
+import ApplicationAdapter from './application';
+
+export default ApplicationAdapter.extend({
+ getStatusUrl(mode) {
+ return this.buildURL() + `/replication/${mode}/status`;
+ },
+
+ fetchStatus(mode) {
+ let url = this.getStatusUrl(mode);
+ return this.ajax(url, 'GET', { unauthenticated: true }).then(resp => {
+ return resp.data;
+ });
+ },
+});
diff --git a/ui/app/app.js b/ui/app/app.js
index 067a6f8c87..509014ac68 100644
--- a/ui/app/app.js
+++ b/ui/app/app.js
@@ -31,6 +31,9 @@ App = Application.extend({
'version',
'wizard',
],
+ externalRoutes: {
+ replication: 'vault.cluster.replication.index',
+ },
},
},
kmip: {
diff --git a/ui/app/components/shamir-modal-flow.js b/ui/app/components/shamir-modal-flow.js
new file mode 100644
index 0000000000..2a06e6f185
--- /dev/null
+++ b/ui/app/components/shamir-modal-flow.js
@@ -0,0 +1,39 @@
+/**
+ * @module ShamirModalFlow
+ * ShamirModalFlow is an extension of the ShamirFlow component that does the Generate Action Token workflow inside of a Modal.
+ * Please note, this is not an extensive list of the required parameters -- please see ShamirFlow for others
+ *
+ * @example
+ * ```js
+ *