mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
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:
parent
b5e6489458
commit
24b9b229af
9 changed files with 58 additions and 0 deletions
8
src/core_plugins/testbed/README.md
Normal file
8
src/core_plugins/testbed/README.md
Normal 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`
|
11
src/core_plugins/testbed/index.js
Normal file
11
src/core_plugins/testbed/index.js
Normal 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' ]
|
||||
}
|
||||
});
|
||||
}
|
4
src/core_plugins/testbed/package.json
Normal file
4
src/core_plugins/testbed/package.json
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"name": "testbed",
|
||||
"version": "kibana"
|
||||
}
|
1
src/core_plugins/testbed/public/index.js
Normal file
1
src/core_plugins/testbed/public/index.js
Normal file
|
@ -0,0 +1 @@
|
|||
import './testbed';
|
11
src/core_plugins/testbed/public/testbed.html
Normal file
11
src/core_plugins/testbed/public/testbed.html
Normal 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>
|
12
src/core_plugins/testbed/public/testbed.js
Normal file
12
src/core_plugins/testbed/public/testbed.js
Normal 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() {
|
||||
}
|
||||
}
|
||||
});
|
9
src/core_plugins/testbed/public/testbed.less
Normal file
9
src/core_plugins/testbed/public/testbed.less
Normal 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 */
|
||||
|
||||
}
|
|
@ -7,6 +7,7 @@ module.exports = function (grunt) {
|
|||
'_build:downloadNodeBuilds',
|
||||
'_build:extractNodeBuilds',
|
||||
'copy:devSource',
|
||||
'clean:devSourceForTestbed',
|
||||
'babel:build',
|
||||
'_build:babelOptions',
|
||||
'_build:plugins',
|
||||
|
|
|
@ -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/',
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue