Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MIRACUM
dqa
DQAgui
Commits
335b0d36
Commit
335b0d36
authored
4 years ago
by
Jonathan Mang
Browse files
Options
Download
Email Patches
Plain Diff
chore: moving towards integration of the datepicker
for temporal restriction
parent
786f874a
master
colored_diff_summary
development
development-Differences
feat_new_coreds
fix_no_timefiltering
fix_settings_from_env
lab-module
latest
time_compare_fix
trino
v0.2.4
v0.2.3
v0.2.2
v0.2.1
v0.2.0
v0.1.9
v0.1.8
v0.1.7
v0.1.6
No related merge requests found
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
DESCRIPTION
+1
-0
DESCRIPTION
R/app_utils.R
+22
-0
R/app_utils.R
R/moduleConfig.R
+44
-0
R/moduleConfig.R
data-raw/debugging_info.R
+3
-3
data-raw/debugging_info.R
data-raw/devstuffs.R
+2
-0
data-raw/devstuffs.R
inst/application/ui.R
+1
-1
inst/application/ui.R
with
73 additions
and
4 deletions
+73
-4
DESCRIPTION
+
1
-
0
View file @
335b0d36
...
...
@@ -25,6 +25,7 @@ Date: 2021-03-09
Imports:
data.table,
magrittr,
daterangepicker,
DT,
graphics,
shiny,
...
...
This diff is collapsed.
Click to expand it.
R/app_utils.R
+
22
-
0
View file @
335b0d36
...
...
@@ -519,4 +519,26 @@ print_runtime <-
)
}
datepicker_get_list_of_ranges
<-
function
()
{
res
<-
list
(
"Today"
=
c
(
Sys.Date
(),
Sys.Date
()),
"Yesterday"
=
c
(
Sys.Date
()
-
1
,
Sys.Date
()),
"Last 3 days"
=
c
(
Sys.Date
()
-
2
,
Sys.Date
()),
"Last 7 days"
=
c
(
Sys.Date
()
-
6
,
Sys.Date
()),
"Last 45 days"
=
c
(
Sys.Date
()
-
44
,
Sys.Date
())
)
## Get list of years:
for
(
i
in
0
:
4
)
{
if
(
i
==
0
)
{
## end = today
end
=
Sys.Date
()
}
else
{
end
=
as.Date
(
paste0
(
as.numeric
(
format
(
Sys.Date
(),
format
=
"%Y"
))
-
i
,
"-12-31"
))
}
year
<-
as.character
(
as.numeric
(
format
(
Sys.Date
(),
format
=
"%Y"
))
-
i
)
start
<-
as.Date
(
paste0
(
year
,
"-01-01"
))
res
[[
year
]]
<-
c
(
start
,
end
)
}
return
(
res
)
}
This diff is collapsed.
Click to expand it.
R/moduleConfig.R
+
44
-
0
View file @
335b0d36
...
...
@@ -925,6 +925,30 @@ module_config_server <-
selected
=
NULL
)
})
## Date-time picker for date restriction:
shiny
::
observeEvent
(
eventExpr
=
input
$
datetime_picker
,
handlerExpr
=
{
# shiny::showModal(shiny::modalDialog(
# title = "Date selected",
# paste0(
# "Start date and time: ",
# input$datetime_picker[[1]],
# "\nEnd date and time: ",
# input$datetime_picker[[2]]
# ),
# easyClose = TRUE
# ))
output
$
datetime_picker_info
<-
shiny
::
renderText
({
paste0
(
"Start date and time: "
,
input
$
datetime_picker
[[
1
]],
"\n\nEnd date and time: "
,
input
$
datetime_picker
[[
2
]]
)
})
})
}
#' @title module_config_ui
...
...
@@ -1374,6 +1398,26 @@ module_config_ui <- function(id) {
"display:center-align;"
)),
width
=
12
),
box
(
id
=
ns
(
"config_select_datetime_picker_box"
),
title
=
"Pick the date and time to be analyzed"
,
h4
(
htmlOutput
(
ns
(
"datetime_picker_info"
))),
daterangepicker
::
daterangepicker
(
inputId
=
ns
(
"datetime_picker"
),
# label = "Please pick a date range ",
start
=
Sys.Date
()
-
30
,
end
=
Sys.Date
(),
style
=
"width:100%; border-radius:4px"
,
ranges
=
datepicker_get_list_of_ranges
(),
options
=
list
(
showDropdowns
=
TRUE
,
timePicker
=
TRUE
,
timePicker24Hour
=
TRUE
,
autoApply
=
TRUE
)
# icon = shiny::icon("calendar")
),
width
=
12
),
box
(
id
=
ns
(
"config_select_dqa_assessment_box"
),
title
=
"Analyse the following data elements"
,
...
...
This diff is collapsed.
Click to expand it.
data-raw/debugging_info.R
+
3
-
3
View file @
335b0d36
...
...
@@ -32,9 +32,9 @@ devtools::load_all()
logfile_dir
=
tempdir
()
parallel
=
TRUE
ncores
=
2
# Lorenz:
utils_path
=
"/home/user/development/Rpackages/dqa/miracumdqa/inst/application/_utilities/"
# Jonathan:
#
# Lorenz:
#
utils_path = "/home/user/development/Rpackages/dqa/miracumdqa/inst/application/_utilities/"
#
# Jonathan:
# utils_path = DIZutils::clean_path_name(system.file("application/_utilities",
# package = "miRacumDQA"))
# utils_path = DIZutils::clean_path_name(system.file("application/_utilities",
...
...
This diff is collapsed.
Click to expand it.
data-raw/devstuffs.R
+
2
-
0
View file @
335b0d36
...
...
@@ -65,6 +65,8 @@ my_desc$write(file = "DESCRIPTION")
# Imports
usethis
::
use_package
(
"data.table"
,
type
=
"Imports"
)
usethis
::
use_package
(
"magrittr"
,
type
=
"Imports"
)
# For date-restriction:
usethis
::
use_package
(
"daterangepicker"
,
type
=
"Imports"
)
usethis
::
use_package
(
"DT"
,
type
=
"Imports"
)
usethis
::
use_package
(
"graphics"
,
type
=
"Imports"
)
usethis
::
use_package
(
"shiny"
,
type
=
"Imports"
)
...
...
This diff is collapsed.
Click to expand it.
inst/application/ui.R
+
1
-
1
View file @
335b0d36
...
...
@@ -72,9 +72,9 @@ shiny::shinyUI(
shiny
::
HTML
(
paste0
(
"Version:"
,
"<br/>DIZutils: "
,
utils
::
packageVersion
(
"DIZutils"
),
"<br/>DQAstats: "
,
utils
::
packageVersion
(
"DQAstats"
),
"<br/>DQAgui: "
,
utils
::
packageVersion
(
"DQAgui"
),
"<br/>DIZutils: "
,
utils
::
packageVersion
(
"DIZutils"
),
"<br/><br/>\u00A9 Universitätsklinikum Erlangen<br/>"
)
)
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help