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 #294 from vrockai/refactorMove
Browse files Browse the repository at this point in the history
HAWKULAR-346: Console dir structure refactoring
  • Loading branch information
mtho11 committed Jul 7, 2015
2 parents 6de0f5b + 38328c5 commit bcd32bc
Show file tree
Hide file tree
Showing 123 changed files with 51 additions and 349 deletions.
10 changes: 5 additions & 5 deletions ui/README.adoc → console/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ npm modules and bower packages. Be aware, this causes the libraries not being up
== Hawkular-ui-components development

For the ease of development we're using the watch feature of the gulp tool. Gulp can watch for changes in source files
and update the compiled console accordingly. To use this feature, you must start Hawkular from the
`$HAWKULAR_ROOT/dist/target/hawkular-x.y.x-SNAPSHOT/wildfly-x.x.z.Final/` directory. Once the server is up and running you have to
start the actual gulp task responsible for watching the changes. To achieve this, traverse to the
and update the compiled console accordingly. To use this feature, you must start Hawkular from the
`$HAWKULAR_ROOT/dist/target/hawkular-x.y.x-SNAPSHOT/wildfly-x.x.z.Final/` directory. Once the server is up and running you have to
start the actual gulp task responsible for watching the changes. To achieve this, traverse to the
`$HAWKULAR_ROOT/ui/console/target/gulp-build/` directory and run:

`gulp watch-server`

The advantage of this approach is, that is scans for file changes in the source directory and apply them directly
into the target directory (`$HAWKULAR_ROOT/dist/target/hawkular-x.y.x-SNAPSHOT/wildfly-x.y.z.Final/`), which is suitable for console
The advantage of this approach is, that is scans for file changes in the source directory and apply them directly
into the target directory (`$HAWKULAR_ROOT/dist/target/hawkular-x.y.x-SNAPSHOT/wildfly-x.y.z.Final/`), which is suitable for console
developing since it doesn't require the whole maven build to see the actual changes in the console UI.

== Other packages development
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ var gulp = require('gulp'),

// CONSTANTS

var POM_MAIN_PATH = '../../../../pom.xml';
var DIST_TARGET_PATH = '../../../../dist/target/';
var POM_MAIN_PATH = '../../../pom.xml';
var DIST_TARGET_PATH = '../../../dist/target/';
var WF_CONSOLE_PATH = 'modules/org/hawkular/nest/main/deployments/hawkular-console.war/dist/';

var plugins = gulpLoadPlugins({});
Expand Down Expand Up @@ -181,8 +181,7 @@ var gulpTemplate = function(){
root: '',
base: function(file){
var filename = /[^/]*$/.exec( file.relative).input;
var prefixIndex = filename.indexOf('/') + 1;
return filename.substring(prefixIndex, filename.length);
return 'plugins/' + filename;
},
standalone: true,
module: config.templateModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
/// limitations under the License.
///

/// <reference path="../../../libs/hawtio-utilities/defs.d.ts"/>
/// <reference path="../../../libs/hawtio-oauth/defs.d.ts"/>
/// <reference path="../../libs/hawtio-utilities/defs.d.ts"/>
/// <reference path="../../libs/hawtio-oauth/defs.d.ts"/>
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
/// limitations under the License.
///

/// <reference path="../../../libs/hawtio-utilities/defs.d.ts"/>
/// <reference path="../../libs/hawtio-utilities/defs.d.ts"/>
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module Alert {
alert: '=hkAlert',
refresh: '&hkRefresh'
};
public templateUrl = 'plugins/alert/html/alert.html';
public templateUrl = 'plugins/directives/alert/html/alert.html';


constructor(private HawkularAlert) {
Expand Down Expand Up @@ -58,7 +58,7 @@ module Alert {
alertList: '=hkAlertList',
limit: '=hkLimit'
};
public templateUrl = 'plugins/alert/html/alertList.html';
public templateUrl = 'plugins/directives/alert/html/alertList.html';

constructor() {
this.link = (scope: any, element: ng.IAugmentedJQuery, attrs: ng.IAttributes) => {
Expand All @@ -84,14 +84,14 @@ module Alert {
}
}

class HkTimeInterval {
export class HkTimeInterval {

public link: (scope: any, element: ng.IAugmentedJQuery, attrs: ng.IAttributes) => void;
public replace = 'true';
public scope = {
hkTime: '='
};
public templateUrl = 'plugins/alert/html/timeInterval.html';
public templateUrl = 'plugins/directives/alert/html/timeInterval.html';

public static Factory() {
var directive = () => {
Expand All @@ -106,5 +106,5 @@ module Alert {

_module.directive('hkAlertPanelList', Alert.HkAlertPanelList.Factory());
_module.directive('hkAlertPanel', Alert.HkAlertPanel.Factory());
_module.directive('hkTimeInterval', HkTimeInterval.Factory());
_module.directive('hkTimeInterval', Alert.HkTimeInterval.Factory());
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
/// limitations under the License.
///

/// <reference path="../../../libs/hawtio-utilities/defs.d.ts"/>
/// <reference path="../vendor/moment/moment.d.ts"/>
/// <reference path="../../libs/hawtio-utilities/defs.d.ts"/>
/// <reference path="vendor/moment/moment.d.ts"/>
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@import "../../../../../libs/patternfly/components/bootstrap/less/variables.less";
@import "../../../../../libs/patternfly/components/bootstrap/less/mixins.less";
@import "../../../../../libs/patternfly/less/variables.less";
@import "../../../../libs/patternfly/components/bootstrap/less/variables.less";
@import "../../../../libs/patternfly/components/bootstrap/less/mixins.less";
@import "../../../../libs/patternfly/less/variables.less";

.navbar-pf {
margin-bottom: @grid-gutter-width/4;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module Sidebar {

export var log:Logging.Logger = Logger.get(pluginName);

export var templatePath = "plugins/sidebar/html/sidebar.html";
export var templatePath = "plugins/directives/sidebar/html/sidebar.html";

export var globalEnvironmentId = "test";
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@import "../../../../../libs/patternfly/components/bootstrap/less/variables.less";
@import "../../../../../libs/patternfly/components/bootstrap/less/mixins.less";
@import "../../../../../libs/patternfly/less/variables.less";
@import "../../../../libs/patternfly/components/bootstrap/less/variables.less";
@import "../../../../libs/patternfly/components/bootstrap/less/mixins.less";
@import "../../../../libs/patternfly/less/variables.less";

.hk-screen-top-nav {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module Topbar {

export var log:Logging.Logger = Logger.get(pluginName);

export var templatePath = "plugins/topbar/html/topbar.html";
export var templatePath = "plugins/directives/topbar/html/topbar.html";

export var globalEnvironmentId = "test";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
/// limitations under the License.
///

/// <reference path="../../../libs/hawtio-utilities/defs.d.ts"/>
/// <reference path="../../libs/hawtio-utilities/defs.d.ts"/>
20 changes: 20 additions & 0 deletions console/src/main/scripts/plugins/metrics/includes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
///
/// 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="../../libs/hawtio-utilities/defs.d.ts"/>
/// <reference path="../../libs/hawtio-core-dts/defs.d.ts"/>
/// <reference path="../directives/vendor/moment/moment.d.ts"/>
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@import "../../../../../libs/patternfly/components/bootstrap/less/variables.less";
@import "../../../../../libs/patternfly/components/bootstrap/less/mixins.less";
@import "../../../../../libs/patternfly/less/variables.less";
@import "../../../libs/patternfly/components/bootstrap/less/variables.less";
@import "../../../libs/patternfly/components/bootstrap/less/mixins.less";
@import "../../../libs/patternfly/less/variables.less";

//variables override

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</licenses>

<modules>
<module>ui/console</module>
<module>console</module>
<module>modules/pinger</module>
<module>modules/avail-creator</module>
<module>dist</module>
Expand Down
64 changes: 0 additions & 64 deletions ui/console/src/main/scripts/plugins/accounts/index.html

This file was deleted.

50 changes: 0 additions & 50 deletions ui/console/src/main/scripts/plugins/alerts/index.html

This file was deleted.

72 changes: 0 additions & 72 deletions ui/console/src/main/scripts/plugins/directives/index.html

This file was deleted.

0 comments on commit bcd32bc

Please sign in to comment.