mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Merge branch 'master' into feature/ingest
Resolved conflicts, still need to move around some add data files.
This commit is contained in:
commit
0065fbaa9b
205 changed files with 1664 additions and 1241 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -15,6 +15,7 @@ target
|
|||
/test/screenshots/diff
|
||||
/test/screenshots/failure
|
||||
/test/screenshots/session
|
||||
/test/screenshots/visual_regression_gallery.html
|
||||
/esvm
|
||||
.htpasswd
|
||||
.eslintcache
|
||||
|
|
|
@ -113,7 +113,7 @@ Once that is complete just run:
|
|||
|
||||
```
|
||||
sh
|
||||
npm run test && npm run build
|
||||
npm run test && npm run build -- --skip-os-packages
|
||||
```
|
||||
|
||||
#### Debugging unit tests
|
||||
|
@ -121,27 +121,27 @@ npm run test && npm run build
|
|||
The standard `npm run test` task runs several sub tasks and can take several minutes to complete, making debugging failures pretty painful. In order to ease the pain specialized tasks provide alternate methods for running the tests.
|
||||
|
||||
|
||||
`npm run test:quick`
|
||||
`npm run test:quick`
|
||||
Runs both server and browser tests, but skips linting
|
||||
|
||||
`npm run test:server`
|
||||
`npm run test:server`
|
||||
Run only the server tests
|
||||
|
||||
`npm run test:browser`
|
||||
`npm run test:browser`
|
||||
Run only the browser tests. Coverage reports are available for browser tests by running `npm run test:coverage`. You can find the results under the `coverage/` directory that will be created upon completion.
|
||||
|
||||
`npm run test:dev`
|
||||
Initializes an environment for debugging the browser tests. Includes an dedicated instance of the kibana server for building the test bundle, and a karma server. When running this task the build is optimized for the first time and then a karma-owned instance of the browser is opened. Click the "debug" button to open a new tab that executes the unit tests.
|
||||
`npm run test:dev`
|
||||
Initializes an environment for debugging the browser tests. Includes an dedicated instance of the kibana server for building the test bundle, and a karma server. When running this task the build is optimized for the first time and then a karma-owned instance of the browser is opened. Click the "debug" button to open a new tab that executes the unit tests.
|
||||

|
||||
|
||||
`npm run mocha [test file or dir]` or `npm run mocha:debug [test file or dir]`
|
||||
`npm run mocha [test file or dir]` or `npm run mocha:debug [test file or dir]`
|
||||
Run a one off test with the local project version of mocha, babel compilation, and optional debugging. Great
|
||||
for development and fixing individual tests.
|
||||
|
||||
#### Unit testing plugins
|
||||
This should work super if you're using the [Kibana plugin generator](https://github.com/elastic/generator-kibana-plugin). If you're not using the generator, well, you're on your own. We suggest you look at how the generator works.
|
||||
|
||||
`npm run test:dev -- --kbnServer.testsBundle.pluginId=some_special_plugin --kbnServer.plugin-path=../some_special_plugin`
|
||||
`npm run test:dev -- --kbnServer.testsBundle.pluginId=some_special_plugin --kbnServer.plugin-path=../some_special_plugin`
|
||||
Run the tests for just your particular plugin. Assuming you plugin lives outside of the `installedPlugins directory`, which it should.
|
||||
|
||||
#### Running browser automation tests:
|
||||
|
@ -151,13 +151,13 @@ Run the tests for just your particular plugin. Assuming you plugin lives outside
|
|||
|
||||
The following will start Kibana, Elasticsearch and Selenium for you. To run the functional UI tests use the following commands
|
||||
|
||||
`npm run test:ui`
|
||||
`npm run test:ui`
|
||||
Run the functional UI tests one time and exit. This is used by the CI systems and is great for quickly checking that things pass. It is essentially a combination of the next two tasks.
|
||||
|
||||
`npm run test:ui:server`
|
||||
`npm run test:ui:server`
|
||||
Start the server required for the `test:ui:runner` tasks. Once the server is started `test:ui:runner` can be run multiple times without waiting for the server to start.
|
||||
|
||||
`npm run test:ui:runner`
|
||||
`npm run test:ui:runner`
|
||||
Execute the front-end selenium tests. This requires the server started by the `test:ui:server` task.
|
||||
|
||||
##### If you already have ElasticSearch, Kibana, and Selenium Server running:
|
||||
|
@ -187,12 +187,12 @@ Packages are built using fpm, pleaserun, dpkg, and rpm. fpm and pleaserun can b
|
|||
apt-get install ruby-dev rpm
|
||||
gem install fpm -v 1.5.0 # required by pleaserun 0.0.16
|
||||
gem install pleaserun -v 0.0.16 # higher versions fail at the moment
|
||||
npm run build:ospackages
|
||||
npm run build -- --skip-archives
|
||||
```
|
||||
|
||||
To specify a package to build you can add `rpm` or `deb` as an argument.
|
||||
```sh
|
||||
npm run build:ospackages -- --rpm
|
||||
npm run build -- --rpm
|
||||
```
|
||||
|
||||
Distributable packages can be found in `target/` after the build completes.
|
||||
|
|
|
@ -9,7 +9,7 @@ module.exports = function (grunt) {
|
|||
pkg: grunt.file.readJSON('package.json'),
|
||||
root: __dirname,
|
||||
src: __dirname + '/src',
|
||||
build: __dirname + '/build', // temporary build directory
|
||||
buildDir: __dirname + '/build', // temporary build directory
|
||||
plugins: __dirname + '/src/plugins',
|
||||
server: __dirname + '/src/server',
|
||||
target: __dirname + '/target', // location of the compressed build targets
|
||||
|
@ -69,6 +69,9 @@ module.exports = function (grunt) {
|
|||
|
||||
grunt.config.merge(config);
|
||||
|
||||
// must run before even services/platforms
|
||||
grunt.config.set('build', require('./tasks/config/build')(grunt));
|
||||
|
||||
config.packageScriptsDir = __dirname + '/tasks/build/package_scripts';
|
||||
// ensure that these run first, other configs need them
|
||||
config.services = require('./tasks/config/services')(grunt);
|
||||
|
|
10
README.md
10
README.md
|
@ -1,4 +1,4 @@
|
|||
# Kibana 5.0.0-snapshot
|
||||
# Kibana 5.0.0
|
||||
|
||||
Kibana is an open source ([Apache Licensed](https://github.com/elastic/kibana/blob/master/LICENSE.md)), browser based analytics and search dashboard for Elasticsearch. Kibana is a snap to setup and start using. Kibana strives to be easy to get started with, while also being flexible and powerful, just like Elasticsearch.
|
||||
|
||||
|
@ -43,7 +43,7 @@ For the daring, snapshot builds are available. These builds are created after ea
|
|||
|
||||
| platform | |
|
||||
| --- | --- |
|
||||
| OSX | [tar](http://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-snapshot-darwin-x64.tar.gz) |
|
||||
| Linux x64 | [tar](http://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-snapshot-linux-x64.tar.gz) [deb](https://download.elastic.co/kibana/kibana-snapshot/kibana_5.0.0-snapshot_amd64.deb) [rpm](https://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0_snapshot-1.x86_64.rpm) |
|
||||
| Linux x86 | [tar](http://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-snapshot-linux-x86.tar.gz) [deb](https://download.elastic.co/kibana/kibana-snapshot/kibana_5.0.0-snapshot_i386.deb) [rpm](https://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0_snapshot-1.i386.rpm) |
|
||||
| Windows | [zip](http://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-snapshot-windows.zip) |
|
||||
| OSX | [tar](http://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-SNAPSHOT-darwin-x64.tar.gz) |
|
||||
| Linux x64 | [tar](http://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-SNAPSHOT-linux-x64.tar.gz) [deb](https://download.elastic.co/kibana/kibana-snapshot/kibana_5.0.0-SNAPSHOT_amd64.deb) [rpm](https://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0_SNAPSHOT-1.x86_64.rpm) |
|
||||
| Linux x86 | [tar](http://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-SNAPSHOT-linux-x86.tar.gz) [deb](https://download.elastic.co/kibana/kibana-snapshot/kibana_5.0.0-SNAPSHOT_i386.deb) [rpm](https://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0_SNAPSHOT-1.i386.rpm) |
|
||||
| Windows | [zip](http://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-SNAPSHOT-windows.zip) |
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
:k4pull: https://github.com/elastic/kibana/pull/
|
||||
:version: master
|
||||
:esversion: master
|
||||
:packageversion: master
|
||||
|
||||
include::introduction.asciidoc[]
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add
|
|||
+
|
||||
["source","sh",subs="attributes"]
|
||||
--------------------------------------------------
|
||||
echo "deb http://packages.elastic.co/kibana/{version}/debian stable main" | sudo tee -a /etc/apt/sources.list.d/kibana.list
|
||||
echo "deb https://packages.elastic.co/kibana/{packageversion}/debian stable main" | sudo tee -a /etc/apt/sources.list.d/kibana.list
|
||||
--------------------------------------------------
|
||||
+
|
||||
[WARNING]
|
||||
|
@ -82,11 +82,11 @@ rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch
|
|||
+
|
||||
["source","sh",subs="attributes"]
|
||||
--------------------------------------------------
|
||||
[kibana-{version}]
|
||||
name=Kibana repository for {version}.x packages
|
||||
baseurl=http://packages.elastic.co/kibana/{version}/centos
|
||||
[kibana-{packageversion}]
|
||||
name=Kibana repository for {packageversion} packages
|
||||
baseurl=https://packages.elastic.co/kibana/{packageversion}/centos
|
||||
gpgcheck=1
|
||||
gpgkey=http://packages.elastic.co/GPG-KEY-elasticsearch
|
||||
gpgkey=https://packages.elastic.co/GPG-KEY-elasticsearch
|
||||
enabled=1
|
||||
--------------------------------------------------
|
||||
+
|
||||
|
|
17
package.json
17
package.json
|
@ -11,7 +11,7 @@
|
|||
"dashboarding"
|
||||
],
|
||||
"private": false,
|
||||
"version": "5.0.0-snapshot",
|
||||
"version": "5.0.0-alpha4",
|
||||
"build": {
|
||||
"number": 8467,
|
||||
"sha": "6cb7fec4e154faa0a4a3fee4b33dfef91b9870d9"
|
||||
|
@ -38,7 +38,7 @@
|
|||
"Tim Sullivan <tim@elastic.co>"
|
||||
],
|
||||
"scripts": {
|
||||
"test": "grunt test",
|
||||
"test": "grunt test; grunt test:visualRegression",
|
||||
"test:dev": "grunt test:dev",
|
||||
"test:quick": "grunt test:quick",
|
||||
"test:browser": "grunt test:browser",
|
||||
|
@ -48,7 +48,6 @@
|
|||
"test:server": "grunt test:server",
|
||||
"test:coverage": "grunt test:coverage",
|
||||
"build": "grunt build",
|
||||
"build:ospackages": "grunt build --os-packages",
|
||||
"start": "sh ./bin/kibana --dev",
|
||||
"precommit": "grunt precommit",
|
||||
"karma": "karma start",
|
||||
|
@ -59,8 +58,7 @@
|
|||
"makelogs": "makelogs",
|
||||
"mocha": "mocha",
|
||||
"mocha:debug": "mocha --debug-brk",
|
||||
"sterilize": "grunt sterilize",
|
||||
"compareScreenshots": "node utilities/compareScreenshots"
|
||||
"sterilize": "grunt sterilize"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -131,8 +129,8 @@
|
|||
"marked": "0.3.3",
|
||||
"minimatch": "2.0.10",
|
||||
"mkdirp": "0.5.1",
|
||||
"moment": "2.10.6",
|
||||
"moment-timezone": "0.4.1",
|
||||
"moment": "2.13.0",
|
||||
"moment-timezone": "0.5.4",
|
||||
"node-uuid": "1.4.7",
|
||||
"papaparse": "4.1.2",
|
||||
"raw-loader": "0.5.1",
|
||||
|
@ -158,6 +156,7 @@
|
|||
"auto-release-sinon": "1.0.3",
|
||||
"babel-eslint": "4.1.8",
|
||||
"chokidar": "1.4.3",
|
||||
"dot": "1.0.3",
|
||||
"elasticdump": "2.1.1",
|
||||
"eslint": "1.10.3",
|
||||
"eslint-plugin-mocha": "1.1.0",
|
||||
|
@ -189,14 +188,14 @@
|
|||
"karma-safari-launcher": "0.1.1",
|
||||
"license-checker": "3.1.0",
|
||||
"load-grunt-config": "0.19.1",
|
||||
"makelogs": "3.0.0-beta3",
|
||||
"makelogs": "3.0.0",
|
||||
"marked-text-renderer": "0.1.0",
|
||||
"mocha": "2.3.0",
|
||||
"ncp": "2.0.0",
|
||||
"nock": "2.10.0",
|
||||
"npm": "2.11.0",
|
||||
"portscanner": "1.0.0",
|
||||
"simple-git": "1.8.0",
|
||||
"simple-git": "1.37.0",
|
||||
"sinon": "1.17.2",
|
||||
"source-map": "0.4.4",
|
||||
"source-map-support": "0.4.0",
|
||||
|
|
|
@ -23,6 +23,8 @@ function setLoggingJson(enabled) {
|
|||
|
||||
describe(`Server logging configuration`, function () {
|
||||
it(`should be reloadable via SIGHUP process signaling`, function (done) {
|
||||
this.timeout(60000);
|
||||
|
||||
let asserted = false;
|
||||
let json = Infinity;
|
||||
const conf = setLoggingJson(true);
|
||||
|
@ -66,7 +68,7 @@ ${err.stack || err.message || err}`).to.eql(true);
|
|||
}
|
||||
|
||||
function switchToPlainTextLog() {
|
||||
json = 2; // ignore both "reloading" messages
|
||||
json = 3; // ignore both "reloading" messages + ui settings status message
|
||||
setLoggingJson(false);
|
||||
child.kill(`SIGHUP`); // reload logging config
|
||||
}
|
||||
|
|
|
@ -44,8 +44,8 @@ describe('kibana cli', function () {
|
|||
workingPath: testWorkingPath,
|
||||
tempArchiveFile: tempArchiveFilePath,
|
||||
plugin: 'test-plugin',
|
||||
version: '5.0.0-snapshot',
|
||||
plugins: [ { name: 'foo', path: join(testWorkingPath, 'foo'), version: '5.0.0-snapshot' } ]
|
||||
version: '5.0.0-SNAPSHOT',
|
||||
plugins: [ { name: 'foo', path: join(testWorkingPath, 'foo'), version: '5.0.0-SNAPSHOT' } ]
|
||||
};
|
||||
const errorStub = sinon.stub();
|
||||
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
import { fromRoot } from '../../utils';
|
||||
import fs from 'fs';
|
||||
import install from './install';
|
||||
import Logger from '../lib/logger';
|
||||
import pkg from '../../utils/package_json';
|
||||
import { parse, parseMilliseconds } from './settings';
|
||||
import { find } from 'lodash';
|
||||
|
||||
function processCommand(command, options) {
|
||||
let settings;
|
||||
|
@ -18,6 +20,24 @@ function processCommand(command, options) {
|
|||
install(settings, logger);
|
||||
}
|
||||
|
||||
function getDefaultConfigPath() {
|
||||
const paths = [
|
||||
fromRoot('config/kibana.yml'),
|
||||
'/etc/kibana/kibana.yml'
|
||||
];
|
||||
|
||||
const availablePath = find(paths, configPath => {
|
||||
try {
|
||||
fs.accessSync(configPath, fs.R_OK);
|
||||
return true;
|
||||
} catch (e) {
|
||||
//Check the next path
|
||||
}
|
||||
});
|
||||
|
||||
return availablePath || paths[0];
|
||||
}
|
||||
|
||||
export default function pluginInstall(program) {
|
||||
program
|
||||
.command('install <plugin/url>')
|
||||
|
@ -26,7 +46,7 @@ export default function pluginInstall(program) {
|
|||
.option(
|
||||
'-c, --config <path>',
|
||||
'path to the config file',
|
||||
fromRoot('config/kibana.yml')
|
||||
getDefaultConfigPath()
|
||||
)
|
||||
.option(
|
||||
'-t, --timeout <duration>',
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
{
|
||||
"_index": ".kibana",
|
||||
"_type": "config",
|
||||
"_id": "4.0.1-snapshot",
|
||||
"_id": "4.0.1-SNAPSHOT",
|
||||
"_score": 1,
|
||||
"_source": {
|
||||
"buildNum": 5921,
|
||||
|
|
|
@ -39,8 +39,8 @@ describe('plugins/elasticsearch', function () {
|
|||
upgradeDoc('4.0.0-rc2', '4.0.2', true);
|
||||
upgradeDoc('4.0.1', '4.1.0-rc', true);
|
||||
upgradeDoc('4.0.0-rc1', '4.0.0', true);
|
||||
upgradeDoc('4.0.0-rc1-snapshot', '4.0.0', false);
|
||||
upgradeDoc('4.1.0-rc1-snapshot', '4.1.0-rc1', false);
|
||||
upgradeDoc('4.0.0-rc1-SNAPSHOT', '4.0.0', false);
|
||||
upgradeDoc('4.1.0-rc1-SNAPSHOT', '4.1.0-rc1', false);
|
||||
upgradeDoc('5.0.0-alpha1', '5.0.0', false);
|
||||
|
||||
it('should handle missing _id field', function () {
|
||||
|
|
|
@ -94,7 +94,7 @@ describe('plugins/elasticsearch', function () {
|
|||
it('should create new config if the nothing is upgradeable', function () {
|
||||
get.withArgs('pkg.buildNum').returns(9833);
|
||||
client.create.returns(Promise.resolve());
|
||||
const response = { hits: { hits: [ { _id: '4.0.1-alpha3' }, { _id: '4.0.1-beta1' }, { _id: '4.0.0-snapshot1' } ] } };
|
||||
const response = { hits: { hits: [ { _id: '4.0.1-alpha3' }, { _id: '4.0.1-beta1' }, { _id: '4.0.0-SNAPSHOT1' } ] } };
|
||||
return upgrade(response).then(function (resp) {
|
||||
sinon.assert.calledOnce(client.create);
|
||||
const params = client.create.args[0][0];
|
||||
|
|
|
@ -21,9 +21,9 @@ const versionChecks = [
|
|||
['2.0.1', '^2.0.0', true],
|
||||
['2.1.1', '^2.1.0', true],
|
||||
['2.2.0', '^2.1.0', true],
|
||||
['3.0.0-snapshot', '^2.1.0', false],
|
||||
['3.0.0-SNAPSHOT', '^2.1.0', false],
|
||||
['3.0.0', '^2.1.0', false],
|
||||
['2.10.20-snapshot', '^2.10.20', true],
|
||||
['2.10.20-SNAPSHOT', '^2.10.20', true],
|
||||
['2.10.999', '^2.10.20', true],
|
||||
];
|
||||
|
||||
|
|
|
@ -19,14 +19,13 @@ module.exports = function (kibana) {
|
|||
title: 'Kibana',
|
||||
listed: false,
|
||||
description: 'the kibana you know and love',
|
||||
//icon: 'plugins/kibana/settings/sections/about/barcode.svg',
|
||||
main: 'plugins/kibana/kibana',
|
||||
uses: [
|
||||
'visTypes',
|
||||
'spyModes',
|
||||
'fieldFormats',
|
||||
'navbarExtensions',
|
||||
'settingsSections',
|
||||
'managementSections',
|
||||
'docViews'
|
||||
],
|
||||
|
||||
|
@ -62,11 +61,12 @@ module.exports = function (kibana) {
|
|||
icon: 'plugins/kibana/assets/dashboard.svg',
|
||||
},
|
||||
{
|
||||
title: 'Settings',
|
||||
title: 'Management',
|
||||
order: 1000,
|
||||
url: '/app/kibana#/settings',
|
||||
url: '/app/kibana#/management',
|
||||
description: 'define index patterns, change config, and more',
|
||||
icon: 'plugins/kibana/assets/settings.svg',
|
||||
linkToLastSubUrl: false
|
||||
}
|
||||
],
|
||||
injectDefaultVars(server, options) {
|
||||
|
|
|
@ -15,7 +15,7 @@ uiModules
|
|||
const filterManager = Private(FilterManagerProvider);
|
||||
const notify = new Notifier();
|
||||
|
||||
const services = require('plugins/kibana/settings/saved_object_registry').all().map(function (serviceObj) {
|
||||
const services = require('plugins/kibana/management/saved_object_registry').all().map(function (serviceObj) {
|
||||
const service = $injector.get(serviceObj.service);
|
||||
return {
|
||||
type: service.type,
|
||||
|
@ -79,7 +79,7 @@ uiModules
|
|||
const service = _.find(services, { type: type });
|
||||
if (!service) return;
|
||||
|
||||
$scope.editUrl = '#settings/objects/' + service.name + '/' + id + '?notFound=' + e.savedObjectType;
|
||||
$scope.editUrl = '#management/kibana/objects/' + service.name + '/' + id + '?notFound=' + e.savedObjectType;
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
@ -9,7 +9,7 @@ const module = uiModules.get('app/dashboard');
|
|||
|
||||
// Register this service with the saved object registry so it can be
|
||||
// edited by the object editor.
|
||||
require('plugins/kibana/settings/saved_object_registry').register({
|
||||
require('plugins/kibana/management/saved_object_registry').register({
|
||||
service: 'savedDashboards',
|
||||
title: 'dashboards'
|
||||
});
|
||||
|
|
|
@ -65,7 +65,7 @@ uiRoutes
|
|||
return savedSearches.get($route.current.params.id)
|
||||
.catch(courier.redirectWhenMissing({
|
||||
'search': '/discover',
|
||||
'index-pattern': '/settings/objects/savedSearches/' + $route.current.params.id
|
||||
'index-pattern': '/management/kibana/objects/savedSearches/' + $route.current.params.id
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ const module = uiModules.get('discover/saved_searches', [
|
|||
|
||||
// Register this service with the saved object registry so it can be
|
||||
// edited by the object editor.
|
||||
require('plugins/kibana/settings/saved_object_registry').register({
|
||||
require('plugins/kibana/management/saved_object_registry').register({
|
||||
service: 'savedSearches',
|
||||
title: 'searches'
|
||||
});
|
||||
|
|
|
@ -11,7 +11,7 @@ import 'ui/autoload/all';
|
|||
import 'plugins/kibana/discover/index';
|
||||
import 'plugins/kibana/visualize/index';
|
||||
import 'plugins/kibana/dashboard/index';
|
||||
import 'plugins/kibana/settings/index';
|
||||
import 'plugins/kibana/management/index';
|
||||
import 'plugins/kibana/doc';
|
||||
import 'ui/vislib';
|
||||
import 'ui/agg_response';
|
||||
|
|
23
src/plugins/kibana/public/management/app.html
Normal file
23
src/plugins/kibana/public/management/app.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
<div class="app-container">
|
||||
<nav class="navbar navbar-default navbar-static-top subnav" data-test-subj="managementNav">
|
||||
<bread-crumbs omit-current-page="true"></bread-crumbs>
|
||||
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="current-page" ng-hide="sectionName">
|
||||
{{::section.display}}
|
||||
</li>
|
||||
|
||||
<li
|
||||
ng-if="sectionName"
|
||||
ng-repeat="item in section.items.inOrder"
|
||||
ng-class="item.class">
|
||||
|
||||
<a class="navbar-link" kbn-href="{{::item.url}}" data-test-subj="{{::item.name}}">
|
||||
{{::item.display}}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<div role="main" class="management-container" ng-transclude></div>
|
||||
</div>
|
64
src/plugins/kibana/public/management/index.js
Normal file
64
src/plugins/kibana/public/management/index.js
Normal file
|
@ -0,0 +1,64 @@
|
|||
import _ from 'lodash';
|
||||
|
||||
import 'plugins/kibana/management/sections';
|
||||
import 'plugins/kibana/management/styles/main.less';
|
||||
import 'ui/filters/start_from';
|
||||
import 'ui/field_editor';
|
||||
import 'plugins/kibana/management/sections/indices/_indexed_fields';
|
||||
import 'plugins/kibana/management/sections/indices/_scripted_fields';
|
||||
import 'ui/directives/bread_crumbs';
|
||||
import uiRoutes from 'ui/routes';
|
||||
import uiModules from 'ui/modules';
|
||||
import appTemplate from 'plugins/kibana/management/app.html';
|
||||
import landingTemplate from 'plugins/kibana/management/landing.html';
|
||||
import chrome from 'ui/chrome/chrome';
|
||||
import management from 'ui/management';
|
||||
|
||||
uiRoutes
|
||||
.when('/management', {
|
||||
template: landingTemplate
|
||||
});
|
||||
|
||||
require('ui/index_patterns/route_setup/load_default')({
|
||||
notRequiredRe: /^\/management\/data\//,
|
||||
whenMissingRedirectTo: '/management/data/index'
|
||||
});
|
||||
|
||||
uiModules
|
||||
.get('apps/management')
|
||||
.directive('kbnManagementApp', function (Private, $route, $location, timefilter, buildNum, buildSha) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
template: appTemplate,
|
||||
transclude: true,
|
||||
scope: {
|
||||
sectionName: '@section'
|
||||
},
|
||||
|
||||
link: function ($scope) {
|
||||
timefilter.enabled = false;
|
||||
$scope.sections = management.items.inOrder;
|
||||
$scope.section = management.getSection($scope.sectionName) || management;
|
||||
|
||||
if ($scope.section) {
|
||||
$scope.section.items.forEach(item => {
|
||||
item.class = `#${$location.path()}`.indexOf(item.url) > -1 ? 'active' : undefined;
|
||||
});
|
||||
}
|
||||
|
||||
management.getSection('kibana').info = `Build ${buildNum}, Commit SHA ${buildSha.substr(0, 8)}`;
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
uiModules
|
||||
.get('apps/management')
|
||||
.directive('kbnManagementLanding', function (kbnVersion) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
link: function ($scope) {
|
||||
$scope.sections = management.items.inOrder;
|
||||
$scope.kbnVersion = kbnVersion;
|
||||
}
|
||||
};
|
||||
});
|
45
src/plugins/kibana/public/management/landing.html
Normal file
45
src/plugins/kibana/public/management/landing.html
Normal file
|
@ -0,0 +1,45 @@
|
|||
<kbn-management-app>
|
||||
<kbn-management-landing>
|
||||
<div class="product-overview">
|
||||
<span class="kibana-version">Version: {{::kbnVersion}}</span>
|
||||
</div>
|
||||
<div class="management-sections">
|
||||
<div
|
||||
ng-if="section.items.length > 0"
|
||||
ng-repeat="section in sections"
|
||||
ng-class="{ 'management-section-info-expanded': section.showInfo }"
|
||||
class="col-xs-12 management-section management-section-{{::section.id}}">
|
||||
|
||||
<div class="panel panel-product management-panel-product">
|
||||
<div class="panel-heading panel-heading-{{::section.id}}">
|
||||
{{::section.display}}
|
||||
|
||||
<i
|
||||
class="fa fa-info-circle pull-right panel-heading-icon"
|
||||
ng-click="section.showInfo = !!!section.showInfo"
|
||||
ng-if="section.info">
|
||||
</i>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<ul class="management-section-items list-unstyled">
|
||||
<li
|
||||
class="col-xs-4 col-md-3"
|
||||
ng-repeat="item in section.items.inOrder">
|
||||
|
||||
<a class="management-link" kbn-href="{{::item.url}}">
|
||||
{{::item.display}}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="management-section-info">
|
||||
{{::section.info}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</kbn-management-landing>
|
||||
</kbn-management-app>
|
3
src/plugins/kibana/public/management/sections/index.js
Normal file
3
src/plugins/kibana/public/management/sections/index.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
import 'plugins/kibana/management/sections/settings';
|
||||
import 'plugins/kibana/management/sections/objects';
|
||||
import 'plugins/kibana/management/sections/indices';
|
|
@ -1,6 +1,6 @@
|
|||
<kbn-settings-app section="indices">
|
||||
<kbn-settings-indices>
|
||||
<div ng-controller="settingsIndicesCreate" class="kbn-settings-indices-create">
|
||||
<kbn-management-app section="data">
|
||||
<kbn-management-indices>
|
||||
<div ng-controller="managementIndicesCreate" class="kbn-management-indices-create">
|
||||
<div class="page-header">
|
||||
<h1>Configure an index pattern</h1>
|
||||
In order to use Kibana you must configure at least one index pattern. Index patterns are
|
||||
|
@ -179,5 +179,5 @@
|
|||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</kbn-settings-indices>
|
||||
</kbn-settings-app>
|
||||
</kbn-management-indices>
|
||||
</kbn-management-app>
|
|
@ -3,21 +3,20 @@ import moment from 'moment';
|
|||
import { IndexPatternMissingIndices } from 'ui/errors';
|
||||
import 'ui/directives/validate_index_name';
|
||||
import 'ui/directives/auto_select_if_only_one';
|
||||
import PluginsKibanaSettingsSectionsIndicesRefreshKibanaIndexProvider from 'plugins/kibana/settings/sections/indices/_refresh_kibana_index';
|
||||
import RefreshKibanaIndex from 'plugins/kibana/management/sections/indices/_refresh_kibana_index';
|
||||
import uiRoutes from 'ui/routes';
|
||||
import uiModules from 'ui/modules';
|
||||
import createTemplate from 'plugins/kibana/settings/sections/indices/_create.html';
|
||||
|
||||
import createTemplate from 'plugins/kibana/management/sections/indices/_create.html';
|
||||
|
||||
uiRoutes
|
||||
.when('/settings/indices/create/existing', {
|
||||
.when('/management/data/index/', {
|
||||
template: createTemplate
|
||||
});
|
||||
|
||||
uiModules.get('apps/settings')
|
||||
.controller('settingsIndicesCreate', function ($scope, kbnUrl, Private, Notifier, indexPatterns, es, config, Promise) {
|
||||
uiModules.get('apps/management')
|
||||
.controller('managementIndicesCreate', function ($scope, kbnUrl, Private, Notifier, indexPatterns, es, config, Promise) {
|
||||
const notify = new Notifier();
|
||||
const refreshKibanaIndex = Private(PluginsKibanaSettingsSectionsIndicesRefreshKibanaIndexProvider);
|
||||
const refreshKibanaIndex = Private(RefreshKibanaIndex);
|
||||
const intervals = indexPatterns.intervals;
|
||||
let samplePromise;
|
||||
|
||||
|
@ -73,7 +72,7 @@ uiModules.get('apps/settings')
|
|||
config.set('defaultIndex', indexPattern.id);
|
||||
}
|
||||
indexPatterns.cache.clear(indexPattern.id);
|
||||
kbnUrl.change('/settings/indices/edit/' + indexPattern.id);
|
||||
kbnUrl.change('/management/kibana/indices/' + indexPattern.id);
|
||||
});
|
||||
}
|
||||
});
|
|
@ -1,13 +1,13 @@
|
|||
<kbn-settings-app section="indices">
|
||||
<kbn-settings-indices>
|
||||
<div ng-controller="settingsIndicesEdit" data-test-subj="editIndexPattern">
|
||||
<kbn-management-app section="kibana">
|
||||
<kbn-management-indices>
|
||||
<div ng-controller="managementIndicesEdit" data-test-subj="editIndexPattern">
|
||||
<div class="page-header">
|
||||
<kbn-settings-index-header
|
||||
<kbn-management-index-header
|
||||
index-pattern="indexPattern"
|
||||
set-default="setDefaultPattern()"
|
||||
refresh-fields="indexPattern.refreshFields()"
|
||||
delete="removePattern()">
|
||||
</kbn-settings-index-header>
|
||||
</kbn-management-index-header>
|
||||
|
||||
<p>
|
||||
This page lists every field in the <strong>{{::indexPattern.id}}</strong>
|
||||
|
@ -38,7 +38,7 @@
|
|||
<br />
|
||||
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="kbn-settings-tab" ng-class="{ active: state.tab === fieldType.index }" ng-repeat="fieldType in fieldTypes">
|
||||
<li class="kbn-management-tab" ng-class="{ active: state.tab === fieldType.index }" ng-repeat="fieldType in fieldTypes">
|
||||
<a ng-click="changeTab(fieldType)">
|
||||
{{ fieldType.title }}
|
||||
<small>({{ fieldType.count }})</small>
|
||||
|
@ -50,5 +50,5 @@
|
|||
<scripted-fields ng-show="state.tab == 'scriptedFields'" class="fields scripted-fields"></scripted-fields>
|
||||
|
||||
</div>
|
||||
</kbn-settings-indices>
|
||||
</kbn-settings-app>
|
||||
</kbn-management-indices>
|
||||
</kbn-management-app>
|
|
@ -1,32 +1,38 @@
|
|||
import _ from 'lodash';
|
||||
import 'plugins/kibana/settings/sections/indices/_indexed_fields';
|
||||
import 'plugins/kibana/settings/sections/indices/_scripted_fields';
|
||||
import 'plugins/kibana/settings/sections/indices/_index_header';
|
||||
import PluginsKibanaSettingsSectionsIndicesRefreshKibanaIndexProvider from 'plugins/kibana/settings/sections/indices/_refresh_kibana_index';
|
||||
import 'plugins/kibana/management/sections/indices/_indexed_fields';
|
||||
import 'plugins/kibana/management/sections/indices/_scripted_fields';
|
||||
import 'plugins/kibana/management/sections/indices/_index_header';
|
||||
import RefreshKibanaIndex from 'plugins/kibana/management/sections/indices/_refresh_kibana_index';
|
||||
import UrlProvider from 'ui/url';
|
||||
import PluginsKibanaSettingsSectionsIndicesFieldTypesProvider from 'plugins/kibana/settings/sections/indices/_field_types';
|
||||
import IndicesFieldTypesProvider from 'plugins/kibana/management/sections/indices/_field_types';
|
||||
import uiRoutes from 'ui/routes';
|
||||
import uiModules from 'ui/modules';
|
||||
import editTemplate from 'plugins/kibana/settings/sections/indices/_edit.html';
|
||||
import editTemplate from 'plugins/kibana/management/sections/indices/_edit.html';
|
||||
import IngestProvider from 'ui/ingest';
|
||||
|
||||
uiRoutes
|
||||
.when('/settings/indices/edit/:indexPatternId', {
|
||||
.when('/management/kibana/indices/:indexPatternId?', {
|
||||
template: editTemplate,
|
||||
resolve: {
|
||||
indexPattern: function ($route, courier) {
|
||||
return courier.indexPatterns.get($route.current.params.indexPatternId)
|
||||
.catch(courier.redirectWhenMissing('/settings/indices'));
|
||||
indexPattern: function ($route, config, courier) {
|
||||
const params = $route.current.params;
|
||||
|
||||
if (typeof params.indexPatternId === 'undefined') {
|
||||
params.indexPatternId = config.get('defaultIndex');
|
||||
}
|
||||
|
||||
return courier.indexPatterns.get(params.indexPatternId)
|
||||
.catch(courier.redirectWhenMissing('/management/data/index'));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
uiModules.get('apps/settings')
|
||||
.controller('settingsIndicesEdit', function ($scope, $location, $route, config, courier, Notifier, Private, AppState, docTitle) {
|
||||
uiModules.get('apps/management')
|
||||
.controller('managementIndicesEdit', function ($scope, $location, $route, config, courier, Notifier, Private, AppState, docTitle) {
|
||||
|
||||
const notify = new Notifier();
|
||||
const $state = $scope.state = new AppState();
|
||||
const refreshKibanaIndex = Private(PluginsKibanaSettingsSectionsIndicesRefreshKibanaIndexProvider);
|
||||
const refreshKibanaIndex = Private(RefreshKibanaIndex);
|
||||
const ingest = Private(IngestProvider);
|
||||
|
||||
$scope.kbnUrl = Private(UrlProvider);
|
||||
|
@ -34,7 +40,7 @@ uiModules.get('apps/settings')
|
|||
docTitle.change($scope.indexPattern.id);
|
||||
const otherIds = _.without($route.current.locals.indexPatternIds, $scope.indexPattern.id);
|
||||
|
||||
const fieldTypes = Private(PluginsKibanaSettingsSectionsIndicesFieldTypesProvider);
|
||||
const fieldTypes = Private(IndicesFieldTypesProvider);
|
||||
$scope.$watch('indexPattern.fields', function () {
|
||||
$scope.fieldTypes = fieldTypes($scope.indexPattern);
|
||||
});
|
||||
|
@ -65,9 +71,9 @@ uiModules.get('apps/settings')
|
|||
}
|
||||
|
||||
ingest.delete($scope.indexPattern.id)
|
||||
.then($scope.indexPattern.destroy.bind($scope.indexPattern))
|
||||
.then($scope.indexPattern.destroy.bind($scope.indexPattern))
|
||||
.then(function () {
|
||||
$location.url('/settings/indices');
|
||||
$location.url('/management/data/index');
|
||||
})
|
||||
.catch(notify.fatal);
|
||||
};
|
|
@ -1,7 +1,7 @@
|
|||
<kbn-settings-app section="indices">
|
||||
<kbn-settings-indices>
|
||||
<kbn-management-app section="kibana">
|
||||
<kbn-management-indices>
|
||||
<div class="page-header">
|
||||
<kbn-settings-index-header index-pattern="fieldSettings.indexPattern"></kbn-settings-index-header>
|
||||
<kbn-management-index-header index-pattern="fieldSettings.indexPattern"></kbn-management-index-header>
|
||||
|
||||
<h2 ng-if="fieldSettings.mode === 'create'">
|
||||
Create {{ fieldSettings.field.scripted ? 'Scripted ' : '' }}Field
|
||||
|
@ -14,5 +14,5 @@
|
|||
|
||||
<field-editor index-pattern="fieldSettings.indexPattern" field="fieldSettings.field"></field-editor>
|
||||
|
||||
</kbn-settings-indices>
|
||||
</kbn-settings-app>
|
||||
</kbn-management-indices>
|
||||
</kbn-management-app>
|
|
@ -1,19 +1,19 @@
|
|||
import 'ui/field_editor';
|
||||
import 'plugins/kibana/settings/sections/indices/_index_header';
|
||||
import 'plugins/kibana/management/sections/indices/_index_header';
|
||||
import IndexPatternsFieldProvider from 'ui/index_patterns/_field';
|
||||
import UrlProvider from 'ui/url';
|
||||
import uiRoutes from 'ui/routes';
|
||||
import fieldEditorTemplate from 'plugins/kibana/settings/sections/indices/_field_editor.html';
|
||||
import fieldEditorTemplate from 'plugins/kibana/management/sections/indices/_field_editor.html';
|
||||
|
||||
uiRoutes
|
||||
.when('/settings/indices/edit/:indexPatternId/field/:fieldName', { mode: 'edit' })
|
||||
.when('/settings/indices/edit/:indexPatternId/create-field/', { mode: 'create' })
|
||||
.defaults(/settings\/indices\/edit\/[^\/]+\/(field|create-field)(\/|$)/, {
|
||||
.when('/management/kibana/indices/:indexPatternId/field/:fieldName', { mode: 'edit' })
|
||||
.when('/management/kibana/indices/:indexPatternId/create-field/', { mode: 'create' })
|
||||
.defaults(/management\/kibana\/indices\/[^\/]+\/(field|create-field)(\/|$)/, {
|
||||
template: fieldEditorTemplate,
|
||||
resolve: {
|
||||
indexPattern: function ($route, courier) {
|
||||
return courier.indexPatterns.get($route.current.params.indexPatternId)
|
||||
.catch(courier.redirectWhenMissing('/settings/indices'));
|
||||
.catch(courier.redirectWhenMissing('/management/kibana/indices'));
|
||||
}
|
||||
},
|
||||
controllerAs: 'fieldSettings',
|
||||
|
@ -22,7 +22,6 @@ uiRoutes
|
|||
const notify = new Notifier({ location: 'Field Editor' });
|
||||
const kbnUrl = Private(UrlProvider);
|
||||
|
||||
|
||||
this.mode = $route.current.mode;
|
||||
this.indexPattern = $route.current.locals.indexPattern;
|
||||
|
||||
|
@ -54,4 +53,3 @@ uiRoutes
|
|||
};
|
||||
}
|
||||
});
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
import uiModules from 'ui/modules';
|
||||
import indexHeaderTemplate from 'plugins/kibana/settings/sections/indices/_index_header.html';
|
||||
import indexHeaderTemplate from 'plugins/kibana/management/sections/indices/_index_header.html';
|
||||
uiModules
|
||||
.get('apps/settings')
|
||||
.directive('kbnSettingsIndexHeader', function (config) {
|
||||
.get('apps/management')
|
||||
.directive('kbnManagementIndexHeader', function (config) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
template: indexHeaderTemplate,
|
|
@ -1,12 +1,12 @@
|
|||
import _ from 'lodash';
|
||||
import 'ui/paginated_table';
|
||||
import nameHtml from 'plugins/kibana/settings/sections/indices/_field_name.html';
|
||||
import typeHtml from 'plugins/kibana/settings/sections/indices/_field_type.html';
|
||||
import controlsHtml from 'plugins/kibana/settings/sections/indices/_field_controls.html';
|
||||
import nameHtml from 'plugins/kibana/management/sections/indices/_field_name.html';
|
||||
import typeHtml from 'plugins/kibana/management/sections/indices/_field_type.html';
|
||||
import controlsHtml from 'plugins/kibana/management/sections/indices/_field_controls.html';
|
||||
import uiModules from 'ui/modules';
|
||||
import indexedFieldsTemplate from 'plugins/kibana/settings/sections/indices/_indexed_fields.html';
|
||||
import indexedFieldsTemplate from 'plugins/kibana/management/sections/indices/_indexed_fields.html';
|
||||
|
||||
uiModules.get('apps/settings')
|
||||
uiModules.get('apps/management')
|
||||
.directive('indexedFields', function ($filter) {
|
||||
const yesTemplate = '<i class="fa fa-check" aria-label="yes"></i>';
|
||||
const noTemplate = '';
|
|
@ -1,12 +1,12 @@
|
|||
import _ from 'lodash';
|
||||
import 'ui/paginated_table';
|
||||
import popularityHtml from 'plugins/kibana/settings/sections/indices/_field_popularity.html';
|
||||
import controlsHtml from 'plugins/kibana/settings/sections/indices/_field_controls.html';
|
||||
import dateScripts from 'plugins/kibana/settings/sections/indices/_date_scripts';
|
||||
import popularityHtml from 'plugins/kibana/management/sections/indices/_field_popularity.html';
|
||||
import controlsHtml from 'plugins/kibana/management/sections/indices/_field_controls.html';
|
||||
import dateScripts from 'plugins/kibana/management/sections/indices/_date_scripts';
|
||||
import uiModules from 'ui/modules';
|
||||
import scriptedFieldsTemplate from 'plugins/kibana/settings/sections/indices/_scripted_fields.html';
|
||||
import scriptedFieldsTemplate from 'plugins/kibana/management/sections/indices/_scripted_fields.html';
|
||||
|
||||
uiModules.get('apps/settings')
|
||||
uiModules.get('apps/management')
|
||||
.directive('scriptedFields', function (kbnUrl, Notifier, $filter) {
|
||||
const rowScopes = []; // track row scopes, so they can be destroyed as needed
|
||||
const filter = $filter('filter');
|
||||
|
@ -19,7 +19,7 @@ uiModules.get('apps/settings')
|
|||
scope: true,
|
||||
link: function ($scope) {
|
||||
|
||||
const fieldCreatorPath = '/settings/indices/edit/{{ indexPattern }}/scriptedField';
|
||||
const fieldCreatorPath = '/management/kibana/indices/{{ indexPattern }}/scriptedField';
|
||||
const fieldEditorPath = fieldCreatorPath + '/{{ fieldName }}';
|
||||
|
||||
$scope.perPage = 25;
|
|
@ -0,0 +1,37 @@
|
|||
<div class="col-md-2 sidebar-container">
|
||||
<div class="sidebar-list">
|
||||
<div class="sidebar-list-header">
|
||||
<h5>
|
||||
<a
|
||||
ng-if="editingId"
|
||||
href="#/management/data/index"
|
||||
class="btn btn-primary btn-xs"
|
||||
aria-label="Add New">
|
||||
<span class="sr-only">Add New</span>
|
||||
<i aria-hidden="true" class="fa fa-plus"></i> Add New
|
||||
</a>
|
||||
</h5>
|
||||
</div>
|
||||
<ul class="list-unstyled">
|
||||
<li
|
||||
ng-if="!defaultIndex"
|
||||
class="sidebar-item">
|
||||
<div class="sidebar-item-title full-title">
|
||||
<span class="label label-warning">Warning</span> No default index pattern. You must select or create one to continue.
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
ng-repeat="pattern in indexPatternList | orderBy:['-default','id'] track by pattern.id "
|
||||
class="sidebar-item">
|
||||
<a href="{{::pattern.url}}">
|
||||
<div class="{{::pattern.class}}">
|
||||
<i aria-hidden="true" ng-if="pattern.default" class="fa fa-star"></i>
|
||||
<span ng-bind="::pattern.id"></span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-10" ng-transclude></div>
|
|
@ -0,0 +1,64 @@
|
|||
import management from 'ui/management';
|
||||
import 'plugins/kibana/management/sections/indices/_create';
|
||||
import 'plugins/kibana/management/sections/indices/_edit';
|
||||
import 'plugins/kibana/management/sections/indices/_field_editor';
|
||||
import uiRoutes from 'ui/routes';
|
||||
import uiModules from 'ui/modules';
|
||||
import indexTemplate from 'plugins/kibana/management/sections/indices/index.html';
|
||||
|
||||
const indexPatternsResolutions = {
|
||||
indexPatternIds: function (courier) {
|
||||
return courier.indexPatterns.getIds();
|
||||
}
|
||||
};
|
||||
|
||||
// add a dependency to all of the subsection routes
|
||||
uiRoutes
|
||||
.defaults(/management\/kibana\/indices/, {
|
||||
resolve: indexPatternsResolutions
|
||||
});
|
||||
|
||||
uiRoutes
|
||||
.defaults(/management\/data\/index/, {
|
||||
resolve: indexPatternsResolutions
|
||||
});
|
||||
|
||||
// wrapper directive, which sets some global stuff up like the left nav
|
||||
uiModules.get('apps/management')
|
||||
.directive('kbnManagementIndices', function ($route, config, kbnUrl) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
transclude: true,
|
||||
template: indexTemplate,
|
||||
link: function ($scope) {
|
||||
$scope.editingId = $route.current.params.indexPatternId;
|
||||
config.bindToScope($scope, 'defaultIndex');
|
||||
|
||||
$scope.$watch('defaultIndex', function () {
|
||||
const ids = $route.current.locals.indexPatternIds;
|
||||
$scope.indexPatternList = ids.map(function (id) {
|
||||
return {
|
||||
id: id,
|
||||
url: kbnUrl.eval('#/management/kibana/indices/{{id}}', {id: id}),
|
||||
class: 'sidebar-item-title ' + ($scope.editingId === id ? 'active' : ''),
|
||||
default: $scope.defaultIndex === id
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
$scope.$emit('application.load');
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
management.getSection('data').register('indices', {
|
||||
display: 'Existing Data',
|
||||
order: 0,
|
||||
path: 'data/index/'
|
||||
});
|
||||
|
||||
management.getSection('kibana').register('indices', {
|
||||
display: 'Index Patterns',
|
||||
order: 0,
|
||||
path: 'kibana/indices/'
|
||||
});
|
|
@ -1,5 +1,5 @@
|
|||
<kbn-settings-app section="objects">
|
||||
<kbn-settings-objects class="container">
|
||||
<kbn-management-app section="kibana">
|
||||
<kbn-management-objects class="container-fluid">
|
||||
<div class="header">
|
||||
<h2 class="title">Edit Saved Objects</h2>
|
||||
<button class="btn btn-default controls" ng-click="exportAll()"><i aria-hidden="true" class="fa fa-download"></i> Export Everything</button>
|
||||
|
@ -17,7 +17,7 @@
|
|||
</form>
|
||||
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="kbn-settings-tab" ng-class="{ active: state.tab === service.title }" ng-repeat="service in services">
|
||||
<li class="kbn-management-tab" ng-class="{ active: state.tab === service.title }" ng-repeat="service in services">
|
||||
<a title="{{ service.title }}" ng-click="changeTab(service)">{{ service.title }}
|
||||
<small>
|
||||
({{service.data.length}}<span ng-show="service.total > service.data.length"> of {{service.total}}</span>)
|
||||
|
@ -76,5 +76,5 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
</kbn-settings-objects>
|
||||
</kbn-settings-app>
|
||||
</kbn-management-objects>
|
||||
</kbn-management-app>
|
|
@ -1,8 +1,8 @@
|
|||
import { saveAs } from '@spalger/filesaver';
|
||||
import { extend, find, flattenDeep, partialRight, pick, pluck, sortBy } from 'lodash';
|
||||
import angular from 'angular';
|
||||
import registry from 'plugins/kibana/settings/saved_object_registry';
|
||||
import objectIndexHTML from 'plugins/kibana/settings/sections/objects/_objects.html';
|
||||
import registry from 'plugins/kibana/management/saved_object_registry';
|
||||
import objectIndexHTML from 'plugins/kibana/management/sections/objects/_objects.html';
|
||||
import 'ui/directives/file_upload';
|
||||
import uiRoutes from 'ui/routes';
|
||||
import uiModules from 'ui/modules';
|
||||
|
@ -10,12 +10,12 @@ import uiModules from 'ui/modules';
|
|||
const MAX_SIZE = Math.pow(2, 31) - 1;
|
||||
|
||||
uiRoutes
|
||||
.when('/settings/objects', {
|
||||
.when('/management/kibana/objects', {
|
||||
template: objectIndexHTML
|
||||
});
|
||||
|
||||
uiModules.get('apps/settings')
|
||||
.directive('kbnSettingsObjects', function (kbnIndex, Notifier, Private, kbnUrl, Promise) {
|
||||
uiModules.get('apps/management')
|
||||
.directive('kbnManagementObjects', function (kbnIndex, Notifier, Private, kbnUrl, Promise) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
controller: function ($scope, $injector, $q, AppState, es) {
|
||||
|
@ -79,7 +79,7 @@ uiModules.get('apps/settings')
|
|||
id: item.id
|
||||
};
|
||||
|
||||
kbnUrl.change('/settings/objects/{{ service }}/{{ id }}', params);
|
||||
kbnUrl.change('/management/kibana/objects/{{ service }}/{{ id }}', params);
|
||||
};
|
||||
|
||||
$scope.bulkDelete = function () {
|
|
@ -1,5 +1,5 @@
|
|||
<kbn-settings-app section="objects">
|
||||
<kbn-settings-objects-view class="container">
|
||||
<kbn-management-app section="kibana">
|
||||
<kbn-management-objects-view class="container">
|
||||
<div class="pull-right" style="margin-top: 20px;">
|
||||
<a href="{{ link }}" class="btn btn-primary">View {{ title }}</a>
|
||||
<a confirm-click="delete()" class="btn btn-danger"><i class="fa fa-trash-o"></i> Delete {{ title }} Object</a>
|
||||
|
@ -32,5 +32,5 @@
|
|||
<button aria-label="Cancel" class="btn btn-primary" ng-click="cancel()">Cancel</button>
|
||||
<button aria-label="Save {{ title }} Object" class="btn btn-success" ng-click="submit()" ng-disabled="objectForm.$invalid || aceInvalidEditors.length !==0">Save {{ title }} Object</button>
|
||||
</div>
|
||||
</kbn-settings-objects-view>
|
||||
</kbn-settings-app>
|
||||
</kbn-management-objects-view>
|
||||
</kbn-management-app>
|
|
@ -1,19 +1,19 @@
|
|||
import _ from 'lodash';
|
||||
import angular from 'angular';
|
||||
import rison from 'rison-node';
|
||||
import registry from 'plugins/kibana/settings/saved_object_registry';
|
||||
import objectViewHTML from 'plugins/kibana/settings/sections/objects/_view.html';
|
||||
import registry from 'plugins/kibana/management/saved_object_registry';
|
||||
import objectViewHTML from 'plugins/kibana/management/sections/objects/_view.html';
|
||||
import IndexPatternsCastMappingTypeProvider from 'ui/index_patterns/_cast_mapping_type';
|
||||
import uiRoutes from 'ui/routes';
|
||||
import uiModules from 'ui/modules';
|
||||
|
||||
uiRoutes
|
||||
.when('/settings/objects/:service/:id', {
|
||||
.when('/management/kibana/objects/:service/:id', {
|
||||
template: objectViewHTML
|
||||
});
|
||||
|
||||
uiModules.get('apps/settings')
|
||||
.directive('kbnSettingsObjectsView', function (kbnIndex, Notifier) {
|
||||
uiModules.get('apps/management')
|
||||
.directive('kbnManagementObjectsView', function (kbnIndex, Notifier) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
controller: function ($scope, $injector, $routeParams, $location, $window, $rootScope, es, Private) {
|
||||
|
@ -210,7 +210,7 @@ uiModules.get('apps/settings')
|
|||
.then(function (resp) {
|
||||
const msg = 'You successfully ' + action + ' the "' + $scope.obj._source.title + '" ' + $scope.title.toLowerCase() + ' object';
|
||||
|
||||
$location.path('/settings/objects').search({
|
||||
$location.path('/management/kibana/objects').search({
|
||||
_a: rison.encode({
|
||||
tab: serviceObj.title
|
||||
})
|
|
@ -0,0 +1,15 @@
|
|||
import management from 'ui/management';
|
||||
import 'plugins/kibana/management/sections/objects/_view';
|
||||
import 'plugins/kibana/management/sections/objects/_objects';
|
||||
import 'ace';
|
||||
import 'ui/directives/confirm_click';
|
||||
import uiModules from 'ui/modules';
|
||||
|
||||
// add the module deps to this module
|
||||
uiModules.get('apps/management');
|
||||
|
||||
management.getSection('kibana').register('objects', {
|
||||
display: 'Saved Objects',
|
||||
order: 10,
|
||||
path: 'kibana/objects'
|
||||
});
|
|
@ -1,9 +1,9 @@
|
|||
import _ from 'lodash';
|
||||
import 'ui/elastic_textarea';
|
||||
import uiModules from 'ui/modules';
|
||||
import advancedRowTemplate from 'plugins/kibana/settings/sections/advanced/advanced_row.html';
|
||||
import advancedRowTemplate from 'plugins/kibana/management/sections/settings/advanced_row.html';
|
||||
|
||||
uiModules.get('apps/settings')
|
||||
uiModules.get('apps/management')
|
||||
.directive('advancedRow', function (config, Notifier) {
|
||||
return {
|
||||
restrict: 'A',
|
|
@ -1,5 +1,5 @@
|
|||
<kbn-settings-app section="advanced">
|
||||
<kbn-settings-advanced class="container">
|
||||
<kbn-management-app section="kibana">
|
||||
<kbn-management-advanced class="container-fluid">
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Caution: You can break stuff here</h4>
|
||||
Be careful in here, these settings are for very advanced users only.
|
||||
|
@ -24,5 +24,5 @@
|
|||
<tr ng-repeat="conf in configs | filter:advancedFilter" advanced-row="conf" configs="configs"></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</kbn-settings-advanced>
|
||||
</kbn-settings-app>
|
||||
</kbn-management-advanced>
|
||||
</kbn-management-app>
|
|
@ -1,18 +1,18 @@
|
|||
import _ from 'lodash';
|
||||
import registry from 'ui/registry/settings_sections';
|
||||
import toEditableConfig from 'plugins/kibana/settings/sections/advanced/lib/to_editable_config';
|
||||
import 'plugins/kibana/settings/sections/advanced/advanced_row';
|
||||
import toEditableConfig from 'plugins/kibana/management/sections/settings/lib/to_editable_config';
|
||||
import 'plugins/kibana/management/sections/settings/advanced_row';
|
||||
import management from 'ui/management';
|
||||
import uiRoutes from 'ui/routes';
|
||||
import uiModules from 'ui/modules';
|
||||
import indexTemplate from 'plugins/kibana/settings/sections/advanced/index.html';
|
||||
import indexTemplate from 'plugins/kibana/management/sections/settings/index.html';
|
||||
|
||||
uiRoutes
|
||||
.when('/settings/advanced', {
|
||||
.when('/management/kibana/settings', {
|
||||
template: indexTemplate
|
||||
});
|
||||
|
||||
uiModules.get('apps/settings')
|
||||
.directive('kbnSettingsAdvanced', function (config, Notifier, Private, $rootScope) {
|
||||
uiModules.get('apps/management')
|
||||
.directive('kbnManagementAdvanced', function (config, Notifier, Private, $rootScope) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
link: function ($scope) {
|
||||
|
@ -39,9 +39,8 @@ uiModules.get('apps/settings')
|
|||
};
|
||||
});
|
||||
|
||||
registry.register(_.constant({
|
||||
order: 2,
|
||||
name: 'advanced',
|
||||
display: 'Advanced',
|
||||
url: '#/settings/advanced'
|
||||
}));
|
||||
management.getSection('kibana').register('settings', {
|
||||
display: 'Advanced Settings',
|
||||
order: 20,
|
||||
path: 'kibana/settings'
|
||||
});
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
import getEditorType from 'plugins/kibana/settings/sections/advanced/lib/get_editor_type';
|
||||
import getEditorType from 'plugins/kibana/management/sections/settings/lib/get_editor_type';
|
||||
import expect from 'expect.js';
|
||||
|
||||
describe('Settings', function () {
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
import getValType from 'plugins/kibana/settings/sections/advanced/lib/get_val_type';
|
||||
import getValType from 'plugins/kibana/management/sections/settings/lib/get_val_type';
|
||||
import expect from 'expect.js';
|
||||
|
||||
describe('Settings', function () {
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
import toEditableConfig from 'plugins/kibana/settings/sections/advanced/lib/to_editable_config';
|
||||
import toEditableConfig from 'plugins/kibana/management/sections/settings/lib/to_editable_config';
|
||||
import expect from 'expect.js';
|
||||
|
||||
describe('Settings', function () {
|
|
@ -1,13 +1,14 @@
|
|||
@import (reference) "~ui/styles/theme";
|
||||
@import (reference) "~ui/styles/variables";
|
||||
|
||||
kibana-settings-app,
|
||||
kbn-settings-indices,
|
||||
kbn-settings-indices-edit,
|
||||
kbn-settings-indices-create,
|
||||
kbn-settings-advanced,
|
||||
kbn-settings-objects,
|
||||
kbn-settings-objects-view {
|
||||
kbn-management-app,
|
||||
kbn-management-landing,
|
||||
kbn-management-indices,
|
||||
kbn-management-indices-edit,
|
||||
kbn-management-indices-create,
|
||||
kbn-management-advanced,
|
||||
kbn-management-objects,
|
||||
kbn-management-objects-view {
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
@ -15,41 +16,110 @@ nav.navbar {
|
|||
height: 70px;
|
||||
}
|
||||
|
||||
.tab-management {
|
||||
background-color: @kibanaGray6;
|
||||
}
|
||||
|
||||
.settings-nav {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
li.kbn-settings-tab:first-letter {
|
||||
li.kbn-management-tab:first-letter {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
kbn-settings-app {
|
||||
div.app-container {
|
||||
div.container-fluid {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
kbn-management-app {
|
||||
bread-crumbs ul {
|
||||
height: 36px;
|
||||
}
|
||||
|
||||
li.current-page {
|
||||
font-size: 1.5em;
|
||||
margin: 0 10px;
|
||||
}
|
||||
}
|
||||
|
||||
kbn-settings-objects {
|
||||
kbn-management-landing {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.management-panel-product {
|
||||
margin-bottom: 10px;
|
||||
|
||||
.panel-body {
|
||||
padding-bottom: 30px;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
.management-section {
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.management-link {
|
||||
font-size: 17px;
|
||||
line-height: 32px;
|
||||
}
|
||||
|
||||
.panel-heading-icon {
|
||||
font-size: 0.9em;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.product-overview {
|
||||
color: @kibanaGray2;
|
||||
padding: 5px 0 10px 10px;
|
||||
}
|
||||
|
||||
.management-section-info {
|
||||
bottom: 10px;
|
||||
display: none;
|
||||
color: @kibanaPink1;
|
||||
font-size: 0.8em;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.management-section-info-expanded {
|
||||
.panel-heading-icon {
|
||||
color: @black;
|
||||
}
|
||||
|
||||
.management-section-info {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
kbn-management-objects {
|
||||
form {
|
||||
margin-bottom: @line-height-computed;
|
||||
}
|
||||
.list-unstyled {
|
||||
li {
|
||||
border-bottom: 1px solid;
|
||||
border-bottom-color: @settings-objects-list-border;
|
||||
border-bottom-color: @management-objects-list-border;
|
||||
padding: 8px;
|
||||
}
|
||||
}
|
||||
.empty {
|
||||
color: @settings-objects-empty-color;
|
||||
color: @management-objects-empty-color;
|
||||
}
|
||||
|
||||
.item {
|
||||
padding: 12px;
|
||||
|
||||
.item-title {
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
.actions {
|
||||
margin-top: -6px;
|
||||
}
|
||||
}
|
||||
|
||||
.action-bar {
|
||||
margin-top: 10px;
|
||||
background-color: @settings-objects-action-bar-bg;
|
||||
background-color: @management-objects-action-bar-bg;
|
||||
padding: 4px 12px;
|
||||
|
||||
label {
|
||||
|
@ -71,7 +141,7 @@ kbn-settings-objects {
|
|||
}
|
||||
}
|
||||
|
||||
kbn-settings-advanced {
|
||||
kbn-management-advanced {
|
||||
// super specific rule to override bootstrap's equally specific rule
|
||||
// https://github.com/twbs/bootstrap/blob/1f329f8f17aa989eabc6e94bdcab93e69ef0e463/less/tables.less#L35
|
||||
.table > tbody > tr > td {
|
||||
|
@ -79,32 +149,13 @@ kbn-settings-advanced {
|
|||
}
|
||||
}
|
||||
|
||||
kbn-settings-objects-view {
|
||||
kbn-management-objects-view {
|
||||
label {
|
||||
font-family: @font-family-monospace;
|
||||
}
|
||||
.ace_editor { height: 300px; }
|
||||
}
|
||||
|
||||
.kbn-settings-about {
|
||||
margin-top: 30px;
|
||||
|
||||
.jumbotron h1 {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
&-versions {
|
||||
td {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
td:first-child {
|
||||
font-weight: bold;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.advanced-settings {
|
||||
overflow-x: scroll;
|
||||
|
||||
|
@ -112,7 +163,7 @@ kbn-settings-objects-view {
|
|||
width: 100%;
|
||||
|
||||
tr.default td.value {
|
||||
color: @settings-advanced-table-default-color;
|
||||
color: @management-advanced-table-default-color;
|
||||
}
|
||||
|
||||
td {
|
||||
|
@ -125,23 +176,9 @@ kbn-settings-objects-view {
|
|||
}
|
||||
}
|
||||
|
||||
.objects-settings {
|
||||
.item {
|
||||
padding: 12px;
|
||||
|
||||
.item-title {
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
.actions {
|
||||
margin-top: -6px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.indices-settings {
|
||||
i.active {
|
||||
color: @settings-indices-active-color;
|
||||
color: @management-indices-active-color;
|
||||
}
|
||||
|
||||
tr.field-settings {
|
||||
|
@ -168,7 +205,7 @@ kbn-settings-objects-view {
|
|||
}
|
||||
}
|
||||
|
||||
kbn-settings-indices {
|
||||
kbn-management-indices {
|
||||
.fields {
|
||||
table {
|
||||
.table-striped()
|
||||
|
@ -195,6 +232,7 @@ kbn-settings-indices {
|
|||
p.text-center {
|
||||
padding-top: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-buttons {
|
||||
float:right;
|
|
@ -1,18 +0,0 @@
|
|||
<div class="app-container">
|
||||
<nav class="navbar navbar-default navbar-static-top subnav" data-test-subj="settingsNav">
|
||||
<div class="container-fluid">
|
||||
<bread-crumbs></bread-crumbs>
|
||||
<ul ng-hide="!section" class="nav navbar-nav">
|
||||
<li ng-repeat="section in sections" ng-class="section.class">
|
||||
<a class="navbar-link" kbn-href="{{section.url}}" data-test-subj="{{section.name}}">{{section.display}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div ng-hide="section" class="nav navbar-nav">
|
||||
<span class="navbar-link">{{ sectionName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div role="main" class="settings-section-container {{section.name}}-settings" ng-transclude></div>
|
||||
</div>
|
|
@ -1,53 +0,0 @@
|
|||
import _ from 'lodash';
|
||||
import 'plugins/kibana/settings/sections/indices/index';
|
||||
import 'plugins/kibana/settings/sections/advanced/index';
|
||||
import 'plugins/kibana/settings/sections/objects/index';
|
||||
import 'plugins/kibana/settings/sections/status/index';
|
||||
import 'plugins/kibana/settings/sections/about/index';
|
||||
import 'plugins/kibana/settings/styles/main.less';
|
||||
import 'ui/filters/start_from';
|
||||
import 'ui/field_editor';
|
||||
import 'plugins/kibana/settings/sections/indices/_indexed_fields';
|
||||
import 'plugins/kibana/settings/sections/indices/_scripted_fields';
|
||||
import 'ui/directives/bread_crumbs';
|
||||
import registry from 'ui/registry/settings_sections';
|
||||
import uiRoutes from 'ui/routes';
|
||||
import uiModules from 'ui/modules';
|
||||
import appTemplate from 'plugins/kibana/settings/app.html';
|
||||
|
||||
|
||||
uiRoutes
|
||||
.when('/settings', {
|
||||
redirectTo: '/settings/indices'
|
||||
});
|
||||
|
||||
require('ui/index_patterns/route_setup/load_default')({
|
||||
notRequiredRe: /^\/settings\//,
|
||||
whenMissingRedirectTo: '/settings/indices'
|
||||
});
|
||||
|
||||
uiModules
|
||||
.get('apps/settings')
|
||||
.directive('kbnSettingsApp', function (Private, $route, timefilter) {
|
||||
const sections = Private(registry);
|
||||
|
||||
return {
|
||||
restrict: 'E',
|
||||
template: appTemplate,
|
||||
transclude: true,
|
||||
scope: {
|
||||
sectionName: '@section'
|
||||
},
|
||||
link: function ($scope, $el) {
|
||||
timefilter.enabled = false;
|
||||
$scope.sections = sections.inOrder;
|
||||
$scope.section = _.find($scope.sections, { name: $scope.sectionName });
|
||||
|
||||
$scope.sections.forEach(section => {
|
||||
section.class = section === $scope.section ? 'active' : undefined;
|
||||
});
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
// preload
|
|
@ -1,454 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="64"
|
||||
height="64"
|
||||
id="svg5235"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
viewBox="0 0 64 64"
|
||||
sodipodi:docname="barcode.svg">
|
||||
<defs
|
||||
id="defs5237" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.5"
|
||||
inkscape:cx="4.3636364"
|
||||
inkscape:cy="32"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:window-width="2880"
|
||||
inkscape:window-height="1140"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="23"
|
||||
inkscape:window-maximized="0" />
|
||||
<metadata
|
||||
id="metadata5240">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer">
|
||||
<g
|
||||
id="g4300"
|
||||
transform="matrix(1.1002186,0,0,1.1002186,-3.2119331,-3.0092752)">
|
||||
<g
|
||||
transform="matrix(0.57440105,0,0,0.57440105,-36.987859,-56.970747)"
|
||||
id="g6209">
|
||||
<rect
|
||||
style="opacity:1;fill:#39bdb1;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect5251-3"
|
||||
width="2.4159346"
|
||||
height="100.54836"
|
||||
x="97.825981"
|
||||
y="104.33428" />
|
||||
<rect
|
||||
style="opacity:1;fill:#ea458b;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect5251-9"
|
||||
width="7.5297971"
|
||||
height="100.54836"
|
||||
x="85.735123"
|
||||
y="104.33428" />
|
||||
<rect
|
||||
style="opacity:1;fill:#f3bb19;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect5251-8"
|
||||
width="5.0022545"
|
||||
height="100.54836"
|
||||
x="75.889793"
|
||||
y="104.33428" />
|
||||
<rect
|
||||
style="opacity:1;fill:#2d448e;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect5251-2"
|
||||
width="3.2287681"
|
||||
height="100.54836"
|
||||
x="72.783882"
|
||||
y="104.33428" />
|
||||
<rect
|
||||
style="opacity:1;fill:#83cb1c;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect5251"
|
||||
width="3.159905"
|
||||
height="100.54836"
|
||||
x="69.63768"
|
||||
y="104.33428" />
|
||||
<rect
|
||||
style="opacity:1;fill:#ea458b;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect5251-9-9"
|
||||
width="6.9419966"
|
||||
height="100.54836"
|
||||
x="119.37186"
|
||||
y="104.33428" />
|
||||
<rect
|
||||
style="opacity:1;fill:#006555;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect5251-5-9"
|
||||
width="4.9434743"
|
||||
height="100.54836"
|
||||
x="131.24544"
|
||||
y="104.33428" />
|
||||
<rect
|
||||
style="opacity:1;fill:#006555;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect5251-5-0"
|
||||
width="1.8869137"
|
||||
height="100.54836"
|
||||
x="83.986267"
|
||||
y="104.33428" />
|
||||
<rect
|
||||
style="opacity:1;fill:#83cb1c;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect5251-7"
|
||||
width="4.7083545"
|
||||
height="100.54836"
|
||||
x="93.214729"
|
||||
y="104.33428" />
|
||||
<rect
|
||||
style="opacity:1;fill:#83cb1c;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect5251-36"
|
||||
width="5.8251753"
|
||||
height="100.54836"
|
||||
x="136.24173"
|
||||
y="104.33428" />
|
||||
<rect
|
||||
style="opacity:1;fill:#39bdb1;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect5251-3-7"
|
||||
width="3.1212945"
|
||||
height="100.54836"
|
||||
x="80.870918"
|
||||
y="104.33428" />
|
||||
<rect
|
||||
style="opacity:1;fill:#ea458b;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect5251-9-9-3"
|
||||
width="3.5915353"
|
||||
height="100.54836"
|
||||
x="100.15076"
|
||||
y="104.33428" />
|
||||
<rect
|
||||
style="opacity:1;fill:#ea458b;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect5251-9-9-8"
|
||||
width="3.9442151"
|
||||
height="100.54836"
|
||||
x="166.68982"
|
||||
y="104.33428" />
|
||||
<rect
|
||||
style="opacity:1;fill:#39bdb1;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect5251-3-3"
|
||||
width="3.3564136"
|
||||
height="100.54836"
|
||||
x="110.55486"
|
||||
y="104.33428" />
|
||||
<rect
|
||||
style="opacity:1;fill:#39bdb1;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect5251-3-0"
|
||||
width="4.1793332"
|
||||
height="100.54836"
|
||||
x="148.82066"
|
||||
y="104.33429" />
|
||||
<rect
|
||||
style="opacity:1;fill:#f3bb19;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect5251-8-3"
|
||||
width="2.1808138"
|
||||
height="100.54838"
|
||||
x="129.07057"
|
||||
y="104.33427" />
|
||||
<rect
|
||||
style="opacity:1;fill:#f3bb19;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect5251-8-33"
|
||||
width="3.0037344"
|
||||
height="100.54836"
|
||||
x="142.00218"
|
||||
y="104.33428" />
|
||||
<rect
|
||||
style="opacity:1;fill:#83cb1c;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect5251-7-3"
|
||||
width="4.3556747"
|
||||
height="100.54836"
|
||||
x="106.20512"
|
||||
y="104.33428" />
|
||||
<rect
|
||||
style="opacity:1;fill:#2d448e;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect5251-2-0"
|
||||
width="2.4159336"
|
||||
height="100.54836"
|
||||
x="103.73636"
|
||||
y="104.33428" />
|
||||
<rect
|
||||
style="opacity:1;fill:#83cb1c;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect5251-36-7"
|
||||
width="3.8266549"
|
||||
height="100.54836"
|
||||
x="116.25652"
|
||||
y="104.33428" />
|
||||
<rect
|
||||
style="opacity:1;fill:#006555;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect5251-5-3"
|
||||
width="2.2983737"
|
||||
height="100.54838"
|
||||
x="113.9641"
|
||||
y="104.33427" />
|
||||
<rect
|
||||
style="opacity:1;fill:#39bdb1;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect5251-3-7-7"
|
||||
width="2.8273947"
|
||||
height="100.54836"
|
||||
x="126.30791"
|
||||
y="104.33428" />
|
||||
<rect
|
||||
style="opacity:1;fill:#39bdb1;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect5251-3-7-70"
|
||||
width="2.0632553"
|
||||
height="100.54836"
|
||||
x="144.8824"
|
||||
y="104.33428" />
|
||||
<rect
|
||||
style="opacity:1;fill:#ea458b;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect5251-9-9-8-4"
|
||||
width="1.8869162"
|
||||
height="100.54836"
|
||||
x="146.99847"
|
||||
y="104.33428" />
|
||||
<rect
|
||||
style="opacity:1;fill:#39bdb1;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect5251-3-7-70-2"
|
||||
width="4.708354"
|
||||
height="100.54836"
|
||||
x="158.32114"
|
||||
y="104.33428" />
|
||||
<rect
|
||||
style="opacity:1;fill:#f3bb19;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect5251-8-339-2"
|
||||
width="5.413713"
|
||||
height="100.54838"
|
||||
x="152.97215"
|
||||
y="104.33427" />
|
||||
<rect
|
||||
style="opacity:1;fill:#83cb1c;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect5251-36-5"
|
||||
width="3.8266544"
|
||||
height="100.54836"
|
||||
x="162.99417"
|
||||
y="104.33428" />
|
||||
</g>
|
||||
<g
|
||||
transform="matrix(0.57440105,0,0,1.9251702,3.0622581,2.9589583)"
|
||||
id="g4544">
|
||||
<line
|
||||
style="fill:none;stroke:#000000;stroke-width:2"
|
||||
x1="1"
|
||||
y1="0"
|
||||
x2="1"
|
||||
y2="30"
|
||||
id="line4450" />
|
||||
<line
|
||||
style="fill:none;stroke:#000000;stroke-width:1"
|
||||
x1="3.5"
|
||||
y1="0"
|
||||
x2="3.5"
|
||||
y2="30"
|
||||
id="line4452" />
|
||||
<line
|
||||
style="fill:none;stroke:#000000;stroke-width:1"
|
||||
x1="6.5"
|
||||
y1="0"
|
||||
x2="6.5"
|
||||
y2="30"
|
||||
id="line4454" />
|
||||
<line
|
||||
style="fill:none;stroke:#000000;stroke-width:1"
|
||||
x1="11.5"
|
||||
y1="0"
|
||||
x2="11.5"
|
||||
y2="30"
|
||||
id="line4456" />
|
||||
<line
|
||||
style="fill:none;stroke:#000000;stroke-width:1"
|
||||
x1="14.5"
|
||||
y1="0"
|
||||
x2="14.5"
|
||||
y2="30"
|
||||
id="line4458" />
|
||||
<line
|
||||
style="fill:none;stroke:#000000;stroke-width:2"
|
||||
x1="17"
|
||||
y1="0"
|
||||
x2="17"
|
||||
y2="30"
|
||||
id="line4460" />
|
||||
<line
|
||||
style="fill:none;stroke:#000000;stroke-width:2"
|
||||
x1="23"
|
||||
y1="0"
|
||||
x2="23"
|
||||
y2="30"
|
||||
id="line4462" />
|
||||
<line
|
||||
style="fill:none;stroke:#000000;stroke-width:1"
|
||||
x1="28.5"
|
||||
y1="0"
|
||||
x2="28.5"
|
||||
y2="30"
|
||||
id="line4464" />
|
||||
<line
|
||||
style="fill:none;stroke:#000000;stroke-width:1"
|
||||
x1="30.5"
|
||||
y1="0"
|
||||
x2="30.5"
|
||||
y2="30"
|
||||
id="line4466" />
|
||||
<line
|
||||
style="fill:none;stroke:#000000;stroke-width:2"
|
||||
x1="34"
|
||||
y1="0"
|
||||
x2="34"
|
||||
y2="30"
|
||||
id="line4468" />
|
||||
<line
|
||||
style="fill:none;stroke:#000000;stroke-width:2"
|
||||
x1="37"
|
||||
y1="0"
|
||||
x2="37"
|
||||
y2="30"
|
||||
id="line4470" />
|
||||
<line
|
||||
style="fill:none;stroke:#000000;stroke-width:2"
|
||||
x1="41"
|
||||
y1="0"
|
||||
x2="41"
|
||||
y2="30"
|
||||
id="line4472" />
|
||||
<line
|
||||
style="fill:none;stroke:#000000;stroke-width:1"
|
||||
x1="44.5"
|
||||
y1="0"
|
||||
x2="44.5"
|
||||
y2="30"
|
||||
id="line4474" />
|
||||
<line
|
||||
style="fill:none;stroke:#000000;stroke-width:2"
|
||||
x1="47"
|
||||
y1="0"
|
||||
x2="47"
|
||||
y2="30"
|
||||
id="line4476" />
|
||||
<line
|
||||
style="fill:none;stroke:#000000;stroke-width:1"
|
||||
x1="50.5"
|
||||
y1="0"
|
||||
x2="50.5"
|
||||
y2="30"
|
||||
id="line4478" />
|
||||
<line
|
||||
style="fill:none;stroke:#000000;stroke-width:2"
|
||||
x1="56"
|
||||
y1="0"
|
||||
x2="56"
|
||||
y2="30"
|
||||
id="line4480" />
|
||||
<line
|
||||
style="fill:none;stroke:#000000;stroke-width:1"
|
||||
x1="59.5"
|
||||
y1="0"
|
||||
x2="59.5"
|
||||
y2="30"
|
||||
id="line4482" />
|
||||
<line
|
||||
style="fill:none;stroke:#000000;stroke-width:1"
|
||||
x1="61.5"
|
||||
y1="0"
|
||||
x2="61.5"
|
||||
y2="30"
|
||||
id="line4484" />
|
||||
<line
|
||||
style="fill:none;stroke:#000000;stroke-width:2"
|
||||
x1="67"
|
||||
y1="0"
|
||||
x2="67"
|
||||
y2="30"
|
||||
id="line4486" />
|
||||
<line
|
||||
style="fill:none;stroke:#000000;stroke-width:1"
|
||||
x1="72.5"
|
||||
y1="0"
|
||||
x2="72.5"
|
||||
y2="30"
|
||||
id="line4488" />
|
||||
<line
|
||||
style="fill:none;stroke:#000000;stroke-width:1"
|
||||
x1="75.5"
|
||||
y1="0"
|
||||
x2="75.5"
|
||||
y2="30"
|
||||
id="line4490" />
|
||||
<line
|
||||
style="fill:none;stroke:#000000;stroke-width:1"
|
||||
x1="77.5"
|
||||
y1="0"
|
||||
x2="77.5"
|
||||
y2="30"
|
||||
id="line4492" />
|
||||
<line
|
||||
style="fill:none;stroke:#000000;stroke-width:1"
|
||||
x1="79.5"
|
||||
y1="0"
|
||||
x2="79.5"
|
||||
y2="30"
|
||||
id="line4494" />
|
||||
<line
|
||||
style="fill:none;stroke:#000000;stroke-width:4"
|
||||
x1="83"
|
||||
y1="0"
|
||||
x2="83"
|
||||
y2="30"
|
||||
id="line4496" />
|
||||
<line
|
||||
style="fill:none;stroke:#000000;stroke-width:2"
|
||||
x1="89"
|
||||
y1="0"
|
||||
x2="89"
|
||||
y2="30"
|
||||
id="line4498" />
|
||||
<line
|
||||
style="fill:none;stroke:#000000;stroke-width:3"
|
||||
x1="94.5"
|
||||
y1="0"
|
||||
x2="94.5"
|
||||
y2="30"
|
||||
id="line4500" />
|
||||
<line
|
||||
style="fill:none;stroke:#000000;stroke-width:1"
|
||||
x1="97.5"
|
||||
y1="0"
|
||||
x2="97.5"
|
||||
y2="30"
|
||||
id="line4502" />
|
||||
<line
|
||||
style="fill:none;stroke:#000000;stroke-width:2"
|
||||
x1="100"
|
||||
y1="0"
|
||||
x2="100"
|
||||
y2="30"
|
||||
id="line4504" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 16 KiB |
|
@ -1,35 +0,0 @@
|
|||
<kbn-settings-app section="about">
|
||||
<div class="kbn-settings-about container" ng-controller="settingsAbout">
|
||||
<div class="col-md-4 col-md-offset-4 jumbotron">
|
||||
<center>
|
||||
<img kbn-src="/plugins/kibana/settings/sections/about/barcode.svg" alt="Kibana Barcode Logo" width="128" height="128"><br>
|
||||
<h1>Kibana</h1>
|
||||
<p>
|
||||
<table class="table table-condensed kbn-settings-about-versions">
|
||||
<tr>
|
||||
<td>Version</td>
|
||||
<td>{{kbnVersion}}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Build</td>
|
||||
<td>{{buildNum}}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Commit SHA</td>
|
||||
<td>{{buildSha | limitTo:7}}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Server name</td>
|
||||
<td>{{serverName}}</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</p>
|
||||
<small>© 2015 All Rights Reserved - <a href="https://elastic.co">Elasticsearch</a></small>
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
</kbn-settings-app>
|
|
@ -1,25 +0,0 @@
|
|||
import _ from 'lodash';
|
||||
import registry from 'ui/registry/settings_sections';
|
||||
import uiRoutes from 'ui/routes';
|
||||
import uiModules from 'ui/modules';
|
||||
import indexTemplate from 'plugins/kibana/settings/sections/about/index.html';
|
||||
|
||||
uiRoutes
|
||||
.when('/settings/about', {
|
||||
template: indexTemplate
|
||||
});
|
||||
|
||||
uiModules.get('apps/settings')
|
||||
.controller('settingsAbout', function ($scope, kbnVersion, buildNum, buildSha, serverName) {
|
||||
$scope.kbnVersion = kbnVersion;
|
||||
$scope.buildNum = buildNum;
|
||||
$scope.buildSha = buildSha;
|
||||
$scope.serverName = serverName;
|
||||
});
|
||||
|
||||
registry.register(_.constant({
|
||||
order: 1001,
|
||||
name: 'about',
|
||||
display: 'About',
|
||||
url: '#/settings/about'
|
||||
}));
|
|
@ -1,25 +0,0 @@
|
|||
<kbn-settings-app section="indices">
|
||||
<kbn-settings-indices>
|
||||
<div data-test-subj="addData">
|
||||
<div class="page-header">
|
||||
<h1>Add Data</h1>
|
||||
Before we can get to the fun stuff, we'll have to get some data into your Elasticsearch cluster.
|
||||
Pick the option that best suits your use case below, and we'll guide you through the process!
|
||||
</div>
|
||||
|
||||
<h4>
|
||||
<a href="#/settings/indices/create/existing" data-test-subj="existingIndices">Existing Indices</a>
|
||||
</h4>
|
||||
<div>
|
||||
Pick this option if you already have data in Elasticsearch.
|
||||
</div>
|
||||
|
||||
<h4>
|
||||
<a href="#/settings/indices/create/upload">Upload</a>
|
||||
</h4>
|
||||
<div>
|
||||
Got CSVs? Upload them here. No pain, all gain.
|
||||
</div>
|
||||
</div>
|
||||
</kbn-settings-indices>
|
||||
</kbn-settings-app>
|
|
@ -1,33 +0,0 @@
|
|||
import _ from 'lodash';
|
||||
import registry from 'ui/registry/settings_sections';
|
||||
import 'plugins/kibana/settings/sections/indices/directives/kbn_settings_indices';
|
||||
import 'plugins/kibana/settings/sections/indices/_create';
|
||||
import 'plugins/kibana/settings/sections/indices/_edit';
|
||||
import 'plugins/kibana/settings/sections/indices/_field_editor';
|
||||
import 'plugins/kibana/settings/sections/indices/filebeat/index';
|
||||
import 'plugins/kibana/settings/sections/indices/upload/index';
|
||||
import uiRoutes from 'ui/routes';
|
||||
import uiModules from 'ui/modules';
|
||||
import indexTemplate from 'plugins/kibana/settings/sections/indices/index.html';
|
||||
|
||||
|
||||
// add a dependency to all of the subsection routes
|
||||
uiRoutes
|
||||
.defaults(/settings\/indices/, {
|
||||
resolve: {
|
||||
indexPatternIds: function (courier) {
|
||||
return courier.indexPatterns.getIds();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
uiRoutes.when('/settings/indices', {
|
||||
template: indexTemplate
|
||||
});
|
||||
|
||||
registry.register(_.constant({
|
||||
order: 1,
|
||||
name: 'indices',
|
||||
display: 'Indices',
|
||||
url: '#/settings/indices'
|
||||
}));
|
|
@ -1,18 +0,0 @@
|
|||
import _ from 'lodash';
|
||||
import registry from 'ui/registry/settings_sections';
|
||||
import 'plugins/kibana/settings/sections/objects/_view';
|
||||
import 'plugins/kibana/settings/sections/objects/_objects';
|
||||
import 'ace';
|
||||
import 'ui/directives/confirm_click';
|
||||
import uiModules from 'ui/modules';
|
||||
|
||||
|
||||
// add the module deps to this module
|
||||
uiModules.get('apps/settings');
|
||||
|
||||
registry.register(_.constant({
|
||||
order: 3,
|
||||
name: 'objects',
|
||||
display: 'Objects',
|
||||
url: '#/settings/objects'
|
||||
}));
|
|
@ -1,9 +0,0 @@
|
|||
import _ from 'lodash';
|
||||
import registry from 'ui/registry/settings_sections';
|
||||
|
||||
registry.register(_.constant({
|
||||
order: 1000,
|
||||
name: 'status',
|
||||
display: 'Status',
|
||||
url: '/status'
|
||||
}));
|
|
@ -43,9 +43,9 @@ uiRoutes
|
|||
return savedVisualizations.get($route.current.params.id)
|
||||
.catch(courier.redirectWhenMissing({
|
||||
'visualization': '/visualize',
|
||||
'search': '/settings/objects/savedVisualizations/' + $route.current.params.id,
|
||||
'index-pattern': '/settings/objects/savedVisualizations/' + $route.current.params.id,
|
||||
'index-pattern-field': '/settings/objects/savedVisualizations/' + $route.current.params.id
|
||||
'search': '/management/kibana/objects/savedVisualizations/' + $route.current.params.id,
|
||||
'index-pattern': '/management/kibana/objects/savedVisualizations/' + $route.current.params.id,
|
||||
'index-pattern-field': '/management/kibana/objects/savedVisualizations/' + $route.current.params.id
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ const app = uiModules.get('app/visualize');
|
|||
|
||||
// Register this service with the saved object registry so it can be
|
||||
// edited by the object editor.
|
||||
require('plugins/kibana/settings/saved_object_registry').register({
|
||||
require('plugins/kibana/management/saved_object_registry').register({
|
||||
service: 'savedVisualizations',
|
||||
title: 'visualizations'
|
||||
});
|
||||
|
@ -70,7 +70,7 @@ app.service('savedVisualizations', function (Promise, es, kbnIndex, SavedVis, Pr
|
|||
if (!typeName || !visTypes.byName[typeName]) {
|
||||
if (!typeName) notify.error('Visualization type is missing. Please add a type to this visualization.', hit);
|
||||
else notify.error('Visualization type of "' + typeName + '" is invalid. Please change to a valid type.', hit);
|
||||
return kbnUrl.redirect('/settings/objects/savedVisualizations/{{id}}', {id: source.id});
|
||||
return kbnUrl.redirect('/management/kibana/objects/savedVisualizations/{{id}}', {id: source.id});
|
||||
}
|
||||
|
||||
source.type = visTypes.byName[typeName];
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<div class="container state_default state_{{ui.serverState}}">
|
||||
<div class="container overall_state_default overall_state_{{ui.serverState}}">
|
||||
<header>
|
||||
<h1>
|
||||
Status: <span class="state_color">{{ ui.serverStateMessage }}</span>
|
||||
<i class="fa state_color state_icon" />
|
||||
Status: <span class="overall_state_color">{{ ui.serverStateMessage }}</span>
|
||||
<i class="fa overall_state_color state_icon" />
|
||||
<span class="pull-right">
|
||||
{{ ui.name }}
|
||||
</span>
|
||||
|
@ -15,27 +15,29 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row plugin_status_wrapper">
|
||||
<h3>Installed Plugins</h3>
|
||||
<div ng-if="!ui.statuses && ui.loading" class="loading_statuses">
|
||||
<div class="row statuses_wrapper">
|
||||
<h3>Status Breakdown</h3>
|
||||
|
||||
<div ng-if="!ui.statuses && ui.loading" class="statuses_loading">
|
||||
<span class="spinner"></span>
|
||||
</div>
|
||||
|
||||
<h4 ng-if="!ui.statuses && !ui.loading" class="missing_statuses">
|
||||
No plugin status information available
|
||||
<h4 ng-if="!ui.statuses && !ui.loading" class="statuses_missing">
|
||||
No status information available
|
||||
</h4>
|
||||
|
||||
<table class="plugin_status_breakdown" ng-if="ui.statuses">
|
||||
<table class="statuses" data-test-subj="statusBreakdown" ng-if="ui.statuses">
|
||||
<tr class="row">
|
||||
<th class="col-xs-2">Name</th>
|
||||
<th class="col-xs-2">Version</th>
|
||||
<th class="col-xs-4">ID</th>
|
||||
<th class="col-xs-8">Status</th>
|
||||
</tr>
|
||||
<tr ng-repeat="status in ui.statuses" class="status_row plugin_state_default plugin_state_{{status.state}} row">
|
||||
<td class="col-xs-2 status_name">{{status.name}}</td>
|
||||
<td class="col-xs-2 status_version">{{status.version}}</td>
|
||||
<tr
|
||||
ng-repeat="status in ui.statuses"
|
||||
class="status status_state_default status_state_{{status.state}} row">
|
||||
|
||||
<td class="col-xs-4 status_id">{{status.id}}</td>
|
||||
<td class="col-xs-8 status_message">
|
||||
<i class="fa plugin_state_color plugin_state_icon" />
|
||||
<i class="fa status_state_color status_state_icon" />
|
||||
{{status.message}}
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -28,9 +28,10 @@ const chrome = require('ui/chrome')
|
|||
|
||||
const data = resp.data;
|
||||
ui.metrics = data.metrics;
|
||||
ui.statuses = data.status.statuses;
|
||||
ui.name = data.name;
|
||||
|
||||
ui.statuses = data.status.statuses;
|
||||
|
||||
const overall = data.status.overall;
|
||||
if (!ui.serverState || (ui.serverState !== overall.state)) {
|
||||
ui.serverState = overall.state;
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
@status-metric-border: #aaa;
|
||||
@status-metric-title-color: #666;
|
||||
|
||||
@status-plugins-bg: #fff;
|
||||
@status-plugins-border: #bbb;
|
||||
@status-plugins-headings-color: #666;
|
||||
@status-statuses-bg: #fff;
|
||||
@status-statuses-border: #bbb;
|
||||
@status-statuses-headings-color: #666;
|
||||
|
||||
@status-default: #7c7c7c;
|
||||
@status-green: #94c63d;
|
||||
|
@ -58,13 +58,13 @@
|
|||
}
|
||||
}
|
||||
|
||||
// plugin status table section
|
||||
.plugin_status_wrapper {
|
||||
// status status table section
|
||||
.statuses_wrapper {
|
||||
margin-top: 25px;
|
||||
margin-left: -5px;
|
||||
margin-right: -5px;
|
||||
border-top:2px solid;
|
||||
background-color: @status-plugins-bg;
|
||||
background-color: @status-statuses-bg;
|
||||
padding: 10px;
|
||||
|
||||
h3 {
|
||||
|
@ -72,33 +72,34 @@
|
|||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
.missing_statuses,
|
||||
.loading_statuses {
|
||||
.statuses_loading,
|
||||
.statuses_missing {
|
||||
padding: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.plugin_status_breakdown {
|
||||
.statuses {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
margin-bottom: 30px;
|
||||
|
||||
.status_row {
|
||||
.status {
|
||||
height:30px;
|
||||
line-height:30px;
|
||||
border-bottom:1px solid;
|
||||
border-bottom-color: @status-plugins-border;
|
||||
border-bottom-color: @status-statuses-border;
|
||||
}
|
||||
|
||||
th {
|
||||
color:@status-plugins-headings-color;
|
||||
color:@status-statuses-headings-color;
|
||||
font-weight: normal;
|
||||
height:25px;
|
||||
line-height:25px;
|
||||
border-bottom:1px solid;
|
||||
border-bottom-color: @status-plugins-border;
|
||||
border-bottom-color: @status-statuses-border;
|
||||
}
|
||||
|
||||
.status_name {
|
||||
.status_id {
|
||||
padding:0px 5px;
|
||||
border-left: 2px solid;
|
||||
}
|
||||
|
@ -111,17 +112,17 @@
|
|||
}
|
||||
}
|
||||
|
||||
//plugin state
|
||||
.plugin_state(@color, @icon) {
|
||||
.plugin_state_color {
|
||||
//status state
|
||||
.status_state(@color, @icon) {
|
||||
.status_state_color {
|
||||
color: @color;
|
||||
}
|
||||
|
||||
.plugin_state_icon:before {
|
||||
.status_state_icon:before {
|
||||
content: @icon;
|
||||
}
|
||||
|
||||
.status_name {
|
||||
.status_id {
|
||||
border-left-color: @color !important;
|
||||
}
|
||||
|
||||
|
@ -130,49 +131,49 @@
|
|||
}
|
||||
}
|
||||
|
||||
.plugin_state_default {
|
||||
.plugin_state(@status-default, @icon-default);
|
||||
.status_state_default {
|
||||
.status_state(@status-default, @icon-default);
|
||||
}
|
||||
|
||||
.plugin_state_green {
|
||||
.plugin_state(@status-green, @icon-green);
|
||||
.status_state_green {
|
||||
.status_state(@status-green, @icon-green);
|
||||
}
|
||||
|
||||
.plugin_state_yellow {
|
||||
.plugin_state(@status-yellow, @icon-yellow);
|
||||
.status_state_yellow {
|
||||
.status_state(@status-yellow, @icon-yellow);
|
||||
}
|
||||
|
||||
.plugin_state_red {
|
||||
.plugin_state(@status-red, @icon-red);
|
||||
.status_state_red {
|
||||
.status_state(@status-red, @icon-red);
|
||||
}
|
||||
|
||||
//server state
|
||||
.state(@color, @icon) {
|
||||
.state_color {
|
||||
.overall_state_color {
|
||||
color: @color;
|
||||
}
|
||||
|
||||
.state_icon:before {
|
||||
.overall_state_icon:before {
|
||||
content: @icon;
|
||||
}
|
||||
|
||||
.plugin_status_wrapper {
|
||||
.statuses_wrapper {
|
||||
border-top-color: @color;
|
||||
}
|
||||
}
|
||||
|
||||
.state_default {
|
||||
.overall_state_default {
|
||||
.state(@status-default, @icon-default);
|
||||
}
|
||||
|
||||
.state_green {
|
||||
.overall_state_green {
|
||||
.state(@status-green, @icon-green);
|
||||
}
|
||||
|
||||
.state_yellow {
|
||||
.overall_state_yellow {
|
||||
.state(@status-yellow, @icon-yellow);
|
||||
}
|
||||
|
||||
.state_red {
|
||||
.overall_state_red {
|
||||
.state(@status-red, @icon-red);
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@ module.exports = class Plugin {
|
|||
server.exposeStaticDir(`/plugins/${id}/{path*}`, this.publicDir);
|
||||
}
|
||||
|
||||
this.status = kbnServer.status.create(this);
|
||||
this.status = kbnServer.status.createForPlugin(this);
|
||||
server.expose('status', this.status);
|
||||
|
||||
return await attempt(this.externalInit, [server, options], this);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import _ from 'lodash';
|
||||
import { find } from 'lodash';
|
||||
import expect from 'expect.js';
|
||||
import sinon from 'sinon';
|
||||
|
||||
|
@ -17,31 +17,63 @@ describe('ServerStatus class', function () {
|
|||
serverStatus = new ServerStatus(server);
|
||||
});
|
||||
|
||||
describe('#create(plugin)', function () {
|
||||
it('should create a new status by plugin', function () {
|
||||
let status = serverStatus.create(plugin);
|
||||
describe('#create(id)', () => {
|
||||
it('should create a new plugin with an id', () => {
|
||||
const status = serverStatus.create('someid');
|
||||
expect(status).to.be.a(Status);
|
||||
});
|
||||
});
|
||||
|
||||
describe('#get(name)', function () {
|
||||
it('exposes plugins by its id/name', function () {
|
||||
let status = serverStatus.create(plugin);
|
||||
expect(serverStatus.get('name')).to.be(status);
|
||||
describe('#createForPlugin(plugin)', function () {
|
||||
it('should create a new status by plugin', function () {
|
||||
let status = serverStatus.createForPlugin(plugin);
|
||||
expect(status).to.be.a(Status);
|
||||
});
|
||||
});
|
||||
|
||||
describe('#getState(name)', function () {
|
||||
it('should expose the state of the plugin by name', function () {
|
||||
let status = serverStatus.create(plugin);
|
||||
describe('#get(id)', () => {
|
||||
it('exposes statuses by their id', () => {
|
||||
const status = serverStatus.create('statusid');
|
||||
expect(serverStatus.get('statusid')).to.be(status);
|
||||
});
|
||||
|
||||
it('does not get the status for a plugin', () => {
|
||||
serverStatus.createForPlugin(plugin);
|
||||
expect(serverStatus.get(plugin)).to.be(undefined);
|
||||
});
|
||||
});
|
||||
|
||||
describe('#getForPluginId(plugin)', function () {
|
||||
it('exposes plugin status for the plugin', function () {
|
||||
let status = serverStatus.createForPlugin(plugin);
|
||||
expect(serverStatus.getForPluginId(plugin.id)).to.be(status);
|
||||
});
|
||||
|
||||
it('does not get plain statuses by their id', function () {
|
||||
serverStatus.create('someid');
|
||||
expect(serverStatus.getForPluginId('someid')).to.be(undefined);
|
||||
});
|
||||
});
|
||||
|
||||
describe('#getState(id)', function () {
|
||||
it('should expose the state of a status by id', function () {
|
||||
let status = serverStatus.create('someid');
|
||||
status.green();
|
||||
expect(serverStatus.getState('name')).to.be('green');
|
||||
expect(serverStatus.getState('someid')).to.be('green');
|
||||
});
|
||||
});
|
||||
|
||||
describe('#getStateForPluginId(plugin)', function () {
|
||||
it('should expose the state of a plugin by id', function () {
|
||||
let status = serverStatus.createForPlugin(plugin);
|
||||
status.green();
|
||||
expect(serverStatus.getStateForPluginId(plugin.id)).to.be('green');
|
||||
});
|
||||
});
|
||||
|
||||
describe('#overall()', function () {
|
||||
it('considers each status to produce a summary', function () {
|
||||
let status = serverStatus.create(plugin);
|
||||
let status = serverStatus.createForPlugin(plugin);
|
||||
|
||||
expect(serverStatus.overall().state).to.be('uninitialized');
|
||||
|
||||
|
@ -69,25 +101,24 @@ describe('ServerStatus class', function () {
|
|||
it('serializes to overall status and individuals', function () {
|
||||
const pluginOne = {id: 'one', version: '1.0.0'};
|
||||
const pluginTwo = {id: 'two', version: '2.0.0'};
|
||||
const pluginThree = {id: 'three', version: '3.0.0'};
|
||||
|
||||
let one = serverStatus.create(pluginOne);
|
||||
let two = serverStatus.create(pluginTwo);
|
||||
let three = serverStatus.create(pluginThree);
|
||||
let service = serverStatus.create('some service');
|
||||
let p1 = serverStatus.createForPlugin(pluginOne);
|
||||
let p2 = serverStatus.createForPlugin(pluginTwo);
|
||||
|
||||
one.green();
|
||||
two.yellow();
|
||||
three.red();
|
||||
service.green();
|
||||
p1.yellow();
|
||||
p2.red();
|
||||
|
||||
let obj = JSON.parse(JSON.stringify(serverStatus));
|
||||
expect(obj).to.have.property('overall');
|
||||
expect(obj.overall.state).to.eql(serverStatus.overall().state);
|
||||
expect(obj.statuses).to.have.length(3);
|
||||
let json = JSON.parse(JSON.stringify(serverStatus));
|
||||
expect(json).to.have.property('overall');
|
||||
expect(json.overall.state).to.eql(serverStatus.overall().state);
|
||||
expect(json.statuses).to.have.length(3);
|
||||
|
||||
let outs = _.indexBy(obj.statuses, 'name');
|
||||
expect(outs.one).to.have.property('state', 'green');
|
||||
expect(outs.two).to.have.property('state', 'yellow');
|
||||
expect(outs.three).to.have.property('state', 'red');
|
||||
const out = status => find(json.statuses, { id: status.id });
|
||||
expect(out(service)).to.have.property('state', 'green');
|
||||
expect(out(p1)).to.have.property('state', 'yellow');
|
||||
expect(out(p2)).to.have.property('state', 'red');
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -15,11 +15,11 @@ describe('Status class', function () {
|
|||
});
|
||||
|
||||
it('should have an "uninitialized" state initially', function () {
|
||||
expect(serverStatus.create(plugin)).to.have.property('state', 'uninitialized');
|
||||
expect(serverStatus.createForPlugin(plugin)).to.have.property('state', 'uninitialized');
|
||||
});
|
||||
|
||||
it('emits change when the status is set', function (done) {
|
||||
let status = serverStatus.create(plugin);
|
||||
let status = serverStatus.createForPlugin(plugin);
|
||||
|
||||
status.once('change', function (prev, prevMsg) {
|
||||
expect(status.state).to.be('green');
|
||||
|
@ -42,7 +42,7 @@ describe('Status class', function () {
|
|||
});
|
||||
|
||||
it('should only trigger the change listener when something changes', function () {
|
||||
let status = serverStatus.create(plugin);
|
||||
let status = serverStatus.createForPlugin(plugin);
|
||||
let stub = sinon.stub();
|
||||
status.on('change', stub);
|
||||
status.green('Ready');
|
||||
|
@ -52,18 +52,17 @@ describe('Status class', function () {
|
|||
});
|
||||
|
||||
it('should create a JSON representation of the status', function () {
|
||||
let status = serverStatus.create(plugin);
|
||||
let status = serverStatus.createForPlugin(plugin);
|
||||
status.green('Ready');
|
||||
|
||||
let json = status.toJSON();
|
||||
expect(json.name).to.eql(plugin.id);
|
||||
expect(json.version).to.eql(plugin.version);
|
||||
expect(json.id).to.eql(status.id);
|
||||
expect(json.state).to.eql('green');
|
||||
expect(json.message).to.eql('Ready');
|
||||
});
|
||||
|
||||
it('should call on handler if status is already matched', function (done) {
|
||||
let status = serverStatus.create(plugin);
|
||||
let status = serverStatus.createForPlugin(plugin);
|
||||
let msg = 'Test Ready';
|
||||
status.green(msg);
|
||||
|
||||
|
@ -77,7 +76,7 @@ describe('Status class', function () {
|
|||
});
|
||||
|
||||
it('should call once handler if status is already matched', function (done) {
|
||||
let status = serverStatus.create(plugin);
|
||||
let status = serverStatus.createForPlugin(plugin);
|
||||
let msg = 'Test Ready';
|
||||
status.green(msg);
|
||||
|
||||
|
@ -92,7 +91,7 @@ describe('Status class', function () {
|
|||
|
||||
function testState(color) {
|
||||
it(`should change the state to ${color} when #${color}() is called`, function () {
|
||||
let status = serverStatus.create(plugin);
|
||||
let status = serverStatus.createForPlugin(plugin);
|
||||
let message = 'testing ' + color;
|
||||
status[color](message);
|
||||
expect(status).to.have.property('state', color);
|
||||
|
@ -100,7 +99,7 @@ describe('Status class', function () {
|
|||
});
|
||||
|
||||
it(`should trigger the "change" listner when #${color}() is called`, function (done) {
|
||||
let status = serverStatus.create(plugin);
|
||||
let status = serverStatus.createForPlugin(plugin);
|
||||
let message = 'testing ' + color;
|
||||
status.on('change', function (prev, prevMsg) {
|
||||
expect(status.state).to.be(color);
|
||||
|
@ -114,7 +113,7 @@ describe('Status class', function () {
|
|||
});
|
||||
|
||||
it(`should trigger the "${color}" listner when #${color}() is called`, function (done) {
|
||||
let status = serverStatus.create(plugin);
|
||||
let status = serverStatus.createForPlugin(plugin);
|
||||
let message = 'testing ' + color;
|
||||
status.on(color, function (prev, prevMsg) {
|
||||
expect(status.state).to.be(color);
|
||||
|
|
|
@ -9,8 +9,16 @@ module.exports = class ServerStatus {
|
|||
this._created = {};
|
||||
}
|
||||
|
||||
create(plugin) {
|
||||
return (this._created[plugin.id] = new Status(plugin, this.server));
|
||||
create(id) {
|
||||
const status = new Status(id, this.server);
|
||||
this._created[status.id] = status;
|
||||
return status;
|
||||
}
|
||||
|
||||
createForPlugin(plugin) {
|
||||
const status = this.create(`plugin:${plugin.id}@${plugin.version}`);
|
||||
status.plugin = plugin;
|
||||
return status;
|
||||
}
|
||||
|
||||
each(fn) {
|
||||
|
@ -22,12 +30,26 @@ module.exports = class ServerStatus {
|
|||
});
|
||||
}
|
||||
|
||||
get(name) {
|
||||
return this._created[name];
|
||||
get(id) {
|
||||
return this._created[id];
|
||||
}
|
||||
|
||||
getState(name) {
|
||||
return _.get(this._created, [name, 'state'], 'uninitialized');
|
||||
getForPluginId(pluginId) {
|
||||
return _.find(this._created, s =>
|
||||
s.plugin && s.plugin.id === pluginId
|
||||
);
|
||||
}
|
||||
|
||||
getState(id) {
|
||||
const status = this.get(id);
|
||||
if (!status) return undefined;
|
||||
return status.state || 'uninitialized';
|
||||
}
|
||||
|
||||
getStateForPluginId(pluginId) {
|
||||
const status = this.getForPluginId(pluginId);
|
||||
if (!status) return undefined;
|
||||
return status.state || 'uninitialized';
|
||||
}
|
||||
|
||||
overall() {
|
||||
|
|
|
@ -3,18 +3,26 @@ import states from './states';
|
|||
import { EventEmitter } from 'events';
|
||||
|
||||
class Status extends EventEmitter {
|
||||
constructor(plugin, server) {
|
||||
constructor(id, server) {
|
||||
super();
|
||||
|
||||
this.plugin = plugin;
|
||||
if (!id || typeof id !== 'string') {
|
||||
throw new TypeError('Status constructor requires an `id` string');
|
||||
}
|
||||
|
||||
this.id = id;
|
||||
this.since = new Date();
|
||||
this.state = 'uninitialized';
|
||||
this.message = 'uninitialized';
|
||||
|
||||
this.on('change', function (previous, previousMsg) {
|
||||
this.since = new Date();
|
||||
let tags = ['status', `plugin:${this.plugin.toString()}`];
|
||||
tags.push(this.state === 'red' ? 'error' : 'info');
|
||||
|
||||
const tags = [
|
||||
'status',
|
||||
this.id,
|
||||
this.state === 'red' ? 'error' : 'info'
|
||||
];
|
||||
|
||||
server.log(tags, {
|
||||
tmpl: 'Status changed from <%= prevState %> to <%= state %><%= message ? " - " + message : "" %>',
|
||||
|
@ -28,8 +36,7 @@ class Status extends EventEmitter {
|
|||
|
||||
toJSON() {
|
||||
return {
|
||||
name: this.plugin.id,
|
||||
version: this.plugin.version,
|
||||
id: this.id,
|
||||
state: this.state,
|
||||
icon: states.get(this.state).icon,
|
||||
message: this.message,
|
||||
|
|
10
src/ui/public/chrome/api/angular.js
vendored
10
src/ui/public/chrome/api/angular.js
vendored
|
@ -39,7 +39,15 @@ module.exports = function (chrome, internals) {
|
|||
};
|
||||
|
||||
chrome.getBreadcrumbs = () => {
|
||||
return $location.path().split('/').slice(1);
|
||||
let path = $location.path();
|
||||
let length = path.length - 1;
|
||||
|
||||
// trim trailing slash
|
||||
if (path.charAt(length) === '/') {
|
||||
length--;
|
||||
}
|
||||
|
||||
return path.substr(1, length).split('/');
|
||||
};
|
||||
|
||||
const notify = new Notifier();
|
||||
|
|
|
@ -35,6 +35,10 @@ export default function (chrome, internals) {
|
|||
}
|
||||
|
||||
function setLastUrl(link, url) {
|
||||
if (link.linkToLastSubUrl === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
link.lastSubUrl = url;
|
||||
internals.appUrlStore.setItem(lastSubUrlKey(link), url);
|
||||
}
|
||||
|
|
|
@ -7,13 +7,14 @@ let module = uiModules.get('kibana');
|
|||
module.directive('breadCrumbs', function () {
|
||||
return {
|
||||
restrict: 'E',
|
||||
scope: true,
|
||||
scope: {
|
||||
omitCurrentPage: '='
|
||||
},
|
||||
template: breadCrumbsTemplate,
|
||||
controller: function ($scope) {
|
||||
$scope.crumbs = chrome.getBreadcrumbs();
|
||||
|
||||
if (_.last($scope.crumbs) === '') {
|
||||
// Remove the empty string from the end of the array
|
||||
if ($scope.omitCurrentPage === true) {
|
||||
$scope.crumbs.pop();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -227,7 +227,7 @@ module.directive('savedObjectFinder', function ($location, $injector, kbnUrl, Pr
|
|||
};
|
||||
|
||||
self.manageObjects = function (type) {
|
||||
$location.url('/settings/objects?_a=' + rison.encode({tab: type}));
|
||||
$location.url('/management/kibana/objects?_a=' + rison.encode({tab: type}));
|
||||
};
|
||||
|
||||
self.hitCountNoun = function () {
|
||||
|
|
|
@ -194,7 +194,7 @@ _.class(errors.NoDefinedIndexPatterns).inherits(KbnError);
|
|||
|
||||
|
||||
/**
|
||||
* Tried to load a route besides settings/indices but you don't have a default index pattern!
|
||||
* Tried to load a route besides management/data/* but you don't have a default index pattern!
|
||||
*/
|
||||
errors.NoDefaultIndexPattern = function NoDefaultIndexPattern(type) {
|
||||
KbnError.call(this,
|
||||
|
|
|
@ -142,4 +142,3 @@ uiModules
|
|||
}
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import $ from 'jquery';
|
|||
import uiModules from 'ui/modules';
|
||||
|
||||
uiModules
|
||||
.get('app/settings')
|
||||
.get('app/management')
|
||||
.directive('fieldFormatEditor', function (Private, $compile) {
|
||||
return {
|
||||
restrict: 'A',
|
||||
|
|
1
src/ui/public/icons/beats.svg
Executable file
1
src/ui/public/icons/beats.svg
Executable file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 5.2 KiB |
1
src/ui/public/icons/elasticsearch.svg
Executable file
1
src/ui/public/icons/elasticsearch.svg
Executable file
|
@ -0,0 +1 @@
|
|||
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25"><defs><style>.cls-1{fill:none;}.cls-2,.cls-3{fill:#fff;}.cls-2{opacity:0.65;}</style></defs><title>Icon-Elasticsearch</title><path class="cls-1" d="M1.26,18H17.92a5.93,5.93,0,0,1,4.52,2.09,12.49,12.49,0,0,0,0-15.18A5.94,5.94,0,0,1,17.85,7H1.26A12.42,12.42,0,0,0,.5,9H16.44a3.51,3.51,0,0,1,0,7H0.5a12.41,12.41,0,0,0,.76,2h0Z" transform="translate(0)"/><path class="cls-2" d="M4.85,2.62L5.28,2.3Z" transform="translate(0)"/><path class="cls-2" d="M1.76,6.1q0.19-.31.39-0.61C2,5.69,1.89,5.89,1.76,6.1Z" transform="translate(0)"/><path class="cls-2" d="M2.31,5.26l0.32-.43Z" transform="translate(0)"/><path class="cls-2" d="M5.5,2.14l0.6-.38Z" transform="translate(0)"/><path class="cls-2" d="M3.49,3.84l0.37-.37Z" transform="translate(0)"/><path class="cls-2" d="M4.07,3.27l0.54-.47Z" transform="translate(0)"/><path class="cls-2" d="M1.34,6.87q0.13-.27.28-0.53Q1.47,6.6,1.34,6.87Z" transform="translate(0)"/><path class="cls-2" d="M2.82,4.6Q3,4.32,3.28,4.06,3,4.32,2.82,4.6Z" transform="translate(0)"/><path class="cls-2" d="M22.41,4.89A12.49,12.49,0,0,0,6.22,1.69,13.9,13.9,0,0,1,10.49,7h7.36A5.94,5.94,0,0,0,22.41,4.89Z" transform="translate(0)"/><path class="cls-2" d="M22.44,20.07A5.93,5.93,0,0,0,17.92,18H10.7a13.87,13.87,0,0,1-4.12,5.53A12.55,12.55,0,0,1,1.27,18h0A12.5,12.5,0,0,0,22.44,20.07Z" transform="translate(0)"/><path class="cls-2" d="M11.41,12.49A15,15,0,0,1,11,16h5.44a3.51,3.51,0,0,0,0-7H11A13.83,13.83,0,0,1,11.41,12.49Z" transform="translate(0)"/><path class="cls-3" d="M11.41,12.49A13.83,13.83,0,0,0,11,9H0.5a12.49,12.49,0,0,0,0,7H11A15,15,0,0,0,11.41,12.49Z" transform="translate(0)"/><path class="cls-3" d="M2.63,4.83L2.82,4.6Z" transform="translate(0)"/><path class="cls-3" d="M2.15,5.49l0.16-.23Z" transform="translate(0)"/><path class="cls-3" d="M1.26,7h0l0.07-.14Z" transform="translate(0)"/><path class="cls-3" d="M1.62,6.35L1.76,6.1Z" transform="translate(0)"/><path class="cls-3" d="M3.86,3.47l0.21-.2Z" transform="translate(0)"/><path class="cls-3" d="M3.28,4.06l0.2-.21Z" transform="translate(0)"/><path class="cls-3" d="M6.22,1.69L6.1,1.76l0.12-.07h0Z" transform="translate(0)"/><path class="cls-3" d="M5.28,2.3L5.5,2.14Z" transform="translate(0)"/><path class="cls-3" d="M4.61,2.81l0.24-.19Z" transform="translate(0)"/><path class="cls-3" d="M6.22,1.69L6.1,1.76l-0.6.38L5.28,2.3l-0.43.32-0.24.19-0.54.47-0.21.2-0.37.37-0.2.21Q3,4.32,2.82,4.6l-0.18.23-0.32.43-0.16.23q-0.2.3-.39,0.61l-0.14.25q-0.15.26-.28,0.53L1.27,7h9.23A13.9,13.9,0,0,0,6.22,1.69Z" transform="translate(0)"/><polygon class="cls-3" points="1.26 17.97 1.27 17.98 10.71 17.98 10.71 17.97 1.26 17.97"/><path class="cls-3" d="M6.58,23.51A13.87,13.87,0,0,0,10.7,18H1.27A12.55,12.55,0,0,0,6.58,23.51Z" transform="translate(0)"/></svg>
|
After Width: | Height: | Size: 2.8 KiB |
1
src/ui/public/icons/kibana.svg
Executable file
1
src/ui/public/icons/kibana.svg
Executable file
|
@ -0,0 +1 @@
|
|||
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.24 25"><defs><style>.cls-1,.cls-2,.cls-3{fill:#fff;}.cls-1{opacity:0.7;}.cls-2{opacity:0.5;}</style></defs><title>Icon-Kibana</title><path class="cls-1" d="M12.41,11.69L22.12,0H2.88V9.37H3.24A19.09,19.09,0,0,1,12.41,11.69Z" transform="translate(-2.88)"/><polygon class="cls-1" points="0 23.17 0 23.17 9.53 11.69 0 23.17"/><path class="cls-1" d="M14.9,13.32l0.27,0.21Z" transform="translate(-2.88)"/><path class="cls-1" d="M14.16,12.77l0.15,0.11Z" transform="translate(-2.88)"/><path class="cls-1" d="M15.55,13.84L6.3,25H22.1A19.16,19.16,0,0,0,15.55,13.84Z" transform="translate(-2.88)"/><path class="cls-2" d="M14.07,12.71c-0.67-.48-1.66-1-1.66-1a19.21,19.21,0,0,1,1.75,1.08Z" transform="translate(-2.88)"/><path class="cls-2" d="M15.55,13.84l-0.39-.31,0.38,0.32h0Z" transform="translate(-2.88)"/><path class="cls-2" d="M14.31,12.88l0.59,0.43Z" transform="translate(-2.88)"/><path class="cls-2" d="M15.16,13.52l-0.27-.21-0.59-.43-0.15-.11a19.21,19.21,0,0,0-1.75-1.08L2.88,23.17V25H6.3l9.25-11.16Z" transform="translate(-2.88)"/><path class="cls-3" d="M3.24,9.36H2.88V23.17l9.53-11.48A19.09,19.09,0,0,0,3.24,9.36Z" transform="translate(-2.88)"/></svg>
|
After Width: | Height: | Size: 1.2 KiB |
1
src/ui/public/icons/logstash.svg
Executable file
1
src/ui/public/icons/logstash.svg
Executable file
|
@ -0,0 +1 @@
|
|||
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22.96 25"><defs><style>.cls-1,.cls-2,.cls-3{fill:#fff;}.cls-1{opacity:0.61;}.cls-3{opacity:0.3;}</style></defs><title>Icon-Logstash</title><path class="cls-1" d="M13.52,6.82A6.82,6.82,0,0,0,6.7,0H1V12.5h12.5V6.82Z" transform="translate(-1.02)"/><path class="cls-2" d="M1,12.5H1A12.5,12.5,0,0,0,13.52,25h0V12.5H1Z" transform="translate(-1.02)"/><rect class="cls-1" x="15.12" y="12.5" width="7.83" height="12.5"/><rect class="cls-3" x="12.5" y="12.5" width="2.62" height="12.5"/></svg>
|
After Width: | Height: | Size: 569 B |
|
@ -6,7 +6,7 @@ export default function EnsureSomeIndexPatternsFn(Private, Notifier, $location,
|
|||
return function promiseHandler(patterns) {
|
||||
if (!patterns || patterns.length === 0) {
|
||||
// notify.warning(new errors.NoDefinedIndexPatterns());
|
||||
kbnUrl.redirectPath('/settings/indices');
|
||||
kbnUrl.redirectPath('/management/data/index');
|
||||
}
|
||||
|
||||
return patterns;
|
||||
|
|
|
@ -71,7 +71,7 @@ export default function FieldObjectProvider(Private, shortDotsFilter, $rootScope
|
|||
}
|
||||
|
||||
Field.prototype.routes = {
|
||||
edit: '/settings/indices/edit/{{indexPattern.id}}/field/{{name}}'
|
||||
edit: '/management/kibana/indices/{{indexPattern.id}}/field/{{name}}'
|
||||
};
|
||||
|
||||
return Field;
|
||||
|
|
|
@ -30,10 +30,10 @@ export default function IndexPatternFactory(Private, Notifier, config, kbnIndex,
|
|||
const configWatchers = new WeakMap();
|
||||
const docSources = new WeakMap();
|
||||
const getRoutes = () => ({
|
||||
edit: '/settings/indices/edit/{{id}}',
|
||||
addField: '/settings/indices/edit/{{id}}/create-field',
|
||||
indexedFields: '/settings/indices/edit/{{id}}?_a=(tab:indexedFields)',
|
||||
scriptedFields: '/settings/indices/edit/{{id}}?_a=(tab:scriptedFields)'
|
||||
edit: '/management/kibana/indices/{{id}}',
|
||||
addField: '/management/kibana/indices/{{id}}/create-field',
|
||||
indexedFields: '/management/kibana/indices/{{id}}?_a=(tab:indexedFields)',
|
||||
scriptedFields: '/management/kibana/indices/{{id}}?_a=(tab:scriptedFields)'
|
||||
});
|
||||
|
||||
const mapping = mappingSetup.expandShorthand({
|
||||
|
|
10
src/ui/public/management/__tests__/index.js
Normal file
10
src/ui/public/management/__tests__/index.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
import expect from 'expect.js';
|
||||
|
||||
import management from 'ui/management';
|
||||
import ManagementSection from 'ui/management/section';
|
||||
|
||||
describe('Management', () => {
|
||||
it('provides ManagementSection', () => {
|
||||
expect(management).to.be.a(ManagementSection);
|
||||
});
|
||||
});
|
110
src/ui/public/management/__tests__/section.js
Normal file
110
src/ui/public/management/__tests__/section.js
Normal file
|
@ -0,0 +1,110 @@
|
|||
import expect from 'expect.js';
|
||||
|
||||
import ManagementSection from 'ui/management/section';
|
||||
import IndexedArray from 'ui/indexed_array';
|
||||
|
||||
describe('ManagementSection', () => {
|
||||
describe('constructor', () => {
|
||||
it('defaults display to id', () => {
|
||||
const section = new ManagementSection('kibana');
|
||||
expect(section.display).to.be('kibana');
|
||||
});
|
||||
|
||||
it('exposes items', () => {
|
||||
const section = new ManagementSection('kibana');
|
||||
expect(section.items).to.be.empty();
|
||||
});
|
||||
|
||||
it('sets url based on path', () => {
|
||||
const section = new ManagementSection('kibana', { path: 'foo' });
|
||||
expect(section.url).to.be('#/management/foo');
|
||||
});
|
||||
|
||||
it('assigns all options', () => {
|
||||
const section = new ManagementSection('kibana', { description: 'test' });
|
||||
expect(section.description).to.be('test');
|
||||
});
|
||||
});
|
||||
|
||||
describe('register', () => {
|
||||
let section;
|
||||
|
||||
beforeEach(() => {
|
||||
section = new ManagementSection('kibana');
|
||||
});
|
||||
|
||||
it('returns a ManagementSection', () => {
|
||||
expect(section.register('about')).to.be.a(ManagementSection);
|
||||
});
|
||||
|
||||
it('provides a reference to the parent', () => {
|
||||
expect(section.register('about').parent).to.be(section);
|
||||
});
|
||||
|
||||
it('adds item', function () {
|
||||
section.register('about', { description: 'test' });
|
||||
|
||||
expect(section.items).to.have.length(1);
|
||||
expect(section.items[0]).to.be.a(ManagementSection);
|
||||
expect(section.items[0].id).to.be('about');
|
||||
});
|
||||
|
||||
it('can only register a section once', () => {
|
||||
let threwException = false;
|
||||
section.register('about');
|
||||
|
||||
try {
|
||||
section.register('about');
|
||||
} catch (e) {
|
||||
threwException = e.message.indexOf('is already registered') > -1;
|
||||
};
|
||||
|
||||
expect(threwException).to.be(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('getSection', () => {
|
||||
let section;
|
||||
|
||||
beforeEach(() => {
|
||||
section = new ManagementSection('kibana');
|
||||
section.register('about');
|
||||
});
|
||||
|
||||
it('returns registered section', () => {
|
||||
expect(section.getSection('about')).to.be.a(ManagementSection);
|
||||
});
|
||||
|
||||
it('returns undefined if un-registered', () => {
|
||||
expect(section.getSection('unknown')).to.be(undefined);
|
||||
});
|
||||
});
|
||||
|
||||
describe('items', () => {
|
||||
let section;
|
||||
|
||||
beforeEach(() => {
|
||||
section = new ManagementSection('kibana');
|
||||
|
||||
section.register('three', { order: 3 });
|
||||
section.register('one', { order: 1 });
|
||||
section.register('two', { order: 2 });
|
||||
});
|
||||
|
||||
it('is an indexed array', () => {
|
||||
expect(section.items).to.be.a(IndexedArray);
|
||||
});
|
||||
|
||||
it('is indexed on id', () => {
|
||||
const keys = Object.keys(section.items.byId).sort();
|
||||
expect(section.items.byId).to.be.an('object');
|
||||
|
||||
expect(keys).to.eql(['one', 'three', 'two']);
|
||||
});
|
||||
|
||||
it('can be ordered', () => {
|
||||
const ids = section.items.inOrder.map((i) => { return i.id; });
|
||||
expect(ids).to.eql(['one', 'two', 'three']);
|
||||
});
|
||||
});
|
||||
});
|
23
src/ui/public/management/index.js
Normal file
23
src/ui/public/management/index.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
import ManagementSection from './section';
|
||||
|
||||
const sections = new ManagementSection('management', {
|
||||
display: 'Management'
|
||||
});
|
||||
|
||||
// TODO: where should this live?
|
||||
sections.register('data', {
|
||||
display: 'Connect Data',
|
||||
order: 0
|
||||
});
|
||||
|
||||
sections.register('elasticsearch', {
|
||||
display: 'Elasticsearch',
|
||||
order: 10
|
||||
});
|
||||
|
||||
sections.register('kibana', {
|
||||
display: 'Kibana',
|
||||
order: 20,
|
||||
});
|
||||
|
||||
export default sections;
|
73
src/ui/public/management/section.js
Normal file
73
src/ui/public/management/section.js
Normal file
|
@ -0,0 +1,73 @@
|
|||
import {assign} from 'lodash';
|
||||
import IndexedArray from 'ui/indexed_array';
|
||||
|
||||
export default class ManagementSection {
|
||||
|
||||
/**
|
||||
* @param {string} id
|
||||
* @param {object} options
|
||||
* @param {number|null} options.order
|
||||
* @param {string|null} options.display - defaults to id
|
||||
* @param {string|null} options.url - defaults based on path
|
||||
* @param {string|null} options.path - used to create url within management
|
||||
* @param {string|null} options.info
|
||||
* @returns {ManagementSection}
|
||||
*/
|
||||
|
||||
constructor(id, options = {}) {
|
||||
this.display = id;
|
||||
this.id = id;
|
||||
this.items = new IndexedArray({
|
||||
index: ['id'],
|
||||
order: ['order']
|
||||
});
|
||||
|
||||
if (!options.url) {
|
||||
options.url = '#/management/' + options.path || '';
|
||||
}
|
||||
|
||||
assign(this, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a sub-section
|
||||
*
|
||||
* @param {string} id
|
||||
* @param {object} options
|
||||
* @returns {ManagementSection}
|
||||
*/
|
||||
|
||||
register(id, options = {}) {
|
||||
const item = new ManagementSection(id, assign(options, { parent: this }));
|
||||
|
||||
if (this.hasItem(id)) {
|
||||
throw new Error(`'${id}' is already registered`);
|
||||
}
|
||||
|
||||
this.items.push(item);
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if an id is already registered
|
||||
*
|
||||
* @param {string} id
|
||||
* @returns {boolean}
|
||||
*/
|
||||
|
||||
hasItem(id) {
|
||||
return this.items.byId.hasOwnProperty(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches a section by id
|
||||
*
|
||||
* @param {string} id
|
||||
* @returns {ManagementSection}
|
||||
*/
|
||||
|
||||
getSection(id) {
|
||||
return this.items.byId[id];
|
||||
}
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
import uiRegistry from 'ui/registry/_registry';
|
||||
export default uiRegistry({
|
||||
name: 'settingsSections',
|
||||
order: ['order']
|
||||
});
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue