forked from vivo-community/scholars-angular
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add data and analytics authorizations (#302)
* Add data and analytics authorizations * Add some missing ending newlines * Increment minor version to 1.5.0 * Upgrade stomp, update home component, and add data and analytics admin component
- Loading branch information
Showing
46 changed files
with
317 additions
and
188 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file renamed
BIN
+34.6 KB
...ium-npm-1.4.531-08d5e1b5ae-a9e21d767e.zip → ...ium-npm-1.4.532-159396c974-e9f77b5d6d.zip
Binary file not shown.
Binary file renamed
BIN
+64.1 KB
...speak-npm-2.3.5-c631837bc0-c2c211f13c.zip → ...speak-npm-2.3.6-42e1233172-57d43ad11e.zip
Binary file not shown.
Binary file not shown.
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
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
16 changes: 16 additions & 0 deletions
16
src/app/+admin/data-and-analytics-views/data-and-analytics-views.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,16 @@ | ||
<scholars-pagination [page]="page"> | ||
<table class="table table-striped table-hover"> | ||
<thead> | ||
<tr> | ||
<th scope="col">{{ 'ADMIN.DATA_AND_ANALYTICS_VIEWS.NAME' | translate }}</th> | ||
<th scope="col">{{ 'ADMIN.DATA_AND_ANALYTICS_VIEWS.LAYOUT' | translate }}</th> | ||
</tr> | ||
</thead> | ||
<tbody *ngIf="dataAndAnalyticsViews | async; let dataAndAnalyticsViews"> | ||
<tr *ngFor="let dataAndAnalyticsView of dataAndAnalyticsViews"> | ||
<td scope="row">{{dataAndAnalyticsView.name}}</td> | ||
<td scope="row">{{dataAndAnalyticsView.layout}}</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</scholars-pagination> |
Empty file.
55 changes: 55 additions & 0 deletions
55
src/app/+admin/data-and-analytics-views/data-and-analytics-views.component.spec.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,55 @@ | ||
import { APP_BASE_HREF } from '@angular/common'; | ||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; | ||
import { NoopAnimationsModule } from '@angular/platform-browser/animations'; | ||
import { RouterTestingModule } from '@angular/router/testing'; | ||
import { StoreModule } from '@ngrx/store'; | ||
import { TranslateModule } from '@ngx-translate/core'; | ||
|
||
import { testAppConfig } from '../../../test.config'; | ||
import { DialogService } from '../../core/service/dialog.service'; | ||
import { metaReducers, reducers } from '../../core/store'; | ||
import { SharedModule } from '../../shared/shared.module'; | ||
import { DataAndAnalyticsViewsComponent } from './data-and-analytics-views.component'; | ||
|
||
describe('DataAndAnalyticsViewsComponent', () => { | ||
let component: DataAndAnalyticsViewsComponent; | ||
let fixture: ComponentFixture<DataAndAnalyticsViewsComponent>; | ||
|
||
beforeEach(waitForAsync(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [DataAndAnalyticsViewsComponent], | ||
providers: [ | ||
DialogService, | ||
{ | ||
provide: APP_BASE_HREF, | ||
useValue: '/', | ||
}, | ||
], | ||
imports: [ | ||
NoopAnimationsModule, | ||
SharedModule, | ||
StoreModule.forRoot(reducers(testAppConfig), { | ||
metaReducers, | ||
runtimeChecks: { | ||
strictStateImmutability: false, | ||
strictActionImmutability: false, | ||
strictStateSerializability: false, | ||
strictActionSerializability: false, | ||
}, | ||
}), | ||
TranslateModule.forRoot(), | ||
RouterTestingModule.withRoutes([]), | ||
], | ||
}).compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(DataAndAnalyticsViewsComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
29 changes: 29 additions & 0 deletions
29
src/app/+admin/data-and-analytics-views/data-and-analytics-views.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,29 @@ | ||
import { Component, OnInit, ViewEncapsulation } from '@angular/core'; | ||
import { Store, select } from '@ngrx/store'; | ||
import { Observable } from 'rxjs'; | ||
|
||
import { SdrPage } from '../../core/model/sdr'; | ||
import { DataAndAnalyticsView } from '../../core/model/view'; | ||
import { AppState } from '../../core/store'; | ||
import { selectAllResources, selectResourcesPage } from '../../core/store/sdr'; | ||
|
||
@Component({ | ||
selector: 'scholars-data-and-analytics-views', | ||
templateUrl: './data-and-analytics-views.component.html', | ||
styleUrls: ['./data-and-analytics-views.component.scss'], | ||
encapsulation: ViewEncapsulation.None, | ||
}) | ||
export class DataAndAnalyticsViewsComponent implements OnInit { | ||
|
||
public dataAndAnalyticsViews: Observable<DataAndAnalyticsView[]>; | ||
|
||
public page: Observable<SdrPage>; | ||
|
||
constructor(private store: Store<AppState>) { } | ||
|
||
ngOnInit() { | ||
this.dataAndAnalyticsViews = this.store.pipe(select(selectAllResources<DataAndAnalyticsView>('dataAndAnalyticsViews'))); | ||
this.page = this.store.pipe(select(selectResourcesPage<DataAndAnalyticsView>('dataAndAnalyticsViews'))); | ||
} | ||
|
||
} |
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 |
---|---|---|
|
@@ -13,4 +13,4 @@ | |
</tr> | ||
</tbody> | ||
</table> | ||
</scholars-pagination> | ||
</scholars-pagination> |
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 |
---|---|---|
|
@@ -13,4 +13,4 @@ | |
</tr> | ||
</tbody> | ||
</table> | ||
</scholars-pagination> | ||
</scholars-pagination> |
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 |
---|---|---|
|
@@ -17,4 +17,4 @@ | |
</tr> | ||
</tbody> | ||
</table> | ||
</scholars-pagination> | ||
</scholars-pagination> |
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 |
---|---|---|
|
@@ -15,4 +15,4 @@ | |
</tr> | ||
</tbody> | ||
</table> | ||
</scholars-pagination> | ||
</scholars-pagination> |
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 |
---|---|---|
|
@@ -21,4 +21,4 @@ | |
</tr> | ||
</tbody> | ||
</table> | ||
</scholars-pagination> | ||
</scholars-pagination> |
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
2 changes: 1 addition & 1 deletion
2
src/app/+data-and-analytics/profile-summaries-export/profile-summaries-export.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,3 +1,3 @@ | ||
<div class="container mb-1" *ngIf="getSelectedExportView() | async; let selected"> | ||
<a class="btn btn-primary pull-right" [href]="getDownloadLink(organization, selected)">{{ 'DATA_AND_ANALYTICS.DOWNLOAD' | translate }}</a> | ||
<button class="btn btn-primary pull-right" (click)="download(organization, selected)">{{ 'DATA_AND_ANALYTICS.DOWNLOAD' | translate }}</button> | ||
</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
Oops, something went wrong.