-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from Hydrospheredata/master
0.0.14
- Loading branch information
Showing
15 changed files
with
183 additions
and
70 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
src/app/components/dialogs/dialog-test.component/dialog-test.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
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 |
---|---|---|
|
@@ -14,3 +14,11 @@ | |
margin-top: 20px; | ||
margin-bottom: 10px; | ||
} | ||
|
||
.input { | ||
&-text { | ||
&__input { | ||
font-family: monospace; | ||
} | ||
} | ||
} |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
86 changes: 50 additions & 36 deletions
86
src/modules/shared/components/sidebar/sidebar.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 |
---|---|---|
@@ -1,42 +1,56 @@ | ||
<aside class="sidebar"> | ||
<div class="sidebar-header"> | ||
<div class="sidebar-header__row"> | ||
<h3 class='sidebar-title'>{{sidebarTitle}}</h3> | ||
<button class="btn btn-secondary" *ngIf="isAddBtnEnabled" (click)="addService($event)" title="Add new app"> | ||
<svg> | ||
<use xlink:href="#icon-plus"></use> | ||
</svg> | ||
Add app | ||
</button> | ||
</div> | ||
<div class="sidebar-header__row"> | ||
<hydro-input-text class="sidebar-search" | ||
inputClass="sidebar-search" | ||
placeholder="Search" | ||
[(ngModel)]="searchQ" | ||
iconName="search" | ||
iconDirection="left" | ||
></hydro-input-text> | ||
</div> | ||
<div class="sidebar-header"> | ||
<div class="sidebar-header__row"> | ||
<h3 class='sidebar-title'>{{sidebarTitle}}</h3> | ||
<button class="btn btn-secondary" *ngIf="isAddBtnEnabled" (click)="addService($event)" title="Add new app"> | ||
<svg> | ||
<use xlink:href="#icon-plus"></use> | ||
</svg> | ||
Add app | ||
</button> | ||
</div> | ||
<div class="sidebar-header__row"> | ||
<hydro-input-text class="sidebar-search" inputClass="sidebar-search" placeholder="Search" [(ngModel)]="searchQ" iconName="search" | ||
iconDirection="left"></hydro-input-text> | ||
</div> | ||
|
||
|
||
<div *ngIf="isModels" class="sidebar-filter"> | ||
<span class="sidebar-filter__label">Filter:</span> | ||
<button (click)="toggleModelFilter('deployed')" class="sidebar-filter__button" [ngClass]="{'sidebar-filter__selected': !deployedFilter['deployed']}"> | ||
<svg class="icon sidebar-filter__button--icon deployed"> | ||
<use xlink:href="#icon-arrow" /> | ||
</svg> | ||
<span class="sidebar-filter__button--label">Deployed</span> | ||
</button> | ||
<button (click)="toggleModelFilter('undeployed')" class="sidebar-filter__button" [ngClass]="{'sidebar-filter__selected': !deployedFilter['undeployed']}" > | ||
<svg class="icon sidebar-filter__button--icon undeployed-filter"> | ||
<use xlink:href="#icon-arrow" /> | ||
</svg> | ||
<span class="sidebar-filter__button--label">Undeployed</span> | ||
</button> | ||
</div> | ||
</div> | ||
|
||
|
||
|
||
<div class="sidebar-body"> | ||
<ul class='sidebar-list'> | ||
<li *ngFor="let item of sidebarList | search : (isModels ? 'name' : 'serviceName') : searchQ | sortBy: 'id'" class='sidebar-list__item' [routerLink]="[item.id]" routerLinkActive='__active'> | ||
<span class="sidebar-list__item-name">{{ item.serviceName || item.source }}</span> | ||
<span class='sidebar-list__item-status' *ngIf="item.currentServices && item.currentServices.length && this.dataType === 'services'" [mdl-badge]="item.currentServices.length"></span> | ||
<div *ngIf="isModels" class="sidebar-list__item-details"> | ||
<span class="sidebar-list__item--version" | ||
[ngClass]="{ | ||
<div class="sidebar-body"> | ||
<ul class='sidebar-list'> | ||
<li *ngFor="let item of sidebarList | modelFilter:deployedFilter | search : (isModels ? 'name' : 'serviceName') : searchQ | sortBy: 'id'" | ||
class='sidebar-list__item' [routerLink]="[item.id]" routerLinkActive='__active'> | ||
<span class="sidebar-list__item-name">{{ item.serviceName || item.source }}</span> | ||
<span class='sidebar-list__item-status' *ngIf="item.currentServices && item.currentServices.length && this.dataType === 'services'" | ||
[mdl-badge]="item.currentServices.length"></span> | ||
<div *ngIf="isModels" class="sidebar-list__item-details"> | ||
<span class="sidebar-list__item--version" [ngClass]="{ | ||
'version-new': isDeployable(item), | ||
'version-failed': item.lastModelBuild.status === 'FAILED' | ||
}" | ||
>{{getLatestVersion(item)}}</span> | ||
<svg class="icon sidebar-list__item--deploy" [ngClass]="item?.currentServices?.length > 0 ? 'deployed' : 'undeployed'"> | ||
<use xlink:href="#icon-arrow" /> | ||
</svg> | ||
</div> | ||
</li> | ||
</ul> | ||
</div> | ||
}">{{getLatestVersion(item)}}</span> | ||
<svg class="icon sidebar-list__item--deploy" [ngClass]="item?.currentServices?.length > 0 ? 'deployed' : 'undeployed'"> | ||
<use xlink:href="#icon-arrow" /> | ||
</svg> | ||
</div> | ||
</li> | ||
</ul> | ||
</div> | ||
</aside> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
export * from './model-filter.pipe'; | ||
export * from './model-status.pipe'; | ||
export * from './positive-numbers.pipe'; | ||
export * from './search.pipe'; | ||
export * from './sort-by.pipe'; | ||
export * from './utc-to-local.pipe'; | ||
export * from './iterate-as-array.pipe'; | ||
export * from './remove-dublicates.pipe'; | ||
export * from './remove-dublicates.pipe'; |
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,8 @@ | ||
import { ModelFilterPipe } from './model-filter.pipe'; | ||
|
||
describe('ModelFilterPipe', () => { | ||
it('create an instance', () => { | ||
const pipe = new ModelFilterPipe(); | ||
expect(true).toBeTruthy(); | ||
}); | ||
}); |
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,18 @@ | ||
import { Pipe, PipeTransform } from '@angular/core'; | ||
|
||
@Pipe({ | ||
name: 'modelFilter', | ||
pure: false | ||
}) | ||
export class ModelFilterPipe implements PipeTransform { | ||
|
||
transform(models: any, filterStatus: any): any { | ||
return models.filter(model => { | ||
let result = false; | ||
result = result || filterStatus['deployed'] && model.currentServices && model.currentServices.length > 0; | ||
result = result || filterStatus['undeployed'] && (!model.currentServices || model.currentServices.length < 1); | ||
return result; | ||
}); | ||
} | ||
|
||
} |
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.