This repository has been archived by the owner on Mar 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(spare-drive-actions): Add missing actions to spare drives
- Loading branch information
wowshakhov
committed
Aug 31, 2017
1 parent
583c8bc
commit b1eb1cf
Showing
10 changed files
with
91 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
src/app/shared/actions/spare-drive-actions/spare-drive-attach.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions
12
...hment/spare-drive-attachment.component.ts → ...hment/spare-drive-attachment.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/app/shared/actions/spare-drive-actions/spare-drive-recurring-snapshots.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { Observable } from 'rxjs/Observable'; | ||
import { Volume } from '../../models/volume.model'; | ||
import { SpareDriveAction } from './spare-drive-action'; | ||
import { RecurringSnapshotsComponent } from '../../../snapshot/recurring-snapshots/recurring-snapshots.component'; | ||
|
||
|
||
@Injectable() | ||
export class SpareDriveRecurringSnapshotsAction extends SpareDriveAction { | ||
public name = 'VOLUME_ACTIONS.SNAPSHOT_SCHEDULE'; | ||
public icon = 'schedule'; | ||
|
||
public activate(volume: Volume): Observable<any> { | ||
return this.dialog.open(RecurringSnapshotsComponent, { | ||
data: volume | ||
}) | ||
.afterClosed(); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/app/shared/actions/spare-drive-actions/spare-drive-snapshot.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { Observable } from 'rxjs/Observable'; | ||
import { | ||
SnapshotCreationComponent | ||
} from '../../../vm/vm-sidebar/storage-detail/volume/snapshot-creation/snapshot-creation.component'; | ||
import { Volume } from '../../models/volume.model'; | ||
import { SpareDriveAction } from './spare-drive-action'; | ||
|
||
|
||
@Injectable() | ||
export class SpareDriveSnapshotAction extends SpareDriveAction { | ||
public name = 'VOLUME_ACTIONS.TAKE_SNAPSHOT'; | ||
public icon = 'camera_alt'; | ||
|
||
public activate(volume: Volume): Observable<any> { | ||
return this.dialog.open(SnapshotCreationComponent, { | ||
data: volume | ||
}) | ||
.afterClosed(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters