Skip to content

Commit cb64e59

Browse files
committed
Fixed bugs from MERGE master
1 parent f9c1993 commit cb64e59

File tree

5 files changed

+29
-32
lines changed

5 files changed

+29
-32
lines changed

src/app/app.component.html

+23-26
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,31 @@
1616
<ng-template #loadedConfig>
1717
<mat-toolbar color="primary">
1818
<mat-icon>library_books</mat-icon>
19-
<span style="margin-left: 1rem">Pattern Atlas</span>
19+
<span style="margin-left: 1rem">PatternAtlas</span>
20+
2021
<span class="spacer"></span>
21-
{{welcomeText}}
22-
<button mat-icon-button [matMenuTriggerFor]="menu" aria-label="Button with a menu">
23-
<mat-icon>more_vert</mat-icon>
24-
</button>
25-
<mat-menu #menu="matMenu">
26-
<button mat-menu-item (click)="openFeatureToggleDialog()">
27-
<span>Feature Toggles</span>
22+
<div *patternAtlasUiShowOnFeature="!(UiFeatures.PATTERNCANDIDATE || UiFeatures.ISSUE)">
23+
<button mat-icon-button [matMenuTriggerFor]="menu" aria-label="Button with a menu">
24+
<mat-icon>more_vert</mat-icon>
2825
</button>
29-
</mat-menu>
30-
<div class="log-button">
31-
<button mat-stroked-button
32-
(click)="loginOAuth()"
33-
*patternAtlasUiShowOnFeature="[UiFeatures.ISSUE,UiFeatures.PATTERNCANDIDATE]"> {{ loginButton }}</button>
34-
26+
<mat-menu #menu="matMenu">
27+
<button mat-menu-item (click)="openFeatureToggleDialog()">
28+
<span>Feature Toggles</span>
29+
</button>
30+
</mat-menu>
31+
</div>
32+
<div class="log-button" *patternAtlasUiShowOnFeature="UiFeatures.PATTERNCANDIDATE || UiFeatures.ISSUE">
33+
<button *ngIf="!loggedIn" mat-button (click)="login()"> Login </button>
34+
<button *ngIf="loggedIn" mat-button [matMenuTriggerFor]="menu">Hello {{userName}} <mat-icon>more_vert</mat-icon></button>
35+
<mat-menu #menu="matMenu">
36+
<button mat-menu-item routerLink="/user-info"> UserInfo </button>
37+
<button *ngIf="p.hidden('USER_READ_ALL') | async" mat-menu-item routerLink="/admin"> Admin </button>
38+
<!-- <button mat-menu-item routerLink="/developer"> Developer </button> -->
39+
<button mat-menu-item (click)="openFeatureToggleDialog()">
40+
<span>Feature Toggles</span>
41+
</button>
42+
<button mat-menu-item color="warn" (click)="logout()"> Logout </button>
43+
</mat-menu>
3544
</div>
3645
</mat-toolbar>
3746
<nav mat-tab-nav-bar>
@@ -57,18 +66,6 @@
5766
routerLinkActive #rla5="routerLinkActive" [active]="rla5.isActive">
5867
Issue
5968
</a>
60-
<a mat-tab-link [routerLink]="'/user'" *ngIf="(auth.hasRole('MEMBER') | async)"
61-
routerLinkActive #rla6="routerLinkActive" [active]="rla6.isActive">
62-
Personal
63-
</a>
64-
<a mat-tab-link [routerLink]="'/admin'" *ngIf="(auth.hasRole('ADMIN') | async)"
65-
routerLinkActive #rla7="routerLinkActive" [active]="rla7.isActive">
66-
Admin
67-
</a>
68-
<a mat-tab-link [routerLink]="'/developer'" *ngIf="(auth.hasRole('ADMIN') | async)"
69-
routerLinkActive #rla8="routerLinkActive" [active]="rla8.isActive">
70-
Developer
71-
</a>
7269
</nav>
7370
<router-outlet></router-outlet>
7471
</ng-template>

src/app/authentication/_services/authentication.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export class AuthenticationService {
179179
}
180180

181181
private getRoles() {
182-
this.http.get<any>(`${environment.repositoryUrl}/users/roles`).subscribe(roles => {
182+
this.http.get<any>(`${environment.API_URL}/users/roles`).subscribe(roles => {
183183
this.rolePASubject.next(roles._embedded.roleModels);
184184
}, error => {
185185
console.error('Error getToken via refreshToken: ', error)

src/app/core/candidate-management/_services/candidate-management.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class CandidateManagementService {
4040
* CREATE
4141
*/
4242
public createCandidate(candidate: Candidate): Observable<Candidate> {
43-
candidate.uri = candidate.name;
43+
candidate.uri = candidate.name;
4444
return this.http.post<any>(this.repoEndpoint + this.serviceEndpoint, candidate).pipe(
4545
map(result => {
4646
this.toasterService.pop('success', 'Created new candidate');

src/app/core/directives/pattern-atlas-ui-repository-configuration.service.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ interface EtcdNode {
4141
const initialValues: PatternAtlasUiConfiguration = {
4242
features: {
4343
designModel: false,
44-
patternCandidate: false,
45-
patternViews: false,
46-
issue: false,
44+
patternCandidate: true,
45+
patternViews: true,
46+
issue: true,
4747
showSettings: false,
4848
editing: true
4949
},

src/environments/environment.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const environment = {
2727
window['env']['LATEX_RENDERER_PORT']
2828
? `http://${window['env']['LATEX_RENDERER_HOST_NAME']}:${window['env']['LATEX_RENDERER_PORT']}`
2929
: 'http://localhost:5030',
30-
repositoryUrl: 'http://localhost:1978/patternpedia',
30+
repositoryUrl: 'http://localhost:1977/patternatlas',
3131
authorizeUrl: 'http://localhost:8081/oauth/authorize?',
3232
tokenUrl: 'http://localhost:8081/oauth/token',
3333
tokenRevokeUrl: 'http://localhost:8081/oauth/revoke_token',

0 commit comments

Comments
 (0)