You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by av...@apache.org on 2016/05/18 09:21:22 UTC
[19/28] ignite git commit: IGNITE-843 Implemented Web Console.
http://git-wip-us.apache.org/repos/asf/ignite/blob/eb5ac0ae/modules/web-console/licenses/apache-2.0.txt
----------------------------------------------------------------------
diff --git a/modules/web-console/licenses/apache-2.0.txt b/modules/web-console/licenses/apache-2.0.txt
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/modules/web-console/licenses/apache-2.0.txt
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
http://git-wip-us.apache.org/repos/asf/ignite/blob/eb5ac0ae/modules/web-console/pom.xml
----------------------------------------------------------------------
diff --git a/modules/web-console/pom.xml b/modules/web-console/pom.xml
new file mode 100644
index 0000000..1639ec1
--- /dev/null
+++ b/modules/web-console/pom.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ 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.
+-->
+
+<!--
+ POM file.
+-->
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.ignite</groupId>
+ <artifactId>ignite-parent</artifactId>
+ <version>1</version>
+ <relativePath>../../parent</relativePath>
+ </parent>
+
+ <artifactId>ignite-web-console</artifactId>
+ <version>1.6.0-SNAPSHOT</version>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>com.github.eirslett</groupId>
+ <artifactId>frontend-maven-plugin</artifactId>
+ <version>0.0.23</version>
+
+ <configuration>
+ <workingDirectory>src/main/js</workingDirectory>
+ </configuration>
+
+ <executions>
+ <execution>
+ <id>install node and npm</id>
+ <goals>
+ <goal>install-node-and-npm</goal>
+ </goals>
+ <configuration>
+ <nodeVersion>v4.4.4</nodeVersion>
+ <npmVersion>2.14.20</npmVersion>
+ </configuration>
+ </execution>
+
+ <execution>
+ <id>npm install</id>
+ <goals>
+ <goal>npm</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
http://git-wip-us.apache.org/repos/asf/ignite/blob/eb5ac0ae/modules/web-console/src/main/js/.babelrc
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/.babelrc b/modules/web-console/src/main/js/.babelrc
new file mode 100644
index 0000000..af0f0c3
--- /dev/null
+++ b/modules/web-console/src/main/js/.babelrc
@@ -0,0 +1,3 @@
+{
+ "presets": ["es2015"]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/eb5ac0ae/modules/web-console/src/main/js/.eslintrc
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/.eslintrc b/modules/web-console/src/main/js/.eslintrc
new file mode 100644
index 0000000..00fa0ad
--- /dev/null
+++ b/modules/web-console/src/main/js/.eslintrc
@@ -0,0 +1,197 @@
+parser: "babel-eslint"
+
+env:
+ es6: true
+ browser: true
+
+ecmaFeatures:
+ arrowFunctions: true
+ blockBindings: true
+ classes: true
+ defaultParams: true
+ destructuring: true
+ module: true
+ objectLiteralComputedProperties: true
+ objectLiteralShorthandMethods: true
+ objectLiteralShorthandProperties: true
+ spread: true
+ templateStrings: true
+ experimentalObjectRestSpread: true
+
+globals:
+ _: true
+ io: true
+ window: true
+ global: true
+ angular: true
+ $generatorCommon: true
+ $generatorProperties: true
+ $generatorXml: true
+ $generatorJava: true
+ $generatorPom: true
+ $generatorReadme: true
+ $generatorDocker: true
+ $generatorOptional: true
+ saveAs: true
+ process: true
+
+rules:
+ arrow-parens: [1, "always"]
+ arrow-spacing: [1, { "before": true, "after": true }]
+ accessor-pairs: 2
+ block-scoped-var: 2
+ brace-style: [0, "1tbs"]
+ comma-dangle: [2, "never"]
+ comma-spacing: [2, {"before": false, "after": true}]
+ comma-style: [2, "last"]
+ complexity: [1, 11]
+ computed-property-spacing: [2, "never"]
+ consistent-return: 0
+ consistent-this: [0, "that"]
+ constructor-super: 2
+ curly: [2, "multi-or-nest"]
+ default-case: 2
+ dot-location: 0
+ dot-notation: [2, { "allowKeywords": true }]
+ eol-last: 2
+ eqeqeq: 2
+ func-names: 0
+ func-style: [0, "declaration"]
+ generator-star-spacing: 0
+ guard-for-in: 1
+ handle-callback-err: 0
+ id-length: [2, {"min": 1, "max": 60}]
+ indent: [2, 4, {"SwitchCase": 1}]
+ key-spacing: [2, { "beforeColon": false, "afterColon": true }]
+ lines-around-comment: 0
+ linebreak-style: [0, "unix"]
+ max-depth: [0, 4]
+ max-len: [0, 120, 4]
+ max-nested-callbacks: [1, 4]
+ max-params: [0, 3]
+ max-statements: [0, 10]
+ new-cap: 2
+ new-parens: 2
+ no-alert: 2
+ no-array-constructor: 2
+ no-bitwise: 0
+ no-caller: 2
+ no-catch-shadow: 2
+ no-cond-assign: 2
+ no-console: 0
+ no-constant-condition: 2
+ no-continue: 0
+ no-class-assign: 2
+ no-const-assign: 2
+ no-control-regex: 2
+ no-debugger: 2
+ no-delete-var: 2
+ no-div-regex: 0
+ no-dupe-keys: 2
+ no-dupe-args: 2
+ no-duplicate-case: 2
+ no-else-return: 2
+ no-empty: 2
+ no-empty-character-class: 2
+ no-eq-null: 2
+ no-eval: 2
+ no-ex-assign: 2
+ no-extend-native: 2
+ no-extra-bind: 2
+ no-extra-boolean-cast: 2
+ no-extra-parens: 0
+ no-extra-semi: 2
+ no-fallthrough: 2
+ no-floating-decimal: 1
+ no-func-assign: 2
+ no-implied-eval: 2
+ no-inline-comments: 0
+ no-inner-declarations: [2, "functions"]
+ no-invalid-regexp: 2
+ no-irregular-whitespace: 2
+ no-iterator: 2
+ no-label-var: 2
+ no-labels: 2
+ no-lone-blocks: 2
+ no-lonely-if: 2
+ no-implicit-coercion: [2, {"boolean": false, "number": true, "string": true}]
+ no-loop-func: 2
+ no-mixed-requires: [0, false]
+ no-mixed-spaces-and-tabs: [2, true]
+ no-multi-spaces: 2
+ no-multi-str: 2
+ no-multiple-empty-lines: [0, {"max": 2}]
+ no-native-reassign: 2
+ no-negated-in-lhs: 2
+ no-nested-ternary: 2
+ no-new: 2
+ no-new-func: 2
+ no-new-object: 2
+ no-new-require: 0
+ no-new-wrappers: 2
+ no-obj-calls: 2
+ no-octal: 2
+ no-octal-escape: 2
+ no-param-reassign: 0
+ no-path-concat: 0
+ no-plusplus: 0
+ no-process-env: 0
+ no-process-exit: 2
+ no-proto: 2
+ no-redeclare: 2
+ no-regex-spaces: 1
+ no-restricted-modules: 0
+ no-script-url: 0
+ no-self-compare: 2
+ no-sequences: 2
+ no-shadow: 2
+ no-shadow-restricted-names: 2
+ no-spaced-func: 2
+ no-sparse-arrays: 1
+ no-sync: 0
+ no-ternary: 0
+ no-trailing-spaces: 2
+ no-throw-literal: 0
+ no-this-before-super: 2
+ no-unexpected-multiline: 2
+ no-undef: 2
+ no-undef-init: 2
+ no-undefined: 2
+ no-unneeded-ternary: 2
+ no-unreachable: 2
+ no-unused-expressions: [2, { allowShortCircuit: true }]
+ no-unused-vars: [2, {"vars": "all", "args": "after-used"}]
+ no-use-before-define: 2
+ no-useless-call: 2
+ no-void: 0
+ no-var: 2
+ no-warning-comments: 0
+ no-with: 2
+ newline-after-var: 0
+ object-shorthand: [2, "always"]
+ one-var: [2, "never"]
+ operator-assignment: [2, "always"]
+ operator-linebreak: 0
+ padded-blocks: 0
+ prefer-const: 1
+ prefer-spread: 2
+ quote-props: [2, "as-needed"]
+ quotes: [2, "single"]
+ radix: 1
+ semi: [2, "always"]
+ semi-spacing: [2, {"before": false, "after": true}]
+ sort-vars: 0
+ keyword-spacing: 2
+ space-before-blocks: [2, "always"]
+ space-before-function-paren: [2, "never"]
+ space-in-parens: 0
+ space-infix-ops: 2
+ space-unary-ops: [2, { "words": true, "nonwords": false }]
+ spaced-comment: [1, "always"]
+ use-isnan: 2
+ valid-jsdoc: 0
+ valid-typeof: 2
+ vars-on-top: 2
+ wrap-iife: 0
+ wrap-regex: 0
+ yoda: [2, "never"]
http://git-wip-us.apache.org/repos/asf/ignite/blob/eb5ac0ae/modules/web-console/src/main/js/.gitignore
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/.gitignore b/modules/web-console/src/main/js/.gitignore
new file mode 100644
index 0000000..c966a99
--- /dev/null
+++ b/modules/web-console/src/main/js/.gitignore
@@ -0,0 +1,11 @@
+*.idea
+*.log
+.npmrc
+build/*
+!build/system.config.js
+node_modules
+ignite_modules_temp/*
+public/stylesheets/*.css
+serve/config/*.json
+serve/agent_dists/*.zip
+
http://git-wip-us.apache.org/repos/asf/ignite/blob/eb5ac0ae/modules/web-console/src/main/js/app/data/colors.json
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/data/colors.json b/modules/web-console/src/main/js/app/data/colors.json
new file mode 100644
index 0000000..188e485
--- /dev/null
+++ b/modules/web-console/src/main/js/app/data/colors.json
@@ -0,0 +1,22 @@
+[
+ "#1f77b4",
+ "#ff7f0e",
+ "#2ca02c",
+ "#d62728",
+ "#9467bd",
+ "#8c564b",
+ "#e377c2",
+ "#7f7f7f",
+ "#bcbd22",
+ "#17becf",
+ "#ffbb78",
+ "#98df8a",
+ "#ff9896",
+ "#c5b0d5",
+ "#aec7e8",
+ "#c49c94",
+ "#f7b6d2",
+ "#c7c7c7",
+ "#dbdb8d",
+ "#9edae5"
+]
http://git-wip-us.apache.org/repos/asf/ignite/blob/eb5ac0ae/modules/web-console/src/main/js/app/data/countries.json
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/data/countries.json b/modules/web-console/src/main/js/app/data/countries.json
new file mode 100644
index 0000000..f420f48
--- /dev/null
+++ b/modules/web-console/src/main/js/app/data/countries.json
@@ -0,0 +1,94 @@
+[
+ {
+ "name": "United States",
+ "code": "USA"
+ },
+ {
+ "name": "Canada",
+ "code": "CAN"
+ },
+ {
+ "name": "United Kingdom",
+ "code": "GBR"
+ },
+ {
+ "name": "Germany",
+ "code": "DEU"
+ },
+ {
+ "name": "France",
+ "code": "FRA"
+ },
+ {
+ "name": "Switzerland",
+ "code": "CHE"
+ },
+ {
+ "name": "Netherlands",
+ "code": "NLD"
+ },
+ {
+ "name": "Israel",
+ "code": "ISR"
+ },
+ {
+ "name": "Sweden",
+ "code": "SWE"
+ },
+ {
+ "name": "Russia",
+ "code": "RUS"
+ },
+ {
+ "name": "Other Europe",
+ "code": "Other Europe"
+ },
+ {
+ "name": "China",
+ "code": "CHN"
+ },
+ {
+ "name": "India",
+ "code": "IND"
+ },
+ {
+ "name": "Japan",
+ "code": "JPN"
+ },
+ {
+ "name": "Other Asia",
+ "code": "Other Asia"
+ },
+ {
+ "name": "Australia",
+ "code": "AUS"
+ },
+ {
+ "name": "Brazil",
+ "code": "BRA"
+ },
+ {
+ "name": "Argentina",
+ "code": "ARG"
+ },
+ {
+ "name": "Other South America",
+ "code": "Other South America"
+ },
+ {
+ "name": "South Africa",
+ "code": "ZAF"
+ },
+ {
+ "name": "Nigeria",
+ "code": "NGA"
+ },
+ {
+ "name": "Other Africa",
+ "code": "Other Africa"
+ },
+ {
+ "name": "Rest of the World",
+ "code": "Rest of the World"
+ }
+]
http://git-wip-us.apache.org/repos/asf/ignite/blob/eb5ac0ae/modules/web-console/src/main/js/app/data/demo-info.json
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/data/demo-info.json b/modules/web-console/src/main/js/app/data/demo-info.json
new file mode 100644
index 0000000..0d2ad22
--- /dev/null
+++ b/modules/web-console/src/main/js/app/data/demo-info.json
@@ -0,0 +1,14 @@
+[
+ {
+ "title": "Apache Ignite Web Console Demo",
+ "message": [
+ "<div>",
+ " <h4><i class='fa fa-cogs fa-cursor-default'></i> What Can You Do</h4>",
+ " <ul>",
+ " <li><b>Configuration</b> to checkout predefined clusters, caches, domain models and IGFS</li>",
+ " <li><b>SQL</b> to run various SQL queries on the demo database</li>",
+ " </ul>",
+ "</div>"
+ ]
+ }
+]
http://git-wip-us.apache.org/repos/asf/ignite/blob/eb5ac0ae/modules/web-console/src/main/js/app/data/event-types.json
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/data/event-types.json b/modules/web-console/src/main/js/app/data/event-types.json
new file mode 100644
index 0000000..8d0c878
--- /dev/null
+++ b/modules/web-console/src/main/js/app/data/event-types.json
@@ -0,0 +1,169 @@
+[
+ {
+ "label": "EVTS_CHECKPOINT",
+ "value": "EVTS_CHECKPOINT",
+ "class": "org.apache.ignite.events.EventType",
+ "events": [
+ "EVT_CHECKPOINT_SAVED",
+ "EVT_CHECKPOINT_LOADED",
+ "EVT_CHECKPOINT_REMOVED"
+ ]
+ },
+ {
+ "label": "EVTS_DEPLOYMENT",
+ "value": "EVTS_DEPLOYMENT",
+ "class": "org.apache.ignite.events.EventType",
+ "events": [
+ "EVT_CLASS_DEPLOYED",
+ "EVT_CLASS_UNDEPLOYED",
+ "EVT_CLASS_DEPLOY_FAILED",
+ "EVT_TASK_DEPLOYED",
+ "EVT_TASK_UNDEPLOYED",
+ "EVT_TASK_DEPLOY_FAILED"
+ ]
+ },
+ {
+ "label": "EVTS_ERROR",
+ "value": "EVTS_ERROR",
+ "class": "org.apache.ignite.events.EventType",
+ "events": [
+ "EVT_JOB_TIMEDOUT",
+ "EVT_JOB_FAILED",
+ "EVT_JOB_FAILED_OVER",
+ "EVT_JOB_REJECTED",
+ "EVT_JOB_CANCELLED",
+ "EVT_TASK_TIMEDOUT",
+ "EVT_TASK_FAILED",
+ "EVT_CLASS_DEPLOY_FAILED",
+ "EVT_TASK_DEPLOY_FAILED",
+ "EVT_TASK_DEPLOYED",
+ "EVT_TASK_UNDEPLOYED",
+ "EVT_CACHE_REBALANCE_STARTED",
+ "EVT_CACHE_REBALANCE_STOPPED"
+ ]
+ },
+ {
+ "label": "EVTS_DISCOVERY",
+ "value": "EVTS_DISCOVERY",
+ "class": "org.apache.ignite.events.EventType",
+ "events": [
+ "EVT_NODE_JOINED",
+ "EVT_NODE_LEFT",
+ "EVT_NODE_FAILED",
+ "EVT_NODE_SEGMENTED",
+ "EVT_CLIENT_NODE_DISCONNECTED",
+ "EVT_CLIENT_NODE_RECONNECTED"
+ ]
+ },
+ {
+ "label": "EVTS_JOB_EXECUTION",
+ "value": "EVTS_JOB_EXECUTION",
+ "class": "org.apache.ignite.events.EventType",
+ "events": [
+ "EVT_JOB_MAPPED",
+ "EVT_JOB_RESULTED",
+ "EVT_JOB_FAILED_OVER",
+ "EVT_JOB_STARTED",
+ "EVT_JOB_FINISHED",
+ "EVT_JOB_TIMEDOUT",
+ "EVT_JOB_REJECTED",
+ "EVT_JOB_FAILED",
+ "EVT_JOB_QUEUED",
+ "EVT_JOB_CANCELLED"
+ ]
+ },
+ {
+ "label": "EVTS_TASK_EXECUTION",
+ "value": "EVTS_TASK_EXECUTION",
+ "class": "org.apache.ignite.events.EventType",
+ "events": [
+ "EVT_TASK_STARTED",
+ "EVT_TASK_FINISHED",
+ "EVT_TASK_FAILED",
+ "EVT_TASK_TIMEDOUT",
+ "EVT_TASK_SESSION_ATTR_SET",
+ "EVT_TASK_REDUCED"
+ ]
+ },
+ {
+ "label": "EVTS_CACHE",
+ "value": "EVTS_CACHE",
+ "class": "org.apache.ignite.events.EventType",
+ "events": [
+ "EVT_CACHE_ENTRY_CREATED",
+ "EVT_CACHE_ENTRY_DESTROYED",
+ "EVT_CACHE_OBJECT_PUT",
+ "EVT_CACHE_OBJECT_READ",
+ "EVT_CACHE_OBJECT_REMOVED",
+ "EVT_CACHE_OBJECT_LOCKED",
+ "EVT_CACHE_OBJECT_UNLOCKED",
+ "EVT_CACHE_OBJECT_SWAPPED",
+ "EVT_CACHE_OBJECT_UNSWAPPED",
+ "EVT_CACHE_OBJECT_EXPIRED"
+ ]
+ },
+ {
+ "label": "EVTS_CACHE_REBALANCE",
+ "value": "EVTS_CACHE_REBALANCE",
+ "class": "org.apache.ignite.events.EventType",
+ "events": [
+ "EVT_CACHE_REBALANCE_STARTED",
+ "EVT_CACHE_REBALANCE_STOPPED",
+ "EVT_CACHE_REBALANCE_PART_LOADED",
+ "EVT_CACHE_REBALANCE_PART_UNLOADED",
+ "EVT_CACHE_REBALANCE_OBJECT_LOADED",
+ "EVT_CACHE_REBALANCE_OBJECT_UNLOADED",
+ "EVT_CACHE_REBALANCE_PART_DATA_LOST"
+ ]
+ },
+ {
+ "label": "EVTS_CACHE_LIFECYCLE",
+ "value": "EVTS_CACHE_LIFECYCLE",
+ "class": "org.apache.ignite.events.EventType",
+ "events": [
+ "EVT_CACHE_STARTED",
+ "EVT_CACHE_STOPPED",
+ "EVT_CACHE_NODES_LEFT"
+ ]
+ },
+ {
+ "label": "EVTS_CACHE_QUERY",
+ "value": "EVTS_CACHE_QUERY",
+ "class": "org.apache.ignite.events.EventType",
+ "events": [
+ "EVT_CACHE_QUERY_EXECUTED",
+ "EVT_CACHE_QUERY_OBJECT_READ"
+ ]
+ },
+ {
+ "label": "EVTS_SWAPSPACE",
+ "value": "EVTS_SWAPSPACE",
+ "class": "org.apache.ignite.events.EventType",
+ "events": [
+ "EVT_SWAP_SPACE_CLEARED",
+ "EVT_SWAP_SPACE_DATA_REMOVED",
+ "EVT_SWAP_SPACE_DATA_READ",
+ "EVT_SWAP_SPACE_DATA_STORED",
+ "EVT_SWAP_SPACE_DATA_EVICTED"
+ ]
+ },
+ {
+ "label": "EVTS_IGFS",
+ "value": "EVTS_IGFS",
+ "class": "org.apache.ignite.events.EventType",
+ "events": [
+ "EVT_IGFS_FILE_CREATED",
+ "EVT_IGFS_FILE_RENAMED",
+ "EVT_IGFS_FILE_DELETED",
+ "EVT_IGFS_FILE_OPENED_READ",
+ "EVT_IGFS_FILE_OPENED_WRITE",
+ "EVT_IGFS_FILE_CLOSED_WRITE",
+ "EVT_IGFS_FILE_CLOSED_READ",
+ "EVT_IGFS_FILE_PURGED",
+ "EVT_IGFS_META_UPDATED",
+ "EVT_IGFS_DIR_CREATED",
+ "EVT_IGFS_DIR_RENAMED",
+ "EVT_IGFS_DIR_DELETED"
+ ]
+ }
+]
http://git-wip-us.apache.org/repos/asf/ignite/blob/eb5ac0ae/modules/web-console/src/main/js/app/data/getting-started.json
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/data/getting-started.json b/modules/web-console/src/main/js/app/data/getting-started.json
new file mode 100644
index 0000000..7aff0b4
--- /dev/null
+++ b/modules/web-console/src/main/js/app/data/getting-started.json
@@ -0,0 +1,109 @@
+[
+ {
+ "title": "With Apache Ignite Web Console You Can",
+ "message": [
+ "<div class='col-xs-4'>",
+ " <img src='/images/ignite-puzzle.png' width='80%' class='getting-started-puzzle' />",
+ "</div>",
+ "<div class='col-xs-8'>",
+ " <ul>",
+ " <li>Generate cluster configuration</li>",
+ " <li>Import domain model from database</li>",
+ " <li>Configure all needed caches</li>",
+ " <li>Preview generated XML and Java code in browser</li>",
+ " <li>Download ready-to-use Maven project</li>",
+ " <li>Execute SQL queries on real clusters</li>",
+ " </ul>",
+ "</div>"
+ ]
+ },
+ {
+ "title": "Clusters",
+ "message": [
+ "<div class='col-xs-7'>",
+ " <img src='/images/cluster.png' width='100%' />",
+ "</div>",
+ "<div class='col-xs-5'>",
+ " <ul>",
+ " <li>Configure cluster properties</li>",
+ " <li>Associate cluster with caches</li>",
+ " </ul>",
+ "</div>"
+ ]
+ },
+ {
+ "title": "Domain Model",
+ "message": [
+ "<div class='col-xs-7'>",
+ " <img src='/images/domains.png' width='100%' />",
+ "</div>",
+ "<div class='col-xs-5'>",
+ " <ul>",
+ " <li>Import database schemas</li>",
+ " <li>Try in <span class='getting-started-demo'>Demo</span> mode</li>",
+ " </ul>",
+ "</div>"
+ ]
+ },
+ {
+ "title": "Caches",
+ "message": [
+ "<div class='col-xs-7'>",
+ " <img src='/images/cache.png' width='100%' />",
+ "</div>",
+ "<div class='col-xs-5'>",
+ " <ul>",
+ " <li>Configure memory settings</li>",
+ " <li>Configure persistence</li>",
+ " </ul>",
+ "</div>"
+ ]
+ },
+ {
+ "title": "In-memory File System",
+ "message": [
+ "<div class='col-xs-7'>",
+ " <img src='/images/igfs.png' width='100%' />",
+ "</div>",
+ "<div class='col-xs-5'>",
+ " <ul>",
+ " <li>Configure IGFS properties</li>",
+ " <li>Associate IGFS with clusters</li>",
+ " </ul>",
+ "</div>"
+ ]
+ },
+ {
+ "title": "Summary",
+ "message": [
+ "<div class='col-xs-7'>",
+ " <img src='/images/summary.png' width='100%' />",
+ "</div>",
+ "<div class='col-xs-5'>",
+ " <ul>",
+ " <li>Preview XML Configuration</li>",
+ " <li>Preview code configuration</li>",
+ " <li>Preview Docker file</li>",
+ " <li>Preview POM dependencies</li>",
+ " <li>Download ready-to-use project</li>",
+ " </ul>",
+ "</div>"
+ ]
+ },
+ {
+ "title": "SQL Queries",
+ "message": [
+ "<div class='col-xs-7'>",
+ " <img src='/images/query-table.png' width='100%' />",
+ "</div>",
+ "<div class='col-xs-5'>",
+ " <ul>",
+ " <li>Execute SQL Queries</li>",
+ " <li>View Execution Paln</li>",
+ " <li>View In-Memory Schema</li>",
+ " <li>View Streaming Charts</li>",
+ " </ul>",
+ "</div>"
+ ]
+ }
+]
http://git-wip-us.apache.org/repos/asf/ignite/blob/eb5ac0ae/modules/web-console/src/main/js/app/data/java-classes.json
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/data/java-classes.json b/modules/web-console/src/main/js/app/data/java-classes.json
new file mode 100644
index 0000000..e2cdff9
--- /dev/null
+++ b/modules/web-console/src/main/js/app/data/java-classes.json
@@ -0,0 +1,18 @@
+[
+ {"short": "BigDecimal", "full": "java.math.BigDecimal"},
+ {"short": "Boolean", "full": "java.lang.Boolean"},
+ {"short": "Byte", "full": "java.lang.Byte"},
+ {"short": "Character", "full": "java.lang.Character"},
+ {"short": "Date", "full": "java.sql.Date"},
+ {"short": "Double", "full": "java.lang.Double"},
+ {"short": "Float", "full": "java.lang.Float"},
+ {"short": "Integer", "full": "java.lang.Integer"},
+ {"short": "Long", "full": "java.lang.Long"},
+ {"short": "Number", "full": "java.lang.Number"},
+ {"short": "Object", "full": "java.lang.Object"},
+ {"short": "Short", "full": "java.lang.Short"},
+ {"short": "String", "full": "java.lang.String"},
+ {"short": "Time", "full": "java.sql.Time"},
+ {"short": "Timestamp", "full": "java.sql.Timestamp"},
+ {"short": "UUID", "full": "java.util.UUID"}
+]
http://git-wip-us.apache.org/repos/asf/ignite/blob/eb5ac0ae/modules/web-console/src/main/js/app/data/java-keywords.json
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/data/java-keywords.json b/modules/web-console/src/main/js/app/data/java-keywords.json
new file mode 100644
index 0000000..a2d5ec2
--- /dev/null
+++ b/modules/web-console/src/main/js/app/data/java-keywords.json
@@ -0,0 +1,55 @@
+[
+ "abstract",
+ "assert",
+ "boolean",
+ "break",
+ "byte",
+ "case",
+ "catch",
+ "char",
+ "class",
+ "const",
+ "continue",
+ "default",
+ "do",
+ "double",
+ "else",
+ "enum",
+ "extends",
+ "false",
+ "final",
+ "finally",
+ "float",
+ "for",
+ "goto",
+ "if",
+ "implements",
+ "import",
+ "instanceof",
+ "int",
+ "interface",
+ "long",
+ "native",
+ "new",
+ "null",
+ "package",
+ "private",
+ "protected",
+ "public",
+ "return",
+ "short",
+ "static",
+ "strictfp",
+ "super",
+ "switch",
+ "synchronized",
+ "this",
+ "throw",
+ "throws",
+ "transient",
+ "true",
+ "try",
+ "void",
+ "volatile",
+ "while"
+]
http://git-wip-us.apache.org/repos/asf/ignite/blob/eb5ac0ae/modules/web-console/src/main/js/app/data/java-primitives.json
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/data/java-primitives.json b/modules/web-console/src/main/js/app/data/java-primitives.json
new file mode 100644
index 0000000..eab6b69
--- /dev/null
+++ b/modules/web-console/src/main/js/app/data/java-primitives.json
@@ -0,0 +1,9 @@
+[
+ "boolean",
+ "byte",
+ "double",
+ "float",
+ "int",
+ "long",
+ "short"
+]
http://git-wip-us.apache.org/repos/asf/ignite/blob/eb5ac0ae/modules/web-console/src/main/js/app/decorator/select.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/decorator/select.js b/modules/web-console/src/main/js/app/decorator/select.js
new file mode 100644
index 0000000..2d22707
--- /dev/null
+++ b/modules/web-console/src/main/js/app/decorator/select.js
@@ -0,0 +1,77 @@
+/*
+ * 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';
+
+/**
+ * Special decorator that fix problem in AngularStrap selectAll / deselectAll methods.
+ * If this problem will be fixed in AngularStrap we can remove this delegate.
+ */
+angular.module('mgcrea.ngStrap.select')
+ .decorator('$select', ['$delegate', ($delegate) => {
+ function SelectFactoryDecorated(element, controller, config) {
+ const delegate = $delegate(element, controller, config);
+
+ // Common vars.
+ const options = angular.extend({}, $delegate.defaults, config);
+
+ const scope = delegate.$scope;
+
+ const valueByIndex = (index) => {
+ if (angular.isUndefined(scope.$matches[index]))
+ return null;
+
+ return scope.$matches[index].value;
+ };
+
+ const selectAll = (active) => {
+ const selected = [];
+
+ scope.$apply(() => {
+ for (let i = 0; i < scope.$matches.length; i++) {
+ if (scope.$isActive(i) === active) {
+ selected[i] = scope.$matches[i].value;
+
+ delegate.activate(i);
+
+ controller.$setViewValue(scope.$activeIndex.map(valueByIndex));
+ }
+ }
+ });
+
+ // Emit events.
+ for (let i = 0; i < selected.length; i++) {
+ if (selected[i])
+ scope.$emit(options.prefixEvent + '.select', selected[i], i, delegate);
+ }
+ };
+
+ scope.$selectAll = () => {
+ scope.$$postDigest(selectAll.bind(this, false));
+ };
+
+ scope.$selectNone = () => {
+ scope.$$postDigest(selectAll.bind(this, true));
+ };
+
+ return delegate;
+ }
+
+ SelectFactoryDecorated.defaults = $delegate.defaults;
+
+ return SelectFactoryDecorated;
+ }]);
http://git-wip-us.apache.org/repos/asf/ignite/blob/eb5ac0ae/modules/web-console/src/main/js/app/decorator/tooltip.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/decorator/tooltip.js b/modules/web-console/src/main/js/app/decorator/tooltip.js
new file mode 100644
index 0000000..a47337a
--- /dev/null
+++ b/modules/web-console/src/main/js/app/decorator/tooltip.js
@@ -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.
+ */
+
+import angular from 'angular';
+
+/**
+ * Special decorator that fix problem in AngularStrap $tooltip in special case.
+ * Case: when tooltip is shown on table row remove button and user click this button.
+ * If this problem will be fixed in AngularStrap we can remove this delegate.
+ */
+angular.module('mgcrea.ngStrap.tooltip')
+ .decorator('$tooltip', ['$delegate', ($delegate) => {
+ function TooltipFactoryDecorated(element, config) {
+ const delegate = $delegate(element, config);
+
+ const scope = delegate.$scope;
+
+ const options = delegate.$options;
+
+ const hideWraped = delegate.hide;
+
+ delegate.hide = (blur) => {
+ if (!delegate.$isShown)
+ return;
+
+ if (delegate.$element !== null)
+ return hideWraped(blur);
+
+ scope.$emit(options.prefixEvent + '.hide.before', delegate);
+
+ if (angular.isDefined(options.onBeforeHide) && angular.isFunction(options.onBeforeHide))
+ options.onBeforeHide(delegate);
+
+ delegate.$isShown = scope.$isShown = false;
+ scope.$$phase || (scope.$root && scope.$root.$$phase) || scope.$digest();
+ };
+
+ return delegate;
+ }
+
+ return TooltipFactoryDecorated;
+ }]);
http://git-wip-us.apache.org/repos/asf/ignite/blob/eb5ac0ae/modules/web-console/src/main/js/app/directives/bs-affix-update.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/bs-affix-update.directive.js b/modules/web-console/src/main/js/app/directives/bs-affix-update.directive.js
new file mode 100644
index 0000000..925722c
--- /dev/null
+++ b/modules/web-console/src/main/js/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/eb5ac0ae/modules/web-console/src/main/js/app/directives/centered/centered.css
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/centered/centered.css b/modules/web-console/src/main/js/app/directives/centered/centered.css
new file mode 100644
index 0000000..694c1d2
--- /dev/null
+++ b/modules/web-console/src/main/js/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/eb5ac0ae/modules/web-console/src/main/js/app/directives/centered/centered.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/centered/centered.directive.js b/modules/web-console/src/main/js/app/directives/centered/centered.directive.js
new file mode 100644
index 0000000..719194c
--- /dev/null
+++ b/modules/web-console/src/main/js/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/eb5ac0ae/modules/web-console/src/main/js/app/directives/hide-on-state-change/hide-on-state-change.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/hide-on-state-change/hide-on-state-change.directive.js b/modules/web-console/src/main/js/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/src/main/js/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/eb5ac0ae/modules/web-console/src/main/js/app/directives/information/information.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/information/information.directive.js b/modules/web-console/src/main/js/app/directives/information/information.directive.js
new file mode 100644
index 0000000..9250639
--- /dev/null
+++ b/modules/web-console/src/main/js/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 template from './information.jade!';
+
+export default ['igniteInformation', [() => {
+ return {
+ scope: {
+ title: '@'
+ },
+ restrict: 'E',
+ template,
+ replace: true,
+ transclude: true
+ };
+}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/eb5ac0ae/modules/web-console/src/main/js/app/directives/information/information.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/information/information.jade b/modules/web-console/src/main/js/app/directives/information/information.jade
new file mode 100644
index 0000000..b805d4a
--- /dev/null
+++ b/modules/web-console/src/main/js/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/eb5ac0ae/modules/web-console/src/main/js/app/directives/information/information.scss
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/information/information.scss b/modules/web-console/src/main/js/app/directives/information/information.scss
new file mode 100644
index 0000000..39f3c05
--- /dev/null
+++ b/modules/web-console/src/main/js/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/eb5ac0ae/modules/web-console/src/main/js/app/directives/ui-ace-docker/ui-ace-docker.controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/ui-ace-docker/ui-ace-docker.controller.js b/modules/web-console/src/main/js/app/directives/ui-ace-docker/ui-ace-docker.controller.js
new file mode 100644
index 0000000..32feaf3
--- /dev/null
+++ b/modules/web-console/src/main/js/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/eb5ac0ae/modules/web-console/src/main/js/app/directives/ui-ace-docker/ui-ace-docker.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/ui-ace-docker/ui-ace-docker.directive.js b/modules/web-console/src/main/js/app/directives/ui-ace-docker/ui-ace-docker.directive.js
new file mode 100644
index 0000000..47a52df
--- /dev/null
+++ b/modules/web-console/src/main/js/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 template 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,
+ template,
+ controller,
+ controllerAs: 'ctrl',
+ require: ['?^igniteUiAceTabs']
+ };
+}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/eb5ac0ae/modules/web-console/src/main/js/app/directives/ui-ace-docker/ui-ace-docker.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/ui-ace-docker/ui-ace-docker.jade b/modules/web-console/src/main/js/app/directives/ui-ace-docker/ui-ace-docker.jade
new file mode 100644
index 0000000..f634aed
--- /dev/null
+++ b/modules/web-console/src/main/js/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}
+
+div
+ .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')
+ |.
+ div(ng-if='ctrl.data' ignite-ace='{onLoad: onLoad, mode: "dockerfile"}' ng-model='ctrl.data')
http://git-wip-us.apache.org/repos/asf/ignite/blob/eb5ac0ae/modules/web-console/src/main/js/app/directives/ui-ace-java/ui-ace-java.controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/ui-ace-java/ui-ace-java.controller.js b/modules/web-console/src/main/js/app/directives/ui-ace-java/ui-ace-java.controller.js
new file mode 100644
index 0000000..f869e65
--- /dev/null
+++ b/modules/web-console/src/main/js/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/eb5ac0ae/modules/web-console/src/main/js/app/directives/ui-ace-java/ui-ace-java.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/ui-ace-java/ui-ace-java.directive.js b/modules/web-console/src/main/js/app/directives/ui-ace-java/ui-ace-java.directive.js
new file mode 100644
index 0000000..948f82c
--- /dev/null
+++ b/modules/web-console/src/main/js/app/directives/ui-ace-java/ui-ace-java.directive.js
@@ -0,0 +1,133 @@
+/*
+ * 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 template 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':
+ ctrl.generator = (cache) => {
+ const domains = _.reduce(scope.detail, (acc, domain) => {
+ if (_.includes(cache.domains, domain.value))
+ acc.push(domain.meta);
+
+ return acc;
+ }, []);
+
+ return generator.cacheStore(cache, domains).asString();
+ };
+
+ break;
+
+ default:
+ ctrl.generator = (data) => generator[method](data).asString();
+ }
+ }
+
+ if (typeof attrs.clusterCfg !== 'undefined') {
+ scope.$watch('cfg', (cfg) => {
+ if (typeof cfg !== 'undefined')
+ 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,
+ template,
+ controller,
+ controllerAs: 'ctrl',
+ require: ['igniteUiAceJava', '?^igniteUiAceTabs', '?^form', '?ngModel']
+ };
+}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/eb5ac0ae/modules/web-console/src/main/js/app/directives/ui-ace-java/ui-ace-java.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/ui-ace-java/ui-ace-java.jade b/modules/web-console/src/main/js/app/directives/ui-ace-java/ui-ace-java.jade
new file mode 100644
index 0000000..5acffb8
--- /dev/null
+++ b/modules/web-console/src/main/js/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/eb5ac0ae/modules/web-console/src/main/js/app/directives/ui-ace-pojos/ui-ace-pojos.controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/ui-ace-pojos/ui-ace-pojos.controller.js b/modules/web-console/src/main/js/app/directives/ui-ace-pojos/ui-ace-pojos.controller.js
new file mode 100644
index 0000000..bc185b3
--- /dev/null
+++ b/modules/web-console/src/main/js/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/eb5ac0ae/modules/web-console/src/main/js/app/directives/ui-ace-pojos/ui-ace-pojos.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/ui-ace-pojos/ui-ace-pojos.directive.js b/modules/web-console/src/main/js/app/directives/ui-ace-pojos/ui-ace-pojos.directive.js
new file mode 100644
index 0000000..6222dc0
--- /dev/null
+++ b/modules/web-console/src/main/js/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 template 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,
+ template,
+ controller,
+ controllerAs: 'ctrl',
+ require: ['?^igniteUiAceTabs']
+ };
+}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/eb5ac0ae/modules/web-console/src/main/js/app/directives/ui-ace-pojos/ui-ace-pojos.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/ui-ace-pojos/ui-ace-pojos.jade b/modules/web-console/src/main/js/app/directives/ui-ace-pojos/ui-ace-pojos.jade
new file mode 100644
index 0000000..3e82f12
--- /dev/null
+++ b/modules/web-console/src/main/js/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}"')
+
+div
+ .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")
+ div(ng-if='ctrl.data' ignite-ace='{onLoad: onLoad, mode: "java"}' ng-model='ctrl.data')
http://git-wip-us.apache.org/repos/asf/ignite/blob/eb5ac0ae/modules/web-console/src/main/js/app/directives/ui-ace-pom/ui-ace-pom.controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/ui-ace-pom/ui-ace-pom.controller.js b/modules/web-console/src/main/js/app/directives/ui-ace-pom/ui-ace-pom.controller.js
new file mode 100644
index 0000000..ec880bd
--- /dev/null
+++ b/modules/web-console/src/main/js/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/eb5ac0ae/modules/web-console/src/main/js/app/directives/ui-ace-pom/ui-ace-pom.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/ui-ace-pom/ui-ace-pom.directive.js b/modules/web-console/src/main/js/app/directives/ui-ace-pom/ui-ace-pom.directive.js
new file mode 100644
index 0000000..3d68ba9
--- /dev/null
+++ b/modules/web-console/src/main/js/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 template 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,
+ template,
+ controller,
+ controllerAs: 'ctrl',
+ require: ['?^igniteUiAceTabs']
+ };
+}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/eb5ac0ae/modules/web-console/src/main/js/app/directives/ui-ace-pom/ui-ace-pom.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/ui-ace-pom/ui-ace-pom.jade b/modules/web-console/src/main/js/app/directives/ui-ace-pom/ui-ace-pom.jade
new file mode 100644
index 0000000..b973a74
--- /dev/null
+++ b/modules/web-console/src/main/js/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/eb5ac0ae/modules/web-console/src/main/js/app/directives/ui-ace-tabs.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/ui-ace-tabs.directive.js b/modules/web-console/src/main/js/app/directives/ui-ace-tabs.directive.js
new file mode 100644
index 0000000..a9649c8
--- /dev/null
+++ b/modules/web-console/src/main/js/app/directives/ui-ace-tabs.directive.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 ['igniteUiAceTabs', [() => {
+ return {
+ restrict: 'AE',
+ controller: _.noop
+ };
+}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/eb5ac0ae/modules/web-console/src/main/js/app/directives/ui-ace-xml/ui-ace-xml.controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/ui-ace-xml/ui-ace-xml.controller.js b/modules/web-console/src/main/js/app/directives/ui-ace-xml/ui-ace-xml.controller.js
new file mode 100644
index 0000000..3233757
--- /dev/null
+++ b/modules/web-console/src/main/js/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);
+ };
+}];