-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:kevinlog/kibana into task/policy-…
…data-in-endpoint-list
- Loading branch information
Showing
391 changed files
with
10,622 additions
and
6,169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...lopment/core/server/kibana-plugin-core-server.pluginmanifest.extrapublicdirs.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [PluginManifest](./kibana-plugin-core-server.pluginmanifest.md) > [extraPublicDirs](./kibana-plugin-core-server.pluginmanifest.extrapublicdirs.md) | ||
|
||
## PluginManifest.extraPublicDirs property | ||
|
||
> Warning: This API is now obsolete. | ||
> | ||
> | ||
Specifies directory names that can be imported by other ui-plugins built using the same instance of the @<!-- -->kbn/optimizer. A temporary measure we plan to replace with better mechanisms for sharing static code between plugins | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
readonly extraPublicDirs?: string[]; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Example of using dashboard container embeddable outside of dashboard app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"id": "dashboardEmbeddableExamples", | ||
"version": "0.0.1", | ||
"kibanaVersion": "kibana", | ||
"server": false, | ||
"ui": true, | ||
"requiredPlugins": ["embeddable", "embeddableExamples", "dashboard", "developerExamples"], | ||
"optionalPlugins": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import { BrowserRouter as Router, Route, RouteComponentProps, withRouter } from 'react-router-dom'; | ||
|
||
import { | ||
EuiPage, | ||
EuiPageContent, | ||
EuiPageContentBody, | ||
EuiPageSideBar, | ||
EuiSideNav, | ||
} from '@elastic/eui'; | ||
import 'brace/mode/json'; | ||
import { AppMountParameters } from '../../../src/core/public'; | ||
import { DashboardEmbeddableByValue } from './by_value/embeddable'; | ||
import { DashboardStart } from '../../../src/plugins/dashboard/public'; | ||
|
||
interface PageDef { | ||
title: string; | ||
id: string; | ||
component: React.ReactNode; | ||
} | ||
|
||
type NavProps = RouteComponentProps & { | ||
pages: PageDef[]; | ||
}; | ||
|
||
const Nav = withRouter(({ history, pages }: NavProps) => { | ||
const navItems = pages.map((page) => ({ | ||
id: page.id, | ||
name: page.title, | ||
onClick: () => history.push(`/${page.id}`), | ||
'data-test-subj': page.id, | ||
})); | ||
|
||
return ( | ||
<EuiSideNav | ||
items={[ | ||
{ | ||
name: 'Embeddable explorer', | ||
id: 'home', | ||
items: [...navItems], | ||
}, | ||
]} | ||
/> | ||
); | ||
}); | ||
|
||
interface Props { | ||
basename: string; | ||
DashboardContainerByValueRenderer: DashboardStart['DashboardContainerByValueRenderer']; | ||
} | ||
|
||
const DashboardEmbeddableExplorerApp = ({ basename, DashboardContainerByValueRenderer }: Props) => { | ||
const pages: PageDef[] = [ | ||
{ | ||
title: 'By value dashboard embeddable', | ||
id: 'dashboardEmbeddableByValue', | ||
component: ( | ||
<DashboardEmbeddableByValue | ||
DashboardContainerByValueRenderer={DashboardContainerByValueRenderer} | ||
/> | ||
), | ||
}, | ||
{ | ||
title: 'By ref dashboard embeddable', | ||
id: 'dashboardEmbeddableByRef', | ||
component: <div>TODO: Not implemented, but coming soon...</div>, | ||
}, | ||
]; | ||
|
||
const routes = pages.map((page, i) => ( | ||
<Route key={i} path={`/${page.id}`} render={(props) => page.component} /> | ||
)); | ||
|
||
return ( | ||
<Router basename={basename}> | ||
<EuiPage> | ||
<EuiPageSideBar> | ||
<Nav pages={pages} /> | ||
</EuiPageSideBar> | ||
<EuiPageContent> | ||
<EuiPageContentBody>{routes}</EuiPageContentBody> | ||
</EuiPageContent> | ||
</EuiPage> | ||
</Router> | ||
); | ||
}; | ||
|
||
export const renderApp = (props: Props, element: AppMountParameters['element']) => { | ||
ReactDOM.render(<DashboardEmbeddableExplorerApp {...props} />, element); | ||
|
||
return () => ReactDOM.unmountComponentAtNode(element); | ||
}; |
Oops, something went wrong.