From 25ea5167ce5443dbb8346dad7f8d6a4abb37e7b8 Mon Sep 17 00:00:00 2001 From: ronakkaria Date: Thu, 27 Sep 2018 22:51:38 +0530 Subject: [PATCH 1/2] F2F Updates --- simple-data-txt.txt | 6 ++-- src/app/app.component.html | 3 +- src/app/app.component.ts | 19 ++++++---- .../add-value-dialog.component.html | 8 ++++- .../add-value-form.component.html | 10 ++++-- .../data-viewer/data-viewer.component.html | 11 +++++- .../data-viewer/data-viewer.component.scss | 27 +++++++++----- .../data-viewer/data-viewer.component.ts | 11 +++++- .../instance-tree/instance-tree.component.ts | 18 +++++++++- .../tree-node/tree-node.component.html | 3 +- .../tree-node/tree-node.component.scss | 4 +++ .../tree-node/tree-node.component.ts | 35 +++++++++++++++++-- src/app/ngrx/effects/redis-effect.ts | 3 ++ src/styles.scss | 5 +++ 14 files changed, 133 insertions(+), 30 deletions(-) diff --git a/simple-data-txt.txt b/simple-data-txt.txt index d3fe927..7d9ec15 100644 --- a/simple-data-txt.txt +++ b/simple-data-txt.txt @@ -1,3 +1,5 @@ +hmset {uri:url,method:GET,body:"{\"productTypes\":[\"device\",\"software\"],\"pageNumber\":5},anotherKey:anotherValue}" filteredData sameplevalue + set BaicUser:1:name "Job Smith" set BaicUser:1:id 1 lpush user:1:role Admin1 Admin2 Admin3 Admin4 Admin5 Admin6 Admin7 Admin1 Admin2 Admin3 Admin4 Admin5 Admin6 Admin7 Admin1 Admin2 Admin3 Admin4 Admin5 Admin6 Admin7 Admin1 Admin2 Admin3 Admin4 Admin5 Admin6 Admin7 Admin1 Admin2 Admin3 Admin4 Admin5 Admin6 Admin7 @@ -11,7 +13,7 @@ set BaicUser:3:name "New-User" set BaicUser:3:id 3 lpush BaicUser:3:role Admin1 Admin2 Admin3 Admin4 Admin5 Admin6 Admin7 Admin1 Admin2 Admin3 Admin4 Admin5 Admin6 Admin7 Admin1 Admin2 Admin3 Admin4 Admin5 Admin6 Admin7 Admin1 Admin2 Admin3 Admin4 Admin5 Admin6 Admin7 Admin1 Admin2 Admin3 Admin4 Admin5 Admin6 Admin7 -lpush WhitePermissionList "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" +lpush WhitePermissionList "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" "http://127.0.0.1:4200/" "https://redis.io/topics/mass-insert" set global-config:config1 1 set global-config:config2 2 @@ -51,4 +53,4 @@ hmset global-map map-key-103 map-value-01 hmset global-map map-key-203 map-value-01 -set global-string "Note: The Redis Documentation is also available in raw (computer friendly) format in the redis-doc github repository. The Redis Documentation is released under the Creative Commons Attribution-ShareAlike 4.0 International license." \ No newline at end of file +set global-string "Note: The Redis Documentation is also available in raw (computer friendly) format in the redis-doc github repository. The Redis Documentation is released under the Creative Commons Attribution-ShareAlike 4.0 International license." diff --git a/src/app/app.component.html b/src/app/app.component.html index b6c69d4..d7f7536 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -17,7 +17,7 @@
- + @@ -30,6 +30,7 @@
diff --git a/src/app/app.component.ts b/src/app/app.component.ts index ca65ed8..41bc556 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -13,7 +13,7 @@ import { REQ_REDIS_CONNECT, SELECT_REDIS } from './ngrx/actions/redis-actions'; -import {Observable} from 'rxjs'; +import {Observable, Subject} from 'rxjs'; import {REQ_LOAD_PAGE, REQ_LOAD_ROOT_PAGE} from './ngrx/actions/page-actions'; import {PageModel} from './models/page-model'; import {ADD_COMMAND, CLEAR_HISTORY, TOGGLE_CLI} from './ngrx/actions/cli-actions'; @@ -44,6 +44,7 @@ export class AppComponent implements OnInit { cli$: Observable = null; currentInstance = null; cliInputValue = ''; + expandDeepCommand$: Subject = new Subject(); @ViewChild('cliScrollContent') private cliScrollContent: ElementRef; @@ -59,7 +60,7 @@ export class AppComponent implements OnInit { constructor(public dialogService: MatDialog, private redisService: RedisService, private util: UtilService, - private _store: Store + private _store: Store, ) { this.instances$ = this._store.select('redis'); this.currentPage$ = this._store.select('page'); @@ -97,7 +98,7 @@ export class AppComponent implements OnInit { /** * on refresh event */ - onRefresh() { + onRefresh(expandNodes = false) { this.instances$.subscribe(instances => { const ins = instances.find(i => i.selected === true); if (!ins) { @@ -107,8 +108,15 @@ export class AppComponent implements OnInit { this._store.dispatch({ type: REQ_REDIS_CONNECT, payload: { instance: ins, scb: () => { + if (expandNodes) { + ins.expanded = true; + } if (ins.expanded) { - this._store.dispatch({type: REQ_FETCH_TREE, payload: {id: ins.id}}); + this._store.dispatch({type: REQ_FETCH_TREE, payload: {id: ins.id, scb: () => { + if (expandNodes) { + setTimeout(() => this.expandDeepCommand$.next(), 0); + } + }}}); } } } @@ -167,9 +175,6 @@ export class AppComponent implements OnInit { this._store.dispatch({type: REQ_LOAD_PAGE, payload: getNewPage()}); } - refreshAndExpand() { - } - /** * right page changed * @param page the page data diff --git a/src/app/components/add-value-dialog/add-value-dialog.component.html b/src/app/components/add-value-dialog/add-value-dialog.component.html index 8d80869..c360797 100644 --- a/src/app/components/add-value-dialog/add-value-dialog.component.html +++ b/src/app/components/add-value-dialog/add-value-dialog.component.html @@ -1,7 +1,13 @@

{{isEditMode()?'Edit value':'Add new value'}}

- + diff --git a/src/app/components/add-value-form/add-value-form.component.html b/src/app/components/add-value-form/add-value-form.component.html index 97aa21e..e72db3c 100644 --- a/src/app/components/add-value-form/add-value-form.component.html +++ b/src/app/components/add-value-form/add-value-form.component.html @@ -21,7 +21,7 @@ [(ngModel)]="getItemArray()[i].score"> - + - + [(ngModel)]="getItemArray()[i].value" + cdkTextareaAutosize + #autosize="cdkTextareaAutosize" + cdkAutosizeMinRows="1" + cdkAutosizeMaxRows="7">
+
+ Key: {{pageData.item.key}} +
+ +
+ +
+
- Key: {{pageData.item.key}} Value