Shiny-Server(AW​​S Ubuntu)无法正确呈现ShinyDashboard

时间:2017-07-12 15:54:28

标签: shiny-server shinydashboard

提前感谢您的帮助。

我在Amazon Web Services上的Ubuntu上设置了闪亮的服务器。一切都与我上传的其他应用程序正常工作。但是,我正在尝试使用shinydashboards包来创建一些仪表板。我遇到了第一个子菜单项没有呈现的问题。

您可以在此处查看AWS中的应用。 https://www.ndperfsci.com/apps/TestApps/PerfSci_App/

它在ShinyApps.io中运行得很好 https://webbphysprep.shinyapps.io/test/

以下是我正在使用的确切代码:

library('shiny')
library('shinydashboard')

# Sidebar #############################
sidebar <- dashboardSidebar(

  sidebarMenu(
    menuItem('Catapult', tabName = 'menu_ctplt', icon = icon('circle-o'),
              collapsible =
                menuSubItem('Upload Files', tabName = 'submenu_ctplt_upload'),
                menuSubItem('Edit Records', tabName = 'submenu_ctplt_edit')
    )
  ),

  sidebarMenu(
    menuItem('Force Decks', tabName = 'menu_fd', icon = icon('circle-o'),
            collapsible =
              menuSubItem('Upload Files', tabName = 'submenu_fd_upload'),
              menuSubItem('Edit Records', tabName = 'submenu_fd_edit')
    )
  )

)

# Body #############################
body <- dashboardBody(
  tabItems(
    tabItem(tabName = 'submenu_ctplt_upload',
            h2('Selected Sub-Item One')
    ),
    tabItem(tabName = 'submenu_ctplt_edit',
            h2('Selected Sub-Item Two')
    ),
    tabItem(tabName = 'submenu_fd_upload',
            h2('Selected Sub-Item Three')
    ),
    tabItem(tabName = 'submenu_fd_edit',
            h2('Selected Sub-Item Four')
    )
  )
)

# UI #############################
ui <- dashboardPage(
  dashboardHeader(title = 'ND Perf-Sci Apps'),
  skin = 'black',
  sidebar,
  body
)

# Server #############################
server <- function(input, output){

}

shinyApp(ui, server)

0 个答案:

没有答案