Skip to content

Conversation

@ValeraS
Copy link
Collaborator

@ValeraS ValeraS commented Feb 2, 2024

Usage

<script>
window.web_version=true
window.custom_backend='';
window.meta_backend='/api/meta';
</script>
import {StaffCard} from 'staff-card-library';
import {
    MultiClusterApp as App,
    configureStore,
    ErrorBoundary,
    componentsRegistry,
    settingsManager,
    setUserSettings,
} from 'ydb-embedded-ui';

import {AsideNavigation} from '../containers/AsideNavigation/AsideNavigation';
import {userSettings} from '../containers/AsideNavigation/settings';

const {store, history} = configureStore();

const settings = settingsManager.extractSettingsFromLS(DEFAULT_INTERNAL_USER_SETTINGS);
store.dispatch(setUserSettings(settings));

componentsRegistry.set('StaffCard', StaffCard).set('AsideNavigation', AsideNavigation);

function render() {
    ReactDOM.render(
        <ErrorBoundary>
            <App store={store} history={history} userSettings={userSettings} />
        </ErrorBoundary>,
        document.getElementById('root'),
    );
}

render();

@artemmufazalov
Copy link
Member

Since there are a lot of changes here, it should be released with breaking changes as v5.0.0

@artemmufazalov
Copy link
Member

Discussed with team lead, there are some users, that deploy ydb with several clusters and want to use multi cluster UI version.

If it's possible, it would be perfect to have separate commands for embedded version and multi-cluster version (I shortened it to mcv):

"dev:embedded": "REACT_APP_BACKEND=http://localhost:8765 npm start",
"dev:mcv": "META_YDB_BACKEND=meta_host_placeholder npm start",
"build:embedded": "...",
"build:mcv": "...",

Or at least there should be a section with MCV description in README or wiki - how to run in dev mode, how to build, etc.

@artemmufazalov
Copy link
Member

Discussed with team lead, there are some users, that deploy ydb with several clusters and want to use multi cluster UI version.
Or at least there should be a section with MCV description in README or wiki - how to run in dev mode, how to build, etc.

Update: mvp (meta backend) repo won't be public, without backend code this feature is not publicly needed. So separate multi-cluster version commands are not needed. Wiki page will be helpful, though

@ValeraS ValeraS merged commit 429aa0e into main Feb 9, 2024
@ValeraS ValeraS deleted the feat/clusters branch February 9, 2024 12:34
@ValeraS ValeraS restored the feat/clusters branch February 13, 2024 12:25
@ValeraS ValeraS deleted the feat/clusters branch August 1, 2024 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants