diff --git a/app/App.jsx b/app/App.jsx
index 1bd3c76..1b3d6c4 100644
--- a/app/App.jsx
+++ b/app/App.jsx
@@ -79,7 +79,7 @@ ReactDOM.render((
-
+
diff --git a/app/components/Secrets/Generic/Generic.jsx b/app/components/Secrets/Generic/Generic.jsx
index 93fbaa7..29d6321 100644
--- a/app/components/Secrets/Generic/Generic.jsx
+++ b/app/components/Secrets/Generic/Generic.jsx
@@ -34,14 +34,14 @@ export default class GenericSecretBackend extends React.Component {
constructor(props) {
super(props);
- this.baseUrl = `/secrets/generic/${this.props.params.namespace}/`;
- this.baseVaultPath = `${this.props.params.namespace}`;
+ this.baseUrl = `/secrets/${this.props.params.namespace}/`;
+ this.baseVaultPath = `${this.props.params.splat}`;
this.state = {
newSecretBtnDisabled: true,
secretContent: {},
newSecretName: '',
- currentLogicalPath: `${this.props.params.namespace}/${this.props.params.splat}`,
+ currentLogicalPath: `${this.props.params.splat}`,
disableSubmit: true,
openNewObjectModal: false,
openEditObjectModal: false,
@@ -130,10 +130,13 @@ export default class GenericSecretBackend extends React.Component {
}
componentWillReceiveProps(nextProps) {
- if (!_.isEqual(`${nextProps.params.namespace}/${nextProps.params.splat}`, this.state.currentLogicalPath)) {
- this.setState({ currentLogicalPath: `${nextProps.params.namespace}/${nextProps.params.splat}` })
+ if (!_.isEqual(`${nextProps.params.splat}`, this.state.currentLogicalPath)) {
+ this.setState({ currentLogicalPath: `${nextProps.params.splat}` })
}
- if (!_.isEqual(this.props.params.namespace, nextProps.params.namespace)) {
+ if(!_.isEqual(this.props.params.namespace, nextProps.params.namespace)){
+ this.baseUrl = `/secrets/${nextProps.params.namespace}/`;
+ }
+ if (!_.isEqual(this.props.params.splat, nextProps.params.splat)) {
// Reset
this.setState({
secretList: []
@@ -323,7 +326,7 @@ export default class GenericSecretBackend extends React.Component {
var stepLabelStyle = { paddingLeft: '10px'}
var iconContainerStyle = {}
}
- return (}>{dir})
+ return (}>{dir})
});
}
@@ -393,7 +396,8 @@ export default class GenericSecretBackend extends React.Component {
this.setState({ newSecretName: '', currentLogicalPath: `${this.state.currentLogicalPath}${key}` });
tokenHasCapabilities([this.isPathDirectory(key) ? 'list' : 'read'], `${this.state.currentLogicalPath}${key}`)
.then(() => {
- history.push(`/secrets/generic/${this.state.currentLogicalPath}`);
+ console.log(`${this.baseUrl}${this.state.currentLogicalPath}`);
+ history.push(`${this.baseUrl}${this.state.currentLogicalPath}`);
}).catch(() => {
snackBarMessage(new Error("Access denied"));
})
diff --git a/app/components/shared/Menu/Menu.jsx b/app/components/shared/Menu/Menu.jsx
index 478ef26..481659e 100644
--- a/app/components/shared/Menu/Menu.jsx
+++ b/app/components/shared/Menu/Menu.jsx
@@ -13,7 +13,8 @@ import { tokenHasCapabilities, callVaultApi, history } from '../VaultUtils.jsx'
const SelectableList = makeSelectable(List);
const supported_secret_backend_types = [
- 'generic'
+ 'generic',
+ 'kv'
]
const supported_auth_backend_types = [