Skip to content

Commit

Permalink
Merge branch 'develop' into NR-249391
Browse files Browse the repository at this point in the history
  • Loading branch information
bradleycamacho committed Apr 16, 2024
2 parents 21405c6 + 49273f2 commit 98271ee
Show file tree
Hide file tree
Showing 4,594 changed files with 966,055 additions and 37,884 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
33 changes: 0 additions & 33 deletions .github/workflows/attribute-dictionary-comment.yml

This file was deleted.

52 changes: 52 additions & 0 deletions .github/workflows/protected-file-comment.yml
@@ -0,0 +1,52 @@
name: Protected file updates

on:
pull_request:
branches:
- develop

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
deny-protected-file-changes:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Prevent attribute dictionary file change
id: attribute-dictionary
uses: xalvarez/prevent-file-change-action@v1.5.1
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
pattern: .*attribute-dictionary\.json$
trustedAuthors: svc-docs-eng-opensource-bot

- name: Prevent ruby config file change
id: ruby-config
uses: xalvarez/prevent-file-change-action@v1.5.1
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
pattern: .*src/content/docs/apm/agents/ruby-agent/configuration/ruby-agent-configuration.mdx
trustedAuthors: newrelic-ruby-agent-bot,kaylareopelle,hannahramadan,tannalynn,fallwith

- name: Comment if JSON file is modified
if: ${{ failure() && steps.attribute-dictionary.outcome == 'failure' }}
uses: thollander/actions-comment-pull-request@v2
with:
message: |
> [!WARNING]
> `attribute-dictionary.json` is an autogenerated file.
>
> Changes to attribute dictionary should be made through the `attribute-dictionary` repo in GHE.
- name: Comment if ruby config file is modified
if: ${{ failure() && steps.ruby-config.outcome == 'failure' }}
uses: thollander/actions-comment-pull-request@v2
with:
message: |
> [!WARNING]
> `ruby-agent-configuration.mdx` is an autogenerated file.
>
> To change the Ruby agent configuration file, please submit an issue or open a PR in the [`newrelic/newrelic-ruby-agent`](https://github.com/newrelic/newrelic-ruby-agent) repo.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -88,3 +88,6 @@ yarn-error.log
.devcontainer

src/images/infrastructure_screenshot_full_sonarqube-dashboard.webp

# Local Netlify folder
.netlify
6 changes: 6 additions & 0 deletions env.js
Expand Up @@ -10,6 +10,12 @@ const assetPrefix = () => {
if (process.env.BUILD_LANG === 'kr') {
return 'https://docs-website-kr.netlify.app';
}
if (process.env.BUILD_LANG === 'es') {
return 'https://docs-website-es.netlify.app';
}
if (process.env.BUILD_LANG === 'pt') {
return 'https://docs-website-pt.netlify.app';
}
return '';
};

Expand Down
5 changes: 3 additions & 2 deletions gatsby-config.js
Expand Up @@ -374,15 +374,15 @@ module.exports = {
},
},
layout: {
contentPadding: '1.5rem',
contentPadding: '5rem',
maxWidth: '1600px',
component: require.resolve('./src/layouts'),
mobileBreakpoint: '760px',
sidebarWidth: '340px',
},
i18n: {
translationsPath: `${__dirname}/src/i18n/translations`,
additionalLocales: ['jp', 'kr'],
additionalLocales: LOCALES,
},
prism: {
languages: [
Expand Down Expand Up @@ -439,6 +439,7 @@ module.exports = {
'md',
'java',
'razor',
'hcl'
],
},
newrelic: {
Expand Down
4 changes: 4 additions & 0 deletions netlify.toml
Expand Up @@ -4,6 +4,10 @@ package = "@netlify/plugin-gatsby"
[functions]
included_files = ["!.cache/data/datastore/data.mdb","!.cache/query-engine"]

[[edge_functions]]
path = "/*"
function = "osano-country"

[[headers]]
for = "/*"

Expand Down
53 changes: 53 additions & 0 deletions netlify/edge-functions/osano-country.js
@@ -0,0 +1,53 @@
import { HTMLRewriter } from 'https://ghuc.cc/worker-tools/html-rewriter/index.ts';

export default async (request, context) => {
const response = await context.next();
const hasGdpr = new Set([
'AT',
'BE',
'BG',
'HR',
'CY',
'CZ',
'DK',
'EE',
'FI',
'FR',
'DE',
'GR',
'HU',
'IE',
'IT',
'LV',
'LT',
'LU',
'MT',
'NL',
'PL',
'PT',
'RO',
'SK',
'SI',
'ES',
'SE',
]).has(context.geo.country.code);

if (hasGdpr) {
return new HTMLRewriter()
.on('script', {
element(element) {
const scriptSrc = element.getAttribute('src');
if (
typeof scriptSrc === 'string' &&
scriptSrc.startsWith('https://cmp.osano.com/')
) {
element.setAttribute(
'src',
scriptSrc.replace(/variant=one/gi, 'variant=two')
);
}
},
})
.transform(response);
}
};
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -10,7 +10,7 @@
"@emotion/styled": "^11.3.0",
"@mdx-js/mdx": "2.0.0-next.8",
"@mdx-js/react": "2.0.0-next.8",
"@newrelic/gatsby-theme-newrelic": "9.3.2",
"@newrelic/gatsby-theme-newrelic": "9.5.0",
"@splitsoftware/splitio-react": "^1.2.4",
"ansi-colors": "^4.1.3",
"cockatiel": "^3.0.0-beta.0",
Expand Down
40 changes: 40 additions & 0 deletions src/@newrelic/gatsby-theme-newrelic/icons/newrelic.js
@@ -1,18 +1,38 @@
import defaultIcons from '@newrelic/gatsby-theme-newrelic/src/icons/newrelic';
import AIMonitoringIcon from './newrelic/ai-monitoring';
import CaretUp from './newrelic/caret-up';
import InfoAnnouncement from './newrelic/info-announcement';
import K8sClusterIcon from './newrelic/k8s-cluster';
import Dashboard from './newrelic/dashboard';
import NavCollapseIcon from './newrelic/nav-collapse';
import VulnerabilityManagementIcon from './newrelic/vulnerability-management';
import NetworkMonitoringIcon from './newrelic/network-monitoring';
import MobileIcon from './newrelic/mobile';
import MonitoringIcon from './newrelic/monitoring';
import LogsIcon from './newrelic/logs';
import InfrastructureIcon from './newrelic/infrastructure';
import BrowserIcon from './newrelic/browser';
import AlertsAiIcon from './newrelic/alerts-ai';
import ApmIcon from './newrelic/apm';
import StackTraceIcon from './newrelic/stack-trace';
import LatencyIcon from './newrelic/latency';
import LearningModelsIcon from './newrelic/learning-models';
import MachineLearningEndpointsIcon from './newrelic/ml-endpoints';
import SyntheticsIcon from './newrelic/synthetics';
import UpstreamDeploymentIcon from './newrelic/upstream-deployment';
import ServiceMapIcon from './newrelic/service-map';
import QueryIcon from './newrelic/query';
import HorizontalChartIcon from './newrelic/horizontal-chart';
import NotesEditIcon from './newrelic/notes-edit';
import InboxIcon from './newrelic/inbox';
import IASTIcon from './newrelic/iast';
import NeedsInstrumentationIcon from './newrelic/needs-instrumentation';
import NotesAddIcon from './newrelic/notes-add';
import UserIcon from './newrelic/user';
import AreaChartIcon from './newrelic/area-chart';
import BookmarkIcon from './newrelic/bookmark';
import PrivateIcon from './newrelic/private';
import AttachmentIcon from './newrelic/attachment';

export default {
...defaultIcons,
Expand All @@ -30,4 +50,24 @@ export default {
apm: ApmIcon,
'stack-trace': StackTraceIcon,
latency: LatencyIcon,
monitoring: MonitoringIcon,
'ai-monitoring': AIMonitoringIcon,
'k8s-cluster': K8sClusterIcon,
'learning-models': LearningModelsIcon,
'ml-endpoints': MachineLearningEndpointsIcon,
synthetics: SyntheticsIcon,
'upstream-deployment': UpstreamDeploymentIcon,
'service-map': ServiceMapIcon,
query: QueryIcon,
'horizontal-chart': HorizontalChartIcon,
'notes-edit': NotesEditIcon,
inbox: InboxIcon,
iast: IASTIcon,
'needs-instrumentation': NeedsInstrumentationIcon,
'notes-add': NotesAddIcon,
user: UserIcon,
'area-chart': AreaChartIcon,
bookmark: BookmarkIcon,
private: PrivateIcon,
attachment: AttachmentIcon,
};
@@ -0,0 +1,24 @@
import React from 'react';
import PropTypes from 'prop-types';
import { css } from '@emotion/react';
import SVG from '@newrelic/gatsby-theme-newrelic/src/components/SVG';

const AIMonitoringIcon = (props) => (
<SVG
{...props}
viewBox="-.5 -.5 16 16"
css={css`
fill: currentColor;
stroke: currentColor;
stroke-width: 0.25;
`}
>
<path d="M15 1.876c-1.68 0-1.876-.197-1.876-1.876h-.938c0 1.68-.197 1.876-1.876 1.876v.938c1.679 0 1.876.197 1.876 1.876h.938c0-1.679.197-1.876 1.876-1.876v-.938zM7.477 14.071h.018l.01.01a.474.474 0 00.44-.32L9.748 8.34l.76 1.707a.474.474 0 00.431.281H15V9.39h-3.762l-1.125-2.533c-.075-.178-.235-.281-.45-.281a.463.463 0 00-.423.319l-1.67 5.01L5.478 3.18a.452.452 0 00-.44-.356.465.465 0 00-.46.337l-1.801 6.23H0v.937h3.124c.206 0 .394-.14.45-.337l1.407-4.869 2.064 8.593a.46.46 0 00.432.356z" />
</SVG>
);

AIMonitoringIcon.propTypes = {
size: PropTypes.string,
};

export default AIMonitoringIcon;
28 changes: 28 additions & 0 deletions src/@newrelic/gatsby-theme-newrelic/icons/newrelic/area-chart.js
@@ -0,0 +1,28 @@
import React from 'react';
import PropTypes from 'prop-types';
import { css } from '@emotion/react';
import SVG from '@newrelic/gatsby-theme-newrelic/src/components/SVG';

const AreaChartIcon = (props) => (
<SVG
{...props}
viewBox="-.5 -.5 16 16"
css={css`
fill: currentColor;
stroke: currentColor;
stroke-width: 0.25;
`}
>
<path
fillRule="evenodd"
d="M2 1v12h13v1H1V1h1zm12 1.293V11H4V8.5l3.5-3.7 1.995 1.997L14 2.293zm-1.001 2.415L9.495 8.211 7.519 6.234l-2.52 2.664V10h8V4.708z"
clipRule="evenodd"
/>
</SVG>
);

AreaChartIcon.propTypes = {
size: PropTypes.string,
};

export default AreaChartIcon;
28 changes: 28 additions & 0 deletions src/@newrelic/gatsby-theme-newrelic/icons/newrelic/attachment.js
@@ -0,0 +1,28 @@
import React from 'react';
import PropTypes from 'prop-types';
import { css } from '@emotion/react';
import SVG from '@newrelic/gatsby-theme-newrelic/src/components/SVG';

const AttachmentIcon = (props) => (
<SVG
{...props}
viewBox="-.5 -.5 16 16"
css={css`
fill: currentColor;
stroke: currentColor;
stroke-width: 0.25;
`}
>
<path
fillRule="evenodd"
d="M13 4H4C1.8 4 0 5.8 0 8s1.8 4 4 4h8v-1H4c-1.7 0-3-1.3-3-3s1.3-3 3-3h9c1.1 0 2 .9 2 2s-.9 2-2 2H6c-.6 0-1-.4-1-1s.4-1 1-1h6V6H6c-1.1 0-2 .9-2 2s.9 2 2 2h7c1.7 0 3-1.3 3-3s-1.3-3-3-3z"
clipRule="evenodd"
/>
</SVG>
);

AttachmentIcon.propTypes = {
size: PropTypes.string,
};

export default AttachmentIcon;
28 changes: 28 additions & 0 deletions src/@newrelic/gatsby-theme-newrelic/icons/newrelic/bookmark.js
@@ -0,0 +1,28 @@
import React from 'react';
import PropTypes from 'prop-types';
import { css } from '@emotion/react';
import SVG from '@newrelic/gatsby-theme-newrelic/src/components/SVG';

const BookmarkIcon = (props) => (
<SVG
{...props}
viewBox="-.5 -.5 16 16"
css={css`
fill: currentColor;
stroke: currentColor;
stroke-width: 0.25;
`}
>
<path
fillRule="evenodd"
d="M8 9.91l-4.756 4.053c-.035.03-.058.035-.073.036a.141.141 0 01-.075-.014.171.171 0 01-.069-.06.187.187 0 01-.027-.107V2.18c0-.12.09-.18.154-.18h9.692c.064 0 .154.06.154.18v11.638a.187.187 0 01-.027.107.172.172 0 01-.07.06.14.14 0 01-.074.014c-.015-.001-.038-.006-.073-.036L8 9.911zm0 1.315l-4.107 3.5c-.752.64-1.893.093-1.893-.907V2.18C2 1.528 2.517 1 3.154 1h9.692C13.483 1 14 1.528 14 2.18v11.638c0 1-1.141 1.547-1.893.906L8 11.224z"
clipRule="evenodd"
/>
</SVG>
);

BookmarkIcon.propTypes = {
size: PropTypes.string,
};

export default BookmarkIcon;

0 comments on commit 98271ee

Please sign in to comment.