Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
catalogueR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DREAL Pays de la Loire
Centre de Services de la Donnée
catalogueR
Commits
5b824e9e
Commit
5b824e9e
authored
7 months ago
by
lisasmah
Browse files
Options
Downloads
Patches
Plain Diff
#62
ajout du contrôle datables permettant d'afficher 20,50,100 ou tous les résultats
parent
0ca056c3
Branches
Branches containing commit
No related tags found
1 merge request
!48
#62 ajout du contrôle datables permettant d'afficher 20,50,100 ou tous les résultats
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
server.R
+29
-23
29 additions, 23 deletions
server.R
with
29 additions
and
23 deletions
server.R
+
29
−
23
View file @
5b824e9e
...
...
@@ -283,27 +283,29 @@ server <- function(input, output, session) {
# Mise à jour du tableau de métadonnées avec options d'export CSV et pagination
output
$
metadata_table
<-
DT
::
renderDataTable
({
req
(
r
$
selected_metadata
)
req
(
r
$
selected_metadata
)
# Vérifie que les données sont disponibles
DT
::
datatable
(
r
$
selected_metadata
,
filter
=
'bottom'
,
# Ajout du filtre en bas des colonnes
extensions
=
'Buttons'
,
# Ajout des boutons d'exportation CSV
rownames
=
FALSE
,
filter
=
'bottom'
,
extensions
=
'Buttons'
,
# Active l'extension Buttons pour l'exportation
options
=
list
(
dom
=
'Bfrtip'
,
pageLength
=
20
,
lengthMenu
=
c
(
20
,
50
,
100
),
pageLength
=
20
,
# Nombre de lignes par défaut affichées
lengthMenu
=
list
(
c
(
20
,
50
,
100
,
-1
),
# Valeurs disponibles
c
(
"20"
,
"50"
,
"100"
,
"Tous"
)
# Libellés associés
),
dom
=
'Blfrtip'
,
# Inclut les boutons d'exportation
language
=
list
(
url
=
'https://cdn.datatables.net/plug-ins/1.10.21/i18n/French.json'
),
autoWidth
=
FALSE
,
scrollX
=
TRUE
,
# Activer le défilement horizontal
buttons
=
list
(
list
(
extend
=
'csv'
,
text
=
'Télécharger CSV'
,
filename
=
r
$
nom_meta_csv
#
Utilisation du n
om d
e
fichier
pour les métadonnées
filename
=
r
$
nom_meta_csv
#
N
om d
u
fichier
CSV
)
)
)
),
scrollX
=
TRUE
# Active le défilement horizontal si nécessaire
),
rownames
=
FALSE
,
)
})
...
...
@@ -354,25 +356,29 @@ server <- function(input, output, session) {
DT
::
datatable
(
head
(
r
$
data_csv
,
100
),
filter
=
'bottom'
,
extensions
=
'Buttons'
,
rownames
=
FALSE
,
options
=
list
(
dom
=
'Bfrtip'
,
pageLength
=
20
,
lengthMenu
=
c
(
20
,
50
,
100
),
language
=
list
(
url
=
'https://cdn.datatables.net/plug-ins/1.10.21/i18n/French.json'
),
autoWidth
=
FALSE
,
scrollX
=
TRUE
,
# Activer le défilement horizontal
options
=
list
(
pageLength
=
20
,
# Nombre de lignes par défaut affichées
lengthMenu
=
list
(
c
(
20
,
50
,
100
,
-1
),
# Valeurs disponibles
c
(
"
20
"
,
"
50
"
,
"
100
"
,
"Tous"
)
# Libellés associés
),
dom
=
'Blfrtip'
,
# Inclut les boutons d'exportation
language
=
list
(
url
=
'https://cdn.datatables.net/plug-ins/1.10.21/i18n/French.json'
),
buttons
=
list
(
list
(
extend
=
'csv'
,
text
=
'Télécharger CSV'
,
filename
=
r
$
nom_csv
)
)
)
)
),
scrollX
=
TRUE
# Activer le défilement horizontal
),
rownames
=
FALSE
)
})
# Mettre à jour la viz carto de la table dans la zone principale de la page
output
$
map
<-
renderLeaflet
({
req
(
r
$
selected_data
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment