"YANGMAN_LIST_PREV_ITEM": "show previous item",
"YANGMAN_FILL_FORM_WITH_RECEIVED": "Fill form with received data after execution",
"YANGMAN_LIST_NEXT_ITEM": "show next item",
+ "YANGMAN_SHOW_SENT_DATA": "show sent data",
+ "YANGMAN_SHOW_RECEIVED_DATA": "show received data",
"YANGMAN_HISTORY_SETTINGS": "History requests settings",
"YANGMAN_HISTORY_SETTINGS_GENERAL": "General settings",
"YANGMAN_HISTORY_SETTINGS_COUNT": "History requests buffer size",
function changeDataType(){
$scope.switchSection('rightPanelSection', requestHeader.selectedShownDataType);
- if (!$scope.node || requestHeader.urlChanged) {
+ if ($scope.node || requestHeader.urlChanged) {
requestHeader.setRequestUrl();
requestHeader.urlChanged = false;
}
*/
function executePluginFunctionality(customPlugin){
requestHeader.selectedPlugin = customPlugin;
+ $scope.setSelectedPlugin(true);
customPlugin.runCallback({ scope: $scope, controller: requestHeader });
}
function unsetPluginFunctionality(){
if ( requestHeader.selectedPlugin ) {
$scope.unsetPlugin(requestHeader);
+ $scope.setSelectedPlugin(false);
}
requestHeader.selectedPlugin = null;
/**
* Fill request form in right panel with request data
* @param reqObj
+ * @param preventFillingWithReceived
*/
- function showForm(reqObj) {
+ function showForm(reqObj, preventFillingWithReceived) {
var data = reqObj.sentData;
- if ($scope.historySettings.data.fillWithReceived) {
+ if ($scope.historySettings.data.fillWithReceived && !preventFillingWithReceived) {
data = reqObj.receivedData;
}
*/
function executeRequest(reqObj) {
if ($scope.rightPanelSection === constants.DISPLAY_TYPE_FORM) {
- showForm(reqObj);
+ showForm(reqObj, true);
}
else {
showData(reqObj);
* @param requestObj
*/
function selectRequest(event, requestObj){
+ console.debug('selected', requestObj);
+
$scope.rootBroadcast(constants.YANGMAN_DESELECT_REQUESTS, { broadcastingCtrl: vm });
vm.mainList.toggleReqSelection(!event.ctrlKey, requestObj);
if (!event.ctrlKey){
if ($scope.rightPanelSection === constants.DISPLAY_TYPE_FORM) {
- vm.showForm(requestObj, true);
+ vm.showForm(requestObj);
}
else {
vm.showData(requestObj, true);
$scope.selectedModule = null;
$scope.selectedDatastore = null;
+ $scope.selectedPlugin = false;
$scope.apis = [];
$scope.node = null;
$scope.rightPanelSection = constants.DISPLAY_TYPE_REQ_DATA;
$scope.switchSection = switchSection;
$scope.setParametersList = setParametersList;
$scope.unsetPlugin = unsetPlugin;
+ $scope.setSelectedPlugin = setSelectedPlugin;
+
init();
+ function setSelectedPlugin(selected) {
+ $scope.selectedPlugin = selected;
+ }
+
/**
* Start showing progressbar in request header view
*/
* @param clearPathArray
*/
function setApi(api, subApi, setUrl, clearPathArray){
+ var oldSubApiPathArray = $scope.selectedSubApi ? angular.copy($scope.selectedSubApi.pathArray) : [];
$scope.selectedApi = api;
$scope.selectedSubApi = subApi;
if ( clearPathArray ){
PathUtilsService.clearPath($scope.selectedSubApi.pathArray);
+
+ // todo: move to pathUtils service
+ $scope.selectedSubApi.pathArray.forEach(function (subApiPathElem) {
+ oldSubApiPathArray.forEach(function (oldSubApiPathElem){
+ if (oldSubApiPathElem.module === subApiPathElem.module && oldSubApiPathElem.name === subApiPathElem.name) {
+ oldSubApiPathElem.identifiers.forEach(function (oldPathElemIdentifier, oldPathElemIdentifierKey){
+ subApiPathElem.identifiers.forEach(function (pathElemIdentifier) {
+ if (oldPathElemIdentifier.label === pathElemIdentifier.label) {
+ pathElemIdentifier.value = oldPathElemIdentifier.value;
+ oldSubApiPathElem.identifiers.splice(oldPathElemIdentifierKey, 1);
+
+ }
+ });
+ });
+ }
+ });
+ });
+
+
+
}
$scope.$broadcast(constants.SET_SEL_OPERATIONS, subApi ? $scope.selectedSubApi.operations : [], setUrl);
return {};
},
DEFAULT: function () {
+ if (node) {
+ node.clear();
+ }
return rData;
},
};
id="toggle-module-detail"
ng-click="main.toggleLeftPanel(); main.initModuleDetailHeight();"
ng-class="{'arrow-switcher__left' : main.leftPanelTab === 0}"
- ng-show="selectedDatastore"> play_arrow </md-icon>
+ ng-show="selectedDatastore || selectedPlugin"> play_arrow </md-icon>
<!--ng-show="!main.selectedMainTab && selectedDatastore"> play_arrow </md-icon>-->
<!-- content -->
<md-tabs md-border-bottom md-selected="main.leftPanelTab" class="yangmanModule__left-panel__detail-list-tabs-container">
</md-radio-button>
</md-radio-group>
- <md-checkbox class="mb0" flex layout-align="center end" ng-model="requestHeader.fillFormWithReceivedData" ng-disabled="requestHeader.selectedShownDataType==='req-data'">
+ <md-checkbox class="mb0" flex layout-align="center end" ng-model="requestHeader.fillFormWithReceivedData" ng-hide="requestHeader.selectedShownDataType==='req-data'">
{{ 'YANGMAN_FILL_FORM_WITH_RECEIVED' | translate }}
</md-checkbox>
+ <section layout="row" flex layout-align="center end" ng-show="requestHeader.selectedShownDataType==='req-data'">
+ <md-checkbox class="mb0" flex layout-align="center end" ng-model="main.jsonView.sent" >
+ {{ 'YANGMAN_SHOW_SENT_DATA' | translate }}
+ </md-checkbox>
+ <md-checkbox class="mb0" flex layout-align="center end" ng-model="main.jsonView.received">
+ {{ 'YANGMAN_SHOW_RECEIVED_DATA' | translate }}
+ </md-checkbox>
+ </section>
+
<!-- Request info box -->
<md-content flex="40"
layout="row"