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
web-et-numerique
web-et-numerique-internet
data.grandlyon.com
web-portal
components
custom-apps
web-app
Commits
55d335f4
Commit
55d335f4
authored
Sep 10, 2019
by
FORESTIER Fabien
Browse files
Fix bug with loading that triggered an error on components init
parent
830bde7e
Pipeline
#1509
passed with stages
in 6 minutes and 57 seconds
Changes
5
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
package-lock.json
View file @
55d335f4
This diff is collapsed.
Click to expand it.
src/app/geosource/components/dataset-detail/dataset-detail.component.html
View file @
55d335f4
...
...
@@ -46,43 +46,6 @@
</div>
</a>
</li>
<!-- <li [routerLinkActive]="'is-active'" *ngIf="hasMap">
<a (click)="setPosition()" [routerLink]="[AppRoutes.map.uri]" class="tab-link">
<svg class="tab-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36">
<g id="picto_x5F_carte">
<path
d="M18 16.1c-2.2 0-4-1.8-4-4.1s1.8-4.1 4-4.1 4 1.8 4 4.1-1.8 4.1-4 4.1zm0-7.2c-1.7 0-3 1.4-3 3.1s1.4 3.1 3 3.1 3-1.4 3-3.1-1.3-3.1-3-3.1z"
class="secondary" />
<path
d="M18 16.1c-2.2 0-4-1.8-4-4.1s1.8-4.1 4-4.1 4 1.8 4 4.1-1.8 4.1-4 4.1zm0-7.2c-1.7 0-3 1.4-3 3.1s1.4 3.1 3 3.1 3-1.4 3-3.1-1.3-3.1-3-3.1z"
class="secondary" />
<path
d="M21.6 23.3l-.6.9c4 .6 7 2.3 7 4.3 0 2.4-4.6 4.5-10 4.5S8 30.9 8 28.5c0-2 3-3.7 6.9-4.3l-.6-.9C10 24 7 26 7 28.5c0 3.1 4.8 5.5 11 5.5s11-2.4 11-5.5c0-2.5-3.1-4.5-7.4-5.2z"
class="primary" />
<path
d="M21.6 23.3l-.6.9c4 .6 7 2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2-2.7-3.5-4.9-4.2-1-.3-1.9-.4-2.8-.4z"
class="secondary" />
</g>
</g>
</svg>
<div>
<div>
<span class="tab-title tab-title-long" i18n="@@dataset.detail.map">Map</span>
<span class="tab-title tab-title-short" i18n="@@dataset.detail.map">Map</span>
</div>
<div>
<span class="tab-subtitle">{{ datasetDataRepresentationType }}</span>
</div>
</div>
</a>
</li> -->
<li
[routerLinkActive]=
"'is-active'"
>
<a
(click)=
"setPosition()"
[routerLink]=
"[AppRoutes.resources.uri]"
class=
"tab-link"
>
<svg
class=
"tab-icon"
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0 36 36"
>
...
...
src/app/geosource/components/dataset-detail/dataset-table-map/dataset-table-map.component.ts
View file @
55d335f4
...
...
@@ -56,6 +56,11 @@ export class DatasetTableMapComponent implements OnInit, OnDestroy {
this
.
selectedProperties
=
Array
.
from
(
this
.
properties
);
// Intialize the search value with the value from the service in order to keep it when navigating in tabs
this
.
searchInput
.
setValue
(
this
.
_datasetDetailService
.
searchString
);
if
(
this
.
hasTable
)
{
// If dataset has table then preload some data for the table component
this
.
_datasetDetailService
.
retrieveDatasetData
().
subscribe
();
}
}
get
isSample
():
boolean
{
...
...
src/app/geosource/components/dataset-detail/dataset-table/dataset-table.component.ts
View file @
55d335f4
...
...
@@ -45,7 +45,6 @@ export class DatasetTableComponent implements OnInit, OnDestroy {
)
{
}
ngOnInit
()
{
this
.
getSearchResults
();
this
.
subscriptions
.
push
(
// Subscribe to input changes
this
.
_datasetDetailService
.
datasetDataSearchChanged$
.
subscribe
(()
=>
{
...
...
src/app/geosource/services/dataset-detail.service.ts
View file @
55d335f4
...
...
@@ -50,15 +50,15 @@ export class DatasetDetailService {
this
.
newAsyncRequest
();
this
.
_matomoService
.
getPageMetadataPageMetrics
(
slug
).
pipe
(
catchError
(()
=>
of
(
null
)),
).
subscribe
((
nbViews
)
=>
{
this
.
_dataset
.
nbViews
=
nbViews
;
});
// Get the metadata
return
forkJoin
([
this
.
_matomoService
.
getPageMetadataPageMetrics
(
slug
).
pipe
(
catchError
(()
=>
of
(
null
)),
),
this
.
_elasticsearchService
.
getDatasetMetadata
(
slug
),
]).
pipe
(
map
(([
nbViews
,
e
])
=>
{
this
.
_dataset
.
nbViews
=
nbViews
;
return
this
.
_elasticsearchService
.
getDatasetMetadata
(
slug
).
pipe
(
map
((
e
)
=>
{
if
(
e
.
hits
.
hits
.
length
>
0
)
{
const
metadata
=
new
Metadata
(
e
.
hits
.
hits
[
0
].
_source
[
'
metadata-fr
'
]);
this
.
_dataset
.
uuid
=
metadata
.
geonet
.
uuid
;
...
...
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