Skip to content
This repository has been archived by the owner on Mar 25, 2023. It is now read-only.

Commit

Permalink
feat(core): Angular and Material2 versions updated
Browse files Browse the repository at this point in the history
  • Loading branch information
zolotyx authored Oct 24, 2017
1 parent d785a3d commit 3851b8e
Show file tree
Hide file tree
Showing 314 changed files with 2,704 additions and 2,739 deletions.
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@
},
"private": true,
"dependencies": {
"@angular/animations": "4.3.6",
"@angular/cdk": "2.0.0-beta.10",
"@angular/common": "4.3.6",
"@angular/core": "4.3.6",
"@angular/forms": "4.3.6",
"@angular/http": "4.3.6",
"@angular/material": "2.0.0-beta.10",
"@angular/platform-browser": "4.3.6",
"@angular/platform-browser-dynamic": "4.3.6",
"@angular/platform-server": "4.3.6",
"@angular/router": "4.3.6",
"@angular/animations": "4.4.6",
"@angular/cdk": "2.0.0-beta.12",
"@angular/common": "4.4.6",
"@angular/core": "4.4.6",
"@angular/forms": "4.4.6",
"@angular/http": "4.4.6",
"@angular/material": "2.0.0-beta.12",
"@angular/platform-browser": "4.4.6",
"@angular/platform-browser-dynamic": "4.4.6",
"@angular/platform-server": "4.4.6",
"@angular/router": "4.4.6",
"@ngrx/effects": "^4.0.5",
"@ngrx/entity": "ngrx/entity-builds",
"@ngrx/router-store": "^4.0.4",
Expand All @@ -52,9 +52,9 @@
},
"devDependencies": {
"@angular/cli": "1.3.2",
"@angular/compiler": "^4.3.6",
"@angular/compiler-cli": "^4.3.6",
"@angular/language-service": "^4.3.6",
"@angular/compiler": "^4.4.6",
"@angular/compiler-cli": "^4.4.6",
"@angular/language-service": "^4.4.6",
"@angularclass/hmr": "^2.1.3",
"@types/jasmine": "2.5.45",
"@types/node": "^8.0.16",
Expand Down
10 changes: 5 additions & 5 deletions src/app/account/account-container/account.container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ import * as fromAccounts from '../redux/accounts.reducers';
import * as fromDomains from '../../domains/redux/domains.reducers';
import * as fromRoles from '../../roles/redux/roles.reducers';
import { WithUnsubscribe } from '../../utils/mixins/with-unsubscribe';
import { Account } from '../../shared/models/account.model';
import { Account, AccountState } from '../../shared/models/account.model';

export const stateTranslations = {
DISABLED: 'ACCOUNT_STATE.DISABLED',
ENABLED: 'ACCOUNT_STATE.ENABLED',
LOCKED: 'ACCOUNT_STATE.LOCKED',
[AccountState.disabled]: 'ACCOUNT_STATE.DISABLED',
[AccountState.enabled]: 'ACCOUNT_STATE.ENABLED',
[AccountState.locked]: 'ACCOUNT_STATE.LOCKED',
};

@Component({
Expand Down Expand Up @@ -117,7 +117,7 @@ export class AccountPageContainerComponent extends WithUnsubscribe() implements
}

public stateTranslation(state): string {
return stateTranslations[state.toUpperCase()];
return stateTranslations[state];
}

public onDomainsChange(selectedDomainIds) {
Expand Down
115 changes: 60 additions & 55 deletions src/app/account/account-list-filter/account-list-filter.component.html
Original file line number Diff line number Diff line change
@@ -1,57 +1,62 @@
<div class="options-panel">

<md-select
class="filter-select"
multiple="true"
[placeholder]="'ACCOUNT_PAGE.FILTERS.SELECT_DOMAINS' | translate"
[ngModel]="selectedDomainIds"
(change)="onDomainsChange.emit($event.value)"
>
<md-option *ngFor="let domain of domains" [value]="domain.id">{{ domain.name }}</md-option>
</md-select>

<md-select
class="filter-select"
multiple="true"
[placeholder]="'ACCOUNT_PAGE.FILTERS.SELECT_ROLES' | translate"
[ngModel]="selectedRoleNames"
(change)="onRolesChange.emit($event.value)"
>
<md-option *ngFor="let role of roles" [value]="role.name">{{ role.name }}</md-option>
</md-select>

<md-select
class="filter-select"
multiple="true"
[placeholder]="'ACCOUNT_PAGE.FILTERS.SELECT_ROLE_TYPES' | translate"
[ngModel]="selectedRoleTypes"
(change)="onRoleTypesChange.emit($event.value)"
>
<md-option *ngFor="let roleType of roleTypes" [value]="roleType">{{ roleType }}</md-option>
</md-select>

<md-select
class="filter-select"
multiple="true"
[placeholder]="'ACCOUNT_PAGE.FILTERS.SELECT_STATES' | translate"
[ngModel]="selectedStates"
(change)="onStatesChange.emit($event.value)"
>
<md-option *ngFor="let state of states" [value]="state">{{ stateTranslationToken(state) | translate }}</md-option>
</md-select>

<cs-draggable-select
class="filter-select"
multiple="true"
[placeholder]="'ACCOUNT_PAGE.FILTERS.GROUP_BY' | translate"
[(ngModel)]="selectedGroupings"
[dragItems]="groupings"
(change)="onGroupingsChange.emit($event.value)"
>
<md-option *ngFor="let g of groupings" [value]="g">
{{ g.label | translate }}
</md-option>
</cs-draggable-select>

<div class="options-panel filter-wrapper">
<mat-form-field>
<mat-select
multiple="true"
[placeholder]="'ACCOUNT_PAGE.FILTERS.SELECT_DOMAINS' | translate"
[ngModel]="selectedDomainIds"
(change)="onDomainsChange.emit($event.value)"
>
<mat-option *ngFor="let domain of domains" [value]="domain.id">{{ domain.name }}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select
multiple="true"
[placeholder]="'ACCOUNT_PAGE.FILTERS.SELECT_ROLES' | translate"
[ngModel]="selectedRoleNames"
(change)="onRolesChange.emit($event.value)"
>
<mat-option *ngFor="let role of roles" [value]="role.name">{{ role.name }}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select
multiple="true"
[placeholder]="'ACCOUNT_PAGE.FILTERS.SELECT_ROLE_TYPES' | translate"
[ngModel]="selectedRoleTypes"
(change)="onRoleTypesChange.emit($event.value)"
>
<mat-option *ngFor="let roleType of roleTypes" [value]="roleType">{{ roleType }}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select
multiple="true"
[placeholder]="'ACCOUNT_PAGE.FILTERS.SELECT_STATES' | translate"
[ngModel]="selectedStates"
(change)="onStatesChange.emit($event.value)"
>
<mat-option *ngFor="let state of states" [value]="state">{{
stateTranslationToken(state) | translate }}
</mat-option>
</mat-select>
</mat-form-field>
<cs-divider-vertical></cs-divider-vertical>
<mat-form-field>
<cs-draggable-select
multiple="true"
[placeholder]="'ACCOUNT_PAGE.FILTERS.GROUP_BY' | translate"
[(ngModel)]="selectedGroupings"
[dragItems]="groupings"
(change)="onGroupingsChange.emit($event.value)"
>
<mat-option *ngFor="let g of groupings" [value]="g">
{{ g.label | translate }}
</mat-option>
</cs-draggable-select>
</mat-form-field>
</div>

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class AccountListFilterComponent {
@Output() public onGroupingsChange = new EventEmitter();

public stateTranslationToken(state): string {
return stateTranslations[state.toUpperCase()];
return stateTranslations[state];
}

}
4 changes: 2 additions & 2 deletions src/app/account/account-page/account-page.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
overflow: hidden;
}

md-sidenav-container {
mat-sidenav-container {
height: 100%;
}

cs-sidebar, md-sidenav {
cs-sidebar, mat-sidenav {
width: $sidebar-width + 1;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
<ng-container *ngIf="account">
<md-card>
<md-card-header>
<md-card-title>
<h2 class="md-card-title-text">{{ 'ACCOUNT_PAGE.DETAILS.TITLE' | translate }}</h2>
</md-card-title>
</md-card-header>
<md-card-content class="md-card-content-with-actions">
<div class="md-card-content-container">
<mat-card>
<mat-card-header>
<mat-card-title>
<h2 class="mat-card-title-text">{{ 'ACCOUNT_PAGE.DETAILS.TITLE' | translate }}</h2>
</mat-card-title>
</mat-card-header>
<mat-card-content class="mat-card-content-with-actions">
<div class="mat-card-content-container">
<div class="height-container">
<div class="flex-container container">
<div class="flex-container left">
<div
class="name"
[mdTooltip]="'ACCOUNT_PAGE.DETAILS.ID' | translate"
[matTooltip]="'ACCOUNT_PAGE.DETAILS.ID' | translate"
[innerHTML]="'ACCOUNT_PAGE.DETAILS.ID' | translate"
></div>
</div>
<div
ngxClipboard
class="value"
[innerHTML]="account.id"
[mdTooltip]="account.id"
[matTooltip]="account.id"
></div>
</div>
</div>
Expand All @@ -29,15 +29,15 @@ <h2 class="md-card-title-text">{{ 'ACCOUNT_PAGE.DETAILS.TITLE' | translate }}</h
<div class="flex-container left">
<div
class="name"
[mdTooltip]="'ACCOUNT_PAGE.DETAILS.ROLE' | translate"
[matTooltip]="'ACCOUNT_PAGE.DETAILS.ROLE' | translate"
[innerHTML]="'ACCOUNT_PAGE.DETAILS.ROLE' | translate"
></div>
</div>
<div
ngxClipboard
class="value"
[innerHTML]="account.rolename"
[mdTooltip]="account.rolename"
[matTooltip]="account.rolename"
></div>
</div>
</div>
Expand All @@ -46,15 +46,15 @@ <h2 class="md-card-title-text">{{ 'ACCOUNT_PAGE.DETAILS.TITLE' | translate }}</h
<div class="flex-container left">
<div
class="name"
[mdTooltip]="'ACCOUNT_PAGE.DETAILS.ROLE_TYPE' | translate"
[matTooltip]="'ACCOUNT_PAGE.DETAILS.ROLE_TYPE' | translate"
[innerHTML]="'ACCOUNT_PAGE.DETAILS.ROLE_TYPE' | translate"
></div>
</div>
<div
ngxClipboard
class="value"
[innerHTML]="account.roletype"
[mdTooltip]="account.roletype"
[matTooltip]="account.roletype"
></div>
</div>
</div>
Expand All @@ -63,15 +63,15 @@ <h2 class="md-card-title-text">{{ 'ACCOUNT_PAGE.DETAILS.TITLE' | translate }}</h
<div class="flex-container left">
<div
class="name"
[mdTooltip]="'ACCOUNT_PAGE.DETAILS.DOMAIN' | translate"
[matTooltip]="'ACCOUNT_PAGE.DETAILS.DOMAIN' | translate"
[innerHTML]="'ACCOUNT_PAGE.DETAILS.DOMAIN' | translate"
></div>
</div>
<div
ngxClipboard
class="value"
[innerHTML]="account.domain"
[mdTooltip]="account.domain"
[matTooltip]="account.domain"
></div>
</div>
</div>
Expand All @@ -80,15 +80,15 @@ <h2 class="md-card-title-text">{{ 'ACCOUNT_PAGE.DETAILS.TITLE' | translate }}</h
<div class="flex-container left">
<div
class="name"
[mdTooltip]="'ACCOUNT_PAGE.DETAILS.VMS' | translate"
[matTooltip]="'ACCOUNT_PAGE.DETAILS.VMS' | translate"
[innerHTML]="'ACCOUNT_PAGE.DETAILS.VMS' | translate"
></div>
</div>
<div
ngxClipboard
class="value"
[innerHTML]="account.vmtotal"
[mdTooltip]="account.vmtotal"
[matTooltip]="account.vmtotal"
></div>
</div>
</div>
Expand All @@ -97,15 +97,15 @@ <h2 class="md-card-title-text">{{ 'ACCOUNT_PAGE.DETAILS.TITLE' | translate }}</h
<div class="flex-container left">
<div
class="name"
[mdTooltip]="'ACCOUNT_PAGE.DETAILS.IPS' | translate"
[matTooltip]="'ACCOUNT_PAGE.DETAILS.IPS' | translate"
[innerHTML]="'ACCOUNT_PAGE.DETAILS.IPS' | translate"
></div>
</div>
<div
ngxClipboard
class="value"
[innerHTML]="account.iptotal"
[mdTooltip]="account.iptotal"
[matTooltip]="account.iptotal"
></div>
</div>
</div>
Expand All @@ -114,15 +114,15 @@ <h2 class="md-card-title-text">{{ 'ACCOUNT_PAGE.DETAILS.TITLE' | translate }}</h
<div class="flex-container left">
<div
class="name"
[mdTooltip]="'ACCOUNT_PAGE.DETAILS.R_BYTES' | translate"
[matTooltip]="'ACCOUNT_PAGE.DETAILS.R_BYTES' | translate"
[innerHTML]="'ACCOUNT_PAGE.DETAILS.R_BYTES' | translate"
></div>
</div>
<div
ngxClipboard
class="value"
[innerHTML]="account.receivedbytes"
[mdTooltip]="account.receivedbytes"
[matTooltip]="account.receivedbytes"
></div>
</div>
</div>
Expand All @@ -131,21 +131,21 @@ <h2 class="md-card-title-text">{{ 'ACCOUNT_PAGE.DETAILS.TITLE' | translate }}</h
<div class="flex-container left">
<div
class="name"
[mdTooltip]="'ACCOUNT_PAGE.DETAILS.S_BYTES' | translate"
[matTooltip]="'ACCOUNT_PAGE.DETAILS.S_BYTES' | translate"
[innerHTML]="'ACCOUNT_PAGE.DETAILS.S_BYTES' | translate"
></div>
</div>
<div
ngxClipboard
class="value"
[innerHTML]="account.sentbytes"
[mdTooltip]="account.sentbytes"
[matTooltip]="account.sentbytes"
></div>
</div>
</div>
</div>
</md-card-content>
</md-card>
</mat-card-content>
</mat-card>
</ng-container>

<cs-account-settings *ngIf="account && isAdmin()" [account]="account"></cs-account-settings>
Expand Down
Loading

0 comments on commit 3851b8e

Please sign in to comment.