-
Notifications
You must be signed in to change notification settings - Fork 63
fix(disk-offering): enable change disk offering for volume #1402
Conversation
Pull Request Test Coverage Report for Build 1316
💛 - Coveralls |
map((volume: Volume) => { | ||
|
||
const diskofferingid = !isRoot(volume) && params.diskofferingid; | ||
const size = (() => { |
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 do you use a self-executing anonymous function?
@@ -224,12 +227,12 @@ export class VolumesEffects { | |||
@Effect() | |||
resizeVolume$: Observable<Action> = this.actions$.pipe( | |||
ofType(volumeActions.RESIZE_VOLUME), | |||
mergeMap((action: volumeActions.ResizeVolume) => { | |||
withLatestFrom(this.store.pipe(select(fromDiskOfferings.selectEntities))), | |||
switchMap(([action, diskOfferings]: [volumeActions.ResizeVolume, any]) => { |
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.
Don't use any. We have NgrxEntities interface for this case.
@@ -32,6 +32,9 @@ import * as fromVolumes from './volumes.reducers'; | |||
import * as snapshotActions from '../../snapshots/redux/snapshot.actions'; | |||
// tslint:disable-next-line | |||
import { VolumeDeleteDialogComponent } from '../../../shared/actions/volume-actions/volume-delete/volume-delete-dialog.component'; | |||
import { isCustomized } from '../../../shared/models/offering.model'; | |||
import * as fromDiskOfferings from '../../disk-offerings/redux/disk-offerings.reducers'; | |||
import * as pickBy from 'lodash/pickBy'; |
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.
Do you use a Sort imports by modules
?
component.newSize = newVolumeSize; | ||
spyOn(component.diskResized, 'emit').and.callThrough(); | ||
|
||
const diskOffering = { |
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.
Add type
return null; | ||
})(); | ||
|
||
const requestParams = pickBy( |
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.
Add type
Previous PR: #1368