Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Merge pull request #863 from objectiser/HWKBTM-312
Browse files Browse the repository at this point in the history
HWKBTM-312 Integrate BTM into Hawkular
  • Loading branch information
objectiser committed Feb 25, 2016
2 parents ec8e740 + 1e53c9b commit 57037d8
Show file tree
Hide file tree
Showing 11 changed files with 96 additions and 4 deletions.
13 changes: 13 additions & 0 deletions console/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,16 @@
This console application pulls in various bower packages (libs) and Hawt.io 2 plugins (which are also bower packages) to plug-n-play various functionality to the console. Since one of the bower packages it pulls in is our Hawt.io plugin, it loads this plugin and adds it to the nav bar.

For more info on Hawkular UI development, please see: http://www.hawkular.org/docs/dev/ui-dev.html[Hawkular UI Dev Guide]


== BTM/APM Integration

The UI integration is performed by adding the hawkularbtm.js/css files to the _dist_ folder, which are referenced in the _index.html_.

Currently the BTM/APM pages also reference the html files on the server, rather than from the templateCache (to be investigated), so these are also added to the console war.

=== Additional bower dependencies

* angular-xeditable
* angularUtils-pagination

4 changes: 3 additions & 1 deletion console/src/main/scripts/bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
"angular-patternfly": "2.8.1",
"keycloak": "1.8.1",
"angular-wizard": "0.6.1",
"angular-clipboard": "1.3.0"
"angular-clipboard": "1.3.0",
"angular-xeditable": "0.1.10",
"angular-utils-pagination": "0.9.4"
},
"devDependencies": {
"hawtio-core-dts": "2.0.23"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</ol>
</div>
<div class="col-xs-5">
<div class="hk-date-range dropdown" dropdown ng-hide="isAlertsCenterTriggersPage()">
<div class="hk-date-range dropdown" dropdown ng-show="isShowTimeRange()">
<div class="input-group" dropdown-toggle>
<div class="hk-input">
{{offsetName}} <span ng-show="false">{{getFormattedDate()}}</span>
Expand All @@ -44,7 +44,7 @@
</div>
</div>
<div class="hk-heading">
<span class="hk-update pull-right" tooltip-trigger tooltip="Last update" ng-hide="isAlertsCenterTriggersPage()">
<span class="hk-update pull-right" tooltip-trigger tooltip="Last update" ng-show="isShowLastUpdate()">
<i class="fa fa-clock-o"></i>{{lastUpdateTimestamp | date:'HH:mm:ss'}}</span>
<h1 ng-init="(isAppServerPage() && !hkParams.hasOwnProperty('datasourceId')) ? getAppServerFromId(hkParams.resourceId) : (!isAlertsPage() && getUrlFromId(hkParams.resourceId))">{{resourceName || '&nbsp;'}}</h1>
<h1 ng-show="isAlertsPage()">Alert Center</h1>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,21 @@ module Subtab {
return $location.path().indexOf('/hawkular-ui/alerts-center-triggers') === 0;
};

// BTM INTEGRATION START - used in isShowTimeRange() and isShowLastUpdate()
$scope.isBTMPage = () => {
return $location.path().indexOf('/hawkular-ui/btm') === 0 ||
$location.path().indexOf('/hawkular-ui/apm') === 0;
};
// BTM INTEGRATION FINISH

$scope.isShowTimeRange = () => {
return !($scope.isAlertsCenterTriggersPage() || $scope.isBTMPage());
};

$scope.isShowLastUpdate = () => {
return !($scope.isAlertsCenterTriggersPage() || $scope.isBTMPage());
};

$scope.isUrlPage = () => {
return $location.path().indexOf('/hawkular-ui/url/') !== -1 &&
$location.path().indexOf('url-list') === -1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@
<li ng-class="getClass('/hawkular-ui/agent-installer/')" >
<a href="/hawkular-ui/agent-installer/view">Install Agent</a>
</li>
<!-- BTM INTEGRATION START -->
<li ng-class="getClass('/hawkular-ui/apm')" >
<a href="/hawkular-ui/apm">Application Performance</a>
</li>
<li ng-class="getClass('/hawkular-ui/btm')" >
<a href="/hawkular-ui/btm">Business Transactions</a>
</li>
<!-- BTM INTEGRATION FINISH -->
<li class="pull-right">
<hk-message-center></hk-message-center>
</li>
Expand Down
10 changes: 10 additions & 0 deletions console/src/main/webapp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@

<!-- bower:css -->
<!-- endbower -->

<!-- BTM INTEGRATION START -->
<link href="dist/hawkularbtm.css" rel="stylesheet">
<!-- BTM INTEGRATION FINISH -->

<link href="dist/hawkular-console.css?v=${hawkular.console.timestamp}" rel="stylesheet">

<!-- ES6/ES6 shim -->
Expand Down Expand Up @@ -87,6 +92,11 @@

<!-- add any scripts under dist/ here -->
<script src="dist/hawkular-console.js?v=${hawkular.console.timestamp}"></script>

<!-- BTM INTEGRATION START -->
<script src="dist/hawkularbtm.js"></script>
<!-- BTM INTEGRATION FINISH -->

<script>
var title = 'HAWKULAR: ' + HawkularVersion;
document.getElementById("hawkularLogo").title = title;
Expand Down
2 changes: 2 additions & 0 deletions dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,8 @@
<tasks>
<replace token="org.hawkular.nest" value="org.hawkular.bus" file="${project.build.directory}/${project.build.finalName}/modules/org/hawkular/nest/main/deployments/hawkular-metrics-component.war//WEB-INF/jboss-deployment-structure.xml" />
<replace token="MaxMetaspaceSize=256m" value="MaxMetaspaceSize=512m" file="${project.build.directory}/${project.build.finalName}/bin/standalone.conf" />
<replace token="Xms64m" value="Xms256m" file="${project.build.directory}/${project.build.finalName}/bin/standalone.conf" />
<replace token="Xmx512m" value="Xmx2048m" file="${project.build.directory}/${project.build.finalName}/bin/standalone.conf" />
</tasks>
</configuration>
</execution>
Expand Down
22 changes: 22 additions & 0 deletions dist/src/main/resources/standalone.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@
<xsl:with-param name="deployment.name" select="'hawkular-rest-api.war'" />
<xsl:with-param name="credential.secret" select="*[local-name()='secure-deployment']/*[local-name()='credential' and @name='secret']/text()"/>
</xsl:call-template>

<!-- BTM INTEGRATION START -->
<xsl:call-template name="secure-deployment">
<xsl:with-param name="deployment.name" select="'hawkular-btm-server.war'" />
<xsl:with-param name="credential.secret" select="*[local-name()='secure-deployment']/*[local-name()='credential' and @name='secret']/text()"/>
</xsl:call-template>
<!-- BTM INTEGRATION FINISH -->
</xsl:copy>
</xsl:template>

Expand Down Expand Up @@ -187,6 +194,14 @@
</level>
</logger>

<!-- BTM INTEGRATION START -->
<logger category="org.hawkular.btm">
<level>
<xsl:attribute name="name"><xsl:text disable-output-escaping="yes">${hawkular.log.btm:INFO}</xsl:text></xsl:attribute>
</level>
</logger>
<!-- BTM INTEGRATION FINISH -->

<logger category="com.datastax.driver">
<level>
<xsl:attribute name="name"><xsl:text disable-output-escaping="yes">${hawkular.log.datastax.driver:INFO}</xsl:text></xsl:attribute>
Expand Down Expand Up @@ -269,6 +284,13 @@
<jms-queue name="hawkular/metrics/gauges/new" entries="java:/queue/hawkular/metrics/gauges/new"/>
<jms-queue name="hawkular/metrics/counters/new" entries="java:/queue/hawkular/metrics/counters/new"/>
<jms-queue name="hawkular/metrics/availability/new" entries="java:/queue/hawkular/metrics/availability/new"/>

<!-- BTM INTEGRATION START -->
<jms-topic name="BusinessTransactions" entries="java:/BusinessTransactions"/>
<jms-topic name="CompletionTimes" entries="java:/CompletionTimes"/>
<jms-topic name="NodeDetails" entries="java:/NodeDetails"/>
<jms-topic name="Notifications" entries="java:/Notifications"/>
<!-- BTM INTEGRATION FINISH -->
</xsl:copy>
</xsl:template>

Expand Down
4 changes: 4 additions & 0 deletions feature-pack/feature-pack-build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
<dependencies>
<artifact name="org.hawkular.accounts:hawkular-accounts-feature-pack" />
<artifact name="org.hawkular.agent:hawkular-wildfly-agent-feature-pack" />

<!-- BTM INTEGRATION START -->
<artifact name="org.hawkular.btm:hawkular-btm-integrated-feature-pack" />
<!-- BTM INTEGRATION FINISH -->
</dependencies>

<config>
Expand Down
17 changes: 16 additions & 1 deletion feature-pack/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,21 @@
</exclusions>
</dependency>

<!-- BTM INTEGRATION START -->
<dependency>
<groupId>org.hawkular.btm</groupId>
<artifactId>hawkular-btm-integrated-feature-pack</artifactId>
<version>${version.org.hawkular.btm}</version>
<type>zip</type>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- BTM INTEGRATION FINISH -->

</dependencies>

<build>
Expand Down Expand Up @@ -158,4 +173,4 @@
</plugin>
</plugins>
</build>
</project>
</project>
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
<version.org.hawkular.accounts>2.0.21.Final</version.org.hawkular.accounts>
<version.org.hawkular.agent>0.16.0.Final</version.org.hawkular.agent>
<version.org.hawkular.alerts>1.0.0.Final</version.org.hawkular.alerts>
<version.org.hawkular.btm>0.7.1.Final</version.org.hawkular.btm>
<version.org.hawkular.cmdgw>0.10.11.Final</version.org.hawkular.cmdgw>
<version.org.hawkular.commons>0.3.5.Final</version.org.hawkular.commons>
<version.org.hawkular.inventory>0.12.2.Final</version.org.hawkular.inventory>
Expand Down

1 comment on commit 57037d8

@mtho11
Copy link
Member

@mtho11 mtho11 commented on 57037d8 Feb 26, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, this is first time the UI design board has seen these screens and the high level menus that BTM is at doesn't seem to make sense to me. Maybe our UxD designer Liz Clayton can look through this and approve.

Please sign in to comment.