-
Notifications
You must be signed in to change notification settings - Fork 63
feat(vm-snapshots): implement vm snapshots details sidebar #1454
Conversation
Consider fixing in this PR: Line 1 in 1b59e0c
|
src/app/snapshot/components/vm-snapshot-card-view/vm-snapshot-card-view.component.ts
Outdated
Show resolved
Hide resolved
src/app/snapshot/components/vm-snapshot-list-view/vm-snapshot-list-view.component.ts
Outdated
Show resolved
Hide resolved
src/app/snapshot/components/vm-snapshot-sidebar/vm-snapshot-sidebar.component.html
Outdated
Show resolved
Hide resolved
src/app/snapshot/components/vm-snapshot-sidebar/vm-snapshot-sidebar.component.scss
Outdated
Show resolved
Hide resolved
@@ -25,7 +25,7 @@ import { snapshotPageSelectors, vmSnapshotsSelectors } from '../../store'; | |||
></cs-snapshots-page>`, | |||
}) | |||
export class SnapshotsPageContainerComponent implements OnInit, AfterViewInit { | |||
readonly snapshots$ = this.store.pipe(select(fromSnapshots.selectFilteredSnapshots)); | |||
readonly snapshots$ = this.store.pipe(select(snapshotPageSelectors.getFilteredSnapshots)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you rename select -> get? I think we should keep "select", because it's the default prefix in NgRx Entity:
export const { selectIds, selectEntities, selectAll, selectTotal } = adapter.getSelectors(state);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To discuss
src/app/snapshot/snapshots-page/snapshot-sidebar/snapshot-sidebar.container.ts
Outdated
Show resolved
Hide resolved
This function is not working on the server now, we enable it after it starts working. |
@Output() | ||
public clicked = new EventEmitter<VmSnapshotViewModel>(); | ||
@ViewChild(MatMenuTrigger) | ||
public matMenuTrigger: MatMenuTrigger; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove matMenuTrigger if it is not used
@Output() | ||
public clicked = new EventEmitter<VmSnapshotViewModel>(); | ||
@ViewChild(MatMenuTrigger) | ||
public matMenuTrigger: MatMenuTrigger; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove matMenuTrigger if it is not used
@Output() | ||
public onClick = new EventEmitter<Snapshot>(); | ||
public clicked = new EventEmitter<Snapshot>(); | ||
@ViewChild(MatMenuTrigger) | ||
public matMenuTrigger: MatMenuTrigger; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove matMenuTrigger if it is not used
@@ -11,7 +11,7 @@ export class SnapshotItemComponent { | |||
public virtualMachines: Dictionary<VirtualMachine>; | |||
public isSelected: (snapshot: Snapshot) => boolean; | |||
public query: string; | |||
public onClick = new EventEmitter<Snapshot>(); | |||
public clicked = new EventEmitter<Snapshot>(); | |||
public matMenuTrigger: MatMenuTrigger; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove matMenuTrigger if it is not used
state: snapshot.state, | ||
name: snapshot.displayname, | ||
created: moment(snapshot.created).toDate(), | ||
// account and domain necessary for grouping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
account and domain are necessary for grouping
filter.volumeSnapshotTypes.includes(snapshot.snapshottype); | ||
|
||
const filterByAccount = (snapshot: Snapshot) => | ||
!filter.accounts.length || !!filter.accounts.find(id => id === snapshot.account); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace !!find by includes
if (!this.matMenuTrigger.menuOpen) { | ||
this.onClick.emit(this.item); | ||
} | ||
public handleClick(): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove matMenuTrigger in this component if it's not used
if (!this.matMenuTrigger || !this.matMenuTrigger.menuOpen) { | ||
this.onClick.emit(this.item); | ||
} | ||
public handleClick(): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove matMenuTrigger in this component if it's not used.
if (!this.matMenuTrigger.menuOpen) { | ||
this.onClick.emit(this.item); | ||
} | ||
public handleClick(): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove matMenuTrigger in this component if it's not used.
Implements #1332