dashboardPage( skin = "green", dashboardHeader(title = "UA LTV"), dashboardSidebar( sidebarMenu( id = "sidebarMenu", menuItem( text = "Prediction", icon = icon("line-chart"), tabName = "prediction" ), # Starting hidden, the sidebar filters are only showed when the # current menu item is prediction. The div assures that all filters # are handled as one hidden(div(id = "sidebarFilters", SidebarFilters())), menuItem( text = "Diagnostics", icon = icon("ambulance"), tabName = "diagnostics" ) ) ), dashboardBody(Body()))
SidebarFilters <- function() { return( tagList( selectInput("network", "Network", choices = NULL), selectInput("campaign", "Campaign", choices = NULL,multiple = T), selectInput("country", "Country", choices = NULL, multiple = T), selectInput("platform", "Platform", choices = NULL, multiple = T), selectInput("attributionMonth", "Attribution Month", choices = NULL, multiple = T), actionButton("submitFilters", "Run Prediction", icon = icon("refresh")) ))}
tags$style(type='text/css', "button#submitFilters { margin-left: 9px; }")