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 #411 from jpkrohling/PoC-AccessPortal
Browse files Browse the repository at this point in the history
HAWKULAR-503 - Red Hat Access Integration
  • Loading branch information
mtho11 committed Aug 24, 2015
2 parents 590062a + 219bea1 commit 4bb22eb
Show file tree
Hide file tree
Showing 26 changed files with 22,657 additions and 2 deletions.
28 changes: 28 additions & 0 deletions console/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@
<node.version>v0.12.7</node.version>
<node.npm.version>2.13.2</node.npm.version>
<node.maven.plugin.version>0.0.23</node.maven.plugin.version>
<hawkular.checkstyle.excludes>
release.properties,
**/*.d.ts,
**/vendor/**/*.js,
**/vendor/**/*.css,
**/vendor/fonts/*.*,
</hawkular.checkstyle.excludes>
</properties>

<dependencies>
Expand Down Expand Up @@ -117,6 +124,27 @@
</webResources>
</configuration>
</plugin>

<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<configuration>
<excludes combine.children="append">
<exclude>**/vendor/**/*.js</exclude>
<exclude>**/vendor/**/*.css</exclude>
<exclude>**/vendor/fonts/*.*</exclude>
</excludes>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<excludes>${hawkular.checkstyle.excludes}</excludes>
</configuration>
</plugin>

</plugins>

</build>
Expand Down
31 changes: 29 additions & 2 deletions console/src/main/scripts/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,37 @@ gulp.task('copy-kettle-js', ['build-live','set-server-path'] , function() {
.pipe(gulp.dest(config.serverPath));
});

gulp.task('copy-vendor-fonts', function(done) {
var src = [config.srcPrefix + 'plugins/**/vendor/fonts/*.*'];

gulp.src(src)
.pipe(gulp.dest(config.dist)).on('end', function(){
done();
});
});

gulp.task('copy-vendor-js', function(done) {
var src = [config.srcPrefix + 'plugins/**/vendor/**/*.js'];

gulp.src(src)
.pipe(gulp.dest(config.dist)).on('end', function(){
done();
});
});

gulp.task('copy-vendor-css', function(done) {
var src = [config.srcPrefix + 'plugins/**/vendor/**/*.css'];

gulp.src(src)
.pipe(gulp.dest(config.dist)).on('end', function(){
done();
});
});

gulp.task('copy-kettle-css', ['less-live','set-server-path'] , function() {
gulp.src(['dist/hawkular-console.css'])
.pipe(gulp.dest(config.serverPath));
});

gulp.task('build', ['bower', 'path-adjust', 'tslint', 'tsc', 'less', 'template', 'concat', 'clean']);
gulp.task('build-live', ['copy-sources', 'bower', 'path-adjust', 'tslint-watch', 'tsc-live', 'less-live', 'template-live', 'concat-live']);
gulp.task('build', ['bower', 'path-adjust', 'tslint', 'tsc', 'less', 'template', 'concat', 'copy-vendor-js', 'copy-vendor-css', 'copy-vendor-fonts', 'clean']);
gulp.task('build-live', ['copy-sources', 'bower', 'path-adjust', 'tslint-watch', 'tsc-live', 'less-live', 'template-live', 'concat-live', 'copy-vendor-js', 'copy-vendor-css', 'copy-vendor-fonts']);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<iframe id="myCasesWindow" width="100%" frameborder="0" src="/support.html#/case/list" scrolling="auto"
data-ng-controller="AccessPortal.AccessPortalMainController as accessPortalMain">
</iframe>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<iframe id="openCaseWindow" width="100%" frameborder="0" src="/support.html#/case/new" scrolling="auto"
data-ng-controller="AccessPortal.AccessPortalMainController as accessPortalMain">
</iframe>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<iframe id="searchWindow" width="100%" frameborder="0" src="/support.html#/search" scrolling="auto"
data-ng-controller="AccessPortal.AccessPortalMainController as accessPortalMain">
</iframe>
19 changes: 19 additions & 0 deletions console/src/main/scripts/plugins/accessPortal/includes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
///
/// Copyright 2015 Red Hat, Inc. and/or its affiliates
/// and other contributors as indicated by the @author tags.
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///

/// <reference path="../includes.ts"/>
/// <reference path="../../libs/hawtio-utilities/defs.d.ts"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright 2015 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
///
/// Copyright 2015 Red Hat, Inc. and/or its affiliates
/// and other contributors as indicated by the @author tags.
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///

module AccessPortal {
export var pluginName = 'RedhatAccessCases';
export var log:Logging.Logger = Logger.get(pluginName);
export var templatePath = 'plugins/accessPortal/html';
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
///
/// Copyright 2015 Red Hat, Inc. and/or its affiliates
/// and other contributors as indicated by the @author tags.
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///

/// <reference path='accessPortalGlobals.ts'/>
module AccessPortal {
export var _module = angular.module(AccessPortal.pluginName, ['ui.bootstrap']);

_module.config([
'$routeProvider', 'HawtioNavBuilderProvider',
($routeProvider, builder:HawtioMainNav.BuilderFactory) => {

$routeProvider
.when(
'/hawkular-ui/access/search',
{templateUrl: builder.join(AccessPortal.templatePath, 'search.html')}
)
.when(
'/hawkular-ui/access/openCase',
{templateUrl: builder.join(AccessPortal.templatePath, 'open_case.html')}
)
.when(
'/hawkular-ui/access/myCases',
{templateUrl: builder.join(AccessPortal.templatePath, 'my_cases.html')}
);
}]);

export var AccessPortalMainController = _module.controller('AccessPortal.AccessPortalMainController', [
'$window', ($window) => {
var iframeHeight = parseInt($window.innerHeight * 0.8, 10);

['myCasesWindow', 'openCaseWindow', 'searchWindow'].forEach((iframeId) => {
var iframeWindow = document.getElementById(iframeId);
if (iframeWindow) {
iframeWindow['height'] = iframeHeight + 'px';
}
});
}]);

hawtioPluginLoader.addModule(AccessPortal.pluginName);
}

0 comments on commit 4bb22eb

Please sign in to comment.