From cec4fa8ad2901dd436f01f119ca33d9175b7971b Mon Sep 17 00:00:00 2001 From: rushabhpatel31 Date: Sat, 27 Jul 2019 08:14:20 -0400 Subject: [PATCH] Adding error Alert --- app/server.R | 14 ++++++++++++-- www/template.css | 4 +++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/app/server.R b/app/server.R index e187666..b39fdc6 100644 --- a/app/server.R +++ b/app/server.R @@ -121,7 +121,12 @@ title_y = input$titleY)$plot } else if(is.null(dt[[input$selectX]]) & is.null(dt[[input$selectY]])) { - print("no plot") + sendSweetAlert( + session = session, + title = "Error !!", + text = "It's broken...", + type = "error" + ) } else if(!is.null(dt[[input$selectX]])){ histogram(data = dt, @@ -134,7 +139,12 @@ title_y = input$titleY)$plot } else { - print("no plot") + sendSweetAlert( + session = session, + title = "Error !!", + text = "It's broken...", + type = "error" + ) }, diff --git a/www/template.css b/www/template.css index 1938d06..a305ec1 100644 --- a/www/template.css +++ b/www/template.css @@ -181,4 +181,6 @@ border-radius:20px; background-color: #1c1c1d !important; margin-bottom: 0px; padding-bottom: 0px; -} \ No newline at end of file +} + +