Skip to content

Commit

Permalink
fixed login logic removed noctua-form template #2
Browse files Browse the repository at this point in the history
  • Loading branch information
tmushayahama committed Mar 26, 2020
1 parent 8400744 commit 9531df0
Show file tree
Hide file tree
Showing 7 changed files with 7,149 additions and 8,838 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@
<mat-datepicker-toggle matSuffix [for]="exactDatePicker"></mat-datepicker-toggle>
<mat-datepicker #exactDatePicker></mat-datepicker>
</mat-form-field>
<div *ngIf="!dateSearchType" class="noc-sm w-100-p" fxLayout="row" fxLayoutAlign="start center">
<mat-form-field appearance="outline" class="noc-sm" fxFlex="50">
<div *ngIf="!dateSearchType" class="noc-sm w-100-p" fxLayout="column" fxLayoutAlign="start stretch">
<mat-form-field appearance="outline" class="noc-sm">
<mat-label>Start Date</mat-label>
<mat-chip-list #startDateChipList>
<mat-chip *ngFor="let date of noctuaSearchService.searchCriteria.startdates" [selectable]="true"
Expand All @@ -245,7 +245,7 @@
<mat-datepicker-toggle matSuffix [for]="startDatePicker"></mat-datepicker-toggle>
<mat-datepicker #startDatePicker></mat-datepicker>
</mat-form-field>
<mat-form-field appearance="outline" class="noc-sm" fxFlex="50">
<mat-form-field appearance="outline" class="noc-sm">
<mat-label>End Date</mat-label>
<mat-chip-list #dateChipList>
<mat-chip *ngFor="let date of noctuaSearchService.searchCriteria.enddates" [selectable]="true"
Expand Down
4 changes: 3 additions & 1 deletion src/@noctua.search/services/noctua-search.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ export class NoctuaSearchService {
groups: 'groups',
organisms: 'organisms',
states: 'states',
dates: 'dates'
exactdates: 'exactdates',
startdates: 'startdates',
enddates: 'enddates',
};

constructor(private httpClient: HttpClient,
Expand Down
12 changes: 5 additions & 7 deletions src/app/layout/components/toolbar/toolbar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class NoctuaToolbarComponent implements OnInit, OnDestroy {
horizontalNav: boolean;
noNav: boolean;
navigation: any;
noctuaFormUrl = '';
noctuaLandingPageUrl = '';
loginUrl = '';
logoutUrl = '';
noctuaUrl = '';
Expand All @@ -57,19 +57,17 @@ export class NoctuaToolbarComponent implements OnInit, OnDestroy {
.pipe(takeUntil(this._unsubscribeAll))
.subscribe(params => {
const baristaToken = params['barista_token'] || null;
const modelId = params['model_id'] || null;
const noctuaFormReturnUrl = `${environment.workbenchUrl}noctua-form/?model_id=${modelId}`;
const noctuaLandingPageReturnUrl = `${environment.workbenchUrl}noctua-landing-page`;
const baristaParams = { 'barista_token': baristaToken };
const modelIdParams = { 'model_id': modelId };
const returnUrlParams = { 'return': noctuaFormReturnUrl };
const returnUrlParams = { 'return': noctuaLandingPageReturnUrl };

this.loginUrl = environment.globalBaristaLocation + '/login?' +
self._parameterize(Object.assign({}, returnUrlParams));
this.logoutUrl = environment.globalBaristaLocation + '/logout?' +
self._parameterize(Object.assign({}, baristaParams, returnUrlParams));
this.noctuaUrl = environment.noctuaUrl + '?' + (baristaToken ? self._parameterize(Object.assign({}, baristaParams)) : '');
this.noctuaFormUrl = environment.workbenchUrl + 'noctua-form?'
+ (baristaToken ? self._parameterize(Object.assign({}, modelIdParams, baristaParams)) : '');
this.noctuaLandingPageUrl = environment.workbenchUrl + 'noctua-landing-page?'
+ (baristaToken ? self._parameterize(Object.assign({}, baristaParams)) : '');
});

this.router.events.pipe(takeUntil(this._unsubscribeAll))
Expand Down
15,951 changes: 7,135 additions & 8,816 deletions workbenches/noctua-landing-page/public/main.js

Large diffs are not rendered by default.

10 changes: 1 addition & 9 deletions workbenches/noctua-landing-page/public/main.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion workbenches/noctua-landing-page/public/styles.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion workbenches/noctua-landing-page/public/styles.js.map

Large diffs are not rendered by default.

0 comments on commit 9531df0

Please sign in to comment.