From 9580597e7a99d958de6ebf7b07061efa4f762e19 Mon Sep 17 00:00:00 2001
From: Eduardo Junior <edujrrib@gmail.com>
Date: Fri, 26 Aug 2016 14:53:28 -0300
Subject: [PATCH] =?UTF-8?q?Adiciona=20bot=C3=A3o=20para=20parar=20execu?=
 =?UTF-8?q?=C3=A7=C3=A3o=20do=20R=20no=20console?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 inst/ShinyApps/labestDataView/server.R |  6 ++++++
 inst/ShinyApps/labestDataView/ui.R     | 14 ++++++++++----
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/inst/ShinyApps/labestDataView/server.R b/inst/ShinyApps/labestDataView/server.R
index e39703dc..2fd1f0db 100644
--- a/inst/ShinyApps/labestDataView/server.R
+++ b/inst/ShinyApps/labestDataView/server.R
@@ -69,5 +69,11 @@ shinyServer(
                 )
             }
         })
+
+        observe({
+            if(input$EXIT > 0) {
+                stopApp()
+            }
+        })
     }
 )
diff --git a/inst/ShinyApps/labestDataView/ui.R b/inst/ShinyApps/labestDataView/ui.R
index eb3d3d58..5bb3b3bb 100644
--- a/inst/ShinyApps/labestDataView/ui.R
+++ b/inst/ShinyApps/labestDataView/ui.R
@@ -9,7 +9,7 @@ shinyUI(
 
         fluidRow(
             column(
-                width = 4, offset = 2,
+                width = 4, ## offset = 2,
                 selectInput(inputId = "DATASET",
                             label = "Dados disponíveis",
                             choices = c("Escolha um dataset" = "", L))
@@ -20,6 +20,15 @@ shinyUI(
                            'os dados:</label><br>', sep = "")),
                 downloadButton(outputId = "DOWNLOADDATA",
                                label = "Download tsv")
+            ),
+            column(
+                width = 2, offset = 2,
+                HTML(paste('<label class="control-label">Execução R:',
+                           '</label><br>', sep = "")),
+                actionButton(inputId = "EXIT",
+                             label = "Stop",
+                             class = "btn btn-danger")
+
             )
         ),
 
@@ -28,6 +37,3 @@ shinyUI(
         )
     )
 )
-
-
-
-- 
GitLab