mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-29 09:35:38 -05:00
Notebooks: re-factor grid streaming (#12937)
* refactor grid streaming (convert to data first) * change convertRowsToHtml method to return value * remove griddataconversioncomplete checks * send row data from STS to gridoutput component * clean up code * send data updates to cell model * serialize cell output at the end of cell execution * remove unused parameters * update output contents instead of output reference * remove unnecessary promise * move azdata changes to proposed * update comment
This commit is contained in:
@@ -40,9 +40,8 @@ export class OutputComponent extends CellView implements OnInit, AfterViewInit {
|
||||
private _initialized: boolean = false;
|
||||
private _activeCellId: string;
|
||||
private _componentInstance: IMimeComponent;
|
||||
private _batchId?: number;
|
||||
private _id?: number;
|
||||
private _queryRunnerUri?: string;
|
||||
private _batchId: number | undefined;
|
||||
private _id: number | undefined;
|
||||
public errorText: string;
|
||||
|
||||
constructor(
|
||||
@@ -104,18 +103,14 @@ export class OutputComponent extends CellView implements OnInit, AfterViewInit {
|
||||
return this._componentInstance;
|
||||
}
|
||||
|
||||
@Input() set batchId(value: number) {
|
||||
@Input() set batchId(value: number | undefined) {
|
||||
this._batchId = value;
|
||||
}
|
||||
|
||||
@Input() set id(value: number) {
|
||||
@Input() set id(value: number | undefined) {
|
||||
this._id = value;
|
||||
}
|
||||
|
||||
@Input() set queryRunnerUri(value: string) {
|
||||
this._queryRunnerUri = value;
|
||||
}
|
||||
|
||||
get trustedMode(): boolean {
|
||||
return this._trusted;
|
||||
}
|
||||
@@ -188,11 +183,8 @@ export class OutputComponent extends CellView implements OnInit, AfterViewInit {
|
||||
this._componentInstance.cellModel = this.cellModel;
|
||||
this._componentInstance.cellOutput = this.cellOutput;
|
||||
this._componentInstance.bundleOptions = options;
|
||||
if (this._queryRunnerUri) {
|
||||
this._componentInstance.batchId = this._batchId;
|
||||
this._componentInstance.id = this._id;
|
||||
this._componentInstance.queryRunnerUri = this._queryRunnerUri;
|
||||
}
|
||||
this._componentInstance.batchId = this._batchId;
|
||||
this._componentInstance.id = this._id;
|
||||
this._changeref.detectChanges();
|
||||
let el = <HTMLElement>componentRef.location.nativeElement;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
-->
|
||||
<div style="overflow: hidden; width: 100%; height: 100%; display: flex; flex-flow: column">
|
||||
<div #outputarea link-handler [isTrusted]="isTrusted" [notebookUri]="notebookUri" class="notebook-output" style="flex: 0 0 auto;">
|
||||
<output-component *ngFor="let output of cellModel.outputs" [cellOutput]="output" [trustedMode] = "cellModel.trustedMode" [cellModel]="cellModel" [activeCellId]="activeCellId" [batchId]="output.batchId" [id]="output.id" [queryRunnerUri]="output.queryRunnerUri">
|
||||
<output-component *ngFor="let output of cellModel.outputs" [cellOutput]="output" [trustedMode] = "cellModel.trustedMode" [cellModel]="cellModel" [activeCellId]="activeCellId" [batchId]="output.metadata?.resultSet?.batchId" [id]="output.metadata?.resultSet?.id">
|
||||
</output-component>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -38,7 +38,6 @@ export class OutputAreaComponent extends AngularDisposable implements OnInit {
|
||||
this._register(this.cellModel.onOutputsChanged(e => {
|
||||
if (!(this._changeRef['destroyed'])) {
|
||||
this._changeRef.detectChanges();
|
||||
this._changeRef.detach();
|
||||
if (e && e.shouldScroll) {
|
||||
this.setFocusAndScroll(this.outputArea.nativeElement);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user