Skip to content

Commit 7d13b92

Browse files
committed
[#4849] Update bind api url.
1 parent 035b60e commit 7d13b92

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

web/src/main/webapp/features/distributedCallFlow/distributed-call-flow.directive.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -360,12 +360,12 @@
360360
if ( $(e.target).hasClass("sql") ) {
361361
item = dataView.getItem(args.row);
362362
var itemNext = dataView.getItem(args.row+1);
363-
var data = "sql=" + encodeURIComponent( item.argument );
363+
var data = "type=sql&metaData=" + encodeURIComponent( item.argument );
364364

365365
if ( item.isAuthorized ) {
366366
if ( angular.isDefined( itemNext ) && itemNext.method === "SQL-BindValue" ) {
367367
data += "&bind=" + encodeURIComponent( itemNext.argument );
368-
CommonAjaxService.getSQLBind( "sqlBind.pinpoint", data, function( result ) {
368+
CommonAjaxService.getSQLBind( "bind.pinpoint", data, function( result ) {
369369
$("#customLogPopup").find("h4").html("SQL").end().find("div.modal-body").html(
370370
'<h4>Binded SQL <button class="btn btn-default btn-xs sql">Copy</button></h4>' +
371371
'<div style="position:absolute;left:10000px">' + result + '</div>' +
@@ -398,12 +398,12 @@
398398
if ( $(e.target).hasClass("json") ) {
399399
item = dataView.getItem(args.row);
400400
var itemNext = dataView.getItem(args.row+1);
401-
var data = "json=" + encodeURIComponent( item.argument );
401+
var data = "type=mongoJson&metaData=" + encodeURIComponent( item.argument );
402402

403403
if ( item.isAuthorized ) {
404404
if ( angular.isDefined( itemNext ) && itemNext.method === "MONGO-JSON-BindValue" ) {
405405
data += "&bind=" + encodeURIComponent( itemNext.argument );
406-
CommonAjaxService.getSQLBind( "jsonBind.pinpoint", data, function( result ) {
406+
CommonAjaxService.getSQLBind( "bind.pinpoint", data, function( result ) {
407407
$("#customLogPopup").find("h4").html("JSON").end().find("div.modal-body").html(
408408
'<h4>Binded JSON <button class="btn btn-default btn-xs json">Copy</button></h4>' +
409409
'<div style="position:absolute;left:10000px">' + result + '</div>' +

web/src/main/webapp/v2/src/app/core/components/syntax-highlight-popup/syntax-highlight-data.service.ts

+7-10
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,21 @@ enum TYPE {
1010

1111
@Injectable()
1212
export class SyntaxHighlightDataService {
13-
private sqlRequestURL = 'sqlBind.pinpoint';
14-
private jsonRequestURL = 'jsonBind.pinpoint';
15-
constructor(
16-
private http: HttpClient
17-
) { }
13+
private url = 'bind.pinpoint';
14+
constructor(private http: HttpClient) { }
1815
getData({type, originalContents, bindValue}: ISyntaxHighlightData): Observable<string> {
19-
let requestURL;
16+
let requestType;
2017
switch (type) {
2118
case TYPE.SQL:
22-
requestURL = this.sqlRequestURL;
19+
requestType = 'sql';
2320
break;
2421
case TYPE.JSON:
25-
requestURL = this.jsonRequestURL;
22+
requestType = 'mongoJson';
2623
break;
2724
}
2825
return this.http.post<string>(
29-
requestURL,
30-
`${type.toLowerCase()}=${encodeURIComponent(originalContents)}&bind=${encodeURIComponent(bindValue)}`,
26+
this.url,
27+
`type=${requestType}&metaData=${encodeURIComponent(originalContents)}&bind=${encodeURIComponent(bindValue)}`,
3128
{
3229
headers: new HttpHeaders().set('Content-Type', 'application/x-www-form-urlencoded')
3330
}

0 commit comments

Comments
 (0)