You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2016/09/13 09:53:32 UTC
[40/69] [abbrv] ignite git commit: Web Console beta-3.
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/directives/bs-affix-update.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/bs-affix-update.directive.js b/modules/web-console/frontend/app/directives/bs-affix-update.directive.js
new file mode 100644
index 0000000..925722c
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/bs-affix-update.directive.js
@@ -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.
+ */
+
+import angular from 'angular';
+
+export default ['igniteBsAffixUpdate', ['$window', '$timeout', ($window, $timeout) => {
+ let update = null;
+
+ const link = ({$last}) => {
+ if ($last) {
+ update && $timeout.cancel(update);
+ update = $timeout(() => angular.element($window).triggerHandler('resize'), 1000);
+ }
+ };
+
+ return {
+ restrict: 'A',
+ link
+ };
+}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/directives/centered/centered.css
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/centered/centered.css b/modules/web-console/frontend/app/directives/centered/centered.css
new file mode 100644
index 0000000..694c1d2
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/centered/centered.css
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ */
+
+.center-container {
+ position: fixed;
+ top: 0;
+ left: 0;
+ height: 100%;
+ width: 100%;
+ display: table;
+ pointer-events: none;
+ z-index: 9999;
+}
+
+.centered {
+ display: table-cell;
+ vertical-align: middle;
+ text-align: center;
+}
+
+.centered > * {
+ pointer-events: auto;
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/directives/centered/centered.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/centered/centered.directive.js b/modules/web-console/frontend/app/directives/centered/centered.directive.js
new file mode 100644
index 0000000..4abd086
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/centered/centered.directive.js
@@ -0,0 +1,26 @@
+/*
+ * 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 './centered.css';
+
+export default ['centered', [() => {
+ return {
+ restrict: 'E',
+ transclude: true,
+ template: '<div class="center-container"><div class="centered"><div ng-transclude></div></div></div>'
+ };
+}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/directives/copy-to-clipboard.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/copy-to-clipboard.directive.js b/modules/web-console/frontend/app/directives/copy-to-clipboard.directive.js
new file mode 100644
index 0000000..ee2110e
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/copy-to-clipboard.directive.js
@@ -0,0 +1,29 @@
+/*
+ * 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.
+ */
+
+// Directive for copy to clipboard.
+export default ['igniteCopyToClipboard', ['IgniteCopyToClipboard', (CopyToClipboard) => {
+ return {
+ restrict: 'A',
+ link(scope, element, attrs) {
+ element.bind('click', () => CopyToClipboard.copy(attrs.igniteCopyToClipboard));
+
+ if (!document.queryCommandSupported('copy'))
+ element.hide();
+ }
+ };
+}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/directives/hide-on-state-change/hide-on-state-change.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/hide-on-state-change/hide-on-state-change.directive.js b/modules/web-console/frontend/app/directives/hide-on-state-change/hide-on-state-change.directive.js
new file mode 100644
index 0000000..98f1c57
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/hide-on-state-change/hide-on-state-change.directive.js
@@ -0,0 +1,31 @@
+/*
+ * 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.
+ */
+
+export default ['hideOnStateChange', ['$timeout', ($timeout) => {
+ const link = (scope, element) => {
+ scope.$on('$stateChangeSuccess', () => {
+ $timeout(() => {
+ element.fadeOut('slow');
+ });
+ });
+ };
+
+ return {
+ restrict: 'AE',
+ link
+ };
+}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/directives/information/information.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/information/information.directive.js b/modules/web-console/frontend/app/directives/information/information.directive.js
new file mode 100644
index 0000000..a9a2f8c
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/information/information.directive.js
@@ -0,0 +1,30 @@
+/*
+ * 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 templateUrl from './information.jade';
+
+export default ['igniteInformation', [() => {
+ return {
+ scope: {
+ title: '@'
+ },
+ restrict: 'E',
+ templateUrl,
+ replace: true,
+ transclude: true
+ };
+}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/directives/information/information.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/information/information.jade b/modules/web-console/frontend/app/directives/information/information.jade
new file mode 100644
index 0000000..b805d4a
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/information/information.jade
@@ -0,0 +1,20 @@
+//-
+ 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.
+
+.block-information
+ span.icon.fa.fa-info-circle(ng-if='title')
+ h3(ng-if='title') {{::title}}
+ div(ng-transclude='')
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/directives/information/information.scss
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/information/information.scss b/modules/web-console/frontend/app/directives/information/information.scss
new file mode 100644
index 0000000..39f3c05
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/information/information.scss
@@ -0,0 +1,56 @@
+/*
+ * 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-block-information: #fcfcfc;
+$ignite-block-information-border: #aab8c6;
+$ignite-block-information-icon: #4a6785;
+
+.block-information {
+ position: relative;
+
+ background: $ignite-block-information;
+
+ border-radius: 5px;
+ border: 1px solid $ignite-block-information-border;
+
+ margin: 20px 0;
+ padding: 10px 10px 0 30px;
+
+ > h3 {
+ font-weight: bold;
+ margin-bottom: 10px;
+ }
+
+ > .icon {
+ cursor: default;
+
+ color: $ignite-block-information-icon;
+
+ position: absolute;
+ top: 12px;
+ left: 10px;
+
+ font-size: 16px;
+
+ vertical-align: text-bottom
+ }
+
+ ul {
+ padding-left: 20px;
+ }
+}
+
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/directives/match.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/match.directive.js b/modules/web-console/frontend/app/directives/match.directive.js
new file mode 100644
index 0000000..3a45f6d
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/match.directive.js
@@ -0,0 +1,27 @@
+/*
+ * 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.
+ */
+
+// Directive to enable validation to match specified value.
+export default ['igniteMatch', ['$parse', ($parse) => {
+ return {
+ require: 'ngModel',
+ link(scope, elem, attrs, ctrl) {
+ scope.$watch(() => $parse(attrs.igniteMatch)(scope) === ctrl.$modelValue,
+ (currentValue) => ctrl.$setValidity('mismatch', currentValue));
+ }
+ };
+}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/directives/on-click-focus.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/on-click-focus.directive.js b/modules/web-console/frontend/app/directives/on-click-focus.directive.js
new file mode 100644
index 0000000..5c9ee88
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/on-click-focus.directive.js
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+
+// Directive to describe element that should be focused on click.
+export default ['igniteOnClickFocus', ['IgniteFocus', (Focus) => {
+ return function(scope, elem, attrs) {
+ elem.on('click', () => Focus.move(attrs.igniteOnClickFocus));
+
+ // Removes bound events in the element itself when the scope is destroyed
+ scope.$on('$destroy', () => elem.off('click'));
+ };
+}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/directives/on-enter-focus-move.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/on-enter-focus-move.directive.js b/modules/web-console/frontend/app/directives/on-enter-focus-move.directive.js
new file mode 100644
index 0000000..2dd2884
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/on-enter-focus-move.directive.js
@@ -0,0 +1,29 @@
+/*
+ * 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.
+ */
+
+// Directive to move focus to specified element on ENTER key.
+export default ['igniteOnEnterFocusMove', ['IgniteFocus', (Focus) => {
+ return function(scope, elem, attrs) {
+ elem.on('keydown keypress', (event) => {
+ if (event.which === 13) {
+ event.preventDefault();
+
+ Focus.move(attrs.igniteOnEnterFocusMove);
+ }
+ });
+ };
+}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/directives/on-enter.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/on-enter.directive.js b/modules/web-console/frontend/app/directives/on-enter.directive.js
new file mode 100644
index 0000000..459220e
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/on-enter.directive.js
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+// Directive to bind ENTER key press with some user action.
+export default ['igniteOnEnter', ['$timeout', ($timeout) => {
+ return function(scope, elem, attrs) {
+ elem.on('keydown keypress', (event) => {
+ if (event.which === 13) {
+ scope.$apply(() => $timeout(() => scope.$eval(attrs.igniteOnEnter)));
+
+ event.preventDefault();
+ }
+ });
+
+ // Removes bound events in the element itself when the scope is destroyed.
+ scope.$on('$destroy', () => elem.off('keydown keypress'));
+ };
+}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/directives/on-escape.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/on-escape.directive.js b/modules/web-console/frontend/app/directives/on-escape.directive.js
new file mode 100644
index 0000000..aa1accd
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/on-escape.directive.js
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+// Directive to bind ESC key press with some user action.
+export default ['igniteOnEscape', ['$timeout', ($timeout) => {
+ return function(scope, elem, attrs) {
+ elem.on('keydown keypress', (event) => {
+ if (event.which === 27) {
+ scope.$apply(() => $timeout(() => scope.$eval(attrs.igniteOnEscape)));
+
+ event.preventDefault();
+ }
+ });
+
+ // Removes bound events in the element itself when the scope is destroyed.
+ scope.$on('$destroy', () => elem.off('keydown keypress'));
+ };
+}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.controller.js b/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.controller.js
new file mode 100644
index 0000000..32feaf3
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.controller.js
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ */
+
+export default ['$scope', 'GeneratorDocker', function($scope, docker) {
+ const ctrl = this;
+
+ // Watchers definition.
+ const clusterWatcher = () => {
+ delete ctrl.data;
+
+ if (!$scope.cluster)
+ return;
+
+ ctrl.data = docker.generate($scope.cluster, 'latest');
+ };
+
+ // Setup watchers.
+ $scope.$watch('cluster', clusterWatcher);
+}];
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.directive.js b/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.directive.js
new file mode 100644
index 0000000..08e4f76
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.directive.js
@@ -0,0 +1,46 @@
+/*
+ * 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 templateUrl from './ui-ace-docker.jade';
+import controller from './ui-ace-docker.controller';
+
+export default ['igniteUiAceDocker', [() => {
+ const link = ($scope, $el, $attrs, [igniteUiAceTabs]) => {
+ if (igniteUiAceTabs.onLoad)
+ $scope.onLoad = igniteUiAceTabs.onLoad;
+
+ if (igniteUiAceTabs.onChange)
+ $scope.onChange = igniteUiAceTabs.onChange;
+ };
+
+ return {
+ restrict: 'E',
+ scope: {
+ cluster: '=',
+ data: '=ngModel'
+ },
+ bindToController: {
+ cluster: '=',
+ data: '=ngModel'
+ },
+ link,
+ templateUrl,
+ controller,
+ controllerAs: 'ctrl',
+ require: ['?^igniteUiAceTabs']
+ };
+}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.jade b/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.jade
new file mode 100644
index 0000000..3b0e7b8
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.jade
@@ -0,0 +1,31 @@
+//-
+ 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 hard-link(ref, txt)
+ a(style='color:#ec1c24' href=ref target='_blank') #{txt}
+
+.panel-details-noborder
+ .details-row
+ p
+ +hard-link('https://docs.docker.com/reference/builder', 'Docker')
+ | file is a text file with instructions to create Docker image.<br/>
+ | To build image you have to store following Docker file with your Ignite XML configuration to the same directory.<br>
+ | Also you could use predefined
+ +hard-link('https://ignite.apache.org/download.html#docker', 'Apache Ignite docker image')
+ | . For more information about using Ignite with Docker please read
+ +hard-link('http://apacheignite.readme.io/docs/docker-deployment', 'documentation')
+ |.
+ .details-row(ng-if='ctrl.data' ignite-ace='{onLoad: onLoad, mode: "dockerfile"}' ng-model='ctrl.data')
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/directives/ui-ace-java/ui-ace-java.controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-java/ui-ace-java.controller.js b/modules/web-console/frontend/app/directives/ui-ace-java/ui-ace-java.controller.js
new file mode 100644
index 0000000..f869e65
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/ui-ace-java/ui-ace-java.controller.js
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+const SERVER_CFG = 'ServerConfigurationFactory';
+const CLIENT_CFG = 'ClientConfigurationFactory';
+
+export default ['$scope', 'GeneratorJava', function($scope, generator) {
+ const ctrl = this;
+
+ delete ctrl.data;
+
+ // Set default generator
+ ctrl.generator = (cluster) => {
+ const type = $scope.cfg ? CLIENT_CFG : SERVER_CFG;
+
+ return generator.cluster(cluster, 'config', type, $scope.cfg);
+ };
+}];
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/directives/ui-ace-java/ui-ace-java.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-java/ui-ace-java.directive.js b/modules/web-console/frontend/app/directives/ui-ace-java/ui-ace-java.directive.js
new file mode 100644
index 0000000..fbb1431
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/ui-ace-java/ui-ace-java.directive.js
@@ -0,0 +1,147 @@
+/*
+ * 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 templateUrl from './ui-ace-java.jade';
+import controller from './ui-ace-java.controller';
+
+export default ['igniteUiAceJava', ['GeneratorJava', (generator) => {
+ const link = (scope, $el, attrs, [ctrl, igniteUiAceTabs, formCtrl, ngModelCtrl]) => {
+ if (formCtrl && ngModelCtrl)
+ formCtrl.$removeControl(ngModelCtrl);
+
+ if (igniteUiAceTabs && igniteUiAceTabs.onLoad) {
+ scope.onLoad = (editor) => {
+ igniteUiAceTabs.onLoad(editor);
+
+ scope.$watch('master', () => editor.attractAttention = false);
+ };
+ }
+
+ if (igniteUiAceTabs && igniteUiAceTabs.onChange)
+ scope.onChange = igniteUiAceTabs.onChange;
+
+ const render = (data) => {
+ delete ctrl.data;
+
+ if (!data)
+ return;
+
+ return ctrl.generator(scope.master);
+ };
+
+ // Setup generator.
+ if (scope.generator) {
+ const method = scope.generator;
+
+ switch (method) {
+ case 'clusterCaches':
+ ctrl.generator = (cluster) => {
+ const caches = _.reduce(scope.detail, (acc, cache) => {
+ if (_.includes(cluster.caches, cache.value))
+ acc.push(cache.cache);
+
+ return acc;
+ }, []);
+
+ return generator.clusterCaches(caches, null, true, generator.clusterGeneral(cluster)).asString();
+ };
+
+ break;
+
+ case 'igfss':
+ ctrl.generator = (cluster) => {
+ const igfss = _.reduce(scope.detail, (acc, igfs) => {
+ if (_.includes(cluster.igfss, igfs.value))
+ acc.push(igfs.igfs);
+
+ return acc;
+ }, []);
+
+ return generator.igfss(igfss, 'cfg').asString();
+ };
+
+ break;
+
+ case 'cacheStore':
+ case 'cacheQuery':
+ ctrl.generator = (cache) => {
+ const domains = _.reduce(scope.detail, (acc, domain) => {
+ if (_.includes(cache.domains, domain.value))
+ acc.push(domain.meta);
+
+ return acc;
+ }, []);
+
+ return generator[method](cache, domains).asString();
+ };
+
+ break;
+
+ case 'cacheNodeFilter':
+ ctrl.generator = (cache) => {
+ const igfss = _.reduce(scope.detail, (acc, igfs) => {
+ acc.push(igfs.igfs);
+
+ return acc;
+ }, []);
+
+ return generator.cacheNodeFilter(cache, igfss).asString();
+ };
+
+ break;
+
+ default:
+ ctrl.generator = (data) => generator[method](data).asString();
+ }
+ }
+
+ if (!_.isUndefined(attrs.clusterCfg)) {
+ scope.$watch('cfg', (cfg) => {
+ if (!_.isUndefined(cfg))
+ return;
+
+ scope.cfg = {};
+ });
+
+ scope.$watch('cfg', (data) => ctrl.data = render(data), true);
+ }
+
+ const noDeepWatch = !(typeof attrs.noDeepWatch !== 'undefined');
+
+ // Setup watchers.
+ scope.$watch('master', (data) => ctrl.data = render(data), noDeepWatch);
+ };
+
+ return {
+ priority: 1,
+ restrict: 'E',
+ scope: {
+ master: '=',
+ detail: '=',
+ generator: '@',
+ cfg: '=?clusterCfg'
+ },
+ bindToController: {
+ data: '=?ngModel'
+ },
+ link,
+ templateUrl,
+ controller,
+ controllerAs: 'ctrl',
+ require: ['igniteUiAceJava', '?^igniteUiAceTabs', '?^form', '?ngModel']
+ };
+}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/directives/ui-ace-java/ui-ace-java.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-java/ui-ace-java.jade b/modules/web-console/frontend/app/directives/ui-ace-java/ui-ace-java.jade
new file mode 100644
index 0000000..5acffb8
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/ui-ace-java/ui-ace-java.jade
@@ -0,0 +1,22 @@
+//-
+ 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.data'
+ ignite-ace='{onLoad: onLoad, \
+ onChange: onChange, \
+ renderOptions: renderOptions, \
+ mode: "java"}'
+ ng-model='ctrl.data')
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.controller.js b/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.controller.js
new file mode 100644
index 0000000..bc185b3
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.controller.js
@@ -0,0 +1,95 @@
+/*
+ * 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.
+ */
+
+export default ['$scope', 'JavaTypes', 'GeneratorJava', function($scope, JavaTypes, generator) {
+ const ctrl = this;
+
+ // Watchers definition.
+ // Watcher clean instance data if instance to cluster caches was change
+ const cleanPojos = () => {
+ delete ctrl.class;
+ delete ctrl.pojos;
+ delete ctrl.classes;
+ };
+
+ // Watcher update pojos when changes caches and checkers useConstructor and includeKeyFields
+ const updatePojos = () => {
+ delete ctrl.pojos;
+
+ if (!ctrl.cluster || !ctrl.cluster.caches)
+ return;
+
+ ctrl.pojos = generator.pojos(ctrl.cluster.caches, ctrl.useConstructor, ctrl.includeKeyFields);
+ };
+
+ // Watcher update classes after
+ const updateClasses = (value) => {
+ delete ctrl.classes;
+
+ if (!value)
+ return;
+
+ const classes = ctrl.classes = [];
+
+ _.forEach(ctrl.pojos, (pojo) => {
+ if (pojo.keyType && JavaTypes.nonBuiltInClass(pojo.keyType))
+ classes.push(pojo.keyType);
+
+ classes.push(pojo.valueType);
+ });
+ };
+
+ // Update pojos class.
+ const updateClass = (value) => {
+ if (!value || !ctrl.pojos.length)
+ return;
+
+ const keyType = ctrl.pojos[0].keyType;
+
+ ctrl.class = ctrl.class || (JavaTypes.nonBuiltInClass(keyType) ? keyType : null) || ctrl.pojos[0].valueType;
+ };
+
+ // Update pojos data.
+ const updatePojosData = (value) => {
+ if (!value)
+ return;
+
+ _.forEach(ctrl.pojos, (pojo) => {
+ if (pojo.keyType === ctrl.class) {
+ ctrl.data = pojo.keyClass;
+
+ return false;
+ }
+
+ if (pojo.valueType === ctrl.class) {
+ ctrl.data = pojo.valueClass;
+
+ return false;
+ }
+ });
+ };
+
+ // Setup watchers. Watchers order is important.
+ $scope.$watch('ctrl.cluster.caches', cleanPojos);
+ $scope.$watch('ctrl.cluster.caches', updatePojos);
+ $scope.$watch('ctrl.cluster.caches', updateClasses);
+ $scope.$watch('ctrl.useConstructor', updatePojos);
+ $scope.$watch('ctrl.includeKeyFields', updatePojos);
+ $scope.$watch('ctrl.pojos', updateClass);
+ $scope.$watch('ctrl.pojos', updatePojosData);
+ $scope.$watch('ctrl.class', updatePojosData);
+}];
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.directive.js b/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.directive.js
new file mode 100644
index 0000000..7c224b7
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.directive.js
@@ -0,0 +1,46 @@
+/*
+ * 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 templateUrl from './ui-ace-pojos.jade';
+import controller from './ui-ace-pojos.controller';
+
+export default ['igniteUiAcePojos', [() => {
+ const link = ($scope, $el, $attrs, [igniteUiAceTabs]) => {
+ if (igniteUiAceTabs.onLoad)
+ $scope.onLoad = igniteUiAceTabs.onLoad;
+
+ if (igniteUiAceTabs.onChange)
+ $scope.onChange = igniteUiAceTabs.onChange;
+ };
+
+ return {
+ restrict: 'E',
+ scope: {
+ cluster: '=',
+ pojos: '=ngModel'
+ },
+ bindToController: {
+ cluster: '=',
+ pojos: '=ngModel'
+ },
+ link,
+ templateUrl,
+ controller,
+ controllerAs: 'ctrl',
+ require: ['?^igniteUiAceTabs']
+ };
+}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.jade b/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.jade
new file mode 100644
index 0000000..ed1432b
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.jade
@@ -0,0 +1,40 @@
+//-
+ 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 check-tooltip(message)
+ i.tipLabel.fa.fa-question-circle(bs-tooltip='"#{message}"')
+
+.panel-details-noborder
+ .details-row
+ .col-xs-2.col-sm-2.col-md-2
+ label POJO class:
+ .col-xs-10.col-sm-10.col-md-10.summary-pojo-list
+ button.select-toggle.form-control(ng-model='ctrl.class' bs-select bs-options='item for item in ctrl.classes' data-container='')
+ .details-row.checkbox
+ .col-xs-2.col-sm-2.col-md-2
+ .col-xs-10.col-sm-10.col-md-10
+ label
+ input(type='checkbox' ng-model='ctrl.useConstructor')
+ | Generate constructors
+ +check-tooltip("Generate empty and full constructors in POJO classes")
+ .details-row.checkbox
+ .col-xs-2.col-sm-2.col-md-2
+ .col-xs-10.col-sm-10.col-md-10
+ label
+ input(type='checkbox' ng-model='ctrl.includeKeyFields')
+ | Include key fields
+ +check-tooltip("Generate key fields in POJO value class")
+ .details-row(ng-if='ctrl.data' ignite-ace='{onLoad: onLoad, mode: "java"}' ng-model='ctrl.data')
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.controller.js b/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.controller.js
new file mode 100644
index 0000000..ec880bd
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.controller.js
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ */
+
+export default ['$scope', 'GeneratorPom', 'IgniteVersion', function($scope, pom, IgniteVersion) {
+ const ctrl = this;
+
+ // Watchers definition.
+ const clusterWatcher = (value) => {
+ delete ctrl.data;
+
+ if (!value)
+ return;
+
+ ctrl.data = pom.generate($scope.cluster, IgniteVersion.version).asString();
+ };
+
+ // Setup watchers.
+ $scope.$watch('cluster', clusterWatcher);
+}];
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.directive.js b/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.directive.js
new file mode 100644
index 0000000..2a7a878
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.directive.js
@@ -0,0 +1,41 @@
+/*
+ * 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 templateUrl from './ui-ace-pom.jade';
+import controller from './ui-ace-pom.controller';
+
+export default ['igniteUiAcePom', [() => {
+ const link = ($scope, $el, $attrs, [igniteUiAceTabs]) => {
+ if (igniteUiAceTabs.onLoad)
+ $scope.onLoad = igniteUiAceTabs.onLoad;
+
+ if (igniteUiAceTabs.onChange)
+ $scope.onChange = igniteUiAceTabs.onChange;
+ };
+
+ return {
+ restrict: 'E',
+ scope: {
+ cluster: '='
+ },
+ link,
+ templateUrl,
+ controller,
+ controllerAs: 'ctrl',
+ require: ['?^igniteUiAceTabs']
+ };
+}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.jade b/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.jade
new file mode 100644
index 0000000..b973a74
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.jade
@@ -0,0 +1,17 @@
+//-
+ 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.data' ignite-ace='{onLoad: onLoad, mode: "xml"}' ng-model='ctrl.data')
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/directives/ui-ace-tabs.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-tabs.directive.js b/modules/web-console/frontend/app/directives/ui-ace-tabs.directive.js
new file mode 100644
index 0000000..2b90a72
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/ui-ace-tabs.directive.js
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+
+export default ['igniteUiAceTabs', [() => {
+ return {
+ scope: true,
+ restrict: 'AE',
+ controller: _.noop
+ };
+}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/directives/ui-ace-xml/ui-ace-xml.controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-xml/ui-ace-xml.controller.js b/modules/web-console/frontend/app/directives/ui-ace-xml/ui-ace-xml.controller.js
new file mode 100644
index 0000000..3233757
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/ui-ace-xml/ui-ace-xml.controller.js
@@ -0,0 +1,27 @@
+/*
+ * 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.
+ */
+
+export default ['$scope', 'GeneratorXml', function($scope, generator) {
+ const ctrl = this;
+
+ delete ctrl.data;
+
+ // Set default generator
+ ctrl.generator = (cluster) => {
+ return generator.cluster(cluster, $scope.cfg);
+ };
+}];
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/directives/ui-ace-xml/ui-ace-xml.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-xml/ui-ace-xml.directive.js b/modules/web-console/frontend/app/directives/ui-ace-xml/ui-ace-xml.directive.js
new file mode 100644
index 0000000..3bd834f
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/ui-ace-xml/ui-ace-xml.directive.js
@@ -0,0 +1,147 @@
+/*
+ * 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 templateUrl from './ui-ace-xml.jade';
+import controller from './ui-ace-xml.controller';
+
+export default ['igniteUiAceXml', ['GeneratorXml', (generator) => {
+ const link = (scope, $el, attrs, [ctrl, igniteUiAceTabs, formCtrl, ngModelCtrl]) => {
+ if (formCtrl && ngModelCtrl)
+ formCtrl.$removeControl(ngModelCtrl);
+
+ if (igniteUiAceTabs && igniteUiAceTabs.onLoad) {
+ scope.onLoad = (editor) => {
+ igniteUiAceTabs.onLoad(editor);
+
+ scope.$watch('master', () => editor.attractAttention = false);
+ };
+ }
+
+ if (igniteUiAceTabs && igniteUiAceTabs.onChange)
+ scope.onChange = igniteUiAceTabs.onChange;
+
+ const render = (data) => {
+ delete ctrl.data;
+
+ if (!data)
+ return;
+
+ return ctrl.generator(scope.master);
+ };
+
+ // Setup generator.
+ if (scope.generator) {
+ const method = scope.generator;
+
+ switch (method) {
+ case 'clusterCaches':
+ ctrl.generator = (cluster) => {
+ const caches = _.reduce(scope.detail, (acc, cache) => {
+ if (_.includes(cluster.caches, cache.value))
+ acc.push(cache.cache);
+
+ return acc;
+ }, []);
+
+ return generator.clusterCaches(caches, null, true, generator.clusterGeneral(cluster)).asString();
+ };
+
+ break;
+
+ case 'igfss':
+ ctrl.generator = (cluster) => {
+ const igfss = _.reduce(scope.detail, (acc, igfs) => {
+ if (_.includes(cluster.igfss, igfs.value))
+ acc.push(igfs.igfs);
+
+ return acc;
+ }, []);
+
+ return generator.igfss(igfss).asString();
+ };
+
+ break;
+
+ case 'cacheStore':
+ case 'cacheQuery':
+ ctrl.generator = (cache) => {
+ const domains = _.reduce(scope.detail, (acc, domain) => {
+ if (_.includes(cache.domains, domain.value))
+ acc.push(domain.meta);
+
+ return acc;
+ }, []);
+
+ return generator[method](cache, domains).asString();
+ };
+
+ break;
+
+ case 'cacheNodeFilter':
+ ctrl.generator = (cache) => {
+ const igfss = _.reduce(scope.detail, (acc, igfs) => {
+ acc.push(igfs.igfs);
+
+ return acc;
+ }, []);
+
+ return generator.cacheNodeFilter(cache, igfss).asString();
+ };
+
+ break;
+
+ default:
+ ctrl.generator = (data) => generator[method](data).asString();
+ }
+ }
+
+ if (!_.isUndefined(attrs.clusterCfg)) {
+ scope.$watch('cfg', (cfg) => {
+ if (!_.isUndefined(cfg))
+ return;
+
+ scope.cfg = {};
+ });
+
+ scope.$watch('cfg', (data) => ctrl.data = render(data), true);
+ }
+
+ const noDeepWatch = !(typeof attrs.noDeepWatch !== 'undefined');
+
+ // Setup watchers.
+ scope.$watch('master', (data) => ctrl.data = render(data), noDeepWatch);
+ };
+
+ return {
+ priority: 1,
+ restrict: 'E',
+ scope: {
+ master: '=',
+ detail: '=',
+ generator: '@',
+ cfg: '=?clusterCfg'
+ },
+ bindToController: {
+ data: '=?ngModel'
+ },
+ link,
+ templateUrl,
+ controller,
+ controllerAs: 'ctrl',
+ require: ['igniteUiAceXml', '?^igniteUiAceTabs', '?^form', '?ngModel']
+ };
+}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/directives/ui-ace-xml/ui-ace-xml.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-xml/ui-ace-xml.jade b/modules/web-console/frontend/app/directives/ui-ace-xml/ui-ace-xml.jade
new file mode 100644
index 0000000..0dd627a
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/ui-ace-xml/ui-ace-xml.jade
@@ -0,0 +1,17 @@
+//-
+ 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.data' ignite-ace='{onLoad: onLoad, onChange: onChange, mode: "xml"}' ng-model='ctrl.data')
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/filters/byName.filter.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/filters/byName.filter.js b/modules/web-console/frontend/app/filters/byName.filter.js
new file mode 100644
index 0000000..3b0746f
--- /dev/null
+++ b/modules/web-console/frontend/app/filters/byName.filter.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.
+ */
+
+export default ['byName', [() => (arr, search) => {
+ if (!(arr && arr.length) || !search)
+ return arr;
+
+ return _.filter(arr, ({ name }) => name.indexOf(search) >= 0);
+}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/filters/domainsValidation.filter.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/filters/domainsValidation.filter.js b/modules/web-console/frontend/app/filters/domainsValidation.filter.js
new file mode 100644
index 0000000..1a38392
--- /dev/null
+++ b/modules/web-console/frontend/app/filters/domainsValidation.filter.js
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ */
+
+// Filter domain models with key fields configuration.
+export default ['domainsValidation', ['IgniteLegacyUtils', (LegacyUtils) => (domains, valid, invalid) => {
+ if (valid && invalid)
+ return domains;
+
+ const out = [];
+
+ _.forEach(domains, function(domain) {
+ const _valid = !LegacyUtils.domainForStoreConfigured(domain) || LegacyUtils.isJavaBuiltInClass(domain.keyType) || !_.isEmpty(domain.keyFields);
+
+ if (valid && _valid || invalid && !_valid)
+ out.push(domain);
+ });
+
+ return out;
+}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/filters/duration.filter.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/filters/duration.filter.js b/modules/web-console/frontend/app/filters/duration.filter.js
new file mode 100644
index 0000000..deeedd7
--- /dev/null
+++ b/modules/web-console/frontend/app/filters/duration.filter.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.
+ */
+
+export default ['duration', [() => {
+ /**
+ * @param {Number} t Time in ms.
+ */
+ return (t) => {
+ const a = (i, suffix) => i && i !== '00' ? i + suffix + ' ' : '';
+
+ const cd = 24 * 60 * 60 * 1000;
+ const ch = 60 * 60 * 1000;
+ const cm = 60 * 1000;
+ const cs = 1000;
+
+ const d = Math.floor(t / cd);
+ const h = Math.floor((t - d * cd) / ch);
+ const m = Math.floor((t - d * cd - h * ch) / cm);
+ const s = Math.floor((t - d * cd - h * ch - m * cm) / cs);
+ const ms = t % 1000;
+
+ return a(d, 'd') + a(h, 'h') + a(m, 'm') + a(s, 's') + (t < cm ? ms + 'ms' : '');
+ };
+}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/filters/hasPojo.filter.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/filters/hasPojo.filter.js b/modules/web-console/frontend/app/filters/hasPojo.filter.js
new file mode 100644
index 0000000..a179423
--- /dev/null
+++ b/modules/web-console/frontend/app/filters/hasPojo.filter.js
@@ -0,0 +1,18 @@
+/*
+ * 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.
+ */
+
+export default ['hasPojo', [() => ({caches} = []) => _.find(caches, (cache) => cache.domains && cache.domains.length)]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/helpers/jade/form.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form.jade b/modules/web-console/frontend/app/helpers/jade/form.jade
new file mode 100644
index 0000000..4b017ea
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form.jade
@@ -0,0 +1,27 @@
+//-
+ 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.jade
+include ./form/form-field-label.jade
+include ./form/form-field-text.jade
+include ./form/form-field-dropdown.jade
+include ./form/form-field-datalist.jade
+include ./form/form-field-checkbox.jade
+include ./form/form-field-number.jade
+include ./form/form-field-up.jade
+include ./form/form-field-down.jade
+
+include ./form/form-group.jade
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.jade b/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.jade
new file mode 100644
index 0000000..ef5cb37
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.jade
@@ -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.
+
+mixin form-field-checkbox(label, model, name, disabled, required, tip)
+ div.checkbox.col-xs-12.col-sm-12.col-md-12
+ label(id='{{ #{name} }}Label')
+ .input-tip
+ if block
+ block
+ else
+ input(
+ id='{{ #{name} }}Input'
+ name='{{ #{name} }}'
+ type='checkbox'
+
+ data-ng-model=model
+ data-ng-required=required && '#{required}'
+ data-ng-disabled=disabled && '#{disabled}'
+
+ data-ng-focus='tableReset()'
+
+ data-ignite-form-panel-field=''
+ )
+ span #{label}
+ i.tipLabel.fa.fa-question-circle(bs-tooltip='' data-title=tip)
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.jade b/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.jade
new file mode 100644
index 0000000..98a0b9a
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.jade
@@ -0,0 +1,51 @@
+//-
+ 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
+
+ data-ng-model=model
+
+ data-ng-required=required && '#{required}'
+ data-ng-disabled=disabled && '#{disabled}' || '!#{options}.length'
+
+ bs-typeahead
+ bs-options='item for item in #{options}'
+ container='body'
+ data-min-length='1'
+ ignite-retain-selection
+
+ data-ignite-form-panel-field=''
+ )&attributes(attributes.attributes)
+
+ div
+ +ignite-form-field-label(label, name, required)
+ .col-xs-8.col-sm-8.col-md-8
+ i.tipField.fa.fa-question-circle(bs-tooltip data-title=tip)
+
+ +form-field-feedback(name, 'required', errLbl + ' could not be empty!')
+
+ if block
+ block
+
+ .input-tip
+ +form-field-input(attributes=attributes)
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/helpers/jade/form/form-field-down.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-down.jade b/modules/web-console/frontend/app/helpers/jade/form/form-field-down.jade
new file mode 100644
index 0000000..cd10ebe
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-down.jade
@@ -0,0 +1,18 @@
+//-
+ 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="$ctrl.down()")&attributes(attributes)
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.jade b/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.jade
new file mode 100644
index 0000000..a8496bc
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.jade
@@ -0,0 +1,50 @@
+//-
+ 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()
+ button.select-toggle.form-control(
+ id='{{ #{name} }}Input'
+ name='{{ #{name} }}'
+
+ data-placeholder=placeholderEmpty ? '{{ #{options}.length > 0 ? "#{placeholder}" : "#{placeholderEmpty}" }}' : placeholder
+
+ data-ng-model=model
+
+ data-ng-required=required && '#{required}'
+ data-ng-disabled=disabled && '#{disabled}' || '!#{options}.length'
+
+ bs-select
+ bs-options='item.value as item.label for item in #{options}'
+
+ data-multiple=multiple ? '1' : false
+ data-container='body > .wrapper'
+
+ tabindex='0'
+
+ data-ignite-form-panel-field=''
+ )&attributes(attributes.attributes)
+
+ div
+ +ignite-form-field-label(label, name, required)
+ .col-xs-8.col-sm-8.col-md-8
+ i.tipField.fa.fa-question-circle(bs-tooltip data-title=tip)
+
+ if block
+ block
+
+ .input-tip
+ +form-field-input(attributes=attributes)
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/helpers/jade/form/form-field-feedback.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-feedback.jade b/modules/web-console/frontend/app/helpers/jade/form/form-field-feedback.jade
new file mode 100644
index 0000000..bf012db
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-feedback.jade
@@ -0,0 +1,29 @@
+//-
+ 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)
+ -var __field = form + '[' + name + ']'
+ -var __error = __field + '.$error.' + error
+ -var __pristine = __field + '.$pristine'
+
+ i.fa.fa-exclamation-triangle.form-field-feedback(
+ ng-if='!#{__pristine} && #{__error}'
+ bs-tooltip
+ data-title=message
+ ignite-error=error
+ ignite-error-message=message
+ name='{{ #{name} }}'
+ )
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/helpers/jade/form/form-field-label.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-label.jade b/modules/web-console/frontend/app/helpers/jade/form/form-field-label.jade
new file mode 100644
index 0000000..cd5f8fc
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-label.jade
@@ -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.
+
+mixin ignite-form-field-label(label, name, required)
+ label.col-xs-4.col-sm-4.col-md-4(
+ id='{{ #{name} }}Label'
+ for='{{ #{name} }}Input'
+ class="{{ #{required} ? 'required' : '' }}"
+ )
+ span !{label}
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/helpers/jade/form/form-field-number.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-number.jade b/modules/web-console/frontend/app/helpers/jade/form/form-field-number.jade
new file mode 100644
index 0000000..c32d3d9
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-number.jade
@@ -0,0 +1,52 @@
+//-
+ 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)
+ 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'
+
+ data-ng-model=model
+
+ data-ng-required=required && '#{required}'
+ data-ng-disabled=disabled && '#{disabled}'
+ data-ng-focus='tableReset()'
+
+ data-ignite-form-panel-field=''
+ )&attributes(attributes.attributes)
+
+ div
+ +ignite-form-field-label(label, name, required)
+ .col-xs-8.col-sm-8.col-md-8
+ i.tipField.fa.fa-question-circle(bs-tooltip data-title=tip)
+
+ +form-field-feedback(name, 'required', 'This field could not be empty')
+ +form-field-feedback(name, 'min', 'Value is less than allowable minimum: '+ min || 0)
+ +form-field-feedback(name, 'max', 'Value is more than allowable maximum: '+ max)
+ +form-field-feedback(name, 'number', 'Only numbers allowed')
+
+ if block
+ block
+
+ .input-tip
+ +form-field-input(attributes=attributes)
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/helpers/jade/form/form-field-text.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-text.jade b/modules/web-console/frontend/app/helpers/jade/form/form-field-text.jade
new file mode 100644
index 0000000..796e641
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-text.jade
@@ -0,0 +1,47 @@
+//-
+ 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
+ type='text'
+
+ data-ng-model=model
+
+ data-ng-required=required && '#{required}'
+ data-ng-disabled=disabled && '#{disabled}'
+ data-ng-focus='tableReset()'
+
+ data-ignite-form-panel-field=''
+ )&attributes(attributes ? attributes.attributes ? attributes.attributes : attributes : {})
+
+mixin ignite-form-field-text(label, model, name, disabled, required, placeholder, tip)
+ -var errLbl = label.substring(0, label.length - 1)
+
+ div
+ +ignite-form-field-label(label, name, required)
+ .col-xs-8.col-sm-8.col-md-8
+ i.tipField.fa.fa-question-circle(bs-tooltip data-title=tip)
+
+ if block
+ block
+
+ +form-field-feedback(name, 'required', errLbl + ' could not be empty!')
+
+ .input-tip
+ +ignite-form-field-input(name, model, disabled, required, placeholder)(attributes=attributes)
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/frontend/app/helpers/jade/form/form-field-up.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-up.jade b/modules/web-console/frontend/app/helpers/jade/form/form-field-up.jade
new file mode 100644
index 0000000..c66cd0e
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-up.jade
@@ -0,0 +1,18 @@
+//-
+ 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="$ctrl.up()")&attributes(attributes)