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
88b50e6a
Commit
88b50e6a
authored
Jan 19, 2022
by
Matthieu Benoist
Browse files
Mantis corrections
parent
14617bc1
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/app/dataset-detail/components/dataset-api/resources-queryable/resource-queryable/resource-queryable.component.ts
View file @
88b50e6a
...
...
@@ -171,7 +171,6 @@ export class ResourceQueryableComponent implements OnInit {
}
initURLCustomization
()
{
console
.
log
(
'
passage ici.
'
);
this
.
projectionList
=
[];
this
.
csvFieldsSeparatorList
=
[
'
,
'
,
'
;
'
];
...
...
@@ -333,8 +332,6 @@ export class ResourceQueryableComponent implements OnInit {
// Number features WS
if
(
this
.
resource
.
type
===
this
.
linkFormats
.
ws
)
{
console
.
log
(
'
padabam
'
);
console
.
log
(
this
.
queryableParameters
);
if
(
this
.
queryableParameters
.
numberFeatures
)
{
queryableUrlToDisplay
+=
this
.
selectedFormat
.
isProjectable
===
0
?
`<span class="is-active-parameter">?maxfeatures=
${
this
.
numberFeatures
}
</span>`
:
...
...
@@ -411,7 +408,6 @@ export class ResourceQueryableComponent implements OnInit {
//this.setDecimalSeparator(this.selectedDecimalseparator);
}
else
{
console
.
log
(
this
.
selectedFormat
.
name
);
this
.
queryableParameters
.
baseUrl
=
this
.
resource
.
metadataLink
.
url
.
replace
(
'
/all.json
'
,
''
);
this
.
queryableParameters
.
baseUrl
+=
`/
${
this
.
resource
.
metadataLink
.
name
}
.shp?`
;
if
(
this
.
selectedFormat
.
isProjectable
)
{
...
...
src/app/dataset-detail/components/dataset-detail/dataset-detail.component.ts
View file @
88b50e6a
...
...
@@ -174,8 +174,13 @@ export class DatasetDetailComponent implements OnInit, OnDestroy {
}
else
if
(
f
===
'
PDF
'
&&
link
.
name
.
includes
(
'
Licence
'
))
{
// Remove PDF because it's Licence
validFormat
=
false
;
}
/*if (link.service === 'WFS') {
if (f === 'ShapeFile') {
validFormat = false;
}
}*/
if
(
link
.
service
===
'
WMS
'
)
{
if
(
link
.
service
===
'
WMS
'
||
link
.
service
===
'
WCS
'
)
{
if
(
blockedFormat
.
includes
(
f
))
{
validFormat
=
false
;
}
...
...
src/app/dataset-detail/components/dataset-downloads/dataset-downloads.component.html
View file @
88b50e6a
...
...
@@ -4,7 +4,7 @@
</div>
<div
class=
"downloads"
[ngClass]=
"{'blury': cguModalIsOpened}"
>
<div
class=
"resources-downloadable"
*ngIf=
"hasDownloadableResources || hasStaticResources"
>
<div
*ngIf=
"
hasStatic
Resources"
>
<div
*ngIf=
"
downloadable
Resources"
>
<div
class=
"resource-download"
*ngFor=
"let downloadable of downloadableResources | keyvalue"
>
<div
class=
"resource-description"
>
<span>
{{downloadable.key}}
</span>
...
...
src/app/dataset-detail/components/dataset-downloads/resource-download-item/resource-download-item/resource-download-item.component.ts
View file @
88b50e6a
...
...
@@ -177,6 +177,8 @@ export class ResourceDownloadItemComponent implements OnInit {
}
else
if
(
this
.
resource
.
type
===
linkFormats
.
ws
)
{
if
(
this
.
format
.
name
===
'
JSON
'
)
{
queryableUrl
+=
`/
${
this
.
resource
.
metadataLink
.
name
}
/all.json?maxfeatures=-1`
;
}
else
if
(
this
.
format
.
name
===
'
CSV
'
)
{
queryableUrl
+=
`/
${
this
.
resource
.
metadataLink
.
name
}
/all.csv?maxfeatures=-1`
;
}
else
{
const
projectionAndBbox
=
this
.
getProjectionAndBbox
(
this
.
format
);
...
...
src/app/dataset-detail/services/resources.service.ts
View file @
88b50e6a
...
...
@@ -98,22 +98,25 @@ export class ResourcesService {
&&
f
.
name
!==
'
GIF
'
&&
f
.
name
!==
'
AAIGrid
'
);
}
if
(
!
downloadableResources
[
linkID
])
{
downloadableResources
[
linkID
]
=
[];
if
(
resourceCopy
.
formats
.
length
>
0
)
{
if
(
!
downloadableResources
[
linkID
])
{
downloadableResources
[
linkID
]
=
[];
}
// Instead of using the direct link to the files we go through the dedicated proxy
// that is adding credentials of a technical account if the user has access to the requested file/data
resourceCopy
.
metadataLink
.
url
=
resourceCopy
.
metadataLink
.
url
.
replace
(
APP_CONFIG
.
backendUrls
.
backendDomain
,
`
${
APP_CONFIG
.
backendUrls
.
proxyQuery
}
/download`
,
);
resourceCopy
.
metadataLink
.
url
=
resourceCopy
.
metadataLink
.
url
.
replace
(
'
https://download.recette.data.grandlyon.com
'
,
`
${
APP_CONFIG
.
backendUrls
.
proxyQuery
}
/download`
,
);
downloadableResources
[
linkID
].
push
(
resourceCopy
);
}
// Instead of using the direct link to the files we go through the dedicated proxy
// that is adding credentials of a technical account if the user has access to the requested file/data
resourceCopy
.
metadataLink
.
url
=
resourceCopy
.
metadataLink
.
url
.
replace
(
APP_CONFIG
.
backendUrls
.
backendDomain
,
`
${
APP_CONFIG
.
backendUrls
.
proxyQuery
}
/download`
,
);
resourceCopy
.
metadataLink
.
url
=
resourceCopy
.
metadataLink
.
url
.
replace
(
'
https://download.recette.data.grandlyon.com
'
,
`
${
APP_CONFIG
.
backendUrls
.
proxyQuery
}
/download`
,
);
downloadableResources
[
linkID
].
push
(
resourceCopy
);
}
});
}
else
if
(
link
.
service
===
undefined
)
{
...
...
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