Commit 982ca91b authored by François Agneray's avatar François Agneray
Browse files

Retour tests

parent f2be5b40
Pipeline #5775 passed with stages
in 17 minutes and 21 seconds
......@@ -54,7 +54,7 @@ report:
build:
@docker build -t anis-node conf-dev && docker run --init -it --rm --user $(UID):$(GID) \
-v $(CURDIR):/project \
-w /project anis-node ng build --prod
-w /project anis-node ng build --prod --base-href /mistral/
logs:
@docker logs -f -t $(NAME_APP)
......
<nav class="navbar navbar-light bg-light navbar-expand-md fixed-top border-bottom">
<!-- Logo -->
<a href="{{ baseHref }}" class="navbar-brand">
<img src="assets/cesam_anis80.png" alt="CeSAM logo" />
<img src="assets/icon_{{ instanceName }}.png" alt="{{ instanceName }} logo" />
</a>
<!-- Right Navigation -->
......
......@@ -32,6 +32,7 @@ export class NavComponent {
@Output() openEditProfile: EventEmitter<any> = new EventEmitter();
baseHref: string = environment.baseHref;
instanceName: string = environment.instanceName;
/**
* Checks if given key for the given configuration propriety is allowed.
......
......@@ -17,7 +17,7 @@
<!-- Accordion families -->
<accordion [isAnimated]="true">
<accordion-group *ngFor="let family of outputFamilyList" #ag panelClass="abstract-accordion" [isOpen]="true" class="pl-2">
<accordion-group *ngFor="let family of outputFamilyList" #ag [isOpen]="true" class="pl-2">
<button class="btn btn-link btn-block clearfix pb-2" accordion-heading>
<span class="pull-left float-left text-primary">
{{ family.label }}
......@@ -33,7 +33,7 @@
<!-- Accordion categories -->
<accordion [isAnimated]="true">
<accordion-group *ngFor="let category of getCategoryByFamilySortedByDisplay(family.id)" #ag panelClass="abstract-accordion" [isOpen]="true" class="pl-4">
<accordion-group *ngFor="let category of getCategoryByFamilySortedByDisplay(family.id)" #ag [isOpen]="true" class="pl-4">
<button class="btn btn-link btn-block clearfix pb-2" accordion-heading>
<span class="pull-left float-left text-primary">
{{ category.label }}
......@@ -50,7 +50,15 @@
<!-- Output list -->
<div *ngFor="let attribute of getAttributesVisibleByCategory(category.id)" class="row pb-2">
<div class="col-5 font-weight-bold">{{ attribute.form_label }}</div>
<div class="col">{{ object[attribute.label] }}</div>
<ng-container [ngSwitch]="attribute.renderer_detail">
<div *ngSwitchCase="'download'" class="col">
<a [href]="getDownloadHref(object[attribute.label])" role="button" class="btn btn-primary btn-sm">
<span class="fas fa-download"></span>
{{ object[attribute.label] }}
</a>
</div>
<div *ngSwitchDefault class="col">{{ object[attribute.label] }}</div>
</ng-container >
</div>
</accordion-group>
</accordion>
......
......@@ -11,6 +11,7 @@ import { Component, Input, ChangeDetectionStrategy } from '@angular/core';
import { Attribute, Category, Family } from '../../metamodel/model';
import { sortByDisplay } from '../../shared/utils';
import { getHost } from '../../shared/utils';
@Component({
selector: 'app-object-data',
......@@ -76,4 +77,8 @@ export class ObjectDataComponent {
getAttributeBySearchFlag(searchFlag: string): Attribute {
return this.getAttributesVisible().find(attribute => attribute.search_flag === searchFlag);
}
getDownloadHref(value: string) {
return getHost() + '/download-file/' + this.datasetName + '/' + value;
}
}
......@@ -24,19 +24,19 @@
</div>
<div class="col">
<a *ngIf="getConfigDownloadResultFormat('csv')" [href]="getUrl('csv')" class="btn btn-outline-primary" title="Download results in CSV format">
<i class="fas fa-file-csv"></i> Download csv
<i class="fas fa-file-csv"></i> CSV
</a>
&nbsp;
<a *ngIf="getConfigDownloadResultFormat('ascii')" [href]="getUrl('ascii')" target="_blank" class="btn btn-outline-primary" title="Download results in ASCII format">
<i class="fas fa-file"></i> Download ascii
<i class="fas fa-file"></i> ASCII
</a>
&nbsp;
<a *ngIf="getConfigDownloadResultFormat('vo')" [href]="getUrl('votable')" target="_blank" class="btn btn-outline-primary" title="Download results in VO format">
<i class="fas fa-file"></i> Download votable
<i class="fas fa-file"></i> VOtable
</a>
&nbsp;
<button *ngIf="getConfigDownloadResultFormat('vo')" [disabled]="!sampRegistered" (click)="broadcastVotable()" class="btn btn-outline-primary" title="Broadcast samp votable">
<i class="fas fa-broadcast-tower"></i> Broadcast votable
<i class="fas fa-broadcast-tower"></i> Broadcast VOtable
</button>
</div>
</div>
......@@ -47,7 +47,7 @@
</div>
<div class="col">
<a [href]="getUrlArchive()" class="btn btn-outline-primary" title="Download an archive with all files">
<i class="fas fa-archive"></i> Download files archive
<i class="fas fa-archive"></i> Files archive
</a>
</div>
</div>
......
......@@ -41,13 +41,13 @@
<div class="row mt-5 justify-content-between">
<div class="col">
<a routerLink="/search" class="btn btn-outline-secondary">
<span class="fas fa-arrow-left"></span> Previous
<span class="fas fa-arrow-left"></span> Dataset
</a>
</div>
<div class="col col-auto">
<a routerLink="/search/output/{{ datasetName | async }}" [queryParams]="queryParams | async"
class="btn btn-outline-primary">
Next <span class="fas fa-arrow-right"></span>
Output <span class="fas fa-arrow-right"></span>
</a>
</div>
</div>
\ No newline at end of file
......@@ -45,7 +45,7 @@
<div class="col col-auto">
<a routerLink="/search/criteria/{{ datasetName | async }}" [queryParams]="queryParams | async"
class="btn btn-outline-primary">
Next <span class="fas fa-arrow-right"></span>
Criteria <span class="fas fa-arrow-right"></span>
</a>
</div>
</div>
\ No newline at end of file
......@@ -37,17 +37,18 @@
<div class="col">
<a routerLink="/search/criteria/{{ datasetName | async }}" [queryParams]="queryParams | async"
class="btn btn-outline-secondary">
<span class="fas fa-arrow-left"></span> Previous
<span class="fas fa-arrow-left"></span> Criteria
</a>
</div>
<!-- Simplifier ? -->
<div class="col col-auto">
<button *ngIf="outputListEmpty | async;else notEmpty" class="btn btn-outline-primary disabled not-allowed" title="At least 1 output required!">
Next <span class="fas fa-arrow-right"></span>
Result <span class="fas fa-arrow-right"></span>
</button>
<ng-template #notEmpty>
<a routerLink="/search/result/{{ datasetName | async }}" [queryParams]="queryParams | async"
class="btn btn-outline-primary">
Next <span class="fas fa-arrow-right"></span>
Result <span class="fas fa-arrow-right"></span>
</a>
</ng-template>
</div>
......
......@@ -81,7 +81,7 @@
<div class="col">
<a routerLink="/search/output/{{ datasetName | async }}" [queryParams]="queryParams | async"
class="btn btn-outline-secondary">
<span class="fas fa-arrow-left"></span> Previous
<span class="fas fa-arrow-left"></span> Output
</a>
</div>
</div>
\ No newline at end of file
<a [href]="getHref()" [ngClass]="{'btn btn-outline-primary btn-sm': (config.display=='text-button' || config.display=='icon-button')}">
<span *ngIf="config.display !== 'icon-button'">{{ config.text }}</span>
<span *ngIf="config.display === 'icon-button'" class="{{config.icon}}"></span>
<a [href]="getHref()" [ngClass]="{'btn btn-outline-primary btn-sm': (config.display=='text-button' || config.display=='icon-button' || config.display=='icon-text-btn')}">
<span *ngIf="config.display === 'icon-button' || config.display === 'icon-text-btn'" class="{{config.icon}}"></span>
<span *ngIf="config.display === 'icon-text-btn'">&nbsp;</span>
<span *ngIf="config.display !== 'icon-button'">{{ getText() }}</span>
</a>
\ No newline at end of file
......@@ -46,4 +46,13 @@ export class DownloadComponent {
getHref(): string {
return getHost() + '/download-file/' + this.datasetName + '/' + this.value;
}
/**
* Returns config text.
*
* @return string
*/
getText(): string {
return this.config.text.replace('$value', this.value.toString());
}
}
<div class="container">
<div class="container" *ngIf="instanceName === 'default'">
<div class="row align-items-center jumbotron">
<div class="col-6 col-md-4 order-md-2 mx-auto text-center">
<img class="img-fluid mb-3 mb-md-0" src="assets/anis_v3_logo300.png" alt="">
......@@ -17,4 +17,25 @@
</p>
</div>
</div>
</div>
<div class="container" *ngIf="instanceName === 'mistral'">
<div class="row align-items-center jumbotron">
<div class="col-6 col-md-4 order-md-2 mx-auto text-center">
<img class="img-fluid mb-3 mb-md-0" src="assets/icon_mistral.png" alt="">
</div>
<div class="col-md-8 order-md-1 text-justify pr-md-5">
<h1 class="mb-3">Mistral</h1>
<p class="lead">
AstroNomical Information System is a generic web tool aimed at facilitating and homogenizing the
implementation of astronomical data.
It allows the fast implementation of a project data exchange platform in a dedicated information
system.
</p>
<p class="lead">
ANIS provides services like searching, displaying images and spectroscopic data and
downloading catalogues.
</p>
</div>
</div>
</div>
\ No newline at end of file
......@@ -9,11 +9,13 @@
import { Component } from '@angular/core';
import { environment } from 'src/environments/environment';
@Component({
selector: 'app-home',
styleUrls: ['home.component.css'],
templateUrl: 'home.component.html'
})
export class HomeComponent {
instanceName: string = environment.instanceName;
}
......@@ -11,8 +11,8 @@ export const environment = {
production: true,
apiUrl: '/server',
servicesUrl: '/services',
instanceName: 'default',
baseHref: '/',
instanceName: 'mistral',
baseHref: '/mistral',
ssoAuthUrl: 'https://keycloak.lam.fr/auth/',
ssoRealm: 'anis',
ssoClientId: 'anis-dev'
......
Supports Markdown
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