Skip to content

Commit da025aa

Browse files
committed
Merge branch 'master' into issue/6556
2 parents 2ffbb76 + fd2f9d8 commit da025aa

12 files changed

Lines changed: 42 additions & 3 deletions

File tree

config/kibana.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
# The maximum payload size in bytes for incoming server requests.
1212
# server.maxPayloadBytes: 1048576
1313

14+
# The Kibana server's name. This is used for display purposes.
15+
# server.name: "your-hostname"
16+
1417
# The URL of the Elasticsearch instance to use for all your queries.
1518
# elasticsearch.url: "http://localhost:9200"
1619

src/plugins/kibana/public/settings/sections/about/index.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ <h1>Kibana</h1>
2121
<td>{{buildSha | limitTo:7}}</td>
2222
</tr>
2323

24+
<tr>
25+
<td>Server name</td>
26+
<td>{{serverName}}</td>
27+
</tr>
28+
2429
</table>
2530
</p>
2631
<small>© 2015 All Rights Reserved - <a href="https://elastic.co">Elasticsearch</a></small>

src/plugins/kibana/public/settings/sections/about/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ uiRoutes
1010
});
1111

1212
uiModules.get('apps/settings')
13-
.controller('settingsAbout', function ($scope, kbnVersion, buildNum, buildSha) {
13+
.controller('settingsAbout', function ($scope, kbnVersion, buildNum, buildSha, serverName) {
1414
$scope.kbnVersion = kbnVersion;
1515
$scope.buildNum = buildNum;
1616
$scope.buildSha = buildSha;
17+
$scope.serverName = serverName;
1718
});
1819

1920
registry.register(_.constant({

src/plugins/status_page/public/status_page.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
<h1>
44
Status: <span class="state_color">{{ ui.serverStateMessage }}</span>
55
<i class="fa state_color state_icon" />
6+
<span class="pull-right">
7+
{{ ui.name }}
8+
</span>
69
</h1>
710
</header>
811

src/plugins/status_page/public/status_page.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const chrome = require('ui/chrome')
2929
const data = resp.data;
3030
ui.metrics = data.metrics;
3131
ui.statuses = data.status.statuses;
32+
ui.name = data.name;
3233

3334
const overall = data.status.overall;
3435
if (!ui.serverState || (ui.serverState !== overall.state)) {

src/server/config/schema.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import fs from 'fs';
33
import path from 'path';
44
import { get } from 'lodash';
55
import { randomBytes } from 'crypto';
6+
import os from 'os';
67

78
import fromRoot from '../../utils/from_root';
89

@@ -29,6 +30,7 @@ module.exports = () => Joi.object({
2930
}).default(),
3031

3132
server: Joi.object({
33+
name: Joi.string().default(os.hostname()),
3234
host: Joi.string().hostname().default('0.0.0.0'),
3335
port: Joi.number().default(5601),
3436
maxPayloadBytes: Joi.number().default(1048576),

src/server/status/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ module.exports = function (kbnServer, server, config) {
1414
path: '/api/status',
1515
handler: function (request, reply) {
1616
return reply({
17+
name: config.get('server.name'),
1718
status: kbnServer.status.toJSON(),
1819
metrics: kbnServer.metrics
1920
});

src/ui/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ module.exports = async (kbnServer, server, config) => {
6767
buildNum: config.get('pkg.buildNum'),
6868
buildSha: config.get('pkg.buildSha'),
6969
basePath: config.get('server.basePath'),
70+
serverName: config.get('server.name'),
7071
vars: defaults(app.getInjectedVars() || {}, uiExports.defaultInjectedVars),
7172
};
7273

src/ui/public/chrome/api/angular.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ module.exports = function (chrome, internals) {
1717
.value('kbnVersion', internals.version)
1818
.value('buildNum', internals.buildNum)
1919
.value('buildSha', internals.buildSha)
20+
.value('serverName', internals.serverName)
2021
.value('sessionId', Date.now())
2122
.value('chrome', chrome)
2223
.value('esUrl', (function () {

src/ui/public/notify/directives.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import _ from 'lodash';
22
import uiModules from 'ui/modules';
33
import toasterTemplate from 'ui/notify/partials/toaster.html';
4+
import 'ui/notify/notify.less';
5+
46
var notify = uiModules.get('kibana/notify');
57

68
notify.directive('kbnNotifications', function () {

0 commit comments

Comments
 (0)