dev/test_dev/dash_2.R

library(shiny)
library(shinydashboard)
library(shinyWidgets)
library(shinyjs)
library(tibble)

options(shiny.fullstacktrace = TRUE)

verbose <- TRUE
#------------------------ Class TimelineDraw -----------------------------------
source(file.path('.', 'mod_timeline_v.R'), local=TRUE)$value
source(file.path('.', 'mod_timeline_h.R'), local=TRUE)$value
#source(file.path('.', 'mod_Protein.R'), local=TRUE)$value
#source(file.path('.', 'mod_Protein_Normalization.R'), local=TRUE)$value
#source(file.path('.', 'mod_Protein_Description.R'), local=TRUE)$value
# 
# redBtnClass <- "btn-danger"
# PrevNextBtnClass <- "btn-info"
# btn_success_color <- "btn-success"
# optionsBtnClass <- "info"
# 
# btn_style <- "display:inline-block; vertical-align: middle; padding: 7px"
# 
# AddItemToDataset <- function(dataset, name){
#   addAssay(dataset, 
#            dataset[[length(dataset)]], 
#            name=name)
# }


  
  # A dashboard body with a row of infoBoxes and valueBoxes, and two rows of boxes
  body <- dashboardBody(
    
    
    # Boxes with solid color, using `background`
    fluidRow(
      # Box with textOutput
      box(
        title = "Status summary",
        background = "green",
        width = 8,
        mod_Protein_ui('Protein')
      ),
      
      # Box with HTML output, when finer control over appearance is needed
      box(
        title = "Status summary 2",
        width = 4,
        background = "red",
        uiOutput("status2")
      )
    )
  )
  
  server <- function(input, output) {
    obj <- NULL
    obj <- Exp1_R25_prot
    
    
    rv <- reactiveValues(
      res = NULL
    )
    
    observe({
      rv$res <- mod_Protein_server(id = 'Protein', 
                                    dataIn = reactive({obj}),
                                    tag.enabled = reactive({TRUE})
      )
    })
  }
  
  shinyApp(
    ui = dashboardPage(
      dashboardHeader(),
      dashboardSidebar(),
      body
    ),
    server = server
  )
samWieczorek/Magellan documentation built on March 30, 2022, 3:40 a.m.