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) {
lastCoCoQuest <<- inFile$name
totalST <<- c(anytime(as.numeric(json_data_quest$startTime)/1000))
print(json_data_quest)
#unix parsed
dat <- do.call(rbind, json_data_quest$tasks$data)
......@@ -134,7 +136,8 @@ server <- function(input, output, session) {
print("endtime quest")
print(endtimes)
tasks <- rep(1:length(json_data_quest$tasks$data), sapply(json_data_quest$tasks$data, nrow))
#questions
#print("Questions:", questions)
together <<- c(tasks, endtimes)
print("together")
print(together)
......@@ -178,7 +181,7 @@ server <- function(input, output, session) {
#CONTROLLS PAGE
#Title Input
output$text <- renderText({ input$title })
output$title <- renderText({ input$title })
#barchart
......@@ -251,7 +254,7 @@ server <- function(input, output, session) {
})
#DASHBOARD PAGE
#DASHBOARD
#barchart
output$hist_box <- renderUI({
......@@ -338,6 +341,8 @@ server <- function(input, output, session) {
#DownloadButton
#TODO: MAKE IT WORK!
observeEvent(input$screenshot,{
#if(input$check_line|input$check_time|input$check_map|input$check_hist)
#disable("screenshot")
#webshot::install_phantomjs()
cdat <<- session$clientData
url <- paste0(cdat$url_hostname,":", cdat$url_port,"/")
......
......@@ -15,7 +15,7 @@ ui <- dashboardPage(
menuItem("Upload", tabName = "upload", icon =icon("upload")),
menuItem("Data", tabName = "data", icon =icon("list")),
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"))
)
),
......@@ -28,7 +28,7 @@ ui <- dashboardPage(
tabItems(
# Upload tab content
tabItem(tabName = "upload",
h2("Upload here:"),
h2("Upload your data here:"),
fileInput("nut", "Select CoConUT Data (*.json):",
multiple = TRUE,
accept = c(
......@@ -48,13 +48,12 @@ ui <- dashboardPage(
#show data tab content
tabItem(tabName = "data",
h2("CoConUT Data here:"),
h2("Look into the CoConUT Data:"),
h4("Last Loaded CoConUT Data: "),
textOutput("lastLoadedNut"),
dataTableOutput("nut"),
h2("CoCoQuest Data here:"),
h2("Look into the CoCoQuest Data:"),
h4("Last Loaded CoCoQuest Data: "),
textOutput("lastLoadedQuest"),
#h4("Starttime: "),
......@@ -66,32 +65,62 @@ ui <- dashboardPage(
# Controls tab content
tabItem(tabName = "views",
h2("Views here:"),
textInput("title", "Title", " "),
#Barchart
checkboxInput("check_hist", "Barchart", FALSE),
#uiOutput("check_hist"),
uiOutput("input_hist_x"),
uiOutput("input_hist_y"),
#TIMELINE
checkboxInput("check_time", "Timeline", FALSE),
uiOutput("input_time_x"),
uiOutput("input_time_y"),
#Linechart
checkboxInput("check_line", "Linechart", FALSE),
uiOutput("input_line_x"),
uiOutput("input_line_y"),
#MAP
checkboxInput("check_map", "Map", TRUE),
uiOutput("input_map"),
fluidPage(
fluidRow(
sidebarLayout(
sidebarPanel(
h2("Set the Views here:"),
textInput("title", "Title", " "),
tabsetPanel(
tabPanel("Barchart",
#Barchart
checkboxInput("check_hist", "Barchart", FALSE),
#uiOutput("check_hist"),
uiOutput("input_hist_x"),
uiOutput("input_hist_y")),
#TIMELINE
tabPanel("Timeline",
checkboxInput("check_time", "Timeline", FALSE),
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"),
actionButton("dashboardSite", "go to dashboard")
#actionButton("dashboardSite", "go to dashboard")
),
# Dashboard tab content
tabItem(tabName = "dashboard",
h2(textOutput("text")),
fluidRow(
#tabItem(tabName = "dashboard",
#h2(textOutput("title")),
#fluidRow(
#tabBox(
#title = "First tabBox",
# The id lets us use input$tabset1 on the server to find the current tab
......@@ -101,17 +130,17 @@ ui <- dashboardPage(
#),
uiOutput("hist_box"),
uiOutput("time_box"),
uiOutput("line_box"),
uiOutput("map_box")
#uiOutput("hist_box"),
#uiOutput("time_box"),
# uiOutput("line_box"),
#uiOutput("map_box")
),
actionButton("screenshot","Download")
# )
#actionButton("screenshot","Download")
#downloadButton("downButton", "Download")
),
#),
# Help tab content
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