Removing extra characters if there is no query

This commit is contained in:
Jesús Ángel González 2018-05-10 16:29:27 +02:00
parent 439a35c4ac
commit fc270afed5
3 changed files with 12 additions and 3 deletions

View File

@ -61,7 +61,7 @@ app.controller('devToolsController', function($scope, $rootScope, errorHandler,
}
}
if(i === slen-1 && tmpRequestTextJson && typeof tmpRequestTextJson === 'string'){
if(tmpRequestTextJson && typeof tmpRequestTextJson === 'string'){
let rtjlen = tmp.length;
while(rtjlen--){
if(tmp[rtjlen].trim() === '}') break;
@ -69,6 +69,11 @@ app.controller('devToolsController', function($scope, $rootScope, errorHandler,
}
}
if(!tmpRequestTextJson && tmp.length > 1) {
tmp = [tmp[0]]
end = start + 1
}
if(i === slen-1 && !tmpRequestTextJson){
if(tmp.length > 1) end -= (tmp.length - 1)
}

View File

@ -365,6 +365,10 @@ kbn-vis .vis-container {
color: #b4bcc2
}
.wz-dev-title {
padding-bottom: 10px
}
/* Card and select input shadow overriding */
.wz-md-card {

View File

@ -6,12 +6,12 @@
<div layout="row" flex>
<div flex layout="column">
<span style="padding-bottom: 10px" class="wz-headline-title">Console <i ng-click="send()" class="fa fa-play wz-play-dev-color wz-dev-pointer pull-right fa-fw" aria-hidden="true"></i></span>
<span class="wz-headline-title wz-dev-title">Console <i ng-click="send()" class="fa fa-play wz-play-dev-color wz-dev-pointer pull-right fa-fw" aria-hidden="true"></i></span>
<textarea flex id="api_input"></textarea>
</div>
<div flex layout="column">
<span style="padding-bottom: 10px" class="wz-headline-title"><i ng-click="help()" class="fa fa-question wz-question-dev-color wz-dev-pointer pull-right fa-fw" aria-hidden="true"></i></span>
<span class="wz-headline-title wz-dev-title"><i ng-click="help()" class="fa fa-question wz-question-dev-color wz-dev-pointer pull-right fa-fw" aria-hidden="true"></i></span>
<textarea flex id="api_output"></textarea>
</div>
</div>