Skip to content

Commit d7d3f9a

Browse files
authored
Merge pull request #75 from mrodriguez-nr/fix/migrate-open-overlay
fix: Migrate openOverlay to openNerdlet
2 parents 513bd93 + 310e69c commit d7d3f9a

2 files changed

Lines changed: 18 additions & 18 deletions

File tree

nerdlets/event-stream/components/event-table.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ import { nrdbQuery } from '../lib/utils';
88
import { navigation } from 'nr1';
99

1010
function openChartBuilder(query, account) {
11-
const nerdlet = {
12-
id: 'data-exploration.nrql-editor',
11+
navigation.openNerdlet({
12+
id: 'unified-data-exploration.share',
1313
urlState: {
14-
initialActiveInterface: 'nrqlEditor',
15-
initialChartType: 'json',
16-
initialAccountId: account,
17-
initialNrqlValue: query,
18-
isViewingQuery: true,
14+
widget: {
15+
visualization: { id: 'viz.json' },
16+
rawConfiguration: {
17+
nrqlQueries: [{ query, accountIds: [account] }],
18+
},
19+
},
1920
},
20-
};
21-
navigation.openOverlay(nerdlet);
21+
});
2222
}
2323

2424
export default class EventTable extends React.PureComponent {

nerdlets/event-stream/components/menu-bar.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,17 @@ function Filter({ attribute, value, removeFilter }) {
3434
}
3535

3636
function openChartBuilder(query, account) {
37-
const nerdlet = {
38-
id: 'data-exploration.nrql-editor',
37+
navigation.openNerdlet({
38+
id: 'unified-data-exploration.share',
3939
urlState: {
40-
initialActiveInterface: 'nrqlEditor',
41-
initialChartType: 'table',
42-
initialAccountId: account,
43-
initialNrqlValue: query,
44-
isViewingQuery: true,
40+
widget: {
41+
visualization: { id: 'viz.table' },
42+
rawConfiguration: {
43+
nrqlQueries: [{ query, accountIds: [account] }],
44+
},
45+
},
4546
},
46-
};
47-
navigation.openOverlay(nerdlet);
47+
});
4848
}
4949

5050
export default class MenuBar extends React.PureComponent {

0 commit comments

Comments
 (0)