Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI ember engines #6718

Merged
merged 68 commits into from
May 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
cd31733
add initializer hook to mount engines inside the cluster route
meirish Apr 17, 2019
d172a5b
add ember-engines and an in-repo addon
meirish Apr 18, 2019
0bff315
start moving components needed for replication to core addon
meirish Apr 18, 2019
9079a14
move replication routes to a lazy engine
meirish Apr 18, 2019
a7f6ebd
add assetLoader block to the build to support rootURL for engines
meirish Apr 19, 2019
e25dbba
share template addons in the core addon
meirish Apr 19, 2019
0881573
share services with the replication engine
meirish Apr 19, 2019
384b9a2
move replication code over to the replication engine
meirish Apr 19, 2019
2f4b6df
move shared components to core and replication components to replicat…
meirish Apr 20, 2019
a6cf9b4
move shared helpers and utils to core
meirish Apr 20, 2019
e7ab398
move named replication route to addon application route
meirish Apr 20, 2019
fa7a39a
update shared services and core addon deps
meirish Apr 20, 2019
f657fc4
comment out usage of i-con component for now
meirish Apr 22, 2019
e1470a8
share info-table-row, is-active-route helper, ember-cli-string-helpers
meirish Apr 22, 2019
2684b28
change route names to be relative to the replication engine
meirish Apr 22, 2019
22c0729
share confirm-action and doc-link components
meirish Apr 22, 2019
ea22005
share namespace service
meirish Apr 22, 2019
b4efee9
share ttl-picker component
meirish Apr 22, 2019
313e041
more relative routes and move params checking to the model hook inste…
meirish Apr 22, 2019
e90faf6
fix ttl component sharing
meirish Apr 23, 2019
06a3745
fix routing issue with using cluster name in engine route
meirish Apr 23, 2019
31c5133
move replication partials to components in the replication engine
meirish Apr 23, 2019
d2a9337
share alert-inline component and message-types helper
meirish Apr 23, 2019
73e5ed3
remove test component
meirish Apr 23, 2019
5e8130a
fix non-replication tests
meirish Apr 23, 2019
2d4507c
remove reduce-to-array helper
meirish Apr 25, 2019
679f45e
rework components that came from partials
meirish Apr 25, 2019
28b0c55
move vault-loading and loading partials to shared components in core
meirish Apr 25, 2019
bba3293
share upgrade-page and mount-filter-config-list
meirish Apr 25, 2019
fe23b01
remove includes helper, use contains from ember-composable-helpers
meirish Apr 25, 2019
804f621
move toggle-button and upgrade-page to core addon
meirish Apr 25, 2019
f73000e
don't reexport layout for engines components
meirish Apr 25, 2019
a989004
fix integration tests for the engine component
meirish Apr 25, 2019
94fdddd
share popup-menu component, basic-dropdown addon, and set-flash-messa…
meirish Apr 26, 2019
763eb2e
trigger route reloads, and fix routing from controllers, fix tests
meirish Apr 26, 2019
41b2c59
no text in the popup because it breaks some filtering by text in tests
meirish Apr 29, 2019
69bb513
fix tests
meirish Apr 29, 2019
a0bf995
update yarn.lock
meirish May 3, 2019
893aac9
update md generation script so you can point it at an addon / engine …
meirish May 5, 2019
25c448d
update ember-cli-storybook fork to support asset-manifest
meirish May 6, 2019
67a6b18
updates to the generated preview head for storybook
meirish May 6, 2019
1c2a191
add doc-link, empty-state, info-table-row, loading-layout, message-er…
meirish May 6, 2019
9bf44b9
OR the search for component usage to match curly or angle bracket syntax
meirish May 6, 2019
1abbb9e
move new components to core addon and comment out ICon usage
meirish May 10, 2019
d949ab7
Merge pull request #6712 from hashicorp/ui-engines-share-toolbar
meirish May 10, 2019
9ac3abd
add ember-svg-jar
meirish May 7, 2019
563ffcc
add new icon component
meirish May 7, 2019
70794df
use icon in core alert components
meirish May 7, 2019
81a8ece
move replication svgs to the public folder and use new icon in rempli…
meirish May 7, 2019
f72e432
fix ember-svg-jar so we can run the ember app locally
meirish May 8, 2019
bc50067
replace i-con with icon in the core addon
meirish May 8, 2019
3d8b11b
add chevron component
meirish May 8, 2019
8a2a8f2
move icons enable icons to public/eco and rename to svg
meirish May 8, 2019
9779762
use icon instead of i-con in host application
meirish May 8, 2019
c54cad7
replace ICon with Icon in the host app
meirish May 9, 2019
aacc1c2
add structure-icons css to the host app's build
meirish May 9, 2019
22eb533
fix warning icon
meirish May 9, 2019
b36dda2
use file path for the source link when generating story markdown
meirish May 9, 2019
7650ec3
add chevron and icon to storybook, remove i-con storybook
meirish May 9, 2019
de84917
remove old i-con, add tests for icon and chevron components
meirish May 9, 2019
f65c0d6
migrate toolbar usage from ICon to Icon
meirish May 10, 2019
e9e7dc9
fix search icon positioning
meirish May 10, 2019
c440f50
Merge pull request #6707 from hashicorp/ui-new-icon
meirish May 10, 2019
e0ec6d4
move upgrade-link to core addon
meirish May 10, 2019
38d1662
use has-block helper instead of hasBlock property on a component
meirish May 10, 2019
a627670
move is-version to core
meirish May 10, 2019
8213723
unbreak the design from moving over things to engines
meirish May 10, 2019
91ead87
remove unneeded helper
meirish May 10, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion ui/.storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<meta name="vault/config/environment" content="%7B%22modulePrefix%22%3A%22vault%22%2C%22environment%22%3A%22development%22%2C%22rootURL%22%3A%22/ui/%22%2C%22locationType%22%3A%22auto%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%2C%22EXTEND_PROTOTYPES%22%3A%7B%22Date%22%3Afalse%7D%7D%2C%22APP%22%3A%7B%22POLLING_URLS%22%3A%5B%22sys/health%22%2C%22sys/replication/status%22%2C%22sys/seal-status%22%5D%2C%22NAMESPACE_ROOT_URLS%22%3A%5B%22sys/health%22%2C%22sys/seal-status%22%2C%22sys/license/features%22%5D%2C%22DEFAULT_PAGE_SIZE%22%3A15%2C%22LOG_TRANSITIONS%22%3Atrue%7D%2C%22flashMessageDefaults%22%3A%7B%22timeout%22%3A7000%2C%22sticky%22%3Afalse%2C%22preventDuplicates%22%3Atrue%7D%2C%22contentSecurityPolicyHeader%22%3A%22Content-Security-Policy%22%2C%22contentSecurityPolicyMeta%22%3Atrue%2C%22contentSecurityPolicy%22%3A%7B%22connect-src%22%3A%5B%22%27self%27%22%5D%2C%22img-src%22%3A%5B%22%27self%27%22%2C%22data%3A%22%5D%2C%22form-action%22%3A%5B%22%27none%27%22%5D%2C%22script-src%22%3A%5B%22%27self%27%22%5D%2C%22style-src%22%3A%5B%22%27unsafe-inline%27%22%2C%22%27self%27%22%5D%2C%22default-src%22%3A%5B%22%27none%27%22%5D%2C%22font-src%22%3A%5B%22%27self%27%22%5D%2C%22media-src%22%3A%5B%22%27self%27%22%5D%7D%2C%22emberData%22%3A%7B%22enableRecordDataRFCBuild%22%3Afalse%7D%2C%22exportApplicationGlobal%22%3Atrue%7D" />
<meta name="vault/config/environment" content="%7B%22modulePrefix%22%3A%22vault%22%2C%22environment%22%3A%22development%22%2C%22rootURL%22%3A%22/ui/%22%2C%22locationType%22%3A%22auto%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%2C%22EXTEND_PROTOTYPES%22%3A%7B%22Date%22%3Afalse%7D%7D%2C%22APP%22%3A%7B%22POLLING_URLS%22%3A%5B%22sys/health%22%2C%22sys/replication/status%22%2C%22sys/seal-status%22%5D%2C%22NAMESPACE_ROOT_URLS%22%3A%5B%22sys/health%22%2C%22sys/seal-status%22%2C%22sys/license/features%22%5D%2C%22DEFAULT_PAGE_SIZE%22%3A15%2C%22LOG_TRANSITIONS%22%3Atrue%7D%2C%22flashMessageDefaults%22%3A%7B%22timeout%22%3A7000%2C%22sticky%22%3Afalse%7D%2C%22contentSecurityPolicyHeader%22%3A%22Content-Security-Policy%22%2C%22contentSecurityPolicyMeta%22%3Atrue%2C%22contentSecurityPolicy%22%3A%7B%22connect-src%22%3A%5B%22%27self%27%22%5D%2C%22img-src%22%3A%5B%22%27self%27%22%2C%22data%3A%22%5D%2C%22form-action%22%3A%5B%22%27none%27%22%5D%2C%22script-src%22%3A%5B%22%27self%27%22%5D%2C%22style-src%22%3A%5B%22%27unsafe-inline%27%22%2C%22%27self%27%22%5D%2C%22default-src%22%3A%5B%22%27none%27%22%5D%2C%22font-src%22%3A%5B%22%27self%27%22%5D%2C%22media-src%22%3A%5B%22%27self%27%22%5D%7D%2C%22emberData%22%3A%7B%22enableRecordDataRFCBuild%22%3Afalse%7D%2C%22exportApplicationGlobal%22%3Atrue%7D" />
<meta name="replication/config/environment" content="%7B%22modulePrefix%22%3A%22replication%22%2C%22environment%22%3A%22development%22%7D" />
<meta name="vault/config/asset-manifest" content="%7B%22bundles%22%3A%7B%22replication%22%3A%7B%22assets%22%3A%5B%7B%22uri%22%3A%22/ui/engines-dist/replication/assets/engine-vendor.js%22%2C%22type%22%3A%22js%22%7D%2C%7B%22uri%22%3A%22/ui/engines-dist/replication/assets/engine.js%22%2C%22type%22%3A%22js%22%7D%5D%7D%7D%7D" />
<link rel="stylesheet" href="/assets/vendor.css" />
<link rel="stylesheet" href="/assets/vault.css" />
<link rel="icon" href="/favicon.png" />
Expand Down
17 changes: 17 additions & 0 deletions ui/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,27 @@ defineModifier();

let App;

/* eslint-disable ember/avoid-leaking-state-in-ember-objects */
App = Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
Resolver,
engines: {
replication: {
dependencies: {
services: [
'auth',
'flash-messages',
'namespace',
'replication-mode',
'router',
'store',
'version',
'wizard',
],
},
},
},
});

loadInitializers(App, config.modulePrefix);
Expand Down
2 changes: 1 addition & 1 deletion ui/app/components/download-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { computed } from '@ember/object';
import hbs from 'htmlbars-inline-precompile';

export default Component.extend({
layout: hbs`{{#if hasBlock}} {{yield}} {{else}} {{actionText}} {{/if}}`,
layout: hbs`{{#if (has-block)}} {{yield}} {{else}} {{actionText}} {{/if}}`,
tagName: 'a',
role: 'button',
attributeBindings: ['role', 'download', 'href'],
Expand Down
6 changes: 0 additions & 6 deletions ui/app/components/empty-state.js

This file was deleted.

84 changes: 0 additions & 84 deletions ui/app/components/i-con.js

This file was deleted.

34 changes: 0 additions & 34 deletions ui/app/components/info-table-row.js

This file was deleted.

5 changes: 0 additions & 5 deletions ui/app/components/popup-menu.js

This file was deleted.

50 changes: 0 additions & 50 deletions ui/app/components/secret-form-header.js

This file was deleted.

2 changes: 1 addition & 1 deletion ui/app/components/status-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default Component.extend({
glyphName: computed('type', function() {
const glyphs = {
cluster: 'status-indicator',
user: 'person',
user: 'user-square-outline',
};
return glyphs[this.type];
}),
Expand Down
3 changes: 0 additions & 3 deletions ui/app/components/toolbar-actions.js

This file was deleted.

6 changes: 0 additions & 6 deletions ui/app/components/toolbar.js

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions ui/app/helpers/includes.js

This file was deleted.

17 changes: 0 additions & 17 deletions ui/app/helpers/reduce-to-array.js

This file was deleted.

13 changes: 13 additions & 0 deletions ui/app/initializers/enable-engines.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import config from '../config/environment';

export function initialize(/* application */) {
// attach mount hooks to the environment config
// context will be the router DSL
config.addRootMounts = function() {
this.mount('replication');
};
}

export default {
initialize,
};
3 changes: 2 additions & 1 deletion ui/app/mixins/cluster-route.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export { INIT, UNSEAL, AUTH, CLUSTER, DR_REPLICATION_SECONDARY };

export default Mixin.create({
auth: service(),
store: service(),

transitionToTargetRoute(transition) {
const targetRoute = this.targetRouteName(transition);
Expand All @@ -28,7 +29,7 @@ export default Mixin.create({
},

clusterModel() {
return this.modelFor(CLUSTER);
return this.modelFor(CLUSTER) || this.store.peekRecord('cluster', 'vault');
},

authToken() {
Expand Down
2 changes: 1 addition & 1 deletion ui/app/models/cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default DS.Model.extend({
}),

stateGlyph(state) {
const glyph = 'checkmark-circled-outline';
const glyph = 'check-circled-outline';

const glyphs = {
'stream-wals': 'android-sync',
Expand Down
19 changes: 3 additions & 16 deletions ui/app/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,22 +114,9 @@ Router.map(function() {
this.route('edit', { path: '/:policy_name/edit' });
});
this.route('replication-dr-promote');
this.route('replication', function() {
this.route('index', { path: '/' });
this.route('mode', { path: '/:replication_mode' }, function() {
//details
this.route('index', { path: '/' });
this.route('manage');
this.route('secondaries', function() {
this.route('add', { path: '/add' });
this.route('revoke', { path: '/revoke' });
this.route('config-show', { path: '/config/show/:secondary_id' });
this.route('config-edit', { path: '/config/edit/:secondary_id' });
this.route('config-create', { path: '/config/create/:secondary_id' });
});
});
});

if (config.addRootMounts) {
config.addRootMounts.call(this);
}
this.route('not-found', { path: '/*path' });
});
this.route('not-found', { path: '/*path' });
Expand Down
13 changes: 0 additions & 13 deletions ui/app/routes/vault/cluster/replication/mode/index.js

This file was deleted.

2 changes: 1 addition & 1 deletion ui/app/styles/components/console-ui-panel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
margin-left: calc(#{$console-spacing} - 0.33rem);
position: relative;

.icon {
.hs-icon {
position: absolute;
left: 0;
top: 0;
Expand Down
Loading