-
Notifications
You must be signed in to change notification settings - Fork 17
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 #33 from tillias/dev
current development activities
- Loading branch information
Showing
31 changed files
with
374 additions
and
55 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
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
22 changes: 11 additions & 11 deletions
22
src/main/resources/config/liquibase/fake-data/microservice.csv
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,11 +1,11 @@ | ||
id;name;description;image_url;swagger_url;git_url;team_id;status_id | ||
1;COM silver cultivate;../fake-data/blob/hipster.txt;rich Prairie olive;Handcrafted program hard drive;lime Denmark;1;1 | ||
2;Kenya;../fake-data/blob/hipster.txt;Yemeni Rial Cayman Islands Shoes;infrastructure;Reactive;2;2 | ||
3;interface bifurcated Forint;../fake-data/blob/hipster.txt;teal;Bedfordshire Supervisor;pixel Regional Assimilated;3;3 | ||
4;Home Loan Account;../fake-data/blob/hipster.txt;partnerships Wisconsin;exploit well-modulated;black online;4;4 | ||
5;Games Rwanda Franc networks;../fake-data/blob/hipster.txt;Profound Buckinghamshire panel;Graphical User Interface Tuna;Diverse;5;1 | ||
6;card value-added;../fake-data/blob/hipster.txt;bypass Reduced;Montana;Iceland Krona;6;2 | ||
7;indexing;../fake-data/blob/hipster.txt;Frozen index;Intelligent Central;expedite;7;3 | ||
8;index;../fake-data/blob/hipster.txt;Savings Account Berkshire quantify;web-readiness Investment Account;array Intelligent Rubber Table fuchsia;8;4 | ||
9;calculating;../fake-data/blob/hipster.txt;North Dakota;throughput bluetooth Coordinator;override HTTP Incredible Granite Cheese;9;1 | ||
10;local area network knowledge base;../fake-data/blob/hipster.txt;Fantastic Cotton Chips portals;bypass Euro Optimized;Wooden Keyboard RAM;10;2 | ||
id;name;description;image_url;swagger_url;git_url;ci_url;team_id;status_id | ||
1;COM silver cultivate;../fake-data/blob/hipster.txt;rich Prairie olive;Handcrafted program hard drive;lime Denmark;Kenya;1;1 | ||
2;Yemeni Rial Cayman Islands Shoes;../fake-data/blob/hipster.txt;infrastructure;Reactive;interface bifurcated Forint;teal;2;2 | ||
3;Bedfordshire Supervisor;../fake-data/blob/hipster.txt;pixel Regional Assimilated;Home Loan Account;partnerships Wisconsin;exploit well-modulated;3;3 | ||
4;black online;../fake-data/blob/hipster.txt;Games Rwanda Franc networks;Profound Buckinghamshire panel;Graphical User Interface Tuna;Diverse;4;4 | ||
5;card value-added;../fake-data/blob/hipster.txt;bypass Reduced;Montana;Iceland Krona;indexing;5;1 | ||
6;Frozen index;../fake-data/blob/hipster.txt;Intelligent Central;expedite;index;Savings Account Berkshire quantify;6;2 | ||
7;web-readiness Investment Account;../fake-data/blob/hipster.txt;array Intelligent Rubber Table fuchsia;calculating;North Dakota;throughput bluetooth Coordinator;7;3 | ||
8;override HTTP Incredible Granite Cheese;../fake-data/blob/hipster.txt;local area network knowledge base;Fantastic Cotton Chips portals;bypass Euro Optimized;Wooden Keyboard RAM;8;4 | ||
9;United Kingdom back up cross-platform;../fake-data/blob/hipster.txt;homogeneous Ameliorated;indexing;contextually-based HDD;Tuna Intelligent Steel Shoes;9;1 | ||
10;Strategist Senior;../fake-data/blob/hipster.txt;payment circuit withdrawal;facilitate Principal;Awesome Metal Bacon AGP;Zloty online Massachusetts;10;2 |
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
5 changes: 3 additions & 2 deletions
5
...pp/app/entities/microservice/microservice-dashboard/microservice-dashboard.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,9 +1,10 @@ | ||
<div class="mb-4"> | ||
<jhi-microservice-search (itemSelected)="onMicroserviceSelected($event)"> | ||
<jhi-microservice-search (itemSelected)="onMicroserviceSelected($event)" | ||
(groupFilterChanged)="onGroupFilterChanged($event)" [advanced]="true"> | ||
</jhi-microservice-search> | ||
</div> | ||
<div class="card-columns"> | ||
<jhi-microservice-card *ngFor="let microservice of microservices" | ||
<jhi-microservice-card *ngFor="let microservice of (microservices | microserviceGroupFilter: filter)" | ||
[microservice]="microservice"> | ||
</jhi-microservice-card> | ||
</div> |
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
5 changes: 3 additions & 2 deletions
5
.../webapp/app/entities/microservice/microservice-dashboard/microservice-dashboard.module.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
53 changes: 53 additions & 0 deletions
53
...webapp/app/entities/microservice/microservice-dashboard/microservice-group-filter.pipe.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,53 @@ | ||
import { Pipe, PipeTransform } from '@angular/core'; | ||
import { IMicroservice } from 'app/shared/model/microservice.model'; | ||
import { IMicroserviceGroupFilter } from 'app/shared/model/util/microservice-group-filter'; | ||
|
||
@Pipe({ | ||
name: 'microserviceGroupFilter', | ||
}) | ||
export class MicroserviceGroupFilterPipe implements PipeTransform { | ||
transform(items: IMicroservice[], filter: IMicroserviceGroupFilter): IMicroservice[] { | ||
if (!items || !filter) { | ||
return items; | ||
} | ||
|
||
return items.filter(i => { | ||
let match = true; | ||
match = match && this.contains(filter.caseSensitive, i.name, filter.name); | ||
match = match && this.contains(filter.caseSensitive, i.description, filter.description); | ||
match = match && this.contains(filter.caseSensitive, i.swaggerUrl, filter.swaggerUrl); | ||
match = match && this.contains(filter.caseSensitive, i.gitUrl, filter.gitUrl); | ||
|
||
if (filter.status && i.status) { | ||
match = match && i.status.id === filter.status.id; | ||
} | ||
if (filter.team && i.team) { | ||
match = match && i.team.id === filter.team.id; | ||
} | ||
|
||
return match; | ||
}); | ||
} | ||
|
||
contains(caseSensitive: boolean, source?: string, substr?: string): boolean { | ||
if (!substr) { | ||
return true; | ||
} | ||
|
||
if (!source && substr) { | ||
return false; | ||
} | ||
|
||
if (source && substr) { | ||
let sourceTerm = source; | ||
let targetTerm = substr; | ||
if (!caseSensitive) { | ||
sourceTerm = source.toLowerCase(); | ||
targetTerm = substr.toLowerCase(); | ||
} | ||
|
||
return sourceTerm.includes(targetTerm); | ||
} | ||
return false; | ||
} | ||
} |
64 changes: 64 additions & 0 deletions
64
...rd/microservice-search/microservice-group-filter/microservice-group-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,64 @@ | ||
<div class="btn-group" ngbDropdown container="body" placement="bottom-right"> | ||
<button type="button" class="btn btn-secondary dropdown-toggle" ngbDropdownToggle></button> | ||
<div class="dropdown-menu" ngbDropdownMenu> | ||
<div class="input-group p-3"> | ||
<div class="container"> | ||
<div class="row p-2"> | ||
<div class="custom-control custom-switch"> | ||
<input type="checkbox" class="custom-control-input" id="customSwitch1" | ||
[(ngModel)]="groupFilter.caseSensitive"> | ||
<label class="custom-control-label" for="customSwitch1" | ||
jhiTranslate="microcatalogApp.microservice.search.group.case"> | ||
Case-sensitive search</label> | ||
</div> | ||
</div> | ||
<div class="row p-2"> | ||
<input type="text" [(ngModel)]="groupFilter.name" (keyup.enter)="onSearch()" class="form-control" | ||
placeholder="Name" aria-label="Name"> | ||
</div> | ||
<div class="row p-2"> | ||
<input type="text" [(ngModel)]="groupFilter.description" (keyup.enter)="onSearch()" | ||
class="form-control" placeholder="Description" aria-label="Description"> | ||
</div> | ||
<div class="row p-2"> | ||
<input type="text" [(ngModel)]="groupFilter.swaggerUrl" (keyup.enter)="onSearch()" | ||
class="form-control" placeholder="Swagger url" aria-label="Swagger url"> | ||
</div> | ||
<div class="row p-2"> | ||
<input type="text" [(ngModel)]="groupFilter.gitUrl" (keyup.enter)="onSearch()" class="form-control" | ||
placeholder="Git url" aria-label="Git url"> | ||
</div> | ||
<div class="row p-2"> | ||
<select title="Team" [(ngModel)]="groupFilter.team" class="custom-select"> | ||
<option [ngValue]="undefined" selected | ||
jhiTranslate="microcatalogApp.microservice.search.group.team">Select Team... | ||
</option> | ||
<option *ngFor="let team of teams" [ngValue]="team"> | ||
{{team.name}} | ||
</option> | ||
</select> | ||
</div> | ||
<div class="row p-2"> | ||
<select title="Status" [(ngModel)]="groupFilter.status" class="custom-select"> | ||
<option [ngValue]="undefined" selected | ||
jhiTranslate="microcatalogApp.microservice.search.group.status">Select Status... | ||
</option> | ||
<option *ngFor="let status of statuses" [ngValue]="status"> | ||
{{status.name}} | ||
</option> | ||
</select> | ||
</div> | ||
<div class="row p-2"> | ||
<div class="btn-group"> | ||
<button class="btn btn-primary" (click)="onSearch()" | ||
jhiTranslate="microcatalogApp.microservice.search.group.search">Search | ||
</button> | ||
<button class="btn btn-primary" (click)="onClearFilter()" | ||
jhiTranslate="microcatalogApp.microservice.search.group.clear">Clear filters | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
Empty file.
44 changes: 44 additions & 0 deletions
44
...oard/microservice-search/microservice-group-filter/microservice-group-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,44 @@ | ||
import { Component, EventEmitter, OnInit, Output } from '@angular/core'; | ||
import { IMicroserviceGroupFilter, MicroserviceGroupFilter } from 'app/shared/model/util/microservice-group-filter'; | ||
import { TeamService } from 'app/entities/team/team.service'; | ||
import { StatusService } from 'app/entities/status/status.service'; | ||
import { ITeam } from 'app/shared/model/team.model'; | ||
import { IStatus } from 'app/shared/model/status.model'; | ||
import { HttpResponse } from '@angular/common/http'; | ||
|
||
@Component({ | ||
selector: 'jhi-microservice-group-filter', | ||
templateUrl: './microservice-group-filter.component.html', | ||
styleUrls: ['./microservice-group-filter.component.scss'], | ||
}) | ||
export class MicroserviceGroupFilterComponent implements OnInit { | ||
groupFilter: IMicroserviceGroupFilter; | ||
teams: ITeam[]; | ||
statuses: IStatus[]; | ||
|
||
@Output() filterChanged = new EventEmitter<IMicroserviceGroupFilter>(); | ||
|
||
constructor(private teamService: TeamService, private statusService: StatusService) { | ||
this.groupFilter = new MicroserviceGroupFilter(); | ||
this.teams = []; | ||
this.statuses = []; | ||
} | ||
|
||
ngOnInit(): void { | ||
this.loadItems(); | ||
} | ||
|
||
loadItems(): void { | ||
this.teamService.query().subscribe((res: HttpResponse<ITeam[]>) => (this.teams = res.body || [])); | ||
this.statusService.query().subscribe((res: HttpResponse<IStatus[]>) => (this.statuses = res.body || [])); | ||
} | ||
|
||
onSearch(): void { | ||
this.filterChanged.emit(this.groupFilter); | ||
} | ||
|
||
onClearFilter(): void { | ||
this.groupFilter = new MicroserviceGroupFilter(); | ||
this.onSearch(); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
...shboard/microservice-search/microservice-group-filter/microservice-group-filter.module.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,10 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { MicroserviceGroupFilterComponent } from './microservice-group-filter.component'; | ||
import { MicrocatalogSharedModule } from 'app/shared/shared.module'; | ||
|
||
@NgModule({ | ||
declarations: [MicroserviceGroupFilterComponent], | ||
imports: [MicrocatalogSharedModule], | ||
exports: [MicroserviceGroupFilterComponent], | ||
}) | ||
export class MicroserviceGroupFilterModule {} |
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.
67662f9
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.
Initial steps for #37