Skip to content
GitLab
Explore
Sign in
Kevin Rue-Albrecht
iSEE dashboard
Compare revisions
047f63159291fa435b65b1ba7f17d955636c86d5 to 417f7e22187acb95cbacb8dd9eab19d9ffe7027c
Commits on Source (2)
disable launch button when no dataset is selected
· 2b35c8ff
Kevin Rue-Albrecht
authored
Apr 23, 2021
2b35c8ff
add some HTML advice
· 417f7e22
Kevin Rue-Albrecht
authored
Apr 23, 2021
417f7e22
Hide whitespace changes
Inline
Side-by-side
notebooks/app-release.R
View file @
417f7e22
library
(
iSEE
)
library
(
jsonlite
)
# library(jsonlite)
library
(
shinyjs
)
# JSON approach ----
...
...
@@ -33,6 +34,10 @@ merge_table <- merge(datasets_table, files_table, by.x = "name", by.y = "dataset
dataset_rds_files
<-
subset
(
merge_table
,
grepl
(
"\\.rds$"
,
path
,
ignore.case
=
TRUE
),
c
(
"name"
,
"title"
,
"added"
,
"size"
,
"path"
))
configuration_scripts
<-
subset
(
merge_table
,
grepl
(
"\\.R$"
,
path
,
ignore.case
=
TRUE
),
c
(
"name"
,
"added"
,
"size"
,
"path"
))
# Release info ----
release_date
<-
scan
(
"release/RELEASE_DATE"
,
"character"
)
# Initialise the landing page ----
seLoad
<-
function
(
x
)
{
...
...
@@ -52,15 +57,16 @@ renku_landing_page <- function(FUN, input, output, session) {
.initializeInitial_row_selected
<-
paste0
(
.initializeInitial
,
"_rows_selected"
)
output
$
allPanels
<-
renderUI
({
useShinyjs
()
tagList
(
h1
(
"Select a data set"
),
DT
::
dataTableOutput
(
.initializeSE
),
h1
(
"Select a configuration"
),
HTML
(
"<blockquote>Unselect the default option (if any) to use the <code>iSEE</code> default settings.</blockquote>"
),
DT
::
dataTableOutput
(
.initializeInitial
),
actionButton
(
.initializeLaunch
,
label
=
"Launch"
,
style
=
iSEE
:::
.actionbutton_biocstyle
)
)
})
target
<-
.initializeLaunch
output
[[
.initializeSE
]]
<-
DT
::
renderDataTable
({
DT
::
datatable
(
...
...
@@ -85,7 +91,17 @@ renku_landing_page <- function(FUN, input, output, session) {
)
})
observeEvent
(
input
[[
target
]],
{
observeEvent
(
input
[[
.initializeSE_row_selected
]],
{
if
(
is.null
(
input
[[
.initializeSE_row_selected
]]))
{
disable
(
.initializeLaunch
)
updateActionButton
(
inputId
=
.initializeLaunch
,
label
=
"Select a dataset"
)
}
else
{
enable
(
.initializeLaunch
)
updateActionButton
(
inputId
=
.initializeLaunch
,
label
=
"Launch"
)
}
},
ignoreNULL
=
FALSE
,
ignoreInit
=
TRUE
)
observeEvent
(
input
[[
.initializeLaunch
]],
{
print
(
input
[[
.initializeSE_row_selected
]])
se2
<-
try
(
seLoad
(
input
[[
.initializeSE_row_selected
]]))
if
(
is
(
se2
,
"try-error"
))
{
...
...
@@ -93,8 +109,8 @@ renku_landing_page <- function(FUN, input, output, session) {
type
=
"error"
)
}
else
{
print
(
input
[[
.initializeInitial
]])
init
<-
try
(
initLoad
(
input
[[
.initializeInitial
]]))
print
(
input
[[
.initializeInitial
_row_selected
]])
init
<-
try
(
initLoad
(
input
[[
.initializeInitial
_row_selected
]]))
if
(
is
(
init
,
"try-error"
))
{
showNotification
(
"invalid initial state supplied"
,
type
=
"warning"
)
...
...
@@ -107,7 +123,9 @@ renku_landing_page <- function(FUN, input, output, session) {
invisible
(
NULL
)
}
app
<-
iSEE
(
landingPage
=
renku_landing_page
)
app
<-
iSEE
(
landingPage
=
renku_landing_page
,
appTitle
=
sprintf
(
"iSEE dashboard @ Renku (updated %s)"
,
release_date
))
if
(
interactive
())
{
shiny
::
runApp
(
app
,
port
=
1234
)
}
...
...
release/RELEASE_DATE
0 → 100644
View file @
417f7e22
2021-04-23