Skip to content

Commit

Permalink
update alert message
Browse files Browse the repository at this point in the history
  • Loading branch information
venyao committed Dec 29, 2020
1 parent f6c54ce commit 89524e7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions server.R
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,11 @@ shinyServer(function(input, output, session) {
}

if (is.null(snp.reg) || nrow(snp.reg) < 5) {
js_string <- 'alert("No SNPs are detected in the specified genomic region or the specified genomic region is too large!");'
session$sendCustomMessage(type='jsCode', list(value = js_string))
sendSweetAlert(
session = session,
title = "Error input!", type = "error",
text = "Too few SNPs are detected in the specified genomic region or the specified genomic region is too large!"
)
} else {
snp.pos <- as.numeric(unlist(strsplit(input$ldpos, split=",")))

Expand Down Expand Up @@ -315,7 +318,7 @@ shinyServer(function(input, output, session) {
sendSweetAlert(
session = session,
title = "Error input!", type = "error",
text = "No SNPs are detected in the specified genomic region or the specified genomic region is too large!"
text = "Too few SNPs are detected in the specified genomic region or the specified genomic region is too large!"
)
} else {
if (input$uploadHAP == 1) {
Expand Down

0 comments on commit 89524e7

Please sign in to comment.