From 3512331d2a7925d4bfdbe0437d116bbe43097a87 Mon Sep 17 00:00:00 2001 From: Jerel Miller Date: Wed, 17 Jun 2020 23:01:51 -0700 Subject: [PATCH] chore: Fix some formatting in nerdpack file structure --- .../reference/nerdpack-file-structure.mdx | 49 +++++++++---------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/src/markdown-pages/reference/nerdpack-file-structure.mdx b/src/markdown-pages/reference/nerdpack-file-structure.mdx index 3c89a8594..05e306a61 100644 --- a/src/markdown-pages/reference/nerdpack-file-structure.mdx +++ b/src/markdown-pages/reference/nerdpack-file-structure.mdx @@ -11,11 +11,11 @@ A [New Relic One application](https://developer.newrelic.com/use-cases/build-new "Link opens in a new window.") is represented by a **Nerdpack** folder, which can include one or more **Nerdlet** files, and (optionally) one or more **launcher** files. This document explains: -- The file structure for a [Nerdpack](https://docs.newrelic.com/docs/new-relic-one/use-new-relic-one/build-new-relic-one/new-relic-one-application-nerdpack-file-structure#file-structure), +- The file structure for a [Nerdpack](https://docs.newrelic.com/docs/new-relic-one/use-new-relic-one/build-new-relic-one/new-relic-one-application-nerdpack-file-structure#file-structure), a [Nerdlet](https://docs.newrelic.com/docs/new-relic-one/use-new-relic-one/build-new-relic-one/new-relic-one-application-nerdpack-file-structure#nerdlet-files) and a [launcher](https://docs.newrelic.com/docs/new-relic-one/use-new-relic-one/build-new-relic-one/new-relic-one-application-nerdpack-file-structure#launcher-file) -- How to [link a launcher file to a Nerdlet](https://docs.newrelic.com/docs/new-relic-one/use-new-relic-one/build-new-relic-one/new-relic-one-application-nerdpack-file-structure#launcher-json) -- How to [link your application with a monitored entity](https://docs.newrelic.com/docs/new-relic-one/use-new-relic-one/build-new-relic-one/new-relic-one-application-nerdpack-file-structure#nerdlet-json) +- How to [link a launcher file to a Nerdlet](https://docs.newrelic.com/docs/new-relic-one/use-new-relic-one/build-new-relic-one/new-relic-one-application-nerdpack-file-structure#launcher-json) +- How to [link your application with a monitored entity](https://docs.newrelic.com/docs/new-relic-one/use-new-relic-one/build-new-relic-one/new-relic-one-application-nerdpack-file-structure#nerdlet-json) For basic component definitions, see our [developer site](https://developer.newrelic.com/use-cases/build-new-relic-one-applications#Introtocomponentsandtools "Link opens in a new window."). @@ -26,8 +26,8 @@ For basic component definitions, see our [developer site](https://developer.newr There are two ways to generate a Nerdpack template: -- Generate Nerdpack. Use the [CLI](https://developer.newrelic.com/build-tools/new-relic-one-applications/cli "Link opens in a new window.") command `nr1 create` and select `Nerdpack` to create a Nerdpack template that includes a Nerdlet and a launcher. -- Generate Nerdlet or launcher individually. You can use the [CLI](https://developer.newrelic.com/build-tools/new-relic-one-applications/cli "Link opens in a new window.") command `nr1 create` and choose to select either a Nerdlet or launcher. This may be useful when adding Nerdlets to an existing Nerdpack. +- Generate Nerdpack. Use the [CLI](https://developer.newrelic.com/build-tools/new-relic-one-applications/cli "Link opens in a new window.") command `nr1 create` and select `Nerdpack` to create a Nerdpack template that includes a Nerdlet and a launcher. +- Generate Nerdlet or launcher individually. You can use the [CLI](https://developer.newrelic.com/build-tools/new-relic-one-applications/cli "Link opens in a new window.") command `nr1 create` and choose to select either a Nerdlet or launcher. This may be useful when adding Nerdlets to an existing Nerdpack. For a lesson on generating and connecting Nerdpack components, see [the workshop](https://github.com/newrelic/nr1-workshop/blob/master/lab0/INSTRUCTIONS.md "Link opens in a new window.") . @@ -42,7 +42,7 @@ When you generate a Nerdpack template using the CLI `nr1 create` command, it has A Nerdpack can contain one or more Nerdlets. A Nerdlet folder starts out with three default files: -### index.js +### `index.js` Here is what the default file looks like when a Nerdlet is generated with the CLI `nr1 create`: @@ -50,23 +50,22 @@ Here is what the default file looks like when a Nerdlet is generated with the CL import React from 'react'; export default class MyAwesomeNerdpack extends React.Component { - render() { - return -

Hello, my-awesome-nerdpack Nerdlet!

- } + render() { + return

Hello, my-awesome-nerdpack Nerdlet!

+ } } ``` -### nr1.json +### `nr1.json` Here is the default file generated by the CLI `nr1 create` command: ```json { - "schemaType": "NERDLET", - "id": "my-awesome-nerdpack-nerdlet", - "description": "Describe me", - "displayName": "MyAwesomeNerdpack" + "schemaType": "NERDLET", + "id": "my-awesome-nerdpack-nerdlet", + "description": "Describe me", + "displayName": "MyAwesomeNerdpack" } ``` @@ -79,29 +78,27 @@ applications and will appear under the **Monitor** UI category : ```json { - "schemaType": "NERDLET", - "id": "my-nerdlet", - "description": "Describe me", - "displayName": "Custom Data", - "entities": [{"domain": "BROWSER", "type": "APPLICATION"}], - "actionCategory": "monitor" + "schemaType": "NERDLET", + "id": "my-nerdlet", + "description": "Describe me", + "displayName": "Custom Data", + "entities": [{"domain": "BROWSER", "type": "APPLICATION"}], + "actionCategory": "monitor" } ``` To see this application in the UI, you would go to the New Relic One [entity explorer](https://docs.newrelic.com/docs/new-relic-one/use-new-relic-one/ui-data/new-relic-one-entity-explorer-view-performance-across-apps-services-hosts), select Browser applications, and select a monitored application. -### styles.scss +### `styles.scss` The file is provided for CSS styles (Sass SCSS syntax). ```css - - /* this is an empty file you can use customize to style your nerdlet. */ +/* this is an empty file you can use customize to style your nerdlet. */ ``` -### icon.png -![icon.png](../images/nerdpack-file-structure/icon.png) +### `icon.png` The launcher icon that appears on the [one.newrelic.com](http://one.newrelic.com/) home page when an application is deployed.