Skip to content

Commit 96934a7

Browse files
Merge pull request #449 from communitybridge/feature/lf-login
Feature: added LF login
2 parents 9462d03 + d63807a commit 96934a7

26 files changed

+172
-396
lines changed

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,14 @@
5454
"@angular/router": "~11.2.14",
5555
"@auth0/auth0-angular": "1.5.1",
5656
"@fortawesome/fontawesome-free": "^6.4.0",
57+
"@linuxfoundation/lfx-ui-core": "^0.0.12",
5758
"@ng-bootstrap/ng-bootstrap": "^6.1.0",
5859
"@silvermine/serverless-plugin-cloudfront-lambda-edge": "^2.1.1",
59-
"@linuxfoundation/lfx-ui-core": "^0.0.12",
60-
"aws-sdk": "2.1558.0",
6160
"@types/node": "^18.16.0",
6261
"auth0-spa-js": "^1.6.5",
62+
"aws-sdk": "2.1558.0",
6363
"bootstrap": "^4.4.0",
64+
"detectincognitojs": "^1.5.0",
6465
"file-saver": "^2.0.5",
6566
"query-string": "^6.13.8",
6667
"rxjs": "~6.6.3",

src/app/app-routing.module.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,14 @@ import { IndividualDashboardComponent } from './modules/individual-contributor/c
99
import { CorporateDashboardComponent } from './modules/corporate-contributor/container/corporate-dashboard/corporate-dashboard.component';
1010
import { ClaRequestAuthorizationComponent } from './modules/corporate-contributor/container/cla-request-authorization/cla-request-authorization.component';
1111
import { GerritDashboardComponent } from './modules/dashboard/container/gerrit-dashboard/gerrit-dashboard.component';
12-
import { AuthComponent } from './shared/components/auth/auth.component';
12+
import { AuthDashboardComponent } from './modules/dashboard/container/auth-dashboard/auth-dashboard.component';
1313

1414

1515
const routes: Routes = [
1616
{
1717
path: '',
1818
pathMatch: 'full',
19-
redirectTo: '/cla'
20-
},
21-
{
22-
path: 'auth',
23-
pathMatch: 'full',
24-
component: AuthComponent
19+
component: AuthDashboardComponent
2520
},
2621
{
2722
path: 'cla/project/:projectId/user/:userId',

src/app/app.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
import { Component } from '@angular/core';
55
import { environment } from 'src/environments/environment';
6+
import { AuthService } from './shared/services/auth.service';
7+
import { ActivatedRoute } from '@angular/router';
68

79
@Component({
810
selector: 'app-root',
@@ -14,6 +16,8 @@ export class AppComponent {
1416
hasExpanded: boolean;
1517
links: any[];
1618

19+
constructor(private auth:AuthService, private route: ActivatedRoute){}
20+
1721
onToggled() {
1822
this.hasExpanded = !this.hasExpanded;
1923
}

src/app/app.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import { InterceptorService } from './shared/services/interceptor.service';
3232
DashboardModule,
3333
IndividualContributorModule,
3434
CorporateContributorModule,
35-
FormsModule
35+
FormsModule,
3636
],
3737
providers: [
3838
{

src/app/modules/corporate-contributor/component/configure-cla-manager-modal/configure-cla-manager-modal.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,6 @@ export class ConfigureClaManagerModalComponent implements OnInit {
282282
this.modalService.dismissAll();
283283
this.loaderService.show();
284284
const corporateUrl = this.claContributorService.getLFXCorporateURL();
285-
console.log('corporateURL: ', corporateUrl);
286285
if (corporateUrl !== '') {
287286
this.storageService.removeItem(AppSettings.ACTION_TYPE);
288287
window.open(corporateUrl, '_self');

src/app/modules/corporate-contributor/container/cla-request-authorization/cla-request-authorization.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!-- Copyright The Linux Foundation and each contributor to CommunityBridge.
22
SPDX-License-Identifier: MIT -->
33

4-
<app-project-title [projectId]="projectId" [userId]="userId"></app-project-title>
4+
<app-project-title></app-project-title>
55

66
<div class="col-12 corporate-dashboard">
77
<div class="container">

src/app/modules/corporate-contributor/container/corporate-dashboard/corporate-dashboard.component.html

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
<!-- Copyright The Linux Foundation and each contributor to CommunityBridge.
22
SPDX-License-Identifier: MIT -->
33

4-
<app-project-title
5-
[projectId]="projectId"
6-
[userId]="userId"
7-
></app-project-title>
8-
94
<div class="col-12 corporate-dashboard">
105
<div class="container">
116
<div class="row justify-content-center align-items-center">
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<!-- Copyright The Linux Foundation and each contributor to CommunityBridge.
2+
SPDX-License-Identifier: MIT -->
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/* Copyright The Linux Foundation and each contributor to CommunityBridge.
2+
SPDX-License-Identifier: MIT */
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Copyright The Linux Foundation and each contributor to CommunityBridge.
2+
// SPDX-License-Identifier: MIT
3+
4+
import { ComponentFixture, TestBed } from '@angular/core/testing';
5+
6+
import { AuthDashboardComponent } from './auth-dashboard.component';
7+
8+
describe('AuthDashboardComponent', () => {
9+
let component: AuthDashboardComponent;
10+
let fixture: ComponentFixture<AuthDashboardComponent>;
11+
12+
beforeEach(async () => {
13+
await TestBed.configureTestingModule({
14+
declarations: [ AuthDashboardComponent ]
15+
})
16+
.compileComponents();
17+
});
18+
19+
beforeEach(() => {
20+
fixture = TestBed.createComponent(AuthDashboardComponent);
21+
component = fixture.componentInstance;
22+
fixture.detectChanges();
23+
});
24+
25+
it('should create', () => {
26+
expect(component).toBeTruthy();
27+
});
28+
});

0 commit comments

Comments
 (0)