From d16fa1de2e3b6f32062d7a841460600c3bfdc2e7 Mon Sep 17 00:00:00 2001
From: Midoux Cedric <cedric.midoux@irstea.fr>
Date: Thu, 28 Jun 2018 17:35:29 +0200
Subject: [PATCH] withLoader

---
 ui.R | 67 +++++++++++++++++++++++++++---------------------------------
 1 file changed, 30 insertions(+), 37 deletions(-)

diff --git a/ui.R b/ui.R
index b9aecbb..57a39f1 100644
--- a/ui.R
+++ b/ui.R
@@ -1,4 +1,5 @@
 library(shinydashboard)
+library(shinycustomloader)
 shinyUI(dashboardPage(
   dashboardHeader(title = "Easy16S"),
   dashboardSidebar(
@@ -71,16 +72,14 @@ shinyUI(dashboardPage(
       tabPanel(
         "Summary",
         verbatimTextOutput("phyloseqPrint"),
-        uiOutput("summaryTable")
-      ),
-      tabPanel(
-        "Global barplot",
-        plotOutput("histo", height = 700),
-        uiOutput("histUI")
+        withLoader(uiOutput("summaryTable"))
       ),
+      tabPanel("Global barplot",
+               withLoader(plotOutput("histo", height = 700)),
+               uiOutput("histUI")),
       tabPanel(
         "Filtered barplot",
-        plotOutput("histoFocus", height = 700),
+        withLoader(plotOutput("histoFocus", height = 700)),
         box(
           title = "Paramètres",
           width = NULL,
@@ -92,25 +91,23 @@ shinyUI(dashboardPage(
           uiOutput("histFocusUIfocusX")
         )
       ),
-      tabPanel(
-        "Heatmap",
-        plotOutput("Heatmap", height = 700),
-        uiOutput("HeatmapUI")
-      ),
+      tabPanel("Heatmap",
+               withLoader(plotOutput("Heatmap", height = 700)),
+               uiOutput("HeatmapUI")),
       tabPanel(
         "Rarefaction curves",
-        plotOutput("rarefactionCurve", height = 700),
+        withLoader(plotOutput("rarefactionCurve", height = 700)),
         uiOutput("rarefactionCurveUI")
       ),
       tabPanel(HTML("&alpha;-diversity"),
                box(
                  width = NULL, tabsetPanel(
-                   tabPanel(
-                     "Plots",
-                     plotOutput("richnessA", height = 700),
-                     uiOutput("richnessAUI")
-                   ),
-                   tabPanel("Tables", uiOutput("richnessATable"))
+                   tabPanel("Plots",
+                            withLoader(plotOutput(
+                              "richnessA", height = 700
+                            )),
+                            uiOutput("richnessAUI")),
+                   tabPanel("Tables", withLoader(uiOutput("richnessATable")))
                  )
                )),
       tabPanel(
@@ -129,34 +126,30 @@ shinyUI(dashboardPage(
           )
         ),
         box(width = NULL, tabsetPanel(
-          tabPanel(
-            "Heatmap",
-            plotOutput("richnessB", height = 700),
-            uiOutput("richnessBUI")
-          ),
-          tabPanel(
-            "Networks",
-            plotOutput("networkB", height = 700),
-            uiOutput("networkBUI")
-          ),
-          tabPanel("Tables", uiOutput("richnessBTable"))
+          tabPanel("Heatmap",
+                   withLoader(plotOutput(
+                     "richnessB", height = 700
+                   )),
+                   uiOutput("richnessBUI")),
+          tabPanel("Networks",
+                   withLoader(plotOutput("networkB", height = 700)),
+                   uiOutput("networkBUI")),
+          tabPanel("Tables", withLoader(uiOutput("richnessBTable")))
         ))
       ),
       tabPanel(
         "MultiDimensional Scaling",
-        plotOutput("acp", height = 700),
+        withLoader(plotOutput("acp", height = 700)),
         uiOutput("acpUI")
       ),
       tabPanel(
         "Phylogenetic tree",
-        plotOutput("tree", height = 700),
+        withLoader(plotOutput("tree", height = 700)),
         uiOutput("treeUI")
       ),
-      tabPanel(
-        "Clustering",
-        plotOutput("clust", height = 700),
-        uiOutput("clustUI")
-      ),
+      tabPanel("Clustering",
+               withLoader(plotOutput("clust", height = 700)),
+               uiOutput("clustUI")),
       tabPanel(
         "Help",
         div(
-- 
GitLab