Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
anis
anis-admin
Commits
ab6b4122
Commit
ab6b4122
authored
Oct 07, 2020
by
Tifenn Guillas
Browse files
Add dataset result download options => DONE
parent
da7b9b37
Changes
4
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
ab6b4122
...
...
@@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [3.4.0]
### Added
-
#43: Add dataset result download options
-
#42: Add instance options: 'Display search', 'Display search multiple' and 'Display documentation'
-
#38: Add new search-type: list
-
#41: Add dataset option 'Opened result accordion'
...
...
src/app/metamodel/components/dataset/form-dataset.component.html
View file @
ab6b4122
...
...
@@ -64,11 +64,11 @@
<div
class=
"form-row"
>
<div
class=
"col-6"
>
<label
for=
"column_ra"
>
Column RA
</label>
<input
id=
"column_ra"
type=
"number"
class=
"form-control"
name=
"column_ra"
[ngModel]=
"getConfigCo
lumnRa(
)"
>
<input
id=
"column_ra"
type=
"number"
class=
"form-control"
name=
"column_ra"
[ngModel]=
"getConfigCo
neSearchCol('column_ra'
)"
>
</div>
<div
class=
"col-6"
>
<label
for=
"column_dec"
>
Column DEC
</label>
<input
id=
"column_dec"
type=
"number"
class=
"form-control"
name=
"column_dec"
[ngModel]=
"getConfigColumn
D
ec
(
)"
>
<input
id=
"column_dec"
type=
"number"
class=
"form-control"
name=
"column_dec"
[ngModel]=
"getConfigCo
neSearchCol('co
lumn
_d
ec
'
)"
>
</div>
</div>
</div>
...
...
@@ -76,18 +76,43 @@
<hr>
<h4>
Config:
</h4>
<div
class=
"form-check"
>
<input
class=
"form-check-input"
type=
"checkbox"
id=
"results_server_link"
name=
"results_server_link"
[ngModel]=
"getConfig
R
esults
S
erver
L
ink
Enabled(
)"
>
<input
class=
"form-check-input"
type=
"checkbox"
id=
"results_server_link"
name=
"results_server_link"
[ngModel]=
"getConfig
('r
esults
_s
erver
_l
ink
'
)"
>
<label
class=
"form-check-label"
for=
"results_server_link"
>
Display server link to the results
</label>
</div>
<div
class=
"form-check"
>
<input
class=
"form-check-input"
type=
"checkbox"
id=
"opened_datatable"
name=
"opened_datatable"
[ngModel]=
"getConfig
O
pened
D
atatable
(
)"
>
<input
class=
"form-check-input"
type=
"checkbox"
id=
"opened_datatable"
name=
"opened_datatable"
[ngModel]=
"getConfig
('o
pened
_d
atatable
'
)"
>
<label
class=
"form-check-label"
for=
"opened_datatable"
>
Open the results datatable accordion
</label>
</div>
<div
class=
"form-check"
>
<input
class=
"form-check-input"
type=
"checkbox"
id=
"selectable_row"
name=
"selectable_row"
[ngModel]=
"
model.
selectable_row"
>
<input
class=
"form-check-input"
type=
"checkbox"
id=
"selectable_row"
name=
"selectable_row"
[ngModel]=
"
getConfig('
selectable_row
')
"
>
<label
class=
"form-check-label"
for=
"selectable_row"
>
Datatable rows selectable
</label>
</div>
<div
class=
"form-check pt-3"
>
<input
class=
"form-check-input"
type=
"checkbox"
id=
"download_result_csv"
name=
"download_result_csv"
[ngModel]=
"getConfigDownloadResultFormat('csv')"
>
<label
class=
"form-check-label"
for=
"download_result_csv"
>
Display download results button in CSV format
</label>
</div>
<div
class=
"form-check"
>
<input
class=
"form-check-input"
type=
"checkbox"
id=
"download_result_ascii"
name=
"download_result_ascii"
[ngModel]=
"getConfigDownloadResultFormat('ascii')"
>
<label
class=
"form-check-label"
for=
"download_result_ascii"
>
Display download results button in ASCII format
</label>
</div>
<div
class=
"form-check"
>
<input
class=
"form-check-input"
type=
"checkbox"
id=
"download_result_spectra"
name=
"download_result_spectra"
[ngModel]=
"getConfigDownloadResultFormat('spectra')"
>
<label
class=
"form-check-label"
for=
"download_result_spectra"
>
Display download results button in Spectra format
</label>
</div>
<div
class=
"form-check"
>
<input
class=
"form-check-input"
type=
"checkbox"
id=
"download_result_stamp"
name=
"download_result_stamp"
[ngModel]=
"getConfigDownloadResultFormat('stamp')"
>
<label
class=
"form-check-label"
for=
"download_result_stamp"
>
Display download results button in Stamp format
</label>
</div>
<div
class=
"form-check"
>
<input
class=
"form-check-input"
type=
"checkbox"
id=
"download_result_vo"
name=
"download_result_vo"
[ngModel]=
"getConfigDownloadResultFormat('vo')"
>
<label
class=
"form-check-label"
for=
"download_result_vo"
>
Display download results button in VO format
</label>
</div>
<div
class=
"form-check"
>
<input
class=
"form-check-input"
type=
"checkbox"
id=
"download_result_fits"
name=
"download_result_fits"
[ngModel]=
"getConfigDownloadResultFormat('fits')"
>
<label
class=
"form-check-label"
for=
"download_result_fits"
>
Display download results button in FITS format
</label>
</div>
<div
class=
"form-group mt-3"
>
<ng-content></ng-content>
</div>
...
...
src/app/metamodel/components/dataset/form-dataset.component.ts
View file @
ab6b4122
...
...
@@ -33,33 +33,24 @@ export class FormDatasetComponent {
return
false
;
}
getConfigCo
lumnRa
(
):
number
{
getConfigCo
neSearchCol
(
key
:
string
):
number
{
if
(
this
.
model
.
config
&&
this
.
model
.
config
.
cone_search
)
{
return
this
.
model
.
config
.
cone_search
.
column_ra
;
return
this
.
model
.
config
.
cone_search
[
key
]
;
}
else
{
return
0
;
}
}
getConfigColumnDec
():
number
{
if
(
this
.
model
.
config
&&
this
.
model
.
config
.
cone_search
)
{
return
this
.
model
.
config
.
cone_search
.
column_dec
;
}
else
{
return
0
;
}
}
getConfigResultsServerLinkEnabled
():
boolean
{
if
(
this
.
model
.
config
&&
this
.
model
.
config
.
results_server_link
)
{
return
this
.
model
.
config
.
results_server_link
.
enabled
;
}
else
{
return
false
;
getConfig
(
key
:
string
):
boolean
{
if
(
this
.
model
.
config
&&
this
.
model
.
config
[
key
])
{
return
this
.
model
.
config
[
key
];
}
return
false
;
}
getConfig
OpenedDatatable
(
):
boolean
{
if
(
this
.
model
.
config
&&
this
.
model
.
config
.
opened_datatable
)
{
return
this
.
model
.
config
.
opened_datatable
;
getConfig
DownloadResultFormat
(
format
:
string
):
boolean
{
if
(
this
.
model
.
config
&&
this
.
model
.
config
.
download_results_format
&&
this
.
model
.
config
.
download_results_format
[
format
]
)
{
return
this
.
model
.
config
.
download_results_format
[
format
]
;
}
return
false
;
}
...
...
@@ -73,9 +64,6 @@ export class FormDatasetComponent {
if
(
!
dataset
.
vo
)
{
datasetEmitted
.
vo
=
false
;
}
if
(
!
dataset
.
selectable_row
)
{
datasetEmitted
.
selectable_row
=
false
;
}
if
(
this
.
idDatasetFamilyQueryParam
>
0
)
{
datasetEmitted
.
id_dataset_family
=
this
.
idDatasetFamilyQueryParam
;
}
...
...
@@ -85,10 +73,17 @@ export class FormDatasetComponent {
column_ra
:
this
.
ngForm
.
form
.
value
.
column_ra
,
column_dec
:
this
.
ngForm
.
form
.
value
.
column_dec
},
results_server_link
:
{
enabled
:
this
.
ngForm
.
form
.
value
.
results_server_link
},
opened_datatable
:
this
.
ngForm
.
form
.
value
.
opened_datatable
results_server_link
:
this
.
ngForm
.
form
.
value
.
results_server_link
,
opened_datatable
:
this
.
ngForm
.
form
.
value
.
opened_datatable
,
selectable_row
:
this
.
ngForm
.
form
.
value
.
selectable_row
,
download_results_format
:
{
csv
:
this
.
ngForm
.
form
.
value
.
download_result_csv
,
ascii
:
this
.
ngForm
.
form
.
value
.
download_result_ascii
,
spectra
:
this
.
ngForm
.
form
.
value
.
download_result_spectra
,
stamp
:
this
.
ngForm
.
form
.
value
.
download_result_stamp
,
vo
:
this
.
ngForm
.
form
.
value
.
download_result_vo
,
fits
:
this
.
ngForm
.
form
.
value
.
download_result_fits
}
};
this
.
submitted
.
emit
(
datasetEmitted
);
}
...
...
src/app/metamodel/store/model/dataset.model.ts
View file @
ab6b4122
...
...
@@ -9,17 +9,23 @@ export class Dataset implements Displayable {
count
:
number
;
vo
:
boolean
;
data_path
:
string
;
selectable_row
:
boolean
;
config
:
{
cone_search
:
{
enabled
:
boolean
;
column_ra
:
number
;
column_dec
:
number
;
},
results_server_link
:
{
enabled
:
boolean
;
},
opened_datatable
:
boolean
};
results_server_link
:
boolean
;
opened_datatable
:
boolean
;
selectable_row
:
boolean
;
download_results_format
:
{
csv
:
boolean
;
ascii
:
boolean
;
spectra
:
boolean
;
stamp
:
boolean
;
vo
:
boolean
;
fits
:
boolean
;
};
};
project_name
:
string
;
id_dataset_family
:
number
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment