mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 01:13:23 -04:00
use KibanaThemeProvider
for pipelines
management app (#122311)
This commit is contained in:
parent
cd0326c05a
commit
b0c99771a7
2 changed files with 62 additions and 59 deletions
|
@ -11,5 +11,5 @@
|
|||
"optionalPlugins": ["home", "monitoring", "security"],
|
||||
"server": true,
|
||||
"ui": true,
|
||||
"requiredBundles": ["esUiShared", "home"]
|
||||
"requiredBundles": ["esUiShared", "home", "kibanaReact"]
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ import { first } from 'rxjs/operators';
|
|||
|
||||
import { CoreStart } from 'src/core/public';
|
||||
import { ManagementAppMountParams } from '../../../../../src/plugins/management/public';
|
||||
import { KibanaThemeProvider } from '../../../../../src/plugins/kibana_react/public';
|
||||
import {
|
||||
ClusterService,
|
||||
MonitoringService,
|
||||
|
@ -30,7 +31,7 @@ import * as Breadcrumbs from './breadcrumbs';
|
|||
|
||||
export const renderApp = async (
|
||||
core: CoreStart,
|
||||
{ history, element, setBreadcrumbs }: ManagementAppMountParams,
|
||||
{ history, element, setBreadcrumbs, theme$ }: ManagementAppMountParams,
|
||||
isMonitoringEnabled: boolean,
|
||||
licenseService$: Observable<any>
|
||||
) => {
|
||||
|
@ -42,64 +43,66 @@ export const renderApp = async (
|
|||
|
||||
ReactDOM.render(
|
||||
<core.i18n.Context>
|
||||
<Router history={history}>
|
||||
<Switch>
|
||||
<Route
|
||||
path={['/', '']}
|
||||
exact
|
||||
render={() => {
|
||||
setBreadcrumbs(Breadcrumbs.getPipelineListBreadcrumbs());
|
||||
return (
|
||||
<PipelineList
|
||||
clusterService={clusterService}
|
||||
isReadOnly={logstashLicenseService.isReadOnly}
|
||||
isForbidden={true}
|
||||
isLoading={false}
|
||||
licenseService={logstashLicenseService}
|
||||
monitoringService={monitoringService}
|
||||
openPipeline={(id: string) => history.push(`/pipeline/${id}/edit`)}
|
||||
clonePipeline={(id: string) => history.push(`/pipeline/${id}/edit?clone`)}
|
||||
createPipeline={() => history.push(`pipeline/new-pipeline`)}
|
||||
pipelinesService={pipelinesService}
|
||||
toastNotifications={core.notifications.toasts}
|
||||
<KibanaThemeProvider theme$={theme$}>
|
||||
<Router history={history}>
|
||||
<Switch>
|
||||
<Route
|
||||
path={['/', '']}
|
||||
exact
|
||||
render={() => {
|
||||
setBreadcrumbs(Breadcrumbs.getPipelineListBreadcrumbs());
|
||||
return (
|
||||
<PipelineList
|
||||
clusterService={clusterService}
|
||||
isReadOnly={logstashLicenseService.isReadOnly}
|
||||
isForbidden={true}
|
||||
isLoading={false}
|
||||
licenseService={logstashLicenseService}
|
||||
monitoringService={monitoringService}
|
||||
openPipeline={(id: string) => history.push(`/pipeline/${id}/edit`)}
|
||||
clonePipeline={(id: string) => history.push(`/pipeline/${id}/edit?clone`)}
|
||||
createPipeline={() => history.push(`pipeline/new-pipeline`)}
|
||||
pipelinesService={pipelinesService}
|
||||
toastNotifications={core.notifications.toasts}
|
||||
/>
|
||||
);
|
||||
}}
|
||||
/>
|
||||
<Route
|
||||
path="/pipeline/new-pipeline"
|
||||
exact
|
||||
render={() => (
|
||||
<PipelineEditView
|
||||
history={history}
|
||||
setBreadcrumbs={setBreadcrumbs}
|
||||
logstashLicenseService={logstashLicenseService}
|
||||
pipelineService={pipelineService}
|
||||
toasts={core.notifications.toasts}
|
||||
/>
|
||||
);
|
||||
}}
|
||||
/>
|
||||
<Route
|
||||
path="/pipeline/new-pipeline"
|
||||
exact
|
||||
render={() => (
|
||||
<PipelineEditView
|
||||
history={history}
|
||||
setBreadcrumbs={setBreadcrumbs}
|
||||
logstashLicenseService={logstashLicenseService}
|
||||
pipelineService={pipelineService}
|
||||
toasts={core.notifications.toasts}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
<Route
|
||||
path="/pipeline/:id"
|
||||
exact
|
||||
render={({ match }) => <Redirect to={`/pipeline/${match.params.id}/edit`} />}
|
||||
/>
|
||||
<Route
|
||||
path="/pipeline/:id/edit"
|
||||
exact
|
||||
render={({ match }) => (
|
||||
<PipelineEditView
|
||||
history={history}
|
||||
setBreadcrumbs={setBreadcrumbs}
|
||||
logstashLicenseService={logstashLicenseService}
|
||||
pipelineService={pipelineService}
|
||||
toasts={core.notifications.toasts}
|
||||
id={match.params.id}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
</Switch>
|
||||
</Router>
|
||||
)}
|
||||
/>
|
||||
<Route
|
||||
path="/pipeline/:id"
|
||||
exact
|
||||
render={({ match }) => <Redirect to={`/pipeline/${match.params.id}/edit`} />}
|
||||
/>
|
||||
<Route
|
||||
path="/pipeline/:id/edit"
|
||||
exact
|
||||
render={({ match }) => (
|
||||
<PipelineEditView
|
||||
history={history}
|
||||
setBreadcrumbs={setBreadcrumbs}
|
||||
logstashLicenseService={logstashLicenseService}
|
||||
pipelineService={pipelineService}
|
||||
toasts={core.notifications.toasts}
|
||||
id={match.params.id}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
</Switch>
|
||||
</Router>
|
||||
</KibanaThemeProvider>
|
||||
</core.i18n.Context>,
|
||||
element
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue