Commit 2e722c28 authored by Stephanie Wegscheidl's avatar Stephanie Wegscheidl

major structural changes

Dashboard and View combined
View sidepanel structured in tabs
parent 062ef1dc
...@@ -124,7 +124,9 @@ server <- function(input, output, session) { ...@@ -124,7 +124,9 @@ server <- function(input, output, session) {
lastCoCoQuest <<- inFile$name lastCoCoQuest <<- inFile$name
totalST <<- c(anytime(as.numeric(json_data_quest$startTime)/1000)) totalST <<- c(anytime(as.numeric(json_data_quest$startTime)/1000))
print(json_data_quest)
#unix parsed #unix parsed
dat <- do.call(rbind, json_data_quest$tasks$data) dat <- do.call(rbind, json_data_quest$tasks$data)
...@@ -134,7 +136,8 @@ server <- function(input, output, session) { ...@@ -134,7 +136,8 @@ server <- function(input, output, session) {
print("endtime quest") print("endtime quest")
print(endtimes) print(endtimes)
tasks <- rep(1:length(json_data_quest$tasks$data), sapply(json_data_quest$tasks$data, nrow)) tasks <- rep(1:length(json_data_quest$tasks$data), sapply(json_data_quest$tasks$data, nrow))
#questions
#print("Questions:", questions)
together <<- c(tasks, endtimes) together <<- c(tasks, endtimes)
print("together") print("together")
print(together) print(together)
...@@ -178,7 +181,7 @@ server <- function(input, output, session) { ...@@ -178,7 +181,7 @@ server <- function(input, output, session) {
#CONTROLLS PAGE #CONTROLLS PAGE
#Title Input #Title Input
output$text <- renderText({ input$title }) output$title <- renderText({ input$title })
#barchart #barchart
...@@ -251,7 +254,7 @@ server <- function(input, output, session) { ...@@ -251,7 +254,7 @@ server <- function(input, output, session) {
}) })
#DASHBOARD PAGE #DASHBOARD
#barchart #barchart
output$hist_box <- renderUI({ output$hist_box <- renderUI({
...@@ -338,6 +341,8 @@ server <- function(input, output, session) { ...@@ -338,6 +341,8 @@ server <- function(input, output, session) {
#DownloadButton #DownloadButton
#TODO: MAKE IT WORK! #TODO: MAKE IT WORK!
observeEvent(input$screenshot,{ observeEvent(input$screenshot,{
#if(input$check_line|input$check_time|input$check_map|input$check_hist)
#disable("screenshot")
#webshot::install_phantomjs() #webshot::install_phantomjs()
cdat <<- session$clientData cdat <<- session$clientData
url <- paste0(cdat$url_hostname,":", cdat$url_port,"/") url <- paste0(cdat$url_hostname,":", cdat$url_port,"/")
......
...@@ -15,7 +15,7 @@ ui <- dashboardPage( ...@@ -15,7 +15,7 @@ ui <- dashboardPage(
menuItem("Upload", tabName = "upload", icon =icon("upload")), menuItem("Upload", tabName = "upload", icon =icon("upload")),
menuItem("Data", tabName = "data", icon =icon("list")), menuItem("Data", tabName = "data", icon =icon("list")),
menuItem("Views", tabName = "views", icon = icon("cog")), menuItem("Views", tabName = "views", icon = icon("cog")),
menuItem("Dashboard", tabName = "dashboard", icon = icon("dashboard")), # menuItem("Dashboard", tabName = "dashboard", icon = icon("dashboard")),
menuItem("Help", tabName = "help", icon = icon("book")) menuItem("Help", tabName = "help", icon = icon("book"))
) )
), ),
...@@ -28,7 +28,7 @@ ui <- dashboardPage( ...@@ -28,7 +28,7 @@ ui <- dashboardPage(
tabItems( tabItems(
# Upload tab content # Upload tab content
tabItem(tabName = "upload", tabItem(tabName = "upload",
h2("Upload here:"), h2("Upload your data here:"),
fileInput("nut", "Select CoConUT Data (*.json):", fileInput("nut", "Select CoConUT Data (*.json):",
multiple = TRUE, multiple = TRUE,
accept = c( accept = c(
...@@ -48,13 +48,12 @@ ui <- dashboardPage( ...@@ -48,13 +48,12 @@ ui <- dashboardPage(
#show data tab content #show data tab content
tabItem(tabName = "data", tabItem(tabName = "data",
h2("CoConUT Data here:"), h2("Look into the CoConUT Data:"),
h4("Last Loaded CoConUT Data: "), h4("Last Loaded CoConUT Data: "),
textOutput("lastLoadedNut"), textOutput("lastLoadedNut"),
dataTableOutput("nut"), dataTableOutput("nut"),
h2("Look into the CoCoQuest Data:"),
h2("CoCoQuest Data here:"),
h4("Last Loaded CoCoQuest Data: "), h4("Last Loaded CoCoQuest Data: "),
textOutput("lastLoadedQuest"), textOutput("lastLoadedQuest"),
#h4("Starttime: "), #h4("Starttime: "),
...@@ -66,32 +65,62 @@ ui <- dashboardPage( ...@@ -66,32 +65,62 @@ ui <- dashboardPage(
# Controls tab content # Controls tab content
tabItem(tabName = "views", tabItem(tabName = "views",
h2("Views here:"), fluidPage(
textInput("title", "Title", " "), fluidRow(
#Barchart
checkboxInput("check_hist", "Barchart", FALSE), sidebarLayout(
#uiOutput("check_hist"), sidebarPanel(
uiOutput("input_hist_x"), h2("Set the Views here:"),
uiOutput("input_hist_y"), textInput("title", "Title", " "),
#TIMELINE tabsetPanel(
checkboxInput("check_time", "Timeline", FALSE), tabPanel("Barchart",
uiOutput("input_time_x"), #Barchart
uiOutput("input_time_y"), checkboxInput("check_hist", "Barchart", FALSE),
#Linechart #uiOutput("check_hist"),
checkboxInput("check_line", "Linechart", FALSE), uiOutput("input_hist_x"),
uiOutput("input_line_x"), uiOutput("input_hist_y")),
uiOutput("input_line_y"), #TIMELINE
#MAP tabPanel("Timeline",
checkboxInput("check_map", "Map", TRUE), checkboxInput("check_time", "Timeline", FALSE),
uiOutput("input_map"), uiOutput("input_time_x"),
uiOutput("input_time_y")),
#Linechart
tabPanel("Linechart",
checkboxInput("check_line", "Linechart", FALSE),
uiOutput("input_line_x"),
uiOutput("input_line_y")),
#MAP
tabPanel("Map",
checkboxInput("check_map", "Map", FALSE),
uiOutput("input_map"))
)
),
mainPanel(column(width = 12,
h2(textOutput("title")),
uiOutput("hist_box"),
uiOutput("time_box"),
uiOutput("line_box"),
uiOutput("map_box"),
actionButton("screenshot","Download")))
)#end sidebarlayout
) #end fluidrow
)#end fluidpage
#uiOutput("input_map_y"), #uiOutput("input_map_y"),
actionButton("dashboardSite", "go to dashboard") #actionButton("dashboardSite", "go to dashboard")
), ),
# Dashboard tab content # Dashboard tab content
tabItem(tabName = "dashboard", #tabItem(tabName = "dashboard",
h2(textOutput("text")), #h2(textOutput("title")),
fluidRow( #fluidRow(
#tabBox( #tabBox(
#title = "First tabBox", #title = "First tabBox",
# The id lets us use input$tabset1 on the server to find the current tab # The id lets us use input$tabset1 on the server to find the current tab
...@@ -101,17 +130,17 @@ ui <- dashboardPage( ...@@ -101,17 +130,17 @@ ui <- dashboardPage(
#), #),
uiOutput("hist_box"), #uiOutput("hist_box"),
uiOutput("time_box"), #uiOutput("time_box"),
uiOutput("line_box"), # uiOutput("line_box"),
uiOutput("map_box") #uiOutput("map_box")
), # )
actionButton("screenshot","Download") #actionButton("screenshot","Download")
#downloadButton("downButton", "Download") #downloadButton("downButton", "Download")
), #),
# Help tab content # Help tab content
tabItem(tabName = "help", tabItem(tabName = "help",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment