Skip to content

Commit

Permalink
Fix entities definition
Browse files Browse the repository at this point in the history
  • Loading branch information
alexronquillo committed Jul 2, 2021
1 parent aa874a8 commit a24aec0
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 23 deletions.
15 changes: 8 additions & 7 deletions lab5/nerdlets/my-nerdlet/nr1.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
"id": "lab5-nerdlet",
"displayName": "NerdGraph Nerdlet",
"description": "Explore using NerdGraph in Nerdlet.",
"entities": [
{
"domain": "APM",
"type": "APPLICATION"
}
],
"actionCategory": "monitor"
"context": {
"entities": [
{
"domain": "APM",
"type": "APPLICATION"
}
]
}
}
16 changes: 12 additions & 4 deletions lab7/INSTRUCTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,29 @@ Load the prequisites and follow the setup instructions in [Setup](../SETUP.md).
cd lab7
nr1 nerdpack:uuid -gf
npm install
nr1 nerdpack:serve
```

## Step 1: Accessing the Nerdlet

You'll notice that this `Nerdlet` doesn't have a corresponding `Launcher`, so we're going to need to find it.

1. Open the file `lab7/nerdlets/my-nerdlet/nr1.json` and check out the contents. They look like the following. There are two attributes we want to pay attention to: `entities` and `actionCategory`.
1. Open the file `lab7/nerdlets/my-nerdlet/nr1.json` and check out the contents. They look like the following. Pay attention to the `context` attribute:

```json
{
"schemaType": "NERDLET",
"id": "my-nerdlet",
"description": "Describe me",
"displayName": "Lab 7: Custom Data",
"entities": [{"domain": "BROWSER", "type": "APPLICATION"}],
"actionCategory": "monitor"
"context": {
"entities": [
{
"domain": "BROWSER",
"type": "APPLICATION"
}
]
}
}
```

Expand Down Expand Up @@ -217,4 +224,5 @@ export default class MyNerdlet extends React.Component {
# For Consideration / Discussion

* What other types of data might you chose to intermingle with performance data?
* Does it make sense why the `Lab 7: Custom Data` Nerdlet was only displaying for `Browser Application` instances? FYI, a value of `entities: [*]` makes a Nerdlet available for all Entity Types.
* Does it make sense why the `Lab 7: Custom Data` Nerdlet was only displaying for `Browser Application` instances?
* Read more about how to attach a Nerdlet to your entities in [our documentation](https://developer.newrelic.com/build-apps/attach-nerdlet-to-entities/).
12 changes: 9 additions & 3 deletions lab7/nerdlets/my-nerdlet/nr1.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
"id": "my-nerdlet",
"description": "Describe me",
"displayName": "Lab 7: Custom Data",
"entities": [{"domain": "BROWSER", "type": "APPLICATION"}],
"actionCategory": "monitor"
}
"context": {
"entities": [
{
"domain": "BROWSER",
"type": "APPLICATION"
}
]
}
}
12 changes: 9 additions & 3 deletions lab8/INSTRUCTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ So let's get started!

For the purposes of expediency, this lab provides a lot more working code than some of the previous exercises. Please take a moment to review the following files.

1. Open the file `lab8/nerdlets/my-nerdlet/nr1.json` and check out the contents. They look like the following. There are two attributes we want to pay attention to: `entities` and `actionCategory`.
1. Open the file `lab8/nerdlets/my-nerdlet/nr1.json` and check out the contents. They look like the following. Pay attention to the `context` attribute.

Just like in [`lab7`](../lab7/INSTRUCTIONS.md), we're going to access this Nerdlet via the `Entity Explorer`.

Expand All @@ -49,8 +49,14 @@ Just like in [`lab7`](../lab7/INSTRUCTIONS.md), we're going to access this Nerdl
"id": "my-nerdlet",
"description": "Describe me",
"displayName": "Lab 8: Location Performance",
"entities": [{"domain": "BROWSER", "type": "APPLICATION"}],
"actionCategory": "monitor"
"context": {
"entities": [
{
"domain": "BROWSER",
"type": "APPLICATION"
}
]
}
}
```

Expand Down
12 changes: 9 additions & 3 deletions lab8/nerdlets/my-nerdlet/nr1.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
"id": "my-nerdlet",
"description": "Describe me",
"displayName": "Lab 8: Location Performance",
"entities": [{"domain": "BROWSER", "type": "APPLICATION"}],
"actionCategory": "monitor"
}
"context": {
"entities": [
{
"domain": "BROWSER",
"type": "APPLICATION"
}
]
}
}
16 changes: 13 additions & 3 deletions lab9/nerdlets/my-nerdlet/nr1.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
"id": "my-nerdlet",
"description": "Describe me",
"displayName": "Lab 9: Perf. Compare",
"entities": [{"domain": "BROWSER", "type": "APPLICATION"}, { "domain": "APM", "type": "APPLICATION" }],
"actionCategory": "monitor"
}
"context": {
"entities": [
{
"domain": "BROWSER",
"type": "APPLICATION"
},
{
"domain": "APM",
"type": "APPLICATION"
}
]
}
}
Binary file modified screenshots/lab7_screen00.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a24aec0

Please sign in to comment.