You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2016/07/20 09:29:22 UTC
[11/45] ignite git commit: Ignite Web Console speed up bundle rebuild
and watch. Minor fixes.
Ignite Web Console speed up bundle rebuild and watch. Minor fixes.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/c38b3ba2
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/c38b3ba2
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/c38b3ba2
Branch: refs/heads/ignite-1232-1
Commit: c38b3ba2fe7a8e63d45259bc78aa47145c2032fd
Parents: e3c29d8
Author: Andrey Novikov <an...@apache.org>
Authored: Wed Jul 13 16:22:31 2016 +0700
Committer: Andrey Novikov <an...@apache.org>
Committed: Wed Jul 13 16:22:31 2016 +0700
----------------------------------------------------------------------
modules/web-console/DEVNOTES.txt | 29 +-
modules/web-console/src/main/js/.gitignore | 2 -
.../web-console/src/main/js/app/app.config.js | 86 +
modules/web-console/src/main/js/app/app.js | 274 +++
.../main/js/app/controllers/auth.controller.js | 30 +
.../js/app/controllers/notebooks.controller.js | 69 +
.../controllers/reset-password.controller.js | 51 +
.../js/app/directives/auto-focus.directive.js | 26 +
.../directives/centered/centered.directive.js | 2 +-
.../directives/copy-to-clipboard.directive.js | 29 +
.../information/information.directive.js | 4 +-
.../main/js/app/directives/match.directive.js | 27 +
.../app/directives/on-click-focus.directive.js | 26 +
.../directives/on-enter-focus-move.directive.js | 29 +
.../js/app/directives/on-enter.directive.js | 32 +
.../js/app/directives/on-escape.directive.js | 32 +
.../ui-ace-docker/ui-ace-docker.directive.js | 4 +-
.../ui-ace-java/ui-ace-java.directive.js | 4 +-
.../ui-ace-pojos/ui-ace-pojos.directive.js | 4 +-
.../ui-ace-pom/ui-ace-pom.directive.js | 4 +-
.../ui-ace-xml/ui-ace-xml.directive.js | 4 +-
.../js/app/filters/domainsValidation.filter.js | 33 +
.../src/main/js/app/helpers/jade/mixins.jade | 26 +-
modules/web-console/src/main/js/app/index.js | 241 ---
.../src/main/js/app/modules/Demo/Demo.module.js | 15 +-
.../src/main/js/app/modules/ace.module.js | 4 +-
.../main/js/app/modules/agent/agent.module.js | 10 +-
.../js/app/modules/branding/branding.module.js | 1 -
.../modules/branding/header-logo.directive.js | 4 +-
.../branding/powered-by-apache.directive.js | 4 +-
.../configuration/EventGroups.provider.js | 2 +-
.../configuration/generator/Pom.service.js | 2 +-
.../js/app/modules/dialog/dialog.factory.js | 4 +-
.../field/bs-select-placeholder.directive.js | 7 +-
.../modules/form/field/dropdown.directive.js | 9 +-
.../js/app/modules/form/field/dropdown.jade | 4 +-
.../main/js/app/modules/form/field/field.css | 2 +-
.../app/modules/form/field/field.directive.js | 6 +-
.../form/field/input/checkbox.directive.js | 9 +-
.../form/field/input/datalist.directive.js | 9 +-
.../app/modules/form/field/input/datalist.jade | 2 +-
.../form/field/input/number.directive.js | 9 +-
.../modules/form/field/input/text.directive.js | 11 +-
.../app/modules/form/group/group.directive.js | 4 +-
.../app/modules/form/group/table.directive.js | 4 +-
.../app/modules/form/panel/revert.directive.js | 4 +-
.../getting-started/GettingStarted.provider.js | 2 +-
.../js/app/modules/loading/loading.directive.js | 10 +-
.../js/app/modules/loading/loading.service.js | 2 +-
.../caches/concurrency.directive.js | 4 +-
.../configuration/caches/general.directive.js | 4 +-
.../states/configuration/caches/general.jade | 2 +-
.../configuration/caches/memory.directive.js | 4 +-
.../configuration/caches/query.directive.js | 4 +-
.../configuration/caches/rebalance.directive.js | 4 +-
.../caches/server-near-cache.directive.js | 4 +-
.../caches/statistics.directive.js | 4 +-
.../configuration/caches/store.directive.js | 4 +-
.../states/configuration/caches/store.jade | 4 +-
.../configuration/clusters/atomic.directive.js | 4 +-
.../clusters/attributes.directive.js | 4 +-
.../configuration/clusters/binary.directive.js | 4 +-
.../clusters/collision.directive.js | 4 +-
.../clusters/collision/custom.directive.js | 4 +-
.../clusters/collision/fifo-queue.directive.js | 4 +-
.../collision/job-stealing.directive.js | 4 +-
.../collision/priority-queue.directive.js | 4 +-
.../clusters/communication.directive.js | 4 +-
.../clusters/connector.directive.js | 4 +-
.../clusters/deployment.directive.js | 4 +-
.../clusters/discovery.directive.js | 4 +-
.../configuration/clusters/events.directive.js | 4 +-
.../clusters/failover.directive.js | 4 +-
.../configuration/clusters/general.directive.js | 4 +-
.../general/discovery/cloud.directive.js | 4 +-
.../general/discovery/google.directive.js | 4 +-
.../general/discovery/jdbc.directive.js | 4 +-
.../general/discovery/multicast.directive.js | 4 +-
.../clusters/general/discovery/s3.directive.js | 4 +-
.../general/discovery/shared.directive.js | 4 +-
.../clusters/general/discovery/vm.directive.js | 4 +-
.../clusters/general/discovery/vm.jade | 2 +-
.../general/discovery/zookeeper.directive.js | 4 +-
.../bounded-exponential-backoff.directive.js | 4 +-
.../zookeeper/retrypolicy/custom.directive.js | 4 +-
.../exponential-backoff.directive.js | 4 +-
.../zookeeper/retrypolicy/forever.directive.js | 4 +-
.../zookeeper/retrypolicy/n-times.directive.js | 4 +-
.../zookeeper/retrypolicy/one-time.directive.js | 4 +-
.../retrypolicy/until-elapsed.directive.js | 4 +-
.../configuration/clusters/igfs.directive.js | 4 +-
.../configuration/clusters/logger.directive.js | 4 +-
.../clusters/logger/custom.directive.js | 4 +-
.../clusters/logger/log4j.directive.js | 4 +-
.../clusters/logger/log4j2.directive.js | 4 +-
.../clusters/marshaller.directive.js | 4 +-
.../configuration/clusters/metrics.directive.js | 4 +-
.../configuration/clusters/ssl.directive.js | 4 +-
.../configuration/clusters/swap.directive.js | 4 +-
.../configuration/clusters/thread.directive.js | 4 +-
.../configuration/clusters/time.directive.js | 4 +-
.../clusters/transactions.directive.js | 4 +-
.../configuration/domains/general.directive.js | 4 +-
.../configuration/domains/query.directive.js | 4 +-
.../states/configuration/domains/query.jade | 14 +-
.../configuration/domains/store.directive.js | 4 +-
.../states/configuration/domains/store.jade | 8 +-
.../states/configuration/igfs/dual.directive.js | 4 +-
.../modules/states/configuration/igfs/dual.jade | 4 +-
.../igfs/fragmentizer.directive.js | 4 +-
.../configuration/igfs/general.directive.js | 4 +-
.../states/configuration/igfs/ipc.directive.js | 4 +-
.../states/configuration/igfs/misc.directive.js | 4 +-
.../modules/states/configuration/igfs/misc.jade | 12 +-
.../configuration/igfs/secondary.directive.js | 4 +-
.../configuration/preview-panel.directive.js | 4 +-
.../configuration/summary/summary.controller.js | 17 +-
.../main/js/app/modules/states/signin.state.js | 3 +-
.../main/js/app/modules/user/Auth.service.js | 10 +-
.../main/js/app/services/ChartColors.service.js | 2 +-
.../src/main/js/app/services/Clone.service.js | 64 +
.../src/main/js/app/services/Confirm.service.js | 70 +
.../js/app/services/ConfirmBatch.service.js | 92 +
.../js/app/services/CopyToClipboard.service.js | 50 +
.../main/js/app/services/Countries.service.js | 2 +-
.../src/main/js/app/services/Focus.service.js | 33 +
.../main/js/app/services/JavaTypes.service.js | 6 +-
.../main/js/app/services/LegacyTable.service.js | 205 +++
.../main/js/app/services/LegacyUtils.service.js | 948 ++++++++++
.../main/js/app/services/Messages.service.js | 63 +
.../js/app/services/ModelNormalizer.service.js | 59 +
.../app/services/UnsavedChangesGuard.service.js | 38 +
.../src/main/js/app/services/cleanup.service.js | 46 -
.../src/main/js/app/services/confirm.service.js | 70 -
modules/web-console/src/main/js/app/vendor.js | 54 +
.../src/main/js/build/system.config.js | 424 -----
.../src/main/js/controllers/admin-controller.js | 33 +-
.../main/js/controllers/caches-controller.js | 97 +-
.../main/js/controllers/clusters-controller.js | 142 +-
.../src/main/js/controllers/common-module.js | 1741 ------------------
.../main/js/controllers/domains-controller.js | 295 ++-
.../src/main/js/controllers/igfs-controller.js | 126 +-
.../main/js/controllers/profile-controller.js | 27 +-
.../src/main/js/controllers/sql-controller.js | 75 +-
.../src/main/js/generator/generator-java.js | 7 +-
.../src/main/js/generator/generator-xml.js | 5 +-
.../src/main/js/gulpfile.babel.js/paths.js | 65 +-
.../main/js/gulpfile.babel.js/tasks/build.js | 2 +-
.../main/js/gulpfile.babel.js/tasks/bundle.js | 68 +-
.../main/js/gulpfile.babel.js/tasks/clean.js | 5 +-
.../main/js/gulpfile.babel.js/tasks/connect.js | 47 -
.../src/main/js/gulpfile.babel.js/tasks/copy.js | 32 +-
.../main/js/gulpfile.babel.js/tasks/eslint.js | 46 -
.../gulpfile.babel.js/tasks/ignite-modules.js | 9 +-
.../src/main/js/gulpfile.babel.js/tasks/sass.js | 25 -
.../main/js/gulpfile.babel.js/tasks/watch.js | 20 +-
.../main/js/gulpfile.babel.js/webpack/common.js | 192 ++
.../webpack/environments/development.js | 64 +
.../webpack/environments/production.js | 45 +
.../main/js/gulpfile.babel.js/webpack/index.js | 32 +
.../webpack/plugins/progress.js | 82 +
modules/web-console/src/main/js/package.json | 301 +--
.../stylesheets/_font-awesome-custom.scss | 27 +-
.../src/main/js/public/stylesheets/style.scss | 10 +-
modules/web-console/src/main/js/serve/agent.js | 89 +-
.../web-console/src/main/js/serve/keys/test.crt | 13 -
.../web-console/src/main/js/serve/keys/test.key | 18 -
.../src/main/js/serve/routes/agent.js | 30 +-
.../js/views/configuration/domains-import.jade | 2 +-
.../main/js/views/configuration/domains.jade | 8 +-
.../main/js/views/configuration/summary.jade | 2 +-
.../src/main/js/views/includes/header.jade | 19 +-
.../web-console/src/main/js/views/index.jade | 18 -
.../web-console/src/main/js/views/reset.jade | 4 +-
.../src/main/js/views/settings/profile.jade | 16 +-
.../web-console/src/main/js/views/signin.jade | 52 +-
.../src/main/js/views/sql/notebook-new.jade | 2 +-
.../src/main/js/views/sql/paragraph-rate.jade | 2 +-
.../web-console/src/main/js/views/sql/sql.jade | 6 +-
.../main/js/views/templates/agent-download.jade | 2 +-
.../src/main/js/views/templates/clone.jade | 2 +-
parent/pom.xml | 8 +-
182 files changed, 3754 insertions(+), 3909 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/modules/web-console/DEVNOTES.txt
----------------------------------------------------------------------
diff --git a/modules/web-console/DEVNOTES.txt b/modules/web-console/DEVNOTES.txt
index 5a10a48..3732b78 100644
--- a/modules/web-console/DEVNOTES.txt
+++ b/modules/web-console/DEVNOTES.txt
@@ -3,25 +3,32 @@ Ignite Web Console Instructions
How to deploy locally:
-1. Install locally MongoDB (version >=3.x) follow instructions from site http://docs.mongodb.org/manual/installation
+1. Install locally MongoDB (version >=3.x) follow instructions from site http://docs.mongodb.org/manual/installation.
2. Install locally NodeJS (version >=4.x) using installer from site https://nodejs.org for your OS.
3. Change directory '$IGNITE_HOME/modules/web-console/src/main/js'.
-4. Run "npm install" in terminal for download all dependencies.
-5. Build ignite-web-agent module follow instructions from 'modules/web-agent/README.txt'.
-6. Copy ignite-web-agent-<version>.zip from target of ignite-web-agent module to 'modules/web-console/src/main/js/serve/agent_dists' folder.
-
-Steps 1 - 6 should be executed once.
+4. Update npm to 3.x:
+ Linux:
+ npm install -g npm
+ Windows:
+ npm install -g npm-windows-upgrade
+ npm-windows-upgrade
+ See: https://github.com/felixrieseberg/npm-windows-upgrade
+ Check npm version: "npm --version".
+5. Run "npm install --no-optional" in terminal for download dependencies.
+6. Build ignite-web-agent module follow instructions from 'modules/web-agent/README.txt'.
+7. Copy ignite-web-agent-<version>.zip from target of ignite-web-agent module to 'modules/web-console/src/main/js/serve/agent_dists' folder.
+
+Steps 1 - 7 should be executed once.
How to run console in development mode:
1. Configure MongoDB to run as service or in terminal change dir to $MONGO_INSTALL_DIR/server/3.0/bin
and start MongoDB by executing "mongod".
-2. In new terminal change directory to '$IGNITE_HOME/modules/web-console/src/main/js'
- and start application by executing "npm start" (for first time) or "node serve" to start backend.
+2. In new terminal change directory to '$IGNITE_HOME/modules/web-console/src/main/js'.
+ If needed run "npm install --no-optional" (if dependencies changed) and run "node serve" to start backend.
3. In new terminal change directory to '$IGNITE_HOME/modules/web-console/src/main/js'
- and start virtual server and local changes watcher by executing "gulp watch --debug"
- or "gulp connect" to start web server only.
+ and start webpack in development mode "npm run dev" .
-4. In browser open: http://localhost:8090
+4. In browser open: http://localhost:9000
http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/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
index c966a99..a6af5e1 100644
--- a/modules/web-console/src/main/js/.gitignore
+++ b/modules/web-console/src/main/js/.gitignore
@@ -2,10 +2,8 @@
*.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/c38b3ba2/modules/web-console/src/main/js/app/app.config.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/app.config.js b/modules/web-console/src/main/js/app/app.config.js
new file mode 100644
index 0000000..25c24b0
--- /dev/null
+++ b/modules/web-console/src/main/js/app/app.config.js
@@ -0,0 +1,86 @@
+/*
+ * 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 alertTemplateUrl from '../views/templates/alert.jade';
+
+const igniteConsoleCfg = angular.module('ignite-console.config', ['ngAnimate', 'mgcrea.ngStrap']);
+
+// Configure AngularJS animation: do not animate fa-spin.
+igniteConsoleCfg.config(['$animateProvider', ($animateProvider) => {
+ $animateProvider.classNameFilter(/^((?!(fa-spin)).)*$/);
+}]);
+
+// AngularStrap modal popup configuration.
+igniteConsoleCfg.config(['$modalProvider', ($modalProvider) => {
+ angular.extend($modalProvider.defaults, {
+ animation: 'am-fade-and-scale',
+ html: true
+ });
+}]);
+
+// AngularStrap popover configuration.
+igniteConsoleCfg.config(['$popoverProvider', ($popoverProvider) => {
+ angular.extend($popoverProvider.defaults, {
+ trigger: 'manual',
+ placement: 'right',
+ container: 'body',
+ templateUrl: '/templates/validation-error.html'
+ });
+}]);
+
+// AngularStrap tooltips configuration.
+igniteConsoleCfg.config(['$tooltipProvider', ($tooltipProvider) => {
+ angular.extend($tooltipProvider.defaults, {
+ container: 'body',
+ delay: 150,
+ placement: 'right',
+ html: 'true',
+ trigger: 'click hover'
+ });
+}]);
+
+// AngularStrap select (combobox) configuration.
+igniteConsoleCfg.config(['$selectProvider', ($selectProvider) => {
+ angular.extend($selectProvider.defaults, {
+ container: 'body',
+ maxLength: '5',
+ allText: 'Select All',
+ noneText: 'Clear All',
+ templateUrl: '/templates/select.html',
+ iconCheckmark: 'fa fa-check',
+ caretHtml: ''
+ });
+}]);
+
+// AngularStrap alerts configuration.
+igniteConsoleCfg.config(['$alertProvider', ($alertProvider) => {
+ angular.extend($alertProvider.defaults, {
+ container: 'body',
+ placement: 'top-right',
+ duration: '5',
+ templateUrl: alertTemplateUrl,
+ type: 'danger'
+ });
+}]);
+
+
+// AngularStrap dropdowns () configuration.
+igniteConsoleCfg.config(['$dropdownProvider', ($dropdownProvider) => {
+ angular.extend($dropdownProvider.defaults, {
+ templateUrl: 'templates/dropdown.html'
+ });
+}]);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/modules/web-console/src/main/js/app/app.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/app.js b/modules/web-console/src/main/js/app/app.js
new file mode 100644
index 0000000..00ae3eb
--- /dev/null
+++ b/modules/web-console/src/main/js/app/app.js
@@ -0,0 +1,274 @@
+/*
+ * 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 '../public/stylesheets/style.scss';
+
+import './app.config';
+
+import './decorator/select';
+import './decorator/tooltip';
+
+import './modules/form/form.module';
+import './modules/agent/agent.module.js';
+import './modules/query-notebooks/query-notebooks.module';
+import './modules/Demo/Demo.module.js';
+
+import './modules/states/signin.state';
+import './modules/states/logout.state';
+import './modules/states/password.state';
+import './modules/states/configuration.state';
+import './modules/states/sql.state';
+import './modules/states/profile.state';
+import './modules/states/admin.state';
+
+// ignite:modules
+import './modules/user/user.module';
+import './modules/branding/branding.module';
+import './modules/navbar/navbar.module';
+import './modules/configuration/configuration.module';
+import './modules/getting-started/GettingStarted.provider';
+import './modules/dialog/dialog.module';
+import './modules/Version/Version.provider';
+import './modules/ace.module';
+import './modules/socket.module';
+import './modules/loading/loading.module';
+// endignite
+
+// Directives.
+import igniteAutoFocus from './directives/auto-focus.directive.js';
+import igniteBsAffixUpdate from './directives/bs-affix-update.directive';
+import igniteCentered from './directives/centered/centered.directive.js';
+import igniteCopyToClipboard from './directives/copy-to-clipboard.directive.js';
+import igniteHideOnStateChange from './directives/hide-on-state-change/hide-on-state-change.directive';
+import igniteInformation from './directives/information/information.directive';
+import igniteMatch from './directives/match.directive.js';
+import igniteOnClickFocus from './directives/on-click-focus.directive.js';
+import igniteOnEnter from './directives/on-enter.directive.js';
+import igniteOnEnterFocusMove from './directives/on-enter-focus-move.directive.js';
+import igniteOnEscape from './directives/on-escape.directive.js';
+import igniteUiAceDocker from './directives/ui-ace-docker/ui-ace-docker.directive';
+import igniteUiAceJava from './directives/ui-ace-java/ui-ace-java.directive';
+import igniteUiAcePojos from './directives/ui-ace-pojos/ui-ace-pojos.directive';
+import igniteUiAcePom from './directives/ui-ace-pom/ui-ace-pom.directive';
+import igniteUiAceTabs from './directives/ui-ace-tabs.directive';
+import igniteUiAceXml from './directives/ui-ace-xml/ui-ace-xml.directive';
+
+// Services.
+import ChartColors from './services/ChartColors.service';
+import Clone from './services/Clone.service.js';
+import Confirm from './services/Confirm.service.js';
+import ConfirmBatch from './services/ConfirmBatch.service.js';
+import CopyToClipboard from './services/CopyToClipboard.service';
+import Countries from './services/Countries.service';
+import Focus from './services/Focus.service';
+import InetAddress from './services/InetAddress.service';
+import JavaTypes from './services/JavaTypes.service';
+import Messages from './services/Messages.service';
+import ModelNormalizer from './services/ModelNormalizer.service.js';
+import LegacyTable from './services/LegacyTable.service';
+import LegacyUtils from './services/LegacyUtils.service';
+import UnsavedChangesGuard from './services/UnsavedChangesGuard.service';
+
+// Providers.
+
+// Filters.
+import byName from './filters/byName.filter';
+import domainsValidation from './filters/domainsValidation.filter';
+import hasPojo from './filters/hasPojo.filter';
+
+// Generators
+import $generatorCommon from 'generator/generator-common';
+import $generatorJava from 'generator/generator-java';
+import $generatorOptional from 'generator/generator-optional';
+import $generatorProperties from 'generator/generator-properties';
+import $generatorReadme from 'generator/generator-readme';
+import $generatorXml from 'generator/generator-xml';
+
+window.$generatorCommon = $generatorCommon;
+window.$generatorJava = $generatorJava;
+window.$generatorOptional = $generatorOptional;
+window.$generatorProperties = $generatorProperties;
+window.$generatorReadme = $generatorReadme;
+window.$generatorXml = $generatorXml;
+
+// Controllers
+import admin from 'controllers/admin-controller';
+import caches from 'controllers/caches-controller';
+import clusters from 'controllers/clusters-controller';
+import domains from 'controllers/domains-controller';
+import igfs from 'controllers/igfs-controller';
+import profile from 'controllers/profile-controller';
+import sql from 'controllers/sql-controller';
+import auth from './controllers/auth.controller';
+import notebooks from './controllers/notebooks.controller';
+import resetPassword from './controllers/reset-password.controller';
+
+// Inject external modules.
+import 'ignite_modules_temp/index';
+
+import baseTemplate from '../views/base.jade';
+
+angular
+.module('ignite-console', [
+ // Optional AngularJS modules.
+ 'ngAnimate',
+ 'ngSanitize',
+ // Third party libs.
+ 'ngRetina',
+ 'btford.socket-io',
+ 'mgcrea.ngStrap',
+ 'ui.router',
+ 'gridster',
+ 'dndLists',
+ 'nvd3',
+ 'smart-table',
+ 'treeControl',
+ 'ui.grid',
+ 'ui.grid.saveState',
+ 'ui.grid.selection',
+ 'ui.grid.resizeColumns',
+ 'ui.grid.autoResize',
+ 'ui.grid.exporter',
+ // Base modules.
+ 'ignite-console.ace',
+ 'ignite-console.Form',
+ 'ignite-console.user',
+ 'ignite-console.branding',
+ 'ignite-console.socket',
+ 'ignite-console.agent',
+ 'ignite-console.query-notebooks',
+ 'ignite-console.demo',
+ // States.
+ 'ignite-console.states.login',
+ 'ignite-console.states.logout',
+ 'ignite-console.states.password',
+ 'ignite-console.states.configuration',
+ 'ignite-console.states.sql',
+ 'ignite-console.states.profile',
+ 'ignite-console.states.admin',
+ // Common modules.
+ 'ignite-console.dialog',
+ 'ignite-console.navbar',
+ 'ignite-console.configuration',
+ 'ignite-console.getting-started',
+ 'ignite-console.version',
+ 'ignite-console.loading',
+ // Ignite configuration module.
+ 'ignite-console.config',
+ // Ignite modules.
+ 'ignite-console.modules'
+])
+// Directives.
+.directive(...igniteAutoFocus)
+.directive(...igniteBsAffixUpdate)
+.directive(...igniteCentered)
+.directive(...igniteCopyToClipboard)
+.directive(...igniteHideOnStateChange)
+.directive(...igniteInformation)
+.directive(...igniteMatch)
+.directive(...igniteOnClickFocus)
+.directive(...igniteOnEnter)
+.directive(...igniteOnEnterFocusMove)
+.directive(...igniteOnEscape)
+.directive(...igniteUiAceDocker)
+.directive(...igniteUiAceJava)
+.directive(...igniteUiAcePojos)
+.directive(...igniteUiAcePom)
+.directive(...igniteUiAceTabs)
+.directive(...igniteUiAceXml)
+// Services.
+.service(...ChartColors)
+.service(...Clone)
+.service(...Confirm)
+.service(...ConfirmBatch)
+.service(...CopyToClipboard)
+.service(...Countries)
+.service(...Focus)
+.service(...InetAddress)
+.service(...JavaTypes)
+.service(...Messages)
+.service(...ModelNormalizer)
+.service(...LegacyTable)
+.service(...LegacyUtils)
+.service(...UnsavedChangesGuard)
+// Controllers.
+.controller(...admin)
+.controller(...auth)
+.controller(...notebooks)
+.controller(...resetPassword)
+.controller(...caches)
+.controller(...clusters)
+.controller(...domains)
+.controller(...igfs)
+.controller(...profile)
+.controller(...sql)
+// Filters.
+.filter(...hasPojo)
+.filter(...domainsValidation)
+.filter(...byName)
+.config(['$stateProvider', '$locationProvider', '$urlRouterProvider', ($stateProvider, $locationProvider, $urlRouterProvider) => {
+ // Set up the states.
+ $stateProvider
+ .state('base', {
+ url: '',
+ abstract: true,
+ templateUrl: baseTemplate
+ })
+ .state('settings', {
+ url: '/settings',
+ abstract: true,
+ templateUrl: baseTemplate
+ });
+
+ $urlRouterProvider.otherwise('/');
+
+ $locationProvider.html5Mode(true);
+}])
+.run(['$rootScope', '$state', 'MetaTags', 'gettingStarted', ($root, $state, $meta, gettingStarted) => {
+ $root._ = _;
+ $root.$state = $state;
+ $root.$meta = $meta;
+ $root.gettingStarted = gettingStarted;
+}])
+.run(['$rootScope', 'Auth', 'User', 'IgniteAgentMonitor', ($root, Auth, User, agentMonitor) => {
+ if (Auth.authorized) {
+ User.read()
+ .then((user) => $root.$broadcast('user', user))
+ .then(() => Auth.authorized && agentMonitor.init());
+ }
+}])
+.run(['$rootScope', ($root) => {
+ $root.$on('$stateChangeStart', () => {
+ _.forEach(angular.element('.modal'), (m) => angular.element(m).scope().$hide());
+ });
+}])
+.run(['$rootScope', '$http', '$state', 'IgniteMessages', 'User',
+ ($root, $http, $state, Messages, User) => { // eslint-disable-line no-shadow
+ $root.revertIdentity = () => {
+ $http
+ .get('/api/v1/admin/revert/identity')
+ .then(User.read)
+ .then((user) => {
+ $root.$broadcast('user', user);
+
+ $state.go('settings.admin');
+ })
+ .catch(Messages.showError);
+ };
+ }
+]);
+
http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/modules/web-console/src/main/js/app/controllers/auth.controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/controllers/auth.controller.js b/modules/web-console/src/main/js/app/controllers/auth.controller.js
new file mode 100644
index 0000000..21ffeb8
--- /dev/null
+++ b/modules/web-console/src/main/js/app/controllers/auth.controller.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.
+ */
+
+// Sign in controller.
+// TODO IGNITE-1936 Refactor this controller.
+export default ['auth', [
+ '$scope', 'IgniteFocus', 'IgniteCountries', 'Auth',
+ ($scope, Focus, Countries, Auth) => {
+ $scope.auth = Auth.auth;
+ $scope.forgotPassword = Auth.forgotPassword;
+ $scope.action = 'signin';
+ $scope.countries = Countries.getAll();
+
+ Focus.move('user_email');
+ }
+]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/modules/web-console/src/main/js/app/controllers/notebooks.controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/controllers/notebooks.controller.js b/modules/web-console/src/main/js/app/controllers/notebooks.controller.js
new file mode 100644
index 0000000..0440c46
--- /dev/null
+++ b/modules/web-console/src/main/js/app/controllers/notebooks.controller.js
@@ -0,0 +1,69 @@
+/*
+ * 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.
+ */
+
+// Controller that load notebooks in navigation bar .
+export default ['notebooks', [
+ '$rootScope', '$scope', '$modal', '$state', '$http', 'IgniteMessages',
+ ($root, $scope, $modal, $state, $http, Messages) => {
+ $root.notebooks = [];
+
+ // Pre-fetch modal dialogs.
+ const _notebookNewModal = $modal({scope: $scope, templateUrl: '/sql/notebook-new.html', show: false});
+
+ $root.rebuildDropdown = function() {
+ $scope.notebookDropdown = [
+ {text: 'Create new notebook', click: 'inputNotebookName()'},
+ {divider: true}
+ ];
+
+ _.forEach($root.notebooks, (notebook) => $scope.notebookDropdown.push({
+ text: notebook.name,
+ sref: 'base.sql.notebook({noteId:"' + notebook._id + '"})'
+ }));
+ };
+
+ $root.reloadNotebooks = function() {
+ // When landing on the page, get clusters and show them.
+ $http.post('/api/v1/notebooks/list')
+ .success((data) => {
+ $root.notebooks = data;
+
+ $root.rebuildDropdown();
+ })
+ .error(Messages.showError);
+ };
+
+ $root.inputNotebookName = () => {
+ _notebookNewModal.$promise.then(_notebookNewModal.show);
+ };
+
+ $root.createNewNotebook = (name) => {
+ $http.post('/api/v1/notebooks/new', {name})
+ .success((noteId) => {
+ _notebookNewModal.hide();
+
+ $root.reloadNotebooks();
+
+ $state.go('base.sql.notebook', {noteId});
+ })
+ .error(Messages.showError);
+ };
+
+ $root.reloadNotebooks();
+
+ }
+]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/modules/web-console/src/main/js/app/controllers/reset-password.controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/controllers/reset-password.controller.js b/modules/web-console/src/main/js/app/controllers/reset-password.controller.js
new file mode 100644
index 0000000..f3cee81
--- /dev/null
+++ b/modules/web-console/src/main/js/app/controllers/reset-password.controller.js
@@ -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.
+ */
+
+// Controller for password reset.
+export default ['resetPassword', [
+ '$scope', '$modal', '$http', '$state', 'IgniteMessages', 'IgniteFocus',
+ ($scope, $modal, $http, $state, Messages, Focus) => {
+ if ($state.params.token) {
+ $http.post('/api/v1/password/validate/token', {token: $state.params.token})
+ .success((res) => {
+ $scope.email = res.email;
+ $scope.token = res.token;
+ $scope.error = res.error;
+
+ if ($scope.token && !$scope.error)
+ Focus.move('user_password');
+ });
+ }
+
+ // Try to reset user password for provided token.
+ $scope.resetPassword = (reset_info) => {
+ $http.post('/api/v1/password/reset', reset_info)
+ .success(() => {
+ Messages.showInfo('Password successfully changed');
+
+ $state.go('base.configuration.clusters');
+ })
+ .error((err, state) => {
+ Messages.showError(err);
+
+ if (state === 503)
+ $state.go('base.configuration.clusters');
+ });
+ };
+
+ }
+]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/modules/web-console/src/main/js/app/directives/auto-focus.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/auto-focus.directive.js b/modules/web-console/src/main/js/app/directives/auto-focus.directive.js
new file mode 100644
index 0000000..326fe1f
--- /dev/null
+++ b/modules/web-console/src/main/js/app/directives/auto-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 auto-focus specified element.
+export default ['igniteAutoFocus', ['$timeout', ($timeout) => {
+ return {
+ restrict: 'AC',
+ link(scope, element) {
+ $timeout(() => element[0].focus());
+ }
+ };
+}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/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
index 719194c..4abd086 100644
--- 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
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-import './centered.css!';
+import './centered.css';
export default ['centered', [() => {
return {
http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/modules/web-console/src/main/js/app/directives/copy-to-clipboard.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/copy-to-clipboard.directive.js b/modules/web-console/src/main/js/app/directives/copy-to-clipboard.directive.js
new file mode 100644
index 0000000..ee2110e
--- /dev/null
+++ b/modules/web-console/src/main/js/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/c38b3ba2/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
index 9250639..a9a2f8c 100644
--- 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
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-import template from './information.jade!';
+import templateUrl from './information.jade';
export default ['igniteInformation', [() => {
return {
@@ -23,7 +23,7 @@ export default ['igniteInformation', [() => {
title: '@'
},
restrict: 'E',
- template,
+ templateUrl,
replace: true,
transclude: true
};
http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/modules/web-console/src/main/js/app/directives/match.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/match.directive.js b/modules/web-console/src/main/js/app/directives/match.directive.js
new file mode 100644
index 0000000..3a45f6d
--- /dev/null
+++ b/modules/web-console/src/main/js/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/c38b3ba2/modules/web-console/src/main/js/app/directives/on-click-focus.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/on-click-focus.directive.js b/modules/web-console/src/main/js/app/directives/on-click-focus.directive.js
new file mode 100644
index 0000000..5c9ee88
--- /dev/null
+++ b/modules/web-console/src/main/js/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/c38b3ba2/modules/web-console/src/main/js/app/directives/on-enter-focus-move.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/on-enter-focus-move.directive.js b/modules/web-console/src/main/js/app/directives/on-enter-focus-move.directive.js
new file mode 100644
index 0000000..2dd2884
--- /dev/null
+++ b/modules/web-console/src/main/js/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/c38b3ba2/modules/web-console/src/main/js/app/directives/on-enter.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/on-enter.directive.js b/modules/web-console/src/main/js/app/directives/on-enter.directive.js
new file mode 100644
index 0000000..459220e
--- /dev/null
+++ b/modules/web-console/src/main/js/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/c38b3ba2/modules/web-console/src/main/js/app/directives/on-escape.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/on-escape.directive.js b/modules/web-console/src/main/js/app/directives/on-escape.directive.js
new file mode 100644
index 0000000..aa1accd
--- /dev/null
+++ b/modules/web-console/src/main/js/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/c38b3ba2/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
index 47a52df..08e4f76 100644
--- 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
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-import template from './ui-ace-docker.jade!';
+import templateUrl from './ui-ace-docker.jade';
import controller from './ui-ace-docker.controller';
export default ['igniteUiAceDocker', [() => {
@@ -38,7 +38,7 @@ export default ['igniteUiAceDocker', [() => {
data: '=ngModel'
},
link,
- template,
+ templateUrl,
controller,
controllerAs: 'ctrl',
require: ['?^igniteUiAceTabs']
http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/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
index cdce0fc..17d3a00 100644
--- 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
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-import template from './ui-ace-java.jade!';
+import templateUrl from './ui-ace-java.jade';
import controller from './ui-ace-java.controller';
export default ['igniteUiAceJava', ['GeneratorJava', (generator) => {
@@ -125,7 +125,7 @@ export default ['igniteUiAceJava', ['GeneratorJava', (generator) => {
data: '=?ngModel'
},
link,
- template,
+ templateUrl,
controller,
controllerAs: 'ctrl',
require: ['igniteUiAceJava', '?^igniteUiAceTabs', '?^form', '?ngModel']
http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/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
index 6222dc0..7c224b7 100644
--- 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
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-import template from './ui-ace-pojos.jade!';
+import templateUrl from './ui-ace-pojos.jade';
import controller from './ui-ace-pojos.controller';
export default ['igniteUiAcePojos', [() => {
@@ -38,7 +38,7 @@ export default ['igniteUiAcePojos', [() => {
pojos: '=ngModel'
},
link,
- template,
+ templateUrl,
controller,
controllerAs: 'ctrl',
require: ['?^igniteUiAceTabs']
http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/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
index 3d68ba9..2a7a878 100644
--- 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
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-import template from './ui-ace-pom.jade!';
+import templateUrl from './ui-ace-pom.jade';
import controller from './ui-ace-pom.controller';
export default ['igniteUiAcePom', [() => {
@@ -33,7 +33,7 @@ export default ['igniteUiAcePom', [() => {
cluster: '='
},
link,
- template,
+ templateUrl,
controller,
controllerAs: 'ctrl',
require: ['?^igniteUiAceTabs']
http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/modules/web-console/src/main/js/app/directives/ui-ace-xml/ui-ace-xml.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/ui-ace-xml/ui-ace-xml.directive.js b/modules/web-console/src/main/js/app/directives/ui-ace-xml/ui-ace-xml.directive.js
index 1e913fb..3bae4de 100644
--- a/modules/web-console/src/main/js/app/directives/ui-ace-xml/ui-ace-xml.directive.js
+++ b/modules/web-console/src/main/js/app/directives/ui-ace-xml/ui-ace-xml.directive.js
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-import template from './ui-ace-xml.jade!';
+import templateUrl from './ui-ace-xml.jade';
import controller from './ui-ace-xml.controller';
export default ['igniteUiAceXml', ['GeneratorXml', (generator) => {
@@ -125,7 +125,7 @@ export default ['igniteUiAceXml', ['GeneratorXml', (generator) => {
data: '=?ngModel'
},
link,
- template,
+ templateUrl,
controller,
controllerAs: 'ctrl',
require: ['igniteUiAceXml', '?^igniteUiAceTabs', '?^form', '?ngModel']
http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/modules/web-console/src/main/js/app/filters/domainsValidation.filter.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/filters/domainsValidation.filter.js b/modules/web-console/src/main/js/app/filters/domainsValidation.filter.js
new file mode 100644
index 0000000..1a38392
--- /dev/null
+++ b/modules/web-console/src/main/js/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/c38b3ba2/modules/web-console/src/main/js/app/helpers/jade/mixins.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/helpers/jade/mixins.jade b/modules/web-console/src/main/js/app/helpers/jade/mixins.jade
index 2b8b282..08ebe87 100644
--- a/modules/web-console/src/main/js/app/helpers/jade/mixins.jade
+++ b/modules/web-console/src/main/js/app/helpers/jade/mixins.jade
@@ -42,7 +42,7 @@ mixin main-table(title, rows, focusId, click, rowTemplate, searchField)
tbody
tr(ng-repeat='row in displayedRows track by row._id' ignite-bs-affix-update)
td
- a(ng-class='{active: row._id == selectedItem._id}' on-click-focus=focusId ng-click=click) #{rowTemplate}
+ a(ng-class='{active: row._id == selectedItem._id}' ignite-on-click-focus=focusId ng-click=click) #{rowTemplate}
label.placeholder(ng-show='displayedRows.length == 0') No #{title} found
//- Mixin with save, remove, clone and undo buttons.
@@ -359,8 +359,8 @@ mixin table-text-field(field, items, valid, save, placeholder, newItem)
data-placeholder=placeholder
data-ignite-unique=items
data-ignite-form-field-input-autofocus='true'
- on-enter=onEnter
- on-escape=onEscape
+ ignite-on-enter=onEnter
+ ignite-on-escape=onEscape
ng-blur=onBlur
)
block
@@ -389,8 +389,8 @@ mixin table-java-class-field(lbl, field, items, valid, save, newItem)
data-placeholder='Enter fully qualified class name'
- on-enter=onEnter
- on-escape=onEscape
+ ignite-on-enter=onEnter
+ ignite-on-escape=onEscape
ng-blur=onBlur
)
+error-feedback('form[ngModelName].$error.javaBuiltInClass', 'javaBuiltInClass', lbl + ' should not be the Java built-in class!')
@@ -419,8 +419,8 @@ mixin table-java-package-field(field, items, valid, save, newItem)
data-java-package-name='true'
data-ignite-unique=items
data-ignite-form-field-input-autofocus='true'
- on-enter=onEnter
- on-escape=onEscape
+ ignite-on-enter=onEnter
+ ignite-on-escape=onEscape
ng-blur=onBlur
)
block
@@ -445,8 +445,8 @@ mixin table-address-field(field, items, valid, save, newItem, portRange)
data-ipaddress-with-port-range=portRange ? 'true' : null
data-ignite-unique=items
data-ignite-form-field-input-autofocus='true'
- on-enter=onEnter
- on-escape=onEscape
+ ignite-on-enter=onEnter
+ ignite-on-escape=onEscape
ng-blur=onBlur
)
block
@@ -571,9 +571,9 @@ mixin table-pair-edit(tbl, prefix, keyPlaceholder, valPlaceholder, keyJavaBuiltI
.fieldSep !{divider}
.input-tip
if keyJavaBuiltInTypes
- input.form-control(id=keyFocusId enter-focus-next=valFocusId type='text' ng-model=keyModel placeholder=keyPlaceholder bs-typeahead container='body' retain-selection data-min-length='1' bs-options='javaClass for javaClass in javaBuiltInClasses' on-escape='tableReset()')
+ input.form-control(id=keyFocusId ignite-on-enter-focus-move=valFocusId type='text' ng-model=keyModel placeholder=keyPlaceholder bs-typeahead container='body' ignite-retain-selection data-min-length='1' bs-options='javaClass for javaClass in javaBuiltInClasses' ignite-on-escape='tableReset()')
else
- input.form-control(id=keyFocusId enter-focus-next=valFocusId type='text' ng-model=keyModel placeholder=keyPlaceholder on-escape='tableReset()')
+ input.form-control(id=keyFocusId ignite-on-enter-focus-move=valFocusId type='text' ng-model=keyModel placeholder=keyPlaceholder ignite-on-escape='tableReset()')
.col-xs-6.col-sm-6.col-md-6
-var arg = keyModel + ', ' + valModel
-var btnVisible = 'tablePairSaveVisible(' + tbl + ', ' + index + ')'
@@ -583,6 +583,6 @@ mixin table-pair-edit(tbl, prefix, keyPlaceholder, valPlaceholder, keyJavaBuiltI
+btn-save(btnVisible, btnSave)
.input-tip
if valueJavaBuiltInTypes
- input.form-control(id=valFocusId type='text' ng-model=valModel placeholder=valPlaceholder bs-typeahead container='body' retain-selection data-min-length='1' bs-options='javaClass for javaClass in javaBuiltInClasses' on-enter=btnVisibleAndSave on-escape='tableReset()')
+ input.form-control(id=valFocusId type='text' ng-model=valModel placeholder=valPlaceholder bs-typeahead container='body' ignite-retain-selection data-min-length='1' bs-options='javaClass for javaClass in javaBuiltInClasses' ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset()')
else
- input.form-control(id=valFocusId type='text' ng-model=valModel placeholder=valPlaceholder on-enter=btnVisibleAndSave on-escape='tableReset()')
+ input.form-control(id=valFocusId type='text' ng-model=valModel placeholder=valPlaceholder ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset()')
http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/modules/web-console/src/main/js/app/index.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/index.js b/modules/web-console/src/main/js/app/index.js
deleted file mode 100644
index 397d25f..0000000
--- a/modules/web-console/src/main/js/app/index.js
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import _ from 'lodash';
-import ace from 'ace';
-import angular from 'angular';
-import pdfMake from 'pdfmake';
-
-ace.config.set('basePath', '/jspm_packages/github/ajaxorg/ace-builds@1.2.3');
-
-window._ = _;
-window.require = ace.require; // TODO Should be removed after full refactoring to directives.
-window.pdfMake = pdfMake;
-
-import 'angular-animate';
-import 'angular-sanitize';
-import 'angular-strap';
-import 'angular-socket-io';
-import 'angular-retina';
-import 'angular-ui-router';
-import 'angular-ui-router-metatags';
-import 'angular-smart-table';
-import 'angular-ui-grid';
-import 'angular-drag-and-drop-lists';
-import 'angular-nvd3';
-import 'angular-tree-control';
-import 'angular-gridster';
-
-import 'bootstrap-carousel';
-import 'file-saver';
-import 'jszip';
-import 'query-command-supported';
-
-import 'public/stylesheets/style.css!';
-
-import 'angular-gridster/dist/angular-gridster.min.css!';
-import 'angular-tree-control/css/tree-control-attribute.css!';
-import 'angular-tree-control/css/tree-control.css!';
-import 'angular-ui-grid/ui-grid.css!';
-import 'angular-motion/dist/angular-motion.css!';
-
-import './decorator/select';
-import './decorator/tooltip';
-
-import './services/JavaTypes.service.js';
-import './modules/form/form.module';
-import './modules/agent/agent.module.js';
-import './modules/query-notebooks/query-notebooks.module';
-import './modules/Demo/Demo.module.js';
-
-import './modules/states/signin.state';
-import './modules/states/logout.state';
-import './modules/states/password.state';
-import './modules/states/configuration.state';
-import './modules/states/sql.state';
-import './modules/states/profile.state';
-import './modules/states/admin.state';
-
-// ignite:modules
-import './modules/user/user.module';
-import './modules/branding/branding.module';
-import './modules/navbar/navbar.module';
-import './modules/configuration/configuration.module';
-import './modules/getting-started/GettingStarted.provider';
-import './modules/dialog/dialog.module';
-import './modules/Version/Version.provider';
-import './modules/ace.module';
-import './modules/socket.module';
-import './modules/loading/loading.module';
-// endignite
-
-// Directives.
-import igniteHideOnStateChange from './directives/hide-on-state-change/hide-on-state-change.directive';
-import igniteInformation from './directives/information/information.directive';
-import igniteUiAceTabs from './directives/ui-ace-tabs.directive';
-import igniteUiAceXml from './directives/ui-ace-xml/ui-ace-xml.directive';
-import igniteUiAceJava from './directives/ui-ace-java/ui-ace-java.directive';
-import igniteUiAcePom from './directives/ui-ace-pom/ui-ace-pom.directive';
-import igniteUiAceDocker from './directives/ui-ace-docker/ui-ace-docker.directive';
-import igniteUiAcePojos from './directives/ui-ace-pojos/ui-ace-pojos.directive';
-import igniteBsAffixUpdate from './directives/bs-affix-update.directive';
-import ignite\u0421entered from './directives/centered/centered.directive.js';
-
-// Services.
-import cleanup from './services/cleanup.service';
-import confirm from './services/confirm.service';
-import IgniteInetAddress from './services/InetAddress.service';
-import IgniteCountries from './services/Countries.service';
-import IgniteChartColors from './services/ChartColors.service';
-import JavaTypes from './services/JavaTypes.service';
-
-// Providers.
-
-// Filters.
-import hasPojo from './filters/hasPojo.filter';
-import byName from './filters/byName.filter';
-
-// Generators
-import $generatorCommon from 'generator/generator-common';
-import $generatorJava from 'generator/generator-java';
-import $generatorOptional from 'generator/generator-optional';
-import $generatorProperties from 'generator/generator-properties';
-import $generatorReadme from 'generator/generator-readme';
-import $generatorXml from 'generator/generator-xml';
-
-window.$generatorCommon = $generatorCommon;
-window.$generatorJava = $generatorJava;
-window.$generatorOptional = $generatorOptional;
-window.$generatorProperties = $generatorProperties;
-window.$generatorReadme = $generatorReadme;
-window.$generatorXml = $generatorXml;
-
-// Add legacy logic;
-import consoleModule from 'controllers/common-module';
-window.consoleModule = consoleModule;
-
-import 'controllers/admin-controller';
-import 'controllers/caches-controller';
-import 'controllers/clusters-controller';
-import 'controllers/domains-controller';
-import 'controllers/igfs-controller';
-import 'controllers/profile-controller';
-import 'controllers/sql-controller';
-
-// Inject external modules.
-import 'ignite_modules_temp/index';
-
-angular
-.module('ignite-console', [
- 'ngRetina',
- 'btford.socket-io',
- 'ngAnimate',
- 'ngSanitize',
- 'mgcrea.ngStrap',
- 'ui.router',
- 'gridster',
- // Base modules.
- 'ignite-console.ace',
- 'ignite-console.Form',
- 'ignite-console.user',
- 'ignite-console.branding',
- 'ignite-console.socket',
- 'ignite-console.agent',
- 'ignite-console.query-notebooks',
- 'ignite-console.demo',
- // States.
- 'ignite-console.states.login',
- 'ignite-console.states.logout',
- 'ignite-console.states.password',
- 'ignite-console.states.configuration',
- 'ignite-console.states.sql',
- 'ignite-console.states.profile',
- 'ignite-console.states.admin',
- // Common modules.
- 'ignite-console.dialog',
- 'ignite-console.navbar',
- 'ignite-console.configuration',
- 'ignite-console.getting-started',
- 'ignite-console.version',
- 'ignite-console.loading',
- // Ignite legacy module.
- 'ignite-console.legacy',
- // Ignite modules.
- 'ignite-console.modules'
-])
-// Directives.
-.directive(...igniteHideOnStateChange)
-.directive(...igniteInformation)
-.directive(...igniteUiAceTabs)
-.directive(...igniteUiAceXml)
-.directive(...igniteUiAceJava)
-.directive(...igniteUiAcePom)
-.directive(...igniteUiAceDocker)
-.directive(...igniteUiAcePojos)
-.directive(...igniteBsAffixUpdate)
-.directive(...ignite\u0421entered)
-// Services.
-.service(...cleanup)
-.service(...confirm)
-.service(...IgniteInetAddress)
-.service(...IgniteCountries)
-.service(...IgniteChartColors)
-.service(...JavaTypes)
-// Providers.
-// Filters.
-.filter(...hasPojo)
-.filter(...byName)
-.config(['$stateProvider', '$locationProvider', '$urlRouterProvider', ($stateProvider, $locationProvider, $urlRouterProvider) => {
- // Set up the states.
- $stateProvider
- .state('base', {
- url: '',
- abstract: true,
- templateUrl: '/base.html'
- })
- .state('settings', {
- url: '/settings',
- abstract: true,
- templateUrl: '/base.html'
- });
-
- $urlRouterProvider.otherwise('/');
-
- $locationProvider.html5Mode(true);
-}])
-.config(['$animateProvider', ($animateProvider) => {
- $animateProvider.classNameFilter(/^((?!(fa-spin)).)*$/);
-}])
-.run(['$rootScope', ($root) => {
- $root._ = _;
-}])
-.run(['$rootScope', '$state', 'MetaTags', 'Auth', 'User', 'IgniteAgentMonitor', ($root, $state, $meta, Auth, User, agentMonitor) => {
- $root.$state = $state;
-
- $root.$meta = $meta;
-
- if (Auth.authorized) {
- User.read()
- .then((user) => $root.$broadcast('user', user))
- .then(() => Auth.authorized && agentMonitor.init());
- }
-}])
-.run(['$rootScope', ($root) => {
- $root.$on('$stateChangeStart', () => {
- _.forEach(angular.element('.modal'), (m) => angular.element(m).scope().$hide());
- });
-}]);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/modules/web-console/src/main/js/app/modules/Demo/Demo.module.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/modules/Demo/Demo.module.js b/modules/web-console/src/main/js/app/modules/Demo/Demo.module.js
index f08d84c..68aca9d 100644
--- a/modules/web-console/src/main/js/app/modules/Demo/Demo.module.js
+++ b/modules/web-console/src/main/js/app/modules/Demo/Demo.module.js
@@ -17,7 +17,7 @@
import angular from 'angular';
-import DEMO_INFO from 'app/data/demo-info.json!';
+import DEMO_INFO from 'app/data/demo-info.json';
angular
.module('ignite-console.demo', [
@@ -39,17 +39,16 @@ angular
})
.state('demo.reset', {
url: '/demo/reset',
- controller: ['$state', '$http', '$common', ($state, $http, $common) => {
+ controller: ['$state', '$http', 'IgniteMessages', ($state, $http, Messages) => {
$http.post('/api/v1/demo/reset')
.then(() => $state.go('base.configuration.clusters'))
- .catch((errMsg) => {
+ .catch((err) => {
$state.go('base.configuration.clusters');
- $common.showError(errMsg);
+ Messages.showError(err);
});
}],
- metaTags: {
- }
+ metaTags: {}
});
}])
.provider('Demo', ['$stateProvider', '$httpProvider', 'igniteSocketFactoryProvider', function($state, $http, socketFactory) {
@@ -82,14 +81,14 @@ angular
}
};
}])
-.controller('demoController', ['$scope', '$state', '$window', '$confirm', ($scope, $state, $window, $confirm) => {
+.controller('demoController', ['$scope', '$state', '$window', 'IgniteConfirm', ($scope, $state, $window, Confirm) => {
const _openTab = (stateName) => $window.open($state.href(stateName), '_blank');
$scope.startDemo = () => {
if (!$scope.user.demoCreated)
return _openTab('demo.reset');
- $confirm.confirm('Would you like to continue with previous demo session?', true, false)
+ Confirm.confirm('Would you like to continue with previous demo session?', true, false)
.then((resume) => {
if (resume)
return _openTab('demo.resume');
http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/modules/web-console/src/main/js/app/modules/ace.module.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/modules/ace.module.js b/modules/web-console/src/main/js/app/modules/ace.module.js
index 2477965..4920a6f 100644
--- a/modules/web-console/src/main/js/app/modules/ace.module.js
+++ b/modules/web-console/src/main/js/app/modules/ace.module.js
@@ -44,13 +44,13 @@ angular
const setOptions = (acee, session, opts) => {
// Sets the ace worker path, if running from concatenated or minified source.
if (angular.isDefined(opts.workerPath)) {
- const config = window.ace.require('ace/config');
+ const config = window.ace.acequire('ace/config');
config.set('workerPath', opts.workerPath);
}
// Ace requires loading.
- _.forEach(opts.require, (n) => window.ace.require(n));
+ _.forEach(opts.require, (n) => window.ace.acequire(n));
// Boolean options.
if (angular.isDefined(opts.showGutter))
http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/modules/web-console/src/main/js/app/modules/agent/agent.module.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/modules/agent/agent.module.js b/modules/web-console/src/main/js/app/modules/agent/agent.module.js
index 4e3f7ef..ca95166 100644
--- a/modules/web-console/src/main/js/app/modules/agent/agent.module.js
+++ b/modules/web-console/src/main/js/app/modules/agent/agent.module.js
@@ -19,7 +19,7 @@ import angular from 'angular';
import io from 'socket.io-client'; // eslint-disable-line no-unused-vars
class IgniteAgentMonitor {
- constructor(socketFactory, $root, $q, $state, $modal, $common) {
+ constructor(socketFactory, $root, $q, $state, $modal, Messages) {
this._scope = $root.$new();
$root.$watch('user', () => {
@@ -45,7 +45,7 @@ class IgniteAgentMonitor {
* Special dialog hide function.
*/
this._downloadAgentModal.hide = () => {
- $common.hideAlert();
+ Messages.hideAlert();
_modalHide();
};
@@ -87,7 +87,7 @@ class IgniteAgentMonitor {
this._$q = $q;
- this._$common = $common;
+ this.Messages = Messages;
}
/**
@@ -234,7 +234,7 @@ class IgniteAgentMonitor {
if (this._scope.showModal) {
this._downloadAgentModal.$promise.then(this._downloadAgentModal.show);
- this._$common.showError(err);
+ this.Messages.showError(err);
}
}
@@ -314,7 +314,7 @@ class IgniteAgentMonitor {
}
}
-IgniteAgentMonitor.$inject = ['igniteSocketFactory', '$rootScope', '$q', '$state', '$modal', '$common'];
+IgniteAgentMonitor.$inject = ['igniteSocketFactory', '$rootScope', '$q', '$state', '$modal', 'IgniteMessages'];
angular
.module('ignite-console.agent', [
http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/modules/web-console/src/main/js/app/modules/branding/branding.module.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/modules/branding/branding.module.js b/modules/web-console/src/main/js/app/modules/branding/branding.module.js
index bd28c68..cae7c91 100644
--- a/modules/web-console/src/main/js/app/modules/branding/branding.module.js
+++ b/modules/web-console/src/main/js/app/modules/branding/branding.module.js
@@ -43,4 +43,3 @@ angular
.directive(...igniteTerms)
.directive(...igniteFeatures)
.directive(...igniteFooter);
-
http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/modules/web-console/src/main/js/app/modules/branding/header-logo.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/modules/branding/header-logo.directive.js b/modules/web-console/src/main/js/app/modules/branding/header-logo.directive.js
index 1bfbc45..423de9c 100644
--- a/modules/web-console/src/main/js/app/modules/branding/header-logo.directive.js
+++ b/modules/web-console/src/main/js/app/modules/branding/header-logo.directive.js
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-import template from './header-logo.jade!';
+import templateUrl from './header-logo.jade';
export default ['igniteHeaderLogo', ['IgniteBranding', (branding) => {
function controller() {
@@ -26,7 +26,7 @@ export default ['igniteHeaderLogo', ['IgniteBranding', (branding) => {
return {
restrict: 'E',
- template,
+ templateUrl,
controller,
controllerAs: 'logo',
replace: true
http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/modules/web-console/src/main/js/app/modules/branding/powered-by-apache.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/modules/branding/powered-by-apache.directive.js b/modules/web-console/src/main/js/app/modules/branding/powered-by-apache.directive.js
index 37f1dec..2f02446 100644
--- a/modules/web-console/src/main/js/app/modules/branding/powered-by-apache.directive.js
+++ b/modules/web-console/src/main/js/app/modules/branding/powered-by-apache.directive.js
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-import templatePoweredByApache from './powered-by-apache.jade!';
+import templateUrl from './powered-by-apache.jade';
export default ['ignitePoweredByApache', ['IgniteBranding', (branding) => {
function controller() {
@@ -26,7 +26,7 @@ export default ['ignitePoweredByApache', ['IgniteBranding', (branding) => {
return {
restrict: 'E',
- template: templatePoweredByApache,
+ templateUrl,
controller,
controllerAs: 'poweredBy',
replace: true
http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/modules/web-console/src/main/js/app/modules/configuration/EventGroups.provider.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/modules/configuration/EventGroups.provider.js b/modules/web-console/src/main/js/app/modules/configuration/EventGroups.provider.js
index 2bbf11f..61f3188 100644
--- a/modules/web-console/src/main/js/app/modules/configuration/EventGroups.provider.js
+++ b/modules/web-console/src/main/js/app/modules/configuration/EventGroups.provider.js
@@ -16,7 +16,7 @@
*/
// Events groups.
-import GROUPS from 'app/data/event-types.json!';
+import GROUPS from 'app/data/event-types.json';
export default ['igniteEventGroups', function() {
const groups = GROUPS;
http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/modules/web-console/src/main/js/app/modules/configuration/generator/Pom.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/modules/configuration/generator/Pom.service.js b/modules/web-console/src/main/js/app/modules/configuration/generator/Pom.service.js
index 3508e59..674c16e 100644
--- a/modules/web-console/src/main/js/app/modules/configuration/generator/Pom.service.js
+++ b/modules/web-console/src/main/js/app/modules/configuration/generator/Pom.service.js
@@ -16,7 +16,7 @@
*/
// Java built-in class names.
-import POM_DEPENDENCIES from 'app/data/pom-dependencies.json!';
+import POM_DEPENDENCIES from 'app/data/pom-dependencies.json';
/**
* Pom file generation entry point.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/modules/web-console/src/main/js/app/modules/dialog/dialog.factory.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/modules/dialog/dialog.factory.js b/modules/web-console/src/main/js/app/modules/dialog/dialog.factory.js
index 18a2174..e15891f 100644
--- a/modules/web-console/src/main/js/app/modules/dialog/dialog.factory.js
+++ b/modules/web-console/src/main/js/app/modules/dialog/dialog.factory.js
@@ -15,11 +15,11 @@
* limitations under the License.
*/
-import template from './dialog.jade!';
+import templateUrl from './dialog.jade';
export default ['IgniteDialog', ['$modal', ($modal) => {
const defaults = {
- template: template(),
+ templateUrl,
placement: 'center',
show: false
};
http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/modules/web-console/src/main/js/app/modules/form/field/bs-select-placeholder.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/modules/form/field/bs-select-placeholder.directive.js b/modules/web-console/src/main/js/app/modules/form/field/bs-select-placeholder.directive.js
index 035fed4..83f438d 100644
--- a/modules/web-console/src/main/js/app/modules/form/field/bs-select-placeholder.directive.js
+++ b/modules/web-console/src/main/js/app/modules/form/field/bs-select-placeholder.directive.js
@@ -28,12 +28,13 @@ export default ['bsSelect', [() => {
const value = ngModel.$viewValue;
- if (value && (!attrs.multiple || value.length))
- $element.removeClass('placeholder');
- else {
+ if (_.isNil(value) || (attrs.multiple && !value.length)) {
$element.html(attrs.placeholder);
+
$element.addClass('placeholder');
}
+ else
+ $element.removeClass('placeholder');
};
};
http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/modules/web-console/src/main/js/app/modules/form/field/dropdown.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/modules/form/field/dropdown.directive.js b/modules/web-console/src/main/js/app/modules/form/field/dropdown.directive.js
index fe4d948..23c900a 100644
--- a/modules/web-console/src/main/js/app/modules/form/field/dropdown.directive.js
+++ b/modules/web-console/src/main/js/app/modules/form/field/dropdown.directive.js
@@ -15,9 +15,9 @@
* limitations under the License.
*/
-import template from './dropdown.jade!';
+import templateUrl from './dropdown.jade';
-export default ['igniteFormFieldDropdown', ['IgniteFormGUID', '$table', (guid, $table) => {
+export default ['igniteFormFieldDropdown', ['IgniteFormGUID', 'IgniteLegacyTable', (guid, LegacyTable) => {
const controller = () => {};
const link = (scope, $element, attrs, [form, label]) => {
@@ -48,9 +48,8 @@ export default ['igniteFormFieldDropdown', ['IgniteFormGUID', '$table', (guid, $
scope.$watch(() => form.$pristine, setAsDefault);
scope.$watch('value', setAsDefault);
- // TODO LEGACY
scope.tableReset = () => {
- $table.tableSaveAndReset();
+ LegacyTable.tableSaveAndReset();
};
};
@@ -74,7 +73,7 @@ export default ['igniteFormFieldDropdown', ['IgniteFormGUID', '$table', (guid, $
multiple: '='
},
link,
- template,
+ templateUrl,
controller,
controllerAs: 'dropdown',
replace: true,
http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/modules/web-console/src/main/js/app/modules/form/field/dropdown.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/modules/form/field/dropdown.jade b/modules/web-console/src/main/js/app/modules/form/field/dropdown.jade
index 48b55d9..5b7cdf6 100644
--- a/modules/web-console/src/main/js/app/modules/form/field/dropdown.jade
+++ b/modules/web-console/src/main/js/app/modules/form/field/dropdown.jade
@@ -30,7 +30,7 @@
data-ng-required='required || false'
- on-enter='{{ onEnter }}'
+ ignite-on-enter='{{ onEnter }}'
tabindex='0'
@@ -51,7 +51,7 @@
data-ng-required='required || false'
- on-enter='{{ onEnter }}'
+ ignite-on-enter='{{ onEnter }}'
tabindex='0'
http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/modules/web-console/src/main/js/app/modules/form/field/field.css
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/modules/form/field/field.css b/modules/web-console/src/main/js/app/modules/form/field/field.css
index 8dfe05e..3ea64f4 100644
--- a/modules/web-console/src/main/js/app/modules/form/field/field.css
+++ b/modules/web-console/src/main/js/app/modules/form/field/field.css
@@ -16,7 +16,7 @@
*/
.indexField {
- float: left;
+ float: left;
line-height: 28px;
margin-right: 5px;
color: #ec1c24;
http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/modules/web-console/src/main/js/app/modules/form/field/field.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/modules/form/field/field.directive.js b/modules/web-console/src/main/js/app/modules/form/field/field.directive.js
index 0e3fe8d..630f74f 100644
--- a/modules/web-console/src/main/js/app/modules/form/field/field.directive.js
+++ b/modules/web-console/src/main/js/app/modules/form/field/field.directive.js
@@ -15,8 +15,8 @@
* limitations under the License.
*/
-import template from './field.jade!';
-import './field.css!';
+import templateUrl from './field.jade';
+import './field.css';
export default ['igniteFormField', [() => {
const controller = [function() {
@@ -34,7 +34,7 @@ export default ['igniteFormField', [() => {
type: '@',
name: '@'
},
- template,
+ templateUrl,
controller,
controllerAs: 'field',
replace: true,