Testbed for aiding development in Kibana (#11571)

* Initial code for testbed

* Fixing the routing

* Updating README

* Removing unnecessary line

* Fixing port in README

* Remove testbed source code from build
This commit is contained in:
Shaunak Kashyap 2017-05-08 09:20:27 -07:00 committed by GitHub
parent b5e6489458
commit 24b9b229af
9 changed files with 58 additions and 0 deletions

View file

@ -0,0 +1,8 @@
## Kibana Testbed
Sometimes when developing for Kibana, it is useful to have an isolated routable space to demonstrate new functionality. This Testbed provides such a space.
To make use of the testbed, edit the testbed.js, testbed.html, and testbed.less files as necessary. When you are done demonstrating
your new functionality, remember to cleanup your changes and restore the testbed to its pristine state for the next person.
To access the testbed, visit `http://localhost:5601/app/kibana#/testbed`

View file

@ -0,0 +1,11 @@
import { resolve } from 'path';
export default function (kibana) {
return new kibana.Plugin({
id: 'testbed',
publicDir: resolve(__dirname, 'public'),
uiExports: {
hacks: [ 'plugins/testbed' ]
}
});
}

View file

@ -0,0 +1,4 @@
{
"name": "testbed",
"version": "kibana"
}

View file

@ -0,0 +1 @@
import './testbed';

View file

@ -0,0 +1,11 @@
<div class="kuiTestbed kuiViewContent">
<div class="kuiViewContentItem">
<!-- All markup within the CONTENT section below can be deleted and replaced with whatever markup
you need to demonstate your functionality. Nothing need be preserved. -->
<!-- CONTENT START -->
<!-- CONTENT END -->
</div>
</div>

View file

@ -0,0 +1,12 @@
import uiRoutes from 'ui/routes';
import template from './testbed.html';
import './testbed.less';
uiRoutes.when('/testbed', {
template: template,
controllerAs: 'testbed',
controller: class TestbedController {
constructor() {
}
}
});

View file

@ -0,0 +1,9 @@
.kuiTestbed {
/* All CSS within the CONTENT section below can be deleted and replaced with whatever CSS
you need to demonstate your functionality. Nothing need be preserved. */
/* CONTENT START */
/* CONTENT END */
}

View file

@ -7,6 +7,7 @@ module.exports = function (grunt) {
'_build:downloadNodeBuilds',
'_build:extractNodeBuilds',
'copy:devSource',
'clean:devSourceForTestbed',
'babel:build',
'_build:babelOptions',
'_build:plugins',

View file

@ -4,5 +4,6 @@ module.exports = function () {
target: 'target',
screenshots: 'test/screenshots/session',
testsFromModules: 'build/kibana/node_modules/**/{test,tests}/**',
devSourceForTestbed: 'build/kibana/src/core_plugins/testbed/',
};
};