Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#4849] Update popup for mongo plugin. #4851

Merged
merged 1 commit into from
Nov 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export class CallTreeContainerComponent implements OnInit, OnDestroy, AfterViewI
const nextValue = nextRowData[this.callTreeOriginalData.callStackIndex.title];
let bindValue;

if (nextRowData && (nextValue === 'SQL-BindValue' || nextValue === 'JSON-BindValue')) {
if (nextRowData && (nextValue === 'SQL-BindValue' || nextValue === 'MONGO-JSON-BindValue')) {
bindValue = nextRowData[this.callTreeOriginalData.callStackIndex.arguments];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { GridOptions, RowNode } from 'ag-grid';
import { WindowRefService } from 'app/shared/services';

export interface IGridData {
id: string;
index: number;
method: string;
argument: string;
Expand Down Expand Up @@ -257,12 +258,15 @@ export class CallTreeComponent implements OnInit, OnChanges {
}
innerCellRenderer(params: any) {
let result = '';
if ( params.data.hasException) {
if (params.data.hasException) {
result += '<i class="fa fa-fire" style="color:red"></i>&nbsp;';
} else if (!params.data.isMethod) {
if ( params.data.method === 'SQL' || params.data.method === 'JSON' ) {
if (params.data.method === 'SQL') {
result += '<button type="button" class="btn btn-blue" style="padding: 0px 2px; height: 20px;"><i class="fa fa-database"></i> ' + params.data.method + '</button>&nbsp;';
return '&nbsp;' + result;
} else if (params.data.method === 'MONGO-JSON') {
result += '<button type="button" class="btn btn-blue" style="padding: 0px 2px; height: 20px;"><i class="fa fa-database"></i> JSON</button>&nbsp;';
return '&nbsp;' + result;
} else {
result += '<i class="fa fa-info-circle"></i>&nbsp;';
}
Expand All @@ -283,12 +287,16 @@ export class CallTreeComponent implements OnInit, OnChanges {
return '&nbsp;' + result + params.data.method;
}
onCellClick(params: any): void {
if ( params.colDef.field === 'method' && (params.value === 'SQL' || params.value === 'JSON') ) {
this.outSelectFormatting.next({
type: params.value,
formatText: params.data.argument,
index: params.data.index
});
if (params.colDef.field === 'method') {
let paramValue;
if (params.value === 'SQL' || params.value === 'MONGO-JSON') {
paramValue = params.value.split('-').pop();
this.outSelectFormatting.next({
type: paramValue,
formatText: params.data.argument,
index: params.data.index
});
}
}
}
onCellDoubleClicked(params: any): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class SyntaxHighlightPopupContainerComponent implements OnInit, AfterView
this.data$ = iif(() => !!this.data.bindValue,
this.syntaxHighlightDataService.getData(this.data).pipe(
map((bindedContents: string) => {
return { ...this.data, bindedContents };
return { ...this.data, bindedContents: bindedContents.replace(/\&quot\;/g, '"') };
})
),
of(this.data)
Expand Down