From c7e0168729e741c4c39f756cf11d6b3291be5f01 Mon Sep 17 00:00:00 2001 From: Alan Bernstein Date: Mon, 8 May 2017 17:59:18 -0500 Subject: [PATCH 1/5] Add syntax hints tooltip to WebUI --- webui/assets/style.css | 40 +++++++++++++++++++++++++++++++++++++++- webui/index.html | 35 ++++++++++++++++++++++++++++++++--- 2 files changed, 71 insertions(+), 4 deletions(-) diff --git a/webui/assets/style.css b/webui/assets/style.css index 515335ef9..5fec5b5c6 100644 --- a/webui/assets/style.css +++ b/webui/assets/style.css @@ -295,4 +295,42 @@ td{ .expand { text-align: center; -} \ No newline at end of file +} + +.query h2 { + display: inline-block; +} + +.query-tooltip { + position: relative; + display: inline; + color: #1db598; + margin-left: 5px; +} + +.query-tooltip-content { + visibility: hidden; + background-color: rgb(250, 250, 250); + border: solid 1.5px #e4eff4; + color: #102445; + border-radius: 2px; + padding: 15px; + margin-bottom: 15px; + + /* Position the tooltip */ + position: absolute; + /* + left: 423px; + top: 100px; + */ + z-index: 1; +} + +.query-tooltip:hover+.query-tooltip-content { + visibility: visible; +} + +.code{ + font-family: monospace; +} + diff --git a/webui/index.html b/webui/index.html index 8422d4c45..53feb0b7a 100644 --- a/webui/index.html +++ b/webui/index.html @@ -34,10 +34,39 @@
-

Query

+

Query

? +
+
PQL
+
+ SetBit(frame=foo, row=0, column=0)
+ ClearBit(frame=foo, row=0, column=0)
+ SetRowAttrs(frame=foo, row=0, color="blue")
+ SetColumnAttrs(frame=foo, column=0, shape="circle")
+ Bitmap(frame=foo, row=0)
+ Range(frame=foo, row=0, start="2010-01-01T00:00", end="2017-03-02T03:00")
+ Count(<BITMAP_CALL>)
+ TopN([BITMAP_CALL], frame=foo, n=20)
+ Union([BITMAP_CALL, ...])
+ Intersect(<BITMAP_CALL>, [BITMAP_CALL, ...])
+ Difference(<BITMAP_CALL>, <BITMAP_CALL>) +
+
+
Special commands
+
+ :create index test [columnLabel=column]
+ :use index test
+ :create frame foo [rowLabel=row]
+ :delete index test
+ :delete frame foo +
+
+ <tab>: autocomplete
+ <up>/<down>: history
+
-
- +
+
+
From 62d1c20eefe61bfc63334f16e160593c4d654a05 Mon Sep 17 00:00:00 2001 From: Alan Bernstein Date: Tue, 9 May 2017 17:52:29 -0500 Subject: [PATCH 2/5] Style fixes --- webui/assets/style.css | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/webui/assets/style.css b/webui/assets/style.css index 5fec5b5c6..3a5bcaf39 100644 --- a/webui/assets/style.css +++ b/webui/assets/style.css @@ -304,12 +304,15 @@ td{ .query-tooltip { position: relative; display: inline; - color: #1db598; + color: #000; margin-left: 5px; } +.query-tooltip:hover { + color: #000; +} + .query-tooltip-content { - visibility: hidden; background-color: rgb(250, 250, 250); border: solid 1.5px #e4eff4; color: #102445; @@ -317,16 +320,18 @@ td{ padding: 15px; margin-bottom: 15px; - /* Position the tooltip */ position: absolute; - /* - left: 423px; - top: 100px; - */ + left: 80px; + top: -30px; z-index: 1; } -.query-tooltip:hover+.query-tooltip-content { +.query-tooltip-container { + position: relative; + visibility: hidden; +} + +.query-tooltip:hover+.query-tooltip-container{ visibility: visible; } From 43dac449b0eae1518b6b9f6590e22fe3808998b7 Mon Sep 17 00:00:00 2001 From: Alan Bernstein Date: Tue, 9 May 2017 17:53:25 -0500 Subject: [PATCH 3/5] Fix broken html structure --- webui/index.html | 85 +++++++++++++++++++++++++----------------------- 1 file changed, 44 insertions(+), 41 deletions(-) diff --git a/webui/index.html b/webui/index.html index 53feb0b7a..fbab04911 100644 --- a/webui/index.html +++ b/webui/index.html @@ -34,58 +34,61 @@
-

Query

? -
-
PQL
-
- SetBit(frame=foo, row=0, column=0)
- ClearBit(frame=foo, row=0, column=0)
- SetRowAttrs(frame=foo, row=0, color="blue")
- SetColumnAttrs(frame=foo, column=0, shape="circle")
- Bitmap(frame=foo, row=0)
- Range(frame=foo, row=0, start="2010-01-01T00:00", end="2017-03-02T03:00")
- Count(<BITMAP_CALL>)
- TopN([BITMAP_CALL], frame=foo, n=20)
- Union([BITMAP_CALL, ...])
- Intersect(<BITMAP_CALL>, [BITMAP_CALL, ...])
- Difference(<BITMAP_CALL>, <BITMAP_CALL>) +

Query

+ ? +
+
+
PQL
+
+ SetBit(frame=foo, row=0, column=0)
+ ClearBit(frame=foo, row=0, column=0)
+ SetRowAttrs(frame=foo, row=0, color="blue")
+ SetColumnAttrs(frame=foo, column=0, shape="circle")
+ Bitmap(frame=foo, row=0)
+ Range(frame=foo, row=0, start="2010-01", end="2017-03")
+ Count(<BITMAP_CALL>)
+ TopN([BITMAP_CALL], frame=foo, n=20)
+ Union([BITMAP_CALL, ...])
+ Intersect(<BITMAP_CALL>, [BITMAP_CALL, ...])
+ Difference(<BITMAP_CALL>, <BITMAP_CALL>) +
+
+
Special commands
+
+ :create index test [columnLabel=column]
+ :use index test
+ :create frame foo [rowLabel=row]
+ :delete index test
+ :delete frame foo +
+
+ <tab>: autocomplete
+ <up>/<down>: history
-
-
Special commands
-
- :create index test [columnLabel=column]
- :use index test
- :create frame foo [rowLabel=row]
- :delete index test
- :delete frame foo -
-
- <tab>: autocomplete
- <up>/<down>: history
-
-
-
- -     - +
+
+ +     + +
-
-
+
-

Output

-
+

Output

+
+ + +
-
-
From 742ca5d18f2f16ebf7d3fbb08fdcb4ba39b6105d Mon Sep 17 00:00:00 2001 From: Alan Bernstein Date: Tue, 9 May 2017 17:53:47 -0500 Subject: [PATCH 4/5] Update autocomplete list --- webui/assets/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webui/assets/main.js b/webui/assets/main.js index e18c562fb..887181338 100644 --- a/webui/assets/main.js +++ b/webui/assets/main.js @@ -20,7 +20,8 @@ class REPL { // keyword: length of substring that comes after cursor "SetBit()": 1, "ClearBit()": 1, - "SetBitmapAttrs()": 1, + "SetRowAttrs()": 1, + "SetColumnAttrs()": 1, "Bitmap()": 1, "Union()": 1, "Intersect()": 1, From 3eff46b07abe6fd0238a5d8ed3cba2eec56b4198 Mon Sep 17 00:00:00 2001 From: Alan Bernstein Date: Tue, 9 May 2017 21:22:45 -0500 Subject: [PATCH 5/5] Use default row/column labels --- webui/index.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/webui/index.html b/webui/index.html index fbab04911..09e39d17a 100644 --- a/webui/index.html +++ b/webui/index.html @@ -40,12 +40,12 @@
PQL
- SetBit(frame=foo, row=0, column=0)
- ClearBit(frame=foo, row=0, column=0)
- SetRowAttrs(frame=foo, row=0, color="blue")
- SetColumnAttrs(frame=foo, column=0, shape="circle")
- Bitmap(frame=foo, row=0)
- Range(frame=foo, row=0, start="2010-01", end="2017-03")
+ SetBit(frame=foo, rowID=0, columnID=0)
+ ClearBit(frame=foo, rowID=0, columnID=0)
+ SetRowAttrs(frame=foo, rowID=0, color="blue")
+ SetColumnAttrs(frame=foo, columnID=0, shape="circle")
+ Bitmap(frame=foo, rowID=0)
+ Range(frame=foo, rowID=0, start="2010-01", end="2017-03")
Count(<BITMAP_CALL>)
TopN([BITMAP_CALL], frame=foo, n=20)
Union([BITMAP_CALL, ...])