Skip to content

Commit

Permalink
Move build-info to status page (elastic#13341)
Browse files Browse the repository at this point in the history
* Move build-info to status page
* Remove info property from management section
  • Loading branch information
timroes authored and Tim Roes committed Aug 8, 2017
1 parent 9bdba7c commit ea2a31d
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 37 deletions.
4 changes: 1 addition & 3 deletions src/core_plugins/kibana/public/management/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ require('ui/index_patterns/route_setup/load_default')({

uiModules
.get('apps/management')
.directive('kbnManagementApp', function (Private, $location, timefilter, buildNum, buildSha) {
.directive('kbnManagementApp', function (Private, $location, timefilter) {
return {
restrict: 'E',
template: appTemplate,
Expand All @@ -46,8 +46,6 @@ uiModules
item.active = `#${$location.path()}`.indexOf(item.url) > -1;
});
}

management.getSection('kibana').info = `Build ${buildNum}, Commit SHA ${buildSha.substr(0, 8)}`;
}
};
});
Expand Down
14 changes: 0 additions & 14 deletions src/core_plugins/kibana/public/management/landing.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<div
ng-if="section.visibleItems.length > 0"
ng-repeat="section in sections"
ng-class="{ 'management-section-info-expanded': section.showInfo }"
class="page-row"
>
<div class="kuiPanel management-panel">
Expand All @@ -22,15 +21,6 @@
{{::section.display}}
</div>
</div>

<div class="kuiPanelHeaderSection" ng-if="section.info">
<div class="kuiText">
<span
class="fa fa-info-circle management-panel__heading-icon--secondary"
ng-click="section.showInfo = !!!section.showInfo"
></span>
</div>
</div>
</div>

<div class="kuiPanelBody management-panel__body">
Expand All @@ -55,10 +45,6 @@
</li>
</ul>
</div>

<div class="management-section-info">
{{::section.info}}
</div>
</div>
</div>
</div>
Expand Down
18 changes: 0 additions & 18 deletions src/core_plugins/kibana/public/management/styles/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,6 @@ kbn-management-landing {
}
}

.management-section-info {
bottom: 10px;
display: none;
color: @kibanaPink1;
font-size: 0.8em;
position: absolute;
}

.management-section-info-expanded {
.management-section-info {
display: block;
}
}

/**
* 1. Set icon size.
* 2. Hack the panel title to move to the left a bit.
Expand Down Expand Up @@ -102,10 +88,6 @@ kbn-management-landing {
background-image: url("~ui/icons/logstash-gray.svg");
}

.management-panel__heading-icon--secondary {
font-size: 0.9em;
padding: 5px;
}
}

kbn-management-objects {
Expand Down
6 changes: 6 additions & 0 deletions src/core_plugins/status_page/public/status_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,10 @@ <h4 ng-if="!ui.statuses && !ui.loading" class="statuses_missing">
</tr>
</table>
</div>

<footer class="row">
<div class="col-xs-12 text-right build-info">
Build {{::ui.buildInfo.num}}, Commit SHA {{::ui.buildInfo.sha}}
</div>
</footer>
</div>
7 changes: 6 additions & 1 deletion src/core_plugins/status_page/public/status_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ import { uiModules } from 'ui/modules';

const chrome = require('ui/chrome')
.setRootTemplate(require('plugins/status_page/status_page.html'))
.setRootController('ui', function ($http) {
.setRootController('ui', function ($http, buildNum, buildSha) {
const ui = this;
ui.loading = false;

ui.buildInfo = {
num: buildNum,
sha: buildSha.substr(0, 8)
};

ui.refresh = function () {
ui.loading = true;

Expand Down
4 changes: 4 additions & 0 deletions src/core_plugins/status_page/public/status_page.less
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,7 @@
.overall_state_red {
.state(@status-red, @icon-red);
}

.build-info {
color: #555;
}
1 change: 0 additions & 1 deletion src/ui/public/management/section.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export class ManagementSection {
* @param {number|null} options.order
* @param {string|null} options.display - defaults to id
* @param {string|null} options.url - defaults to ''
* @param {string|null} options.info
* @param {boolean|null} options.visible - defaults to true
* @param {boolean|null} options.disabled - defaults to false
* @param {string|null} options.tooltip - defaults to ''
Expand Down

0 comments on commit ea2a31d

Please sign in to comment.