Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
anis
anis-client
Commits
cc53af32
Commit
cc53af32
authored
Apr 27, 2020
by
Tifenn Guillas
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into 'master'
Develop See merge request
!100
parents
8578a328
afed17c1
Changes
197
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
75 changed files
with
2188 additions
and
9966 deletions
+2188
-9966
.gitlab-ci.yml
.gitlab-ci.yml
+1
-31
CHANGELOG.md
CHANGELOG.md
+47
-6
Makefile
Makefile
+2
-2
angular.json
angular.json
+2
-3
conf-dev/Dockerfile
conf-dev/Dockerfile
+1
-0
package-lock.json
package-lock.json
+0
-9682
package.json
package.json
+27
-25
src/app/app.module.ts
src/app/app.module.ts
+19
-7
src/app/core/core.module.ts
src/app/core/core.module.ts
+2
-1
src/app/detail/components/index.ts
src/app/detail/components/index.ts
+3
-1
src/app/detail/components/object-display.component.html
src/app/detail/components/object-display.component.html
+36
-6
src/app/detail/components/object-display.component.spec.ts
src/app/detail/components/object-display.component.spec.ts
+6
-6
src/app/detail/components/object-display.component.ts
src/app/detail/components/object-display.component.ts
+31
-3
src/app/detail/components/spectra-graph/point.ts
src/app/detail/components/spectra-graph/point.ts
+4
-0
src/app/detail/components/spectra-graph/rays.ts
src/app/detail/components/spectra-graph/rays.ts
+99
-0
src/app/detail/components/spectra-graph/spectra-graph.component.css
...tail/components/spectra-graph/spectra-graph.component.css
+111
-0
src/app/detail/components/spectra-graph/spectra-graph.component.html
...ail/components/spectra-graph/spectra-graph.component.html
+3
-0
src/app/detail/components/spectra-graph/spectra-graph.component.ts
...etail/components/spectra-graph/spectra-graph.component.ts
+436
-0
src/app/detail/components/spectra-graph/spectra-type.ts
src/app/detail/components/spectra-graph/spectra-type.ts
+1
-0
src/app/detail/containers/detail.component.html
src/app/detail/containers/detail.component.html
+14
-12
src/app/detail/containers/detail.component.ts
src/app/detail/containers/detail.component.ts
+10
-0
src/app/detail/store/detail.action.spec.ts
src/app/detail/store/detail.action.spec.ts
+76
-0
src/app/detail/store/detail.action.ts
src/app/detail/store/detail.action.ts
+33
-9
src/app/detail/store/detail.effects.ts
src/app/detail/store/detail.effects.ts
+17
-0
src/app/detail/store/detail.reducer.spec.ts
src/app/detail/store/detail.reducer.spec.ts
+217
-0
src/app/detail/store/detail.reducer.ts
src/app/detail/store/detail.reducer.ts
+31
-2
src/app/detail/store/detail.selector.spec.ts
src/app/detail/store/detail.selector.spec.ts
+39
-0
src/app/detail/store/detail.selector.ts
src/app/detail/store/detail.selector.ts
+16
-1
src/app/detail/store/detail.service.ts
src/app/detail/store/detail.service.ts
+6
-1
src/app/login/store/login.action.spec.ts
src/app/login/store/login.action.spec.ts
+104
-0
src/app/login/store/login.action.ts
src/app/login/store/login.action.ts
+16
-16
src/app/login/store/login.reducer.spec.ts
src/app/login/store/login.reducer.spec.ts
+64
-0
src/app/login/store/login.reducer.ts
src/app/login/store/login.reducer.ts
+1
-1
src/app/login/store/login.selector.spec.ts
src/app/login/store/login.selector.spec.ts
+14
-0
src/app/metamodel/action/attribute.action.spec.ts
src/app/metamodel/action/attribute.action.spec.ts
+23
-0
src/app/metamodel/action/attribute.action.ts
src/app/metamodel/action/attribute.action.ts
+3
-3
src/app/metamodel/action/criteria.action.spec.ts
src/app/metamodel/action/criteria.action.spec.ts
+29
-0
src/app/metamodel/action/criteria.action.ts
src/app/metamodel/action/criteria.action.ts
+4
-4
src/app/metamodel/action/dataset.action.spec.ts
src/app/metamodel/action/dataset.action.spec.ts
+27
-0
src/app/metamodel/action/dataset.action.ts
src/app/metamodel/action/dataset.action.ts
+4
-4
src/app/metamodel/action/output.action.spec.ts
src/app/metamodel/action/output.action.spec.ts
+29
-0
src/app/metamodel/action/output.action.ts
src/app/metamodel/action/output.action.ts
+4
-4
src/app/metamodel/model/attribute.model.ts
src/app/metamodel/model/attribute.model.ts
+2
-1
src/app/metamodel/model/index.ts
src/app/metamodel/model/index.ts
+1
-0
src/app/metamodel/model/renderer-config.model.ts
src/app/metamodel/model/renderer-config.model.ts
+1
-0
src/app/metamodel/reducers/attribute.reducer.spec.ts
src/app/metamodel/reducers/attribute.reducer.spec.ts
+70
-0
src/app/metamodel/reducers/attribute.reducer.ts
src/app/metamodel/reducers/attribute.reducer.ts
+1
-1
src/app/metamodel/reducers/criteria.reducer.spec.ts
src/app/metamodel/reducers/criteria.reducer.spec.ts
+71
-0
src/app/metamodel/reducers/criteria.reducer.ts
src/app/metamodel/reducers/criteria.reducer.ts
+1
-1
src/app/metamodel/reducers/dataset.reducer.spec.ts
src/app/metamodel/reducers/dataset.reducer.spec.ts
+91
-0
src/app/metamodel/reducers/dataset.reducer.ts
src/app/metamodel/reducers/dataset.reducer.ts
+1
-1
src/app/metamodel/reducers/output.reducer.spec.ts
src/app/metamodel/reducers/output.reducer.spec.ts
+81
-0
src/app/metamodel/reducers/output.reducer.ts
src/app/metamodel/reducers/output.reducer.ts
+1
-1
src/app/metamodel/selectors/attribute.selector.spec.ts
src/app/metamodel/selectors/attribute.selector.spec.ts
+19
-0
src/app/metamodel/selectors/criteria.selector.spec.ts
src/app/metamodel/selectors/criteria.selector.spec.ts
+19
-0
src/app/metamodel/selectors/dataset.selector.spec.ts
src/app/metamodel/selectors/dataset.selector.spec.ts
+29
-0
src/app/metamodel/selectors/output.selector.spec.ts
src/app/metamodel/selectors/output.selector.spec.ts
+24
-0
src/app/metamodel/services/criteria.service.ts
src/app/metamodel/services/criteria.service.ts
+6
-1
src/app/metamodel/services/dataset.service.ts
src/app/metamodel/services/dataset.service.ts
+6
-1
src/app/metamodel/services/output.service.ts
src/app/metamodel/services/output.service.ts
+9
-2
src/app/search/components/criteria/criteria-by-family.component.spec.ts
.../components/criteria/criteria-by-family.component.spec.ts
+1
-1
src/app/search/components/criteria/criteria-by-family.component.ts
...earch/components/criteria/criteria-by-family.component.ts
+2
-2
src/app/search/components/criteria/criteria-tabs.component.html
...p/search/components/criteria/criteria-tabs.component.html
+1
-1
src/app/search/components/criteria/criteria-tabs.component.spec.ts
...earch/components/criteria/criteria-tabs.component.spec.ts
+2
-9
src/app/search/components/criteria/criteria-tabs.component.ts
...app/search/components/criteria/criteria-tabs.component.ts
+0
-5
src/app/search/components/criteria/search-type/between-date.component.spec.ts
...nents/criteria/search-type/between-date.component.spec.ts
+3
-3
src/app/search/components/criteria/search-type/between-date.component.ts
...components/criteria/search-type/between-date.component.ts
+2
-2
src/app/search/components/criteria/search-type/between.component.html
...ch/components/criteria/search-type/between.component.html
+10
-2
src/app/search/components/criteria/search-type/between.component.spec.ts
...components/criteria/search-type/between.component.spec.ts
+2
-2
src/app/search/components/criteria/search-type/between.component.ts
...arch/components/criteria/search-type/between.component.ts
+2
-1
src/app/search/components/criteria/search-type/checkbox.component.css
...ch/components/criteria/search-type/checkbox.component.css
+18
-0
src/app/search/components/criteria/search-type/checkbox.component.html
...h/components/criteria/search-type/checkbox.component.html
+8
-4
src/app/search/components/criteria/search-type/checkbox.component.spec.ts
...omponents/criteria/search-type/checkbox.component.spec.ts
+63
-59
src/app/search/components/criteria/search-type/checkbox.component.ts
...rch/components/criteria/search-type/checkbox.component.ts
+27
-34
src/app/search/components/criteria/search-type/datalist.component.spec.ts
...omponents/criteria/search-type/datalist.component.spec.ts
+2
-2
No files found.
.gitlab-ci.yml
View file @
cc53af32
...
...
@@ -2,13 +2,11 @@ stages:
-
install
-
test
-
sonar
-
build-coverage
-
build
-
deploy
-
deploy-coverage
variables
:
VERSION
:
"
3.
0
"
VERSION
:
"
3.
1
"
SONARQUBE_URL
:
https://sonarqube.lam.fr
CONTAINER_IMAGE
:
portus.lam.fr/anis/anis-client
COVERAGE_IMAGE
:
portus.lam.fr/anis/anis-client-coverage
...
...
@@ -66,24 +64,6 @@ sonar_scanner:
refs
:
-
develop
build-coverage
:
image
:
docker:stable
stage
:
build-coverage
script
:
-
echo "FROM nginx" > var/Dockerfile
-
echo "COPY coverage /usr/share/nginx/html" >> var/Dockerfile
-
docker login -u fagneray -p $PORTUS_TOKEN portus.lam.fr
-
docker pull $COVERAGE_IMAGE:latest ||
true
-
docker build --cache-from $COVERAGE_IMAGE:latest -t $COVERAGE_IMAGE:latest var
-
docker push $COVERAGE_IMAGE:latest
cache
:
paths
:
-
var
policy
:
pull
only
:
refs
:
-
develop
build
:
image
:
docker:stable
stage
:
build
...
...
@@ -106,16 +86,6 @@ deploy:
script
:
-
apk add --update curl
-
curl -XPOST $DEV_WEBHOOK
only
:
refs
:
-
develop
deploy-coverage
:
image
:
alpine
stage
:
deploy-coverage
script
:
-
apk add --update curl
-
curl -XPOST $COVERAGE_WEBHOOK
only
:
refs
:
-
develop
\ No newline at end of file
CHANGELOG.md
View file @
cc53af32
...
...
@@ -4,14 +4,55 @@ All notable changes to this project will be documented in this file.
The format is based on
[
Keep a Changelog
](
https://keepachangelog.com/en/1.0.0/
)
,
and this project adheres to
[
Semantic Versioning
](
https://semver.org/spec/v2.0.0.html
)
.
## [3.
0.3
] - 20
19-10-21
## [3.
2.0
] - 20
20-04
### Added
-
Display anis-client and anis-server versions.
-
Add detail page for an object.
-
#69 => User can change the number of object displayable (10, 20, 50, 100) in result datatable
-
#70 => User can sort columns in result datatable
-
#71 => User can dowload results in CSV and ASCII formats
-
#72 => Display information about available criteria and outputs in summary box
### Fixed
-
#32 => Criteria components with default value did not work
-
#79 => Repair and improve component checkbox + test
-
#80 => Search type field + IN or NOT IN didn't work
-
#63 => If no outputs selectionned, request cannot work
### Changed
-
#76 => Adding label min and max for the between component
-
#73 => Result page design improved
-
#83 => Upgrade dependencies
-
#86 => Renderers in result section optimizedS
### Security
-
Migrate to Angular v8 to v9
-
Migrate from anis-server v3.1 to 3.2
-
Migrate from anis-auth v3.1 to 3.2
## [3.1.0] - 2020-03
### Added
-
Unit tests added
-
Scroll to top on new page added
-
Operators are visible on search form
### Changed
-
Detail-link and detail-btn renderers refactored
-
Update datasets display to accordion
-
Password fields can be visible
-
Search form design updated to integrate operators
### Fixed
-
Migrate from anis-server v3.0.3 to 3.1
-
Migrate to anis-auth v3.1
## [3.0.3] - 2019-10
### Added
-
Display anis-client and anis-server versions
-
Add detail page for an object
### Changed
-
Fix ordering by diplay for options in Criteria step
.
-
Design ouputs selection
.
-
Fix ordering by diplay for options in Criteria step
-
Design ouputs selection
### Fixed
-
Fix bug renderer external links.
\ No newline at end of file
-
Fix bug renderer external links
\ No newline at end of file
Makefile
View file @
cc53af32
...
...
@@ -17,7 +17,7 @@ list:
@
echo
" test > run
$(NAME_APP)
tests"
@
echo
" test-watch > run
$(NAME_APP)
tests on every file change"
@
echo
" report > open the code coverage report in a browser (only available for Linux)"
@
echo
"
dist
> generate the angular dist application (html, css, js)"
@
echo
"
build
> generate the angular dist application (html, css, js)"
@
echo
" logs > display
$(NAME_APP)
container logs"
@
echo
" shell > shell into
$(NAME_APP)
container"
@
echo
""
...
...
@@ -54,7 +54,7 @@ test-watch:
report
:
xdg-open var/coverage/index.html
dist
:
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
...
...
angular.json
View file @
cc53af32
...
...
@@ -18,7 +18,7 @@
"main"
:
"src/main.ts"
,
"polyfills"
:
"src/polyfills.ts"
,
"tsConfig"
:
"tsconfig.app.json"
,
"aot"
:
fals
e
,
"aot"
:
tru
e
,
"assets"
:
[
"src/favicon.ico"
,
"src/assets"
...
...
@@ -48,7 +48,6 @@
"sourceMap"
:
false
,
"extractCss"
:
true
,
"namedChunks"
:
false
,
"aot"
:
true
,
"extractLicenses"
:
true
,
"vendorChunk"
:
false
,
"buildOptimizer"
:
true
,
...
...
@@ -81,7 +80,7 @@
},
"test"
:
{
"builder"
:
"@angular-devkit/build-angular:karma"
,
"codeCoverageExclude"
:
[
"node_modules/**"
,
"src/settings/test-data/**"
],
"codeCoverageExclude"
:
[
"node_modules/**"
,
"src/settings/test-data/**"
,
"src/**/*.spec.ts"
],
"options"
:
{
"main"
:
"src/test.ts"
,
"polyfills"
:
"src/polyfills.ts"
,
...
...
conf-dev/Dockerfile
View file @
cc53af32
...
...
@@ -5,6 +5,7 @@ ENV DEBIAN_FRONTEND=noninteractive
# Yarn
RUN
yarn global add @angular/cli
RUN
ng config
-g
cli.packageManager yarn
RUN
ng config
-g
cli.warnings.versionMismatch
false
# Chromium
RUN
apt-get update
\
...
...
package-lock.json
deleted
100644 → 0
View file @
8578a328
This diff is collapsed.
Click to expand it.
package.json
View file @
cc53af32
...
...
@@ -11,36 +11,38 @@
},
"private"
:
true
,
"dependencies"
:
{
"
@angular/animations
"
:
"
~8.0.1
"
,
"
@angular/common
"
:
"
~8.0.1
"
,
"
@angular/compiler
"
:
"
~8.0.1
"
,
"
@angular/core
"
:
"
~8.0.1
"
,
"
@angular/forms
"
:
"
~8.0.1
"
,
"
@angular/platform-browser
"
:
"
~8.0.1
"
,
"
@angular/platform-browser-dynamic
"
:
"
~8.0.1
"
,
"
@angular/router
"
:
"
~8.0.1
"
,
"
@fortawesome/fontawesome-free
"
:
"
^5.9.0
"
,
"
@ng-select/ng-select
"
:
"
^2.20.0
"
,
"
@ngrx/effects
"
:
"
^8.0.1
"
,
"
@ngrx/router-store
"
:
"
^8.0.1
"
,
"
@ngrx/store
"
:
"
^8.0.1
"
,
"
@ngrx/store-devtools
"
:
"
^8.0.1
"
,
"
bootstrap
"
:
"
^4.3.1
"
,
"
ngx-bootstrap
"
:
"
^4.3.0
"
,
"
@angular/animations
"
:
"
~9.1.1
"
,
"
@angular/common
"
:
"
~9.1.1
"
,
"
@angular/compiler
"
:
"
~9.1.1
"
,
"
@angular/core
"
:
"
~9.1.1
"
,
"
@angular/forms
"
:
"
~9.1.1
"
,
"
@angular/platform-browser
"
:
"
~9.1.1
"
,
"
@angular/platform-browser-dynamic
"
:
"
~9.1.1
"
,
"
@angular/router
"
:
"
~9.1.1
"
,
"
@fortawesome/fontawesome-free
"
:
"
^5.13.0
"
,
"
@ng-select/ng-select
"
:
"
^4.0.0
"
,
"
@ngrx/effects
"
:
"
^9.1.0
"
,
"
@ngrx/router-store
"
:
"
^9.1.0
"
,
"
@ngrx/store
"
:
"
^9.1.0
"
,
"
@ngrx/store-devtools
"
:
"
^9.1.0
"
,
"
bootstrap
"
:
"
^4.4.1
"
,
"
d3
"
:
"
^5.15.1
"
,
"
ngx-bootstrap
"
:
"
^5.6.1
"
,
"
ngx-json-viewer
"
:
"
^2.4.0
"
,
"
ngx-toastr
"
:
"
^1
0
.0.
4
"
,
"
rxjs
"
:
"
~6.
4.0
"
,
"
ngx-toastr
"
:
"
^1
2
.0.
1
"
,
"
rxjs
"
:
"
~6.
5.4
"
,
"
tslib
"
:
"
^1.9.0
"
,
"
zone.js
"
:
"
~0.
9.1
"
"
zone.js
"
:
"
~0.
10.3
"
},
"devDependencies"
:
{
"
@angular-devkit/build-angular
"
:
"
~0.800.0
"
,
"
@angular/cli
"
:
"
~8.0.3
"
,
"
@angular/compiler-cli
"
:
"
~8.0.1
"
,
"
@angular/language-service
"
:
"
~8.0.1
"
,
"
@angular-devkit/build-angular
"
:
"
~0.901.1
"
,
"
@angular/cli
"
:
"
~9.1.1
"
,
"
@angular/compiler-cli
"
:
"
~9.1.1
"
,
"
@angular/language-service
"
:
"
~9.1.1
"
,
"
@types/d3
"
:
"
^5.7.2
"
,
"
@types/jasmine
"
:
"
~3.3.8
"
,
"
@types/jasminewd2
"
:
"
~2.0.3
"
,
"
@types/node
"
:
"
~8.9.4
"
,
"
@types/node
"
:
"
^12.11.1
"
,
"
codelyzer
"
:
"
^5.0.0
"
,
"
intl
"
:
"
^1.2.5
"
,
"
jasmine-core
"
:
"
~3.4.0
"
,
...
...
@@ -53,6 +55,6 @@
"
protractor
"
:
"
~5.4.0
"
,
"
ts-node
"
:
"
~7.0.0
"
,
"
tslint
"
:
"
~5.15.0
"
,
"
typescript
"
:
"
~3.
4.3
"
"
typescript
"
:
"
~3.
7.5
"
}
}
src/app/app.module.ts
View file @
cc53af32
...
...
@@ -4,7 +4,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import
{
HttpClientModule
}
from
'
@angular/common/http
'
;
import
{
StoreModule
}
from
'
@ngrx/store
'
;
import
{
StoreRouterConnectingModule
,
RouterState
Serializer
}
from
'
@ngrx/router-store
'
;
import
{
StoreRouterConnectingModule
,
RouterState
}
from
'
@ngrx/router-store
'
;
import
{
StoreDevtoolsModule
}
from
'
@ngrx/store-devtools
'
;
import
{
EffectsModule
}
from
'
@ngrx/effects
'
;
...
...
@@ -24,18 +24,30 @@ import { environment } from '../environments/environment';
BrowserModule
,
BrowserAnimationsModule
,
HttpClientModule
,
StoreModule
.
forRoot
(
reducers
,
{
metaReducers
}),
StoreRouterConnectingModule
.
forRoot
(),
!
environment
.
production
?
StoreDevtoolsModule
.
instrument
()
:
[],
EffectsModule
.
forRoot
([]),
CoreModule
,
StaticModule
,
LoginModule
,
SearchModule
,
DetailModule
,
AppRoutingModule
StoreModule
.
forRoot
(
reducers
,
{
metaReducers
,
runtimeChecks
:
{
strictStateImmutability
:
true
,
strictActionImmutability
:
true
,
strictStateSerializability
:
true
,
strictActionSerializability
:
true
,
strictActionWithinNgZone
:
true
}
}),
AppRoutingModule
,
StoreRouterConnectingModule
.
forRoot
({
serializer
:
CustomRouterStateSerializer
,
routerState
:
RouterState
.
Minimal
,
}),
!
environment
.
production
?
StoreDevtoolsModule
.
instrument
()
:
[],
EffectsModule
.
forRoot
([])
],
providers
:
[{
provide
:
RouterStateSerializer
,
useClass
:
CustomRouterStateSerializer
}],
//
providers: [{ provide: RouterStateSerializer, useClass: CustomRouterStateSerializer }],
bootstrap
:
[
AppComponent
]
})
export
class
AppModule
{
}
src/app/core/core.module.ts
View file @
cc53af32
...
...
@@ -2,7 +2,8 @@ import { NgModule, Optional, SkipSelf } from '@angular/core';
import
{
CommonModule
}
from
'
@angular/common
'
;
import
{
RouterModule
}
from
'
@angular/router
'
;
import
{
CollapseModule
,
BsDropdownModule
}
from
'
ngx-bootstrap
'
;
import
{
CollapseModule
}
from
'
ngx-bootstrap/collapse
'
;
import
{
BsDropdownModule
}
from
'
ngx-bootstrap/dropdown
'
;
import
{
AppComponent
}
from
'
./containers/app.component
'
;
import
{
NotFoundPageComponent
}
from
'
./containers/not-found-page.component
'
;
...
...
src/app/detail/components/index.ts
View file @
cc53af32
import
{
ObjectDisplayComponent
}
from
'
./object-display.component
'
;
import
{
SpectraGraphComponent
}
from
'
./spectra-graph/spectra-graph.component
'
;
export
const
dummiesComponents
=
[
ObjectDisplayComponent
ObjectDisplayComponent
,
SpectraGraphComponent
];
src/app/detail/components/object-display.component.html
View file @
cc53af32
<div
class=
"row"
>
<table
class=
"table table-striped table-bordered"
>
<tr
*ngFor=
"let attribute of getAttributesVisible()"
>
<th>
{{ attribute.form_label }}
</th>
<td>
{{ object[attribute.label] }}
</td>
</tr>
</table>
<div
*ngIf=
"getAttributeSpectraGraph()"
class=
"col col-md-8 col-sm-12"
>
<div
*ngIf=
"spectraIsLoading"
id=
"div-spinner"
class=
"text-center"
>
<span
class=
"fas fa-circle-notch fa-spin fa-3x"
></span>
<span
class=
"sr-only"
>
Loading...
</span>
</div>
<app-spectra-graph
*ngIf=
"spectraIsLoaded"
[z]=
"getZ()"
[spectraCSV]=
"spectraCSV"
></app-spectra-graph>
</div>
<div
[ngClass]=
"{'col-md-4 col-sm-12': getAttributeSpectraGraph()}"
class=
"col mt-4"
>
<div
*ngIf=
"getAttributeBySearchFlag('RA') && getAttributeBySearchFlag('DEC')"
class=
"row"
>
<div
class=
"col-12"
>
<table
class=
"table"
>
<tr>
<th>
Alpha
</th>
<th>
Delta
</th>
<th
class=
"text-center"
rowspan=
"2"
><img
src=
"assets/cesam_anis80.png"
alt=
"CeSAM logo"
/></th>
</tr>
<tr>
<td>
{{ object[getAttributeBySearchFlag('RA').label] }}
</td>
<td>
{{ object[getAttributeBySearchFlag('DEC').label] }}
</td>
</tr>
</table>
</div>
</div>
<div
class=
"row"
>
<div
class=
"table-responsive"
>
<table
class=
"table"
>
<tr
*ngFor=
"let attribute of getAttributesVisible()"
>
<th>
{{ attribute.form_label }}
</th>
<td>
{{ object[attribute.label] }}
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
\ No newline at end of file
src/app/detail/components/object-display.component.spec.ts
View file @
cc53af32
...
...
@@ -23,8 +23,8 @@ describe('[Detail] Component: ObjectDisplayComponent', () => {
max
:
null
,
placeholder_min
:
null
,
placeholder_max
:
null
,
uri_action
:
null
,
renderer
:
'
detail-btn
'
,
renderer
:
'
detail
'
,
renderer
_config
:
null
,
display_detail
:
10
,
selected
:
true
,
order_by
:
false
,
...
...
@@ -58,8 +58,8 @@ describe('[Detail] Component: ObjectDisplayComponent', () => {
max
:
null
,
placeholder_min
:
null
,
placeholder_max
:
null
,
uri_action
:
null
,
renderer
:
null
,
renderer_config
:
null
,
display_detail
:
20
,
selected
:
true
,
order_by
:
false
,
...
...
@@ -93,8 +93,8 @@ describe('[Detail] Component: ObjectDisplayComponent', () => {
max
:
null
,
placeholder_min
:
null
,
placeholder_max
:
null
,
uri_action
:
null
,
renderer
:
null
,
renderer_config
:
null
,
display_detail
:
10
,
selected
:
true
,
order_by
:
false
,
...
...
@@ -130,8 +130,8 @@ describe('[Detail] Component: ObjectDisplayComponent', () => {
max
:
null
,
placeholder_min
:
null
,
placeholder_max
:
null
,
uri_action
:
null
,
renderer
:
null
,
renderer_config
:
null
,
display_detail
:
10
,
selected
:
true
,
order_by
:
false
,
...
...
@@ -165,8 +165,8 @@ describe('[Detail] Component: ObjectDisplayComponent', () => {
max
:
null
,
placeholder_min
:
null
,
placeholder_max
:
null
,
uri_action
:
null
,
renderer
:
null
,
renderer_config
:
null
,
display_detail
:
20
,
selected
:
true
,
order_by
:
false
,
...
...
src/app/detail/components/object-display.component.ts
View file @
cc53af32
import
{
Component
,
Input
,
ChangeDetectionStrategy
}
from
'
@angular/core
'
;
import
{
Component
,
Input
,
ChangeDetectionStrategy
,
Output
,
EventEmitter
,
OnInit
}
from
'
@angular/core
'
;
import
{
Attribute
}
from
'
../../metamodel/model
'
;
...
...
@@ -7,13 +7,41 @@ import { Attribute } from '../../metamodel/model';
templateUrl
:
'
object-display.component.html
'
,
changeDetection
:
ChangeDetectionStrategy
.
OnPush
})
export
class
ObjectDisplayComponent
{
export
class
ObjectDisplayComponent
implements
OnInit
{
@
Input
()
attributeList
:
Attribute
[];
@
Input
()
object
:
any
;
@
Input
()
spectraIsLoading
:
boolean
;
@
Input
()
spectraIsLoaded
:
boolean
;
@
Input
()
spectraCSV
:
string
;
@
Output
()
getSpectraCSV
:
EventEmitter
<
string
>
=
new
EventEmitter
();
getAttributesVisible
()
{
ngOnInit
()
{
const
attributeSpectraGraph
=
this
.
getAttributeSpectraGraph
();
if
(
attributeSpectraGraph
)
{
Promise
.
resolve
(
null
).
then
(()
=>
this
.
getSpectraCSV
.
emit
(
this
.
object
[
attributeSpectraGraph
.
label
]));
}
}
getAttributesVisible
():
Attribute
[]
{
return
this
.
attributeList
.
filter
(
a
=>
a
.
detail
)
.
sort
((
a
,
b
)
=>
a
.
display_detail
-
b
.
display_detail
);
}
getAttributeBySearchFlag
(
searchFlag
:
string
):
Attribute
{
return
this
.
getAttributesVisible
().
find
(
attribute
=>
attribute
.
search_flag
===
searchFlag
);
}
getAttributeSpectraGraph
():
Attribute
{
return
this
.
getAttributesVisible
().
find
(
attribute
=>
attribute
.
renderer_detail
===
'
spectra_graph
'
);
}
getZ
():
number
{
const
attributeZ
=
this
.
getAttributeBySearchFlag
(
'
Z
'
);
if
(
attributeZ
)
{
return
+
this
.
object
[
attributeZ
.
label
];
}
else
{
return
0
;
}
}
}
src/app/detail/components/spectra-graph/point.ts
0 → 100644
View file @
cc53af32
export
interface
Point
{
x
:
number
,
y
:
number
}
\ No newline at end of file
src/app/detail/components/spectra-graph/rays.ts
0 → 100644
View file @
cc53af32
export
const
emissionLines
=
[
{
name
:
'
SII
'
,
wavelength
:
10320
},
{
name
:
'
HeI
'
,
wavelength
:
7065.2
},
{
name
:
'
SII
'
,
wavelength
:
6732.68
},
{
name
:
'
SII
'
,
wavelength
:
6718.39
},
{
name
:
'
NII
'
,
wavelength
:
6585.27
},
{
name
:
'
Hα
'
,
wavelength
:
6564.61
},
{
name
:
'
NII
'
,
wavelength
:
6549.86
},
{
name
:
'
HeI
'
,
wavelength
:
5876.0
},
{
name
:
'
OIII
'
,
wavelength
:
5008.24
},
{
name
:
'
OIII
'
,
wavelength
:
4960.29
},
{
name
:
'
Hβ
'
,
wavelength
:
4862.70
},
{
name
:
'
OIII
'
,
wavelength
:
4364.44
},
{
name
:
'
Hγ
'
,
wavelength
:
4341.68
},
{
name
:
'
Hδ
'
,
wavelength
:
4102.89
},
{
name
:
'
SII
'
,
wavelength
:
4072.0
},
{
name
:
'
Hksi
'
,
wavelength
:
3890.15
},
{
name
:
'
NeIII
'
,
wavelength
:
3869.81
},
{
name
:
'
H9
'
,
wavelength
:
3836.47
},
{
name
:
'
Hθ
'
,
wavelength
:
3798.98
},
{
name
:
'
H11
'
,
wavelength
:
3771.70
},
{
name
:
'
OII
'
,
wavelength
:
3728.49
},
{
name
:
'
NeV
'
,
wavelength
:
3426.5
},
{
name
:
'
NeV
'
,
wavelength
:
3346.4
},
{
name
:
'
HeII
'
,
wavelength
:
3204.03
},
{
name
:
'
FeII
'
,
wavelength
:
2964.0
},
{
name
:
'
MgII
'
,
wavelength
:
2799.0
},
{
name
:
'
NII
'
,
wavelength
:
2142.0
},
{
name
:
'
CIII
'
,
wavelength
:
1908.73
},
{
name
:
'
HeII
'
,
wavelength
:
1640.42
},
{
name
:
'
CIV
'
,
wavelength
:
1549.0
},
{
name
:
'
SiIV
'
,
wavelength
:
1397.0
},
{
name
:
'
CII
'
,
wavelength
:
1334.53
},
{
name
:
'
OI
'
,
wavelength
:
1303.0
},
{
name
:
'
NV
'
,
wavelength
:
1240.0
},
{
name
:
'
LyA
'
,
wavelength
:
1215.67
},
{
name
:
'
OVI
'
,
wavelength
:
1033.0
},
{
name
:
'
LyB
'
,
wavelength
:
1025.72
},
{
name
:
'
LyG
'
,
wavelength
:
972.53
}
];
export
const
absorptionLines
=
[
{
name
:
'
TiO
'
,
wavelength
:
8863.0
},
{
name
:
'
TiO
'
,
wavelength
:
8430.0
},
{
name
:
'
NaI
'
,
wavelength
:
8197.05
},
{
name
:
'
NaI
'
,
wavelength
:
8185.50
},
{
name
:
'
TiO
'
,
wavelength
:
7590.0
},
{
name
:
'
HeI
'
,
wavelength
:
7065.2
},
{
name
:
'
Hα
'
,
wavelength
:
6564.61
},
{
name
:
'
TiO
'
,
wavelength
:
6159.0
},
{
name
:
'
NaD
'
,
wavelength
:
5892.5
},
{
name
:
'
TiO
'
,
wavelength
:
5603.0
},
{
name
:
'
Ca,Fe
'
,
wavelength
:
5269.0
},
{
name
:
'
MgI
'
,
wavelength
:
5174.12
},
{
name
:
'
Hβ
'
,
wavelength
:
4862.70
},
{
name
:
'
Hγ
'
,
wavelength
:
4341.68
},
{
name
:
'
Gband
'
,
wavelength
:
4304.4
},
{
name
:
'
CN
'
,
wavelength
:
4216.0
},
{
name
:
'
Hδ
'
,
wavelength
:
4102.89
},
{
name
:
'
CaII_H
'
,
wavelength
:
3969.59
},
{
name
:
'
CaII_K
'
,
wavelength
:
3934.78
},
{
name
:
'
Hksi
'
,
wavelength
:
3890.15
},
{
name
:
'
H9
'
,
wavelength
:
3836.47
},
{
name
:
'
Hθ
'
,
wavelength
:
3798.98
},
{
name
:
'
H11
'
,
wavelength
:
3771.70
},
{
name
:
'
FeI
'
,
wavelength
:
3581.0
},
{
name
:
'
HeII
'
,
wavelength
:
3204.03
},
{
name
:
'
FeII
'
,
wavelength
:
2964.0
},
{
name
:
'
MgII
'
,
wavelength
:
2796.35
},
{
name
:
'
MgII
'
,
wavelength
:
2803.53
},
{
name
:
'
FeII
'
,
wavelength
:
2626.45
},
{
name
:
'
FeII
'
,
wavelength
:
2600.17
},
{
name
:
'
FeII
'
,
wavelength
:
2586.65
},
{
name
:
'
FeII
'
,
wavelength
:
2382.76
},
{
name
:
'
FeII
'
,
wavelength
:
2374.46
},
{
name
:
'
FeII
'
,
wavelength
:
2344.21
},
{
name
:
'
FeII
'
,
wavelength
:
2260.78
},
{
name
:
'
AlIII
'
,
wavelength
:
1854.72
},
{
name
:
'
AlII
'
,
wavelength
:
1670.78
},
{
name
:
'
HeII
'
,
wavelength
:
1640.42
},
{
name
:
'
FeII
'
,
wavelength
:
1608.45
},
{
name
:
'
CIV
'
,
wavelength
:
1548.20
},
{
name
:
'
CIV
'
,
wavelength
:
1550.77
},
{
name
:
'
SiII
'
,
wavelength
:
1533.43
},
{
name
:
'
SiII
'
,
wavelength
:
1526.71
},
{
name
:
'
SiIV
'
,
wavelength
:
1402.77
},
{
name
:
'
SiIV
'
,
wavelength
:
1393.75
},
{
name
:
'
CII
'
,
wavelength
:
1334.53
},
{
name
:
'
OI
'
,
wavelength
:
1302.17
},
{
name
:
'
OI
'
,
wavelength
:
1304.86
},
{
name
:
'
SiII
'
,
wavelength
:
1260.42
},
{
name
:
'
NV
'
,
wavelength
:
1238.82
},
{
name
:
'
NV
'
,
wavelength
:
1242.80
},
{
name
:
'
LyA
'
,
wavelength
:
1215.67
},
{
name
:
'
OVI
'
,
wavelength
:
1037.62
},
{
name
:
'
OVI
'
,
wavelength
:
1031.93
},
{
name
:
'
LyB
'
,
wavelength
:
1025.72
},
{
name
:
'
LyG
'
,
wavelength
:
972.53
}
];
src/app/detail/components/spectra-graph/spectra-graph.component.css
0 → 100644
View file @
cc53af32
.titles
text
{
fill
:
#5a5a5a
;
font-size
:
24px
;