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
feat(listAll): add listAll and account filter #535
Merged
Merged
Changes from 9 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
7afb992
#305-list-all - add listAll=true to getList for admin
ksendart 521a54c
#305-list-all - fix tests
ksendart c86d878
#305-list-all - filter vm-s
ksendart 1053666
#305-list-all - filter volumes
ksendart 82c86ab
#305-list-all - filter templates
ksendart 2ac7b3b
Merge branch 'master' into 305-list-all
ksendart 166d1b3
#305-list-all - after review
ksendart e90b5ea
#305-list-all - after review
ksendart 2c1ea5d
Merge branch 'master' into 305-list-all
ksendart f80ab43
Merge branch 'master' into 305-list-all
ksendart 39c2ce8
Merge branch 'master' into 305-list-all
ksendart 01e0599
#305-list-all - filter ssh-keys
ksendart 7928064
#305-list-all - add translations
ksendart 38a28fc
Merge branch 'master' into 305-list-all
ksendart 04f2979
#305-list-all - disable delete, fetch all templates
ksendart b198a6a
#305-list-all - delete ssh-key, fetch all templates
ksendart 4f1bf34
#305-list-all - after review
ksendart 4f9d48b
#305-list-all - after review
ksendart 7f22c53
#305-list-all - after review
ksendart 4ff447c
#305-list-all - Merge branch 'master' after review
ksendart 4578abe
#305-list-all - after review
ksendart 3b3314b
#305-list-all - after review
ksendart ba39254
Merge branch 'master' into 305-list-all
ksendart d747fc1
#305-list-all - keep account filter
ksendart fadec40
#305-list-all - keep account filter
ksendart 138a87f
Code review changes
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
src/app/shared/components/filter/account-filter.component.html
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,9 @@ | ||
<md-select | ||
class="filter-select" | ||
multiple="true" | ||
[placeholder]="'VM_PAGE.FILTERS.SELECT_ACCOUNTS' | translate" | ||
[(ngModel)]="selected" | ||
(change)="changeAccount()" | ||
> | ||
<md-option *ngFor="let user of users" [value]="user">{{ user.name }}</md-option> | ||
</md-select> |
23 changes: 23 additions & 0 deletions
23
src/app/shared/components/filter/account-filter.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import {Component, EventEmitter, Output} from '@angular/core'; | ||
import {Account} from '../../models/account.model'; | ||
import {AccountService} from '../../services/account.service'; | ||
|
||
@Component({ | ||
selector: 'cs-account-filter', | ||
templateUrl: 'account-filter.component.html' | ||
}) | ||
export class AccountFilterComponent { | ||
@Output() public onChangeAccount = new EventEmitter<Array<Account>>(); | ||
public selected; | ||
public users: Array<Account>; | ||
|
||
constructor (private accountService: AccountService) { | ||
this.accountService.getList().subscribe((users) => { | ||
this.users = users; | ||
}); | ||
} | ||
|
||
public changeAccount() { | ||
this.onChangeAccount.emit(this.selected); | ||
} | ||
} |
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
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
params equal to {} by default. no need to check params || {}
use Object.assign({}, params, {listall...})