72241dbf5f
* add custom plugins * update bundles * provision app plugins and their dashboards * add one more script that run e2e tests using e2e test server * add e2e tests * regenerate jsonnet dashboards * ignore custom plugins and playwright report * use minified * cleanup tests * update codeowners * add leading slash * document new script * document custom-plugins * cleanup * twist modules * add readme
28 lines
792 B
JavaScript
28 lines
792 B
JavaScript
define(['react', '@grafana/data'], function (React, data) {
|
|
'use strict';
|
|
|
|
class RootComponent extends React.PureComponent {
|
|
render() {
|
|
return React.createElement('div', { className: 'page-container' }, 'Hello Grafana!');
|
|
}
|
|
}
|
|
|
|
const modalId = 'b-app-modal';
|
|
|
|
const plugin = new data.AppPlugin().setRootPage(RootComponent).configureExtensionLink({
|
|
title: 'Open from B',
|
|
description: 'Open a modal from plugin B',
|
|
extensionPointId: 'plugins/myorg-extensionpoint-app/actions',
|
|
onClick: function (e, { openModal }) {
|
|
openModal({
|
|
title: 'Modal from app B',
|
|
body: function () {
|
|
return React.createElement('div', { 'data-testid': modalId }, 'From plugin B');
|
|
},
|
|
});
|
|
},
|
|
});
|
|
|
|
return { plugin: plugin };
|
|
});
|