# HG changeset patch # User casties # Date 1453905497 -3600 # Node ID c2946b7135cdc3a905130b2078ff0783e2f0ca40 # Parent 991bf349bb048dded0770078b4775f16e8a1efd2 working on larger results. diff -r 991bf349bb04 -r c2946b7135cd app/query-app.component.ts --- a/app/query-app.component.ts Wed Jan 27 13:30:38 2016 +0100 +++ b/app/query-app.component.ts Wed Jan 27 15:38:17 2016 +0100 @@ -27,11 +27,11 @@ -
- - +
+ +
`, directives: [QuerySelectComponent, QueryResultTableComponent], diff -r 991bf349bb04 -r c2946b7135cd app/query-result-table.component.ts --- a/app/query-result-table.component.ts Wed Jan 27 13:30:38 2016 +0100 +++ b/app/query-result-table.component.ts Wed Jan 27 15:38:17 2016 +0100 @@ -6,13 +6,14 @@ import {QueryState} from './query-state'; @Component({ - selector: 'query-result-table', + selector: 'query-result', template: `
Cypher query:
{{queryState.resultCypherQuery}}

Query result

-
{{queryState.resultInfo}}: page {{page}} of {{numPages}}
+
{{resultInfo}}
+ page {{page}} of {{numPages}} -
`, - inputs: ['queryState', 'data', 'columns'], + inputs: ['queryState', 'resultInfo'], directives: [NG_TABLE_DIRECTIVES, PAGINATION_DIRECTIVES] }) export class QueryResultTableComponent implements OnInit { public queryState: QueryState; + public resultInfo: string; + public data: Array; public columns: Array; @@ -56,6 +60,8 @@ ngOnChanges() { console.debug("result table changed! queryState=", this.queryState?this.queryState.resultColumns:''); + this.data = this.queryState.results; + this.columns = this.queryState.resultColumns; this.config.sorting = this.queryState.resultColumns; this.onChangeTable(this.config, null); } @@ -71,7 +77,6 @@ } changeSort(data: any, config: any) { - console.debug("changeSort start"); if (!config.sorting) { return data; } @@ -89,7 +94,6 @@ } return 0; }); - console.debug("changeSort done"); return sorted; } diff -r 991bf349bb04 -r c2946b7135cd app/query-result.component.ts --- a/app/query-result.component.ts Wed Jan 27 13:30:38 2016 +0100 +++ b/app/query-result.component.ts Wed Jan 27 15:38:17 2016 +0100 @@ -8,6 +8,7 @@ selector: 'query-result', template: `
+ Cypher query:
{{queryState.resultCypherQuery}}

Query results ({{queryState.resultInfo}}):