Skip to content
This repository has been archived by the owner on Apr 11, 2023. It is now read-only.

Customize persist key #747

Merged
merged 2 commits into from
Oct 15, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/store/ConfigStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ import { INITIAL_STATUS_STATE } from '../reducers/HelpDropdownState';

declare const window;

const webRoot = (window as any).WEB_ROOT ? (window as any).WEB_ROOT : undefined;
const persistKey = webRoot && webRoot !== '/' ? webRoot.substring(1) : 'root';
Copy link
Contributor

@mtho11 mtho11 Oct 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great idea! could we also maybe change 'root' to 'kiali-root'

Copy link
Contributor Author

@clyang82 clyang82 Oct 15, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mtho11 Thanks for your comments. I would like to using 'kiali' as a prefix.


const persistConfig = {
key: 'root',
key: persistKey,
storage: storage,
whitelist: ['authentication', 'statusState', 'userSettings']
};
Expand Down