forked from Graylog2/graylog2-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Graylog2#4597 from Graylog2/enterprise-integration…
…-issue-10 Merge Enterprise Integration plugin into Graylog core
- Loading branch information
Showing
6 changed files
with
112 additions
and
1 deletion.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
graylog2-web-interface/src/components/enterprise/PluginList.css
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,4 @@ | ||
.enterprise-plugins { | ||
margin-left: 0; | ||
padding-left: 0; | ||
} |
49 changes: 49 additions & 0 deletions
49
graylog2-web-interface/src/components/enterprise/PluginList.jsx
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,49 @@ | ||
import React from 'react'; | ||
import { Row, Col } from 'react-bootstrap'; | ||
|
||
import { PluginStore } from 'graylog-web-plugin/plugin'; | ||
|
||
const PluginList = React.createClass({ | ||
componentDidMount() { | ||
this.style.use(); | ||
}, | ||
|
||
componentWillUnmount() { | ||
this.style.unuse(); | ||
}, | ||
|
||
style: require('!style/useable!css!./PluginList.css'), | ||
|
||
ENTERPRISE_PLUGINS: { | ||
ArchivePlugin: 'Archive plugin', | ||
LicensePlugin: 'License plugin', | ||
'graylog-plugin-auditlog': 'Audit log plugin', | ||
}, | ||
|
||
_formatPlugin(pluginName) { | ||
const plugin = PluginStore.get().filter(p => p.metadata.name === pluginName)[0]; | ||
return ( | ||
<li key={pluginName} className={plugin ? 'text-success' : 'text-danger'}> | ||
<i className={`fa fa-${plugin ? 'check-circle' : 'minus-circle'}`}/> | ||
{this.ENTERPRISE_PLUGINS[pluginName]} is {plugin ? 'installed' : 'not installed'} | ||
</li> | ||
); | ||
}, | ||
|
||
render() { | ||
const enterprisePluginList = Object.keys(this.ENTERPRISE_PLUGINS).map(pluginName => this._formatPlugin(pluginName)); | ||
|
||
return ( | ||
<Row className="content"> | ||
<Col md={12}> | ||
<p>This is the status of Graylog Enterprise modules in this cluster:</p> | ||
<ul className="enterprise-plugins"> | ||
{enterprisePluginList} | ||
</ul> | ||
</Col> | ||
</Row> | ||
); | ||
}, | ||
}); | ||
|
||
export default PluginList; |
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,49 @@ | ||
import React from 'react'; | ||
import Reflux from 'reflux'; | ||
|
||
import { DocumentTitle, PageHeader } from 'components/common'; | ||
import { GraylogClusterOverview } from 'components/cluster'; | ||
import PluginList from 'components/enterprise/PluginList'; | ||
|
||
import StoreProvider from 'injection/StoreProvider'; | ||
const NodesStore = StoreProvider.getStore('Nodes'); | ||
|
||
const EnterprisePage = React.createClass({ | ||
mixins: [Reflux.connect(NodesStore)], | ||
|
||
_isLoading() { | ||
return !this.state.nodes; | ||
}, | ||
|
||
render() { | ||
let orderLink = 'https://www.graylog.org/enterprise'; | ||
|
||
if (this.state.clusterId) { | ||
orderLink = `https://www.graylog.org/enterprise?cid=${this.state.clusterId}&nodes=${this.state.nodeCount}`; | ||
} | ||
|
||
return ( | ||
<DocumentTitle title="Graylog Enterprise"> | ||
<div> | ||
<PageHeader title="Graylog Enterprise"> | ||
{null} | ||
|
||
<span> | ||
Graylog Enterprise adds commercial functionality to the Open Source Graylog core. You can learn more | ||
about Graylog Enterprise and order a license on the <a href={orderLink} target="_blank">product page</a>. | ||
</span> | ||
|
||
<span> | ||
<a className="btn btn-lg btn-success" href={orderLink} target="_blank">Order a license</a> | ||
</span> | ||
</PageHeader> | ||
|
||
<GraylogClusterOverview /> | ||
<PluginList/> | ||
</div> | ||
</DocumentTitle> | ||
); | ||
}, | ||
}); | ||
|
||
export default EnterprisePage; |
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