-
Notifications
You must be signed in to change notification settings - Fork 5
/
ui.R
26 lines (25 loc) · 885 Bytes
/
ui.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
library(shiny)
library(DT)
library(queryBuildR)
shinyUI(fluidPage(
includeCSS('www/style.css'),
fluidRow(
column(10,offset=1,
h4("Define and apply filters"),
queryBuildROutput("queryBuilderWidget",width="800px",height="100%"),
actionButton("queryApply", label = "Apply filters"),
tags$div(class="extraspace"),
h4("Resulting SQL query and table"),
textOutput("sqlQuery"),
tags$script('
function getSQLStatement() {
var sql = $("#queryBuilderWidget").queryBuilder("getSQL", false);
Shiny.onInputChange("queryBuilderSQL", sql);
};
document.getElementById("queryApply").onclick = function() {getSQLStatement()}
'),
DT::dataTableOutput('table'),
tags$div(class="extraspace")
)
)
))