Commit 1b28b1fd authored by Tifenn Guillas's avatar Tifenn Guillas
Browse files

Merge branch 'fixes-sonarqube' into 'develop'

Fixes sonarqube

See merge request !57
parents e8e92744 e6a4e859
Pipeline #1573 passed with stages
in 14 minutes and 17 seconds
<nav class="navbar navbar-light bg-light navbar-expand-md fixed-top border-bottom"> <nav class="navbar navbar-light bg-light navbar-expand-md fixed-top border-bottom">
<!-- Logo --> <!-- Logo -->
<a href="/" class="navbar-brand"> <a href="/" class="navbar-brand">
<img src="../assets/cesam_anis80.png" /> <img src="../assets/cesam_anis80.png" alt="CeSAM logo"/>
</a> </a>
<!-- Right Navigation --> <!-- Right Navigation -->
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
</div> </div>
</div> </div>
<div *ngIf="objectIsLoading | async" class="row justify-content-center mt-5"> <div *ngIf="objectIsLoading | async" class="row justify-content-center mt-5">
<i class="fas fa-circle-notch fa-spin fa-3x"></i> <span class="fas fa-circle-notch fa-spin fa-3x"></span>
<span class="sr-only">Loading...</span> <span class="sr-only">Loading...</span>
</div> </div>
<div *ngIf="objectIsLoaded | async"> <div *ngIf="objectIsLoaded | async">
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<div *ngIf="!(pristine | async)" class="row mt-5 justify-content-between"> <div *ngIf="!(pristine | async)" class="row mt-5 justify-content-between">
<div class="col"> <div class="col">
<button (click)="goBackToResult()" class="btn btn-outline-secondary"> <button (click)="goBackToResult()" class="btn btn-outline-secondary">
<i class="fa fa-backward"></i> Back to search results <span class="fa fa-backward"></span> Back to search results
</button> </button>
</div> </div>
</div> </div>
\ No newline at end of file
...@@ -30,10 +30,10 @@ export function reducer(state: State = initialState, action: actions.Actions): S ...@@ -30,10 +30,10 @@ export function reducer(state: State = initialState, action: actions.Actions): S
return { return {
...state, ...state,
attributeList attributeList
} };
case actions.RETRIEVE_OBJECT_SUCCESS: case actions.RETRIEVE_OBJECT_SUCCESS:
const object = action.payload as any; const object = action.payload;
return { return {
...state, ...state,
......
tabset .active.tab-pane { .tabset .active.tab-pane {
border: 1px solid #dee2e6; border: 1px solid #dee2e6;
border-top: none; border-top: none;
border-bottom-left-radius: .25rem; border-bottom-left-radius: .25rem;
......
<div class="row align-items-center"> <div class="row align-items-center">
<div class="col-12 mx-auto col-md-6 order-md-2 text-center"> <div class="col-12 mx-auto col-md-6 order-md-2 text-center">
<tabset [justified]="true"> <tabset [justified]="true" class="tabset">
<tab heading="Login"> <tab heading="Login">
<div class="container text-left py-2"> <div class="container text-left py-2">
<app-form-login (submitted)="login($event)"></app-form-login> <app-form-login (submitted)="login($event)"></app-form-login>
......
...@@ -67,7 +67,7 @@ export class LoginEffects { ...@@ -67,7 +67,7 @@ export class LoginEffects {
loginFailedAction$ = this.actions$.pipe( loginFailedAction$ = this.actions$.pipe(
ofType(loginActions.LOGIN_FAIL), ofType(loginActions.LOGIN_FAIL),
map((action: loginActions.LoginFailAction) => { map((action: loginActions.LoginFailAction) => {
const anisServerError = action.payload as AnisServerError; const anisServerError = action.payload;
this.toastr.error(anisServerError.error_description, anisServerError.error); this.toastr.error(anisServerError.error_description, anisServerError.error);
}) })
); );
...@@ -115,7 +115,7 @@ export class LoginEffects { ...@@ -115,7 +115,7 @@ export class LoginEffects {
registerFailedAction$ = this.actions$.pipe( registerFailedAction$ = this.actions$.pipe(
ofType(loginActions.REGISTER_FAIL), ofType(loginActions.REGISTER_FAIL),
map((action: loginActions.RegisterFailAction) => { map((action: loginActions.RegisterFailAction) => {
const anisServerError = action.payload as AnisServerError; const anisServerError = action.payload;
this.toastr.error(anisServerError.error_description, anisServerError.error); this.toastr.error(anisServerError.error_description, anisServerError.error);
}) })
); );
...@@ -147,7 +147,7 @@ export class LoginEffects { ...@@ -147,7 +147,7 @@ export class LoginEffects {
forgotPasswordFailAction$ = this.actions$.pipe( forgotPasswordFailAction$ = this.actions$.pipe(
ofType(loginActions.FORGOT_PASSWORD_FAIL), ofType(loginActions.FORGOT_PASSWORD_FAIL),
map((action: loginActions.ForgotPasswordFailAction) => { map((action: loginActions.ForgotPasswordFailAction) => {
const anisServerError = action.payload as AnisServerError; const anisServerError = action.payload;
this.toastr.error(anisServerError.error_description, anisServerError.error); this.toastr.error(anisServerError.error_description, anisServerError.error);
}) })
); );
...@@ -182,7 +182,7 @@ export class LoginEffects { ...@@ -182,7 +182,7 @@ export class LoginEffects {
changePasswordFailAction$ = this.actions$.pipe( changePasswordFailAction$ = this.actions$.pipe(
ofType(loginActions.CHANGE_PASSWORD_FAIL), ofType(loginActions.CHANGE_PASSWORD_FAIL),
map((action: loginActions.ChangePasswordFailAction) => { map((action: loginActions.ChangePasswordFailAction) => {
const anisServerError = action.payload as AnisServerError; const anisServerError = action.payload;
this.toastr.error(anisServerError.error_description, anisServerError.error); this.toastr.error(anisServerError.error_description, anisServerError.error);
}) })
); );
......
...@@ -44,4 +44,4 @@ export function reducer(state: State = initialState, action: actions.Actions): S ...@@ -44,4 +44,4 @@ export function reducer(state: State = initialState, action: actions.Actions): S
export const getCriteriaSearchMetaIsLoading = (state: State) => state.criteriaSearchMetaIsLoading; export const getCriteriaSearchMetaIsLoading = (state: State) => state.criteriaSearchMetaIsLoading;
export const getCriteriaSearchMetaIsLoaded = (state: State) => state.criteriaSearchMetaIsLoaded; export const getCriteriaSearchMetaIsLoaded = (state: State) => state.criteriaSearchMetaIsLoaded;
export const getCriteriaFamilyList = (state: State) => state.criteriaFamilyList.sort((a, b) => a.display - b.display); export const getCriteriaFamilyList = (state: State) => state.criteriaFamilyList;
...@@ -59,7 +59,7 @@ export class CheckboxComponent { ...@@ -59,7 +59,7 @@ export class CheckboxComponent {
this.checkboxes.enable(); this.checkboxes.enable();
} else { } else {
const checkboxCriterion = criterion as SelectMultipleCriterion; const checkboxCriterion = criterion as SelectMultipleCriterion;
checkboxCriterion.options.map(option => { checkboxCriterion.options.forEach(option => {
this.checkboxesFormControls.find(formControl => formControl.value === option.value).control.setValue(true); this.checkboxesFormControls.find(formControl => formControl.value === option.value).control.setValue(true);
}); });
this.checkboxes.disable(); this.checkboxes.disable();
......
ng-select { .ng-select {
width: 80px; width: 80px;
} }
\ No newline at end of file
...@@ -13,13 +13,13 @@ ...@@ -13,13 +13,13 @@
<div class="col"> <div class="col">
<div class="row"> <div class="row">
<div class="col-auto pr-2"> <div class="col-auto pr-2">
<ng-select (change)="change()" [formControl]="hh" [multiple]="false" placeholder="HH..."> <ng-select (change)="change()" [formControl]="hh" [multiple]="false" placeholder="HH..." class="ng-select">
<ng-option *ngFor="let hour of hours" [value]="hour">{{ hour }}</ng-option> <ng-option *ngFor="let hour of hours" [value]="hour">{{ hour }}</ng-option>
</ng-select> </ng-select>
</div> </div>
<div class="col-auto p-0">:</div> <div class="col-auto p-0">:</div>
<div class="col-auto pl-2"> <div class="col-auto pl-2">
<ng-select (change)="change()" [formControl]="mm" [multiple]="false" placeholder="MM..."> <ng-select (change)="change()" [formControl]="mm" [multiple]="false" placeholder="MM..." class="ng-select">
<ng-option *ngFor="let min of minutes" [value]="min">{{ min }}</ng-option> <ng-option *ngFor="let min of minutes" [value]="min">{{ min }}</ng-option>
</ng-select> </ng-select>
</div> </div>
......
ng-select { .ng-select {
width: 80px; width: 80px;
} }
\ No newline at end of file
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
<div class="col"> <div class="col">
<div class="row"> <div class="row">
<div class="col-auto pr-2"> <div class="col-auto pr-2">
<ng-select [formControl]="hh" [multiple]="false" placeholder="HH..."> <ng-select [formControl]="hh" [multiple]="false" placeholder="HH..." class="ng-select">
<ng-option *ngFor="let hour of hours" [value]="hour">{{ hour }}</ng-option> <ng-option *ngFor="let hour of hours" [value]="hour">{{ hour }}</ng-option>
</ng-select> </ng-select>
</div> </div>
<div class="col-auto p-0">:</div> <div class="col-auto p-0">:</div>
<div class="col-auto pl-2"> <div class="col-auto pl-2">
<ng-select [formControl]="mm" [multiple]="false" placeholder="MM..."> <ng-select [formControl]="mm" [multiple]="false" placeholder="MM..." class="ng-select">
<ng-option *ngFor="let min of minutes" [value]="min">{{ min }}</ng-option> <ng-option *ngFor="let min of minutes" [value]="min">{{ min }}</ng-option>
</ng-select> </ng-select>
</div> </div>
......
tabset .tab-pane, tabset .tab-pane .family-empty { .tabset .tab-pane, .tabset .tab-pane .family-empty {
min-height: 300px; min-height: 300px;
} }
tabset .tab-pane { .tabset .tab-pane {
padding-top: 13px; padding-top: 13px;
} }
tabset .active.tab-pane { .tabset .active.tab-pane {
border: 1px solid #dee2e6; border: 1px solid #dee2e6;
border-top: none; border-top: none;
border-bottom-left-radius: .25rem; border-bottom-left-radius: .25rem;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</div> </div>
</div> </div>
<tabset *ngIf="datasetFamilyList.length > 1" [justified]="true"> <tabset *ngIf="datasetFamilyList.length > 1" [justified]="true" class="tabset">
<tab *ngFor="let family of getDatasetFamilyListSortedByDisplay()" <tab *ngFor="let family of getDatasetFamilyListSortedByDisplay()"
heading="{{family.label}} ({{getDatasetListByFamily(family.id).length}})"> heading="{{family.label}} ({{getDatasetListByFamily(family.id).length}})">
<div *ngIf="getDatasetListByFamily(family.id).length < 1" class="row align-items-center family-empty"> <div *ngIf="getDatasetListByFamily(family.id).length < 1" class="row align-items-center family-empty">
......
...@@ -78,10 +78,6 @@ ...@@ -78,10 +78,6 @@
background-color: #7AC29A; background-color: #7AC29A;
} }
.nav-item.checked .icon-circle {
color: #7AC29A;
}
.nav-link.disabled { .nav-link.disabled {
cursor: not-allowed; cursor: not-allowed;
} }
......
<img [src]="src"> <img [src]="src" [alt]="src">
\ No newline at end of file \ No newline at end of file
<button class="btn btn-link" (click)="openModal(modal)"> <button class="btn btn-link" (click)="openModal(modal)">
<img [src]="src" class="img-fluid"> <img [src]="src" [alt]="src" class="img-fluid">
</button> </button>
<ng-template #modal> <ng-template #modal>
...@@ -10,6 +10,6 @@ ...@@ -10,6 +10,6 @@
</button> </button>
</div> </div>
<div class="modal-body text-center"> <div class="modal-body text-center">
<img [src]="src" class="img-fluid"> <img [src]="src" [alt]="src" class="img-fluid">
</div> </div>
</ng-template> </ng-template>
\ No newline at end of file
...@@ -148,7 +148,7 @@ export function reducer(state: State = initialState, action: actions.Actions): S ...@@ -148,7 +148,7 @@ export function reducer(state: State = initialState, action: actions.Actions): S
}; };
case actions.ADD_SELECTED_DATA: case actions.ADD_SELECTED_DATA:
const addData = action.payload as any; const addData = action.payload;
return { return {
...state, ...state,
...@@ -156,7 +156,7 @@ export function reducer(state: State = initialState, action: actions.Actions): S ...@@ -156,7 +156,7 @@ export function reducer(state: State = initialState, action: actions.Actions): S
}; };
case actions.DELETE_SELECTED_DATA: case actions.DELETE_SELECTED_DATA:
const deleteData = action.payload as any; const deleteData = action.payload;
return { return {
...state, ...state,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment