Skip to content

Commit 71e3a74

Browse files
Remove GL mention on Enterprise page (#22543)
* Remove GL mention on Enterprise page * Hide product page ling for enterprise users
1 parent 4df0442 commit 71e3a74

File tree

3 files changed

+95
-49
lines changed

3 files changed

+95
-49
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
/*
2+
* Copyright (C) 2020 Graylog, Inc.
3+
*
4+
* This program is free software: you can redistribute it and/or modify
5+
* it under the terms of the Server Side Public License, version 1,
6+
* as published by MongoDB, Inc.
7+
*
8+
* This program is distributed in the hope that it will be useful,
9+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
* Server Side Public License for more details.
12+
*
13+
* You should have received a copy of the Server Side Public License
14+
* along with this program. If not, see
15+
* <http://www.mongodb.com/licensing/server-side-public-license>.
16+
*/
17+
import React from 'react';
18+
import styled from 'styled-components';
19+
import { PluginStore } from 'graylog-web-plugin/plugin';
20+
21+
import { Col, Row } from 'components/bootstrap';
22+
import useProductName from 'brand-customization/useProductName';
23+
import ProductLink from 'components/enterprise/ProductLink';
24+
import { useStore } from 'stores/connect';
25+
import { NodesStore } from 'stores/nodes/NodesStore';
26+
27+
const GraylogEnterpriseHeader = styled.h2`
28+
margin-bottom: 10px;
29+
`;
30+
31+
const AdvertisementSection = () => {
32+
const nodes = useStore(NodesStore);
33+
const productName = useProductName();
34+
const licensePlugin = PluginStore.exports('license');
35+
const ProductLinkComponent = licensePlugin[0]?.EnterpriseProductLink || ProductLink;
36+
const { clusterId } = nodes;
37+
38+
return (
39+
<Row className="content">
40+
<Col md={6}>
41+
<GraylogEnterpriseHeader>{productName} Enterprise</GraylogEnterpriseHeader>
42+
<p>
43+
Designed to meet the needs of resource-constrained IT Operations and Software Engineering teams, {productName}{' '}
44+
Enterprise provides numerous productivity enhancements that will save you thousands of hours per year in
45+
collecting and analyzing log data to uncover the root cause of performance, outage, and error issues.
46+
</p>
47+
<ProductLinkComponent href="https://go2.graylog.org/request-graylog-operations" clusterId={clusterId}>
48+
Request now
49+
</ProductLinkComponent>
50+
</Col>
51+
<Col md={6}>
52+
<GraylogEnterpriseHeader>{productName} Security</GraylogEnterpriseHeader>
53+
<p>
54+
Extend {productName} Open’s capabilities for detecting, investigating, and responding to cybersecurity threats
55+
with security-specific dashboards and alerts, anomaly detection AI/ML engine, integrations with other security
56+
tools, SOAR capabilities, and numerous compliance reporting features.
57+
</p>
58+
<ProductLinkComponent
59+
href="https://go2.graylog.org/request-graylog-security"
60+
licenseSubject="/license/security"
61+
clusterId={clusterId}>
62+
Request now
63+
</ProductLinkComponent>
64+
</Col>
65+
</Row>
66+
);
67+
};
68+
69+
export default AdvertisementSection;

graylog2-web-interface/src/components/enterprise/PluginList.tsx

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,23 @@
1414
* along with this program. If not, see
1515
* <http://www.mongodb.com/licensing/server-side-public-license>.
1616
*/
17-
import React from 'react';
17+
import React, { useMemo } from 'react';
1818
import { PluginStore } from 'graylog-web-plugin/plugin';
1919

2020
import { Icon } from 'components/common';
21+
import useProductName from 'brand-customization/useProductName';
2122

2223
import style from './PluginList.css';
2324

24-
const ENTERPRISE_PLUGINS = {
25-
'graylog-plugin-enterprise': 'Graylog Plugin Enterprise',
26-
};
27-
2825
const PluginList = () => {
26+
const productName = useProductName();
27+
const ENTERPRISE_PLUGINS = useMemo(
28+
() => ({
29+
'graylog-plugin-enterprise': `${productName} Plugin Enterprise`,
30+
}),
31+
[productName],
32+
);
33+
2934
const _formatPlugin = (pluginName: string) => {
3035
const plugin = PluginStore.get().filter((p) => p.metadata.name === pluginName)[0];
3136

@@ -42,7 +47,7 @@ const PluginList = () => {
4247

4348
return (
4449
<>
45-
<p>This is the status of Graylog Enterprise modules in this cluster:</p>
50+
<p>This is the status of {productName} Enterprise modules in this cluster:</p>
4651
<ul className={style.enterprisePlugins}>{enterprisePluginList}</ul>
4752
</>
4853
);

graylog2-web-interface/src/pages/EnterprisePage.tsx

Lines changed: 15 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -15,75 +15,47 @@
1515
* <http://www.mongodb.com/licensing/server-side-public-license>.
1616
*/
1717
import React from 'react';
18-
import styled from 'styled-components';
19-
import { PluginStore } from 'graylog-web-plugin/plugin';
2018

2119
import { useStore } from 'stores/connect';
2220
import { NodesStore } from 'stores/nodes/NodesStore';
2321
import { DocumentTitle, PageHeader, Spinner } from 'components/common';
24-
import { Col, Row } from 'components/bootstrap';
2522
import { GraylogClusterOverview } from 'components/cluster';
2623
import PluginList from 'components/enterprise/PluginList';
2724
import EnterpriseProductLink from 'components/enterprise/EnterpriseProductLink';
28-
import ProductLink from 'components/enterprise/ProductLink';
2925
import HideOnCloud from 'util/conditional/HideOnCloud';
30-
31-
const GraylogEnterpriseHeader = styled.h2`
32-
margin-bottom: 10px;
33-
`;
26+
import useProductName from 'brand-customization/useProductName';
27+
import AdvertisementSection from 'components/enterprise/AdvertisementSection';
28+
import usePluggableUpsellWrapper from 'hooks/usePluggableUpsellWrapper';
3429

3530
const EnterprisePage = () => {
3631
const nodes = useStore(NodesStore);
37-
const licensePlugin = PluginStore.exports('license');
38-
const ProductLinkComponent = licensePlugin[0]?.EnterpriseProductLink || ProductLink;
32+
const productName = useProductName();
33+
const UpsellWrapper = usePluggableUpsellWrapper();
3934

4035
if (!nodes) {
4136
return <Spinner />;
4237
}
4338

44-
const { clusterId } = nodes;
45-
4639
return (
47-
<DocumentTitle title="Try Graylog Enterprise">
40+
<DocumentTitle title={`Try ${productName} Enterprise`}>
4841
<div>
49-
<PageHeader title="Try Graylog Enterprise">
42+
<PageHeader title={`Try ${productName} Enterprise`}>
5043
<span>
51-
Graylog Enterprise adds commercial functionality to the Open Source Graylog core. You can learn more about
52-
Graylog Enterprise on the <EnterpriseProductLink>product page</EnterpriseProductLink>.
44+
{productName} Enterprise adds commercial functionality to the Open Source {productName} core.{' '}
45+
<UpsellWrapper>
46+
You can learn more about {productName} Enterprise on the{' '}
47+
<EnterpriseProductLink>product page</EnterpriseProductLink>.
48+
</UpsellWrapper>
5349
</span>
5450
</PageHeader>
5551

5652
<GraylogClusterOverview layout="compact">
5753
<PluginList />
5854
</GraylogClusterOverview>
5955
<HideOnCloud>
60-
<Row className="content">
61-
<Col md={6}>
62-
<GraylogEnterpriseHeader>Graylog Enterprise</GraylogEnterpriseHeader>
63-
<p>
64-
Designed to meet the needs of resource-constrained IT Operations and Software Engineering teams, Graylog
65-
Enterprise provides numerous productivity enhancements that will save you thousands of hours per year in
66-
collecting and analyzing log data to uncover the root cause of performance, outage, and error issues.
67-
</p>
68-
<ProductLinkComponent href="https://go2.graylog.org/request-graylog-operations" clusterId={clusterId}>
69-
Request now
70-
</ProductLinkComponent>
71-
</Col>
72-
<Col md={6}>
73-
<GraylogEnterpriseHeader>Graylog Security</GraylogEnterpriseHeader>
74-
<p>
75-
Extend Graylog Open’s capabilities for detecting, investigating, and responding to cybersecurity threats
76-
with security-specific dashboards and alerts, anomaly detection AI/ML engine, integrations with other
77-
security tools, SOAR capabilities, and numerous compliance reporting features.
78-
</p>
79-
<ProductLinkComponent
80-
href="https://go2.graylog.org/request-graylog-security"
81-
licenseSubject="/license/security"
82-
clusterId={clusterId}>
83-
Request now
84-
</ProductLinkComponent>
85-
</Col>
86-
</Row>
56+
<UpsellWrapper>
57+
<AdvertisementSection />
58+
</UpsellWrapper>
8759
</HideOnCloud>
8860
</div>
8961
</DocumentTitle>

0 commit comments

Comments
 (0)