http://git-wip-us.apache.org/repos/asf/ignite/blob/fb26835f/modules/web-console/frontend/app/components/page-configure/components/pc-form-field-size/controller.js ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-configure/components/pc-form-field-size/controller.js b/modules/web-console/frontend/app/components/page-configure/components/pc-form-field-size/controller.js deleted file mode 100644 index 0d751e8..0000000 --- a/modules/web-console/frontend/app/components/page-configure/components/pc-form-field-size/controller.js +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import get from 'lodash/get'; - -export default class PCFormFieldSizeController { - /** @type {ng.INgModelController} */ - ngModel; - /** @type {number} */ - min; - /** @type {number} */ - max; - /** @type {ng.ICompiledExpression} */ - onScaleChange; - /** @type {ng.IFormController} */ - innerForm; - - static $inject = ['$element', '$attrs']; - - /** @type {ig.config.formFieldSize.ISizeTypes} */ - static sizeTypes = { - bytes: [ - {label: 'Kb', value: 1024}, - {label: 'Mb', value: 1024 * 1024}, - {label: 'Gb', value: 1024 * 1024 * 1024} - ], - seconds: [ - {label: 'ns', value: 1 / 1000}, - {label: 'ms', value: 1}, - {label: 's', value: 1000} - ] - }; - - /** - * @param {JQLite} $element - * @param {ng.IAttributes} $attrs - */ - constructor($element, $attrs) { - this.$element = $element; - this.$attrs = $attrs; - this.id = Math.random(); - } - - $onDestroy() { - this.$element = null; - } - - $onInit() { - if (!this.min) this.min = 0; - if (!this.sizesMenu) this.setDefaultSizeType(); - this.$element.addClass('ignite-form-field'); - this.ngModel.$render = () => this.assignValue(this.ngModel.$viewValue); - } - - $postLink() { - if ('min' in this.$attrs) - this.ngModel.$validators.min = (value) => this.ngModel.$isEmpty(value) || value === void 0 || value >= this.min; - if ('max' in this.$attrs) - this.ngModel.$validators.max = (value) => this.ngModel.$isEmpty(value) || value === void 0 || value <= this.max; - - this.ngModel.$validators.step = (value) => this.ngModel.$isEmpty(value) || value === void 0 || Math.floor(value) === value; - } - - $onChanges(changes) { - if ('sizeType' in changes) { - this.sizesMenu = PCFormFieldSizeController.sizeTypes[changes.sizeType.currentValue]; - this.sizeScale = this.chooseSizeScale(get(changes, 'sizeScaleLabel.currentValue')); - } - if (!this.sizesMenu) this.setDefaultSizeType(); - if ('sizeScaleLabel' in changes) - this.sizeScale = this.chooseSizeScale(changes.sizeScaleLabel.currentValue); - - if ('min' in changes) this.ngModel.$validate(); - } - - /** - * @param {ig.config.formFieldSize.ISizeTypeOption} value - */ - set sizeScale(value) { - this._sizeScale = value; - if (this.onScaleChange) this.onScaleChange({$event: this.sizeScale}); - if (this.ngModel) this.assignValue(this.ngModel.$viewValue); - } - - get sizeScale() { - return this._sizeScale; - } - - /** - * @param {number} rawValue - */ - assignValue(rawValue) { - if (!this.sizesMenu) this.setDefaultSizeType(); - return this.value = rawValue - ? rawValue / this.sizeScale.value - : rawValue; - } - - onValueChange() { - this.ngModel.$setViewValue(this.value ? this.value * this.sizeScale.value : this.value); - } - - _defaultLabel() { - if (!this.sizesMenu) - return; - - return this.sizesMenu[1].label; - } - - chooseSizeScale(label = this._defaultLabel()) { - if (!label) - return; - - return this.sizesMenu.find((option) => option.label.toLowerCase() === label.toLowerCase()); - } - - setDefaultSizeType() { - this.sizesMenu = PCFormFieldSizeController.sizeTypes.bytes; - this.sizeScale = this.chooseSizeScale(); - } -}
http://git-wip-us.apache.org/repos/asf/ignite/blob/fb26835f/modules/web-console/frontend/app/components/page-configure/components/pc-form-field-size/index.js ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-configure/components/pc-form-field-size/index.js b/modules/web-console/frontend/app/components/page-configure/components/pc-form-field-size/index.js deleted file mode 100644 index 1fdc379..0000000 --- a/modules/web-console/frontend/app/components/page-configure/components/pc-form-field-size/index.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import angular from 'angular'; -import component from './component'; - -export default angular - .module('ignite-console.page-configure.form-field-size', []) - .component('pcFormFieldSize', component); http://git-wip-us.apache.org/repos/asf/ignite/blob/fb26835f/modules/web-console/frontend/app/components/page-configure/components/pc-form-field-size/style.scss ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-configure/components/pc-form-field-size/style.scss b/modules/web-console/frontend/app/components/page-configure/components/pc-form-field-size/style.scss deleted file mode 100644 index 737b2a0..0000000 --- a/modules/web-console/frontend/app/components/page-configure/components/pc-form-field-size/style.scss +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -pc-form-field-size { - @import "./../../../../../public/stylesheets/variables.scss"; - - .input-tip { - display: flex; - flex-direction: row; - - .form-control { - border-top-right-radius: 0; - border-bottom-right-radius: 0; - } - - input { - border-top-right-radius: 0 !important; - border-bottom-right-radius: 0 !important; - min-width: 0; - } - - .btn-ignite { - border-top-left-radius: 0 !important; - border-bottom-left-radius: 0 !important; - flex: 0 0 auto; - width: 60px !important; - line-height: initial !important; - } - } - - &.ng-invalid:not(.ng-pristine), - &.ng-invalid.ng-touched { - input, .btn-ignite { - border-color: $ignite-brand-primary !important; - box-shadow: inset 0 1px 3px 0 rgba($ignite-brand-primary, .5) !important; - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/fb26835f/modules/web-console/frontend/app/components/page-configure/components/pc-form-field-size/template.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-configure/components/pc-form-field-size/template.pug b/modules/web-console/frontend/app/components/page-configure/components/pc-form-field-size/template.pug deleted file mode 100644 index de62d35..0000000 --- a/modules/web-console/frontend/app/components/page-configure/components/pc-form-field-size/template.pug +++ /dev/null @@ -1,61 +0,0 @@ -//- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -include /app/helpers/jade/mixins - -+ignite-form-field__label('{{ ::$ctrl.label }}', '$ctrl.id', '$ctrl.required', '$ctrl.ngDisabled') - span(ng-if='::$ctrl.tip') - +tooltip('{{::$ctrl.tip}}') -.ignite-form-field__control(ng-form='$ctrl.innerForm') - .input-tip - input.form-control( - type='number' - id='{{::$ctrl.id}}Input' - ng-model='$ctrl.value' - ng-model-options='{allowInvalid: true}' - ng-change='$ctrl.onValueChange()' - name='numberInput' - placeholder='{{$ctrl.placeholder}}' - min='{{ $ctrl.min ? $ctrl.min / $ctrl.sizeScale.value : "" }}' - max='{{ $ctrl.max ? $ctrl.max / $ctrl.sizeScale.value : "" }}' - ng-required='$ctrl.required' - ng-disabled='$ctrl.ngDisabled' - ) - button.btn-ignite.btn-ignite--secondary( - bs-select - bs-options='size as size.label for size in $ctrl.sizesMenu' - ng-model='$ctrl.sizeScale' - protect-from-bs-select-render - ng-disabled='$ctrl.ngDisabled' - type='button' - ) - | {{ $ctrl.sizeScale.label }} - span.fa.fa-caret-down.icon-right -.ignite-form-field__errors( - ng-messages='$ctrl.ngModel.$error' - ng-show=`($ctrl.ngModel.$dirty || $ctrl.ngModel.$touched || $ctrl.ngModel.$submitted) && $ctrl.ngModel.$invalid` -) - div(ng-transclude) - div(ng-message='required') - | This field could not be empty - div(ng-message='min') - | Value is less than allowable minimum: {{ $ctrl.min/$ctrl.sizeScale.value }} {{$ctrl.sizeScale.label}} - div(ng-message='max') - | Value is more than allowable maximum: {{ $ctrl.max/$ctrl.sizeScale.value }} {{$ctrl.sizeScale.label}} - div(ng-message='number') - | Only numbers allowed - div(ng-message='step') - | Invalid step \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/fb26835f/modules/web-console/frontend/app/components/page-configure/components/pc-items-table/style.scss ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-configure/components/pc-items-table/style.scss b/modules/web-console/frontend/app/components/page-configure/components/pc-items-table/style.scss index 227f23c..2147714 100644 --- a/modules/web-console/frontend/app/components/page-configure/components/pc-items-table/style.scss +++ b/modules/web-console/frontend/app/components/page-configure/components/pc-items-table/style.scss @@ -24,9 +24,6 @@ pc-items-table { display: flex; flex-direction: row; } - .ui-grid-settings--heading { - flex: 1; - } // Removes unwanted box-shadow and border-right from checkboxes column .ui-grid.ui-grid--ignite .ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-render-container-left:before { http://git-wip-us.apache.org/repos/asf/ignite/blob/fb26835f/modules/web-console/frontend/app/components/page-configure/components/pc-items-table/template.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-configure/components/pc-items-table/template.pug b/modules/web-console/frontend/app/components/page-configure/components/pc-items-table/template.pug index 0dbb760..dbc7202 100644 --- a/modules/web-console/frontend/app/components/page-configure/components/pc-items-table/template.pug +++ b/modules/web-console/frontend/app/components/page-configure/components/pc-items-table/template.pug @@ -17,25 +17,23 @@ include /app/helpers/jade/mixins .panel--ignite - .panel-heading.ui-grid-settings.ui-grid-ignite__panel(ng-if='!$ctrl.hideHeader') - .panel-title - .pc-items-table__table-name.ng-animate-disabled( - ng-hide='$ctrl.gridAPI.selection.getSelectedCount()' - ) - | {{ $ctrl.tableTitle }} - grid-column-selector(grid-api='$ctrl.gridAPI') - .pc-items-table__selection-count.ng-animate-disabled( - ng-show='$ctrl.gridAPI.selection.getSelectedCount()' - ) - i {{ $ctrl.gridAPI.selection.getSelectedCount() }} of {{ $ctrl.items.length }} selected - .pco-clusters-table__actions-button - +ignite-form-field-bsdropdown({ - label: 'Actions', - name: 'action', - disabled: '!$ctrl.gridAPI.selection.getSelectedCount()', - required: false, - options: '$ctrl.actionsMenu' - }) + header.header-with-selector(ng-if='!$ctrl.hideHeader') + div(ng-hide='$ctrl.gridAPI.selection.getSelectedCount()') + span {{ $ctrl.tableTitle }} + grid-column-selector(grid-api='$ctrl.gridAPI') + + div(ng-show='$ctrl.gridAPI.selection.getSelectedCount()') + grid-item-selected(grid-api='$ctrl.gridAPI') + + div + +ignite-form-field-bsdropdown({ + label: 'Actions', + name: 'action', + disabled: '!$ctrl.gridAPI.selection.getSelectedCount()', + required: false, + options: '$ctrl.actionsMenu' + }) + .grid.ui-grid--ignite( ui-grid='$ctrl.grid' ui-grid-selection http://git-wip-us.apache.org/repos/asf/ignite/blob/fb26835f/modules/web-console/frontend/app/components/page-configure/index.js ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-configure/index.js b/modules/web-console/frontend/app/components/page-configure/index.js index 9beea7a..6dee704 100644 --- a/modules/web-console/frontend/app/components/page-configure/index.js +++ b/modules/web-console/frontend/app/components/page-configure/index.js @@ -36,7 +36,6 @@ import effects from './store/effects'; import projectStructurePreview from './components/modal-preview-project'; import itemsTable from './components/pc-items-table'; import pcUiGridFilters from './components/pc-ui-grid-filters'; -import pcFormFieldSize from './components/pc-form-field-size'; import isInCollection from './components/pcIsInCollection'; import pcValidation from './components/pcValidation'; import fakeUiCanExit from './components/fakeUICanExit'; @@ -99,7 +98,6 @@ export default angular 'ui.router', 'asyncFilter', uiValidate, - pcFormFieldSize.name, pcUiGridFilters.name, projectStructurePreview.name, itemsTable.name, http://git-wip-us.apache.org/repos/asf/ignite/blob/fb26835f/modules/web-console/frontend/app/components/page-configure/style.scss ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-configure/style.scss b/modules/web-console/frontend/app/components/page-configure/style.scss index 36ae752..be19e8a 100644 --- a/modules/web-console/frontend/app/components/page-configure/style.scss +++ b/modules/web-console/frontend/app/components/page-configure/style.scss @@ -130,30 +130,15 @@ page-configure { background: var(--pc-form-group-title-bg-color); } - &>.form-field-checkbox .ignite-form-field__control { - & > span { - position: relative; - - &:after { - content: ''; - display: block; - position: absolute; - background-color: var(--pc-form-group-title-bg-color); - z-index: -1; - top: 0; - bottom: 0; - left: -26px; - right: -5px; - } - } - [ignite-icon] { - background-color: var(--pc-form-group-title-bg-color); - } - } - &+.pc-form-group { padding-top: 10px; } + + .form-field__checkbox { + background-color: white; + padding: 0 5px; + margin: 0 -5px; + } } .pc-form-grid-row > .pc-form-group__text-title[class*='pc-form-grid-col-'] { http://git-wip-us.apache.org/repos/asf/ignite/blob/fb26835f/modules/web-console/frontend/app/components/page-configure/template.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-configure/template.pug b/modules/web-console/frontend/app/components/page-configure/template.pug index bd299be..86180fa 100644 --- a/modules/web-console/frontend/app/components/page-configure/template.pug +++ b/modules/web-console/frontend/app/components/page-configure/template.pug @@ -39,7 +39,7 @@ div.pc-content-container input(type='checkbox' ng-model='$ctrl.tooltipsVisible') div - ui-view.theme--ignite( + ui-view.theme--ignite.theme--ignite-errors-horizontal( ignite-loading='configuration' ignite-loading-text='{{ $ctrl.loadingText }}' ignite-loading-position='top' http://git-wip-us.apache.org/repos/asf/ignite/blob/fb26835f/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.js ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.js b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.js index c887f4d..5ba7a27 100644 --- a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.js +++ b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.js @@ -283,7 +283,15 @@ export class NotebookCtrl { $scope.caches = []; - $scope.pageSizes = [50, 100, 200, 400, 800, 1000]; + $scope.pageSizesOptions = [ + {value: 50, label: '50'}, + {value: 100, label: '100'}, + {value: 200, label: '200'}, + {value: 400, label: '400'}, + {value: 800, label: '800'}, + {value: 1000, label: '1000'} + ]; + $scope.maxPages = [ {label: 'Unlimited', value: 0}, {label: '1', value: 1}, @@ -1048,7 +1056,7 @@ export class NotebookCtrl { const paragraph = _newParagraph({ name: 'Query' + (sz === 0 ? '' : sz), query: '', - pageSize: $scope.pageSizes[1], + pageSize: $scope.pageSizesOptions[1].value, timeLineSpan: $scope.timeLineSpans[0], result: 'none', rate: { @@ -1077,7 +1085,7 @@ export class NotebookCtrl { const paragraph = _newParagraph({ name: 'Scan' + (sz === 0 ? '' : sz), query: '', - pageSize: $scope.pageSizes[1], + pageSize: $scope.pageSizesOptions[1].value, timeLineSpan: $scope.timeLineSpans[0], result: 'none', rate: { http://git-wip-us.apache.org/repos/asf/ignite/blob/fb26835f/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/style.scss ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/style.scss b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/style.scss index a5fd50a..a687d75 100644 --- a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/style.scss +++ b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/style.scss @@ -121,4 +121,24 @@ queries-notebook { .btn.btn-default.select-toggle.tipLabel { padding-right: 25px; } + + .form-field__sensitive { + input[type='checkbox'] { + height: 0; + } + + input:checked + span { + color: #0067b9; + } + } + + .queries-notebook-displayed-caches { + max-height: 210px; + padding: 0 5px; + margin-top: 10px; + margin-left: -5px; + margin-right: -5px; + + overflow-y: auto; + } } http://git-wip-us.apache.org/repos/asf/ignite/blob/fb26835f/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/template.tpl.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/template.tpl.pug b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/template.tpl.pug index 713f83e..9ae56d0 100644 --- a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/template.tpl.pug +++ b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/template.tpl.pug @@ -16,6 +16,24 @@ include /app/helpers/jade/mixins +mixin form-field__sensitive({ label, modelFilter, modelSensitive, name, placeholder }) + .form-field.form-field__sensitive.ignite-form-field + +form-field__label({ label, name }) + +form-field__tooltip({ title: 'You can set case sensitive search' }) + .form-field__control.form-field__control-group + +form-field__input({ name, model: modelFilter, placeholder })( + type='text' + ) + label.btn-ignite.btn-ignite--secondary + +form-field__input({ name: `${ name } + "Sensitive"`, model: modelSensitive, placeholder })( + type='checkbox' + ) + span Cs + .form-field__errors( + ng-messages=`$input.$error` + ng-show=`($input.$dirty || $input.$touched || $input.$submitted) && $input.$invalid` + ) + mixin btn-toolbar(btn, click, tip, focusId) i.btn.btn-default.fa(class=btn ng-click=click bs-tooltip='' data-title=tip ignite-on-click-focus=focusId data-trigger='hover' data-placement='bottom') @@ -72,59 +90,120 @@ 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 - .panel-top-align - 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='{{ $ctrl.paragraphRateTemplateUrl }}' 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') - - .panel-tip-container - .row(ng-if='nonCollocatedJoinsAvailable(paragraph)') - label.tipLabel(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 - .row(ng-if='collocatedJoinsAvailable(paragraph)') - label.tipLabel(bs-tooltip data-placement='bottom' data-title='Used For Optimization Purposes Of Queries With GROUP BY Statements.<br/>\ - <b>NOTE:</b> Whenever Ignite executes a distributed query, it sends sub-queries to individual cluster members.<br/>\ - If you know in advance that the elements of your query selection are collocated together on the same node\ - and you group by collocated key (primary or affinity key), then Ignite can make significant performance and\ - network optimizations by grouping data on remote nodes.' data-trigger='hover') - input(type='checkbox' ng-model='paragraph.collocated') - span Collocated Query - .row(ng-if='enforceJoinOrderAvailable(paragraph)') - label.tipLabel(bs-tooltip data-placement='bottom' data-title='Enforce join order of tables in the query.<br/>\ - If <b>set</b>, then query optimizer will not reorder tables within join.<br/>\ - <b>NOTE:</b> It is not recommended to enable this property unless you have verified that\ - indexes are not selected in optimal order.' data-trigger='hover') - input(type='checkbox' ng-model='paragraph.enforceJoinOrder') - span Enforce join order - .row(ng-if='lazyQueryAvailable(paragraph)') - label.tipLabel(bs-tooltip data-placement='bottom' data-title='By default Ignite attempts to fetch the whole query result set to memory and send it to the client.<br/>\ - For small and medium result sets this provides optimal performance and minimize duration of internal database locks, thus increasing concurrency.<br/>\ - If result set is too big to fit in available memory this could lead to excessive GC pauses and even OutOfMemoryError.<br/>\ - Use this flag as a hint for Ignite to fetch result set lazily, thus minimizing memory consumption at the cost of moderate performance hit.' data-trigger='hover') - input(type='checkbox' ng-model='paragraph.lazy') - span Lazy result set + div + .form-field--inline( + bs-tooltip + data-placement='top' + data-title='Max number of rows to show in query result as one page' + ) + +form-field__dropdown({ + label: 'Rows per page:', + model: 'paragraph.pageSize', + name: '"pageSize" + paragraph.id', + options: 'pageSizesOptions' + }) + + .form-field--inline( + bs-tooltip + data-placement='top' + data-title='Limit query max results to specified number of pages' + ) + +form-field__dropdown({ + label: 'Max pages:', + model: 'paragraph.maxPages', + name: '"maxPages" + paragraph.id', + options: 'maxPages' + }) + + .form-field--inline( + bs-tooltip + data-placement='bottom' + data-title='Configure periodical execution of last successfully executed query' + ) + button.btn-ignite-group( + bs-popover + data-template-url='{{ $ctrl.paragraphRateTemplateUrl }}' + data-placement='bottom-right' + data-auto-close='1' + data-trigger='click' + ) + .btn-ignite( + ng-class='{\ + "btn-ignite--primary": paragraph.rate && paragraph.rate.installed,\ + "btn-ignite--secondary": !(paragraph.rate && paragraph.rate.installed),\ + }' + ) + svg(ignite-icon='clock') + | {{ rateAsString(paragraph) }} + .btn-ignite( + ng-class='{\ + "btn-ignite--primary": paragraph.rate && paragraph.rate.installed,\ + "btn-ignite--secondary": !(paragraph.rate && paragraph.rate.installed),\ + }' + ) + span.icon.fa.fa-caret-down + div + .row(ng-if='nonCollocatedJoinsAvailable(paragraph)') + +form-field__checkbox({ + label: 'Allow non-collocated joins', + model: 'paragraph.nonCollocatedJoins', + name: '"nonCollocatedJoins" + paragraph.id', + tip: '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.', + tipOpts: { placement: 'top' } + }) + + .row(ng-if='collocatedJoinsAvailable(paragraph)') + +form-field__checkbox({ + label: 'Collocated Query', + model: 'paragraph.collocated', + name: '"collocated" + paragraph.id', + tip: 'Used For Optimization Purposes Of Queries With GROUP BY Statements.<br/>\ + <b>NOTE:</b> Whenever Ignite executes a distributed query, it sends sub-queries to individual cluster members.<br/>\ + If you know in advance that the elements of your query selection are collocated together on the same node\ + and you group by collocated key (primary or affinity key), then Ignite can make significant performance and\ + network optimizations by grouping data on remote nodes.', + tipOpts: { placement: 'top' } + }) + + .row(ng-if='enforceJoinOrderAvailable(paragraph)') + +form-field__checkbox({ + label: 'Enforce join order', + model: 'paragraph.enforceJoinOrder', + name: '"enforceJoinOrder" + paragraph.id', + tip: 'Enforce join order of tables in the query.<br/>\ + If <b>set</b>, then query optimizer will not reorder tables within join.<br/>\ + <b>NOTE:</b> It is not recommended to enable this property unless you have verified that\ + indexes are not selected in optimal order.', + tipOpts: { placement: 'top' } + }) + + .row(ng-if='lazyQueryAvailable(paragraph)') + +form-field__checkbox({ + label: 'Lazy result set', + model: 'paragraph.lazy', + name: '"lazy" + paragraph.id', + tip: 'By default Ignite attempts to fetch the whole query result set to memory and send it to the client.<br/>\ + For small and medium result sets this provides optimal performance and minimize duration of internal database locks, thus increasing concurrency.<br/>\ + If result set is too big to fit in available memory this could lead to excessive GC pauses and even OutOfMemoryError.<br/>\ + Use this flag as a hint for Ignite to fetch result set lazily, thus minimizing memory consumption at the cost of moderate performance hit.', + tipOpts: { placement: 'top' } + }) mixin query-actions - button.btn.btn-primary(ng-disabled='!queryAvailable(paragraph)' ng-click='execute(paragraph)') - div - i.fa.fa-fw.fa-play(ng-hide='paragraph.executionInProgress(false)') - i.fa.fa-fw.fa-refresh.fa-spin(ng-show='paragraph.executionInProgress(false)') - span.tipLabelExecute Execute - button.btn.btn-primary(ng-disabled='!queryAvailable(paragraph)' ng-click='execute(paragraph, true)') - div - i.fa.fa-fw.fa-play(ng-hide='paragraph.executionInProgress(true)') - i.fa.fa-fw.fa-refresh.fa-spin(ng-show='paragraph.executionInProgress(true)') - span.tipLabelExecute Execute on selected node - - a.btn.btn-default(ng-disabled='!queryAvailable(paragraph)' ng-click='explain(paragraph)' data-placement='bottom' bs-tooltip='' data-title='{{queryTooltip(paragraph, "explain query")}}') Explain + button.btn-ignite.btn-ignite--primary(ng-disabled='!queryAvailable(paragraph)' ng-click='execute(paragraph)') + span.icon-left.fa.fa-fw.fa-play(ng-hide='paragraph.executionInProgress(false)') + span.icon-left.fa.fa-fw.fa-refresh.fa-spin(ng-show='paragraph.executionInProgress(false)') + | Execute + + button.btn-ignite.btn-ignite--primary(ng-disabled='!queryAvailable(paragraph)' ng-click='execute(paragraph, true)') + span.icon-left.fa.fa-fw.fa-play(ng-hide='paragraph.executionInProgress(true)') + span.icon-left.fa.fa-fw.fa-refresh.fa-spin(ng-show='paragraph.executionInProgress(true)') + | Execute on selected node + + button.btn-ignite.btn-ignite--secondary(ng-disabled='!queryAvailable(paragraph)' ng-click='explain(paragraph)' data-placement='bottom' bs-tooltip='' data-title='{{queryTooltip(paragraph, "explain query")}}') + | Explain mixin table-result-heading-query .total.row @@ -243,24 +322,36 @@ mixin paragraph-scan .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') + +form-field__sensitive({ + label: 'Filter:', + modelFilter: 'paragraph.filter', + modelSensitive: 'paragraph.caseSensitive', + name: '"filter"', + placeholder: 'Enter filter' + }) - .col-sm-12.sql-controls - button.btn.btn-primary(ng-disabled='!scanAvailable(paragraph)' ng-click='scan(paragraph)') - div - i.fa.fa-fw.fa-play(ng-hide='paragraph.checkScanInProgress(false)') - i.fa.fa-fw.fa-refresh.fa-spin(ng-show='paragraph.checkScanInProgress(false)') - span.tipLabelExecute Scan + .col-sm-3 + +form-field__dropdown({ + label: 'Rows per page:', + model: 'paragraph.pageSize', + name: '"pageSize" + paragraph.id', + options: 'pageSizesOptions', + tip: 'Max number of rows to show in query result as one page', + tipOpts: { placement: 'top' } + }) - button.btn.btn-primary(ng-disabled='!scanAvailable(paragraph)' ng-click='scan(paragraph, true)') - i.fa.fa-fw.fa-play(ng-hide='paragraph.checkScanInProgress(true)') - i.fa.fa-fw.fa-refresh.fa-spin(ng-show='paragraph.checkScanInProgress(true)') - span.tipLabelExecute Scan on selected node + .col-sm-12.sql-controls + div + button.btn-ignite.btn-ignite--primary(ng-disabled='!scanAvailable(paragraph)' ng-click='scan(paragraph)') + span.icon-left.fa.fa-fw.fa-play(ng-hide='paragraph.checkScanInProgress(false)') + span.icon-left.fa.fa-fw.fa-refresh.fa-spin(ng-show='paragraph.checkScanInProgress(false)') + | Scan + + button.btn-ignite.btn-ignite--primary(ng-disabled='!scanAvailable(paragraph)' ng-click='scan(paragraph, true)') + span.icon-left.fa.fa-fw.fa-play(ng-hide='paragraph.checkScanInProgress(true)') + span.icon-left.fa.fa-fw.fa-refresh.fa-spin(ng-show='paragraph.checkScanInProgress(true)') + | Scan on selected node + div .col-sm-12.sql-result(ng-if='paragraph.queryExecuted() && !paragraph.scanningInProgress' ng-switch='paragraph.resultType()') .error(ng-switch-when='error') Error: {{paragraph.error.message}} @@ -295,31 +386,36 @@ mixin paragraph-query i.fa.fa-database.tipField(title='Click to show cache types metadata dialog' bs-popover data-template-url='{{ $ctrl.cacheMetadataTemplateUrl }}' data-placement='bottom-right' 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') + + .queries-notebook-displayed-caches + div(ng-repeat='cache in displayedCaches track by cache.name') + +form-field__radio({ + label: '{{ cache.label }}', + model: 'paragraph.cacheName', + name: '"cache_" + [paragraph.id, $index].join("_")', + value: 'cache.name' + }) + .settings-row .row(ng-if='ddlAvailable(paragraph)') - label.tipLabel.use-cache(bs-tooltip data-placement='bottom' - data-title= - 'Use selected cache as default schema name.<br/>\ + +form-field__checkbox({ + label: 'Use selected cache as default schema name', + model: 'paragraph.useAsDefaultSchema', + name: '"useAsDefaultSchema" + paragraph.id', + tip: 'Use selected cache as default schema name.<br/>\ This will allow to execute query on specified cache without specify schema name.<br/>\ - <b>NOTE:</b> In future version of Ignite this feature will be removed.' - data-trigger='hover') - input(type='checkbox' ng-model='paragraph.useAsDefaultSchema') - span Use selected cache as default schema name + <b>NOTE:</b> In future version of Ignite this feature will be removed.', + tipOpts: { placement: 'top' } + }) .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 + div + +query-actions - .pull-right - +query-settings + +query-settings .col-sm-12.sql-result(ng-if='paragraph.queryExecuted()' ng-switch='paragraph.resultType()') .error(ng-switch-when='error') label Error: {{paragraph.error.message}} http://git-wip-us.apache.org/repos/asf/ignite/blob/fb26835f/modules/web-console/frontend/app/components/page-queries/components/queries-notebooks-list/template.tpl.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-queries/components/queries-notebooks-list/template.tpl.pug b/modules/web-console/frontend/app/components/page-queries/components/queries-notebooks-list/template.tpl.pug index 614a6a6..b5c5a7b 100644 --- a/modules/web-console/frontend/app/components/page-queries/components/queries-notebooks-list/template.tpl.pug +++ b/modules/web-console/frontend/app/components/page-queries/components/queries-notebooks-list/template.tpl.pug @@ -27,22 +27,19 @@ page-queries-slot(slot-name="'queriesButtons'" ng-if="!$root.IgniteDemoMode") .queries-notebooks-list .panel--ignite - .panel-heading.ui-grid-settings.ui-grid-ignite__panel - .panel-title - div(ng-if="!$root.IgniteDemoMode") - +ignite-form-field-bsdropdown({ - label: 'Actions', - model: '$ctrl.action', - name: 'action', - disabled: '$ctrl.gridApi.selection.legacyGetSelectedRows().length === 0', - required: false, - options: '$ctrl.actionOptions' - }) - - .ui-grid-settings--heading - span Notebooks - - + header.header-with-selector + div + span Notebooks + + div(ng-if="!$root.IgniteDemoMode") + +ignite-form-field-bsdropdown({ + label: 'Actions', + model: '$ctrl.action', + name: 'action', + disabled: '$ctrl.gridApi.selection.legacyGetSelectedRows().length === 0', + required: false, + options: '$ctrl.actionOptions' + }) .panel-collapse(ignite-loading='notebooksLoading' ignite-loading-text='Loading notebooks...') .grid.ui-grid--ignite#queriesNotebooksList(ui-grid='$ctrl.gridOptions' ui-grid-resize-columns ui-grid-selection ui-grid-hovering) http://git-wip-us.apache.org/repos/asf/ignite/blob/fb26835f/modules/web-console/frontend/app/components/page-queries/style.scss ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-queries/style.scss b/modules/web-console/frontend/app/components/page-queries/style.scss index 8f13c2e..818fb1c 100644 --- a/modules/web-console/frontend/app/components/page-queries/style.scss +++ b/modules/web-console/frontend/app/components/page-queries/style.scss @@ -18,3 +18,7 @@ button.select-toggle.btn-chart-column-agg-fx::after { right: 0; } + +.sql-controls { + flex-wrap: wrap; +} http://git-wip-us.apache.org/repos/asf/ignite/blob/fb26835f/modules/web-console/frontend/app/components/ui-grid/component.js ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/ui-grid/component.js b/modules/web-console/frontend/app/components/ui-grid/component.js new file mode 100644 index 0000000..4c8a49f --- /dev/null +++ b/modules/web-console/frontend/app/components/ui-grid/component.js @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import './style.scss'; +import template from './template.pug'; +import controller from './controller'; + +export default { + template, + controller, + bindings: { + gridApi: '=?', + + // Input Events. + items: '<', + columnDefs: '<', + categories: '<', + oneWaySelection: '<?', + rowIdentityKey: '@?', + + // Output events. + onSelectionChange: '&?' + } +}; http://git-wip-us.apache.org/repos/asf/ignite/blob/fb26835f/modules/web-console/frontend/app/components/ui-grid/controller.js ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/ui-grid/controller.js b/modules/web-console/frontend/app/components/ui-grid/controller.js new file mode 100644 index 0000000..813bacb --- /dev/null +++ b/modules/web-console/frontend/app/components/ui-grid/controller.js @@ -0,0 +1,139 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import debounce from 'lodash/debounce'; +import headerTemplate from 'app/primitives/ui-grid-header/index.tpl.pug'; + +export default class IgniteUiGrid { + /** @type */ + gridApi; + + /** @type */ + items; + + /** @type */ + columnDefs; + + /** @type */ + categories; + + /** @type */ + onSelectionChange; + + static $inject = ['$scope', '$element', 'gridUtil']; + + /** + * @param {ng.IScope} $scope + */ + constructor($scope, $element, gridUtil) { + this.$scope = $scope; + this.$element = $element; + this.gridUtil = gridUtil; + this.selectedRows = []; + + this.rowIdentityKey = '_id'; + } + + $onInit() { + this.SCROLLBAR_WIDTH = this.gridUtil.getScrollbarWidth(); + + this.grid = { + data: this.items, + columnDefs: this.columnDefs, + categories: this.categories, + columnVirtualizationThreshold: 30, + rowHeight: 48, + headerRowHeight: 70, + enableColumnMenus: false, + enableFullRowSelection: true, + enableFiltering: true, + enableRowHashing: false, + fastWatch: true, + showTreeExpandNoChildren: false, + multiSelect: true, + selectionRowHeaderWidth: 30, + exporterCsvFilename: `${_.camelCase([this.tabName, this.tableTitle])}.csv`, + onRegisterApi: (api) => { + this.gridApi = api; + + api.core.on.rowsVisibleChanged(this.$scope, () => { + this.adjustHeight(); + }); + + if (this.onSelectionChange) { + api.selection.on.rowSelectionChanged(this.$scope, (row, e) => { + this.onRowsSelectionChange([row], e); + }); + + api.selection.on.rowSelectionChangedBatch(this.$scope, (rows, e) => { + this.onRowsSelectionChange(rows, e); + }); + } + } + }; + + if (this.grid.categories) + this.grid.headerTemplate = headerTemplate; + } + + $onChanges(changes) { + const hasChanged = (binding) => + binding in changes && changes[binding].currentValue !== changes[binding].previousValue; + + if (hasChanged('items') && this.grid) { + this.grid.data = changes.items.currentValue; + this.gridApi.grid.modifyRows(this.grid.data); + + this.adjustHeight(); + + if (this.onSelectionChange) + this.applyIncomingSelection(this.selectedRows); + } + } + + applyIncomingSelection(selected = []) { + this.gridApi.selection.clearSelectedRows({ ignore: true }); + + const rows = this.grid.data.filter((r) => + selected.map((row) => + row[this.rowIdentityKey]).includes(r[this.rowIdentityKey])); + + rows.forEach((r) => { + this.gridApi.selection.selectRow(r, { ignore: true }); + }); + } + + onRowsSelectionChange = debounce((rows, e = {}) => { + if (e.ignore) return; + this.selectedRows = this.gridApi.selection.legacyGetSelectedRows(); + + if (this.onSelectionChange) + this.onSelectionChange({ $event: this.selectedRows }); + }); + + adjustHeight() { + const maxRowsToShow = this.maxRowsToShow || 5; + const headerBorder = 1; + const visibleRows = this.gridApi.core.getVisibleRows().length; + const header = this.grid.headerRowHeight + headerBorder; + const optionalScroll = (visibleRows ? this.gridUtil.getScrollbarWidth() : 0); + const height = Math.min(visibleRows, maxRowsToShow) * this.grid.rowHeight + header + optionalScroll; + + this.gridApi.grid.element.css('height', height + 'px'); + this.gridApi.core.handleWindowResize(); + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/fb26835f/modules/web-console/frontend/app/components/ui-grid/index.js ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/ui-grid/index.js b/modules/web-console/frontend/app/components/ui-grid/index.js new file mode 100644 index 0000000..9fc9c63 --- /dev/null +++ b/modules/web-console/frontend/app/components/ui-grid/index.js @@ -0,0 +1,23 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import angular from 'angular'; +import component from './component'; + +export default angular + .module('ignite-console.ui-grid', []) + .component('igniteGridTable', component); http://git-wip-us.apache.org/repos/asf/ignite/blob/fb26835f/modules/web-console/frontend/app/components/ui-grid/style.scss ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/ui-grid/style.scss b/modules/web-console/frontend/app/components/ui-grid/style.scss new file mode 100644 index 0000000..d426070 --- /dev/null +++ b/modules/web-console/frontend/app/components/ui-grid/style.scss @@ -0,0 +1,111 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +ignite-grid-table { + @import 'public/stylesheets/variables'; + + .ui-grid.ui-grid--ignite { + // Start section row height. + .ui-grid-row { + height: 48px; + + .ui-grid-cell { + height: 100%; + } + } + + .ui-grid-cell .ui-grid-cell-contents { + padding: 14px 20px; + } + + // Set force header height. + // Fix hide border bottom of pinned column without data. + .ui-grid-header-canvas { + height: 70px; + } + + [role="columnheader"] { + display: flex; + align-items: center; + margin: 11px 0; + } + + .ui-grid-header--subcategories [role="columnheader"] { + margin: 0; + } + + // Fix checkbox position. + .ui-grid-header-cell .ui-grid-selection-row-header-buttons { + margin-top: 12px; + } + + // Removes unwanted box-shadow and border-right from checkboxes column + .ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-render-container-left:before { + box-shadow: none; + } + .ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-cell:last-child { + border-right: none; + } + + .ui-grid-pinned-container-left .ui-grid-header--subcategories .ui-grid-header-span.ui-grid-header-cell { + box-shadow: none; + } + + .ui-grid-header:not(.ui-grid-header--subcategories) .ui-grid-filters[role="columnheader"] { + padding-top: 6px; + } + + // End section row height. + .ui-grid-header-cell:last-child .ui-grid-column-resizer.right { + border-right: none; + } + + input[type="text"].ui-grid-filter-input { + &::placeholder { + color: rgba(66, 66, 66, 0.5); + font-weight: normal; + text-align: left; + } + + &:focus { + border-color: $ignite-brand-success; + box-shadow: none; + } + + font-family: Roboto; + outline: none; + overflow: visible; + + box-sizing: border-box; + width: 100%; + max-width: initial; + height: 29px; + padding: 0 10px; + margin-right: 0; + + border: solid 1px #c5c5c5; + border-radius: 4px; + background-color: #ffffff; + box-shadow: none; + + color: $text-color; + text-align: left; + font-weight: normal; + line-height: 16px; + } + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/fb26835f/modules/web-console/frontend/app/components/ui-grid/template.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/ui-grid/template.pug b/modules/web-console/frontend/app/components/ui-grid/template.pug new file mode 100644 index 0000000..6965a4e --- /dev/null +++ b/modules/web-console/frontend/app/components/ui-grid/template.pug @@ -0,0 +1,34 @@ +//- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +div(ng-if='::$ctrl.onSelectionChange') + .grid.ui-grid--ignite( + ui-grid='$ctrl.grid' + ui-grid-resize-columns + ui-grid-filters + ui-grid-selection + ui-grid-exporter + ui-grid-pinning + ) + +div(ng-if='::!$ctrl.onSelectionChange') + .grid.ui-grid--ignite( + ui-grid='$ctrl.grid' + ui-grid-resize-columns + ui-grid-filters + ui-grid-exporter + ui-grid-pinning + ) http://git-wip-us.apache.org/repos/asf/ignite/blob/fb26835f/modules/web-console/frontend/app/components/user-notifications/style.scss ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/user-notifications/style.scss b/modules/web-console/frontend/app/components/user-notifications/style.scss index e4fa39e..a1dd94f 100644 --- a/modules/web-console/frontend/app/components/user-notifications/style.scss +++ b/modules/web-console/frontend/app/components/user-notifications/style.scss @@ -21,43 +21,4 @@ $disabled-color: #c5c5c5; #user-notifications-dialog { min-height: 160px; - - > .ignite-form-field { - display: flex; - flex-direction: column; - - > .ignite-form-field__label { - color: $gray-light; - font-size: 12px; - - margin-left: 10px; - margin-bottom: 5px; - } - - > .ignite-form-field__control { - width: 100%; - - .ace_editor { - border-radius: 4px; - box-shadow: inset 0 1px 3px 0 rgba(0, 0, 0, 0.5); - border: solid 1px $disabled-color; - - margin: 0; - - .ace_content { - padding-left: 2px; - } - } - } - } -} - -.modal-footer { - .show-message { - display: flex; - - span { - margin-left: 5px; - } - } } http://git-wip-us.apache.org/repos/asf/ignite/blob/fb26835f/modules/web-console/frontend/app/components/user-notifications/template.tpl.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/user-notifications/template.tpl.pug b/modules/web-console/frontend/app/components/user-notifications/template.tpl.pug index a8c0394..10cc6ac 100644 --- a/modules/web-console/frontend/app/components/user-notifications/template.tpl.pug +++ b/modules/web-console/frontend/app/components/user-notifications/template.tpl.pug @@ -30,18 +30,18 @@ include /app/helpers/jade/mixins | Enter the text, which will show for all users of the Web Console about an important event or | warning about ongoing technical works. It will appear #[b on the yellow bar] in the header. - .ignite-form-field - +ignite-form-field__label('Your notification:', 'notification', true) - - .ignite-form-field__control - .input-tip - div(ignite-ace='{onLoad: $ctrl.onLoad, mode: "xml"}' ng-trim='true' ng-model='$ctrl.message') + .form-field__ace.ignite-form-field + +form-field__label({ label: 'Your notification:', name: 'notification', required: true}) + .form-field__control + div(ignite-ace='{onLoad: $ctrl.onLoad, mode: "xml"}' ng-trim='true' ng-model='$ctrl.message') .modal-footer - .pull-left - label.show-message - input(type='checkbox' ng-model='$ctrl.isShown') - span Show message - - button.btn-ignite.btn-ignite--link-success(id='btn-cancel' ng-click='$hide()') Cancel - button.btn-ignite.btn-ignite--success(id='btn-submit' ng-click='$ctrl.submit()') Submit + +form-field__checkbox({ + label: 'Show message', + name: 'showMessages', + model: '$ctrl.isShown' + }) + + div + button.btn-ignite.btn-ignite--link-success(id='btn-cancel' ng-click='$hide()') Cancel + button.btn-ignite.btn-ignite--success(id='btn-submit' ng-click='$ctrl.submit()') Submit http://git-wip-us.apache.org/repos/asf/ignite/blob/fb26835f/modules/web-console/frontend/app/helpers/jade/form.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/helpers/jade/form.pug b/modules/web-console/frontend/app/helpers/jade/form.pug deleted file mode 100644 index 44eaed9..0000000 --- a/modules/web-console/frontend/app/helpers/jade/form.pug +++ /dev/null @@ -1,26 +0,0 @@ -//- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -include ./form/form-field-feedback -include ./form/form-field-label -include ./form/form-field-text -include ./form/form-field-password -include ./form/form-field-dropdown -include ./form/form-field-datalist -include ./form/form-field-checkbox -include ./form/form-field-number -include ./form/form-field-up -include ./form/form-field-down http://git-wip-us.apache.org/repos/asf/ignite/blob/fb26835f/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.pug deleted file mode 100644 index a8236a9..0000000 --- a/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.pug +++ /dev/null @@ -1,44 +0,0 @@ -//- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -mixin form-field-checkbox(label, model, name, disabled, required, tip) - label.form-field-checkbox.ignite-form-field - .ignite-form-field__control - input( - id=`{{ ${name} }}Input` - name=`{{ ${name} }}` - type='checkbox' - - ng-model=model - ng-required=required && `${required}` - ng-disabled=disabled && `${disabled}` - expose-ignite-form-field-control='$input' - )&attributes(attributes ? attributes.attributes ? attributes.attributes : attributes : {}) - span #{label} - +tooltip(tip, tipOpts, 'tipLabel') - .ignite-form-field__errors( - ng-messages=`$input.$error` - ng-show=`($input.$dirty || $input.$touched || $input.$submitted) && $input.$invalid` - ) - if block - block - if required - +form-field-feedback(name, 'required', `${errLbl} could not be empty!`) - -mixin sane-form-field-checkbox({label, model, name, disabled, required, tip}) - +form-field-checkbox(label, model, name, disabled = false, required = false, tip)&attributes(attributes) - if block - block \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/fb26835f/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.pug deleted file mode 100644 index 888634b..0000000 --- a/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.pug +++ /dev/null @@ -1,52 +0,0 @@ -//- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -mixin form-field-datalist(label, model, name, disabled, required, placeholder, options, tip) - -var errLbl = label.substring(0, label.length - 1) - - mixin form-field-input() - input.form-control( - id=`{{ ${name} }}Input` - name=`{{ ${name} }}` - placeholder=placeholder - - ng-model=model - - ng-required=required && `${required}` - ng-disabled=disabled && `${disabled}` || `!${options}.length` - - bs-typeahead - bs-options=`item for item in ${options}` - container='body' - data-min-length='1' - ignite-retain-selection - expose-ignite-form-field-control='$input' - )&attributes(attributes.attributes) - - .ignite-form-field - +ignite-form-field__label(label, name, required, disabled) - +tooltip(tip, tipOpts) - .ignite-form-field__control - .input-tip - +form-field-input(attributes=attributes) - .ignite-form-field__errors( - ng-messages=`$input.$error` - ng-if=`($input.$dirty || $input.$touched || $input.$submitted) && $input.$invalid` - ) - if block - block - - +form-field-feedback(name, 'required', `${errLbl} could not be empty!`) http://git-wip-us.apache.org/repos/asf/ignite/blob/fb26835f/modules/web-console/frontend/app/helpers/jade/form/form-field-down.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-down.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-down.pug deleted file mode 100644 index 1ced54c..0000000 --- a/modules/web-console/frontend/app/helpers/jade/form/form-field-down.pug +++ /dev/null @@ -1,18 +0,0 @@ -//- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -mixin ignite-form-field-down() - i.tipField.fa.fa-arrow-down(ignite-form-field-down ng-click='vm.down()')&attributes(attributes) http://git-wip-us.apache.org/repos/asf/ignite/blob/fb26835f/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.pug deleted file mode 100644 index c6579e3..0000000 --- a/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.pug +++ /dev/null @@ -1,60 +0,0 @@ -//- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -mixin ignite-form-field-dropdown(label, model, name, disabled, required, multiple, placeholder, placeholderEmpty, options, tip) - mixin form-field-input() - -var errLbl = label.substring(0, label.length - 1) - - button.select-toggle.form-control( - type='button' - id=`{{ ${name} }}Input` - name=`{{ ${name} }}` - - data-placeholder=placeholderEmpty ? `{{ ${options}.length > 0 ? '${placeholder}' : '${placeholderEmpty}' }}` : placeholder - - ng-model=model - ng-disabled=disabled && `${disabled}` - ng-required=required && `${required}` - - bs-select - bs-options=`item.value as item.label for item in ${options}` - expose-ignite-form-field-control='$input' - - data-multiple=multiple ? '1' : false - - tabindex='0' - )&attributes(attributes.attributes) - - .ignite-form-field.ignite-form-field-dropdown - +ignite-form-field__label(label, name, required, disabled) - +tooltip(tip, tipOpts) - .ignite-form-field__control - .input-tip - +form-field-input(attributes=attributes) - .ignite-form-field__errors( - ng-messages=`$input.$error` - ng-show=`($input.$dirty || $input.$touched || $input.$submitted) && $input.$invalid` - ) - if block - block - - if required - +form-field-feedback(name, 'required', multiple ? 'At least one option should be selected' : 'An option should be selected') - -mixin sane-ignite-form-field-dropdown({label, model, name, disabled = false, required = false, multiple = false, placeholder, placeholderEmpty, options, tip}) - +ignite-form-field-dropdown(label, model, name, disabled, required, multiple, placeholder, placeholderEmpty, options, tip)&attributes(attributes) - if block - block \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/fb26835f/modules/web-console/frontend/app/helpers/jade/form/form-field-feedback.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-feedback.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-feedback.pug deleted file mode 100644 index dcdcf0e..0000000 --- a/modules/web-console/frontend/app/helpers/jade/form/form-field-feedback.pug +++ /dev/null @@ -1,18 +0,0 @@ -//- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -mixin form-field-feedback(name, error, message) - div(ng-message=error) #{message} http://git-wip-us.apache.org/repos/asf/ignite/blob/fb26835f/modules/web-console/frontend/app/helpers/jade/form/form-field-label.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-label.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-label.pug deleted file mode 100644 index 2edd115..0000000 --- a/modules/web-console/frontend/app/helpers/jade/form/form-field-label.pug +++ /dev/null @@ -1,25 +0,0 @@ -//- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -mixin ignite-form-field__label(label, name, required, disabled) - label.ignite-form-field__label( - id=`{{ ${name} }}Label` - for=`{{ ${name} }}Input` - ng-class=disabled && `{'ignite-form-field__label-disabled': ${disabled}}` - ) - span(class=`{{ ${required} ? 'required' : '' }}`) !{label} - if block - block \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/fb26835f/modules/web-console/frontend/app/helpers/jade/form/form-field-number.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-number.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-number.pug deleted file mode 100644 index 75f2a20..0000000 --- a/modules/web-console/frontend/app/helpers/jade/form/form-field-number.pug +++ /dev/null @@ -1,59 +0,0 @@ -//- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -mixin ignite-form-field-number(label, model, name, disabled, required, placeholder, min, max, step, tip) - -var errLbl = label.substring(0, label.length - 1) - - mixin form-field-input() - input.form-control( - id=`{{ ${name} }}Input` - name=`{{ ${name} }}` - placeholder=placeholder - type='number' - - min=min ? min : '0' - max=max ? max : '{{ Number.MAX_VALUE }}' - step=step ? step : '1' - - ng-model=model - - ng-required=required && `${required}` - ng-disabled=disabled && `${disabled}` - expose-ignite-form-field-control='$input' - )&attributes(attributes.attributes) - - .ignite-form-field - +ignite-form-field__label(label, name, required, disabled) - +tooltip(tip, tipOpts) - .ignite-form-field__control - .input-tip - +form-field-input(attributes=attributes) - .ignite-form-field__errors( - ng-messages=`$input.$error` - ng-show=`($input.$dirty || $input.$touched || $input.$submitted) && $input.$invalid` - ) - if block - block - +form-field-feedback(name, 'required', `${errLbl} could not be empty`) - +form-field-feedback(name, 'min', `${errLbl} is less than allowable minimum: ${min || 0}`) - +form-field-feedback(name, 'max', `${errLbl} is more than allowable maximum: ${max}`) - +form-field-feedback(name, 'number', `Only numbers are allowed`) - +form-field-feedback(name, 'step', `${errLbl} step should be ${step || 1}`) - -mixin sane-ignite-form-field-number({label, model, name, disabled = 'false', required = false, placeholder, min = '0', max, step = '1', tip}) - +ignite-form-field-number(label, model, name, disabled, required, placeholder, min, max, step, tip)&attributes(attributes) - if block - block \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/fb26835f/modules/web-console/frontend/app/helpers/jade/form/form-field-password.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-password.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-password.pug deleted file mode 100644 index 3e35974..0000000 --- a/modules/web-console/frontend/app/helpers/jade/form/form-field-password.pug +++ /dev/null @@ -1,47 +0,0 @@ -//- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -mixin ignite-form-field-password-input(name, model, disabled, required, placeholder) - input.form-control( - id=`{{ ${name} }}Input` - name=`{{ ${name} }}` - placeholder=placeholder - type='password' - - ng-model=model - - ng-required=required && `${required}` - ng-disabled=disabled && `${disabled}` - expose-ignite-form-field-control='$input' - )&attributes(attributes ? attributes.attributes ? attributes.attributes : attributes : {}) - -mixin ignite-form-field-password(label, model, name, disabled, required, placeholder, tip) - -var errLbl = label.substring(0, label.length - 1) - - .ignite-form-field - +ignite-form-field__label(label, name, required, disabled) - +tooltip(tip, tipOpts) - .ignite-form-field__control - .input-tip - +ignite-form-field-password-input(name, model, disabled, required, placeholder)(attributes=attributes) - .ignite-form-field__errors( - ng-messages=`$input.$error` - ng-if=`!$input.$pristine && $input.$invalid` - ) - if block - block - - +form-field-feedback(name, 'required', `${errLbl} could not be empty!`) http://git-wip-us.apache.org/repos/asf/ignite/blob/fb26835f/modules/web-console/frontend/app/helpers/jade/form/form-field-text.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-text.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-text.pug deleted file mode 100644 index 3d28e17..0000000 --- a/modules/web-console/frontend/app/helpers/jade/form/form-field-text.pug +++ /dev/null @@ -1,53 +0,0 @@ -//- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -mixin ignite-form-field-input(name, model, disabled, required, placeholder) - input.form-control( - id=`{{ ${name} }}Input` - name=`{{ ${name} }}` - placeholder=placeholder - - ng-model=model - - ng-required=required && `${required}` - ng-disabled=disabled && `${disabled}` - expose-ignite-form-field-control='$input' - - )&attributes(attributes ? attributes.attributes ? attributes.attributes : attributes : {}) - -mixin ignite-form-field-text(lbl, model, name, disabled, required, placeholder, tip) - -let errLbl = lbl[lbl.length - 1] === ':' ? lbl.substring(0, lbl.length - 1) : lbl - - .ignite-form-field - +ignite-form-field__label(lbl, name, required, disabled) - +tooltip(tip, tipOpts) - .ignite-form-field__control - .input-tip - +ignite-form-field-input(name, model, disabled, required, placeholder)(attributes=attributes) - .ignite-form-field__errors( - ng-messages=`$input.$error` - ng-show=`($input.$dirty || $input.$touched || $input.$submitted) && $input.$invalid` - ) - if block - block - - if required - +form-field-feedback(name, 'required', `${errLbl} could not be empty!`) - -mixin sane-ignite-form-field-text({label, model, name, disabled, required, placeholder, tip}) - +ignite-form-field-text(label, model, name, disabled, required, placeholder, tip)&attributes(attributes) - if block - block http://git-wip-us.apache.org/repos/asf/ignite/blob/fb26835f/modules/web-console/frontend/app/helpers/jade/form/form-field-up.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-up.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-up.pug deleted file mode 100644 index 3522fb5..0000000 --- a/modules/web-console/frontend/app/helpers/jade/form/form-field-up.pug +++ /dev/null @@ -1,18 +0,0 @@ -//- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -mixin ignite-form-field-up() - i.tipField.fa.fa-arrow-up.ng-scope(ignite-form-field-up ng-click='vm.up()')&attributes(attributes)