AMBARI-20479. Workflow manager is only showing 10 actions for a workflow in 
dashboard (Madhan Mohan Reddy via pallavkul)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/52186645
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/52186645
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/52186645

Branch: refs/heads/branch-feature-AMBARI-12556
Commit: 52186645d66f1cec42a2e16d1c0177f47d0cd585
Parents: ddeb17a
Author: pallavkul <[email protected]>
Authored: Thu Mar 16 22:54:13 2017 +0530
Committer: pallavkul <[email protected]>
Committed: Thu Mar 16 22:54:13 2017 +0530

----------------------------------------------------------------------
 .../ui/app/domain/workflow-importer.js          |  2 +-
 .../resources/ui/app/routes/design/jobtab.js    |  2 +-
 .../src/main/resources/ui/app/styles/app.less   | 18 +++++++-
 .../components/workflow-job-action.hbs          | 14 +++----
 .../components/workflow-job-details.hbs         | 44 +++++++++++---------
 5 files changed, 51 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/52186645/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-importer.js
----------------------------------------------------------------------
diff --git 
a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-importer.js 
b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-importer.js
index 5d8d0a0..84a789d 100644
--- 
a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-importer.js
+++ 
b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-importer.js
@@ -68,7 +68,7 @@ var WorkflowImporter= Ember.Object.extend({
   },
   processWorkflowActionVersions(workflowAppJson, workflow, errors) {
     var importedWfActionVersions = Ember.Map.create();
-    var 
actions=workflowAppJson.action.length?workflowAppJson.action:[workflowAppJson.action];
+    var actions=workflowAppJson.action ? 
(workflowAppJson.action.length?workflowAppJson.action:[workflowAppJson.action]):[];
     actions.forEach(function(wfAction) {
       var wfActionType = Object.keys(wfAction)[0];
       var wfActionXmlns = wfAction[wfActionType]._xmlns;

http://git-wip-us.apache.org/repos/asf/ambari/blob/52186645/contrib/views/wfmanager/src/main/resources/ui/app/routes/design/jobtab.js
----------------------------------------------------------------------
diff --git 
a/contrib/views/wfmanager/src/main/resources/ui/app/routes/design/jobtab.js 
b/contrib/views/wfmanager/src/main/resources/ui/app/routes/design/jobtab.js
index 7d0fa92..3fecbaa 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/routes/design/jobtab.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/routes/design/jobtab.js
@@ -37,7 +37,7 @@ export default Ember.Route.extend({
     return deferred.promise;
   },
   model : function(params){
-    return 
this.getJobInfo(Ember.ENV.API_URL+'/v2/job/'+params.id+'?show=info&timezone=GMT&offset=1&len='+Ember.ENV.PAGE_SIZE).catch(function(){
+    return 
this.getJobInfo(Ember.ENV.API_URL+'/v2/job/'+params.id+'?show=info&timezone=GMT&offset=1').catch(function(){
         return {error : "Remote API Failed"};
       }).then(function(response){
       if (typeof response === "string") {

http://git-wip-us.apache.org/repos/asf/ambari/blob/52186645/contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less 
b/contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less
index 837276b..673ae6a 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less
@@ -1325,7 +1325,9 @@ input:invalid {
 
 .cy-note {
   color: #777;
-  padding-right: 10px;
+  padding-right: 40px;
+  position: absolute;
+  width: 100%;
 }
 
 .overlay_node_editor {
@@ -1800,3 +1802,17 @@ input:invalid {
   filter: alpha(opacity=50);
   opacity: .5;
 }
+
+#actions-list-header, #actions-list-body {
+  margin-bottom: 0px;
+}
+
+#actions-list-header-conatiner {
+  padding-right: 16px;
+}
+
+#actions-list-body-conatiner {
+  max-height: 150px;
+  overflow-y: scroll;
+  margin-bottom: 10px;
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/52186645/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-job-action.hbs
----------------------------------------------------------------------
diff --git 
a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-job-action.hbs
 
b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-job-action.hbs
index fe4c892..c71a7fd 100644
--- 
a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-job-action.hbs
+++ 
b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-job-action.hbs
@@ -15,13 +15,13 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 }}
-<td class="pointer action-link" {{action 'getActionDetails' 
actionInfo}}>{{actionInfo.name}}</td>
-<td>{{actionInfo.type}}</td>
-<td>{{actionInfo.status}}</td>
-<td>{{actionInfo.transition}}</td>
-<td>{{actionInfo.startTime}}</td>
-<td>{{actionInfo.endTime}}</td>
-<td>
+<td class="pointer action-link col-xs-2" {{action 'getActionDetails' 
actionInfo}}>{{actionInfo.name}}</td>
+<td class="col-xs-1">{{actionInfo.type}}</td>
+<td class="col-xs-1">{{actionInfo.status}}</td>
+<td class="col-xs-2">{{actionInfo.transition}}</td>
+<td class="col-xs-2">{{actionInfo.startTime}}</td>
+<td class="col-xs-2">{{actionInfo.endTime}}</td>
+<td class="col-xs-1">
   {{#if validTrackerUrl}}
     <a target="_blank" href="{{actionInfo.consoleUrl}}"><i class="fa 
fa-external-link action-link" aria-hidden="true"></i></a>
   {{else}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/52186645/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-job-details.hbs
----------------------------------------------------------------------
diff --git 
a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-job-details.hbs
 
b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-job-details.hbs
index dd972b9..0c5257e 100644
--- 
a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-job-details.hbs
+++ 
b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-job-details.hbs
@@ -70,24 +70,30 @@
     </div>
   </div>
   <div role="tabpanel" class="tab-pane" id="jobAction">
-    <table id="actions-list" class="table listing job-listing table-striped 
table-hover table-bordered">
-      <thead>
-        <tr>
-          <th>Name</th>
-          <th>Type</th>
-          <th>Status</th>
-          <th>Transition</th>
-          <th>Start Time</th>
-          <th>End Time</th>
-          <th>Job Url</th>
-        </tr>
-      </thead>
-      <tbody>
-        {{#each model.actions as |actionInfo|}}        
-          {{workflow-job-action actionInfo=actionInfo 
getActionDetails="getActionDetails"}}
-        {{/each}}
-      </tbody>
-    </table>
+    <div id="actions-list-header-conatiner">
+      <table id="actions-list-header" class="table listing job-listing 
table-striped table-hover table-bordered">
+        <thead>
+          <tr>
+            <th class="col-xs-2">Name</th>
+            <th class="col-xs-1">Type</th>
+            <th class="col-xs-1">Status</th>
+            <th class="col-xs-2">Transition</th>
+            <th class="col-xs-2">Start Time</th>
+            <th class="col-xs-2">End Time</th>
+            <th class="col-xs-1">Job Url</th>
+          </tr>
+        </thead>
+      </table>
+    </div>
+    <div id="actions-list-body-conatiner">
+      <table id="actions-list-body" class="table listing job-listing 
table-striped table-hover table-bordered">
+        <tbody>
+          {{#each model.actions as |actionInfo|}}
+            {{workflow-job-action actionInfo=actionInfo 
getActionDetails="getActionDetails"}}
+          {{/each}}
+        </tbody>
+      </table>
+    </div>
     {{#if model.actionDetails}}
     <div id="action-details">
       <div class="panel panel-default">
@@ -194,7 +200,7 @@
                 Workflow is too large to be rendered.
               </div>
             {{else}}
-              <div class="cy-note pull-right">Click on node to get 
details</div>
+              <div class="cy-note"><div class="pull-right">Click on node to 
get details</div></div>
             {{/if}}
             <div id="cy" class="cy-panel"></div>
           </div>

Reply via email to