Yangman - view switched to json when request is run from history 40/46540/3
authormichal.kovacik <mikovaci@cisco.com>
Wed, 5 Oct 2016 10:44:39 +0000 (12:44 +0200)
committerDaniel Malachovsky <dmalacho@cisco.com>
Mon, 7 Nov 2016 11:52:06 +0000 (12:52 +0100)
- if "run request" was launched from history the view has been switched to json,
  even the form view has been selected. Now the selected view will remain
  after request execution

Change-Id: Idc99e9fd32313d53dc2b5fb78e9f78e8acb67c47
Signed-off-by: michal.kovacik <mikovaci@cisco.com>
modules/yangman-resources/src/main/resources/yangman/controllers/requests-list.controller.js

index fdf08ab0be92642f67589b099515c2a90090d694..e26061164ecf7bd20110bfae6704d63512ab9570 100644 (file)
@@ -260,7 +260,12 @@ define([
          * @param reqObj
          */
         function executeRequest(reqObj) {
-            showData(reqObj);
+            if ($scope.rightPanelSection === constants.DISPLAY_TYPE_FORM) {
+                showForm(reqObj);
+            }
+            else {
+                showData(reqObj);
+            }
             $scope.rootBroadcast(constants.YANGMAN_EXECUTE_WITH_DATA,{ data: reqObj.sentData });
         }