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 2018/08/20 09:39:27 UTC
[07/12] brooklyn-ui git commit: make Home a Brooklyn UI module
make Home a Brooklyn UI module
previously it was just a WAR, not including it registry, which makes it hard for downstream projects to change
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/commit/82d37c47
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/tree/82d37c47
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/diff/82d37c47
Branch: refs/heads/master
Commit: 82d37c474b42b8dfc8afc2683d7723b7f201e1f7
Parents: 5d64b30
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Thu Aug 9 00:20:37 2018 +0100
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Thu Aug 9 00:20:37 2018 +0100
----------------------------------------------------------------------
.../src/main/resources/ui-module/config.yaml | 20 ++++++++++++++++++++
ui-modules/home/src/main/webapp/WEB-INF/web.xml | 4 ++++
.../module-links-drawer.template.html | 4 ++--
.../module-links-navbar.template.html | 3 ++-
4 files changed, 28 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/82d37c47/ui-modules/home/src/main/resources/ui-module/config.yaml
----------------------------------------------------------------------
diff --git a/ui-modules/home/src/main/resources/ui-module/config.yaml b/ui-modules/home/src/main/resources/ui-module/config.yaml
new file mode 100644
index 0000000..5bc77a6
--- /dev/null
+++ b/ui-modules/home/src/main/resources/ui-module/config.yaml
@@ -0,0 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+name: Home
+slug: ${project.artifactId}
+icon: fa-home
http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/82d37c47/ui-modules/home/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/ui-modules/home/src/main/webapp/WEB-INF/web.xml b/ui-modules/home/src/main/webapp/WEB-INF/web.xml
index 992d1f3..4fa41b8 100644
--- a/ui-modules/home/src/main/webapp/WEB-INF/web.xml
+++ b/ui-modules/home/src/main/webapp/WEB-INF/web.xml
@@ -28,6 +28,10 @@
<welcome-file>index.html</welcome-file>
</welcome-file-list>
+ <listener>
+ <listener-class>org.apache.brooklyn.ui.modularity.module.api.UiModuleListener</listener-class>
+ </listener>
+
<!--FILTERS :: START-->
<filter>
<filter-name>ui-module-filter</filter-name>
http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/82d37c47/ui-modules/utils/module-links/module-links-drawer.template.html
----------------------------------------------------------------------
diff --git a/ui-modules/utils/module-links/module-links-drawer.template.html b/ui-modules/utils/module-links/module-links-drawer.template.html
index 6327b27..f547210 100644
--- a/ui-modules/utils/module-links/module-links-drawer.template.html
+++ b/ui-modules/utils/module-links/module-links-drawer.template.html
@@ -18,7 +18,7 @@
-->
<div class="ui-module-nav-drawer-container">
<div ng-repeat="module in modules track by id" ng-if="modules">
- <a ng-href="module.path">
+ <a ng-href="module.path" ng-if="module.path">
<i class="module-icon fa {{module.icon}}"></i>
<div class="module-name">{{module.name}}</div>
</a>
@@ -31,4 +31,4 @@
</li>
</ul>
</div>
-</div>
\ No newline at end of file
+</div>
http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/82d37c47/ui-modules/utils/module-links/module-links-navbar.template.html
----------------------------------------------------------------------
diff --git a/ui-modules/utils/module-links/module-links-navbar.template.html b/ui-modules/utils/module-links/module-links-navbar.template.html
index 60e5f37..55b1019 100644
--- a/ui-modules/utils/module-links/module-links-navbar.template.html
+++ b/ui-modules/utils/module-links/module-links-navbar.template.html
@@ -33,12 +33,13 @@
</span>
</a>
<ul class="dropdown-menu ui-modules" uib-dropdown-menu>
+ <!-- put home first -->
<li role="menuitem"><a href="/" ng-class="{active: ctrl.isModuleActive('/')}">
<i class="ui-module-icon fa fa-fw fa-home"></i>
<span class="ui-module-name">Home</span>
</a></li>
<li role="menuitem" ng-repeat="module in ctrl.modules track by module.id">
- <a ng-href="{{module.path}}" class="module" ng-class="{active: ctrl.isModuleActive(module.path)}">
+ <a ng-href="{{module.path}}" class="module" ng-class="{active: ctrl.isModuleActive(module.path)}" ng-if="module.path">
<i class="ui-module-icon fa fa-fw {{module.icon}}"></i>
<span class="ui-module-name">{{module.name}}</span>
</a>