-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UI: Clean up Dynamic UI for CRUD (#6994)
- Loading branch information
1 parent
1b7a8ba
commit 15d2fdd
Showing
22 changed files
with
340 additions
and
373 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { inject as service } from '@ember/service'; | ||
import Component from '@ember/component'; | ||
import { getOwner } from '@ember/application'; | ||
|
||
/** | ||
* @module GeneratedItemList | ||
* The `GeneratedItemList` component lists generated items related to mounts (e.g. groups, roles, users) | ||
* | ||
* @example | ||
* ```js | ||
* <GeneratedItemList @model={{model}} @itemType={{itemType/> | ||
* ``` | ||
* | ||
* @property model=null {DS.Model} - The corresponding item model that is being configured. | ||
* @property itemType {String} - the type of item displayed | ||
* | ||
*/ | ||
|
||
export default Component.extend({ | ||
model: null, | ||
itemType: null, | ||
router: service(), | ||
store: service(), | ||
actions: { | ||
refreshItemList() { | ||
let route = getOwner(this).lookup(`route:${this.router.currentRouteName}`); | ||
this.store.clearAllDatasets(); | ||
route.refresh(); | ||
}, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
import Route from '@ember/routing/route'; | ||
|
||
import { tabsForAuthSection } from 'vault/helpers/tabs-for-auth-section'; | ||
export default Route.extend({ | ||
beforeModel() { | ||
return this.transitionTo('vault.cluster.access.method.section', 'configuration'); | ||
let { methodType, paths } = this.modelFor('vault.cluster.access.method'); | ||
paths = paths ? paths.navPaths.reduce((acc, cur) => acc.concat(cur.path), []) : null; | ||
const activeTab = tabsForAuthSection([methodType, 'authConfig', paths])[0].routeParams; | ||
return this.transitionTo(...activeTab); | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.