[web-cvp]Direct drill-down for failed tests 57/45757/1
authorgrakiss <grakiss.wanglei@huawei.com>
Thu, 19 Oct 2017 07:36:04 +0000 (03:36 -0400)
committergrakiss <grakiss.wanglei@huawei.com>
Thu, 19 Oct 2017 07:36:04 +0000 (03:36 -0400)
JIRA: DOVETAIL-531

people may want to directly drill-down to the exact log file of each results, instead of searching in piles of log files.

Change-Id: I6e18b8d57739fd695e20ee29147e796de5c9e404
Signed-off-by: grakiss <grakiss.wanglei@huawei.com>
cvp/3rd_party/static/testapi-ui/components/results-report/partials/reportDetails.html
cvp/3rd_party/static/testapi-ui/components/results-report/resultsReportController.js

index 9f8ed14..091cab8 100644 (file)
@@ -42,7 +42,7 @@ Test Filters:<br />
                 <span ng-if="ctrl.testStatus == 'passed'" class="text-success">[{{ testcase.pass }}]</span>
                 <span ng-if="ctrl.testStatus == 'not passed'" class="text-danger">[{{ testcase.fail }}]</span>
             </a>
-
+            <a uib-tooltip="view log" ng-click="ctrl.gotoResultLog(testcase.build_tag.split('-').pop())"><span class="glyphicon glyphicon-cog"></a>
             <ul class="list-unstyled" uib-collapse="testcase.folder">
                 <li ng-if="!testcase.details.success">
                     <span ng-class="{'glyphicon glyphicon-ok text-success':testcase.criteria == 'PASS'}" aria-hidden="true"></span>
index 1d37c58..2b61c98 100644 (file)
         ctrl.optional_fail = 0;
 
         ctrl.testStatus = 'total';
+        ctrl.gotoResultLog = gotoResultLog;
+
+        function gotoResultLog(case_name) {
+            var case_area = case_name.split(".")[1];
+            var log_url = "/logs/"+ctrl.testId+"/results/";
+            if (case_area == "vping") {
+                log_url += "functest.log";
+            } else if (case_area == "ha") {
+                log_url += "yardstick.log";
+            } else {
+                log_url += case_area+"_logs/"+case_name+".log";
+            }
+            window.open(log_url);
+        }
 
 
         /**