You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2021/09/20 21:15:14 UTC
[brooklyn-ui] branch master updated: tidy versions display
This is an automated email from the ASF dual-hosted git repository.
heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-ui.git
The following commit(s) were added to refs/heads/master by this push:
new 0c10ba6 tidy versions display
0c10ba6 is described below
commit 0c10ba673a99ba5d4a1722e947346f50228f6658
Author: Alex Heneveld <al...@cloudsoftcorp.com>
AuthorDate: Mon Sep 20 21:35:59 2021 +0100
tidy versions display
---
.../home/app/views/about/about.controller.js | 8 ++---
.../home/app/views/about/about.template.html | 36 ++++++++++++----------
2 files changed, 24 insertions(+), 20 deletions(-)
diff --git a/ui-modules/home/app/views/about/about.controller.js b/ui-modules/home/app/views/about/about.controller.js
index 4c05645..7e2dd6c 100644
--- a/ui-modules/home/app/views/about/about.controller.js
+++ b/ui-modules/home/app/views/about/about.controller.js
@@ -31,7 +31,7 @@ import nodeManagementTemplate from "./node-management/node-management.template.h
const MODULE_NAME = 'states.about';
const BROOKLYN_VERSION = __BROOKLYN_VERSION__;
const BUILD_NAME = __BUILD_NAME__; // if something embedding brooklyn
-const BUILD_VERSION = __BUILD_VERSION__; // if something embedding brooklyn
+const BUILD_VERSION = __BUILD_VERSION__; // if something embedding brooklyn
const BUILD_BRANCH = __BUILD_BRANCH__;
const BUILD_COMMIT_ID = __BUILD_COMMIT_ID__;
@@ -64,14 +64,14 @@ export function aboutStateConfig($stateProvider) {
export function aboutStateController($scope, $rootScope, $element, $q, $uibModal, brBrandInfo, version, states, serverApi) {
$scope.$emit(HIDE_INTERSTITIAL_SPINNER_EVENT);
$scope.getBrandedText = brBrandInfo.getBrandedText;
- $scope.serverVersion = version.data;
+ $scope.brooklynServerVersion = version.data;
$scope.states = states.data;
$scope.buildInfo = {
buildVersion: BUILD_VERSION,
buildName: BUILD_NAME,
buildBranch: BUILD_BRANCH,
buildCommitId: BUILD_COMMIT_ID,
- brooklynVersion: BROOKLYN_VERSION,
+ brooklynUiBuildVersion: BROOKLYN_VERSION,
};
$scope.container = $element[0];
@@ -197,4 +197,4 @@ export function timeAgoFilter() {
return moment(input).fromNow();
}
}
-}
\ No newline at end of file
+}
diff --git a/ui-modules/home/app/views/about/about.template.html b/ui-modules/home/app/views/about/about.template.html
index 85080b4..d9f9f35 100644
--- a/ui-modules/home/app/views/about/about.template.html
+++ b/ui-modules/home/app/views/about/about.template.html
@@ -32,25 +32,27 @@
<h2>Version Information</h2>
<ul class="list-group">
- <li class="list-group-item" ng-if="buildInfo.buildVersion">
+ <li class="list-group-item" ng-if="getBrandedText('product.name')!='Brooklyn'">
<span class="badge">
- {{buildInfo.buildVersion}}
+ {{buildInfo.buildVersion || 'EXT'}}
</span>
<h4 class="list-group-item-heading">{{ getBrandedText('product.name') }}</h4>
</li>
<li class="list-group-item">
- <span class="badge">{{buildInfo.brooklynVersion}}</span>
- <h4 class="list-group-item-heading">Apache Brooklyn UI</h4>
- <small class="list-group-item-text" ng-if="buildInfo.buildBranch || buildInfo.buildCommitId">
- Built from
- <span ng-if="buildInfo.buildBranch">branch <strong>{{buildInfo.buildBranch}}</strong></span>
- <span ng-if="buildInfo.buildCommitId">commit <strong>{{buildInfo.buildCommitId}}</strong></span>
- </small>
- </li>
- <li class="list-group-item">
- <span class="badge" ng-attr-title="{{ serverVersion.buildSha1 && 'Commit ' + serverVersion.buildSha1 }}">
- {{serverVersion.version}}</span>
- <h4 class="list-group-item-heading">Brooklyn Server</h4>
+ <span class="badge" ng-attr-title="{{
+ 'brooklyn-server' +
+ (brooklynServerVersion.buildBranch && brooklynServerVersion.buildBranch!=='UNKNOWN'
+ ? '\n branch='+brooklynServerVersion.buildBranch : '') +
+ (brooklynServerVersion.buildSha1 ? '\n commit=' + (brooklynServerVersion.buildSha1 | limitTo: 8) : '') +
+ (buildInfo.buildBranch && buildInfo.buildBranch !== brooklynServerVersion.buildBranch
+ ? '\nbrooklyn-ui' +
+ (buildInfo.buildBranch && buildInfo.buildBranch !== 'UNKNOWN'
+ ? '\n branch='+buildInfo.buildBranch : '') +
+ (buildInfo.buildSha1 ? '\n commit='+(buildInfo.buildSha1 | limitTo: 8) : '')+'\n'
+ : '')
+ }}">
+ {{brooklynServerVersion.version}}</span>
+ <h4 class="list-group-item-heading">Apache Brooklyn</h4>
</li>
</ul>
@@ -135,8 +137,10 @@
<h2>Feature Information</h2>
<p>This distribution includes the following features:</p>
<ul class="list-group">
- <li ng-repeat="feature in serverVersion.features track by $index" class="list-group-item">
- <span class="badge" ng-attr-title="{{ feature.lastModified && (feature.lastModified | date: 'MMM dd, yyyy @ H:mm:ss.sss')}}">{{feature.version}}</span>
+ <li ng-repeat="feature in brooklynServerVersion.features track by $index" class="list-group-item">
+ <span class="badge" ng-attr-title="{{
+ (feature.lastModified ? (feature.lastModified | date: 'yyyy-MM-dd HH:mm')+'\n' : '') +
+ (feature.buildSha1 ? 'commit='+(feature.buildSha1 | limitTo: 8)+'\n' : '') }}">{{feature.version}}</span>
<h4 class="list-group-item-heading">{{feature.name}}</h4>
<small class="list-group-item-text">{{feature.symbolicName}}</small>
</li>