Quellcode durchsuchen

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

pallavkul vor 8 Jahren
Ursprung
Commit
cbeb5b7b87

+ 1 - 1
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) {
   processWorkflowActionVersions(workflowAppJson, workflow, errors) {
     var importedWfActionVersions = Ember.Map.create();
     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) {
     actions.forEach(function(wfAction) {
       var wfActionType = Object.keys(wfAction)[0];
       var wfActionType = Object.keys(wfAction)[0];
       var wfActionXmlns = wfAction[wfActionType]._xmlns;
       var wfActionXmlns = wfAction[wfActionType]._xmlns;

+ 1 - 1
contrib/views/wfmanager/src/main/resources/ui/app/routes/design/jobtab.js

@@ -37,7 +37,7 @@ export default Ember.Route.extend({
     return deferred.promise;
     return deferred.promise;
   },
   },
   model : function(params){
   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"};
         return {error : "Remote API Failed"};
       }).then(function(response){
       }).then(function(response){
       if (typeof response === "string") {
       if (typeof response === "string") {

+ 17 - 1
contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less

@@ -1325,7 +1325,9 @@ input:invalid {
 
 
 .cy-note {
 .cy-note {
   color: #777;
   color: #777;
-  padding-right: 10px;
+  padding-right: 40px;
+  position: absolute;
+  width: 100%;
 }
 }
 
 
 .overlay_node_editor {
 .overlay_node_editor {
@@ -1800,3 +1802,17 @@ input:invalid {
   filter: alpha(opacity=50);
   filter: alpha(opacity=50);
   opacity: .5;
   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;
+}

+ 7 - 7
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
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 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}}
   {{#if validTrackerUrl}}
     <a target="_blank" href="{{actionInfo.consoleUrl}}"><i class="fa fa-external-link action-link" aria-hidden="true"></i></a>
     <a target="_blank" href="{{actionInfo.consoleUrl}}"><i class="fa fa-external-link action-link" aria-hidden="true"></i></a>
   {{else}}
   {{else}}

+ 25 - 19
contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-job-details.hbs

@@ -70,24 +70,30 @@
     </div>
     </div>
   </div>
   </div>
   <div role="tabpanel" class="tab-pane" id="jobAction">
   <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}}
     {{#if model.actionDetails}}
     <div id="action-details">
     <div id="action-details">
       <div class="panel panel-default">
       <div class="panel panel-default">
@@ -194,7 +200,7 @@
                 Workflow is too large to be rendered.
                 Workflow is too large to be rendered.
               </div>
               </div>
             {{else}}
             {{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}}
             {{/if}}
             <div id="cy" class="cy-panel"></div>
             <div id="cy" class="cy-panel"></div>
           </div>
           </div>