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

ENG-4667 mfe menu show solr config as item #52

Merged
merged 1 commit into from
Mar 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions microfrontends/app-builder-menu/dev-shell.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
window.entando = {
router: {
push: route => console.log('navigating to', route)
push: route => console.log('navigating to', route),
listen: () => () => {},
},
globals: {
userPermissions: [
Expand All @@ -19,7 +20,8 @@ window.entando = {
adminConsoleUrl: 'http://localhost:8080/admin-console',
systemReport: {
contentSchedulerPluginInstalled: true
}
},
advancedSearchOn: true,
},
keycloak: {
token: 'keycloak-token',
Expand Down
13 changes: 12 additions & 1 deletion microfrontends/app-builder-menu/src/components/MenuUI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export function MenuUI(props: Props): JSX.Element {
openDefaultSubmenuId = '',
epcHasError
} = props;
const { userPermissions, systemReport, adminConsoleUrl, lang } =
const { userPermissions, systemReport, adminConsoleUrl, lang, advancedSearchOn } =
window.entando?.globals || {};

const {
Expand Down Expand Up @@ -375,6 +375,17 @@ export function MenuUI(props: Props): JSX.Element {
)}
/>
)}
{advancedSearchOn && (
<SecondaryMenuItem
id="content-solr-configuration"
dataId="solr-configuration"
label={content.solrConfig}
href={convertToAdminConsoleUrl(
adminConsoleUrl,
'do/jpsolr/config'
)}
/>
)}
</ListGroupItem>
)}
{usersHasAnyMenuItemAccess && (
Expand Down
5 changes: 5 additions & 0 deletions microfrontends/app-builder-menu/src/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ export function getContent(intl: IntlShape): ContentType {
id: 'app.epcHasError',
defaultMessage:
'EPCs not available, something went wrong during the installation of one EPC'
}),
solrConfig: intl.formatMessage({
id: 'app.solrConfig',
defaultMessage:
'SOLR configuration'
})
};
}
3 changes: 2 additions & 1 deletion microfrontends/app-builder-menu/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@
"app.emailConfiguration": "Email Configuration",
"app.reloadConfiguration": "Reload Configuration",
"app.epcPlaceholder": "Install your first Entando Platform Capability",
"app.epcHasError": "EPCs not available, something went wrong during the installation of one EPC"
"app.epcHasError": "EPCs not available, something went wrong during the installation of one EPC",
"app.solrConfig": "SOLR configuration"
}
3 changes: 2 additions & 1 deletion microfrontends/app-builder-menu/src/i18n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@
"app.emailConfiguration": "Configurazione e-mail",
"app.reloadConfiguration": "Ricarica configurazione",
"app.epcPlaceholder": "Installa la tua prima Entando Platform Capability",
"app.epcHasError": "EPC non disponibili, si è verificato un problema con l'installazione di un EPC"
"app.epcHasError": "EPC non disponibili, si è verificato un problema con l'installazione di un EPC",
"app.solrConfig": "SOLR configurazione"
}
3 changes: 2 additions & 1 deletion microfrontends/app-builder-menu/src/i18n/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@
"app.emailConfiguration": "Configuração de e-mail",
"app.reloadConfiguration": "Recarregar configuração",
"app.epcPlaceholder": "Instale sua primeira Entando Platform Capability",
"app.epcHasError": "EPC não disponível, algo deu errado durante a instalação"
"app.epcHasError": "EPC não disponível, algo deu errado durante a instalação",
"app.solrConfig": "SOLR configuração"
}
1 change: 1 addition & 0 deletions microfrontends/app-builder-menu/src/types/globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export interface EntandoGlobals {
contentSchedulerPluginInstalled: boolean;
};
adminConsoleUrl: string;
advancedSearchOn: boolean;
}

export interface MfeConfig {
Expand Down