ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject [01/12] ignite git commit: Web console beta-7.
Date Fri, 23 Dec 2016 09:34:40 GMT
Repository: ignite
Updated Branches:
  refs/heads/master 1e2469fa8 -> dbc8a0f83


http://git-wip-us.apache.org/repos/asf/ignite/blob/8e7c852b/modules/web-console/frontend/views/sql/sql.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/sql/sql.jade b/modules/web-console/frontend/views/sql/sql.jade
index e3f6461..03015e8 100644
--- a/modules/web-console/frontend/views/sql/sql.jade
+++ b/modules/web-console/frontend/views/sql/sql.jade
@@ -14,6 +14,7 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 
+include /app/helpers/jade/mixins.jade
 include /app/directives/ui-grid-settings/ui-grid-settings.jade
 
 mixin btn-toolbar(btn, click, tip, focusId)
@@ -56,10 +57,15 @@ mixin notebook-rename
             .input-tip
                 input.form-control(ng-model='notebook.editName' required ignite-on-enter='renameNotebook(notebook.editName)'
ignite-on-escape='notebook.edit = false;')
         h1.pull-right
-            a.dropdown-toggle(data-toggle='dropdown' bs-dropdown='scrollParagraphs' data-placement='bottom-right')
Scroll to query
+            a.dropdown-toggle(style='margin-right: 20px' data-toggle='dropdown' bs-dropdown='scrollParagraphs'
data-placement='bottom-right') Scroll to query
                 span.caret
-            .btn-group(style='margin-top: 2px')
-                +btn-toolbar('fa-plus', 'addParagraph()', 'Add new query')
+            button.btn.btn-default(style='margin-top: 2px' ng-click='addQuery()' ignite-on-click-focus=focusId)
+                i.fa.fa-fw.fa-plus
+                | Add query
+
+            button.btn.btn-default(style='margin-top: 2px' ng-click='addScan()' ignite-on-click-focus=focusId)
+                i.fa.fa-fw.fa-plus
+                | Add scan
 
 mixin notebook-error
     h2 Failed to load notebook
@@ -68,7 +74,7 @@ mixin notebook-error
 
 mixin paragraph-rename
     .col-sm-6(ng-hide='paragraph.edit')
-        i.tipLabel.fa(ng-class='paragraphExpanded(paragraph) ? "fa-chevron-circle-down" :
"fa-chevron-circle-right"')
+        i.fa(ng-class='paragraphExpanded(paragraph) ? "fa-chevron-circle-down" : "fa-chevron-circle-right"')
         label {{paragraph.name}}
 
         .btn-group(ng-hide='notebook.paragraphs.length > 1')
@@ -85,51 +91,45 @@ mixin paragraph-rename
             input.form-control(id='paragraph-name-{{paragraph.id}}' ng-model='paragraph.editName'
required ng-click='$event.stopPropagation();' ignite-on-enter='renameParagraph(paragraph,
paragraph.editName)' ignite-on-escape='paragraph.edit = false')
 
 mixin query-settings
-    label.tipLabel Refresh rate:
-        button.btn.btn-default.fa.fa-clock-o.tipLabel(title='Click to show refresh rate dialog'
ng-class='{"btn-info": paragraph.rate && paragraph.rate.installed}' bs-popover data-template-url='/sql/paragraph-rate.html'
data-placement='left' data-auto-close='1' data-trigger='click') {{rateAsString(paragraph)}}
-    label.tipLabel Page size:
-        button.btn.btn-default.select-toggle.tipLabel(ng-model='paragraph.pageSize' bs-options='item
for item in pageSizes' bs-select bs-tooltip data-placement='bottom-right' data-title='Max
number of rows to show in query result as one page')
-    label.margin-left-dflt(title='Fetch first page of results only')
-        input(type='checkbox' ng-model='paragraph.firstPageOnly')
-        span Fetch first page only
-    label.margin-left-dflt(title='Execute query locally on selected node.\nNode selection
dialog will be shown before query execution.')
-        input(type='checkbox' ng-model='paragraph.localQry')
-        span Local query
+    label.tipLabel(bs-tooltip data-placement='bottom' data-title='Configure periodical execution
of last successfully executed query') Refresh rate:
+        button.btn.btn-default.fa.fa-clock-o.tipLabel(ng-class='{"btn-info": paragraph.rate
&& paragraph.rate.installed}' bs-popover data-template-url='/sql/paragraph-rate.html'
data-placement='left' data-auto-close='1' data-trigger='click') {{rateAsString(paragraph)}}
+
+    label.tipLabel(bs-tooltip data-placement='bottom' data-title='Max number of rows to show
in query result as one page') Page size:
+        button.btn.btn-default.select-toggle.tipLabel(ng-model='paragraph.pageSize' bs-select
bs-options='item for item in pageSizes')
+
+    label.tipLabel(bs-tooltip data-placement='bottom' data-title='Limit query max results
to specified number of pages') Max pages:
+        button.btn.btn-default.select-toggle.tipLabel(ng-model='paragraph.maxPages' bs-select
bs-options='item.value as item.label for item in maxPages')
+
+    label.tipLabel(ng-if='nonCollocatedJoinsAvailable(paragraph)' bs-tooltip data-placement='bottom'
data-title='Non-collocated joins is a special mode that allow to join data across cluster
without collocation.<br/>\
+        Nested joins are not supported for now.<br/>\
+        <b>NOTE</b>: In some cases it may consume more heap memory or may take
a long time than collocated joins.' data-trigger='hover')
+        input(type='checkbox' ng-model='paragraph.nonCollocatedJoins')
+        span Allow non-collocated joins
 
 mixin query-actions
-    .btn-group(bs-tooltip='' data-title='{{actionTooltip(paragraph, "execute", true)}}' data-placement='bottom')
-        button.btn.btn-primary(ng-disabled='!actionAvailable(paragraph, true)' ng-click='execute(paragraph)')
Execute
-        button.btn.btn-primary.dropdown-toggle(
-            ng-disabled='!actionAvailable(paragraph, true)'
-            bs-dropdown=''
-            data-container='body'
-            data-placement='bottom-right'
-        )
-            span.caret
-        ul.dropdown-menu(role='menu')
-            li #[a(href='javascript:void(0)' ng-click='execute(paragraph)') Execute]
-            li #[a(href='javascript:void(0)' ng-if='nonCollocatedJoinsAvailable(paragraph)'
ng-click='execute(paragraph, true)') Execute non collocated joins]
-    .btn-group(bs-tooltip='' data-title='{{actionTooltip(paragraph, "execute scan", false)}}'
data-placement='bottom')
-        button.btn.btn-primary(ng-disabled='!actionAvailable(paragraph, false)' ng-click='scan(paragraph)')
Scan
-        button.btn.btn-primary.dropdown-toggle(
-            ng-disabled='!actionAvailable(paragraph, false)'
-            bs-dropdown=''
-            data-container='body'
-            data-placement='bottom-right'
-        )
-            span.caret
-        ul.dropdown-menu(role='menu')
-            li #[a(href='javascript:void(0)' ng-click='scan(paragraph)') Scan]
-            li #[a(href='javascript:void(0)' ng-click='actionAvailable(paragraph, false)
&& scanWithFilter(paragraph)') Scan with filter]
+    button.btn.btn-primary(ng-disabled='!actionAvailable(paragraph, true)' ng-click='execute(paragraph)')
Execute
+    button.btn.btn-primary(ng-disabled='!actionAvailable(paragraph, true)' ng-click='execute(paragraph,
true)') Execute on selected node
+
     a.btn.btn-default(ng-disabled='!actionAvailable(paragraph, true)' ng-click='explain(paragraph)'
data-placement='bottom' bs-tooltip='' data-title='{{actionTooltip(paragraph, "explain", true)}}')
Explain
 
-mixin query-controls
-    .sql-controls
-        +query-actions()
-        .pull-right
-            +query-settings()
+mixin table-result-heading-query
+    .total.row
+        .col-xs-4
+            +ui-grid-settings
+            label Page: #[b {{paragraph.page}}]
+            label.margin-left-dflt Results so far: #[b {{paragraph.rows.length + paragraph.total}}]
+            label.margin-left-dflt Duration: #[b {{paragraph.duration | duration}}]
+        .col-xs-4
+            div(ng-if='paragraph.qryType === "query"')
+                +result-toolbar
+        .col-xs-4
+            .pull-right
+                .btn-group(ng-disabled='paragraph.loading')
+                    button.btn.btn-primary(ng-click='exportCsv(paragraph)' bs-tooltip data-title='{{actionTooltip(paragraph,
"export", false)}}') Export
+                    button.btn.btn-primary.dropdown-toggle(id='export-item-dropdown' data-toggle='dropdown'
data-container='body' bs-dropdown='exportDropdown' data-placement='bottom-right')
+                        span.caret
 
-mixin table-result
+mixin table-result-heading-scan
     .total.row
         .col-xs-4
             +ui-grid-settings
@@ -137,17 +137,16 @@ mixin table-result
             label.margin-left-dflt Results so far: #[b {{paragraph.rows.length + paragraph.total}}]
             label.margin-left-dflt Duration: #[b {{paragraph.duration | duration}}]
         .col-xs-4
-            +result-toolbar
+            div(ng-if='paragraph.qryType === "query"')
+                +result-toolbar
         .col-xs-4
             .pull-right
-                label(style='margin-right: 10px;')
-                    input(type='checkbox' ng-model='paragraph.systemColumns' ng-change='toggleSystemColumns(paragraph)'
ng-disabled='paragraph.disabledSystemColumns')
-                    span Show _KEY, _VAL columns
                 .btn-group(ng-disabled='paragraph.loading')
                     button.btn.btn-primary(ng-click='exportCsv(paragraph)' bs-tooltip data-title='{{actionTooltip(paragraph,
"export", false)}}') Export
                     button.btn.btn-primary.dropdown-toggle(id='export-item-dropdown' data-toggle='dropdown'
data-container='body' bs-dropdown='exportDropdown' data-placement='bottom-right')
                         span.caret
-    
+
+mixin table-result-body
     .grid(ui-grid='paragraph.gridOptions' ui-grid-resize-columns ui-grid-exporter)
 
 mixin chart-result
@@ -166,12 +165,99 @@ mixin chart-result
                 +result-toolbar
         label.margin-top-dflt Charts do not support #[b Explain] and #[b Scan] query
 
+mixin paragraph-scan
+    .panel-heading(bs-collapse-toggle)
+        .row
+            +paragraph-rename
+    .panel-collapse(role='tabpanel' bs-collapse-target)
+        .col-sm-12.sql-controls
+            .col-sm-3
+                +dropdown-required('Cache:', 'paragraph.cacheName', '"cache"', 'true', 'false',
'Choose cache', 'caches')
+            .col-sm-3
+                +text-enabled('Filter:', 'paragraph.filter', '"filter"', true, false, 'Enter
filter')
+                    label.btn.btn-default.ignite-form-field__btn(ng-click='paragraph.caseSensitive
= !paragraph.caseSensitive')
+                        input(type='checkbox' ng-model='paragraph.caseSensitive')
+                        span(bs-tooltip data-title='Select this checkbox for case sensitive
search') Cs
+            label.tipLabel(bs-tooltip data-placement='bottom' data-title='Max number of rows
to show in query result as one page') Page size:
+                button.btn.btn-default.select-toggle.tipLabel(ng-model='paragraph.pageSize'
bs-select bs-options='item for item in pageSizes')
+
+        .col-sm-12.sql-controls
+            button.btn.btn-primary(ng-disabled='!actionAvailable(paragraph, false)' ng-click='scan(paragraph)')
+                | Scan
+            button.btn.btn-primary(ng-disabled='!actionAvailable(paragraph, false)' ng-click='scan(paragraph,
true)')
+                | Scan on selected node
+
+        .col-sm-12.sql-result(ng-if='paragraph.queryExecuted()' ng-switch='paragraph.resultType()')
+            .error(ng-switch-when='error') Error: {{paragraph.errMsg}}
+            .empty(ng-switch-when='empty') Result set is empty
+            .table(ng-switch-when='table')
+                +table-result-heading-scan
+                +table-result-body
+            .footer.clearfix()
+                .pull-left
+                    | Showing results for scan of #[b{{ paragraph.queryArgs.cacheName | defaultName
}}]
+                    span(ng-if='paragraph.queryArgs.filter') &nbsp; with filter: #[b
{{ paragraph.queryArgs.filter }}]
+                    span(ng-if='paragraph.queryArgs.localNid') &nbsp; on node: #[b {{
paragraph.queryArgs.localNid | limitTo:8 }}]
+
+                -var nextVisibleCondition = 'paragraph.resultType() != "error" &&
paragraph.queryId && paragraph.nonRefresh() && (paragraph.table() || paragraph.chart()
&& !paragraph.scanExplain())'
+
+                .pull-right(ng-show='#{nextVisibleCondition}' ng-class='{disabled: paragraph.loading}'
ng-click='!paragraph.loading && nextPage(paragraph)')
+                    i.fa.fa-chevron-circle-right
+                    a Next
+
+mixin paragraph-query
+    .row.panel-heading(bs-collapse-toggle)
+        +paragraph-rename
+    .panel-collapse(role='tabpanel' bs-collapse-target)
+        .col-sm-12
+            .col-xs-8.col-sm-9(style='border-right: 1px solid #eee')
+                .sql-editor(ignite-ace='{onLoad: aceInit(paragraph), theme: "chrome", mode:
"sql", require: ["ace/ext/language_tools"],' +
+                'advanced: {enableSnippets: false, enableBasicAutocompletion: true, enableLiveAutocompletion:
true}}'
+                ng-model='paragraph.query')
+            .col-xs-4.col-sm-3
+                div(ng-show='caches.length > 0' style='padding: 5px 10px' st-table='displayedCaches'
st-safe-src='caches')
+                    lable.labelField.labelFormField Caches:
+                    i.fa.fa-database.tipField(title='Click to show cache types metadata dialog'
bs-popover data-template-url='/sql/cache-metadata.html' data-placement='bottom' data-trigger='click'
data-container='#{{ paragraph.id }}')
+                    .input-tip
+                        input.form-control(type='text' st-search='label' placeholder='Filter
caches...')
+                    table.links
+                        tbody.scrollable-y(style='max-height: 15em; display: block;')
+                            tr(ng-repeat='cache in displayedCaches track by cache.name')
+                                td(style='width: 100%')
+                                    input.labelField(id='cache_{{ [paragraph.id, $index].join("_")
}}' type='radio' value='{{cache.name}}' ng-model='paragraph.cacheName')
+                                    label(for='cache_{{ [paragraph.id, $index].join("_")
}} ' ng-bind-html='cache.label')
+                .empty-caches(ng-show='displayedCaches.length == 0 && caches.length
!= 0')
+                    label Wrong caches filter
+                .empty-caches(ng-show='caches.length == 0')
+                    label No caches
+        .col-sm-12.sql-controls
+            +query-actions
+
+            .pull-right
+                +query-settings
+        .col-sm-12.sql-result(ng-if='paragraph.queryExecuted()' ng-switch='paragraph.resultType()')
+            .error(ng-switch-when='error') Error: {{paragraph.errMsg}}
+            .empty(ng-switch-when='empty') Result set is empty
+            .table(ng-switch-when='table')
+                +table-result-heading-query
+                +table-result-body
+            .chart(ng-switch-when='chart')
+                +chart-result
+            .footer.clearfix
+                a.pull-left(ng-click='showResultQuery(paragraph)') Show query
+
+                -var nextVisibleCondition = 'paragraph.resultType() != "error" &&
paragraph.queryId && paragraph.nonRefresh() && (paragraph.table() || paragraph.chart()
&& !paragraph.scanExplain())'
+
+                .pull-right(ng-show='#{nextVisibleCondition}' ng-class='{disabled: paragraph.loading}'
ng-click='!paragraph.loading && nextPage(paragraph)')
+                    i.fa.fa-chevron-circle-right
+                    a Next
+
 .row(ng-controller='sqlController')
     .docs-content
         .row(ng-if='notebook' bs-affix style='margin-bottom: 20px;')
             +notebook-rename
 
-        ignite-information(data-title='With SQL notebook you can' style='margin-top: 0; margin-bottom:
30px')
+        ignite-information(data-title='With query notebook you can' style='margin-top: 0;
margin-bottom: 30px')
             ul
                 li Create any number of queries
                 li Execute and explain SQL queries
@@ -184,46 +270,9 @@ mixin chart-result
         div(ng-if='notebook' ignite-loading='sqlLoading' ignite-loading-text='{{ loadingText
}}' ignite-loading-position='top')
             .docs-body.paragraphs
                 .panel-group(bs-collapse ng-model='notebook.expandedParagraphs' data-allow-multiple='true'
data-start-collapsed='false')
-                    .panel.panel-default(ng-repeat='paragraph in notebook.paragraphs' id='{{paragraph.id}}')
-                        .panel-heading(bs-collapse-toggle)
-                            .row
-                                +paragraph-rename
-                        .panel-collapse(role='tabpanel' bs-collapse-target)
-                            .col-sm-12
-                                .col-xs-8.col-sm-9(style='border-right: 1px solid #eee')
-                                    .sql-editor(ignite-ace='{onLoad: aceInit(paragraph),
theme: "chrome", mode: "sql", require: ["ace/ext/language_tools"],' +
-                                    'advanced: {enableSnippets: false, enableBasicAutocompletion:
true, enableLiveAutocompletion: true}}'
-                                    ng-model='paragraph.query')
-                                .col-xs-4.col-sm-3
-                                    div(ng-show='caches.length > 0' style='padding: 5px
10px' st-table='displayedCaches' st-safe-src='caches')
-                                        lable.labelField.labelFormField Caches:
-                                        i.fa.fa-database.tipField(title='Click to show cache
types metadata dialog' bs-popover data-template-url='/sql/cache-metadata.html' data-placement='bottom'
data-trigger='click' data-container='#{{ paragraph.id }}')
-                                        .input-tip
-                                            input.form-control(type='text' st-search='label'
placeholder='Filter caches...')
-                                        table.links
-                                            tbody.scrollable-y(style='max-height: 15em; display:
block;')
-                                                tr(ng-repeat='cache in displayedCaches track
by cache.name')
-                                                    td(style='width: 100%')
-                                                        input.labelField(id='cache_{{ [paragraph.id,
$index].join("_") }}' type='radio' value='{{cache.name}}' ng-model='paragraph.cacheName')
-                                                        label(for='cache_{{ [paragraph.id,
$index].join("_") }} ' ng-bind='cache.label')
-                                    .empty-caches(ng-show='displayedCaches.length == 0 &&
caches.length != 0')
-                                        label Wrong caches filter
-                                    .empty-caches(ng-show='caches.length == 0')
-                                        label No caches
-                            .col-sm-12
-                                +query-controls
-                            .col-sm-12.sql-result(ng-if='paragraph.queryExecuted()' ng-switch='paragraph.resultType()')
-                                .error(ng-switch-when='error') Error: {{paragraph.errMsg}}
-                                .empty(ng-switch-when='empty') Result set is empty
-                                .table(ng-switch-when='table')
-                                    +table-result
-                                .chart(ng-switch-when='chart')
-                                    +chart-result
-                                .footer.clearfix
-                                    a.pull-left(ng-click='showResultQuery(paragraph)') Show
query
-
-                                    -var nextVisibleCondition = 'paragraph.resultType() !=
"error" && paragraph.queryId && paragraph.nonRefresh() && (paragraph.table()
|| paragraph.chart() && !paragraph.scanExplain())'
-
-                                    .pull-right(ng-show=nextVisibleCondition ng-class='{disabled:
paragraph.loading}' ng-click='!paragraph.loading && nextPage(paragraph)')
-                                        i.fa.fa-chevron-circle-right
-                                        a Next
+
+                    .panel-paragraph(ng-repeat='paragraph in notebook.paragraphs' id='{{paragraph.id}}'
ng-form='form_{{paragraph.id}}')
+                        .panel.panel-default(ng-if='paragraph.qryType === "scan"')
+                            +paragraph-scan
+                        .panel.panel-default(ng-if='paragraph.qryType === "query"')
+                            +paragraph-query

http://git-wip-us.apache.org/repos/asf/ignite/blob/8e7c852b/modules/web-console/frontend/views/templates/alert.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/templates/alert.jade b/modules/web-console/frontend/views/templates/alert.jade
index 182ba99..d30d2fd 100644
--- a/modules/web-console/frontend/views/templates/alert.jade
+++ b/modules/web-console/frontend/views/templates/alert.jade
@@ -16,6 +16,6 @@
 
 .alert(ng-show='type' ng-class='[type ? "alert-" + type : null]')
     button.close(type='button', ng-if='dismissable', ng-click='$hide()') &times;
-    i.alert-icon.fa(ng-if='icon' ng-class='[icon]')
+    i.alert-icon(ng-if='icon' ng-class='[icon]')
     span.alert-title(ng-bind-html='title')
     span.alert-content(ng-bind-html='content')

http://git-wip-us.apache.org/repos/asf/ignite/blob/8e7c852b/modules/web-console/frontend/views/templates/select.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/templates/select.jade b/modules/web-console/frontend/views/templates/select.jade
index 5b6cc01..aa6a2ef 100644
--- a/modules/web-console/frontend/views/templates/select.jade
+++ b/modules/web-console/frontend/views/templates/select.jade
@@ -23,4 +23,4 @@ ul.select.dropdown-menu(tabindex='-1' ng-show='$isVisible()' role='select')
         hr(ng-if='match.value == undefined' style='margin: 5px 0')
         a(id='li-dropdown-item-{{$index}}'  role='menuitem' tabindex='-1' ng-class='{active:
$isActive($index)}' ng-click='$select($index, $event)' bs-tooltip='widthIsSufficient &&
!widthIsSufficient("li-dropdown-item-{{$index}}", $index, match.label) ? match.label : ""'
data-placement='right auto')
             i(class='{{$iconCheckmark}}' ng-if='$isActive($index)' ng-class='{active: $isActive($index)}')
-            span(ng-bind='match.label')
+            span(ng-bind-html='match.label')


Mime
View raw message