Changes settings to management

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
This commit is contained in:
Tyler Smalley 2016-05-12 17:26:39 -07:00
parent dbfee59b66
commit 91b6d92529
90 changed files with 743 additions and 884 deletions

View file

@ -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,9 +61,9 @@ 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',
}

View file

@ -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;
});
});

View file

@ -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'
});

View file

@ -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
}));
}
}

View file

@ -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'
});

View file

@ -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';

View 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>

View 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\//,
whenMissingRedirectTo: '/management/kibana/indices'
});
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.get($scope.sectionName) || management;
if ($scope.section) {
$scope.section.items.forEach(item => {
item.class = item.url === '#' + $location.path() ? 'active' : undefined;
});
}
management.get('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;
}
};
});

View 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">
<div class="panel-heading panel-heading-{{::section.id}}">
{{::section.display}}
<i
class="fa fa-info-circle pull-right"
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 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>

View file

@ -0,0 +1,3 @@
import 'plugins/kibana/management/sections/settings';
import 'plugins/kibana/management/sections/objects';
import 'plugins/kibana/management/sections/indices';

View file

@ -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="kibana">
<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
@ -177,5 +177,5 @@
</form>
</div>
</div>
</kbn-settings-indices>
</kbn-settings-app>
</kbn-management-indices>
</kbn-management-app>

View file

@ -3,21 +3,21 @@ 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/', {
.when('/management/kibana/indices/', {
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 +73,7 @@ uiModules.get('apps/settings')
config.set('defaultIndex', indexPattern.id);
}
indexPatterns.cache.clear(indexPattern.id);
kbnUrl.change('/settings/indices/' + indexPattern.id);
kbnUrl.change('/management/kibana/indices/' + indexPattern.id);
});
}
});

View file

@ -1,13 +1,13 @@
<kbn-settings-app section="indices">
<kbn-settings-indices>
<div ng-controller="settingsIndicesEdit">
<kbn-management-app section="kibana">
<kbn-management-indices>
<div ng-controller="managementIndicesEdit">
<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>

View file

@ -1,38 +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';
uiRoutes
.when('/settings/indices/: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'));
.catch(courier.redirectWhenMissing('/management/kibana/indices'));
}
}
});
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);
$scope.kbnUrl = Private(UrlProvider);
$scope.indexPattern = $route.current.locals.indexPattern;
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,7 +65,7 @@ uiModules.get('apps/settings')
courier.indexPatterns.delete($scope.indexPattern)
.then(refreshKibanaIndex)
.then(function () {
$location.url('/settings/indices');
$location.url('/management/kibana/indices');
})
.catch(notify.fatal);
};

View file

@ -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>

View file

@ -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/:indexPatternId/field/:fieldName', { mode: 'edit' })
.when('/settings/indices/:indexPatternId/create-field/', { mode: 'create' })
.defaults(/settings\/indices\/[^\/]+\/(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
};
}
});

View file

@ -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,

View file

@ -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 = '';

View file

@ -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/{{ indexPattern }}/scriptedField';
const fieldCreatorPath = '/management/kibana/indices/{{ indexPattern }}/scriptedField';
const fieldEditorPath = fieldCreatorPath + '/{{ fieldName }}';
$scope.perPage = 25;

View file

@ -5,7 +5,7 @@
Index Patterns&nbsp;
<a
ng-if="editingId"
href="#/settings/indices"
href="#/management/kibana/indices"
class="btn btn-primary btn-xs"
aria-label="Add New">
<span class="sr-only">Add New</span>

View file

@ -0,0 +1,66 @@
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';
// add a dependency to all of the subsection routes
uiRoutes
.defaults(/management\/kibana\/indices/, {
resolve: {
indexPatternIds: function (courier) {
return courier.indexPatterns.getIds();
}
}
});
// wrapper directive, which sets some global stuff up like the left nav
uiModules.get('apps/management')
.run(function (config) {
const index = config.get('defaultIndex');
const kibana = management.get('kibana');
if (index && kibana && kibana.get('indices')) {
kibana.get('indices').url = `#/management/kibana/indices/${index}`;
}
})
.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.get('data').register('indices', {
display: 'Existing Data',
order: 0,
path: 'kibana/indices/'
});
management.get('kibana').register('indices', {
display: 'Index Patterns',
order: 0,
path: 'kibana/indices/'
});

View file

@ -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>

View file

@ -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 () {

View file

@ -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>

View file

@ -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
})

View file

@ -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.get('kibana').register('objects', {
display: 'Saved Objects',
order: 10,
path: 'kibana/objects'
});

View file

@ -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',

View file

@ -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>

View file

@ -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.get('kibana').register('settings', {
display: 'Settings',
order: 20,
path: 'kibana/settings'
});

View file

@ -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 () {

View file

@ -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 () {

View file

@ -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 () {

View file

@ -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,95 @@ 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-management-landing {
padding: 5px;
.product-overview {
color: @kibanaGray2;
padding: 5px 0 10px 10px;
}
.management-section-info {
bottom: 0;
display: none;
color: @kibanaPink1;
font-size: 0.8em;
position: absolute;
}
.panel-heading i {
font-size: 0.9em;
padding: 5px;
}
.management-section {
padding-left: 5px;
padding-right: 5px;
}
.management-section-info-expanded {
.panel-heading i {
color: @black;
}
.management-section-info {
display: block;
}
}
.panel-product {
margin-bottom: 10px;
.panel-body {
padding-bottom: 30px;
font-size: 17px;
line-height: 32px;
position: relative;
}
}
}
kbn-settings-objects {
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;
}
.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 +126,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 +134,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 +148,7 @@ kbn-settings-objects-view {
width: 100%;
tr.default td.value {
color: @settings-advanced-table-default-color;
color: @management-advanced-table-default-color;
}
td {
@ -141,7 +177,7 @@ kbn-settings-objects-view {
.indices-settings {
i.active {
color: @settings-indices-active-color;
color: @management-indices-active-color;
}
tr.field-settings {
@ -168,7 +204,7 @@ kbn-settings-objects-view {
}
}
kbn-settings-indices {
kbn-management-indices {
.fields {
table {
.table-striped()
@ -197,7 +233,6 @@ kbn-settings-indices {
}
}
.kbn-settings-indices-create {
.time-and-pattern > div {}
}

View file

@ -1,14 +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 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>
</nav>
<div role="main" class="settings-section-container {{section.name}}-settings" ng-transclude></div>
</div>

View file

@ -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

View file

@ -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

View file

@ -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>

View file

@ -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'
}));

View file

@ -1,54 +0,0 @@
import _ from 'lodash';
import registry from 'ui/registry/settings_sections';
import 'plugins/kibana/settings/sections/indices/_create';
import 'plugins/kibana/settings/sections/indices/_edit';
import 'plugins/kibana/settings/sections/indices/_field_editor';
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();
}
}
});
// wrapper directive, which sets some global stuff up like the left nav
uiModules.get('apps/settings')
.directive('kbnSettingsIndices', 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('#/settings/indices/{{id}}', {id: id}),
class: 'sidebar-item-title ' + ($scope.editingId === id ? 'active' : ''),
default: $scope.defaultIndex === id
};
});
});
$scope.$emit('application.load');
}
};
});
registry.register(_.constant({
order: 1,
name: 'indices',
display: 'Indices',
url: '#/settings/indices'
}));

View file

@ -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'
}));

View file

@ -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'
}));

View file

@ -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
}));
}
}

View file

@ -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];

View file

@ -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();

View file

@ -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();
}
}

View file

@ -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 () {

View file

@ -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/indices but you don't have a default index pattern!
*/
errors.NoDefaultIndexPattern = function NoDefaultIndexPattern(type) {
KbnError.call(this,

View file

@ -142,4 +142,3 @@ uiModules
}
};
});

View file

@ -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

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.2 KiB

View 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
View 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

View 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

View file

@ -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/kibana/indices');
}
return patterns;

View file

@ -71,7 +71,7 @@ export default function FieldObjectProvider(Private, shortDotsFilter, $rootScope
}
Field.prototype.routes = {
edit: '/settings/indices/{{indexPattern.id}}/field/{{name}}'
edit: '/management/kibana/indices/{{indexPattern.id}}/field/{{name}}'
};
return Field;

View file

@ -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/{{id}}',
addField: '/settings/indices/{{id}}/create-field',
indexedFields: '/settings/indices/{{id}}?_a=(tab:indexedFields)',
scriptedFields: '/settings/indices/{{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({

View 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);
});
});

View file

@ -0,0 +1,108 @@
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.beEmpty;
});
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.eql(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('get', () => {
let section;
beforeEach(() => {
section = new ManagementSection('kibana');
section.register('about');
});
it('returns registered section', () => {
expect(section.get('about')).to.be.a(ManagementSection);
});
it('returns undefined if un-registered', () => {
expect(section.get('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', () => {
expect(section.items.byId).to.be.an('object');
expect(Object.keys(section.items.byId)).to.eql(['three', 'one', 'two']);
});
it('can be ordered', () => {
const ids = section.items.inOrder.map((i) => { return i.id; });
expect(ids).to.eql(['one', 'two', 'three']);
});
});
});

View 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;

View file

@ -0,0 +1,68 @@
import {assign} from 'lodash';
import IndexedArray from 'ui/indexed_array';
export default class ManagementSection {
/**
* @param {string} id
* @param {object} options
* @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 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}
*/
get(id) {
return this.items.byId[id];
}
}

View file

@ -1,5 +0,0 @@
import uiRegistry from 'ui/registry/_registry';
export default uiRegistry({
name: 'settingsSections',
order: ['order']
});

View file

@ -608,4 +608,50 @@ fieldset {
}
}
.panel-product {
margin-bottom: 10px;
.panel-heading {
background-color: @kibanaBlue3;
border-radius: 0;
color: @white;
font-size: 17px;
padding: 7px 10px;
}
.panel-heading-elasticsearch,
.panel-heading-kibana,
.panel-heading-beats,
.panel-heading-logstash {
background-position: 4px 7px;
background-repeat: no-repeat;
background-size: 26px 26px;
padding-left: 32px;
}
.panel-heading-elasticsearch {
background-color: @product-elasticsearch;
background-image: url("~ui/icons/elasticsearch.svg");
}
.panel-heading-kibana {
background-color: @product-kibana;
background-image: url("~ui/icons/kibana.svg");
}
.panel-heading-beats {
background-color: @product-beats;
background-image: url("~ui/icons/beats.svg");
}
.panel-heading-logstash {
background-color: @product-logstash;
background-image: url("~ui/icons/logstash.svg");
}
.panel-body {
padding: 10px;
}
}
@import (reference) "~dragula/dist/dragula.css";

View file

@ -62,3 +62,8 @@
@kibanaPink1: #E8488B;
@kibanaPink2: #FF95C1;
@product-kibana: @kibanaPink1;
@product-elasticsearch: #3EBEB0;
@product-logstash: #F3BD19;
@product-beats: #07A5DE;

View file

@ -111,14 +111,14 @@
@app-switcher-app-description-color: @gray;
// Settings ====================================================================
@settings-objects-list-border: @gray-lighter;
@settings-objects-empty-color: @gray-light;
@settings-objects-action-bar-bg: @gray-lighter;
// Management ==================================================================
@management-objects-list-border: @gray-lighter;
@management-objects-empty-color: @gray-light;
@management-objects-action-bar-bg: @gray-lighter;
@settings-advanced-table-default-color: @input-color-placeholder;
@management-advanced-table-default-color: @input-color-placeholder;
@settings-indices-active-color: @btn-success-bg;
@management-indices-active-color: @btn-success-bg;
// Visualize ===================================================================

View file

@ -81,7 +81,7 @@ class UiExports {
case 'spyModes':
case 'chromeNavControls':
case 'navbarExtensions':
case 'settingsSections':
case 'managementSections':
case 'docViews':
case 'hacks':
return (plugin, spec) => {

View file

@ -19,11 +19,14 @@ bdd.describe('creating and deleting default index', function describeIndexTests(
bdd.describe('index pattern creation', function indexPatternCreation() {
bdd.before(function () {
return settingsPage.createIndexPattern();
return settingsPage.createIndexPattern()
.then(function () {
return settingsPage.navigateTo();
});
});
bdd.it('should allow setting advanced settings', function () {
return settingsPage.clickAdvancedTab()
return settingsPage.clickKibanaSettings()
.then(function TestCallSetAdvancedSettingsForTimezone() {
common.saveScreenshot('Settings-advanced-tab');
common.debug('calling setAdvancedSetting');
@ -37,6 +40,5 @@ bdd.describe('creating and deleting default index', function describeIndexTests(
expect(advancedSetting).to.be('America/Phoenix');
});
});
});
});

View file

@ -21,5 +21,5 @@ bdd.describe('settings app', function () {
require('./_index_pattern_create_delete');
require('./_index_pattern_results_sort');
require('./_index_pattern_popularity');
require('./_advanced_settings');
require('./_kibana_settings');
});

View file

@ -22,7 +22,7 @@ define(function (require) {
'intern/dojo/node!../support/index',
'intern/dojo/node!./apps/discover',
'intern/dojo/node!./status_page',
'intern/dojo/node!./apps/settings',
'intern/dojo/node!./apps/management',
'intern/dojo/node!./apps/visualize',
'intern/dojo/node!./apps/console',
'intern/dojo/node!./apps/dashboard'

View file

@ -40,7 +40,7 @@ module.exports = {
},
settings: {
pathname: kibanaURL,
hash: '/settings'
hash: '/management'
},
console: {
pathname: 'app/console',

View file

@ -9,9 +9,21 @@ export default (function () {
SettingsPage.prototype = {
constructor: SettingsPage,
clickAdvancedTab: function () {
common.debug('in clickAdvancedTab');
return common.findTestSubject('settingsNav advanced').click();
clickNavigation: function () {
// TODO: find better way to target the element
return this.remote.findDisplayedByCssSelector('.app-link:nth-child(5) a').click();
},
clickPath: function (path) {
return this.remote.findDisplayedByCssSelector('[kbn-href="#/management/' + path + '"]').click();
},
clickKibanaSettings: function () {
return this.clickPath('kibana/settings');
},
clickKibanaIndicies: function () {
return this.clickPath('kibana/indices');
},
getAdvancedSettings: function getAdvancedSettings(propertyName) {
@ -20,14 +32,9 @@ export default (function () {
.getVisibleText();
},
clickAdvancedTab: function () {
common.debug('in clickAdvancedTab');
return common.findTestSubject('settingsNav advanced').click();
},
setAdvancedSettings: function setAdvancedSettings(propertyName, propertyValue) {
var self = this;
return common.findTestSubject('advancedSetting&' + propertyName + ' editButton')
.click()
.then(function () {
@ -51,12 +58,10 @@ export default (function () {
.getVisibleText();
},
navigateTo: function () {
return common.navigateToApp('settings');
},
getTimeBasedEventsCheckbox: function () {
return this.remote.setFindTimeout(defaultFindTimeout)
.findByCssSelector('input[ng-model="index.isTimeBased"]');
@ -108,12 +113,7 @@ export default (function () {
getCreateButton: function () {
return this.remote.setFindTimeout(defaultFindTimeout)
.findDisplayedByCssSelector('.btn');
},
clickCreateButton: function () {
return this.remote.setFindTimeout(defaultFindTimeout)
.findByCssSelector('.btn').click();
.findDisplayedByCssSelector('[type="submit"]');
},
clickDefaultIndexButton: function () {
@ -169,7 +169,7 @@ export default (function () {
getFieldsTabCount: function () {
var self = this;
var selector = 'li.kbn-settings-tab.active a small';
var selector = 'li.kbn-management-tab.active a small';
return common.try(function () {
return self.remote.setFindTimeout(defaultFindTimeout / 10)
@ -284,21 +284,26 @@ export default (function () {
var self = this;
return common.try(function () {
return self.selectTimeFieldOption('@timestamp')
.then(function () {
return self.getCreateButton().click();
});
return self.navigateTo()
.then(function () {
return self.selectTimeFieldOption('@timestamp');
})
.then(function () {
return self.getCreateButton().click();
});
})
.then(function () {
return common.try(function () {
return self.remote.getCurrentUrl()
.then(function (currentUrl) {
if (!currentUrl.match(/indices\/.+\?/)) {
throw new Error('Index pattern not created');
} else {
common.debug('Index pattern created: ' + currentUrl);
}
});
.then(function (currentUrl) {
common.log('currentUrl', currentUrl);
if (!currentUrl.match(/indices\/.+\?/)) {
throw new Error('Index pattern not created');
} else {
common.debug('Index pattern created: ' + currentUrl);
}
});
});
});
},