eagle-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ji...@apache.org
Subject incubator-eagle git commit: [EAGLE-714] Application improvement
Date Tue, 01 Nov 2016 10:09:48 GMT
Repository: incubator-eagle
Updated Branches:
  refs/heads/master 56c2c4114 -> 21fcd7333


[EAGLE-714] Application improvement

* Application detail page display as `N/A`
* use 2 line of input field (jarPath)

Author: zombieJ <smith3816@gmail.com>

Closes #589 from zombieJ/EAGLE-714.


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/21fcd733
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/21fcd733
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/21fcd733

Branch: refs/heads/master
Commit: 21fcd7333e3e11ccf74525fac0c38774eba6e9ed
Parents: 56c2c41
Author: zombieJ <smith3816@gmail.com>
Authored: Tue Nov 1 18:09:40 2016 +0800
Committer: zombieJ <smith3816@gmail.com>
Committed: Tue Nov 1 18:09:40 2016 +0800

----------------------------------------------------------------------
 eagle-server/src/main/webapp/app/dev/index.html |  1 +
 .../partials/alert/policyEdit/advancedMode.html |  3 +-
 .../app/dev/partials/integration/site.html      | 37 +++++++++++-------
 .../src/main/webapp/app/dev/public/css/main.css |  4 ++
 .../app/dev/public/js/components/naBlock.js     | 41 ++++++++++++++++++++
 .../app/dev/public/js/ctrls/alertEditCtrl.js    |  1 +
 6 files changed, 71 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/21fcd733/eagle-server/src/main/webapp/app/dev/index.html
----------------------------------------------------------------------
diff --git a/eagle-server/src/main/webapp/app/dev/index.html b/eagle-server/src/main/webapp/app/dev/index.html
index 4b134a5..2deeea5 100644
--- a/eagle-server/src/main/webapp/app/dev/index.html
+++ b/eagle-server/src/main/webapp/app/dev/index.html
@@ -271,6 +271,7 @@
 		<script src="public/js/components/widget.js" type="text/javascript" charset="utf-8"></script>
 		<script src="public/js/components/staticInclude.js" type="text/javascript" charset="utf-8"></script>
 		<script src="public/js/components/editor.js" type="text/javascript" charset="utf-8"></script>
+		<script src="public/js/components/naBlock.js" type="text/javascript" charset="utf-8"></script>
 
 		<!-- Controllers -->
 		<script src="public/js/ctrls/main.js" type="text/javascript" charset="utf-8"></script>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/21fcd733/eagle-server/src/main/webapp/app/dev/partials/alert/policyEdit/advancedMode.html
----------------------------------------------------------------------
diff --git a/eagle-server/src/main/webapp/app/dev/partials/alert/policyEdit/advancedMode.html
b/eagle-server/src/main/webapp/app/dev/partials/alert/policyEdit/advancedMode.html
index 63129ef..7c3d4f1 100644
--- a/eagle-server/src/main/webapp/app/dev/partials/alert/policyEdit/advancedMode.html
+++ b/eagle-server/src/main/webapp/app/dev/partials/alert/policyEdit/advancedMode.html
@@ -145,7 +145,7 @@
 							{{stream}}
 						</label>
 					</li>
-					<li class="text-warning" ng-if="policy.outputStreams.length === 0">No alert stream
yet.</li>
+					<li class="text-danger" ng-if="policy.outputStreams.length === 0">No alert stream
yet.</li>
 				</ul>
 
 				<label>
@@ -165,6 +165,7 @@
 							<span>{{publisher.properties[field]}}</span>
 						</p>
 					</li>
+					<li class="text-danger" ng-if="policyPublisherList.length === 0">No publisher
yet.</li>
 					<li>
 						<a ng-click="addPublisher()">+ Add Publisher</a>
 					</li>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/21fcd733/eagle-server/src/main/webapp/app/dev/partials/integration/site.html
----------------------------------------------------------------------
diff --git a/eagle-server/src/main/webapp/app/dev/partials/integration/site.html b/eagle-server/src/main/webapp/app/dev/partials/integration/site.html
index e774731..07555d1 100644
--- a/eagle-server/src/main/webapp/app/dev/partials/integration/site.html
+++ b/eagle-server/src/main/webapp/app/dev/partials/integration/site.html
@@ -132,13 +132,15 @@
 								</tr>
 								<tr>
 									<th>View Path</th>
-									<td>{{application.viewPath}}</td>
+									<td>
+										<span na-block="application.viewPath"></span>
+									</td>
 									<th>Version</th>
 									<td>{{application.version}}</td>
 								</tr>
 								<tr>
 									<th>Jar Path</th>
-									<td colspan="3">{{tmpApp.jarPath || application.jarPath}}</td>
+									<td colspan="3" class="text-break">{{tmpApp.jarPath || application.jarPath}}</td>
 								</tr>
 								<tr>
 									<th>Application Class</th>
@@ -150,17 +152,19 @@
 								</tr>
 								<tr>
 									<th>Description</th>
-									<td colspan="3">{{application.description}}</td>
+									<td colspan="3" class="text-break"><span na-block="application.description"></span></td>
 								</tr>
 								<tr>
 									<th>Dependencies</th>
 									<td colspan="3">
-										<ul>
-											<li ng-repeat="dep in application.dependencies track by $index">
-												{{Application.findProvider(dep.type).name}}
-												({{dep.type}})
-											</li>
-										</ul>
+										<div na-block="application.dependencies.length > 0">
+											<ul>
+												<li ng-repeat="dep in application.dependencies track by $index">
+													{{Application.findProvider(dep.type).name}}
+													({{dep.type}})
+												</li>
+											</ul>
+										</div>
 									</td>
 								</tr>
 								<tr ng-if="tmpApp.uuid">
@@ -241,15 +245,15 @@
 									<span class="fa fa-question-circle" uib-tooltip="Application execution mode:
LOCAL/CLUSTER"></span>
 								</label>
 								<select class="form-control" ng-model="tmpApp.mode">
-									<option value="CLUSTER">Submit as Cluster Mode</option>
-									<option VALUE="LOCAL">Submit as Local Mode</option>
+									<option value="CLUSTER">Cluster Mode</option>
+									<option VALUE="LOCAL">Local Mode</option>
 								</select>
 							</div>
 							<div class="form-group">
 								<label>Execution File
 									<span class="fa fa-question-circle" uib-tooltip="Full path of Application Jar
or Class file on eagle server host"></span>
 								</label>
-								<input type="text" class="form-control" ng-model="tmpApp.jarPath" ng-change="checkJarPath()"
/>
+								<textarea class="form-control" ng-model="tmpApp.jarPath" ng-change="checkJarPath()"
rows="2"></textarea>
 							</div>
 						</div>
 
@@ -264,7 +268,7 @@
 							</a>
 						</h5>
 						<div data-id="appGeneral" class="collapse in">
-							<span class="text-muted" ng-if="generalFields.length === 0">N/A</span>
+							<span class="text-muted with-padding" ng-if="generalFields.length === 0">N/A</span>
 							<div class="form-group" ng-class="{'has-warning': !tmpApp.configuration[field.name]}"
ng-repeat="field in generalFields track by $index">
 								<label>
 									{{field.displayName || field.name}}
@@ -282,7 +286,7 @@
 							</a>
 						</h5>
 						<div data-id="appAdvanced" class="collapse in">
-							<span class="text-muted" ng-if="advancedFields.length === 0">N/A</span>
+							<span class="text-muted with-padding" ng-if="advancedFields.length === 0">N/A</span>
 							<div class="form-group" ng-repeat="field in advancedFields track by $index">
 								<label>
 									{{field.displayName || field.name}}
@@ -299,6 +303,7 @@
 							</a>
 						</h5>
 						<div data-id="appCustomize" class="collapse in">
+							<span class="text-muted with-padding" ng-if="customizeFields.length === 0">N/A</span>
 							<div class="form-group" ng-class="{'has-warning': !tmpApp.configuration[field.name]}"
ng-repeat="field in customizeFields track by $index">
 								<label>
 									<a class="fa fa-times" ng-click="removeField(field)" ng-if="field._customize"></a>
@@ -306,7 +311,9 @@
 								</label>
 								<input type="text" class="form-control" placeholder="{{field.description}}" ng-model="tmpApp.configuration[field.name]"
/>
 							</div>
-							<a ng-click="newField()">+ Add Property</a>
+							<div>
+								<a class="with-padding" ng-click="newField()">+ Add Property</a>
+							</div>
 						</div>
 					</div>
 				</div>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/21fcd733/eagle-server/src/main/webapp/app/dev/public/css/main.css
----------------------------------------------------------------------
diff --git a/eagle-server/src/main/webapp/app/dev/public/css/main.css b/eagle-server/src/main/webapp/app/dev/public/css/main.css
index daea5b6..a282d93 100644
--- a/eagle-server/src/main/webapp/app/dev/public/css/main.css
+++ b/eagle-server/src/main/webapp/app/dev/public/css/main.css
@@ -437,3 +437,7 @@ ul > li > p.offset {
 .bsc-datepicker {
 	z-index: 2000;
 }
+
+.with-padding {
+	padding: 15px;
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/21fcd733/eagle-server/src/main/webapp/app/dev/public/js/components/naBlock.js
----------------------------------------------------------------------
diff --git a/eagle-server/src/main/webapp/app/dev/public/js/components/naBlock.js b/eagle-server/src/main/webapp/app/dev/public/js/components/naBlock.js
new file mode 100644
index 0000000..0b86c23
--- /dev/null
+++ b/eagle-server/src/main/webapp/app/dev/public/js/components/naBlock.js
@@ -0,0 +1,41 @@
+/*
+ * 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.
+ */
+
+(function() {
+	'use strict';
+
+	var eagleComponents = angular.module('eagle.components');
+
+	eagleComponents.directive('naBlock', function() {
+		return {
+			scope: {
+				naBlock: "="
+			},
+			restrict: 'AE',
+			transclude: true,
+
+			template:
+			'<div>' +
+				'<span ng-if="naBlock && naBlock !== true">{{naBlock}}</span>' +
+				'<code ng-if="!naBlock">N/A</code>' +
+				'<div ng-if="naBlock === true" ng-transclude></div>' +
+			'</div>',
+			replace: true
+		};
+	});
+})();

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/21fcd733/eagle-server/src/main/webapp/app/dev/public/js/ctrls/alertEditCtrl.js
----------------------------------------------------------------------
diff --git a/eagle-server/src/main/webapp/app/dev/public/js/ctrls/alertEditCtrl.js b/eagle-server/src/main/webapp/app/dev/public/js/ctrls/alertEditCtrl.js
index c06d63d..1c1e018 100644
--- a/eagle-server/src/main/webapp/app/dev/public/js/ctrls/alertEditCtrl.js
+++ b/eagle-server/src/main/webapp/app/dev/public/js/ctrls/alertEditCtrl.js
@@ -326,6 +326,7 @@
 			if(!$scope.policy.parallelismHint) return false;
 			if(!$scope.policy.definition.value) return false;
 			if(!$scope.policy.outputStreams.length) return false;
+			if(!$scope.policyPublisherList.length) return false;
 			return true;
 		};
 


Mime
View raw message