Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
jlopez
sagJL
Commits
3e16c91b
Commit
3e16c91b
authored
May 21, 2019
by
mmassaviol
Browse files
Update volumes management for shinyfiles
parent
408cdcb2
Changes
1
Hide whitespace changes
Inline
Side-by-side
main.R
View file @
3e16c91b
...
...
@@ -663,7 +663,18 @@ generate_pages_server <- function() {
for
(
page
in
APP
$
pages
){
for
(
box
in
page
$
boxes
){
for
(
cnt
in
box
$
content
){
volumes
=
'c(data="/samples",results="/results")'
if
(
"volumes"
%in%
names
(
cnt
)){
volumes
=
'c('
for
(
key
in
names
(
cnt
$
volumes
[[
1
]]))
volumes
=
paste0
(
volumes
,
key
,
'="'
,
cnt
$
volumes
[[
1
]][
key
],
'",'
)
volumes
=
substr
(
volumes
,
1
,
nchar
(
volumes
)
-1
)
volumes
=
paste0
(
volumes
,
')'
)
print
(
volumes
)
}
else
{
volumes
=
'c(Data="/Data",Results="/Results")'
}
if
(
cnt
$
type
==
"input_file"
){
res
<-
res
+
'\t\tshinyFileChoose(input, "shinyfiles_'
+
cnt
$
name
+
'", root='
+
volumes
+
',session = session)\n'
res
<-
res
+
'\t\tobserveEvent({parseFilePaths('
+
volumes
+
',input$shinyfiles_'
+
cnt
$
name
+
')$datapath[1]},{\n'
...
...
Write
Preview
Markdown
is supported
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