You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by an...@apache.org on 2016/03/31 09:27:39 UTC
[01/14] ignite git commit: IGNITE-843 Refactored unique directives to
single directive.
Repository: ignite
Updated Branches:
refs/heads/ignite-2875 692567187 -> dde08f391
IGNITE-843 Refactored unique directives to single directive.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/3b40bd76
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/3b40bd76
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/3b40bd76
Branch: refs/heads/ignite-2875
Commit: 3b40bd766bdb48193a351c31d799e09f4cdb403a
Parents: cadbc5f
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Mon Mar 28 16:38:22 2016 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Mon Mar 28 16:38:22 2016 +0700
----------------------------------------------------------------------
.../src/main/js/app/modules/form/form.module.js | 2 -
.../validator/igfs-path-unique.directive.js | 46 --------------------
.../modules/form/validator/unique.directive.js | 7 ++-
.../modules/states/configuration/igfs/misc.jade | 7 +--
.../src/main/js/controllers/common-module.js | 2 +-
.../src/main/js/controllers/igfs-controller.js | 4 --
6 files changed, 10 insertions(+), 58 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/3b40bd76/modules/control-center-web/src/main/js/app/modules/form/form.module.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/form/form.module.js b/modules/control-center-web/src/main/js/app/modules/form/form.module.js
index 81c1d99..57a92fa 100644
--- a/modules/control-center-web/src/main/js/app/modules/form/form.module.js
+++ b/modules/control-center-web/src/main/js/app/modules/form/form.module.js
@@ -40,7 +40,6 @@ import igniteFormGroupAdd from './group/add.directive';
import igniteFormGroupTooltip from './group/tooltip.directive';
// Validators.
-import igfsPathUnique from './validator/igfs-path-unique.directive';
import ipaddress from './validator/ipaddress.directive';
import javaKeywords from './validator/java-keywords.directive';
import javaPackageSpecified from './validator/java-package-specified.directive';
@@ -80,7 +79,6 @@ angular
.directive(...igniteFormGroupAdd)
.directive(...igniteFormGroupTooltip)
// Validators.
-.directive(...igfsPathUnique)
.directive(...ipaddress)
.directive(...javaKeywords)
.directive(...javaPackageSpecified)
http://git-wip-us.apache.org/repos/asf/ignite/blob/3b40bd76/modules/control-center-web/src/main/js/app/modules/form/validator/igfs-path-unique.directive.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/form/validator/igfs-path-unique.directive.js b/modules/control-center-web/src/main/js/app/modules/form/validator/igfs-path-unique.directive.js
deleted file mode 100644
index 7753c85..0000000
--- a/modules/control-center-web/src/main/js/app/modules/form/validator/igfs-path-unique.directive.js
+++ /dev/null
@@ -1,46 +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.
- */
-
-export default ['igniteIgfsPathUnique', ['$parse', ($parse) => {
- const link = (scope, el, attrs, [ngModel]) => {
- if (typeof attrs.igniteIgfsPathUnique === 'undefined' || !attrs.igniteIgfsPathUnique)
- return;
-
- ngModel.$validators.igniteIgfsPathUnique = (value) => {
- const arr = $parse(attrs.igniteIgfsPathUnique)(scope);
-
- // Return true in case if array not exist, array empty.
- if (!value || !arr || !arr.length)
- return true;
-
- const idx = _.findIndex(arr, (item) => item.path === value);
-
- // In case of new element check all items.
- if (attrs.name === 'newPath')
- return idx < 0;
-
- // Check for $index in case of editing in-place.
- return (_.isNumber(scope.$index) && (idx < 0 || scope.$index === idx));
- };
- };
-
- return {
- restrict: 'A',
- link,
- require: ['ngModel']
- };
-}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/3b40bd76/modules/control-center-web/src/main/js/app/modules/form/validator/unique.directive.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/form/validator/unique.directive.js b/modules/control-center-web/src/main/js/app/modules/form/validator/unique.directive.js
index 451ff9d..d816fb6 100644
--- a/modules/control-center-web/src/main/js/app/modules/form/validator/unique.directive.js
+++ b/modules/control-center-web/src/main/js/app/modules/form/validator/unique.directive.js
@@ -20,6 +20,9 @@ export default ['igniteUnique', ['$parse', ($parse) => {
if (typeof attrs.igniteUnique === 'undefined' || !attrs.igniteUnique)
return;
+ const isNew = _.startsWith(attrs.name, 'new');
+ const property = attrs.igniteUniqueProperty;
+
ngModel.$validators.igniteUnique = (value) => {
const arr = $parse(attrs.igniteUnique)(scope);
@@ -27,10 +30,10 @@ export default ['igniteUnique', ['$parse', ($parse) => {
if (!arr || !arr.length)
return true;
- const idx = arr.indexOf(value);
+ const idx = _.findIndex(arr, (item) => (property ? item[property] : item) === value);
// In case of new element check all items.
- if (attrs.name === 'new')
+ if (isNew)
return idx < 0;
// Check for $index in case of editing in-place.
http://git-wip-us.apache.org/repos/asf/ignite/blob/3b40bd76/modules/control-center-web/src/main/js/app/modules/states/configuration/igfs/misc.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/igfs/misc.jade b/modules/control-center-web/src/main/js/app/modules/states/configuration/igfs/misc.jade
index 3428e2d..c3e8c29 100644
--- a/modules/control-center-web/src/main/js/app/modules/states/configuration/igfs/misc.jade
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/igfs/misc.jade
@@ -28,7 +28,7 @@ mixin pathModeEditor(newItem)
-var valid = pathModesForm + '.' + path + '.$valid && ' + pathModesForm + '.' + mode + '.$valid'
-var item = '{path:' + path + ', mode: ' + mode + '}'
-var save = pathModes + (newItem ? '.push(' + item + ')' : '[$index] = ' + item)
- -var unique = pathModesForm + '.' + path + '.$error.igniteIgfsPathUnique'
+ -var unique = pathModesForm + '.' + path + '.$error.igniteUnique'
.col-sm-12
.col-sm-8
@@ -39,12 +39,13 @@ mixin pathModeEditor(newItem)
data-ng-model=path
enter-focus-next=mode
data-ng-required='true'
- data-ignite-igfs-path-unique=pathModes
+ data-ignite-unique=pathModes
+ data-ignite-unique-property='path'
data-placeholder='Input path'
data-ignite-form-field-input-autofocus='true'
on-escape=reset
)
- +error-feedback(unique, 'igfsPathUnique', 'Such path already exists!')
+ +unique-feedback(unique, 'Such path already exists!')
.col-sm-4
.tipField
+table-save-button(valid, save, newItem)
http://git-wip-us.apache.org/repos/asf/ignite/blob/3b40bd76/modules/control-center-web/src/main/js/controllers/common-module.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/common-module.js b/modules/control-center-web/src/main/js/controllers/common-module.js
index 5543783..0fff237 100644
--- a/modules/control-center-web/src/main/js/controllers/common-module.js
+++ b/modules/control-center-web/src/main/js/controllers/common-module.js
@@ -1892,7 +1892,7 @@ consoleModule.directive('onEnter', function ($timeout) {
}
});
- // Removes bound events in the element itself when the scope is destroyed
+ // Removes bound events in the element itself when the scope is destroyed.
scope.$on('$destroy', function () {
elem.off('keydown keypress');
});
http://git-wip-us.apache.org/repos/asf/ignite/blob/3b40bd76/modules/control-center-web/src/main/js/controllers/igfs-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/igfs-controller.js b/modules/control-center-web/src/main/js/controllers/igfs-controller.js
index 44ba0ec..2263940 100644
--- a/modules/control-center-web/src/main/js/controllers/igfs-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/igfs-controller.js
@@ -166,10 +166,6 @@ consoleModule.controller('igfsController', [
};
}
- $scope.zzz = function () {
- console.log("TEST on enter!")
- };
-
// Add new IGFS.
$scope.createItem = function (id) {
$timeout(function () {
[13/14] ignite git commit: Merge branch 'web-console-staging' of
https://github.com/gridgain/apache-ignite into ignite-2875
Posted by an...@apache.org.
Merge branch 'web-console-staging' of https://github.com/gridgain/apache-ignite into ignite-2875
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/57d7df6a
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/57d7df6a
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/57d7df6a
Branch: refs/heads/ignite-2875
Commit: 57d7df6a153d1f04e9ddd7862eefa8e7de3996ae
Parents: 7af8fae 6557cf2
Author: Andrey <an...@gridgain.com>
Authored: Thu Mar 31 13:05:43 2016 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Thu Mar 31 13:05:43 2016 +0700
----------------------------------------------------------------------
.../src/main/js/controllers/common-module.js | 2 +-
.../src/main/js/gulpfile.babel.js/paths.js | 11 ++++-------
modules/control-center-web/src/main/js/package.json | 6 +++---
3 files changed, 8 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
[12/14] ignite git commit: IGNITE-2755 Fixed under windows.
Posted by an...@apache.org.
IGNITE-2755 Fixed under windows.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/6557cf25
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/6557cf25
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/6557cf25
Branch: refs/heads/ignite-2875
Commit: 6557cf254658fb84a15b5df2aeda5f0a1057c457
Parents: 004f968
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Wed Mar 30 15:51:06 2016 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Wed Mar 30 15:51:06 2016 +0700
----------------------------------------------------------------------
.../src/main/js/gulpfile.babel.js/paths.js | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/6557cf25/modules/control-center-web/src/main/js/gulpfile.babel.js/paths.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/gulpfile.babel.js/paths.js b/modules/control-center-web/src/main/js/gulpfile.babel.js/paths.js
index 738d8f3..62ea503 100644
--- a/modules/control-center-web/src/main/js/gulpfile.babel.js/paths.js
+++ b/modules/control-center-web/src/main/js/gulpfile.babel.js/paths.js
@@ -17,16 +17,13 @@
import path from 'path';
-const root = path.dirname(__dirname);
+const srcDir = './app';
+const destDir = './build';
-const srcDir = path.join(root, 'app');
-const destDir = path.join(root, 'build');
-
-const igniteModulesDir = process.env.IGNITE_MODULES ? path.normalize(process.env.IGNITE_MODULES) : path.join(root, 'ignite_modules');
-const igniteModulesTemp = path.join(root, 'ignite_modules_temp');
+const igniteModulesDir = process.env.IGNITE_MODULES ? path.normalize(process.env.IGNITE_MODULES) : './ignite_modules';
+const igniteModulesTemp = './ignite_modules_temp';
export {
- root,
srcDir,
destDir,
igniteModulesDir,
[06/14] ignite git commit: IGNITE-2755 Optimize gulp build tasks.
Posted by an...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/controllers/worker-xml.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/worker-xml.js b/modules/control-center-web/src/main/js/controllers/worker-xml.js
deleted file mode 100644
index 2b472e3..0000000
--- a/modules/control-center-web/src/main/js/controllers/worker-xml.js
+++ /dev/null
@@ -1,3892 +0,0 @@
-/* */
-"format global";
-"deps ./ace";
-"no use strict";
-;(function(window) {
-if (typeof window.window != "undefined" && window.document)
- return;
-if (window.require && window.define)
- return;
-
-if (!window.console) {
- window.console = function() {
- var msgs = Array.prototype.slice.call(arguments, 0);
- postMessage({type: "log", data: msgs});
- };
- window.console.error =
- window.console.warn =
- window.console.log =
- window.console.trace = window.console;
-}
-window.window = window;
-window.ace = window;
-
-window.onerror = function(message, file, line, col, err) {
- postMessage({type: "error", data: {
- message: message,
- data: err.data,
- file: file,
- line: line,
- col: col,
- stack: err.stack
- }});
-};
-
-window.normalizeModule = function(parentId, moduleName) {
- // normalize plugin requires
- if (moduleName.indexOf("!") !== -1) {
- var chunks = moduleName.split("!");
- return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
- }
- // normalize relative requires
- if (moduleName.charAt(0) == ".") {
- var base = parentId.split("/").slice(0, -1).join("/");
- moduleName = (base ? base + "/" : "") + moduleName;
-
- while (moduleName.indexOf(".") !== -1 && previous != moduleName) {
- var previous = moduleName;
- moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
- }
- }
-
- return moduleName;
-};
-
-window.require = function require(parentId, id) {
- if (!id) {
- id = parentId;
- parentId = null;
- }
- if (!id.charAt)
- throw new Error("worker.js require() accepts only (parentId, id) as arguments");
-
- id = window.normalizeModule(parentId, id);
-
- var module = window.require.modules[id];
- if (module) {
- if (!module.initialized) {
- module.initialized = true;
- module.exports = module.factory().exports;
- }
- return module.exports;
- }
-
- if (!window.require.tlns)
- return console.log("unable to load " + id);
-
- var path = resolveModuleId(id, window.require.tlns);
- if (path.slice(-3) != ".js") path += ".js";
-
- window.require.id = id;
- window.require.modules[id] = {}; // prevent infinite loop on broken modules
- importScripts(path);
- return window.require(parentId, id);
-};
-function resolveModuleId(id, paths) {
- var testPath = id, tail = "";
- while (testPath) {
- var alias = paths[testPath];
- if (typeof alias == "string") {
- return alias + tail;
- } else if (alias) {
- return alias.location.replace(/\/*$/, "/") + (tail || alias.main || alias.name);
- } else if (alias === false) {
- return "";
- }
- var i = testPath.lastIndexOf("/");
- if (i === -1) break;
- tail = testPath.substr(i) + tail;
- testPath = testPath.slice(0, i);
- }
- return id;
-}
-window.require.modules = {};
-window.require.tlns = {};
-
-window.define = function(id, deps, factory) {
- if (arguments.length == 2) {
- factory = deps;
- if (typeof id != "string") {
- deps = id;
- id = window.require.id;
- }
- } else if (arguments.length == 1) {
- factory = id;
- deps = [];
- id = window.require.id;
- }
-
- if (typeof factory != "function") {
- window.require.modules[id] = {
- exports: factory,
- initialized: true
- };
- return;
- }
-
- if (!deps.length)
- // If there is no dependencies, we inject "require", "exports" and
- // "module" as dependencies, to provide CommonJS compatibility.
- deps = ["require", "exports", "module"];
-
- var req = function(childId) {
- return window.require(id, childId);
- };
-
- window.require.modules[id] = {
- exports: {},
- factory: function() {
- var module = this;
- var returnExports = factory.apply(this, deps.map(function(dep) {
- switch (dep) {
- // Because "require", "exports" and "module" aren't actual
- // dependencies, we must handle them seperately.
- case "require": return req;
- case "exports": return module.exports;
- case "module": return module;
- // But for all other dependencies, we can just go ahead and
- // require them.
- default: return req(dep);
- }
- }));
- if (returnExports)
- module.exports = returnExports;
- return module;
- }
- };
-};
-window.define.amd = {};
-require.tlns = {};
-window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
- for (var i in topLevelNamespaces)
- require.tlns[i] = topLevelNamespaces[i];
-};
-
-window.initSender = function initSender() {
-
- var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter;
- var oop = window.require("ace/lib/oop");
-
- var Sender = function() {};
-
- (function() {
-
- oop.implement(this, EventEmitter);
-
- this.callback = function(data, callbackId) {
- postMessage({
- type: "call",
- id: callbackId,
- data: data
- });
- };
-
- this.emit = function(name, data) {
- postMessage({
- type: "event",
- name: name,
- data: data
- });
- };
-
- }).call(Sender.prototype);
-
- return new Sender();
-};
-
-var main = window.main = null;
-var sender = window.sender = null;
-
-window.onmessage = function(e) {
- var msg = e.data;
- if (msg.event && sender) {
- sender._signal(msg.event, msg.data);
- }
- else if (msg.command) {
- if (main[msg.command])
- main[msg.command].apply(main, msg.args);
- else if (window[msg.command])
- window[msg.command].apply(window, msg.args);
- else
- throw new Error("Unknown command:" + msg.command);
- }
- else if (msg.init) {
- window.initBaseUrls(msg.tlns);
- require("ace/lib/es5-shim");
- sender = window.sender = window.initSender();
- var clazz = require(msg.module)[msg.classname];
- main = window.main = new clazz(sender);
- }
-};
-})(this);
-
-ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) {
-"use strict";
-
-exports.inherits = function(ctor, superCtor) {
- ctor.super_ = superCtor;
- ctor.prototype = Object.create(superCtor.prototype, {
- constructor: {
- value: ctor,
- enumerable: false,
- writable: true,
- configurable: true
- }
- });
-};
-
-exports.mixin = function(obj, mixin) {
- for (var key in mixin) {
- obj[key] = mixin[key];
- }
- return obj;
-};
-
-exports.implement = function(proto, mixin) {
- exports.mixin(proto, mixin);
-};
-
-});
-
-ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) {
-"use strict";
-
-exports.last = function(a) {
- return a[a.length - 1];
-};
-
-exports.stringReverse = function(string) {
- return string.split("").reverse().join("");
-};
-
-exports.stringRepeat = function (string, count) {
- var result = '';
- while (count > 0) {
- if (count & 1)
- result += string;
-
- if (count >>= 1)
- string += string;
- }
- return result;
-};
-
-var trimBeginRegexp = /^\s\s*/;
-var trimEndRegexp = /\s\s*$/;
-
-exports.stringTrimLeft = function (string) {
- return string.replace(trimBeginRegexp, '');
-};
-
-exports.stringTrimRight = function (string) {
- return string.replace(trimEndRegexp, '');
-};
-
-exports.copyObject = function(obj) {
- var copy = {};
- for (var key in obj) {
- copy[key] = obj[key];
- }
- return copy;
-};
-
-exports.copyArray = function(array){
- var copy = [];
- for (var i=0, l=array.length; i<l; i++) {
- if (array[i] && typeof array[i] == "object")
- copy[i] = this.copyObject( array[i] );
- else
- copy[i] = array[i];
- }
- return copy;
-};
-
-exports.deepCopy = function deepCopy(obj) {
- if (typeof obj !== "object" || !obj)
- return obj;
- var copy;
- if (Array.isArray(obj)) {
- copy = [];
- for (var key = 0; key < obj.length; key++) {
- copy[key] = deepCopy(obj[key]);
- }
- return copy;
- }
- var cons = obj.constructor;
- if (cons === RegExp)
- return obj;
-
- copy = cons();
- for (var key in obj) {
- copy[key] = deepCopy(obj[key]);
- }
- return copy;
-};
-
-exports.arrayToMap = function(arr) {
- var map = {};
- for (var i=0; i<arr.length; i++) {
- map[arr[i]] = 1;
- }
- return map;
-
-};
-
-exports.createMap = function(props) {
- var map = Object.create(null);
- for (var i in props) {
- map[i] = props[i];
- }
- return map;
-};
-exports.arrayRemove = function(array, value) {
- for (var i = 0; i <= array.length; i++) {
- if (value === array[i]) {
- array.splice(i, 1);
- }
- }
-};
-
-exports.escapeRegExp = function(str) {
- return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
-};
-
-exports.escapeHTML = function(str) {
- return str.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<");
-};
-
-exports.getMatchOffsets = function(string, regExp) {
- var matches = [];
-
- string.replace(regExp, function(str) {
- matches.push({
- offset: arguments[arguments.length-2],
- length: str.length
- });
- });
-
- return matches;
-};
-exports.deferredCall = function(fcn) {
- var timer = null;
- var callback = function() {
- timer = null;
- fcn();
- };
-
- var deferred = function(timeout) {
- deferred.cancel();
- timer = setTimeout(callback, timeout || 0);
- return deferred;
- };
-
- deferred.schedule = deferred;
-
- deferred.call = function() {
- this.cancel();
- fcn();
- return deferred;
- };
-
- deferred.cancel = function() {
- clearTimeout(timer);
- timer = null;
- return deferred;
- };
-
- deferred.isPending = function() {
- return timer;
- };
-
- return deferred;
-};
-
-
-exports.delayedCall = function(fcn, defaultTimeout) {
- var timer = null;
- var callback = function() {
- timer = null;
- fcn();
- };
-
- var _self = function(timeout) {
- if (timer == null)
- timer = setTimeout(callback, timeout || defaultTimeout);
- };
-
- _self.delay = function(timeout) {
- timer && clearTimeout(timer);
- timer = setTimeout(callback, timeout || defaultTimeout);
- };
- _self.schedule = _self;
-
- _self.call = function() {
- this.cancel();
- fcn();
- };
-
- _self.cancel = function() {
- timer && clearTimeout(timer);
- timer = null;
- };
-
- _self.isPending = function() {
- return timer;
- };
-
- return _self;
-};
-});
-
-ace.define("ace/range",["require","exports","module"], function(require, exports, module) {
-"use strict";
-var comparePoints = function(p1, p2) {
- return p1.row - p2.row || p1.column - p2.column;
-};
-var Range = function(startRow, startColumn, endRow, endColumn) {
- this.start = {
- row: startRow,
- column: startColumn
- };
-
- this.end = {
- row: endRow,
- column: endColumn
- };
-};
-
-(function() {
- this.isEqual = function(range) {
- return this.start.row === range.start.row &&
- this.end.row === range.end.row &&
- this.start.column === range.start.column &&
- this.end.column === range.end.column;
- };
- this.toString = function() {
- return ("Range: [" + this.start.row + "/" + this.start.column +
- "] -> [" + this.end.row + "/" + this.end.column + "]");
- };
-
- this.contains = function(row, column) {
- return this.compare(row, column) == 0;
- };
- this.compareRange = function(range) {
- var cmp,
- end = range.end,
- start = range.start;
-
- cmp = this.compare(end.row, end.column);
- if (cmp == 1) {
- cmp = this.compare(start.row, start.column);
- if (cmp == 1) {
- return 2;
- } else if (cmp == 0) {
- return 1;
- } else {
- return 0;
- }
- } else if (cmp == -1) {
- return -2;
- } else {
- cmp = this.compare(start.row, start.column);
- if (cmp == -1) {
- return -1;
- } else if (cmp == 1) {
- return 42;
- } else {
- return 0;
- }
- }
- };
- this.comparePoint = function(p) {
- return this.compare(p.row, p.column);
- };
- this.containsRange = function(range) {
- return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
- };
- this.intersects = function(range) {
- var cmp = this.compareRange(range);
- return (cmp == -1 || cmp == 0 || cmp == 1);
- };
- this.isEnd = function(row, column) {
- return this.end.row == row && this.end.column == column;
- };
- this.isStart = function(row, column) {
- return this.start.row == row && this.start.column == column;
- };
- this.setStart = function(row, column) {
- if (typeof row == "object") {
- this.start.column = row.column;
- this.start.row = row.row;
- } else {
- this.start.row = row;
- this.start.column = column;
- }
- };
- this.setEnd = function(row, column) {
- if (typeof row == "object") {
- this.end.column = row.column;
- this.end.row = row.row;
- } else {
- this.end.row = row;
- this.end.column = column;
- }
- };
- this.inside = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isEnd(row, column) || this.isStart(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.insideStart = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isEnd(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.insideEnd = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isStart(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.compare = function(row, column) {
- if (!this.isMultiLine()) {
- if (row === this.start.row) {
- return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
- };
- }
-
- if (row < this.start.row)
- return -1;
-
- if (row > this.end.row)
- return 1;
-
- if (this.start.row === row)
- return column >= this.start.column ? 0 : -1;
-
- if (this.end.row === row)
- return column <= this.end.column ? 0 : 1;
-
- return 0;
- };
- this.compareStart = function(row, column) {
- if (this.start.row == row && this.start.column == column) {
- return -1;
- } else {
- return this.compare(row, column);
- }
- };
- this.compareEnd = function(row, column) {
- if (this.end.row == row && this.end.column == column) {
- return 1;
- } else {
- return this.compare(row, column);
- }
- };
- this.compareInside = function(row, column) {
- if (this.end.row == row && this.end.column == column) {
- return 1;
- } else if (this.start.row == row && this.start.column == column) {
- return -1;
- } else {
- return this.compare(row, column);
- }
- };
- this.clipRows = function(firstRow, lastRow) {
- if (this.end.row > lastRow)
- var end = {row: lastRow + 1, column: 0};
- else if (this.end.row < firstRow)
- var end = {row: firstRow, column: 0};
-
- if (this.start.row > lastRow)
- var start = {row: lastRow + 1, column: 0};
- else if (this.start.row < firstRow)
- var start = {row: firstRow, column: 0};
-
- return Range.fromPoints(start || this.start, end || this.end);
- };
- this.extend = function(row, column) {
- var cmp = this.compare(row, column);
-
- if (cmp == 0)
- return this;
- else if (cmp == -1)
- var start = {row: row, column: column};
- else
- var end = {row: row, column: column};
-
- return Range.fromPoints(start || this.start, end || this.end);
- };
-
- this.isEmpty = function() {
- return (this.start.row === this.end.row && this.start.column === this.end.column);
- };
- this.isMultiLine = function() {
- return (this.start.row !== this.end.row);
- };
- this.clone = function() {
- return Range.fromPoints(this.start, this.end);
- };
- this.collapseRows = function() {
- if (this.end.column == 0)
- return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
- else
- return new Range(this.start.row, 0, this.end.row, 0)
- };
- this.toScreenRange = function(session) {
- var screenPosStart = session.documentToScreenPosition(this.start);
- var screenPosEnd = session.documentToScreenPosition(this.end);
-
- return new Range(
- screenPosStart.row, screenPosStart.column,
- screenPosEnd.row, screenPosEnd.column
- );
- };
- this.moveBy = function(row, column) {
- this.start.row += row;
- this.start.column += column;
- this.end.row += row;
- this.end.column += column;
- };
-
-}).call(Range.prototype);
-Range.fromPoints = function(start, end) {
- return new Range(start.row, start.column, end.row, end.column);
-};
-Range.comparePoints = comparePoints;
-
-Range.comparePoints = function(p1, p2) {
- return p1.row - p2.row || p1.column - p2.column;
-};
-
-
-exports.Range = Range;
-});
-
-ace.define("ace/apply_delta",["require","exports","module"], function(require, exports, module) {
-"use strict";
-
-function throwDeltaError(delta, errorText){
- console.log("Invalid Delta:", delta);
- throw "Invalid Delta: " + errorText;
-}
-
-function positionInDocument(docLines, position) {
- return position.row >= 0 && position.row < docLines.length &&
- position.column >= 0 && position.column <= docLines[position.row].length;
-}
-
-function validateDelta(docLines, delta) {
- if (delta.action != "insert" && delta.action != "remove")
- throwDeltaError(delta, "delta.action must be 'insert' or 'remove'");
- if (!(delta.lines instanceof Array))
- throwDeltaError(delta, "delta.lines must be an Array");
- if (!delta.start || !delta.end)
- throwDeltaError(delta, "delta.start/end must be an present");
- var start = delta.start;
- if (!positionInDocument(docLines, delta.start))
- throwDeltaError(delta, "delta.start must be contained in document");
- var end = delta.end;
- if (delta.action == "remove" && !positionInDocument(docLines, end))
- throwDeltaError(delta, "delta.end must contained in document for 'remove' actions");
- var numRangeRows = end.row - start.row;
- var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0));
- if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars)
- throwDeltaError(delta, "delta.range must match delta lines");
-}
-
-exports.applyDelta = function(docLines, delta, doNotValidate) {
-
- var row = delta.start.row;
- var startColumn = delta.start.column;
- var line = docLines[row] || "";
- switch (delta.action) {
- case "insert":
- var lines = delta.lines;
- if (lines.length === 1) {
- docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn);
- } else {
- var args = [row, 1].concat(delta.lines);
- docLines.splice.apply(docLines, args);
- docLines[row] = line.substring(0, startColumn) + docLines[row];
- docLines[row + delta.lines.length - 1] += line.substring(startColumn);
- }
- break;
- case "remove":
- var endColumn = delta.end.column;
- var endRow = delta.end.row;
- if (row === endRow) {
- docLines[row] = line.substring(0, startColumn) + line.substring(endColumn);
- } else {
- docLines.splice(
- row, endRow - row + 1,
- line.substring(0, startColumn) + docLines[endRow].substring(endColumn)
- );
- }
- break;
- }
-}
-});
-
-ace.define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) {
-"use strict";
-
-var EventEmitter = {};
-var stopPropagation = function() { this.propagationStopped = true; };
-var preventDefault = function() { this.defaultPrevented = true; };
-
-EventEmitter._emit =
-EventEmitter._dispatchEvent = function(eventName, e) {
- this._eventRegistry || (this._eventRegistry = {});
- this._defaultHandlers || (this._defaultHandlers = {});
-
- var listeners = this._eventRegistry[eventName] || [];
- var defaultHandler = this._defaultHandlers[eventName];
- if (!listeners.length && !defaultHandler)
- return;
-
- if (typeof e != "object" || !e)
- e = {};
-
- if (!e.type)
- e.type = eventName;
- if (!e.stopPropagation)
- e.stopPropagation = stopPropagation;
- if (!e.preventDefault)
- e.preventDefault = preventDefault;
-
- listeners = listeners.slice();
- for (var i=0; i<listeners.length; i++) {
- listeners[i](e, this);
- if (e.propagationStopped)
- break;
- }
-
- if (defaultHandler && !e.defaultPrevented)
- return defaultHandler(e, this);
-};
-
-
-EventEmitter._signal = function(eventName, e) {
- var listeners = (this._eventRegistry || {})[eventName];
- if (!listeners)
- return;
- listeners = listeners.slice();
- for (var i=0; i<listeners.length; i++)
- listeners[i](e, this);
-};
-
-EventEmitter.once = function(eventName, callback) {
- var _self = this;
- callback && this.addEventListener(eventName, function newCallback() {
- _self.removeEventListener(eventName, newCallback);
- callback.apply(null, arguments);
- });
-};
-
-
-EventEmitter.setDefaultHandler = function(eventName, callback) {
- var handlers = this._defaultHandlers
- if (!handlers)
- handlers = this._defaultHandlers = {_disabled_: {}};
-
- if (handlers[eventName]) {
- var old = handlers[eventName];
- var disabled = handlers._disabled_[eventName];
- if (!disabled)
- handlers._disabled_[eventName] = disabled = [];
- disabled.push(old);
- var i = disabled.indexOf(callback);
- if (i != -1)
- disabled.splice(i, 1);
- }
- handlers[eventName] = callback;
-};
-EventEmitter.removeDefaultHandler = function(eventName, callback) {
- var handlers = this._defaultHandlers
- if (!handlers)
- return;
- var disabled = handlers._disabled_[eventName];
-
- if (handlers[eventName] == callback) {
- var old = handlers[eventName];
- if (disabled)
- this.setDefaultHandler(eventName, disabled.pop());
- } else if (disabled) {
- var i = disabled.indexOf(callback);
- if (i != -1)
- disabled.splice(i, 1);
- }
-};
-
-EventEmitter.on =
-EventEmitter.addEventListener = function(eventName, callback, capturing) {
- this._eventRegistry = this._eventRegistry || {};
-
- var listeners = this._eventRegistry[eventName];
- if (!listeners)
- listeners = this._eventRegistry[eventName] = [];
-
- if (listeners.indexOf(callback) == -1)
- listeners[capturing ? "unshift" : "push"](callback);
- return callback;
-};
-
-EventEmitter.off =
-EventEmitter.removeListener =
-EventEmitter.removeEventListener = function(eventName, callback) {
- this._eventRegistry = this._eventRegistry || {};
-
- var listeners = this._eventRegistry[eventName];
- if (!listeners)
- return;
-
- var index = listeners.indexOf(callback);
- if (index !== -1)
- listeners.splice(index, 1);
-};
-
-EventEmitter.removeAllListeners = function(eventName) {
- if (this._eventRegistry) this._eventRegistry[eventName] = [];
-};
-
-exports.EventEmitter = EventEmitter;
-
-});
-
-ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) {
-"use strict";
-
-var oop = require("./lib/oop");
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-
-var Anchor = exports.Anchor = function(doc, row, column) {
- this.$onChange = this.onChange.bind(this);
- this.attach(doc);
-
- if (typeof column == "undefined")
- this.setPosition(row.row, row.column);
- else
- this.setPosition(row, column);
-};
-
-(function() {
-
- oop.implement(this, EventEmitter);
- this.getPosition = function() {
- return this.$clipPositionToDocument(this.row, this.column);
- };
- this.getDocument = function() {
- return this.document;
- };
- this.$insertRight = false;
- this.onChange = function(delta) {
- if (delta.start.row == delta.end.row && delta.start.row != this.row)
- return;
-
- if (delta.start.row > this.row)
- return;
-
- var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight);
- this.setPosition(point.row, point.column, true);
- };
-
- function $pointsInOrder(point1, point2, equalPointsInOrder) {
- var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
- return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
- }
-
- function $getTransformedPoint(delta, point, moveIfEqual) {
- var deltaIsInsert = delta.action == "insert";
- var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);
- var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
- var deltaStart = delta.start;
- var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
- if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
- return {
- row: point.row,
- column: point.column
- };
- }
- if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
- return {
- row: point.row + deltaRowShift,
- column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
- };
- }
-
- return {
- row: deltaStart.row,
- column: deltaStart.column
- };
- }
- this.setPosition = function(row, column, noClip) {
- var pos;
- if (noClip) {
- pos = {
- row: row,
- column: column
- };
- } else {
- pos = this.$clipPositionToDocument(row, column);
- }
-
- if (this.row == pos.row && this.column == pos.column)
- return;
-
- var old = {
- row: this.row,
- column: this.column
- };
-
- this.row = pos.row;
- this.column = pos.column;
- this._signal("change", {
- old: old,
- value: pos
- });
- };
- this.detach = function() {
- this.document.removeEventListener("change", this.$onChange);
- };
- this.attach = function(doc) {
- this.document = doc || this.document;
- this.document.on("change", this.$onChange);
- };
- this.$clipPositionToDocument = function(row, column) {
- var pos = {};
-
- if (row >= this.document.getLength()) {
- pos.row = Math.max(0, this.document.getLength() - 1);
- pos.column = this.document.getLine(pos.row).length;
- }
- else if (row < 0) {
- pos.row = 0;
- pos.column = 0;
- }
- else {
- pos.row = row;
- pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
- }
-
- if (column < 0)
- pos.column = 0;
-
- return pos;
- };
-
-}).call(Anchor.prototype);
-
-});
-
-ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) {
-"use strict";
-
-var oop = require("./lib/oop");
-var applyDelta = require("./apply_delta").applyDelta;
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-var Range = require("./range").Range;
-var Anchor = require("./anchor").Anchor;
-
-var Document = function(textOrLines) {
- this.$lines = [""];
- if (textOrLines.length === 0) {
- this.$lines = [""];
- } else if (Array.isArray(textOrLines)) {
- this.insertMergedLines({row: 0, column: 0}, textOrLines);
- } else {
- this.insert({row: 0, column:0}, textOrLines);
- }
-};
-
-(function() {
-
- oop.implement(this, EventEmitter);
- this.setValue = function(text) {
- var len = this.getLength() - 1;
- this.remove(new Range(0, 0, len, this.getLine(len).length));
- this.insert({row: 0, column: 0}, text);
- };
- this.getValue = function() {
- return this.getAllLines().join(this.getNewLineCharacter());
- };
- this.createAnchor = function(row, column) {
- return new Anchor(this, row, column);
- };
- if ("aaa".split(/a/).length === 0) {
- this.$split = function(text) {
- return text.replace(/\r\n|\r/g, "\n").split("\n");
- };
- } else {
- this.$split = function(text) {
- return text.split(/\r\n|\r|\n/);
- };
- }
-
-
- this.$detectNewLine = function(text) {
- var match = text.match(/^.*?(\r\n|\r|\n)/m);
- this.$autoNewLine = match ? match[1] : "\n";
- this._signal("changeNewLineMode");
- };
- this.getNewLineCharacter = function() {
- switch (this.$newLineMode) {
- case "windows":
- return "\r\n";
- case "unix":
- return "\n";
- default:
- return this.$autoNewLine || "\n";
- }
- };
-
- this.$autoNewLine = "";
- this.$newLineMode = "auto";
- this.setNewLineMode = function(newLineMode) {
- if (this.$newLineMode === newLineMode)
- return;
-
- this.$newLineMode = newLineMode;
- this._signal("changeNewLineMode");
- };
- this.getNewLineMode = function() {
- return this.$newLineMode;
- };
- this.isNewLine = function(text) {
- return (text == "\r\n" || text == "\r" || text == "\n");
- };
- this.getLine = function(row) {
- return this.$lines[row] || "";
- };
- this.getLines = function(firstRow, lastRow) {
- return this.$lines.slice(firstRow, lastRow + 1);
- };
- this.getAllLines = function() {
- return this.getLines(0, this.getLength());
- };
- this.getLength = function() {
- return this.$lines.length;
- };
- this.getTextRange = function(range) {
- return this.getLinesForRange(range).join(this.getNewLineCharacter());
- };
- this.getLinesForRange = function(range) {
- var lines;
- if (range.start.row === range.end.row) {
- lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];
- } else {
- lines = this.getLines(range.start.row, range.end.row);
- lines[0] = (lines[0] || "").substring(range.start.column);
- var l = lines.length - 1;
- if (range.end.row - range.start.row == l)
- lines[l] = lines[l].substring(0, range.end.column);
- }
- return lines;
- };
- this.insertLines = function(row, lines) {
- console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead.");
- return this.insertFullLines(row, lines);
- };
- this.removeLines = function(firstRow, lastRow) {
- console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead.");
- return this.removeFullLines(firstRow, lastRow);
- };
- this.insertNewLine = function(position) {
- console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, [\'\', \'\']) instead.");
- return this.insertMergedLines(position, ["", ""]);
- };
- this.insert = function(position, text) {
- if (this.getLength() <= 1)
- this.$detectNewLine(text);
-
- return this.insertMergedLines(position, this.$split(text));
- };
- this.insertInLine = function(position, text) {
- var start = this.clippedPos(position.row, position.column);
- var end = this.pos(position.row, position.column + text.length);
-
- this.applyDelta({
- start: start,
- end: end,
- action: "insert",
- lines: [text]
- }, true);
-
- return this.clonePos(end);
- };
-
- this.clippedPos = function(row, column) {
- var length = this.getLength();
- if (row === undefined) {
- row = length;
- } else if (row < 0) {
- row = 0;
- } else if (row >= length) {
- row = length - 1;
- column = undefined;
- }
- var line = this.getLine(row);
- if (column == undefined)
- column = line.length;
- column = Math.min(Math.max(column, 0), line.length);
- return {row: row, column: column};
- };
-
- this.clonePos = function(pos) {
- return {row: pos.row, column: pos.column};
- };
-
- this.pos = function(row, column) {
- return {row: row, column: column};
- };
-
- this.$clipPosition = function(position) {
- var length = this.getLength();
- if (position.row >= length) {
- position.row = Math.max(0, length - 1);
- position.column = this.getLine(length - 1).length;
- } else {
- position.row = Math.max(0, position.row);
- position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length);
- }
- return position;
- };
- this.insertFullLines = function(row, lines) {
- row = Math.min(Math.max(row, 0), this.getLength());
- var column = 0;
- if (row < this.getLength()) {
- lines = lines.concat([""]);
- column = 0;
- } else {
- lines = [""].concat(lines);
- row--;
- column = this.$lines[row].length;
- }
- this.insertMergedLines({row: row, column: column}, lines);
- };
- this.insertMergedLines = function(position, lines) {
- var start = this.clippedPos(position.row, position.column);
- var end = {
- row: start.row + lines.length - 1,
- column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length
- };
-
- this.applyDelta({
- start: start,
- end: end,
- action: "insert",
- lines: lines
- });
-
- return this.clonePos(end);
- };
- this.remove = function(range) {
- var start = this.clippedPos(range.start.row, range.start.column);
- var end = this.clippedPos(range.end.row, range.end.column);
- this.applyDelta({
- start: start,
- end: end,
- action: "remove",
- lines: this.getLinesForRange({start: start, end: end})
- });
- return this.clonePos(start);
- };
- this.removeInLine = function(row, startColumn, endColumn) {
- var start = this.clippedPos(row, startColumn);
- var end = this.clippedPos(row, endColumn);
-
- this.applyDelta({
- start: start,
- end: end,
- action: "remove",
- lines: this.getLinesForRange({start: start, end: end})
- }, true);
-
- return this.clonePos(start);
- };
- this.removeFullLines = function(firstRow, lastRow) {
- firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);
- lastRow = Math.min(Math.max(0, lastRow ), this.getLength() - 1);
- var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;
- var deleteLastNewLine = lastRow < this.getLength() - 1;
- var startRow = ( deleteFirstNewLine ? firstRow - 1 : firstRow );
- var startCol = ( deleteFirstNewLine ? this.getLine(startRow).length : 0 );
- var endRow = ( deleteLastNewLine ? lastRow + 1 : lastRow );
- var endCol = ( deleteLastNewLine ? 0 : this.getLine(endRow).length );
- var range = new Range(startRow, startCol, endRow, endCol);
- var deletedLines = this.$lines.slice(firstRow, lastRow + 1);
-
- this.applyDelta({
- start: range.start,
- end: range.end,
- action: "remove",
- lines: this.getLinesForRange(range)
- });
- return deletedLines;
- };
- this.removeNewLine = function(row) {
- if (row < this.getLength() - 1 && row >= 0) {
- this.applyDelta({
- start: this.pos(row, this.getLine(row).length),
- end: this.pos(row + 1, 0),
- action: "remove",
- lines: ["", ""]
- });
- }
- };
- this.replace = function(range, text) {
- if (!(range instanceof Range))
- range = Range.fromPoints(range.start, range.end);
- if (text.length === 0 && range.isEmpty())
- return range.start;
- if (text == this.getTextRange(range))
- return range.end;
-
- this.remove(range);
- var end;
- if (text) {
- end = this.insert(range.start, text);
- }
- else {
- end = range.start;
- }
-
- return end;
- };
- this.applyDeltas = function(deltas) {
- for (var i=0; i<deltas.length; i++) {
- this.applyDelta(deltas[i]);
- }
- };
- this.revertDeltas = function(deltas) {
- for (var i=deltas.length-1; i>=0; i--) {
- this.revertDelta(deltas[i]);
- }
- };
- this.applyDelta = function(delta, doNotValidate) {
- var isInsert = delta.action == "insert";
- if (isInsert ? delta.lines.length <= 1 && !delta.lines[0]
- : !Range.comparePoints(delta.start, delta.end)) {
- return;
- }
-
- if (isInsert && delta.lines.length > 20000)
- this.$splitAndapplyLargeDelta(delta, 20000);
- applyDelta(this.$lines, delta, doNotValidate);
- this._signal("change", delta);
- };
-
- this.$splitAndapplyLargeDelta = function(delta, MAX) {
- var lines = delta.lines;
- var l = lines.length;
- var row = delta.start.row;
- var column = delta.start.column;
- var from = 0, to = 0;
- do {
- from = to;
- to += MAX - 1;
- var chunk = lines.slice(from, to);
- if (to > l) {
- delta.lines = chunk;
- delta.start.row = row + from;
- delta.start.column = column;
- break;
- }
- chunk.push("");
- this.applyDelta({
- start: this.pos(row + from, column),
- end: this.pos(row + to, column = 0),
- action: delta.action,
- lines: chunk
- }, true);
- } while(true);
- };
- this.revertDelta = function(delta) {
- this.applyDelta({
- start: this.clonePos(delta.start),
- end: this.clonePos(delta.end),
- action: (delta.action == "insert" ? "remove" : "insert"),
- lines: delta.lines.slice()
- });
- };
- this.indexToPosition = function(index, startRow) {
- var lines = this.$lines || this.getAllLines();
- var newlineLength = this.getNewLineCharacter().length;
- for (var i = startRow || 0, l = lines.length; i < l; i++) {
- index -= lines[i].length + newlineLength;
- if (index < 0)
- return {row: i, column: index + lines[i].length + newlineLength};
- }
- return {row: l-1, column: lines[l-1].length};
- };
- this.positionToIndex = function(pos, startRow) {
- var lines = this.$lines || this.getAllLines();
- var newlineLength = this.getNewLineCharacter().length;
- var index = 0;
- var row = Math.min(pos.row, lines.length);
- for (var i = startRow || 0; i < row; ++i)
- index += lines[i].length + newlineLength;
-
- return index + pos.column;
- };
-
-}).call(Document.prototype);
-
-exports.Document = Document;
-});
-
-ace.define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"], function(require, exports, module) {
-"use strict";
-
-var Range = require("../range").Range;
-var Document = require("../document").Document;
-var lang = require("../lib/lang");
-
-var Mirror = exports.Mirror = function(sender) {
- this.sender = sender;
- var doc = this.doc = new Document("");
-
- var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));
-
- var _self = this;
- sender.on("change", function(e) {
- var data = e.data;
- if (data[0].start) {
- doc.applyDeltas(data);
- } else {
- for (var i = 0; i < data.length; i += 2) {
- if (Array.isArray(data[i+1])) {
- var d = {action: "insert", start: data[i], lines: data[i+1]};
- } else {
- var d = {action: "remove", start: data[i], end: data[i+1]};
- }
- doc.applyDelta(d, true);
- }
- }
- if (_self.$timeout)
- return deferredUpdate.schedule(_self.$timeout);
- _self.onUpdate();
- });
-};
-
-(function() {
-
- this.$timeout = 500;
-
- this.setTimeout = function(timeout) {
- this.$timeout = timeout;
- };
-
- this.setValue = function(value) {
- this.doc.setValue(value);
- this.deferredUpdate.schedule(this.$timeout);
- };
-
- this.getValue = function(callbackId) {
- this.sender.callback(this.doc.getValue(), callbackId);
- };
-
- this.onUpdate = function() {
- };
-
- this.isPending = function() {
- return this.deferredUpdate.isPending();
- };
-
-}).call(Mirror.prototype);
-
-});
-
-ace.define("ace/mode/xml/sax",["require","exports","module"], function(require, exports, module) {
-var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]///\u10000-\uEFFFF
-var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\u00B7\u0300-\u036F\\ux203F-\u2040]");
-var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$');
-var S_TAG = 0;//tag name offerring
-var S_ATTR = 1;//attr name offerring
-var S_ATTR_S=2;//attr name end and space offer
-var S_EQ = 3;//=space?
-var S_V = 4;//attr value(no quot value only)
-var S_E = 5;//attr value end and no space(quot end)
-var S_S = 6;//(attr value end || tag end ) && (space offer)
-var S_C = 7;//closed el<el />
-
-function XMLReader(){
-
-}
-
-XMLReader.prototype = {
- parse:function(source,defaultNSMap,entityMap){
- var domBuilder = this.domBuilder;
- domBuilder.startDocument();
- _copy(defaultNSMap ,defaultNSMap = {})
- parse(source,defaultNSMap,entityMap,
- domBuilder,this.errorHandler);
- domBuilder.endDocument();
- }
-}
-function parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){
- function fixedFromCharCode(code) {
- if (code > 0xffff) {
- code -= 0x10000;
- var surrogate1 = 0xd800 + (code >> 10)
- , surrogate2 = 0xdc00 + (code & 0x3ff);
-
- return String.fromCharCode(surrogate1, surrogate2);
- } else {
- return String.fromCharCode(code);
- }
- }
- function entityReplacer(a){
- var k = a.slice(1,-1);
- if(k in entityMap){
- return entityMap[k];
- }else if(k.charAt(0) === '#'){
- return fixedFromCharCode(parseInt(k.substr(1).replace('x','0x')))
- }else{
- errorHandler.error('entity not found:'+a);
- return a;
- }
- }
- function appendText(end){//has some bugs
- var xt = source.substring(start,end).replace(/&#?\w+;/g,entityReplacer);
- locator&&position(start);
- domBuilder.characters(xt,0,end-start);
- start = end
- }
- function position(start,m){
- while(start>=endPos && (m = linePattern.exec(source))){
- startPos = m.index;
- endPos = startPos + m[0].length;
- locator.lineNumber++;
- }
- locator.columnNumber = start-startPos+1;
- }
- var startPos = 0;
- var endPos = 0;
- var linePattern = /.+(?:\r\n?|\n)|.*$/g
- var locator = domBuilder.locator;
-
- var parseStack = [{currentNSMap:defaultNSMapCopy}]
- var closeMap = {};
- var start = 0;
- while(true){
- var i = source.indexOf('<',start);
- if(i<0){
- if(!source.substr(start).match(/^\s*$/)){
- var doc = domBuilder.document;
- var text = doc.createTextNode(source.substr(start));
- doc.appendChild(text);
- domBuilder.currentElement = text;
- }
- return;
- }
- if(i>start){
- appendText(i);
- }
- switch(source.charAt(i+1)){
- case '/':
- var end = source.indexOf('>',i+3);
- var tagName = source.substring(i+2,end);
- var config;
- if (parseStack.length > 1) {
- config = parseStack.pop();
- } else {
- errorHandler.fatalError("end tag name not found for: "+tagName);
- break;
- }
- var localNSMap = config.localNSMap;
-
- if(config.tagName != tagName){
- errorHandler.fatalError("end tag name: " + tagName + " does not match the current start tagName: "+config.tagName );
- }
- domBuilder.endElement(config.uri,config.localName,tagName);
- if(localNSMap){
- for(var prefix in localNSMap){
- domBuilder.endPrefixMapping(prefix) ;
- }
- }
- end++;
- break;
- case '?':// <?...?>
- locator&&position(i);
- end = parseInstruction(source,i,domBuilder);
- break;
- case '!':// <!doctype,<![CDATA,<!--
- locator&&position(i);
- end = parseDCC(source,i,domBuilder,errorHandler);
- break;
- default:
- try{
- locator&&position(i);
-
- var el = new ElementAttributes();
- var end = parseElementStartPart(source,i,el,entityReplacer,errorHandler);
- var len = el.length;
- if(len && locator){
- var backup = copyLocator(locator,{});
- for(var i = 0;i<len;i++){
- var a = el[i];
- position(a.offset);
- a.offset = copyLocator(locator,{});
- }
- copyLocator(backup,locator);
- }
- if(!el.closed && fixSelfClosed(source,end,el.tagName,closeMap)){
- el.closed = true;
- if(!entityMap.nbsp){
- errorHandler.warning('unclosed xml attribute');
- }
- }
- appendElement(el,domBuilder,parseStack);
-
-
- if(el.uri === 'http://www.w3.org/1999/xhtml' && !el.closed){
- end = parseHtmlSpecialContent(source,end,el.tagName,entityReplacer,domBuilder)
- }else{
- end++;
- }
- }catch(e){
- errorHandler.error('element parse error: '+e);
- end = -1;
- }
-
- }
- if(end<0){
- appendText(i+1);
- }else{
- start = end;
- }
- }
-}
-function copyLocator(f,t){
- t.lineNumber = f.lineNumber;
- t.columnNumber = f.columnNumber;
- return t;
-
-}
-function parseElementStartPart(source,start,el,entityReplacer,errorHandler){
- var attrName;
- var value;
- var p = ++start;
- var s = S_TAG;//status
- while(true){
- var c = source.charAt(p);
- switch(c){
- case '=':
- if(s === S_ATTR){//attrName
- attrName = source.slice(start,p);
- s = S_EQ;
- }else if(s === S_ATTR_S){
- s = S_EQ;
- }else{
- throw new Error('attribute equal must after attrName');
- }
- break;
- case '\'':
- case '"':
- if(s === S_EQ){//equal
- start = p+1;
- p = source.indexOf(c,start)
- if(p>0){
- value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);
- el.add(attrName,value,start-1);
- s = S_E;
- }else{
- throw new Error('attribute value no end \''+c+'\' match');
- }
- }else if(s == S_V){
- value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);
- el.add(attrName,value,start);
- errorHandler.warning('attribute "'+attrName+'" missed start quot('+c+')!!');
- start = p+1;
- s = S_E
- }else{
- throw new Error('attribute value must after "="');
- }
- break;
- case '/':
- switch(s){
- case S_TAG:
- el.setTagName(source.slice(start,p));
- case S_E:
- case S_S:
- case S_C:
- s = S_C;
- el.closed = true;
- case S_V:
- case S_ATTR:
- case S_ATTR_S:
- break;
- default:
- throw new Error("attribute invalid close char('/')")
- }
- break;
- case ''://end document
- errorHandler.error('unexpected end of input');
- case '>':
- switch(s){
- case S_TAG:
- el.setTagName(source.slice(start,p));
- case S_E:
- case S_S:
- case S_C:
- break;//normal
- case S_V://Compatible state
- case S_ATTR:
- value = source.slice(start,p);
- if(value.slice(-1) === '/'){
- el.closed = true;
- value = value.slice(0,-1)
- }
- case S_ATTR_S:
- if(s === S_ATTR_S){
- value = attrName;
- }
- if(s == S_V){
- errorHandler.warning('attribute "'+value+'" missed quot(")!!');
- el.add(attrName,value.replace(/&#?\w+;/g,entityReplacer),start)
- }else{
- errorHandler.warning('attribute "'+value+'" missed value!! "'+value+'" instead!!')
- el.add(value,value,start)
- }
- break;
- case S_EQ:
- throw new Error('attribute value missed!!');
- }
- return p;
- case '\u0080':
- c = ' ';
- default:
- if(c<= ' '){//space
- switch(s){
- case S_TAG:
- el.setTagName(source.slice(start,p));//tagName
- s = S_S;
- break;
- case S_ATTR:
- attrName = source.slice(start,p)
- s = S_ATTR_S;
- break;
- case S_V:
- var value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);
- errorHandler.warning('attribute "'+value+'" missed quot(")!!');
- el.add(attrName,value,start)
- case S_E:
- s = S_S;
- break;
- }
- }else{//not space
- switch(s){
- case S_ATTR_S:
- errorHandler.warning('attribute "'+attrName+'" missed value!! "'+attrName+'" instead!!')
- el.add(attrName,attrName,start);
- start = p;
- s = S_ATTR;
- break;
- case S_E:
- errorHandler.warning('attribute space is required"'+attrName+'"!!')
- case S_S:
- s = S_ATTR;
- start = p;
- break;
- case S_EQ:
- s = S_V;
- start = p;
- break;
- case S_C:
- throw new Error("elements closed character '/' and '>' must be connected to");
- }
- }
- }
- p++;
- }
-}
-function appendElement(el,domBuilder,parseStack){
- var tagName = el.tagName;
- var localNSMap = null;
- var currentNSMap = parseStack[parseStack.length-1].currentNSMap;
- var i = el.length;
- while(i--){
- var a = el[i];
- var qName = a.qName;
- var value = a.value;
- var nsp = qName.indexOf(':');
- if(nsp>0){
- var prefix = a.prefix = qName.slice(0,nsp);
- var localName = qName.slice(nsp+1);
- var nsPrefix = prefix === 'xmlns' && localName
- }else{
- localName = qName;
- prefix = null
- nsPrefix = qName === 'xmlns' && ''
- }
- a.localName = localName ;
- if(nsPrefix !== false){//hack!!
- if(localNSMap == null){
- localNSMap = {}
- _copy(currentNSMap,currentNSMap={})
- }
- currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value;
- a.uri = 'http://www.w3.org/2000/xmlns/'
- domBuilder.startPrefixMapping(nsPrefix, value)
- }
- }
- var i = el.length;
- while(i--){
- a = el[i];
- var prefix = a.prefix;
- if(prefix){//no prefix attribute has no namespace
- if(prefix === 'xml'){
- a.uri = 'http://www.w3.org/XML/1998/namespace';
- }if(prefix !== 'xmlns'){
- a.uri = currentNSMap[prefix]
- }
- }
- }
- var nsp = tagName.indexOf(':');
- if(nsp>0){
- prefix = el.prefix = tagName.slice(0,nsp);
- localName = el.localName = tagName.slice(nsp+1);
- }else{
- prefix = null;//important!!
- localName = el.localName = tagName;
- }
- var ns = el.uri = currentNSMap[prefix || ''];
- domBuilder.startElement(ns,localName,tagName,el);
- if(el.closed){
- domBuilder.endElement(ns,localName,tagName);
- if(localNSMap){
- for(prefix in localNSMap){
- domBuilder.endPrefixMapping(prefix)
- }
- }
- }else{
- el.currentNSMap = currentNSMap;
- el.localNSMap = localNSMap;
- parseStack.push(el);
- }
-}
-function parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){
- if(/^(?:script|textarea)$/i.test(tagName)){
- var elEndStart = source.indexOf('</'+tagName+'>',elStartEnd);
- var text = source.substring(elStartEnd+1,elEndStart);
- if(/[&<]/.test(text)){
- if(/^script$/i.test(tagName)){
- domBuilder.characters(text,0,text.length);
- return elEndStart;
- }//}else{//text area
- text = text.replace(/&#?\w+;/g,entityReplacer);
- domBuilder.characters(text,0,text.length);
- return elEndStart;
-
- }
- }
- return elStartEnd+1;
-}
-function fixSelfClosed(source,elStartEnd,tagName,closeMap){
- var pos = closeMap[tagName];
- if(pos == null){
- pos = closeMap[tagName] = source.lastIndexOf('</'+tagName+'>')
- }
- return pos<elStartEnd;
-}
-function _copy(source,target){
- for(var n in source){target[n] = source[n]}
-}
-function parseDCC(source,start,domBuilder,errorHandler){//sure start with '<!'
- var next= source.charAt(start+2)
- switch(next){
- case '-':
- if(source.charAt(start + 3) === '-'){
- var end = source.indexOf('-->',start+4);
- if(end>start){
- domBuilder.comment(source,start+4,end-start-4);
- return end+3;
- }else{
- errorHandler.error("Unclosed comment");
- return -1;
- }
- }else{
- return -1;
- }
- default:
- if(source.substr(start+3,6) == 'CDATA['){
- var end = source.indexOf(']]>',start+9);
- domBuilder.startCDATA();
- domBuilder.characters(source,start+9,end-start-9);
- domBuilder.endCDATA()
- return end+3;
- }
- var matchs = split(source,start);
- var len = matchs.length;
- if(len>1 && /!doctype/i.test(matchs[0][0])){
- var name = matchs[1][0];
- var pubid = len>3 && /^public$/i.test(matchs[2][0]) && matchs[3][0]
- var sysid = len>4 && matchs[4][0];
- var lastMatch = matchs[len-1]
- domBuilder.startDTD(name,pubid && pubid.replace(/^(['"])(.*?)\1$/,'$2'),
- sysid && sysid.replace(/^(['"])(.*?)\1$/,'$2'));
- domBuilder.endDTD();
-
- return lastMatch.index+lastMatch[0].length
- }
- }
- return -1;
-}
-
-
-
-function parseInstruction(source,start,domBuilder){
- var end = source.indexOf('?>',start);
- if(end){
- var match = source.substring(start,end).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);
- if(match){
- var len = match[0].length;
- domBuilder.processingInstruction(match[1], match[2]) ;
- return end+2;
- }else{//error
- return -1;
- }
- }
- return -1;
-}
-function ElementAttributes(source){
-
-}
-ElementAttributes.prototype = {
- setTagName:function(tagName){
- if(!tagNamePattern.test(tagName)){
- throw new Error('invalid tagName:'+tagName)
- }
- this.tagName = tagName
- },
- add:function(qName,value,offset){
- if(!tagNamePattern.test(qName)){
- throw new Error('invalid attribute:'+qName)
- }
- this[this.length++] = {qName:qName,value:value,offset:offset}
- },
- length:0,
- getLocalName:function(i){return this[i].localName},
- getOffset:function(i){return this[i].offset},
- getQName:function(i){return this[i].qName},
- getURI:function(i){return this[i].uri},
- getValue:function(i){return this[i].value}
-}
-
-
-
-
-function _set_proto_(thiz,parent){
- thiz.__proto__ = parent;
- return thiz;
-}
-if(!(_set_proto_({},_set_proto_.prototype) instanceof _set_proto_)){
- _set_proto_ = function(thiz,parent){
- function p(){};
- p.prototype = parent;
- p = new p();
- for(parent in thiz){
- p[parent] = thiz[parent];
- }
- return p;
- }
-}
-
-function split(source,start){
- var match;
- var buf = [];
- var reg = /'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;
- reg.lastIndex = start;
- reg.exec(source);//skip <
- while(match = reg.exec(source)){
- buf.push(match);
- if(match[1])return buf;
- }
-}
-
-return XMLReader;
-});
-
-ace.define("ace/mode/xml/dom",["require","exports","module"], function(require, exports, module) {
-
-function copy(src,dest){
- for(var p in src){
- dest[p] = src[p];
- }
-}
-function _extends(Class,Super){
- var pt = Class.prototype;
- if(Object.create){
- var ppt = Object.create(Super.prototype)
- pt.__proto__ = ppt;
- }
- if(!(pt instanceof Super)){
- function t(){};
- t.prototype = Super.prototype;
- t = new t();
- copy(pt,t);
- Class.prototype = pt = t;
- }
- if(pt.constructor != Class){
- if(typeof Class != 'function'){
- console.error("unknow Class:"+Class)
- }
- pt.constructor = Class
- }
-}
-var htmlns = 'http://www.w3.org/1999/xhtml' ;
-var NodeType = {}
-var ELEMENT_NODE = NodeType.ELEMENT_NODE = 1;
-var ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2;
-var TEXT_NODE = NodeType.TEXT_NODE = 3;
-var CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4;
-var ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5;
-var ENTITY_NODE = NodeType.ENTITY_NODE = 6;
-var PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7;
-var COMMENT_NODE = NodeType.COMMENT_NODE = 8;
-var DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9;
-var DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10;
-var DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11;
-var NOTATION_NODE = NodeType.NOTATION_NODE = 12;
-var ExceptionCode = {}
-var ExceptionMessage = {};
-var INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = ((ExceptionMessage[1]="Index size error"),1);
-var DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]="DOMString size error"),2);
-var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]="Hierarchy request error"),3);
-var WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]="Wrong document"),4);
-var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5);
-var NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]="No data allowed"),6);
-var NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]="No modification allowed"),7);
-var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]="Not found"),8);
-var NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]="Not supported"),9);
-var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]="Attribute in use"),10);
-var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11);
-var SYNTAX_ERR = ExceptionCode.SYNTAX_ERR = ((ExceptionMessage[12]="Syntax error"),12);
-var INVALID_MODIFICATION_ERR = ExceptionCode.INVALID_MODIFICATION_ERR = ((ExceptionMessage[13]="Invalid modification"),13);
-var NAMESPACE_ERR = ExceptionCode.NAMESPACE_ERR = ((ExceptionMessage[14]="Invalid namespace"),14);
-var INVALID_ACCESS_ERR = ExceptionCode.INVALID_ACCESS_ERR = ((ExceptionMessage[15]="Invalid access"),15);
-
-
-function DOMException(code, message) {
- if(message instanceof Error){
- var error = message;
- }else{
- error = this;
- Error.call(this, ExceptionMessage[code]);
- this.message = ExceptionMessage[code];
- if(Error.captureStackTrace) Error.captureStackTrace(this, DOMException);
- }
- error.code = code;
- if(message) this.message = this.message + ": " + message;
- return error;
-};
-DOMException.prototype = Error.prototype;
-copy(ExceptionCode,DOMException)
-function NodeList() {
-};
-NodeList.prototype = {
- length:0,
- item: function(index) {
- return this[index] || null;
- }
-};
-function LiveNodeList(node,refresh){
- this._node = node;
- this._refresh = refresh
- _updateLiveList(this);
-}
-function _updateLiveList(list){
- var inc = list._node._inc || list._node.ownerDocument._inc;
- if(list._inc != inc){
- var ls = list._refresh(list._node);
- __set__(list,'length',ls.length);
- copy(ls,list);
- list._inc = inc;
- }
-}
-LiveNodeList.prototype.item = function(i){
- _updateLiveList(this);
- return this[i];
-}
-
-_extends(LiveNodeList,NodeList);
-function NamedNodeMap() {
-};
-
-function _findNodeIndex(list,node){
- var i = list.length;
- while(i--){
- if(list[i] === node){return i}
- }
-}
-
-function _addNamedNode(el,list,newAttr,oldAttr){
- if(oldAttr){
- list[_findNodeIndex(list,oldAttr)] = newAttr;
- }else{
- list[list.length++] = newAttr;
- }
- if(el){
- newAttr.ownerElement = el;
- var doc = el.ownerDocument;
- if(doc){
- oldAttr && _onRemoveAttribute(doc,el,oldAttr);
- _onAddAttribute(doc,el,newAttr);
- }
- }
-}
-function _removeNamedNode(el,list,attr){
- var i = _findNodeIndex(list,attr);
- if(i>=0){
- var lastIndex = list.length-1
- while(i<lastIndex){
- list[i] = list[++i]
- }
- list.length = lastIndex;
- if(el){
- var doc = el.ownerDocument;
- if(doc){
- _onRemoveAttribute(doc,el,attr);
- attr.ownerElement = null;
- }
- }
- }else{
- throw DOMException(NOT_FOUND_ERR,new Error())
- }
-}
-NamedNodeMap.prototype = {
- length:0,
- item:NodeList.prototype.item,
- getNamedItem: function(key) {
- var i = this.length;
- while(i--){
- var attr = this[i];
- if(attr.nodeName == key){
- return attr;
- }
- }
- },
- setNamedItem: function(attr) {
- var el = attr.ownerElement;
- if(el && el!=this._ownerElement){
- throw new DOMException(INUSE_ATTRIBUTE_ERR);
- }
- var oldAttr = this.getNamedItem(attr.nodeName);
- _addNamedNode(this._ownerElement,this,attr,oldAttr);
- return oldAttr;
- },
- setNamedItemNS: function(attr) {// raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR
- var el = attr.ownerElement, oldAttr;
- if(el && el!=this._ownerElement){
- throw new DOMException(INUSE_ATTRIBUTE_ERR);
- }
- oldAttr = this.getNamedItemNS(attr.namespaceURI,attr.localName);
- _addNamedNode(this._ownerElement,this,attr,oldAttr);
- return oldAttr;
- },
- removeNamedItem: function(key) {
- var attr = this.getNamedItem(key);
- _removeNamedNode(this._ownerElement,this,attr);
- return attr;
-
-
- },// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR
- removeNamedItemNS:function(namespaceURI,localName){
- var attr = this.getNamedItemNS(namespaceURI,localName);
- _removeNamedNode(this._ownerElement,this,attr);
- return attr;
- },
- getNamedItemNS: function(namespaceURI, localName) {
- var i = this.length;
- while(i--){
- var node = this[i];
- if(node.localName == localName && node.namespaceURI == namespaceURI){
- return node;
- }
- }
- return null;
- }
-};
-function DOMImplementation(/* Object */ features) {
- this._features = {};
- if (features) {
- for (var feature in features) {
- this._features = features[feature];
- }
- }
-};
-
-DOMImplementation.prototype = {
- hasFeature: function(/* string */ feature, /* string */ version) {
- var versions = this._features[feature.toLowerCase()];
- if (versions && (!version || version in versions)) {
- return true;
- } else {
- return false;
- }
- },
- createDocument:function(namespaceURI, qualifiedName, doctype){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR,WRONG_DOCUMENT_ERR
- var doc = new Document();
- doc.implementation = this;
- doc.childNodes = new NodeList();
- doc.doctype = doctype;
- if(doctype){
- doc.appendChild(doctype);
- }
- if(qualifiedName){
- var root = doc.createElementNS(namespaceURI,qualifiedName);
- doc.appendChild(root);
- }
- return doc;
- },
- createDocumentType:function(qualifiedName, publicId, systemId){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR
- var node = new DocumentType();
- node.name = qualifiedName;
- node.nodeName = qualifiedName;
- node.publicId = publicId;
- node.systemId = systemId;
- return node;
- }
-};
-
-function Node() {
-};
-
-Node.prototype = {
- firstChild : null,
- lastChild : null,
- previousSibling : null,
- nextSibling : null,
- attributes : null,
- parentNode : null,
- childNodes : null,
- ownerDocument : null,
- nodeValue : null,
- namespaceURI : null,
- prefix : null,
- localName : null,
- insertBefore:function(newChild, refChild){//raises
- return _insertBefore(this,newChild,refChild);
- },
- replaceChild:function(newChild, oldChild){//raises
- this.insertBefore(newChild,oldChild);
- if(oldChild){
- this.removeChild(oldChild);
- }
- },
- removeChild:function(oldChild){
- return _removeChild(this,oldChild);
- },
- appendChild:function(newChild){
- return this.insertBefore(newChild,null);
- },
- hasChildNodes:function(){
- return this.firstChild != null;
- },
- cloneNode:function(deep){
- return cloneNode(this.ownerDocument||this,this,deep);
- },
- normalize:function(){
- var child = this.firstChild;
- while(child){
- var next = child.nextSibling;
- if(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){
- this.removeChild(next);
- child.appendData(next.data);
- }else{
- child.normalize();
- child = next;
- }
- }
- },
- isSupported:function(feature, version){
- return this.ownerDocument.implementation.hasFeature(feature,version);
- },
- hasAttributes:function(){
- return this.attributes.length>0;
- },
- lookupPrefix:function(namespaceURI){
- var el = this;
- while(el){
- var map = el._nsMap;
- if(map){
- for(var n in map){
- if(map[n] == namespaceURI){
- return n;
- }
- }
- }
- el = el.nodeType == 2?el.ownerDocument : el.parentNode;
- }
- return null;
- },
- lookupNamespaceURI:function(prefix){
- var el = this;
- while(el){
- var map = el._nsMap;
- if(map){
- if(prefix in map){
- return map[prefix] ;
- }
- }
- el = el.nodeType == 2?el.ownerDocument : el.parentNode;
- }
- return null;
- },
- isDefaultNamespace:function(namespaceURI){
- var prefix = this.lookupPrefix(namespaceURI);
- return prefix == null;
- }
-};
-
-
-function _xmlEncoder(c){
- return c == '<' && '<' ||
- c == '>' && '>' ||
- c == '&' && '&' ||
- c == '"' && '"' ||
- '&#'+c.charCodeAt()+';'
-}
-
-
-copy(NodeType,Node);
-copy(NodeType,Node.prototype);
-function _visitNode(node,callback){
- if(callback(node)){
- return true;
- }
- if(node = node.firstChild){
- do{
- if(_visitNode(node,callback)){return true}
- }while(node=node.nextSibling)
- }
-}
-
-
-
-function Document(){
-}
-function _onAddAttribute(doc,el,newAttr){
- doc && doc._inc++;
- var ns = newAttr.namespaceURI ;
- if(ns == 'http://www.w3.org/2000/xmlns/'){
- el._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value
- }
-}
-function _onRemoveAttribute(doc,el,newAttr,remove){
- doc && doc._inc++;
- var ns = newAttr.namespaceURI ;
- if(ns == 'http://www.w3.org/2000/xmlns/'){
- delete el._nsMap[newAttr.prefix?newAttr.localName:'']
- }
-}
-function _onUpdateChild(doc,el,newChild){
- if(doc && doc._inc){
- doc._inc++;
- var cs = el.childNodes;
- if(newChild){
- cs[cs.length++] = newChild;
- }else{
- var child = el.firstChild;
- var i = 0;
- while(child){
- cs[i++] = child;
- child =child.nextSibling;
- }
- cs.length = i;
- }
- }
-}
-function _removeChild(parentNode,child){
- var previous = child.previousSibling;
- var next = child.nextSibling;
- if(previous){
- previous.nextSibling = next;
- }else{
- parentNode.firstChild = next
- }
- if(next){
- next.previousSibling = previous;
- }else{
- parentNode.lastChild = previous;
- }
- _onUpdateChild(parentNode.ownerDocument,parentNode);
- return child;
-}
-function _insertBefore(parentNode,newChild,nextChild){
- var cp = newChild.parentNode;
- if(cp){
- cp.removeChild(newChild);//remove and update
- }
- if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){
- var newFirst = newChild.firstChild;
- if (newFirst == null) {
- return newChild;
- }
- var newLast = newChild.lastChild;
- }else{
- newFirst = newLast = newChild;
- }
- var pre = nextChild ? nextChild.previousSibling : parentNode.lastChild;
-
- newFirst.previousSibling = pre;
- newLast.nextSibling = nextChild;
-
-
- if(pre){
- pre.nextSibling = newFirst;
- }else{
- parentNode.firstChild = newFirst;
- }
- if(nextChild == null){
- parentNode.lastChild = newLast;
- }else{
- nextChild.previousSibling = newLast;
- }
- do{
- newFirst.parentNode = parentNode;
- }while(newFirst !== newLast && (newFirst= newFirst.nextSibling))
- _onUpdateChild(parentNode.ownerDocument||parentNode,parentNode);
- if (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) {
- newChild.firstChild = newChild.lastChild = null;
- }
- return newChild;
-}
-function _appendSingleChild(parentNode,newChild){
- var cp = newChild.parentNode;
- if(cp){
- var pre = parentNode.lastChild;
- cp.removeChild(newChild);//remove and update
- var pre = parentNode.lastChild;
- }
- var pre = parentNode.lastChild;
- newChild.parentNode = parentNode;
- newChild.previousSibling = pre;
- newChild.nextSibling = null;
- if(pre){
- pre.nextSibling = newChild;
- }else{
- parentNode.firstChild = newChild;
- }
- parentNode.lastChild = newChild;
- _onUpdateChild(parentNode.ownerDocument,parentNode,newChild);
- return newChild;
-}
-Document.prototype = {
- nodeName : '#document',
- nodeType : DOCUMENT_NODE,
- doctype : null,
- documentElement : null,
- _inc : 1,
-
- insertBefore : function(newChild, refChild){//raises
- if(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){
- var child = newChild.firstChild;
- while(child){
- var next = child.nextSibling;
- this.insertBefore(child,refChild);
- child = next;
- }
- return newChild;
- }
- if(this.documentElement == null && newChild.nodeType == 1){
- this.documentElement = newChild;
- }
-
- return _insertBefore(this,newChild,refChild),(newChild.ownerDocument = this),newChild;
- },
- removeChild : function(oldChild){
- if(this.documentElement == oldChild){
- this.documentElement = null;
- }
- return _removeChild(this,oldChild);
- },
- importNode : function(importedNode,deep){
- return importNode(this,importedNode,deep);
- },
- getElementById : function(id){
- var rtv = null;
- _visitNode(this.documentElement,function(node){
- if(node.nodeType == 1){
- if(node.getAttribute('id') == id){
- rtv = node;
- return true;
- }
- }
- })
- return rtv;
- },
- createElement : function(tagName){
- var node = new Element();
- node.ownerDocument = this;
- node.nodeName = tagName;
- node.tagName = tagName;
- node.childNodes = new NodeList();
- var attrs = node.attributes = new NamedNodeMap();
- attrs._ownerElement = node;
- return node;
- },
- createDocumentFragment : function(){
- var node = new DocumentFragment();
- node.ownerDocument = this;
- node.childNodes = new NodeList();
- return node;
- },
- createTextNode : function(data){
- var node = new Text();
- node.ownerDocument = this;
- node.appendData(data)
- return node;
- },
- createComment : function(data){
- var node = new Comment();
- node.ownerDocument = this;
- node.appendData(data)
- return node;
- },
- createCDATASection : function(data){
- var node = new CDATASection();
- node.ownerDocument = this;
- node.appendData(data)
- return node;
- },
- createProcessingInstruction : function(target,data){
- var node = new ProcessingInstruction();
- node.ownerDocument = this;
- node.tagName = node.target = target;
- node.nodeValue= node.data = data;
- return node;
- },
- createAttribute : function(name){
- var node = new Attr();
- node.ownerDocument = this;
- node.name = name;
- node.nodeName = name;
- node.localName = name;
- node.specified = true;
- return node;
- },
- createEntityReference : function(name){
- var node = new EntityReference();
- node.ownerDocument = this;
- node.nodeName = name;
- return node;
- },
- createElementNS : function(namespaceURI,qualifiedName){
- var node = new Element();
- var pl = qualifiedName.split(':');
- var attrs = node.attributes = new NamedNodeMap();
- node.childNodes = new NodeList();
- node.ownerDocument = this;
- node.nodeName = qualifiedName;
- node.tagName = qualifiedName;
- node.namespaceURI = namespaceURI;
- if(pl.length == 2){
- node.prefix = pl[0];
- node.localName = pl[1];
- }else{
- node.localName = qualifiedName;
- }
- attrs._ownerElement = node;
- return node;
- },
- createAttributeNS : function(namespaceURI,qualifiedName){
- var node = new Attr();
- var pl = qualifiedName.split(':');
- node.ownerDocument = this;
- node.nodeName = qualifiedName;
- node.name = qualifiedName;
- node.namespaceURI = namespaceURI;
- node.specified = true;
- if(pl.length == 2){
- node.prefix = pl[0];
- node.localName = pl[1];
- }else{
- node.localName = qualifiedName;
- }
- return node;
- }
-};
-_extends(Document,Node);
-
-
-function Element() {
- this._nsMap = {};
-};
-Element.prototype = {
- nodeType : ELEMENT_NODE,
- hasAttribute : function(name){
- return this.getAttributeNode(name)!=null;
- },
- getAttribute : function(name){
- var attr = this.getAttributeNode(name);
- return attr && attr.value || '';
- },
- getAttributeNode : function(name){
- return this.attributes.getNamedItem(name);
- },
- setAttribute : function(name, value){
- var attr = this.ownerDocument.createAttribute(name);
- attr.value = attr.nodeValue = "" + value;
- this.setAttributeNode(attr)
- },
- removeAttribute : function(name){
- var attr = this.getAttributeNode(name)
- attr && this.removeAttributeNode(attr);
- },
- appendChild:function(newChild){
- if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){
- return this.insertBefore(newChild,null);
- }else{
- return _appendSingleChild(this,newChild);
- }
- },
- setAttributeNode : function(newAttr){
- return this.attributes.setNamedItem(newAttr);
- },
- setAttributeNodeNS : function(newAttr){
- return this.attributes.setNamedItemNS(newAttr);
- },
- removeAttributeNode : function(oldAttr){
- return this.attributes.removeNamedItem(oldAttr.nodeName);
- },
- removeAttributeNS : function(namespaceURI, localName){
- var old = this.getAttributeNodeNS(namespaceURI, localName);
- old && this.removeAttributeNode(old);
- },
-
- hasAttributeNS : function(namespaceURI, localName){
- return this.getAttributeNodeNS(namespaceURI, localName)!=null;
- },
- getAttributeNS : function(namespaceURI, localName){
- var attr = this.getAttributeNodeNS(namespaceURI, localName);
- return attr && attr.value || '';
- },
- setAttributeNS : function(namespaceURI, qualifiedName, value){
- var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName);
- attr.value = attr.nodeValue = "" + value;
- this.setAttributeNode(attr)
- },
- getAttributeNodeNS : function(namespaceURI, localName){
- return this.attributes.getNamedItemNS(namespaceURI, localName);
- },
-
- getElementsByTagName : function(tagName){
- return new LiveNodeList(this,function(base){
- var ls = [];
- _visitNode(base,function(node){
- if(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){
- ls.push(node);
- }
- });
- return ls;
- });
- },
- getElementsByTagNameNS : function(namespaceURI, localName){
- return new LiveNodeList(this,function(base){
- var ls = [];
- _visitNode(base,function(node){
- if(node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === '*' || node.namespaceURI === namespaceURI) && (localName === '*' || node.localName == localName)){
- ls.push(node);
- }
- });
- return ls;
- });
- }
-};
-Document.prototype.getElementsByTagName = Element.prototype.getElementsByTagName;
-Document.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS;
-
-
-_extends(Element,Node);
-function Attr() {
-};
-Attr.prototype.nodeType = ATTRIBUTE_NODE;
-_extends(Attr,Node);
-
-
-function CharacterData() {
-};
-CharacterData.prototype = {
- data : '',
- substringData : function(offset, count) {
- return this.data.substring(offset, offset+count);
- },
- appendData: function(text) {
- text = this.data+text;
- this.nodeValue = this.data = text;
- this.length = text.length;
- },
- insertData: function(offset,text) {
- this.replaceData(offset,0,text);
-
- },
- appendChild:function(newChild){
- throw new Error(ExceptionMessage[3])
- return Node.prototype.appendChild.apply(this,arguments)
- },
- deleteData: function(offset, count) {
- this.replaceData(offset,count,"");
- },
- replaceData: function(offset, count, text) {
- var start = this.data.substring(0,offset);
- var end = this.data.substring(offset+count);
- text = start + text + end;
- this.nodeValue = this.data = text;
- this.length = text.length;
- }
-}
-_extends(CharacterData,Node);
-function Text() {
-};
-Text.prototype = {
- nodeName : "#text",
- nodeType : TEXT_NODE,
- splitText : function(offset) {
- var text = this.data;
- var newText = text.substring(offset);
- text = text.substring(0, offset);
- this.data = this.nodeValue = text;
- this.length = text.length;
- var newNode = this.ownerDocument.createTextNode(newText);
- if(this.parentNode){
- this.parentNode.insertBefore(newNode, this.nextSibling);
- }
- return newNode;
- }
-}
-_extends(Text,CharacterData);
-function Comment() {
-};
-Comment.prototype = {
- nodeName : "#comment",
- nodeType : COMMENT_NODE
-}
-_extends(Comment,CharacterData);
-
-function CDATASection() {
-};
-CDATASection.prototype = {
- nodeName : "#cdata-section",
- nodeType : CDATA_SECTION_NODE
-}
-_extends(CDATASection,CharacterData);
-
-
-function DocumentType() {
-};
-DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;
-_extends(DocumentType,Node);
-
-function Notation() {
-};
-Notation.prototype.nodeType = NOTATION_NODE;
-_extends(Notation,Node);
-
-function Entity() {
-};
-Entity.prototype.nodeType = ENTITY_NODE;
-_extends(Entity,Node);
-
-function EntityReference() {
-};
-EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE;
-_extends(EntityReference,Node);
-
-function DocumentFragment() {
-};
-DocumentFragment.prototype.nodeName = "#document-fragment";
-DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE;
-_extends(DocumentFragment,Node);
-
-
-function ProcessingInstruction() {
-}
-ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE;
-_extends(ProcessingInstruction,Node);
-function XMLSerializer(){}
-XMLSerializer.prototype.serializeToString = function(node){
- var buf = [];
- serializeToString(node,buf);
- return buf.join('');
-}
-Node.prototype.toString =function(){
- return XMLSerializer.prototype.serializeToString(this);
-}
-function serializeToString(node,buf){
- switch(node.nodeType){
- case ELEMENT_NODE:
- var attrs = node.attributes;
- var len = attrs.length;
- var child = node.firstChild;
- var nodeName = node.tagName;
- var isHTML = htmlns === node.namespaceURI
- buf.push('<',nodeName);
- for(var i=0;i<len;i++){
- serializeToString(attrs.item(i),buf,isHTML);
- }
- if(child || isHTML && !/^(?:meta|link|img|br|hr|input|button)$/i.test(nodeName)){
- buf.push('>');
- if(isHTML && /^script$/i.test(nodeName)){
- if(child){
- buf.push(child.data);
- }
- }else{
- while(child){
- serializeToString(child,buf);
- child = child.nextSibling;
- }
- }
- buf.push('</',nodeName,'>');
- }else{
- buf.push('/>');
- }
- return;
- case DOCUMENT_NODE:
- case DOCUMENT_FRAGMENT_NODE:
- var child = node.firstChild;
- while(child){
- serializeToString(child,buf);
- child = child.nextSibling;
- }
- return;
- case ATTRIBUTE_NODE:
- return buf.push(' ',node.name,'="',node.value.replace(/[<&"]/g,_xmlEncoder),'"');
- case TEXT_NODE:
- return buf.push(node.data.replace(/[<&]/g,_xmlEncoder));
- case CDATA_SECTION_NODE:
- return buf.push( '<![CDATA[',node.data,']]>');
- case COMMENT_NODE:
- return buf.push( "<!--",node.data,"-->");
- case DOCUMENT_TYPE_NODE:
- var pubid = node.publicId;
- var sysid = node.systemId;
- buf.push('<!DOCTYPE ',node.name);
- if(pubid){
- buf.push(' PUBLIC "',pubid);
- if (sysid && sysid!='.') {
- buf.push( '" "',sysid);
- }
- buf.push('">');
- }else if(sysid && sysid!='.'){
- buf.push(' SYSTEM "',sysid,'">');
- }else{
- var sub = node.internalSubset;
- if(sub){
- buf.push(" [",sub,"]");
- }
- buf.push(">");
- }
- return;
- case PROCESSING_INSTRUCTION_NODE:
- return buf.push( "<?",node.target," ",node.data,"?>");
- case ENTITY_REFERENCE_NODE:
- return buf.push( '&',node.nodeName,';');
- default:
- buf.push('??',node.nodeName);
- }
-}
-function importNode(doc,node,deep){
- var node2;
- switch (node.nodeType) {
- case ELEMENT_NODE:
- node2 = node.cloneNode(false);
- node2.ownerDocument = doc;
- case DOCUMENT_FRAGMENT_NODE:
- break;
- case ATTRIBUTE_NODE:
- deep = true;
- break;
- }
- if(!node2){
- node2 = node.cloneNode(false);//false
- }
- node2.ownerDocument = doc;
- node2.parentNode = null;
- if(deep){
- var child = node.firstChild;
- while(child){
- node2.appendChild(importNode(doc,child,deep));
- child = child.nextSibling;
- }
- }
- return node2;
-}
-function cloneNode(doc,node,deep){
- var node2 = new node.constructor();
- for(var n in node){
- var v = node[n];
- if(typeof v != 'object' ){
- if(v != node2[n]){
- node2[n] = v;
- }
- }
- }
- if(node.childNodes){
- node2.childNodes = new NodeList();
- }
- node2.ownerDocument = doc;
- switch (node2.nodeType) {
- case ELEMENT_NODE:
- var attrs = node.attributes;
- var attrs2 = node2.attributes = new NamedNodeMap();
- var len = attrs.length
- attrs2._ownerElement = node2;
- for(var i=0;i<len;i++){
- node2.setAttributeNode(cloneNode(doc,attrs.item(i),true));
- }
- break;;
- case ATTRIBUTE_NODE:
- deep = true;
- }
- if(deep){
- var child = node.firstChild;
- while(child){
- node2.appendChild(cloneNode(doc,child,deep));
- child = child.nextSibling;
- }
- }
- return node2;
-}
-
-function __set__(object,key,value){
- object[key] = value
-}
-try{
- if(Object.defineProperty){
- Object.defineProperty(LiveNodeList.prototype,'length',{
- get:function(){
- _updateLiveList(this);
- return this.$$length;
- }
- });
- Object.defineProperty(Node.prototype,'textContent',{
- get:function(){
- return getTextContent(this);
- },
- set:function(data){
- switch(this.nodeType){
- case 1:
- case 11:
- while(this.firstChild){
- this.removeChild(this.firstChild);
- }
- if(data || String(data)){
- this.appendChild(this.ownerDocument.createTextNode(data));
- }
- break;
- default:
- this.data = data;
- this.value = value;
- this.nodeValue = data;
- }
- }
- })
-
- function getTextContent(node){
- switch(node.nodeType){
- case 1:
- case 11:
- var buf = [];
- node = node.firstChild;
- while(node){
- if(node.nodeType!==7 && node.nodeType !==8){
- buf.push(getTextContent(node));
- }
- node = node.nextSibling;
- }
- return buf.join('');
- default:
- return node.nodeValue;
- }
- }
- __set__ = function(object,key,value){
- object['$$'+key] = value
- }
- }
-}catch(e){//ie8
-}
-
-return DOMImplementation;
-});
-
-ace.define("ace/mode/xml/dom-parser",["require","exports","module","ace/mode/xml/sax","ace/mode/xml/dom"], function(require, exports, module) {
- 'use strict';
-
- var XMLReader = require('./sax'),
- DOMImplementation = require('./dom');
-
-function DOMParser(options){
- this.options = options ||{locator:{}};
-
-}
-DOMParser.prototype.parseFromString = function(source,mimeType){
- var options = this.options;
- var sax = new XMLReader();
- var domBuilder = options.domBuilder || new DOMHandler();//contentHandler and LexicalHandler
- var errorHandler = options.errorHandler;
- var locator = options.locator;
- var defaultNSMap = options.xmlns||{};
- var entityMap = {'lt':'<','gt':'>','amp':'&','quot':'"','apos':"'"}
- if(locator){
- domBuilder.setDocumentLocator(locator)
- }
-
- sax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator);
- sax.domBuilder = options.domBuilder || domBuilder;
- if(/\/x?html?$/.test(mimeType)){
- entityMap.nbsp = '\xa0';
- entityMap.copy = '\xa9';
- defaultNSMap['']= 'http://www.w3.org/1999/xhtml';
- }
- if(source){
- sax.parse(source,defaultNSMap,entityMap);
- }else{
- sax.errorHandler.error("invalid document source");
- }
- return domBuilder.document;
-}
-function buildErrorHandler(errorImpl,domBuilder,locator){
- if(!errorImpl){
- if(domBuilder instanceof DOMHandler){
- return domBuilder;
- }
- errorImpl = domBuilder ;
- }
- var errorHandler = {}
- var isCallback = errorImpl instanceof Function;
- locator = locator||{}
- function build(key){
- var fn = errorImpl[key];
- if(!fn){
- if(isCallback){
- fn = errorImpl.length == 2?function(msg){errorImpl(key,msg)}:errorImpl;
- }else{
- var i=arguments.length;
- while(--i){
- if(fn = errorImpl[arguments[i]]){
- break;
- }
- }
- }
- }
- errorHandler[key] = fn && function(msg){
- fn(msg+_locator(locator), msg, locator);
- }||function(){};
- }
- build('warning','warn');
- build('error','warn','warning');
- build('fatalError','warn','warning','error');
- return errorHandler;
-}
-function DOMHandler() {
- this.cdata = false;
-}
-function position(locator,node){
- node.lineNumber = locator.lineNumber;
- node.columnNumber = locator.columnNumber;
-}
-DOMHandler.prototype = {
- startDocument : function() {
- this.document = new DOMImplementation().createDocument(null, null, null);
- if (this.locator) {
- this.document.documentURI = this.locator.systemId;
- }
- },
- startElement:function(namespaceURI, localName, qName, attrs) {
- var doc = this.document;
- var el = doc.createElementNS(namespaceURI, qName||localName);
- var len = attrs.length;
- appendElement(this, el);
- this.currentElement = el;
-
- this.locator && position(this.locator,el)
- for (var i = 0 ; i < len; i++) {
- var namespaceURI = attrs.getURI(i);
- var value = attrs.getValue(i);
- var qName = attrs.getQName(i);
- var attr = doc.createAttributeNS(namespaceURI, qName);
- if( attr.getOffset){
- position(attr.getOffset(1),attr)
- }
- attr.value = attr.nodeValue = value;
- el.setAttributeNode(attr)
- }
- },
- endElement:function(namespaceURI, localName, qName) {
- var current = this.currentElement
- var tagName =
<TRUNCATED>
[09/14] ignite git commit: Merge branch 'web-console-staging' of
https://github.com/gridgain/apache-ignite into ignite-2875
Posted by an...@apache.org.
Merge branch 'web-console-staging' of https://github.com/gridgain/apache-ignite into ignite-2875
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/eb4377c1
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/eb4377c1
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/eb4377c1
Branch: refs/heads/ignite-2875
Commit: eb4377c1923f185b8e04513a553e3d50ba482457
Parents: 7b162cd 8987065
Author: Andrey <an...@gridgain.com>
Authored: Wed Mar 30 11:42:27 2016 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Wed Mar 30 11:42:27 2016 +0700
----------------------------------------------------------------------
modules/control-center-web/src/main/js/.babelrc | 3 +
.../control-center-web/src/main/js/.gitignore | 8 +-
.../src/main/js/app/decorator/select.js | 4 +-
.../control-center-web/src/main/js/app/index.js | 51 +-
.../getting-started/GettingStarted.provider.js | 2 +-
.../main/js/app/modules/user/Auth.service.js | 2 +-
.../src/main/js/build/system.config.js | 418 ++
.../control-center-web/src/main/js/config.js | 438 --
.../src/main/js/controllers/admin-controller.js | 2 +
.../main/js/controllers/caches-controller.js | 2 +
.../main/js/controllers/clusters-controller.js | 2 +
.../src/main/js/controllers/common-module.js | 134 +-
.../main/js/controllers/domains-controller.js | 2 +
.../src/main/js/controllers/ext-searchbox.js | 420 --
.../src/main/js/controllers/igfs-controller.js | 2 +
.../main/js/controllers/profile-controller.js | 2 +
.../src/main/js/controllers/sql-controller.js | 2 +
.../src/main/js/controllers/worker-xml.js | 3892 ------------------
.../src/main/js/gulpfile.babel.js/index.js | 29 +
.../src/main/js/gulpfile.babel.js/paths.js | 34 +
.../main/js/gulpfile.babel.js/tasks/build.js | 21 +
.../main/js/gulpfile.babel.js/tasks/bundle.js | 75 +
.../main/js/gulpfile.babel.js/tasks/clean.js | 35 +
.../main/js/gulpfile.babel.js/tasks/connect.js | 36 +
.../src/main/js/gulpfile.babel.js/tasks/copy.js | 90 +
.../main/js/gulpfile.babel.js/tasks/eslint.js | 43 +
.../gulpfile.babel.js/tasks/ignite-modules.js | 61 +
.../src/main/js/gulpfile.babel.js/tasks/jade.js | 54 +
.../src/main/js/gulpfile.babel.js/tasks/sass.js | 34 +
.../src/main/js/gulpfile.js/index.js | 31 -
.../src/main/js/gulpfile.js/tasks/build.js | 23 -
.../src/main/js/gulpfile.js/tasks/bundle.js | 68 -
.../src/main/js/gulpfile.js/tasks/clean.js | 24 -
.../src/main/js/gulpfile.js/tasks/connect.js | 39 -
.../src/main/js/gulpfile.js/tasks/copy.js | 100 -
.../src/main/js/gulpfile.js/tasks/eslint.js | 44 -
.../main/js/gulpfile.js/tasks/inject-plugins.js | 70 -
.../src/main/js/gulpfile.js/tasks/jade.js | 56 -
.../src/main/js/gulpfile.js/tasks/production.js | 28 -
.../src/main/js/gulpfile.js/tasks/sass.js | 36 -
.../src/main/js/helpers/common-utils.js | 7 +-
.../src/main/js/helpers/data-structures.js | 4 +-
.../js/helpers/generator/generator-common.js | 4 +-
.../js/helpers/generator/generator-docker.js | 4 +-
.../main/js/helpers/generator/generator-java.js | 4 +-
.../js/helpers/generator/generator-optional.js | 4 +-
.../main/js/helpers/generator/generator-pom.js | 4 +-
.../helpers/generator/generator-properties.js | 4 +-
.../js/helpers/generator/generator-readme.js | 4 +-
.../main/js/helpers/generator/generator-xml.js | 4 +-
.../src/main/js/ignite_modules/index.js | 10 +
.../control-center-web/src/main/js/package.json | 52 +-
.../stylesheets/_font-awesome-custom.scss | 26 +-
.../src/main/js/views/index.jade | 22 +-
54 files changed, 1163 insertions(+), 5407 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/eb4377c1/modules/control-center-web/src/main/js/controllers/sql-controller.js
----------------------------------------------------------------------
[08/14] ignite git commit: IGNITE-2755 Minor fix.
Posted by an...@apache.org.
IGNITE-2755 Minor fix.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/89870653
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/89870653
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/89870653
Branch: refs/heads/ignite-2875
Commit: 898706531fe3284935a28503d7f1cb4212d2f9b5
Parents: 2b0ddb5
Author: Andrey <an...@gridgain.com>
Authored: Wed Mar 30 11:35:28 2016 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Wed Mar 30 11:35:28 2016 +0700
----------------------------------------------------------------------
modules/control-center-web/src/main/js/app/index.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/89870653/modules/control-center-web/src/main/js/app/index.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/index.js b/modules/control-center-web/src/main/js/app/index.js
index 878cd67..9a6a45c 100644
--- a/modules/control-center-web/src/main/js/app/index.js
+++ b/modules/control-center-web/src/main/js/app/index.js
@@ -20,7 +20,7 @@ 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");
+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.
[07/14] ignite git commit: IGNITE-2755 Optimize gulp build tasks.
Posted by an...@apache.org.
IGNITE-2755 Optimize gulp build tasks.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/2b0ddb51
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/2b0ddb51
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/2b0ddb51
Branch: refs/heads/ignite-2875
Commit: 2b0ddb5128d2fbdc2dc06ef87568edac75da4df7
Parents: 3b40bd7
Author: Andrey <an...@gridgain.com>
Authored: Wed Mar 30 11:15:54 2016 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Wed Mar 30 11:15:54 2016 +0700
----------------------------------------------------------------------
modules/control-center-web/src/main/js/.babelrc | 3 +
.../control-center-web/src/main/js/.gitignore | 8 +-
.../src/main/js/app/decorator/select.js | 4 +-
.../control-center-web/src/main/js/app/index.js | 51 +-
.../getting-started/GettingStarted.provider.js | 2 +-
.../main/js/app/modules/user/Auth.service.js | 2 +-
.../src/main/js/build/system.config.js | 418 ++
.../control-center-web/src/main/js/config.js | 438 --
.../src/main/js/controllers/admin-controller.js | 2 +
.../main/js/controllers/caches-controller.js | 2 +
.../main/js/controllers/clusters-controller.js | 2 +
.../src/main/js/controllers/common-module.js | 134 +-
.../main/js/controllers/domains-controller.js | 2 +
.../src/main/js/controllers/ext-searchbox.js | 420 --
.../src/main/js/controllers/igfs-controller.js | 2 +
.../main/js/controllers/profile-controller.js | 2 +
.../src/main/js/controllers/sql-controller.js | 2 +
.../src/main/js/controllers/worker-xml.js | 3892 ------------------
.../src/main/js/gulpfile.babel.js/index.js | 29 +
.../src/main/js/gulpfile.babel.js/paths.js | 34 +
.../main/js/gulpfile.babel.js/tasks/build.js | 21 +
.../main/js/gulpfile.babel.js/tasks/bundle.js | 75 +
.../main/js/gulpfile.babel.js/tasks/clean.js | 35 +
.../main/js/gulpfile.babel.js/tasks/connect.js | 36 +
.../src/main/js/gulpfile.babel.js/tasks/copy.js | 90 +
.../main/js/gulpfile.babel.js/tasks/eslint.js | 43 +
.../gulpfile.babel.js/tasks/ignite-modules.js | 61 +
.../src/main/js/gulpfile.babel.js/tasks/jade.js | 54 +
.../src/main/js/gulpfile.babel.js/tasks/sass.js | 34 +
.../src/main/js/gulpfile.js/index.js | 31 -
.../src/main/js/gulpfile.js/tasks/build.js | 23 -
.../src/main/js/gulpfile.js/tasks/bundle.js | 68 -
.../src/main/js/gulpfile.js/tasks/clean.js | 24 -
.../src/main/js/gulpfile.js/tasks/connect.js | 39 -
.../src/main/js/gulpfile.js/tasks/copy.js | 100 -
.../src/main/js/gulpfile.js/tasks/eslint.js | 44 -
.../main/js/gulpfile.js/tasks/inject-plugins.js | 70 -
.../src/main/js/gulpfile.js/tasks/jade.js | 56 -
.../src/main/js/gulpfile.js/tasks/production.js | 28 -
.../src/main/js/gulpfile.js/tasks/sass.js | 36 -
.../src/main/js/helpers/common-utils.js | 7 +-
.../src/main/js/helpers/data-structures.js | 4 +-
.../js/helpers/generator/generator-common.js | 4 +-
.../js/helpers/generator/generator-docker.js | 4 +-
.../main/js/helpers/generator/generator-java.js | 4 +-
.../js/helpers/generator/generator-optional.js | 4 +-
.../main/js/helpers/generator/generator-pom.js | 4 +-
.../helpers/generator/generator-properties.js | 4 +-
.../js/helpers/generator/generator-readme.js | 4 +-
.../main/js/helpers/generator/generator-xml.js | 4 +-
.../src/main/js/ignite_modules/index.js | 10 +
.../control-center-web/src/main/js/package.json | 52 +-
.../stylesheets/_font-awesome-custom.scss | 26 +-
.../src/main/js/views/index.jade | 22 +-
54 files changed, 1163 insertions(+), 5407 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/.babelrc
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/.babelrc b/modules/control-center-web/src/main/js/.babelrc
new file mode 100644
index 0000000..af0f0c3
--- /dev/null
+++ b/modules/control-center-web/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/2b0ddb51/modules/control-center-web/src/main/js/.gitignore
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/.gitignore b/modules/control-center-web/src/main/js/.gitignore
index bb977f8..c966a99 100644
--- a/modules/control-center-web/src/main/js/.gitignore
+++ b/modules/control-center-web/src/main/js/.gitignore
@@ -1,10 +1,10 @@
-node_modules
-jspm_packages
*.idea
*.log
.npmrc
-build
-app/plugins
+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/2b0ddb51/modules/control-center-web/src/main/js/app/decorator/select.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/decorator/select.js b/modules/control-center-web/src/main/js/app/decorator/select.js
index 9a6d07b..2d22707 100644
--- a/modules/control-center-web/src/main/js/app/decorator/select.js
+++ b/modules/control-center-web/src/main/js/app/decorator/select.js
@@ -22,7 +22,7 @@ import angular from 'angular';
* If this problem will be fixed in AngularStrap we can remove this delegate.
*/
angular.module('mgcrea.ngStrap.select')
- .decorator('$select', ($delegate) => {
+ .decorator('$select', ['$delegate', ($delegate) => {
function SelectFactoryDecorated(element, controller, config) {
const delegate = $delegate(element, controller, config);
@@ -74,4 +74,4 @@ angular.module('mgcrea.ngStrap.select')
SelectFactoryDecorated.defaults = $delegate.defaults;
return SelectFactoryDecorated;
- });
+ }]);
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/app/index.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/index.js b/modules/control-center-web/src/main/js/app/index.js
index d5d480e..878cd67 100644
--- a/modules/control-center-web/src/main/js/app/index.js
+++ b/modules/control-center-web/src/main/js/app/index.js
@@ -20,8 +20,9 @@ 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.ace = ace;
window.require = ace.require; // TODO Should be removed after full refactoring to directives.
window.pdfMake = pdfMake;
@@ -46,7 +47,6 @@ import 'query-command-supported';
import 'public/stylesheets/style.css!';
-import 'nvd3/build/nv.d3.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!';
@@ -99,12 +99,51 @@ import IgniteCountries from './services/Countries.service';
import IgniteChartColors from './services/ChartColors.service';
import IgniteAgentMonitor from './services/AgentMonitor.service';
-// Providers
+// Providers.
// Filters.
import hasPojo from './filters/hasPojo.filter';
import byName from './filters/byName.filter';
+// Helpers
+import $generatorCommon from 'helpers/generator/generator-common';
+import $generatorDocker from 'helpers/generator/generator-docker';
+import $generatorJava from 'helpers/generator/generator-java';
+import $generatorOptional from 'helpers/generator/generator-optional';
+import $generatorPom from 'helpers/generator/generator-pom';
+import $generatorProperties from 'helpers/generator/generator-properties';
+import $generatorReadme from 'helpers/generator/generator-readme';
+import $generatorXml from 'helpers/generator/generator-xml';
+
+import $commonUtils from 'helpers/common-utils';
+import $dataStructures from 'helpers/data-structures';
+
+window.$generatorCommon = $generatorCommon;
+window.$generatorDocker = $generatorDocker;
+window.$generatorJava = $generatorJava;
+window.$generatorOptional = $generatorOptional;
+window.$generatorPom = $generatorPom;
+window.$generatorProperties = $generatorProperties;
+window.$generatorReadme = $generatorReadme;
+window.$generatorXml = $generatorXml;
+window.$commonUtils = $commonUtils;
+window.$dataStructures = $dataStructures;
+
+// 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',
@@ -134,7 +173,11 @@ angular
'ignite-console.navbar',
'ignite-console.configuration',
'ignite-console.getting-started',
- 'ignite-console.version'
+ 'ignite-console.version',
+ // Ignite legacy module.
+ 'ignite-console.legacy',
+ // Ignite modules.
+ 'ignite-console.modules'
])
// Directives.
.directive(...igniteAdvancedOptionsToggle)
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/app/modules/getting-started/GettingStarted.provider.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/getting-started/GettingStarted.provider.js b/modules/control-center-web/src/main/js/app/modules/getting-started/GettingStarted.provider.js
index d3379a0..b3b4cba 100644
--- a/modules/control-center-web/src/main/js/app/modules/getting-started/GettingStarted.provider.js
+++ b/modules/control-center-web/src/main/js/app/modules/getting-started/GettingStarted.provider.js
@@ -45,7 +45,7 @@ angular
return items;
}];
})
- .service('IgniteGettingStarted', ['$rootScope', '$modal', 'igniteGettingStarted', function($root, $modal, igniteGettingStarted) {
+ .service('gettingStarted', ['$rootScope', '$modal', 'igniteGettingStarted', function($root, $modal, igniteGettingStarted) {
const _model = igniteGettingStarted;
let _page = 0;
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/app/modules/user/Auth.service.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/user/Auth.service.js b/modules/control-center-web/src/main/js/app/modules/user/Auth.service.js
index 8894148..df4e68a 100644
--- a/modules/control-center-web/src/main/js/app/modules/user/Auth.service.js
+++ b/modules/control-center-web/src/main/js/app/modules/user/Auth.service.js
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-export default ['Auth', ['$http', '$rootScope', '$state', '$common', 'IgniteGettingStarted', 'User',
+export default ['Auth', ['$http', '$rootScope', '$state', '$common', 'gettingStarted', 'User',
($http, $root, $state, $common, gettingStarted, User) => {
let _auth = false;
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/build/system.config.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/build/system.config.js b/modules/control-center-web/src/main/js/build/system.config.js
new file mode 100644
index 0000000..c60d1e7
--- /dev/null
+++ b/modules/control-center-web/src/main/js/build/system.config.js
@@ -0,0 +1,418 @@
+System.config({
+ defaultJSExtensions: true,
+ transpiler: "babel",
+ babelOptions: {
+ "optional": [
+ "runtime",
+ "optimisation.modules.system"
+ ]
+ },
+ paths: {
+ "github:*": "build/jspm_packages/github/*",
+ "npm:*": "build/jspm_packages/npm/*"
+ },
+ separateCSS: true,
+
+ map: {
+ "ace": "github:ajaxorg/ace-builds@1.2.3",
+ "angular": "github:angular/bower-angular@1.5.3",
+ "angular-animate": "github:angular/bower-angular-animate@1.5.3",
+ "angular-drag-and-drop-lists": "github:marceljuenemann/angular-drag-and-drop-lists@1.4.0",
+ "angular-loading": "github:darthwade/angular-loading@0.1.4",
+ "angular-motion": "github:mgcrea/angular-motion@0.4.3",
+ "angular-nvd3": "github:krispo/angular-nvd3@1.0.5",
+ "angular-retina": "github:jrief/angular-retina@0.3.8",
+ "angular-sanitize": "github:angular/bower-angular-sanitize@1.5.3",
+ "angular-smart-table": "github:lorenzofox3/Smart-Table@2.1.8",
+ "angular-socket-io": "github:btford/angular-socket-io@0.7.0",
+ "angular-strap": "github:mgcrea/angular-strap@2.3.7",
+ "angular-tree-control": "github:wix/angular-tree-control@0.2.23",
+ "angular-ui-grid": "github:angular-ui/bower-ui-grid@3.1.1",
+ "angular-ui-router": "github:angular-ui/ui-router@0.2.18",
+ "angular-ui-router-metatags": "github:tinusn/ui-router-metatags@1.0.3",
+ "babel": "npm:babel-core@5.8.38",
+ "babel-runtime": "npm:babel-runtime@5.8.38",
+ "blob": "github:eligrey/Blob.js@master",
+ "bootstrap-carousel": "github:twbs/bootstrap@3.3.6",
+ "clean-css": "npm:clean-css@3.4.10",
+ "core-js": "npm:core-js@1.2.6",
+ "css": "github:systemjs/plugin-css@0.1.20",
+ "file-saver": "github:eligrey/FileSaver.js@master",
+ "font-awesome": "npm:font-awesome@4.5.0",
+ "jade": "github:johnsoftek/plugin-jade@0.6.0",
+ "jquery": "github:components/jquery@2.2.1",
+ "json": "github:systemjs/plugin-json@0.1.0",
+ "jszip": "github:Stuk/jszip@2.6.0",
+ "lodash": "github:lodash/lodash@4.6.1",
+ "pdfmake": "github:bpampuch/pdfmake@0.1.20",
+ "query-command-supported": "github:zenorocha/document.queryCommandSupported@1.0.0",
+ "socket.io-client": "github:socketio/socket.io-client@1.4.5",
+ "text": "github:systemjs/plugin-text@0.0.7",
+ "github:angular-ui/bower-ui-grid@3.1.1": {
+ "pdfmake": "github:bpampuch/pdfmake@0.1.20"
+ },
+ "github:angular-ui/ui-router@0.2.18": {
+ "angular": "github:angular/bower-angular@1.5.3"
+ },
+ "github:angular/bower-angular-animate@1.5.3": {
+ "angular": "github:angular/bower-angular@1.5.3"
+ },
+ "github:angular/bower-angular-sanitize@1.5.3": {
+ "angular": "github:angular/bower-angular@1.5.3"
+ },
+ "github:angular/bower-angular@1.5.3": {
+ "jquery": "github:components/jquery@2.2.1"
+ },
+ "github:btford/angular-socket-io@0.7.0": {
+ "socket.io-client": "github:socketio/socket.io-client@1.4.5"
+ },
+ "github:darthwade/angular-loading@0.1.4": {
+ "spinjs": "github:fgnass/spin.js@2.3.2"
+ },
+ "github:eligrey/FileSaver.js@master": {
+ "blob": "github:eligrey/Blob.js@master"
+ },
+ "github:johnsoftek/plugin-jade@0.6.0": {
+ "jade-compiler": "npm:jade@1.11.0",
+ "text": "github:systemjs/plugin-text@0.0.4"
+ },
+ "github:jspm/nodelibs-assert@0.1.0": {
+ "assert": "npm:assert@1.3.0"
+ },
+ "github:jspm/nodelibs-buffer@0.1.0": {
+ "buffer": "npm:buffer@3.6.0"
+ },
+ "github:jspm/nodelibs-events@0.1.1": {
+ "events": "npm:events@1.0.2"
+ },
+ "github:jspm/nodelibs-http@1.7.1": {
+ "Base64": "npm:Base64@0.2.1",
+ "events": "github:jspm/nodelibs-events@0.1.1",
+ "inherits": "npm:inherits@2.0.1",
+ "stream": "github:jspm/nodelibs-stream@0.1.0",
+ "url": "github:jspm/nodelibs-url@0.1.0",
+ "util": "github:jspm/nodelibs-util@0.1.0"
+ },
+ "github:jspm/nodelibs-https@0.1.0": {
+ "https-browserify": "npm:https-browserify@0.0.0"
+ },
+ "github:jspm/nodelibs-os@0.1.0": {
+ "os-browserify": "npm:os-browserify@0.1.2"
+ },
+ "github:jspm/nodelibs-path@0.1.0": {
+ "path-browserify": "npm:path-browserify@0.0.0"
+ },
+ "github:jspm/nodelibs-process@0.1.2": {
+ "process": "npm:process@0.11.2"
+ },
+ "github:jspm/nodelibs-stream@0.1.0": {
+ "stream-browserify": "npm:stream-browserify@1.0.0"
+ },
+ "github:jspm/nodelibs-tty@0.1.0": {
+ "tty-browserify": "npm:tty-browserify@0.0.0"
+ },
+ "github:jspm/nodelibs-url@0.1.0": {
+ "url": "npm:url@0.10.3"
+ },
+ "github:jspm/nodelibs-util@0.1.0": {
+ "util": "npm:util@0.10.3"
+ },
+ "github:jspm/nodelibs-vm@0.1.0": {
+ "vm-browserify": "npm:vm-browserify@0.0.4"
+ },
+ "github:krispo/angular-nvd3@1.0.5": {
+ "d3": "npm:d3@3.5.14",
+ "nvd3": "npm:nvd3@1.8.1"
+ },
+ "github:mgcrea/angular-motion@0.4.3": {
+ "angular": "github:angular/bower-angular@1.5.3",
+ "css": "github:systemjs/plugin-css@0.1.20"
+ },
+ "github:mgcrea/angular-strap@2.3.7": {
+ "angular": "github:angular/bower-angular@1.5.3",
+ "angular-animate": "github:angular/bower-angular-animate@1.5.3",
+ "angular-motion": "github:mgcrea/angular-motion@0.4.3",
+ "angular-sanitize": "github:angular/bower-angular-sanitize@1.5.3"
+ },
+ "github:twbs/bootstrap@3.3.6": {
+ "jquery": "github:components/jquery@2.2.1"
+ },
+ "npm:acorn-globals@1.0.9": {
+ "acorn": "npm:acorn@2.7.0"
+ },
+ "npm:acorn@1.2.2": {
+ "fs": "github:jspm/nodelibs-fs@0.1.2",
+ "path": "github:jspm/nodelibs-path@0.1.0",
+ "process": "github:jspm/nodelibs-process@0.1.2",
+ "stream": "github:jspm/nodelibs-stream@0.1.0"
+ },
+ "npm:acorn@2.7.0": {
+ "fs": "github:jspm/nodelibs-fs@0.1.2",
+ "path": "github:jspm/nodelibs-path@0.1.0",
+ "process": "github:jspm/nodelibs-process@0.1.2",
+ "stream": "github:jspm/nodelibs-stream@0.1.0"
+ },
+ "npm:align-text@0.1.4": {
+ "kind-of": "npm:kind-of@3.0.2",
+ "longest": "npm:longest@1.0.1",
+ "repeat-string": "npm:repeat-string@1.5.4"
+ },
+ "npm:amdefine@1.0.0": {
+ "fs": "github:jspm/nodelibs-fs@0.1.2",
+ "module": "github:jspm/nodelibs-module@0.1.0",
+ "path": "github:jspm/nodelibs-path@0.1.0",
+ "process": "github:jspm/nodelibs-process@0.1.2"
+ },
+ "npm:asap@1.0.0": {
+ "process": "github:jspm/nodelibs-process@0.1.2"
+ },
+ "npm:assert@1.3.0": {
+ "util": "npm:util@0.10.3"
+ },
+ "npm:async@0.2.10": {
+ "process": "github:jspm/nodelibs-process@0.1.2"
+ },
+ "npm:babel-runtime@5.8.38": {
+ "process": "github:jspm/nodelibs-process@0.1.2"
+ },
+ "npm:buffer@3.6.0": {
+ "base64-js": "npm:base64-js@0.0.8",
+ "child_process": "github:jspm/nodelibs-child_process@0.1.0",
+ "fs": "github:jspm/nodelibs-fs@0.1.2",
+ "ieee754": "npm:ieee754@1.1.6",
+ "isarray": "npm:isarray@1.0.0",
+ "process": "github:jspm/nodelibs-process@0.1.2"
+ },
+ "npm:center-align@0.1.3": {
+ "align-text": "npm:align-text@0.1.4",
+ "lazy-cache": "npm:lazy-cache@1.0.3"
+ },
+ "npm:clean-css@3.4.10": {
+ "buffer": "github:jspm/nodelibs-buffer@0.1.0",
+ "commander": "npm:commander@2.8.1",
+ "fs": "github:jspm/nodelibs-fs@0.1.2",
+ "http": "github:jspm/nodelibs-http@1.7.1",
+ "https": "github:jspm/nodelibs-https@0.1.0",
+ "os": "github:jspm/nodelibs-os@0.1.0",
+ "path": "github:jspm/nodelibs-path@0.1.0",
+ "process": "github:jspm/nodelibs-process@0.1.2",
+ "source-map": "npm:source-map@0.4.4",
+ "url": "github:jspm/nodelibs-url@0.1.0",
+ "util": "github:jspm/nodelibs-util@0.1.0"
+ },
+ "npm:cliui@2.1.0": {
+ "center-align": "npm:center-align@0.1.3",
+ "right-align": "npm:right-align@0.1.3",
+ "wordwrap": "npm:wordwrap@0.0.2"
+ },
+ "npm:commander@2.6.0": {
+ "child_process": "github:jspm/nodelibs-child_process@0.1.0",
+ "events": "github:jspm/nodelibs-events@0.1.1",
+ "path": "github:jspm/nodelibs-path@0.1.0",
+ "process": "github:jspm/nodelibs-process@0.1.2"
+ },
+ "npm:commander@2.8.1": {
+ "child_process": "github:jspm/nodelibs-child_process@0.1.0",
+ "events": "github:jspm/nodelibs-events@0.1.1",
+ "fs": "github:jspm/nodelibs-fs@0.1.2",
+ "graceful-readlink": "npm:graceful-readlink@1.0.1",
+ "path": "github:jspm/nodelibs-path@0.1.0",
+ "process": "github:jspm/nodelibs-process@0.1.2"
+ },
+ "npm:constantinople@3.0.2": {
+ "acorn": "npm:acorn@2.7.0"
+ },
+ "npm:core-js@1.2.6": {
+ "fs": "github:jspm/nodelibs-fs@0.1.2",
+ "path": "github:jspm/nodelibs-path@0.1.0",
+ "process": "github:jspm/nodelibs-process@0.1.2",
+ "systemjs-json": "github:systemjs/plugin-json@0.1.0"
+ },
+ "npm:core-util-is@1.0.2": {
+ "buffer": "github:jspm/nodelibs-buffer@0.1.0"
+ },
+ "npm:css@1.0.8": {
+ "assert": "github:jspm/nodelibs-assert@0.1.0",
+ "css-parse": "npm:css-parse@1.0.4",
+ "css-stringify": "npm:css-stringify@1.0.5",
+ "fs": "github:jspm/nodelibs-fs@0.1.2",
+ "process": "github:jspm/nodelibs-process@0.1.2"
+ },
+ "npm:font-awesome@4.5.0": {
+ "css": "github:systemjs/plugin-css@0.1.20"
+ },
+ "npm:graceful-readlink@1.0.1": {
+ "fs": "github:jspm/nodelibs-fs@0.1.2"
+ },
+ "npm:https-browserify@0.0.0": {
+ "http": "github:jspm/nodelibs-http@1.7.1"
+ },
+ "npm:inherits@2.0.1": {
+ "util": "github:jspm/nodelibs-util@0.1.0"
+ },
+ "npm:is-buffer@1.1.3": {
+ "buffer": "github:jspm/nodelibs-buffer@0.1.0"
+ },
+ "npm:jade@1.11.0": {
+ "buffer": "github:jspm/nodelibs-buffer@0.1.0",
+ "character-parser": "npm:character-parser@1.2.1",
+ "clean-css": "npm:clean-css@3.4.10",
+ "commander": "npm:commander@2.6.0",
+ "constantinople": "npm:constantinople@3.0.2",
+ "jstransformer": "npm:jstransformer@0.0.2",
+ "mkdirp": "npm:mkdirp@0.5.1",
+ "path": "github:jspm/nodelibs-path@0.1.0",
+ "process": "github:jspm/nodelibs-process@0.1.2",
+ "systemjs-json": "github:systemjs/plugin-json@0.1.0",
+ "transformers": "npm:transformers@2.1.0",
+ "uglify-js": "npm:uglify-js@2.6.2",
+ "void-elements": "npm:void-elements@2.0.1",
+ "with": "npm:with@4.0.3"
+ },
+ "npm:jstransformer@0.0.2": {
+ "assert": "github:jspm/nodelibs-assert@0.1.0",
+ "fs": "github:jspm/nodelibs-fs@0.1.2",
+ "is-promise": "npm:is-promise@2.1.0",
+ "promise": "npm:promise@6.1.0"
+ },
+ "npm:kind-of@3.0.2": {
+ "buffer": "github:jspm/nodelibs-buffer@0.1.0",
+ "is-buffer": "npm:is-buffer@1.1.3"
+ },
+ "npm:lazy-cache@1.0.3": {
+ "process": "github:jspm/nodelibs-process@0.1.2"
+ },
+ "npm:mkdirp@0.5.1": {
+ "fs": "github:jspm/nodelibs-fs@0.1.2",
+ "minimist": "npm:minimist@0.0.8",
+ "path": "github:jspm/nodelibs-path@0.1.0",
+ "process": "github:jspm/nodelibs-process@0.1.2"
+ },
+ "npm:nvd3@1.8.1": {
+ "d3": "npm:d3@3.5.14"
+ },
+ "npm:optimist@0.3.7": {
+ "path": "github:jspm/nodelibs-path@0.1.0",
+ "process": "github:jspm/nodelibs-process@0.1.2",
+ "wordwrap": "npm:wordwrap@0.0.2"
+ },
+ "npm:os-browserify@0.1.2": {
+ "os": "github:jspm/nodelibs-os@0.1.0"
+ },
+ "npm:path-browserify@0.0.0": {
+ "process": "github:jspm/nodelibs-process@0.1.2"
+ },
+ "npm:process@0.11.2": {
+ "assert": "github:jspm/nodelibs-assert@0.1.0"
+ },
+ "npm:promise@2.0.0": {
+ "is-promise": "npm:is-promise@1.0.1",
+ "process": "github:jspm/nodelibs-process@0.1.2"
+ },
+ "npm:promise@6.1.0": {
+ "asap": "npm:asap@1.0.0"
+ },
+ "npm:punycode@1.3.2": {
+ "process": "github:jspm/nodelibs-process@0.1.2"
+ },
+ "npm:readable-stream@1.1.13": {
+ "buffer": "github:jspm/nodelibs-buffer@0.1.0",
+ "core-util-is": "npm:core-util-is@1.0.2",
+ "events": "github:jspm/nodelibs-events@0.1.1",
+ "inherits": "npm:inherits@2.0.1",
+ "isarray": "npm:isarray@0.0.1",
+ "process": "github:jspm/nodelibs-process@0.1.2",
+ "stream-browserify": "npm:stream-browserify@1.0.0",
+ "string_decoder": "npm:string_decoder@0.10.31"
+ },
+ "npm:right-align@0.1.3": {
+ "align-text": "npm:align-text@0.1.4"
+ },
+ "npm:source-map@0.1.43": {
+ "amdefine": "npm:amdefine@1.0.0",
+ "fs": "github:jspm/nodelibs-fs@0.1.2",
+ "path": "github:jspm/nodelibs-path@0.1.0",
+ "process": "github:jspm/nodelibs-process@0.1.2"
+ },
+ "npm:source-map@0.4.4": {
+ "amdefine": "npm:amdefine@1.0.0",
+ "process": "github:jspm/nodelibs-process@0.1.2"
+ },
+ "npm:source-map@0.5.3": {
+ "process": "github:jspm/nodelibs-process@0.1.2"
+ },
+ "npm:stream-browserify@1.0.0": {
+ "events": "github:jspm/nodelibs-events@0.1.1",
+ "inherits": "npm:inherits@2.0.1",
+ "readable-stream": "npm:readable-stream@1.1.13"
+ },
+ "npm:string_decoder@0.10.31": {
+ "buffer": "github:jspm/nodelibs-buffer@0.1.0"
+ },
+ "npm:transformers@2.1.0": {
+ "css": "npm:css@1.0.8",
+ "fs": "github:jspm/nodelibs-fs@0.1.2",
+ "path": "github:jspm/nodelibs-path@0.1.0",
+ "process": "github:jspm/nodelibs-process@0.1.2",
+ "promise": "npm:promise@2.0.0",
+ "uglify-js": "npm:uglify-js@2.2.5",
+ "vm": "github:jspm/nodelibs-vm@0.1.0"
+ },
+ "npm:uglify-js@2.2.5": {
+ "fs": "github:jspm/nodelibs-fs@0.1.2",
+ "optimist": "npm:optimist@0.3.7",
+ "path": "github:jspm/nodelibs-path@0.1.0",
+ "process": "github:jspm/nodelibs-process@0.1.2",
+ "source-map": "npm:source-map@0.1.43",
+ "util": "github:jspm/nodelibs-util@0.1.0",
+ "vm": "github:jspm/nodelibs-vm@0.1.0"
+ },
+ "npm:uglify-js@2.6.2": {
+ "async": "npm:async@0.2.10",
+ "fs": "github:jspm/nodelibs-fs@0.1.2",
+ "path": "github:jspm/nodelibs-path@0.1.0",
+ "process": "github:jspm/nodelibs-process@0.1.2",
+ "source-map": "npm:source-map@0.5.3",
+ "uglify-to-browserify": "npm:uglify-to-browserify@1.0.2",
+ "yargs": "npm:yargs@3.10.0"
+ },
+ "npm:uglify-to-browserify@1.0.2": {
+ "fs": "github:jspm/nodelibs-fs@0.1.2",
+ "stream": "github:jspm/nodelibs-stream@0.1.0"
+ },
+ "npm:url@0.10.3": {
+ "assert": "github:jspm/nodelibs-assert@0.1.0",
+ "punycode": "npm:punycode@1.3.2",
+ "querystring": "npm:querystring@0.2.0",
+ "util": "github:jspm/nodelibs-util@0.1.0"
+ },
+ "npm:util@0.10.3": {
+ "inherits": "npm:inherits@2.0.1",
+ "process": "github:jspm/nodelibs-process@0.1.2"
+ },
+ "npm:vm-browserify@0.0.4": {
+ "indexof": "npm:indexof@0.0.1"
+ },
+ "npm:void-elements@2.0.1": {
+ "http": "github:jspm/nodelibs-http@1.7.1"
+ },
+ "npm:window-size@0.1.0": {
+ "process": "github:jspm/nodelibs-process@0.1.2",
+ "tty": "github:jspm/nodelibs-tty@0.1.0"
+ },
+ "npm:with@4.0.3": {
+ "acorn": "npm:acorn@1.2.2",
+ "acorn-globals": "npm:acorn-globals@1.0.9"
+ },
+ "npm:yargs@3.10.0": {
+ "assert": "github:jspm/nodelibs-assert@0.1.0",
+ "camelcase": "npm:camelcase@1.2.1",
+ "cliui": "npm:cliui@2.1.0",
+ "decamelize": "npm:decamelize@1.2.0",
+ "fs": "github:jspm/nodelibs-fs@0.1.2",
+ "path": "github:jspm/nodelibs-path@0.1.0",
+ "process": "github:jspm/nodelibs-process@0.1.2",
+ "window-size": "npm:window-size@0.1.0"
+ }
+ }
+});
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/config.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/config.js b/modules/control-center-web/src/main/js/config.js
deleted file mode 100644
index 5837fa9..0000000
--- a/modules/control-center-web/src/main/js/config.js
+++ /dev/null
@@ -1,438 +0,0 @@
-System.config({
- defaultJSExtensions: true,
- transpiler: "babel",
- babelOptions: {
- "optional": [
- "runtime",
- "optimisation.modules.system"
- ]
- },
- paths: {
- "github:*": "jspm_packages/github/*",
- "npm:*": "jspm_packages/npm/*"
- },
- separateCSS: true,
-
- map: {
- "Blob": "github:eligrey/Blob.js@master",
- "FileSaver": "github:eligrey/FileSaver.js@master",
- "ace": "github:ajaxorg/ace-builds@1.2.3",
- "angular": "github:angular/bower-angular@1.5.2",
- "angular-ag-grid": "github:ceolter/ag-grid@2.3.5",
- "angular-animate": "github:angular/bower-angular-animate@1.5.2",
- "angular-drag-and-drop-lists": "github:marceljuenemann/angular-drag-and-drop-lists@1.4.0",
- "angular-grid": "github:ceolter/ag-grid@2.3.5",
- "angular-loading": "github:darthwade/angular-loading@0.1.4",
- "angular-motion": "github:mgcrea/angular-motion@0.4.3",
- "angular-nvd3": "github:krispo/angular-nvd3@1.0.5",
- "angular-retina": "github:jrief/angular-retina@0.3.8",
- "angular-sanitize": "github:angular/bower-angular-sanitize@1.5.2",
- "angular-smart-table": "github:lorenzofox3/Smart-Table@2.1.7",
- "angular-socket-io": "github:btford/angular-socket-io@0.7.0",
- "angular-strap": "github:mgcrea/angular-strap@2.3.7",
- "angular-tree-control": "github:wix/angular-tree-control@0.2.23",
- "angular-ui-ace": "github:angular-ui/ui-ace@0.2.3",
- "angular-ui-grid": "github:angular-ui/bower-ui-grid@3.1.1",
- "angular-ui-router": "github:angular-ui/ui-router@0.2.18",
- "angular-ui-router-metatags": "github:tinusn/ui-router-metatags@1.0.3",
- "angular-ui-router-title": "github:nonplus/angular-ui-router-title@0.0.4",
- "babel": "npm:babel-core@5.8.38",
- "babel-runtime": "npm:babel-runtime@5.8.38",
- "blob": "github:eligrey/Blob.js@master",
- "bootstrap": "github:twbs/bootstrap@3.3.6",
- "bootstrap-carousel": "github:twbs/bootstrap@3.3.6",
- "clean-css": "npm:clean-css@3.4.10",
- "core-js": "npm:core-js@1.2.6",
- "css": "github:systemjs/plugin-css@0.1.20",
- "file-saver": "github:eligrey/FileSaver.js@master",
- "font-awesome": "npm:font-awesome@4.5.0",
- "jade": "github:johnsoftek/plugin-jade@0.6.0",
- "johnsoftek/plugin-jade": "github:johnsoftek/plugin-jade@include",
- "jquery": "github:components/jquery@2.2.1",
- "json": "github:systemjs/plugin-json@0.1.0",
- "jszip": "github:Stuk/jszip@2.5.0",
- "lodash": "github:lodash/lodash@4.6.1",
- "nvd3": "npm:nvd3@1.8.1",
- "pdfmake": "github:bpampuch/pdfmake@0.1.20",
- "query-command-supported": "github:zenorocha/document.queryCommandSupported@1.0.0",
- "socket.io-client": "github:socketio/socket.io-client@1.4.5",
- "spinjs": "github:fgnass/spin.js@2.3.2",
- "text": "github:systemjs/plugin-text@0.0.7",
- "github:angular-ui/bower-ui-grid@3.1.1": {
- "pdfmake": "github:bpampuch/pdfmake@0.1.20"
- },
- "github:angular-ui/ui-ace@0.2.3": {
- "ace": "github:ajaxorg/ace-builds@1.2.3"
- },
- "github:angular-ui/ui-router@0.2.18": {
- "angular": "github:angular/bower-angular@1.5.2"
- },
- "github:angular/bower-angular-animate@1.5.2": {
- "angular": "github:angular/bower-angular@1.5.2"
- },
- "github:angular/bower-angular-sanitize@1.5.2": {
- "angular": "github:angular/bower-angular@1.5.2"
- },
- "github:angular/bower-angular@1.5.2": {
- "jquery": "github:components/jquery@2.2.1"
- },
- "github:btford/angular-socket-io@0.7.0": {
- "socket.io-client": "github:socketio/socket.io-client@1.4.5"
- },
- "github:darthwade/angular-loading@0.1.4": {
- "spinjs": "github:fgnass/spin.js@2.3.2"
- },
- "github:eligrey/FileSaver.js@master": {
- "blob": "github:eligrey/Blob.js@master"
- },
- "github:johnsoftek/plugin-jade@0.6.0": {
- "jade-compiler": "npm:jade@1.11.0",
- "text": "github:systemjs/plugin-text@0.0.4"
- },
- "github:johnsoftek/plugin-jade@include": {
- "jade-compiler": "npm:jade@1.11.0",
- "text": "github:systemjs/plugin-text@0.0.4"
- },
- "github:jspm/nodelibs-assert@0.1.0": {
- "assert": "npm:assert@1.3.0"
- },
- "github:jspm/nodelibs-buffer@0.1.0": {
- "buffer": "npm:buffer@3.6.0"
- },
- "github:jspm/nodelibs-events@0.1.1": {
- "events": "npm:events@1.0.2"
- },
- "github:jspm/nodelibs-http@1.7.1": {
- "Base64": "npm:Base64@0.2.1",
- "events": "github:jspm/nodelibs-events@0.1.1",
- "inherits": "npm:inherits@2.0.1",
- "stream": "github:jspm/nodelibs-stream@0.1.0",
- "url": "github:jspm/nodelibs-url@0.1.0",
- "util": "github:jspm/nodelibs-util@0.1.0"
- },
- "github:jspm/nodelibs-https@0.1.0": {
- "https-browserify": "npm:https-browserify@0.0.0"
- },
- "github:jspm/nodelibs-os@0.1.0": {
- "os-browserify": "npm:os-browserify@0.1.2"
- },
- "github:jspm/nodelibs-path@0.1.0": {
- "path-browserify": "npm:path-browserify@0.0.0"
- },
- "github:jspm/nodelibs-process@0.1.2": {
- "process": "npm:process@0.11.2"
- },
- "github:jspm/nodelibs-stream@0.1.0": {
- "stream-browserify": "npm:stream-browserify@1.0.0"
- },
- "github:jspm/nodelibs-tty@0.1.0": {
- "tty-browserify": "npm:tty-browserify@0.0.0"
- },
- "github:jspm/nodelibs-url@0.1.0": {
- "url": "npm:url@0.10.3"
- },
- "github:jspm/nodelibs-util@0.1.0": {
- "util": "npm:util@0.10.3"
- },
- "github:jspm/nodelibs-vm@0.1.0": {
- "vm-browserify": "npm:vm-browserify@0.0.4"
- },
- "github:krispo/angular-nvd3@1.0.5": {
- "d3": "npm:d3@3.5.14",
- "nvd3": "npm:nvd3@1.8.1"
- },
- "github:mgcrea/angular-motion@0.4.3": {
- "angular": "github:angular/bower-angular@1.5.2",
- "css": "github:systemjs/plugin-css@0.1.20"
- },
- "github:mgcrea/angular-strap@2.3.7": {
- "angular": "github:angular/bower-angular@1.5.2",
- "angular-animate": "github:angular/bower-angular-animate@1.5.2",
- "angular-motion": "github:mgcrea/angular-motion@0.4.3",
- "angular-sanitize": "github:angular/bower-angular-sanitize@1.5.2"
- },
- "github:twbs/bootstrap@3.3.6": {
- "jquery": "github:components/jquery@2.2.1"
- },
- "github:wix/angular-tree-control@0.2.23": {
- "angular": "github:angular/bower-angular@1.5.2"
- },
- "npm:acorn-globals@1.0.9": {
- "acorn": "npm:acorn@2.7.0"
- },
- "npm:acorn@1.2.2": {
- "fs": "github:jspm/nodelibs-fs@0.1.2",
- "path": "github:jspm/nodelibs-path@0.1.0",
- "process": "github:jspm/nodelibs-process@0.1.2",
- "stream": "github:jspm/nodelibs-stream@0.1.0"
- },
- "npm:acorn@2.7.0": {
- "fs": "github:jspm/nodelibs-fs@0.1.2",
- "path": "github:jspm/nodelibs-path@0.1.0",
- "process": "github:jspm/nodelibs-process@0.1.2",
- "stream": "github:jspm/nodelibs-stream@0.1.0"
- },
- "npm:align-text@0.1.4": {
- "kind-of": "npm:kind-of@3.0.2",
- "longest": "npm:longest@1.0.1",
- "repeat-string": "npm:repeat-string@1.5.4"
- },
- "npm:amdefine@1.0.0": {
- "fs": "github:jspm/nodelibs-fs@0.1.2",
- "module": "github:jspm/nodelibs-module@0.1.0",
- "path": "github:jspm/nodelibs-path@0.1.0",
- "process": "github:jspm/nodelibs-process@0.1.2"
- },
- "npm:asap@1.0.0": {
- "process": "github:jspm/nodelibs-process@0.1.2"
- },
- "npm:assert@1.3.0": {
- "util": "npm:util@0.10.3"
- },
- "npm:async@0.2.10": {
- "process": "github:jspm/nodelibs-process@0.1.2"
- },
- "npm:babel-runtime@5.8.38": {
- "process": "github:jspm/nodelibs-process@0.1.2"
- },
- "npm:buffer@3.6.0": {
- "base64-js": "npm:base64-js@0.0.8",
- "child_process": "github:jspm/nodelibs-child_process@0.1.0",
- "fs": "github:jspm/nodelibs-fs@0.1.2",
- "ieee754": "npm:ieee754@1.1.6",
- "isarray": "npm:isarray@1.0.0",
- "process": "github:jspm/nodelibs-process@0.1.2"
- },
- "npm:center-align@0.1.3": {
- "align-text": "npm:align-text@0.1.4",
- "lazy-cache": "npm:lazy-cache@1.0.3"
- },
- "npm:clean-css@3.4.10": {
- "buffer": "github:jspm/nodelibs-buffer@0.1.0",
- "commander": "npm:commander@2.8.1",
- "fs": "github:jspm/nodelibs-fs@0.1.2",
- "http": "github:jspm/nodelibs-http@1.7.1",
- "https": "github:jspm/nodelibs-https@0.1.0",
- "os": "github:jspm/nodelibs-os@0.1.0",
- "path": "github:jspm/nodelibs-path@0.1.0",
- "process": "github:jspm/nodelibs-process@0.1.2",
- "source-map": "npm:source-map@0.4.4",
- "url": "github:jspm/nodelibs-url@0.1.0",
- "util": "github:jspm/nodelibs-util@0.1.0"
- },
- "npm:cliui@2.1.0": {
- "center-align": "npm:center-align@0.1.3",
- "right-align": "npm:right-align@0.1.3",
- "wordwrap": "npm:wordwrap@0.0.2"
- },
- "npm:commander@2.6.0": {
- "child_process": "github:jspm/nodelibs-child_process@0.1.0",
- "events": "github:jspm/nodelibs-events@0.1.1",
- "path": "github:jspm/nodelibs-path@0.1.0",
- "process": "github:jspm/nodelibs-process@0.1.2"
- },
- "npm:commander@2.8.1": {
- "child_process": "github:jspm/nodelibs-child_process@0.1.0",
- "events": "github:jspm/nodelibs-events@0.1.1",
- "fs": "github:jspm/nodelibs-fs@0.1.2",
- "graceful-readlink": "npm:graceful-readlink@1.0.1",
- "path": "github:jspm/nodelibs-path@0.1.0",
- "process": "github:jspm/nodelibs-process@0.1.2"
- },
- "npm:constantinople@3.0.2": {
- "acorn": "npm:acorn@2.7.0"
- },
- "npm:core-js@1.2.6": {
- "fs": "github:jspm/nodelibs-fs@0.1.2",
- "path": "github:jspm/nodelibs-path@0.1.0",
- "process": "github:jspm/nodelibs-process@0.1.2",
- "systemjs-json": "github:systemjs/plugin-json@0.1.0"
- },
- "npm:core-util-is@1.0.2": {
- "buffer": "github:jspm/nodelibs-buffer@0.1.0"
- },
- "npm:css@1.0.8": {
- "assert": "github:jspm/nodelibs-assert@0.1.0",
- "css-parse": "npm:css-parse@1.0.4",
- "css-stringify": "npm:css-stringify@1.0.5",
- "fs": "github:jspm/nodelibs-fs@0.1.2",
- "process": "github:jspm/nodelibs-process@0.1.2"
- },
- "npm:font-awesome@4.5.0": {
- "css": "github:systemjs/plugin-css@0.1.20"
- },
- "npm:graceful-readlink@1.0.1": {
- "fs": "github:jspm/nodelibs-fs@0.1.2"
- },
- "npm:https-browserify@0.0.0": {
- "http": "github:jspm/nodelibs-http@1.7.1"
- },
- "npm:inherits@2.0.1": {
- "util": "github:jspm/nodelibs-util@0.1.0"
- },
- "npm:is-buffer@1.1.3": {
- "buffer": "github:jspm/nodelibs-buffer@0.1.0"
- },
- "npm:jade@1.11.0": {
- "buffer": "github:jspm/nodelibs-buffer@0.1.0",
- "character-parser": "npm:character-parser@1.2.1",
- "clean-css": "npm:clean-css@3.4.10",
- "commander": "npm:commander@2.6.0",
- "constantinople": "npm:constantinople@3.0.2",
- "jstransformer": "npm:jstransformer@0.0.2",
- "mkdirp": "npm:mkdirp@0.5.1",
- "path": "github:jspm/nodelibs-path@0.1.0",
- "process": "github:jspm/nodelibs-process@0.1.2",
- "systemjs-json": "github:systemjs/plugin-json@0.1.0",
- "transformers": "npm:transformers@2.1.0",
- "uglify-js": "npm:uglify-js@2.6.2",
- "void-elements": "npm:void-elements@2.0.1",
- "with": "npm:with@4.0.3"
- },
- "npm:jstransformer@0.0.2": {
- "assert": "github:jspm/nodelibs-assert@0.1.0",
- "fs": "github:jspm/nodelibs-fs@0.1.2",
- "is-promise": "npm:is-promise@2.1.0",
- "promise": "npm:promise@6.1.0"
- },
- "npm:kind-of@3.0.2": {
- "buffer": "github:jspm/nodelibs-buffer@0.1.0",
- "is-buffer": "npm:is-buffer@1.1.3"
- },
- "npm:lazy-cache@1.0.3": {
- "process": "github:jspm/nodelibs-process@0.1.2"
- },
- "npm:mkdirp@0.5.1": {
- "fs": "github:jspm/nodelibs-fs@0.1.2",
- "minimist": "npm:minimist@0.0.8",
- "path": "github:jspm/nodelibs-path@0.1.0",
- "process": "github:jspm/nodelibs-process@0.1.2"
- },
- "npm:nvd3@1.8.1": {
- "d3": "npm:d3@3.5.14"
- },
- "npm:optimist@0.3.7": {
- "path": "github:jspm/nodelibs-path@0.1.0",
- "process": "github:jspm/nodelibs-process@0.1.2",
- "wordwrap": "npm:wordwrap@0.0.2"
- },
- "npm:os-browserify@0.1.2": {
- "os": "github:jspm/nodelibs-os@0.1.0"
- },
- "npm:path-browserify@0.0.0": {
- "process": "github:jspm/nodelibs-process@0.1.2"
- },
- "npm:process@0.11.2": {
- "assert": "github:jspm/nodelibs-assert@0.1.0"
- },
- "npm:promise@2.0.0": {
- "is-promise": "npm:is-promise@1.0.1",
- "process": "github:jspm/nodelibs-process@0.1.2"
- },
- "npm:promise@6.1.0": {
- "asap": "npm:asap@1.0.0"
- },
- "npm:punycode@1.3.2": {
- "process": "github:jspm/nodelibs-process@0.1.2"
- },
- "npm:readable-stream@1.1.13": {
- "buffer": "github:jspm/nodelibs-buffer@0.1.0",
- "core-util-is": "npm:core-util-is@1.0.2",
- "events": "github:jspm/nodelibs-events@0.1.1",
- "inherits": "npm:inherits@2.0.1",
- "isarray": "npm:isarray@0.0.1",
- "process": "github:jspm/nodelibs-process@0.1.2",
- "stream-browserify": "npm:stream-browserify@1.0.0",
- "string_decoder": "npm:string_decoder@0.10.31"
- },
- "npm:right-align@0.1.3": {
- "align-text": "npm:align-text@0.1.4"
- },
- "npm:source-map@0.1.43": {
- "amdefine": "npm:amdefine@1.0.0",
- "fs": "github:jspm/nodelibs-fs@0.1.2",
- "path": "github:jspm/nodelibs-path@0.1.0",
- "process": "github:jspm/nodelibs-process@0.1.2"
- },
- "npm:source-map@0.4.4": {
- "amdefine": "npm:amdefine@1.0.0",
- "process": "github:jspm/nodelibs-process@0.1.2"
- },
- "npm:source-map@0.5.3": {
- "process": "github:jspm/nodelibs-process@0.1.2"
- },
- "npm:stream-browserify@1.0.0": {
- "events": "github:jspm/nodelibs-events@0.1.1",
- "inherits": "npm:inherits@2.0.1",
- "readable-stream": "npm:readable-stream@1.1.13"
- },
- "npm:string_decoder@0.10.31": {
- "buffer": "github:jspm/nodelibs-buffer@0.1.0"
- },
- "npm:transformers@2.1.0": {
- "css": "npm:css@1.0.8",
- "fs": "github:jspm/nodelibs-fs@0.1.2",
- "path": "github:jspm/nodelibs-path@0.1.0",
- "process": "github:jspm/nodelibs-process@0.1.2",
- "promise": "npm:promise@2.0.0",
- "uglify-js": "npm:uglify-js@2.2.5",
- "vm": "github:jspm/nodelibs-vm@0.1.0"
- },
- "npm:uglify-js@2.2.5": {
- "fs": "github:jspm/nodelibs-fs@0.1.2",
- "optimist": "npm:optimist@0.3.7",
- "path": "github:jspm/nodelibs-path@0.1.0",
- "process": "github:jspm/nodelibs-process@0.1.2",
- "source-map": "npm:source-map@0.1.43",
- "util": "github:jspm/nodelibs-util@0.1.0",
- "vm": "github:jspm/nodelibs-vm@0.1.0"
- },
- "npm:uglify-js@2.6.2": {
- "async": "npm:async@0.2.10",
- "fs": "github:jspm/nodelibs-fs@0.1.2",
- "path": "github:jspm/nodelibs-path@0.1.0",
- "process": "github:jspm/nodelibs-process@0.1.2",
- "source-map": "npm:source-map@0.5.3",
- "uglify-to-browserify": "npm:uglify-to-browserify@1.0.2",
- "yargs": "npm:yargs@3.10.0"
- },
- "npm:uglify-to-browserify@1.0.2": {
- "fs": "github:jspm/nodelibs-fs@0.1.2",
- "stream": "github:jspm/nodelibs-stream@0.1.0"
- },
- "npm:url@0.10.3": {
- "assert": "github:jspm/nodelibs-assert@0.1.0",
- "punycode": "npm:punycode@1.3.2",
- "querystring": "npm:querystring@0.2.0",
- "util": "github:jspm/nodelibs-util@0.1.0"
- },
- "npm:util@0.10.3": {
- "inherits": "npm:inherits@2.0.1",
- "process": "github:jspm/nodelibs-process@0.1.2"
- },
- "npm:vm-browserify@0.0.4": {
- "indexof": "npm:indexof@0.0.1"
- },
- "npm:void-elements@2.0.1": {
- "http": "github:jspm/nodelibs-http@1.7.1"
- },
- "npm:window-size@0.1.0": {
- "process": "github:jspm/nodelibs-process@0.1.2",
- "tty": "github:jspm/nodelibs-tty@0.1.0"
- },
- "npm:with@4.0.3": {
- "acorn": "npm:acorn@1.2.2",
- "acorn-globals": "npm:acorn-globals@1.0.9"
- },
- "npm:yargs@3.10.0": {
- "assert": "github:jspm/nodelibs-assert@0.1.0",
- "camelcase": "npm:camelcase@1.2.1",
- "cliui": "npm:cliui@2.1.0",
- "decamelize": "npm:decamelize@1.2.0",
- "fs": "github:jspm/nodelibs-fs@0.1.2",
- "path": "github:jspm/nodelibs-path@0.1.0",
- "process": "github:jspm/nodelibs-process@0.1.2",
- "window-size": "npm:window-size@0.1.0"
- }
- }
-});
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/controllers/admin-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/admin-controller.js b/modules/control-center-web/src/main/js/controllers/admin-controller.js
index 5d204d5..bc5c3e9 100644
--- a/modules/control-center-web/src/main/js/controllers/admin-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/admin-controller.js
@@ -16,6 +16,8 @@
*/
// Controller for Admin screen.
+import consoleModule from 'controllers/common-module';
+
consoleModule.controller('adminController', [
'$rootScope', '$scope', '$http', '$q', '$common', '$confirm', '$state', 'User',
function ($rootScope, $scope, $http, $q, $common, $confirm, $state, User) {
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/controllers/caches-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/caches-controller.js b/modules/control-center-web/src/main/js/controllers/caches-controller.js
index 97d5266..6ea2f18 100644
--- a/modules/control-center-web/src/main/js/controllers/caches-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/caches-controller.js
@@ -16,6 +16,8 @@
*/
// Controller for Caches screen.
+import consoleModule from 'controllers/common-module';
+
consoleModule.controller('cachesController', [
'$scope', '$http', '$state', '$filter', '$timeout', '$common', '$confirm', '$clone', '$loading', '$cleanup', '$unsavedChangesGuard',
function ($scope, $http, $state, $filter, $timeout, $common, $confirm, $clone, $loading, $cleanup, $unsavedChangesGuard) {
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/controllers/clusters-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/clusters-controller.js b/modules/control-center-web/src/main/js/controllers/clusters-controller.js
index 6932af4..a4b88e7 100644
--- a/modules/control-center-web/src/main/js/controllers/clusters-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/clusters-controller.js
@@ -16,6 +16,8 @@
*/
// Controller for Clusters screen.
+import consoleModule from 'controllers/common-module';
+
consoleModule.controller('clustersController', [
'$scope', '$http', '$state', '$timeout', '$common', '$confirm', '$clone', '$loading', '$cleanup', '$unsavedChangesGuard', 'igniteEventGroups',
function ($scope, $http, $state, $timeout, $common, $confirm, $clone, $loading, $cleanup, $unsavedChangesGuard, igniteEventGroups) {
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/controllers/common-module.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/common-module.js b/modules/control-center-web/src/main/js/controllers/common-module.js
index 0fff237..5793bef 100644
--- a/modules/control-center-web/src/main/js/controllers/common-module.js
+++ b/modules/control-center-web/src/main/js/controllers/common-module.js
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-var consoleModule = angular.module('ignite-web-console',
+const consoleModule = angular.module('ignite-console.legacy',
[
'darthwade.dwLoading',
'smart-table',
@@ -28,50 +28,48 @@ var consoleModule = angular.module('ignite-web-console',
'ui.grid.exporter',
'nvd3',
'dndLists'
- /* ignite:modules */
- , 'ignite-console'
- /* endignite */
-
/* ignite:plugins */
/* endignite */
- ])
- .run(function ($rootScope, $http, $state, $common, Auth, User, IgniteGettingStarted) {
- $rootScope.gettingStarted = IgniteGettingStarted;
-
- $rootScope.revertIdentity = function () {
- $http
- .get('/api/v1/admin/revert/identity')
- .then(User.read)
- .then(function (user) {
- $rootScope.$broadcast('user', user);
-
- $state.go('settings.admin');
- })
- .catch(function (errMsg) {
- $common.showError($common.errorMessage(errMsg));
- });
- };
- });
+ ]);
+
+consoleModule.run(['$rootScope', '$http', '$state', '$common', 'Auth', 'User', 'gettingStarted',
+ ($root, $http, $state, $common, Auth, User, gettingStarted) => {
+ $root.gettingStarted = gettingStarted;
+
+ $root.revertIdentity = function () {
+ $http
+ .get('/api/v1/admin/revert/identity')
+ .then(User.read)
+ .then(function (user) {
+ $root.$broadcast('user', user);
+
+ $state.go('settings.admin');
+ })
+ .catch(function (errMsg) {
+ $common.showError($common.errorMessage(errMsg));
+ });
+ };
+}]);
// Modal popup configuration.
-consoleModule.config(function ($modalProvider) {
+consoleModule.config(['$modalProvider', ($modalProvider) => {
angular.extend($modalProvider.defaults, {
html: true
});
-});
+}]);
// Comboboxes configuration.
-consoleModule.config(function ($popoverProvider) {
+consoleModule.config(['$popoverProvider', ($popoverProvider) => {
angular.extend($popoverProvider.defaults, {
trigger: 'manual',
placement: 'right',
container: 'body',
templateUrl: '/templates/validation-error.html'
});
-});
+}]);
// Tooltips configuration.
-consoleModule.config(function ($tooltipProvider) {
+consoleModule.config(['$tooltipProvider', ($tooltipProvider) => {
angular.extend($tooltipProvider.defaults, {
container: 'body',
delay: 150,
@@ -79,10 +77,10 @@ consoleModule.config(function ($tooltipProvider) {
html: 'true',
trigger: 'click hover'
});
-});
+}]);
// Comboboxes configuration.
-consoleModule.config(function ($selectProvider) {
+consoleModule.config(['$selectProvider', ($selectProvider) => {
angular.extend($selectProvider.defaults, {
container: 'body',
maxLength: '5',
@@ -92,35 +90,35 @@ consoleModule.config(function ($selectProvider) {
iconCheckmark: 'fa fa-check',
caretHtml: ''
});
-});
+}]);
// Alerts configuration.
-consoleModule.config(function ($alertProvider) {
+consoleModule.config(['$alertProvider', ($alertProvider) => {
angular.extend($alertProvider.defaults, {
container: 'body',
placement: 'top-right',
duration: '5',
type: 'danger'
});
-});
+}]);
// Modals configuration.
-consoleModule.config(function($modalProvider) {
+consoleModule.config(['$modalProvider', ($modalProvider) => {
angular.extend($modalProvider.defaults, {
animation: 'am-fade-and-scale'
});
-});
+}]);
// Dropdowns configuration.
-consoleModule.config(function($dropdownProvider) {
+consoleModule.config(['$dropdownProvider', ($dropdownProvider) => {
angular.extend($dropdownProvider.defaults, {
templateUrl: 'templates/dropdown.html'
});
-});
+}]);
// Common functions to be used in controllers.
-consoleModule.service('$common', [
- '$alert', '$popover', '$anchorScroll', '$location', '$timeout', '$focus', '$window', function ($alert, $popover, $anchorScroll, $location, $timeout, $focus, $window) {
+consoleModule.service('$common', ['$alert', '$popover', '$anchorScroll', '$location', '$timeout', '$focus', '$window',
+ ($alert, $popover, $anchorScroll, $location, $timeout, $focus, $window) => {
$anchorScroll.yOffset = 55;
function isDefined(v) {
@@ -1146,8 +1144,8 @@ consoleModule.service('$common', [
}]);
// Confirm popup service.
-consoleModule.service('$confirm', function ($modal, $rootScope, $q) {
- var scope = $rootScope.$new();
+consoleModule.service('$confirm', ['$modal', '$rootScope', '$q', ($modal, $root, $q) => {
+ var scope = $root.$new();
var deferred;
@@ -1176,17 +1174,17 @@ consoleModule.service('$confirm', function ($modal, $rootScope, $q) {
};
return confirmModal;
-});
+}]);
// Confirm change location.
-consoleModule.service('$unsavedChangesGuard', function ($rootScope) {
+consoleModule.service('$unsavedChangesGuard', ['$rootScope', ($root) => {
return {
install: function ($scope) {
$scope.$on("$destroy", function() {
window.onbeforeunload = null;
});
- var unbind = $rootScope.$on('$stateChangeStart', function(event) {
+ var unbind = $root.$on('$stateChangeStart', function(event) {
if ($scope.ui && ($scope.ui.isDirty() || ($scope.ui.angularWay && $scope.ui.inputForm && $scope.ui.inputForm.$dirty))) {
if (!confirm('You have unsaved changes.\n\nAre you sure you want to discard them?')) {
event.preventDefault();
@@ -1203,11 +1201,11 @@ consoleModule.service('$unsavedChangesGuard', function ($rootScope) {
};
}
};
-});
+}]);
// Service for confirm or skip several steps.
-consoleModule.service('$confirmBatch', function ($rootScope, $modal, $q) {
- var scope = $rootScope.$new();
+consoleModule.service('$confirmBatch', ['$modal', '$rootScope', '$q', ($modal, $root, $q) => {
+ var scope = $root.$new();
scope.confirmModal = $modal({templateUrl: '/templates/batch-confirm.html', scope: scope, placement: 'center', show: false});
@@ -1272,11 +1270,11 @@ consoleModule.service('$confirmBatch', function ($rootScope, $modal, $q) {
return scope.deferred.promise;
}
};
-});
+}]);
// 'Clone' popup service.
-consoleModule.service('$clone', function ($modal, $rootScope, $q) {
- var scope = $rootScope.$new();
+consoleModule.service('$clone', ['$modal', '$rootScope', '$q', ($modal, $root, $q) => {
+ var scope = $root.$new();
var deferred;
var _names = [];
@@ -1321,7 +1319,7 @@ consoleModule.service('$clone', function ($modal, $rootScope, $q) {
};
return cloneModal;
-});
+}]);
// Tables support service.
consoleModule.service('$table', ['$common', '$focus', function ($common, $focus) {
@@ -1878,7 +1876,7 @@ consoleModule.directive('match', function ($parse) {
});
// Directive to bind ENTER key press with some user action.
-consoleModule.directive('onEnter', function ($timeout) {
+consoleModule.directive('onEnter', ['$timeout', ($timeout) => {
return function (scope, elem, attrs) {
elem.on('keydown keypress', function (event) {
if (event.which === 13) {
@@ -1897,10 +1895,10 @@ consoleModule.directive('onEnter', function ($timeout) {
elem.off('keydown keypress');
});
};
-});
+}]);
// Directive to bind ESC key press with some user action.
-consoleModule.directive('onEscape', function () {
+consoleModule.directive('onEscape', () => {
return function (scope, elem, attrs) {
elem.on('keydown keypress', function (event) {
if (event.which === 27) {
@@ -1920,7 +1918,7 @@ consoleModule.directive('onEscape', function () {
});
// Directive to retain selection. To fix angular-strap typeahead bug with setting cursor to the end of text.
-consoleModule.directive('retainSelection', function ($timeout) {
+consoleModule.directive('retainSelection', ['$timeout', ($timeout) => {
var promise;
return function (scope, elem) {
@@ -1968,10 +1966,10 @@ consoleModule.directive('retainSelection', function ($timeout) {
elem.off('keydown');
});
};
-});
+}]);
// Factory function to focus element.
-consoleModule.factory('$focus', function ($timeout) {
+consoleModule.factory('$focus', ['$timeout', ($timeout) => {
return function (id) {
// Timeout makes sure that is invoked after any other event has been triggered.
// E.g. click events that need to run before the focus or inputs elements that are
@@ -1983,10 +1981,10 @@ consoleModule.factory('$focus', function ($timeout) {
elem[0].focus();
}, 100);
};
-});
+}]);
// Directive to auto-focus element.
-consoleModule.directive('autoFocus', function($timeout) {
+consoleModule.directive('autoFocus', ['$timeout', ($timeout) => {
return {
restrict: 'AC',
link: function(scope, element) {
@@ -1995,10 +1993,10 @@ consoleModule.directive('autoFocus', function($timeout) {
});
}
};
-});
+}]);
// Directive to focus next element on ENTER key.
-consoleModule.directive('enterFocusNext', function ($focus) {
+consoleModule.directive('enterFocusNext', ['$focus', ($focus) => {
return function (scope, elem, attrs) {
elem.on('keydown keypress', function (event) {
if (event.which === 13) {
@@ -2008,10 +2006,10 @@ consoleModule.directive('enterFocusNext', function ($focus) {
}
});
};
-});
+}]);
// Directive to mark elements to focus.
-consoleModule.directive('onClickFocus', function ($focus) {
+consoleModule.directive('onClickFocus', ['$focus', ($focus) => {
return function (scope, elem, attr) {
elem.on('click', function () {
$focus(attr.onClickFocus);
@@ -2022,11 +2020,11 @@ consoleModule.directive('onClickFocus', function ($focus) {
elem.off('click');
});
};
-});
+}]);
consoleModule.controller('resetPassword', [
'$scope', '$modal', '$http', '$common', '$focus', 'Auth', '$state',
- function ($scope, $modal, $http, $common, $focus, Auth, $state) {
+ ($scope, $modal, $http, $common, $focus, Auth, $state) => {
if ($state.params.token)
$http.post('/api/v1/password/validate/token', {token: $state.params.token})
.success(function (res) {
@@ -2058,7 +2056,7 @@ consoleModule.controller('resetPassword', [
// Sign in controller.
// TODO IGNITE-1936 Refactor this controller.
-consoleModule.controller('auth', ['$scope', '$focus', 'Auth', 'IgniteCountries', function ($scope, $focus, Auth, countries) {
+consoleModule.controller('auth', ['$scope', '$focus', 'Auth', 'IgniteCountries', ($scope, $focus, Auth, countries) => {
$scope.auth = Auth.auth;
$scope.action = 'signin';
@@ -2069,7 +2067,7 @@ consoleModule.controller('auth', ['$scope', '$focus', 'Auth', 'IgniteCountries',
// Navigation bar controller.
consoleModule.controller('notebooks', ['$scope', '$modal', '$state', '$http', '$common',
- function ($scope, $modal, $state, $http, $common) {
+ ($scope, $modal, $state, $http, $common) => {
$scope.$root.notebooks = [];
// Pre-fetch modal dialogs.
@@ -2127,3 +2125,5 @@ consoleModule.controller('notebooks', ['$scope', '$modal', '$state', '$http', '$
$scope.$root.reloadNotebooks();
}]);
+
+export default consoleModule;
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/controllers/domains-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/domains-controller.js b/modules/control-center-web/src/main/js/controllers/domains-controller.js
index d90f2a7..d8ae37e 100644
--- a/modules/control-center-web/src/main/js/controllers/domains-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/domains-controller.js
@@ -16,6 +16,8 @@
*/
// Controller for Domain model screen.
+import consoleModule from 'controllers/common-module';
+
consoleModule.controller('domainsController', [
'$scope', '$http', '$state', '$filter', '$timeout', '$modal', '$common', '$focus', '$confirm', '$confirmBatch', '$clone', '$table', '$preview', '$loading', '$unsavedChangesGuard', 'IgniteAgentMonitor',
function ($scope, $http, $state, $filter, $timeout, $modal, $common, $focus, $confirm, $confirmBatch, $clone, $table, $preview, $loading, $unsavedChangesGuard, IgniteAgentMonitor) {
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/controllers/ext-searchbox.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/ext-searchbox.js b/modules/control-center-web/src/main/js/controllers/ext-searchbox.js
deleted file mode 100644
index 343db34..0000000
--- a/modules/control-center-web/src/main/js/controllers/ext-searchbox.js
+++ /dev/null
@@ -1,420 +0,0 @@
-/* */
-
-// TODO This code MUST BE refactored before SOURCE release!!!
-
-"format global";
-ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"], function(require, exports, module) {
-"use strict";
-
-var dom = require("../lib/dom");
-var lang = require("../lib/lang");
-var event = require("../lib/event");
-var searchboxCss = "\
-.ace_search {\
-background-color: #ddd;\
-border: 1px solid #cbcbcb;\
-border-top: 0 none;\
-max-width: 325px;\
-overflow: hidden;\
-margin: 0;\
-padding: 4px;\
-padding-right: 6px;\
-padding-bottom: 0;\
-position: absolute;\
-top: 0px;\
-z-index: 99;\
-white-space: normal;\
-}\
-.ace_search.left {\
-border-left: 0 none;\
-border-radius: 0px 0px 5px 0px;\
-left: 0;\
-}\
-.ace_search.right {\
-border-radius: 0px 0px 0px 5px;\
-border-right: 0 none;\
-right: 0;\
-}\
-.ace_search_form, .ace_replace_form {\
-border-radius: 3px;\
-border: 1px solid #cbcbcb;\
-float: left;\
-margin-bottom: 4px;\
-overflow: hidden;\
-}\
-.ace_search_form.ace_nomatch {\
-outline: 1px solid red;\
-}\
-.ace_search_field {\
-background-color: white;\
-border-right: 1px solid #cbcbcb;\
-border: 0 none;\
--webkit-box-sizing: border-box;\
--moz-box-sizing: border-box;\
-box-sizing: border-box;\
-float: left;\
-height: 22px;\
-outline: 0;\
-padding: 0 7px;\
-width: 214px;\
-margin: 0;\
-}\
-.ace_searchbtn,\
-.ace_replacebtn {\
-background: #fff;\
-border: 0 none;\
-border-left: 1px solid #dcdcdc;\
-cursor: pointer;\
-float: left;\
-height: 22px;\
-margin: 0;\
-position: relative;\
-}\
-.ace_searchbtn:last-child,\
-.ace_replacebtn:last-child {\
-border-top-right-radius: 3px;\
-border-bottom-right-radius: 3px;\
-}\
-.ace_searchbtn:disabled {\
-background: none;\
-cursor: default;\
-}\
-.ace_searchbtn {\
-background-position: 50% 50%;\
-background-repeat: no-repeat;\
-width: 27px;\
-}\
-.ace_searchbtn.prev {\
-background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiSU1NZUAC/6E0I0yACYskCpsJiySKIiY0SUZk40FyTEgCjGgKwTRAgAEAQJUIPCE+qfkAAAAASUVORK5CYII=); \
-}\
-.ace_searchbtn.next {\
-background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNpiTE1NZQCC/0DMyIAKwGJMUAYDEo3M/s+EpvM/mkKwCQxYjIeLMaELoLMBAgwAU7UJObTKsvAAAAAASUVORK5CYII=); \
-}\
-.ace_searchbtn_close {\
-background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;\
-border-radius: 50%;\
-border: 0 none;\
-color: #656565;\
-cursor: pointer;\
-float: right;\
-font: 16px/16px Arial;\
-height: 14px;\
-margin: 5px 1px 9px 5px;\
-padding: 0;\
-text-align: center;\
-width: 14px;\
-}\
-.ace_searchbtn_close:hover {\
-background-color: #656565;\
-background-position: 50% 100%;\
-color: white;\
-}\
-.ace_replacebtn.prev {\
-width: 54px\
-}\
-.ace_replacebtn.next {\
-width: 27px\
-}\
-.ace_button {\
-margin-left: 2px;\
-cursor: pointer;\
--webkit-user-select: none;\
--moz-user-select: none;\
--o-user-select: none;\
--ms-user-select: none;\
-user-select: none;\
-overflow: hidden;\
-opacity: 0.7;\
-border: 1px solid rgba(100,100,100,0.23);\
-padding: 1px;\
--moz-box-sizing: border-box;\
-box-sizing: border-box;\
-color: black;\
-}\
-.ace_button:hover {\
-background-color: #eee;\
-opacity:1;\
-}\
-.ace_button:active {\
-background-color: #ddd;\
-}\
-.ace_button.checked {\
-border-color: #3399ff;\
-opacity:1;\
-}\
-.ace_search_options{\
-margin-bottom: 3px;\
-text-align: right;\
--webkit-user-select: none;\
--moz-user-select: none;\
--o-user-select: none;\
--ms-user-select: none;\
-user-select: none;\
-}";
-var HashHandler = require("../keyboard/hash_handler").HashHandler;
-var keyUtil = require("../lib/keys");
-
-dom.importCssString(searchboxCss, "ace_searchbox");
-
-var html = '<div class="ace_search right">\
- <button type="button" action="hide" class="ace_searchbtn_close"></button>\
- <div class="ace_search_form">\
- <input class="ace_search_field" placeholder="Search for" spellcheck="false"></input>\
- <button type="button" action="findNext" class="ace_searchbtn next"></button>\
- <button type="button" action="findPrev" class="ace_searchbtn prev"></button>\
- <button type="button" action="findAll" class="ace_searchbtn" title="Alt-Enter">All</button>\
- </div>\
- <div class="ace_replace_form">\
- <input class="ace_search_field" placeholder="Replace with" spellcheck="false"></input>\
- <button type="button" action="replaceAndFindNext" class="ace_replacebtn">Replace</button>\
- <button type="button" action="replaceAll" class="ace_replacebtn">All</button>\
- </div>\
- <div class="ace_search_options">\
- <span action="toggleRegexpMode" class="ace_button" title="RegExp Search">.*</span>\
- <span action="toggleCaseSensitive" class="ace_button" title="CaseSensitive Search">Aa</span>\
- <span action="toggleWholeWords" class="ace_button" title="Whole Word Search">\\b</span>\
- </div>\
-</div>'.replace(/>\s+/g, ">");
-
-var SearchBox = function(editor, range, showReplaceForm) {
- var div = dom.createElement("div");
- div.innerHTML = html;
- this.element = div.firstChild;
-
- this.$init();
- this.setEditor(editor);
-};
-
-(function() {
- this.setEditor = function(editor) {
- editor.searchBox = this;
- editor.container.appendChild(this.element);
- this.editor = editor;
- };
-
- this.$initElements = function(sb) {
- this.searchBox = sb.querySelector(".ace_search_form");
- this.replaceBox = sb.querySelector(".ace_replace_form");
- this.searchOptions = sb.querySelector(".ace_search_options");
- this.regExpOption = sb.querySelector("[action=toggleRegexpMode]");
- this.caseSensitiveOption = sb.querySelector("[action=toggleCaseSensitive]");
- this.wholeWordOption = sb.querySelector("[action=toggleWholeWords]");
- this.searchInput = this.searchBox.querySelector(".ace_search_field");
- this.replaceInput = this.replaceBox.querySelector(".ace_search_field");
- };
-
- this.$init = function() {
- var sb = this.element;
-
- this.$initElements(sb);
-
- var _this = this;
- event.addListener(sb, "mousedown", function(e) {
- setTimeout(function(){
- _this.activeInput.focus();
- }, 0);
- event.stopPropagation(e);
- });
- event.addListener(sb, "click", function(e) {
- var t = e.target || e.srcElement;
- var action = t.getAttribute("action");
- if (action && _this[action])
- _this[action]();
- else if (_this.$searchBarKb.commands[action])
- _this.$searchBarKb.commands[action].exec(_this);
- event.stopPropagation(e);
- });
-
- event.addCommandKeyListener(sb, function(e, hashId, keyCode) {
- var keyString = keyUtil.keyCodeToString(keyCode);
- var command = _this.$searchBarKb.findKeyCommand(hashId, keyString);
- if (command && command.exec) {
- command.exec(_this);
- event.stopEvent(e);
- }
- });
-
- this.$onChange = lang.delayedCall(function() {
- _this.find(false, false);
- });
-
- event.addListener(this.searchInput, "input", function() {
- _this.$onChange.schedule(20);
- });
- event.addListener(this.searchInput, "focus", function() {
- _this.activeInput = _this.searchInput;
- _this.searchInput.value && _this.highlight();
- });
- event.addListener(this.replaceInput, "focus", function() {
- _this.activeInput = _this.replaceInput;
- _this.searchInput.value && _this.highlight();
- });
- };
- this.$closeSearchBarKb = new HashHandler([{
- bindKey: "Esc",
- name: "closeSearchBar",
- exec: function(editor) {
- editor.searchBox.hide();
- }
- }]);
- this.$searchBarKb = new HashHandler();
- this.$searchBarKb.bindKeys({
- "Ctrl-f|Command-f": function(sb) {
- var isReplace = sb.isReplace = !sb.isReplace;
- sb.replaceBox.style.display = isReplace ? "" : "none";
- sb.searchInput.focus();
- },
- "Ctrl-H|Command-Option-F": function(sb) {
- sb.replaceBox.style.display = "";
- sb.replaceInput.focus();
- },
- "Ctrl-G|Command-G": function(sb) {
- sb.findNext();
- },
- "Ctrl-Shift-G|Command-Shift-G": function(sb) {
- sb.findPrev();
- },
- "esc": function(sb) {
- setTimeout(function() { sb.hide();});
- },
- "Return": function(sb) {
- if (sb.activeInput == sb.replaceInput)
- sb.replace();
- sb.findNext();
- },
- "Shift-Return": function(sb) {
- if (sb.activeInput == sb.replaceInput)
- sb.replace();
- sb.findPrev();
- },
- "Alt-Return": function(sb) {
- if (sb.activeInput == sb.replaceInput)
- sb.replaceAll();
- sb.findAll();
- },
- "Tab": function(sb) {
- (sb.activeInput == sb.replaceInput ? sb.searchInput : sb.replaceInput).focus();
- }
- });
-
- this.$searchBarKb.addCommands([{
- name: "toggleRegexpMode",
- bindKey: {win: "Alt-R|Alt-/", mac: "Ctrl-Alt-R|Ctrl-Alt-/"},
- exec: function(sb) {
- sb.regExpOption.checked = !sb.regExpOption.checked;
- sb.$syncOptions();
- }
- }, {
- name: "toggleCaseSensitive",
- bindKey: {win: "Alt-C|Alt-I", mac: "Ctrl-Alt-R|Ctrl-Alt-I"},
- exec: function(sb) {
- sb.caseSensitiveOption.checked = !sb.caseSensitiveOption.checked;
- sb.$syncOptions();
- }
- }, {
- name: "toggleWholeWords",
- bindKey: {win: "Alt-B|Alt-W", mac: "Ctrl-Alt-B|Ctrl-Alt-W"},
- exec: function(sb) {
- sb.wholeWordOption.checked = !sb.wholeWordOption.checked;
- sb.$syncOptions();
- }
- }]);
-
- this.$syncOptions = function() {
- dom.setCssClass(this.regExpOption, "checked", this.regExpOption.checked);
- dom.setCssClass(this.wholeWordOption, "checked", this.wholeWordOption.checked);
- dom.setCssClass(this.caseSensitiveOption, "checked", this.caseSensitiveOption.checked);
- this.find(false, false);
- };
-
- this.highlight = function(re) {
- this.editor.session.highlight(re || this.editor.$search.$options.re);
- this.editor.renderer.updateBackMarkers()
- };
- this.find = function(skipCurrent, backwards, preventScroll) {
- var range = this.editor.find(this.searchInput.value, {
- skipCurrent: skipCurrent,
- backwards: backwards,
- wrap: true,
- regExp: this.regExpOption.checked,
- caseSensitive: this.caseSensitiveOption.checked,
- wholeWord: this.wholeWordOption.checked,
- preventScroll: preventScroll
- });
- var noMatch = !range && this.searchInput.value;
- dom.setCssClass(this.searchBox, "ace_nomatch", noMatch);
- this.editor._emit("findSearchBox", { match: !noMatch });
- this.highlight();
- };
- this.findNext = function() {
- this.find(true, false);
- };
- this.findPrev = function() {
- this.find(true, true);
- };
- this.findAll = function(){
- var range = this.editor.findAll(this.searchInput.value, {
- regExp: this.regExpOption.checked,
- caseSensitive: this.caseSensitiveOption.checked,
- wholeWord: this.wholeWordOption.checked
- });
- var noMatch = !range && this.searchInput.value;
- dom.setCssClass(this.searchBox, "ace_nomatch", noMatch);
- this.editor._emit("findSearchBox", { match: !noMatch });
- this.highlight();
- this.hide();
- };
- this.replace = function() {
- if (!this.editor.getReadOnly())
- this.editor.replace(this.replaceInput.value);
- };
- this.replaceAndFindNext = function() {
- if (!this.editor.getReadOnly()) {
- this.editor.replace(this.replaceInput.value);
- this.findNext()
- }
- };
- this.replaceAll = function() {
- if (!this.editor.getReadOnly())
- this.editor.replaceAll(this.replaceInput.value);
- };
-
- this.hide = function() {
- this.element.style.display = "none";
- this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb);
- this.editor.focus();
- };
- this.show = function(value, isReplace) {
- this.element.style.display = "";
- this.replaceBox.style.display = isReplace ? "" : "none";
-
- this.isReplace = isReplace;
-
- if (value)
- this.searchInput.value = value;
-
- this.find(false, false, true);
-
- this.searchInput.focus();
- this.searchInput.select();
-
- this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb);
- };
-
- this.isFocused = function() {
- var el = document.activeElement;
- return el == this.searchInput || el == this.replaceInput;
- }
-}).call(SearchBox.prototype);
-
-exports.SearchBox = SearchBox;
-
-exports.Search = function(editor, isReplace) {
- var sb = editor.searchBox || new SearchBox(editor);
- sb.show(editor.session.getTextRange(), isReplace);
-};
-
-});
- (function() {
- ace.require(["ace/ext/searchbox"], function() {});
- })();
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/controllers/igfs-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/igfs-controller.js b/modules/control-center-web/src/main/js/controllers/igfs-controller.js
index 2263940..71b024a 100644
--- a/modules/control-center-web/src/main/js/controllers/igfs-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/igfs-controller.js
@@ -16,6 +16,8 @@
*/
// Controller for IGFS screen.
+import consoleModule from 'controllers/common-module';
+
consoleModule.controller('igfsController', [
'$scope', '$http', '$state', '$filter', '$timeout', '$common', '$confirm', '$clone', '$loading', '$cleanup', '$unsavedChangesGuard',
function ($scope, $http, $state, $filter, $timeout, $common, $confirm, $clone, $loading, $cleanup, $unsavedChangesGuard) {
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/controllers/profile-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/profile-controller.js b/modules/control-center-web/src/main/js/controllers/profile-controller.js
index cf03252..2272ade 100644
--- a/modules/control-center-web/src/main/js/controllers/profile-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/profile-controller.js
@@ -16,6 +16,8 @@
*/
// Controller for Profile screen.
+import consoleModule from 'controllers/common-module';
+
consoleModule.controller('profileController', [
'$rootScope', '$scope', '$http', '$common', '$focus', '$confirm', 'IgniteCountries',
function ($rootScope, $scope, $http, $common, $focus, $confirm, countries) {
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/controllers/sql-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/sql-controller.js b/modules/control-center-web/src/main/js/controllers/sql-controller.js
index abae869..9ffe32b 100644
--- a/modules/control-center-web/src/main/js/controllers/sql-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/sql-controller.js
@@ -16,6 +16,8 @@
*/
// Controller for SQL notebook screen.
+import consoleModule from 'controllers/common-module';
+
consoleModule.controller('sqlController', [
'$scope', '$http', '$timeout', '$interval', '$animate', '$location', '$anchorScroll', '$state', '$modal', '$popover', '$loading', '$common', '$confirm', 'IgniteAgentMonitor', 'IgniteChartColors', 'QueryNotebooks', 'uiGridExporterConstants',
function ($scope, $http, $timeout, $interval, $animate, $location, $anchorScroll, $state, $modal, $popover, $loading, $common, $confirm, IgniteAgentMonitor, IgniteChartColors, QueryNotebooks, uiGridExporterConstants) {
[10/14] ignite git commit: IGNITE-2755 Minor fix.
Posted by an...@apache.org.
IGNITE-2755 Minor fix.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/004f968a
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/004f968a
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/004f968a
Branch: refs/heads/ignite-2875
Commit: 004f968adaa518b0aa5915ac9bc81acfdcd90ada
Parents: 8987065
Author: Andrey <an...@gridgain.com>
Authored: Wed Mar 30 13:41:17 2016 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Wed Mar 30 13:41:17 2016 +0700
----------------------------------------------------------------------
.../src/main/js/controllers/common-module.js | 2 +-
modules/control-center-web/src/main/js/package.json | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/004f968a/modules/control-center-web/src/main/js/controllers/common-module.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/common-module.js b/modules/control-center-web/src/main/js/controllers/common-module.js
index 5793bef..9d4f99f 100644
--- a/modules/control-center-web/src/main/js/controllers/common-module.js
+++ b/modules/control-center-web/src/main/js/controllers/common-module.js
@@ -1054,7 +1054,7 @@ consoleModule.service('$common', ['$alert', '$popover', '$anchorScroll', '$locat
checkDirty: function(curItem, srcItem) {
this.groups.forEach(function(group) {
if (checkGroupDirty(group, curItem, srcItem))
- dirty = true;
+ group.dirty = true;
});
}
};
http://git-wip-us.apache.org/repos/asf/ignite/blob/004f968a/modules/control-center-web/src/main/js/package.json
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/package.json b/modules/control-center-web/src/main/js/package.json
index 691b933..5cd4ced 100644
--- a/modules/control-center-web/src/main/js/package.json
+++ b/modules/control-center-web/src/main/js/package.json
@@ -32,7 +32,7 @@
"express-session": "^1.12.0",
"fire-up": "^0.4.4",
"jade": "~1.11.0",
- "jszip": "^2.5.0",
+ "jszip": "^2.6.0",
"lodash": "^4.0.0",
"mongoose": "^4.4.8",
"mongoose-deep-populate": "^3.0.0",
@@ -48,12 +48,12 @@
},
"devDependencies": {
"babel-core": "^6.7.2",
- "babel-eslint": "^6.0.0-beta.6",
+ "babel-eslint": "^6.0.0",
"babel-preset-es2015": "^6.6.0",
"babel-register": "^6.7.2",
"gulp": "^3.9.0",
"gulp-cached": "^1.1.0",
- "gulp-connect": "^3.2.0",
+ "gulp-connect": "^3.2.2",
"gulp-environments": "^0.1.1",
"gulp-eslint": "^2.0.0",
"gulp-html-replace": "^1.5.5",
[02/14] ignite git commit: IGNITE-2875 WIP
Posted by an...@apache.org.
IGNITE-2875 WIP
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/2eafd827
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/2eafd827
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/2eafd827
Branch: refs/heads/ignite-2875
Commit: 2eafd827052efd4208c40415b677b968d0d734b3
Parents: f374d01
Author: Andrey <an...@gridgain.com>
Authored: Mon Mar 28 15:47:01 2016 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Tue Mar 29 13:19:04 2016 +0700
----------------------------------------------------------------------
.../js/app/services/AgentMonitor.service.js | 31 +++++-----
.../src/main/js/controllers/sql-controller.js | 46 +++++++++------
.../src/main/js/serve/agent.js | 60 +++++++++----------
.../src/main/js/serve/browser.js | 62 ++++++++++----------
.../src/main/js/serve/routes/agent.js | 5 +-
.../src/main/js/serve/routes/profile.js | 7 +--
6 files changed, 106 insertions(+), 105 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/2eafd827/modules/control-center-web/src/main/js/app/services/AgentMonitor.service.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/services/AgentMonitor.service.js b/modules/control-center-web/src/main/js/app/services/AgentMonitor.service.js
index 590d72f..2b55030 100644
--- a/modules/control-center-web/src/main/js/app/services/AgentMonitor.service.js
+++ b/modules/control-center-web/src/main/js/app/services/AgentMonitor.service.js
@@ -80,12 +80,14 @@ class IgniteAgentMonitor {
this._socketFactory = socketFactory;
this._$q = $q;
+
+ this._$common = $common;
}
/**
* @private
*/
- _checkModal() {
+ checkModal() {
if (this._scope.showModal && !this._scope.hasAgents)
this._downloadAgentModal.$promise.then(this._downloadAgentModal.show);
else if ((this._scope.hasAgents || !this._scope.showModal) && this._downloadAgentModal.$isShown)
@@ -100,7 +102,7 @@ class IgniteAgentMonitor {
return this._$q.when();
if (this._scope.hasAgents !== null)
- this._checkModal();
+ this.checkModal();
const latch = this._$q.defer();
@@ -122,7 +124,7 @@ class IgniteAgentMonitor {
this._socket.on('agent:count', ({count}) => {
this._scope.hasAgents = count > 0;
- this._checkModal();
+ this.checkModal();
if (this._scope.hasAgents)
this._scope.$broadcast('agent:connected', true);
@@ -131,7 +133,7 @@ class IgniteAgentMonitor {
this._socket.on('disconnect', () => {
this._scope.hasAgents = false;
- this._checkModal();
+ this.checkModal();
});
}
@@ -211,6 +213,15 @@ class IgniteAgentMonitor {
}
/**
+ * @param {String} errMsg
+ */
+ showNodeError(errMsg) {
+ this._downloadAgentModal.show();
+
+ this._$common.showError(errMsg);
+ }
+
+ /**
*
* @param {String} event
* @param {Object} [args]
@@ -220,16 +231,6 @@ class IgniteAgentMonitor {
_rest(event, ...args) {
return this._downloadAgentModal.$promise
.then(() => this._emit(event, ...args))
- .then((res) => {
- this._downloadAgentModal.hide();
-
- return res;
- })
- .catch((err) => {
- this._downloadAgentModal.show();
-
- return this._$q.reject(err);
- });
}
/**
@@ -288,7 +289,7 @@ class IgniteAgentMonitor {
stopWatch() {
this._scope.showModal = false;
- this._checkModal();
+ this.checkModal();
this._scope.$broadcast('agent:connected', false);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/2eafd827/modules/control-center-web/src/main/js/controllers/sql-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/sql-controller.js b/modules/control-center-web/src/main/js/controllers/sql-controller.js
index 63dd31d..1ed3b87 100644
--- a/modules/control-center-web/src/main/js/controllers/sql-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/sql-controller.js
@@ -214,8 +214,7 @@ consoleModule.controller('sqlController', [
this.api = api;
},
enableGridMenu: false,
- exporterMenuCsv: false,
- exporterMenuPdf: false,
+ enableColumnMenus: false,
setRows: function(rows) {
this.height = Math.min(rows.length, 15) * 30 + 42 + 'px';
@@ -257,6 +256,8 @@ consoleModule.controller('sqlController', [
var _refreshFn = function() {
IgniteAgentMonitor.topology($scope.demo)
.then(function(clusters) {
+ IgniteAgentMonitor.checkModal();
+
var caches = _.flattenDeep(clusters.map(function (cluster) { return cluster.caches; }));
$scope.caches = _.sortBy(_.uniq(_.reject(caches, { mode: 'LOCAL' }), function (cache) {
@@ -265,8 +266,10 @@ consoleModule.controller('sqlController', [
_setActiveCache();
})
- .catch(_handleException)
- .finally(function() {
+ .catch(function (err) {
+ IgniteAgentMonitor.showNodeError(err.message)
+ })
+ .finally(function () {
$loading.finish('loading');
});
};
@@ -585,11 +588,16 @@ consoleModule.controller('sqlController', [
return retainedCols;
}
+ /**
+ * @param {Object} paragraph Query
+ * @param {{fieldsMetadata: Array, items: Array, queryId: int, last: Boolean}} res Query results.
+ * @private
+ */
var _processQueryResult = function (paragraph, res) {
var prevKeyCols = paragraph.chartKeyCols;
var prevValCols = paragraph.chartValCols;
- if (!_.eq(paragraph.meta, res.meta)) {
+ if (!_.eq(paragraph.meta, res.fieldsMetadata)) {
paragraph.meta = [];
paragraph.chartColumns = [];
@@ -600,17 +608,17 @@ consoleModule.controller('sqlController', [
if (!$common.isDefined(paragraph.chartValCols))
paragraph.chartValCols = [];
- if (res.meta.length <= 2) {
- var _key = _.find(res.meta, {fieldName: '_KEY'});
- var _val = _.find(res.meta, {fieldName: '_VAL'});
+ if (res.fieldsMetadata.length <= 2) {
+ var _key = _.find(res.fieldsMetadata, {fieldName: '_KEY'});
+ var _val = _.find(res.fieldsMetadata, {fieldName: '_VAL'});
- paragraph.disabledSystemColumns = (res.meta.length == 2 && _key && _val) ||
- (res.meta.length == 1 && (_key || _val));
+ paragraph.disabledSystemColumns = (res.fieldsMetadata.length == 2 && _key && _val) ||
+ (res.fieldsMetadata.length == 1 && (_key || _val));
}
paragraph.columnFilter = _columnFilter(paragraph);
- paragraph.meta = res.meta;
+ paragraph.meta = res.fieldsMetadata;
_rebuildColumns(paragraph);
}
@@ -619,16 +627,16 @@ consoleModule.controller('sqlController', [
paragraph.total = 0;
- paragraph.queryId = res.queryId;
+ paragraph.queryId = res.last ? null : res.queryId;
delete paragraph.errMsg;
// Prepare explain results for display in table.
- if (paragraph.queryArgs.type == "EXPLAIN" && res.rows) {
+ if (paragraph.queryArgs.type == "EXPLAIN" && res.items) {
paragraph.rows = [];
- res.rows.forEach(function (row, i) {
- var line = res.rows.length - 1 == i ? row[0] : row[0] + '\n';
+ res.items.forEach(function (row, i) {
+ var line = res.items.length - 1 == i ? row[0] : row[0] + '\n';
line.replace(/\"/g, '').split('\n').forEach(function (line) {
paragraph.rows.push([line]);
@@ -636,7 +644,7 @@ consoleModule.controller('sqlController', [
});
}
else
- paragraph.rows = res.rows;
+ paragraph.rows = res.items;
paragraph.gridOptions.setRows(paragraph.rows);
@@ -818,7 +826,7 @@ consoleModule.controller('sqlController', [
paragraph.total += paragraph.rows.length;
- paragraph.rows = res.rows;
+ paragraph.rows = res.items;
if (paragraph.chart()) {
if (paragraph.result == 'pie')
@@ -827,11 +835,11 @@ consoleModule.controller('sqlController', [
_updateChartsWithData(paragraph, _chartDatum(paragraph));
}
- paragraph.gridOptions.setRows(res.rows);
+ paragraph.gridOptions.setRows(paragraph.rows);
_showLoading(paragraph, false);
- if (res.queryId === null)
+ if (res.last)
delete paragraph.queryId;
})
.catch(function (errMsg) {
http://git-wip-us.apache.org/repos/asf/ignite/blob/2eafd827/modules/control-center-web/src/main/js/serve/agent.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/serve/agent.js b/modules/control-center-web/src/main/js/serve/agent.js
index ce04482..d6a195d 100644
--- a/modules/control-center-web/src/main/js/serve/agent.js
+++ b/modules/control-center-web/src/main/js/serve/agent.js
@@ -24,7 +24,7 @@
*/
module.exports = {
implements: 'agent-manager',
- inject: ['require(lodash)', 'require(ws)', 'require(fs)', 'require(path)', 'require(jszip)', 'require(socket.io)', 'require(apache-ignite)', 'settings', 'mongo']
+ inject: ['require(lodash)', 'require(ws)', 'require(fs)', 'require(path)', 'require(jszip)', 'require(socket.io)', 'settings', 'mongo']
};
/**
@@ -34,12 +34,11 @@ module.exports = {
* @param path
* @param JSZip
* @param socketio
- * @param apacheIgnite
* @param settings
* @param mongo
* @returns {AgentManager}
*/
-module.exports.factory = function(_, ws, fs, path, JSZip, socketio, apacheIgnite, settings, mongo) {
+module.exports.factory = function(_, ws, fs, path, JSZip, socketio, settings, mongo) {
/**
*
*/
@@ -221,20 +220,6 @@ module.exports.factory = function(_, ws, fs, path, JSZip, socketio, apacheIgnite
/**
*
- * @param res
- * @return {{meta: Array, rows: Array, queryId: int}}
- * @private
- */
- static _onQueryResult(res) {
- return {
- meta: res.fieldsMetadata,
- rows: res.items,
- queryId: res.last ? null : res.queryId
- }
- }
-
- /**
- *
* @param {Boolean} demo Is need run command on demo node.
* @param {String} cacheName Cache name.
* @param {String} query Query.
@@ -247,8 +232,7 @@ module.exports.factory = function(_, ws, fs, path, JSZip, socketio, apacheIgnite
.addParam('qry', query)
.addParam('pageSize', pageSize);
- return this.executeRest(cmd)
- .then(Agent._onQueryResult);
+ return this.executeRest(cmd);
}
/**
@@ -263,11 +247,9 @@ module.exports.factory = function(_, ws, fs, path, JSZip, socketio, apacheIgnite
.addParam('cacheName', cacheName)
.addParam('pageSize', pageSize);
- return this.executeRest(cmd)
- .then(Agent._onQueryResult);
+ return this.executeRest(cmd);
}
-
/**
* @param {Boolean} demo Is need run command on demo node.
* @param {int} queryId Query Id.
@@ -279,15 +261,31 @@ module.exports.factory = function(_, ws, fs, path, JSZip, socketio, apacheIgnite
.addParam('qryId', queryId)
.addParam('pageSize', pageSize);
- return this.executeRest(cmd)
- .then(Agent._onQueryResult);
+ return this.executeRest(cmd);
}
/**
- * @returns {apacheIgnite.Ignite}
+ * @param {Boolean} demo Is need run command on demo node.
+ * @param {int} queryId Query Id.
+ * @returns {Promise}
*/
- ignite(demo) {
- return demo ? this._demo : this._cluster;
+ queryClose(demo, queryId) {
+ var cmd = new Command(demo, 'qrycls')
+ .addParam('qryId', queryId);
+
+ return this.executeRest(cmd);
+ }
+
+ /**
+ * @param {Boolean} demo Is need run command on demo node.
+ * @param {String} cacheName Cache name.
+ * @returns {Promise}
+ */
+ metadata(demo, cacheName) {
+ var cmd = new Command(demo, 'metadata')
+ .addParam('cacheName', cacheName);
+
+ return this.executeRest(cmd);
}
}
@@ -395,7 +393,7 @@ module.exports.factory = function(_, ws, fs, path, JSZip, socketio, apacheIgnite
this._server = srv;
/**
- * @type {WebSocketServer}
+ * @type {socketIo.Server}
*/
this._socket = socketio(this._server);
@@ -467,12 +465,12 @@ module.exports.factory = function(_, ws, fs, path, JSZip, socketio, apacheIgnite
*/
findAgent(userId) {
if (!this._server)
- return Promise.reject('Agent server not started yet!');
+ throw new Error('Agent server not started yet!');
const agents = this._agents[userId];
if (!agents || agents.length === 0)
- return Promise.reject('Failed to connect to agent');
+ throw new Error('Failed to connect to agent');
return Promise.resolve(agents[0]);
}
@@ -483,7 +481,7 @@ module.exports.factory = function(_, ws, fs, path, JSZip, socketio, apacheIgnite
*/
close(userId) {
if (!this._server)
- throw 'Agent server not started yet!';
+ return;
const agents = this._agents[userId];
http://git-wip-us.apache.org/repos/asf/ignite/blob/2eafd827/modules/control-center-web/src/main/js/serve/browser.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/serve/browser.js b/modules/control-center-web/src/main/js/serve/browser.js
index c269d7d..678ebf9 100644
--- a/modules/control-center-web/src/main/js/serve/browser.js
+++ b/modules/control-center-web/src/main/js/serve/browser.js
@@ -24,12 +24,16 @@
*/
module.exports = {
implements: 'browser-manager',
- inject: ['require(lodash)', 'require(socket.io)', 'require(apache-ignite)', 'agent-manager', 'configure']
+ inject: ['require(lodash)', 'require(socket.io)', 'agent-manager', 'configure']
};
-module.exports.factory = (_, socketio, apacheIgnite, agentMgr, configure) => {
- const SqlFieldsQuery = apacheIgnite.SqlFieldsQuery;
- const ScanQuery = apacheIgnite.ScanQuery;
+module.exports.factory = (_, socketio, agentMgr, configure) => {
+ const _errorToJson = (err) => {
+ return {
+ message: err.message,
+ code: err.code || 1
+ }
+ };
return {
attach: (server) => {
@@ -45,7 +49,7 @@ module.exports.factory = (_, socketio, apacheIgnite, agentMgr, configure) => {
agentMgr.findAgent(user._id)
.then((agent) => agent.availableDrivers())
.then((drivers) => cb(null, drivers))
- .catch((errMsg) => cb(errMsg));
+ .catch((err) => cb(_errorToJson(err)));
});
// Return schemas from database to browser.
@@ -57,7 +61,7 @@ module.exports.factory = (_, socketio, apacheIgnite, agentMgr, configure) => {
return agent.metadataSchemas(preset.jdbcDriverJar, preset.jdbcDriverClass, preset.jdbcUrl, jdbcInfo);
})
.then((schemas) => cb(null, schemas))
- .catch((errMsg) => cb(errMsg));
+ .catch((err) => cb(_errorToJson(err)));
});
// Return tables from database to browser.
@@ -70,7 +74,7 @@ module.exports.factory = (_, socketio, apacheIgnite, agentMgr, configure) => {
preset.schemas, preset.tablesOnly);
})
.then((tables) => cb(null, tables))
- .catch((errMsg) => cb(errMsg));
+ .catch((err) => cb(_errorToJson(err)));
});
// Return topology command result from grid to browser.
@@ -78,19 +82,15 @@ module.exports.factory = (_, socketio, apacheIgnite, agentMgr, configure) => {
agentMgr.findAgent(user._id)
.then((agent) => agent.topology(demo, attr, mtr))
.then((clusters) => cb(null, clusters))
- .catch((err) => cb(err));
+ .catch((err) => cb(_errorToJson(err)));
});
// Close query on node.
socket.on('node:query:close', (args, cb) => {
agentMgr.findAgent(user._id)
- .then((agent) => {
- const cache = agent.ignite(args.demo).cache(args.cacheName);
-
- return cache.__createPromise(cache._createCommand('qrycls').addParam('qryId', args.queryId));
- })
+ .then((agent) => agent.queryClose(args.demo, args.queryId))
.then(() => cb())
- .catch((err) => cb(err));
+ .catch((err) => cb(_errorToJson(err)));
});
// Execute query on node and return first page to browser.
@@ -103,7 +103,7 @@ module.exports.factory = (_, socketio, apacheIgnite, agentMgr, configure) => {
return agent.fieldsQuery(args.demo, args.cacheName, args.query, args.pageSize);
})
.then((res) => cb(null, res))
- .catch((err) => cb(err));
+ .catch((err) => cb(_errorToJson(err)));
});
// Fetch next page for query and return result to browser.
@@ -111,7 +111,7 @@ module.exports.factory = (_, socketio, apacheIgnite, agentMgr, configure) => {
agentMgr.findAgent(user._id)
.then((agent) => agent.queryFetch(args.demo, args.queryId, args.pageSize))
.then((res) => cb(null, res))
- .catch((err) => cb(err));
+ .catch((err) => cb(_errorToJson(err)));
});
// Execute query on node and return full result to browser.
@@ -121,36 +121,34 @@ module.exports.factory = (_, socketio, apacheIgnite, agentMgr, configure) => {
agentMgr.findAgent(user._id)
.then((agent) => {
- if (args.type === 'SCAN')
- return agent.scan(args.demo, args.cacheName, pageSize);
+ const firstPage = args.type === 'SCAN' ? agent.scan(args.demo, args.cacheName, pageSize)
+ : agent.fieldsQuery(args.demo, args.cacheName, args.query, pageSize);
- return agent.fieldsQuery(args.demo, args.cacheName, args.query, pageSize);
- })
- .then((res) => {
- const fetchResult = (fullRes) => {
- if (fullRes.last)
- return fullRes;
+ const fetchResult = (acc) => {
+ if (!acc.queryId)
+ return acc;
- return agent.queryFetch(args.demo, args.queryId, pageSize)
+ return agent.queryFetch(args.demo, acc.queryId, pageSize)
.then((res) => {
- fullRes.rows = fullRes.rows.concat(res.rows);
+ acc.rows = acc.rows.concat(res.rows);
- fullRes.last = res.last;
+ acc.last = res.last;
- return fetchResult(fullRes);
+ return fetchResult(acc);
})
};
- return fetchResult(res);
+ return firstPage
+ .then(fetchResult)
})
.then((res) => cb(null, res))
- .catch((errMsg) => cb(errMsg));
+ .catch((err) => cb(_errorToJson(err)));
});
// Return cache metadata from all nodes in grid.
socket.on('node:cache:metadata', (args, cb) => {
agentMgr.findAgent(user._id)
- .then((agent) => agent.ignite(args.demo).cache(args.cacheName).metadata())
+ .then((agent) => agent.metadata(args.demo, args.cacheName))
.then((caches) => {
let types = [];
@@ -234,7 +232,7 @@ module.exports.factory = (_, socketio, apacheIgnite, agentMgr, configure) => {
return cb(null, types);
})
- .catch((errMsg) => cb(errMsg));
+ .catch((err) => cb(_errorToJson(err)));
});
const count = agentMgr.addAgentListener(user._id, socket);
http://git-wip-us.apache.org/repos/asf/ignite/blob/2eafd827/modules/control-center-web/src/main/js/serve/routes/agent.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/serve/routes/agent.js b/modules/control-center-web/src/main/js/serve/routes/agent.js
index 1d46170..8fd8b75 100644
--- a/modules/control-center-web/src/main/js/serve/routes/agent.js
+++ b/modules/control-center-web/src/main/js/serve/routes/agent.js
@@ -21,20 +21,19 @@
module.exports = {
implements: 'agent-routes',
- inject: ['require(lodash)', 'require(express)', 'require(fs)', 'require(jszip)', 'require(apache-ignite)', 'settings', 'agent-manager']
+ inject: ['require(lodash)', 'require(express)', 'require(fs)', 'require(jszip)', 'settings', 'agent-manager']
};
/**
* @param _
* @param express
- * @param apacheIgnite
* @param fs
* @param JSZip
* @param settings
* @param {AgentManager} agentMgr
* @returns {Promise}
*/
-module.exports.factory = function(_, express, fs, JSZip, apacheIgnite, settings, agentMgr) {
+module.exports.factory = function(_, express, fs, JSZip, settings, agentMgr) {
return new Promise((resolveFactory) => {
const router = new express.Router();
http://git-wip-us.apache.org/repos/asf/ignite/blob/2eafd827/modules/control-center-web/src/main/js/serve/routes/profile.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/serve/routes/profile.js b/modules/control-center-web/src/main/js/serve/routes/profile.js
index 13ad045..5e4278f 100644
--- a/modules/control-center-web/src/main/js/serve/routes/profile.js
+++ b/modules/control-center-web/src/main/js/serve/routes/profile.js
@@ -79,13 +79,10 @@ module.exports.factory = function(_, express, mongo, agentMgr) {
});
})
.then((user) => {
- if (!params.token || user.token !== params.token)
+ if (params.token && user.token !== params.token)
agentMgr.close(user._id);
- for (const param in params) {
- if (params.hasOwnProperty(param))
- user[param] = params[param];
- }
+ _.extend(user, params);
return user.save();
})
[04/14] ignite git commit: IGNITE-2875 WIP
Posted by an...@apache.org.
IGNITE-2875 WIP
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/7b162cd2
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/7b162cd2
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/7b162cd2
Branch: refs/heads/ignite-2875
Commit: 7b162cd28e2b7a85253f49e59aeb40847ccbe284
Parents: ca6c0cb
Author: Andrey <an...@gridgain.com>
Authored: Tue Mar 29 16:03:01 2016 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Tue Mar 29 16:03:01 2016 +0700
----------------------------------------------------------------------
.../src/main/js/serve/agent.js | 22 ++++++++++----------
1 file changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/7b162cd2/modules/control-center-web/src/main/js/serve/agent.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/serve/agent.js b/modules/control-center-web/src/main/js/serve/agent.js
index d6a195d..11d4292 100644
--- a/modules/control-center-web/src/main/js/serve/agent.js
+++ b/modules/control-center-web/src/main/js/serve/agent.js
@@ -143,13 +143,13 @@ module.exports.factory = function(_, ws, fs, path, JSZip, socketio, settings, mo
params[param.key] = param.value;
return new Promise((resolve, reject) => {
- this._emit('node:rest', {uri: 'ignite', params, demo: cmd._demo, method: 'GET'}, (error, restResult) => {
+ this._emit('node:rest', {uri: 'ignite', params, demo: cmd._demo, method: 'GET'}, (error, res) => {
if (error)
return reject(new Error(error));
- error = restResult.error;
+ error = res.error;
- const code = restResult.code;
+ const code = res.code;
if (code === 401)
return reject(Error('Failed to authenticate on node.', 2));
@@ -158,12 +158,12 @@ module.exports.factory = function(_, ws, fs, path, JSZip, socketio, settings, mo
return reject(new Error(error || 'Failed connect to node and execute REST command.'));
try {
- const response = JSON.parse(restResult.data);
+ const msg = JSON.parse(res.data);
- if (response.successStatus === 0)
- return resolve(response.response);
+ if (msg.successStatus === 0)
+ return resolve(msg.response);
- reject(new Error(response.error, response.successStatus));
+ reject(new Error(msg.error, msg.successStatus));
}
catch (e) {
return reject(e);
@@ -184,16 +184,16 @@ module.exports.factory = function(_, ws, fs, path, JSZip, socketio, settings, mo
}
/**
- * @param {String} driverPath
- * @param {String} driverClass
+ * @param {String} drvPath
+ * @param {String} drvClass
* @param {String} url
* @param {Object} info
* @param {Array} schemas
* @param {Boolean} tablesOnly
* @returns {Promise} Promise on list of tables (see org.apache.ignite.schema.parser.DbTable java class)
*/
- metadataTables(driverPath, driverClass, url, info, schemas, tablesOnly) {
- return this.executeAgent('schemaImport:metadata', {driverPath, driverClass, url, info, schemas, tablesOnly});
+ metadataTables(drvPath, drvClass, url, info, schemas, tablesOnly) {
+ return this.executeAgent('schemaImport:metadata', {drvPath, drvClass, url, info, schemas, tablesOnly});
}
/**
[11/14] ignite git commit: Merge remote-tracking branch
'origin/ignite-2875' into ignite-2875
Posted by an...@apache.org.
Merge remote-tracking branch 'origin/ignite-2875' into ignite-2875
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/7af8faeb
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/7af8faeb
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/7af8faeb
Branch: refs/heads/ignite-2875
Commit: 7af8faeb92f4956259949161299fe1bdd7219664
Parents: eb4377c 6925671
Author: Andrey <an...@gridgain.com>
Authored: Wed Mar 30 14:58:41 2016 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Wed Mar 30 14:58:41 2016 +0700
----------------------------------------------------------------------
----------------------------------------------------------------------
[03/14] ignite git commit: Merge branch 'web-console-staging' of
https://github.com/gridgain/apache-ignite into ignite-2875
Posted by an...@apache.org.
Merge branch 'web-console-staging' of https://github.com/gridgain/apache-ignite into ignite-2875
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/ca6c0cb1
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/ca6c0cb1
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/ca6c0cb1
Branch: refs/heads/ignite-2875
Commit: ca6c0cb1ea5e2bd29509485f1daaf34a1c92fc92
Parents: 2eafd82 3b40bd7
Author: Andrey <an...@gridgain.com>
Authored: Tue Mar 29 15:34:30 2016 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Tue Mar 29 15:34:30 2016 +0700
----------------------------------------------------------------------
.../src/main/js/app/modules/form/form.module.js | 2 -
.../validator/igfs-path-unique.directive.js | 46 --------------------
.../modules/form/validator/unique.directive.js | 7 ++-
.../modules/states/configuration/igfs/misc.jade | 7 +--
.../src/main/js/controllers/common-module.js | 2 +-
.../src/main/js/controllers/igfs-controller.js | 4 --
6 files changed, 10 insertions(+), 58 deletions(-)
----------------------------------------------------------------------
[14/14] ignite git commit: IGNITE-2875 WIP
Posted by an...@apache.org.
IGNITE-2875 WIP
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/dde08f39
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/dde08f39
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/dde08f39
Branch: refs/heads/ignite-2875
Commit: dde08f391e85307e8ce176e052eeec6153f5a5fd
Parents: 57d7df6
Author: Andrey <an...@gridgain.com>
Authored: Thu Mar 31 14:27:18 2016 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Thu Mar 31 14:27:18 2016 +0700
----------------------------------------------------------------------
.../src/main/js/app/services/AgentMonitor.service.js | 2 +-
modules/control-center-web/src/main/js/serve/agent.js | 14 +++++++-------
.../control-center-web/src/main/js/serve/browser.js | 6 +++---
3 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/dde08f39/modules/control-center-web/src/main/js/app/services/AgentMonitor.service.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/services/AgentMonitor.service.js b/modules/control-center-web/src/main/js/app/services/AgentMonitor.service.js
index 2b55030..0f926a7 100644
--- a/modules/control-center-web/src/main/js/app/services/AgentMonitor.service.js
+++ b/modules/control-center-web/src/main/js/app/services/AgentMonitor.service.js
@@ -230,7 +230,7 @@ class IgniteAgentMonitor {
*/
_rest(event, ...args) {
return this._downloadAgentModal.$promise
- .then(() => this._emit(event, ...args))
+ .then(() => this._emit(event, ...args));
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/dde08f39/modules/control-center-web/src/main/js/serve/agent.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/serve/agent.js b/modules/control-center-web/src/main/js/serve/agent.js
index 11d4292..a5dbe8c 100644
--- a/modules/control-center-web/src/main/js/serve/agent.js
+++ b/modules/control-center-web/src/main/js/serve/agent.js
@@ -73,7 +73,7 @@ module.exports.factory = function(_, ws, fs, path, JSZip, socketio, settings, mo
this._params.push({key, value});
return this;
- };
+ }
}
/**
@@ -211,7 +211,7 @@ module.exports.factory = function(_, ws, fs, path, JSZip, socketio, settings, mo
* @returns {Promise}
*/
topology(demo, attr, mtr) {
- var cmd = new Command(demo, 'top')
+ const cmd = new Command(demo, 'top')
.addParam('attr', attr !== false)
.addParam('mtr', !!mtr);
@@ -227,7 +227,7 @@ module.exports.factory = function(_, ws, fs, path, JSZip, socketio, settings, mo
* @returns {Promise}
*/
fieldsQuery(demo, cacheName, query, pageSize) {
- var cmd = new Command(demo, 'qryfldexe')
+ const cmd = new Command(demo, 'qryfldexe')
.addParam('cacheName', cacheName)
.addParam('qry', query)
.addParam('pageSize', pageSize);
@@ -243,7 +243,7 @@ module.exports.factory = function(_, ws, fs, path, JSZip, socketio, settings, mo
* @returns {Promise}
*/
scan(demo, cacheName, pageSize) {
- var cmd = new Command(demo, 'qryscanexe')
+ const cmd = new Command(demo, 'qryscanexe')
.addParam('cacheName', cacheName)
.addParam('pageSize', pageSize);
@@ -257,7 +257,7 @@ module.exports.factory = function(_, ws, fs, path, JSZip, socketio, settings, mo
* @returns {Promise}
*/
queryFetch(demo, queryId, pageSize) {
- var cmd = new Command(demo, 'qryfetch')
+ const cmd = new Command(demo, 'qryfetch')
.addParam('qryId', queryId)
.addParam('pageSize', pageSize);
@@ -270,7 +270,7 @@ module.exports.factory = function(_, ws, fs, path, JSZip, socketio, settings, mo
* @returns {Promise}
*/
queryClose(demo, queryId) {
- var cmd = new Command(demo, 'qrycls')
+ const cmd = new Command(demo, 'qrycls')
.addParam('qryId', queryId);
return this.executeRest(cmd);
@@ -282,7 +282,7 @@ module.exports.factory = function(_, ws, fs, path, JSZip, socketio, settings, mo
* @returns {Promise}
*/
metadata(demo, cacheName) {
- var cmd = new Command(demo, 'metadata')
+ const cmd = new Command(demo, 'metadata')
.addParam('cacheName', cacheName);
return this.executeRest(cmd);
http://git-wip-us.apache.org/repos/asf/ignite/blob/dde08f39/modules/control-center-web/src/main/js/serve/browser.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/serve/browser.js b/modules/control-center-web/src/main/js/serve/browser.js
index 678ebf9..9eb66ea 100644
--- a/modules/control-center-web/src/main/js/serve/browser.js
+++ b/modules/control-center-web/src/main/js/serve/browser.js
@@ -32,7 +32,7 @@ module.exports.factory = (_, socketio, agentMgr, configure) => {
return {
message: err.message,
code: err.code || 1
- }
+ };
};
return {
@@ -135,11 +135,11 @@ module.exports.factory = (_, socketio, agentMgr, configure) => {
acc.last = res.last;
return fetchResult(acc);
- })
+ });
};
return firstPage
- .then(fetchResult)
+ .then(fetchResult);
})
.then((res) => cb(null, res))
.catch((err) => cb(_errorToJson(err)));
[05/14] ignite git commit: IGNITE-2755 Optimize gulp build tasks.
Posted by an...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/gulpfile.babel.js/index.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/gulpfile.babel.js/index.js b/modules/control-center-web/src/main/js/gulpfile.babel.js/index.js
new file mode 100644
index 0000000..f1c2e6a
--- /dev/null
+++ b/modules/control-center-web/src/main/js/gulpfile.babel.js/index.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.
+ */
+
+import gulp from 'gulp';
+import requireDir from 'require-dir';
+import sequence from 'gulp-sequence';
+
+// Require all tasks in gulpfile.js/tasks, including subfolders.
+requireDir('./tasks', { recurse: true });
+
+// Default no-arg task.
+gulp.task('default', ['build']);
+
+// Build + watch + connect task.
+gulp.task('watch', (cb) => sequence('build', 'connect', ['bundle:ignite:watch', 'sass:watch', 'jade:watch', 'copy:watch'], cb));
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/gulpfile.babel.js/paths.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/gulpfile.babel.js/paths.js b/modules/control-center-web/src/main/js/gulpfile.babel.js/paths.js
new file mode 100644
index 0000000..738d8f3
--- /dev/null
+++ b/modules/control-center-web/src/main/js/gulpfile.babel.js/paths.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 path from 'path';
+
+const root = path.dirname(__dirname);
+
+const srcDir = path.join(root, 'app');
+const destDir = path.join(root, 'build');
+
+const igniteModulesDir = process.env.IGNITE_MODULES ? path.normalize(process.env.IGNITE_MODULES) : path.join(root, 'ignite_modules');
+const igniteModulesTemp = path.join(root, 'ignite_modules_temp');
+
+export {
+ root,
+ srcDir,
+ destDir,
+ igniteModulesDir,
+ igniteModulesTemp
+};
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/build.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/build.js b/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/build.js
new file mode 100644
index 0000000..8396400
--- /dev/null
+++ b/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/build.js
@@ -0,0 +1,21 @@
+/*
+ * 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 gulp from 'gulp';
+import sequence from 'gulp-sequence';
+
+gulp.task('build', (cb) => sequence('clean', 'clean:ignite-modules-temp', 'ignite:modules', ['copy', 'jade', 'sass'], 'bundle', cb));
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/bundle.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/bundle.js b/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/bundle.js
new file mode 100644
index 0000000..cd9cd5f
--- /dev/null
+++ b/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/bundle.js
@@ -0,0 +1,75 @@
+/*
+ * 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 gulp from 'gulp';
+import jspm from 'jspm';
+import util from 'gulp-util';
+import sequence from 'gulp-sequence';
+import htmlReplace from 'gulp-html-replace';
+
+import { srcDir, destDir, igniteModulesTemp } from '../paths';
+
+const paths = [
+ './app/**/*.js',
+ './app/**/*.jade',
+ './app/data/*.json'
+];
+
+const options = {
+ minify: true
+};
+
+gulp.task('bundle', ['eslint', 'bundle:ignite']);
+
+// Package all external dependencies and ignite-console.
+gulp.task('bundle:ignite', (cb) => {
+ if (util.env.debug)
+ delete options.minify;
+
+ if (util.env.debug || util.env.sourcemaps)
+ options.sourceMaps = true;
+
+ if (util.env.debug)
+ return sequence('bundle:ignite:vendors', 'bundle:ignite:app', cb);
+
+ return sequence('bundle:ignite:app-min', 'bundle:ignite:app-min:replace', cb);
+});
+
+gulp.task('bundle:ignite:watch', () =>
+ gulp.watch(paths, ['bundle:ignite:app'])
+);
+
+gulp.task('bundle:ignite:vendors', () =>
+ jspm.bundle(`${srcDir}/index - [${srcDir}/**/*] - [./controllers/**/*] - [./helpers/**/*] - [./public/**/*!css] - [${igniteModulesTemp}/**/*] - [${igniteModulesTemp}/**/*!jade]`, `${destDir}/vendors.js`, options)
+);
+
+gulp.task('bundle:ignite:app', () =>
+ jspm.bundle(`${srcDir}/index - ${destDir}/vendors`, `${destDir}/app.js`, options)
+);
+
+gulp.task('bundle:ignite:app-min', () =>
+ jspm.bundleSFX(`${srcDir}/index`, `${destDir}/app.min.js`, options)
+);
+
+gulp.task('bundle:ignite:app-min:replace', () =>
+ gulp.src('./build/index.html')
+ .pipe(htmlReplace({
+ css: 'app.min.css',
+ js: 'app.min.js'
+ }))
+ .pipe(gulp.dest('./build'))
+);
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/clean.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/clean.js b/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/clean.js
new file mode 100644
index 0000000..4c821e8
--- /dev/null
+++ b/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/clean.js
@@ -0,0 +1,35 @@
+/*
+ * 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 gulp from 'gulp';
+import ignore from 'gulp-ignore';
+import clean from 'gulp-rimraf';
+
+import { destDir, igniteModulesTemp } from '../paths';
+
+// Clean build folder, remove files.
+gulp.task('clean', () =>
+ gulp.src(`${ destDir }/*`, {read: false})
+ .pipe(ignore('jspm_packages'))
+ .pipe(ignore('system.config.js'))
+ .pipe(clean({ force: true }))
+);
+
+gulp.task('clean:ignite-modules-temp', () =>
+ gulp.src(igniteModulesTemp, {read: false})
+ .pipe(clean({ force: true }))
+);
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/connect.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/connect.js b/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/connect.js
new file mode 100644
index 0000000..c7c9607
--- /dev/null
+++ b/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/connect.js
@@ -0,0 +1,36 @@
+/*
+ * 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 gulp from 'gulp';
+import connect from 'gulp-connect';
+import modrewrite from 'connect-modrewrite';
+
+import { destDir } from '../paths';
+
+// Task run static server to local development.
+gulp.task('connect', () => {
+ connect.server({
+ port: 8090,
+ root: [ destDir ],
+ middleware() {
+ return [modrewrite([
+ '^/api/v1/(.*)$ http://localhost:3000/$1 [P]'
+ ])];
+ },
+ fallback: `${destDir}/index.html`
+ });
+});
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/copy.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/copy.js b/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/copy.js
new file mode 100644
index 0000000..1de54bb
--- /dev/null
+++ b/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/copy.js
@@ -0,0 +1,90 @@
+/*
+ * 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 gulp from 'gulp';
+import util from 'gulp-util';
+import cache from 'gulp-cached';
+import sequence from 'gulp-sequence';
+
+import { destDir, igniteModulesDir, igniteModulesTemp } from '../paths';
+
+const paths = [
+ './app/**/**/*.js',
+ './controllers/*.js',
+ './controllers/**/*.js',
+ './helpers/*.js',
+ './helpers/**/*.js'
+];
+
+const resourcePaths = [
+ './controllers/**/*.json',
+ './public/**/*.png',
+ './public/*.ico'
+];
+
+const igniteModulePaths = [
+ igniteModulesTemp + '/**/main.js',
+ igniteModulesTemp + '/**/module.js',
+ igniteModulesTemp + '/**/app/modules/*.js',
+ igniteModulesTemp + '/**/app/modules/**/*.js',
+ igniteModulesTemp + '/**/controllers/*.js'
+];
+
+const igniteModuleResourcePaths = [
+ igniteModulesDir + '/**/controllers/models/*.json',
+ igniteModulesDir + '/**/images/*.png'
+];
+
+gulp.task('copy', function(cb) {
+ const tasks = ['copy:resource', 'copy:ignite_modules:resource'];
+
+ if (util.env.debug || util.env.sourcemaps) {
+ tasks.push('copy:js');
+
+ tasks.push('copy:ignite_modules:js');
+ }
+
+ return sequence(tasks, cb);
+});
+
+gulp.task('copy:js', () =>
+ gulp.src(paths, {base: './'})
+ .pipe(cache('copy:js'))
+ .pipe(gulp.dest(destDir))
+);
+
+gulp.task('copy:resource', () =>
+ gulp.src(resourcePaths)
+ .pipe(gulp.dest(destDir))
+);
+
+gulp.task('copy:ignite_modules:js', () =>
+ gulp.src(igniteModulePaths)
+ .pipe(cache('copy:ignite_modules:js'))
+ .pipe(gulp.dest(`${destDir}/${igniteModulesTemp}`))
+);
+
+gulp.task('copy:ignite_modules:resource', () =>
+ gulp.src(igniteModuleResourcePaths)
+ .pipe(gulp.dest(`${destDir}/ignite_modules`))
+);
+
+gulp.task('copy:watch', (cb) => {
+ gulp.watch([resourcePaths, igniteModuleResourcePaths], ['copy:resource', 'copy:ignite_modules:resource']);
+
+ gulp.watch([paths, igniteModulePaths], sequence('copy:js', 'copy:ignite_modules:js', cb));
+});
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/eslint.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/eslint.js b/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/eslint.js
new file mode 100644
index 0000000..cb49c64
--- /dev/null
+++ b/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/eslint.js
@@ -0,0 +1,43 @@
+/*
+ * 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 gulp from 'gulp';
+import cache from 'gulp-cached';
+import eslint from 'gulp-eslint';
+import sequence from 'gulp-sequence';
+
+const paths = [
+ './app/**/*.js',
+ './gulpfile.babel.js/**/*.js',
+ './gulpfile.babel.js/*.js'
+];
+
+gulp.task('eslint:node', () =>
+ gulp.src('./serve/**/*.js')
+ .pipe(cache('eslint:node'))
+ .pipe(eslint({envs: ['node']}))
+ .pipe(eslint.format())
+);
+
+gulp.task('eslint:browser', () =>
+ gulp.src(paths)
+ .pipe(cache('eslint:browser'))
+ .pipe(eslint({envs: ['browser']}))
+ .pipe(eslint.format())
+);
+
+gulp.task('eslint', (cb) => sequence('eslint:browser', 'eslint:node', cb));
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/ignite-modules.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/ignite-modules.js b/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/ignite-modules.js
new file mode 100644
index 0000000..2281683
--- /dev/null
+++ b/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/ignite-modules.js
@@ -0,0 +1,61 @@
+/*
+ * 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 gulp from 'gulp';
+import inject from 'gulp-inject';
+import clean from 'gulp-rimraf';
+import sequence from 'gulp-sequence';
+
+import { igniteModulesDir, igniteModulesTemp } from '../paths';
+
+const igniteModulePaths = [
+ igniteModulesDir + '/**/*.js',
+ igniteModulesDir + '/**/*.jade'
+];
+
+gulp.task('ignite:modules', (cb) => sequence('ignite:modules:copy', 'ignite:modules:inject', cb));
+
+gulp.task('ignite:modules:copy', () =>
+ gulp.src(igniteModulePaths)
+ .pipe(gulp.dest(igniteModulesTemp))
+);
+
+gulp.task('ignite:modules:inject', () =>
+ gulp.src(`${igniteModulesTemp}/index.js`)
+ .pipe(inject(gulp.src([`${igniteModulesTemp}/**/main.js`]), {
+ starttag: '/* ignite:modules */',
+ endtag: '/* endignite */',
+ transform: (filePath) => {
+ const igniteModuleName = filePath.replace(/.*ignite_modules_temp\/([^\/]+).*/mgi, '$1');
+
+ // return file contents as string
+ return `import './${igniteModuleName}/main';`;
+ }
+ }))
+ .pipe(inject(gulp.src([`${igniteModulesTemp}/**/main.js`]), {
+ starttag: '/* ignite-console:modules */',
+ endtag: '/* endignite */',
+ transform: (filePath, file, i) => {
+ const igniteModuleName = filePath.replace(/.*ignite_modules_temp\/([^\/]+).*/mgi, '$1');
+
+ // return file contents as string
+ return (i ? ',' : '') + `'ignite-console.${igniteModuleName}'`;
+ }
+ }))
+ .pipe(clean({ force: true }))
+ .pipe(gulp.dest(igniteModulesTemp))
+);
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/jade.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/jade.js b/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/jade.js
new file mode 100644
index 0000000..e203fc4
--- /dev/null
+++ b/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/jade.js
@@ -0,0 +1,54 @@
+/*
+ * 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 gulp from 'gulp';
+import gulpJade from 'gulp-jade';
+import sequence from 'gulp-sequence';
+
+import { igniteModulesDir, destDir } from '../paths';
+
+const paths = [
+ '!./views/error.jade',
+ './views/*.jade',
+ './views/**/*.jade'
+];
+
+const igniteModulePaths = [
+ igniteModulesDir + '/**/view/**/*.jade'
+];
+
+const jadeOptions = {
+ basedir: './'
+};
+
+gulp.task('jade', (cb) => sequence('jade:source', 'jade:ignite_modules', cb));
+
+gulp.task('jade:source', () =>
+ gulp.src(paths)
+ .pipe(gulpJade(jadeOptions))
+ .pipe(gulp.dest('./build'))
+);
+
+gulp.task('jade:ignite_modules', () =>
+ gulp.src(igniteModulePaths)
+ .pipe(gulpJade(jadeOptions))
+ .pipe(gulp.dest(`${destDir}/ignite_modules`))
+);
+
+gulp.task('jade:watch', (cb) =>
+ gulp.watch([igniteModulePaths, paths], () => sequence('jade', 'inject:plugins:html', cb))
+);
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/sass.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/sass.js b/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/sass.js
new file mode 100644
index 0000000..bd671b9
--- /dev/null
+++ b/modules/control-center-web/src/main/js/gulpfile.babel.js/tasks/sass.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 gulp from 'gulp';
+import sequence from 'gulp-sequence';
+import sass from 'gulp-sass';
+
+const paths = [
+ './public/stylesheets/style.scss'
+];
+
+gulp.task('sass', () =>
+ gulp.src(paths)
+ .pipe(sass({ outputStyle: 'nested' }).on('error', sass.logError))
+ .pipe(gulp.dest('./public/stylesheets'))
+);
+
+gulp.task('sass:watch', (cb) =>
+ gulp.watch(paths, () => sequence('sass', 'bundle', cb))
+);
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/gulpfile.js/index.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/gulpfile.js/index.js b/modules/control-center-web/src/main/js/gulpfile.js/index.js
deleted file mode 100644
index cf287e5..0000000
--- a/modules/control-center-web/src/main/js/gulpfile.js/index.js
+++ /dev/null
@@ -1,31 +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.
- */
-
-var gulp = require('gulp');
-var requireDir = require('require-dir');
-var sequence = require('gulp-sequence');
-
-// Require all tasks in gulpfile.js/tasks, including subfolders.
-requireDir('./tasks', { recurse: true });
-
-// Default no-arg task.
-gulp.task('default', ['build']);
-
-// Build + watch + connect task.
-gulp.task('watch', function (cb) {
- return sequence('build', 'connect', ['bundle:ignite:watch', 'bundle:legacy:watch', 'sass:watch', 'jade:watch', 'copy:watch'])(cb);
-});
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/gulpfile.js/tasks/build.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/gulpfile.js/tasks/build.js b/modules/control-center-web/src/main/js/gulpfile.js/tasks/build.js
deleted file mode 100644
index 195bdf4..0000000
--- a/modules/control-center-web/src/main/js/gulpfile.js/tasks/build.js
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var gulp = require('gulp');
-var sequence = require('gulp-sequence');
-
-gulp.task('build', function(cb) {
- return sequence('clean', ['copy', 'jade', 'sass'], 'bundle', 'inject:plugins', cb);
-});
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/gulpfile.js/tasks/bundle.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/gulpfile.js/tasks/bundle.js b/modules/control-center-web/src/main/js/gulpfile.js/tasks/bundle.js
deleted file mode 100644
index ce15b34..0000000
--- a/modules/control-center-web/src/main/js/gulpfile.js/tasks/bundle.js
+++ /dev/null
@@ -1,68 +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.
- */
-
-var gulp = require('gulp');
-var jspm = require('jspm');
-var util = require('gulp-util');
-var concat = require('gulp-concat');
-var sequence = require('gulp-sequence');
-
-var paths = [
- './app/**/*.js',
- './app/**/*.jade',
- './app/data/*.json'
-];
-
-var legacy_paths = [
- '!./controllers/common-module.js',
- './controllers/*.js',
- './controllers/**/*.js',
- './helpers/generator/*.js',
- './helpers/generator/**/*.js'
-];
-
-var options = {
- minify: true
-};
-
-gulp.task('bundle', ['eslint', 'bundle:ignite', 'bundle:legacy']);
-
-// Package all external dependencies and ignite-console.
-gulp.task('bundle:ignite', function() {
- if (util.env.debug)
- delete options.minify;
-
- if (util.env.debug || util.env.sourcemaps)
- options.sourceMaps = true;
-
- return jspm.bundleSFX('app/index', 'build/app.min.js', options);
-});
-
-// Package controllers and generators.
-gulp.task('bundle:legacy', function() {
- return gulp.src(legacy_paths)
- .pipe(concat('all.js'))
- .pipe(gulp.dest('./build'));
-});
-
-gulp.task('bundle:ignite:watch', function() {
- return gulp.watch(paths, ['bundle:ignite']);
-});
-
-gulp.task('bundle:legacy:watch', function() {
- return gulp.watch(legacy_paths, ['bundle:legacy']);
-});
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/gulpfile.js/tasks/clean.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/gulpfile.js/tasks/clean.js b/modules/control-center-web/src/main/js/gulpfile.js/tasks/clean.js
deleted file mode 100644
index 86cffae..0000000
--- a/modules/control-center-web/src/main/js/gulpfile.js/tasks/clean.js
+++ /dev/null
@@ -1,24 +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.
- */
-
-var gulp = require('gulp');
-var clean = require('gulp-rimraf');
-
-// Remove build folder.
-gulp.task('clean', function() {
- return gulp.src('./build', {read: false}).pipe(clean());
-});
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/gulpfile.js/tasks/connect.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/gulpfile.js/tasks/connect.js b/modules/control-center-web/src/main/js/gulpfile.js/tasks/connect.js
deleted file mode 100644
index d5ee738..0000000
--- a/modules/control-center-web/src/main/js/gulpfile.js/tasks/connect.js
+++ /dev/null
@@ -1,39 +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.
- */
-
-// task run static server to local development
-
-var gulp = require('gulp');
-var connect = require('gulp-connect');
-var modrewrite = require('connect-modrewrite');
-
-var options = {
- livereload: true,
- port: 8090,
- root: './build',
- middleware: function (connect, opt) {
- return [modrewrite([
- '^/api/v1/(.*)$ http://localhost:3000/$1 [P]'
- ])];
- },
- fallback: './build/index.html'
-};
-
-// task run static server to local development
-gulp.task('connect', function() {
- connect.server(options);
-});
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/gulpfile.js/tasks/copy.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/gulpfile.js/tasks/copy.js b/modules/control-center-web/src/main/js/gulpfile.js/tasks/copy.js
deleted file mode 100644
index 3caa82f..0000000
--- a/modules/control-center-web/src/main/js/gulpfile.js/tasks/copy.js
+++ /dev/null
@@ -1,100 +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.
- */
-
-var gulp = require('gulp');
-var util = require('gulp-util');
-var sequence = require('gulp-sequence');
-
-var igniteModules = process.env.IGNITE_MODULES || './ignite_modules';
-
-var paths = [
- './app/**/**/*.js'
-];
-
-var cssPaths = [
- 'jspm_packages/**/nvd3@*/build/nv.d3.css',
- 'jspm_packages/**/angular-tree-control@*/css/*.css',
- 'jspm_packages/**/ag-grid@*/dist/ag-grid.css',
- 'jspm_packages/**/angular-loading@*/angular-loading.css',
- 'jspm_packages/**/angular-motion@*/dist/angular-motion.css'
-];
-
-var legacyPaths = [
- './controllers/*.js',
- './controllers/**/*.js',
- './controllers/**/*.json',
- './helpers/*.js',
- './helpers/**/*.js',
- './public/**/*.png',
- './public/*.ico'
-];
-
-var igniteModulePaths = [
- igniteModules + '/**/main.js',
- igniteModules + '/**/app/modules/*.js',
- igniteModules + '/**/app/modules/**/*.js',
- igniteModules + '/**/controllers/*.js',
- igniteModules + '/**/controllers/models/*.json',
- igniteModules + '/**/images/*.png'
-];
-
-gulp.task('copy', function(cb) {
- var tasks = ['copy:legacy', 'copy:font-awesome', 'copy:ui-grid', 'copy:ignite_modules'];
-
- if (util.env.debug || util.env.sourcemaps) {
- tasks.push('copy:css');
-
- tasks.push('copy:base');
- }
-
- return sequence(tasks)(cb);
-});
-
-gulp.task('copy:base', function(cb) {
- return gulp.src(paths, {base: './'}).pipe(gulp.dest('./build'));
-});
-
-gulp.task('copy:legacy', function(cb) {
- return gulp.src(legacyPaths).pipe(gulp.dest('./build'));
-});
-
-gulp.task('copy:css', function(cb) {
- return gulp.src(cssPaths, {base: './'}).pipe(gulp.dest('./build'));
-});
-
-gulp.task('copy:font-awesome', function(cb) {
- return gulp.src('./node_modules/font-awesome/fonts/*', {base: './node_modules/font-awesome'}).pipe(gulp.dest('./build'));
-});
-
-gulp.task('copy:ui-grid', function(cb) {
- return gulp.src(['jspm_packages/**/*-ui-grid@*/*.woff',
- 'jspm_packages/**/*-ui-grid@*/*.svg',
- 'jspm_packages/**/*-ui-grid@*/*.ttf',
- 'jspm_packages/**/*-ui-grid@*/*.eot'], {base: './'}).pipe(gulp.dest('./build'));
-});
-
-gulp.task('copy:ignite_modules', function(cb) {
- return gulp.src(igniteModulePaths).pipe(gulp.dest('./build/ignite_modules'));
-});
-
-gulp.task('copy:watch', function(cb) {
- gulp.watch([legacyPaths, igniteModulePaths], function(glob) {
- sequence(['copy:base', 'copy:legacy', 'copy:ignite_modules'], 'inject:plugins:js')(cb);
- });
-
- gulp.watch(paths, ['copy:base']);
-});
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/gulpfile.js/tasks/eslint.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/gulpfile.js/tasks/eslint.js b/modules/control-center-web/src/main/js/gulpfile.js/tasks/eslint.js
deleted file mode 100644
index cddde1a..0000000
--- a/modules/control-center-web/src/main/js/gulpfile.js/tasks/eslint.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var gulp = require('gulp');
-var cache = require('gulp-cached');
-var sequence = require('gulp-sequence');
-
-var eslint = require('gulp-eslint');
-
-var paths = [
- './app/**/*.js'
-];
-
-gulp.task('eslint:node', function() {
- return gulp.src('./serve/**/*.js')
- .pipe(cache('eslint:node'))
- .pipe(eslint({envs: ['node']}))
- .pipe(eslint.format());
-});
-
-gulp.task('eslint:browser', function() {
- return gulp.src(paths)
- .pipe(cache('eslint:browser'))
- .pipe(eslint({envs: ['browser']}))
- .pipe(eslint.format());
-});
-
-gulp.task('eslint', function(cb) {
- return sequence('eslint:browser', 'eslint:node')(cb);
-});
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/gulpfile.js/tasks/inject-plugins.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/gulpfile.js/tasks/inject-plugins.js b/modules/control-center-web/src/main/js/gulpfile.js/tasks/inject-plugins.js
deleted file mode 100644
index bdac24c..0000000
--- a/modules/control-center-web/src/main/js/gulpfile.js/tasks/inject-plugins.js
+++ /dev/null
@@ -1,70 +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.
- */
-
-var gulp = require('gulp');
-var inject = require('gulp-inject');
-
-var common_options = {
- read: false
-};
-
-var html_targets = [
- './build/index.html'
-];
-
-var js_targets = [
- './build/common-module.js'
-];
-
-var js_sources = [
- './build/ignite_modules/**/main.js'
-];
-
-var html_sources = [
- './build/ignite_modules/**/main.js',
- './build/ignite_modules/**/app/modules/*.js',
- './build/ignite_modules/**/app/modules/*.js',
- './build/ignite_modules/**/app/modules/**/*.js'
-];
-
-gulp.task('inject:plugins:html', function() {
- gulp.src(html_targets)
- .pipe(inject(gulp.src(html_sources, common_options), {
- starttag: '<!-- ignite:plugins-->',
- endtag: '<!-- endignite-->',
- transform: function (filePath, file, i, length) {
- // return file contents as string
- return '<script src="' + filePath.replace(/\/build(.*)/mgi, '$1') + '"></script>';
- }
- }))
- .pipe(gulp.dest('./build'));
-});
-
-gulp.task('inject:plugins:js', function() {
- gulp.src(js_targets)
- .pipe(inject(gulp.src(js_sources, common_options), {
- starttag: '/* ignite:plugins */',
- endtag: ' /* endignite */',
- transform: function (filePath, file, i, length) {
- // return file contents as string
- return ", 'ignite-console." + filePath.replace(/.*ignite_modules\/([^\/]+).*/mgi, '$1') + "'";
- }
- }))
- .pipe(gulp.dest('./build'));
-});
-
-gulp.task('inject:plugins', ['inject:plugins:html', 'inject:plugins:js']);
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/gulpfile.js/tasks/jade.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/gulpfile.js/tasks/jade.js b/modules/control-center-web/src/main/js/gulpfile.js/tasks/jade.js
deleted file mode 100644
index 58a9bf5..0000000
--- a/modules/control-center-web/src/main/js/gulpfile.js/tasks/jade.js
+++ /dev/null
@@ -1,56 +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.
- */
-
-var gulp = require('gulp');
-var gulpJade = require('gulp-jade');
-var sequence = require('gulp-sequence');
-
-var igniteModules = process.env.IGNITE_MODULES || './ignite_modules';
-
-var paths = [
- '!./views/error.jade',
- './views/*.jade',
- './views/**/*.jade'
-];
-
-var igniteModulePaths = [
- igniteModules + '/**/view/**/*.jade'
-];
-
-var jadeOptions = {
- basedir: './'
-};
-
-gulp.task('jade', function(cb) {
- return sequence('jade:source', 'jade:ignite_modules')(cb)
-});
-
-gulp.task('jade:source', function (cb) {
- return gulp.src(paths).pipe(gulpJade(jadeOptions)).pipe(gulp.dest('./build'));
-});
-
-gulp.task('jade:ignite_modules', function (cb) {
- return gulp.src(igniteModulePaths)
- .pipe(gulpJade(jadeOptions))
- .pipe(gulp.dest('./build/ignite_modules'));
-});
-
-gulp.task('jade:watch', function (cb) {
- return gulp.watch([igniteModulePaths, paths], function(glob) {
- sequence('jade', 'inject:plugins:html')(cb)
- });
-});
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/gulpfile.js/tasks/production.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/gulpfile.js/tasks/production.js b/modules/control-center-web/src/main/js/gulpfile.js/tasks/production.js
deleted file mode 100644
index e682bcd..0000000
--- a/modules/control-center-web/src/main/js/gulpfile.js/tasks/production.js
+++ /dev/null
@@ -1,28 +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.
- */
-
-var gulp = require('gulp');
-var sequence = require('gulp-sequence');
-var environments = require('gulp-environments');
-
-var production = environments.production;
-
-gulp.task('set-prod', production.task);
-
-gulp.task('production', function(cb) {
- sequence('set-prod', 'build', cb)
-});
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/gulpfile.js/tasks/sass.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/gulpfile.js/tasks/sass.js b/modules/control-center-web/src/main/js/gulpfile.js/tasks/sass.js
deleted file mode 100644
index d50a91d..0000000
--- a/modules/control-center-web/src/main/js/gulpfile.js/tasks/sass.js
+++ /dev/null
@@ -1,36 +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.
- */
-
-var gulp = require('gulp');
-var gulpSequence = require('gulp-sequence');
-var sass = require('gulp-sass');
-
-var paths = [
- './public/stylesheets/style.scss'
-];
-
-gulp.task('sass', function () {
- return gulp.src(paths)
- .pipe(sass({ outputStyle: 'nested' }).on('error', sass.logError))
- .pipe(gulp.dest('./public/stylesheets'));
-});
-
-gulp.task('sass:watch', function (cb) {
- gulp.watch(paths, function(glob) {
- gulpSequence('sass', 'bundle')(cb)
- });
-});
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/helpers/common-utils.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/helpers/common-utils.js b/modules/control-center-web/src/main/js/helpers/common-utils.js
index f1d46fa..fb87c07 100644
--- a/modules/control-center-web/src/main/js/helpers/common-utils.js
+++ b/modules/control-center-web/src/main/js/helpers/common-utils.js
@@ -16,7 +16,7 @@
*/
// Entry point for common utils.
-$commonUtils = {};
+const $commonUtils = {};
/**
* @param v Value to check.
@@ -113,7 +113,4 @@ $commonUtils.randomString = function (len) {
return res;
};
-// For server side we should export Java code generation entry point.
-if (typeof window === 'undefined') {
- module.exports = $commonUtils;
-}
+export default $commonUtils;
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/helpers/data-structures.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/helpers/data-structures.js b/modules/control-center-web/src/main/js/helpers/data-structures.js
index c106acf..8959531 100644
--- a/modules/control-center-web/src/main/js/helpers/data-structures.js
+++ b/modules/control-center-web/src/main/js/helpers/data-structures.js
@@ -16,7 +16,7 @@
*/
// Entry point for common data structures.
-$dataStructures = {};
+const $dataStructures = {};
// Java build-in primitive.
$dataStructures.JAVA_BUILD_IN_PRIMITIVES = ['boolean', 'byte', 'double', 'float', 'int', 'long', 'short'];
@@ -81,3 +81,5 @@ $dataStructures.fullClassName = function (clsName) {
return clsName;
};
+
+export default $dataStructures;
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/helpers/generator/generator-common.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/helpers/generator/generator-common.js b/modules/control-center-web/src/main/js/helpers/generator/generator-common.js
index 227ef81..822be52 100644
--- a/modules/control-center-web/src/main/js/helpers/generator/generator-common.js
+++ b/modules/control-center-web/src/main/js/helpers/generator/generator-common.js
@@ -16,7 +16,7 @@
*/
// Entry point for common functions for code generation.
-$generatorCommon = {};
+const $generatorCommon = {};
// Add leading zero.
$generatorCommon.addLeadingZero = function (numberStr, minSize) {
@@ -524,3 +524,5 @@ $generatorCommon.dataForExampleConfigured = function(cluster) {
return _.find(cache.domains, {demo: true});
}));
};
+
+export default $generatorCommon;
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/helpers/generator/generator-docker.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/helpers/generator/generator-docker.js b/modules/control-center-web/src/main/js/helpers/generator/generator-docker.js
index 7e9721c..50a9923 100644
--- a/modules/control-center-web/src/main/js/helpers/generator/generator-docker.js
+++ b/modules/control-center-web/src/main/js/helpers/generator/generator-docker.js
@@ -16,7 +16,7 @@
*/
// Docker file generation entry point.
-$generatorDocker = {};
+const $generatorDocker = {};
// Generate from
$generatorDocker.from = function(cluster, version) {
@@ -50,3 +50,5 @@ $generatorDocker.ignoreFile = function() {
return 'target\n' +
'Dockerfile';
};
+
+export default $generatorDocker;
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/helpers/generator/generator-java.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/helpers/generator/generator-java.js b/modules/control-center-web/src/main/js/helpers/generator/generator-java.js
index bcf12ce..98f418a 100644
--- a/modules/control-center-web/src/main/js/helpers/generator/generator-java.js
+++ b/modules/control-center-web/src/main/js/helpers/generator/generator-java.js
@@ -16,7 +16,7 @@
*/
// Java generation entry point.
-$generatorJava = {};
+const $generatorJava = {};
/**
* Translate some value to valid java code.
@@ -3142,3 +3142,5 @@ $generatorJava.nodeStartup = function (cluster, pkg, cls, cfg, factoryCls, clien
return 'package ' + pkg + ';\n\n' + res.generateImports() + '\n\n' + res.generateStaticImports() + '\n\n' + res.asString();
};
+
+export default $generatorJava;
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/helpers/generator/generator-optional.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/helpers/generator/generator-optional.js b/modules/control-center-web/src/main/js/helpers/generator/generator-optional.js
index ad0d938..0e23f59 100644
--- a/modules/control-center-web/src/main/js/helpers/generator/generator-optional.js
+++ b/modules/control-center-web/src/main/js/helpers/generator/generator-optional.js
@@ -16,8 +16,10 @@
*/
// Optional content generation entry point.
-$generatorOptional = {};
+const $generatorOptional = {};
$generatorOptional.optionalContent = function (zip, cluster) {
// No-op.
};
+
+export default $generatorOptional;
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/helpers/generator/generator-pom.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/helpers/generator/generator-pom.js b/modules/control-center-web/src/main/js/helpers/generator/generator-pom.js
index f7bcf92..d653eb1 100644
--- a/modules/control-center-web/src/main/js/helpers/generator/generator-pom.js
+++ b/modules/control-center-web/src/main/js/helpers/generator/generator-pom.js
@@ -16,7 +16,7 @@
*/
// pom.xml generation entry point.
-$generatorPom = {};
+const $generatorPom = {};
$generatorPom.escapeId = function (s) {
if (typeof(s) !== 'string')
@@ -250,3 +250,5 @@ $generatorPom.pom = function (cluster, igniteVersion, mvnRepositories, res) {
return res;
};
+
+export default $generatorPom;
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/helpers/generator/generator-properties.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/helpers/generator/generator-properties.js b/modules/control-center-web/src/main/js/helpers/generator/generator-properties.js
index cf971da..cedc5a2 100644
--- a/modules/control-center-web/src/main/js/helpers/generator/generator-properties.js
+++ b/modules/control-center-web/src/main/js/helpers/generator/generator-properties.js
@@ -16,7 +16,7 @@
*/
// Properties generation entry point.
-$generatorProperties = {};
+const $generatorProperties = {};
$generatorProperties.jdbcUrlTemplate = function(dialect) {
switch (dialect) {
@@ -151,3 +151,5 @@ $generatorProperties.generateProperties = function (cluster, res) {
return res;
};
+
+export default $generatorProperties;
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/helpers/generator/generator-readme.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/helpers/generator/generator-readme.js b/modules/control-center-web/src/main/js/helpers/generator/generator-readme.js
index a204bf9..c4e2f81 100644
--- a/modules/control-center-web/src/main/js/helpers/generator/generator-readme.js
+++ b/modules/control-center-web/src/main/js/helpers/generator/generator-readme.js
@@ -16,7 +16,7 @@
*/
// README.txt generation entry point.
-$generatorReadme = {};
+const $generatorReadme = {};
$generatorReadme.generatedBy = function (res) {
res.line('Content of this folder was generated by Apache Ignite Web Console');
@@ -81,3 +81,5 @@ $generatorReadme.readmeJdbc = function (res) {
return res;
};
+
+export default $generatorReadme;
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/helpers/generator/generator-xml.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/helpers/generator/generator-xml.js b/modules/control-center-web/src/main/js/helpers/generator/generator-xml.js
index 64c5bd5..e78b116 100644
--- a/modules/control-center-web/src/main/js/helpers/generator/generator-xml.js
+++ b/modules/control-center-web/src/main/js/helpers/generator/generator-xml.js
@@ -16,7 +16,7 @@
*/
// XML generation entry point.
-$generatorXml = {};
+const $generatorXml = {};
// Do XML escape.
$generatorXml.escape = function (s) {
@@ -1757,3 +1757,5 @@ $generatorXml.cluster = function (cluster, clientNearCfg) {
return '';
};
+
+export default $generatorXml;
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/ignite_modules/index.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/ignite_modules/index.js b/modules/control-center-web/src/main/js/ignite_modules/index.js
new file mode 100644
index 0000000..1f0babb
--- /dev/null
+++ b/modules/control-center-web/src/main/js/ignite_modules/index.js
@@ -0,0 +1,10 @@
+import angular from 'angular';
+
+/* ignite:modules */
+/* endignite */
+
+angular
+.module('ignite-console.modules', [
+ /* ignite-console:modules */
+ /* endignite */
+]);
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/package.json
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/package.json b/modules/control-center-web/src/main/js/package.json
index a160801..691b933 100644
--- a/modules/control-center-web/src/main/js/package.json
+++ b/modules/control-center-web/src/main/js/package.json
@@ -22,31 +22,15 @@
},
"dependencies": {
"async": "1.5.2",
- "babel-eslint": "^6.0.0-beta.6",
"body-parser": "^1.15.0",
"bootstrap-sass": "^3.3.6",
"connect-modrewrite": "^0.9.0",
"connect-mongo": "^1.1.0",
"cookie-parser": "~1.4.0",
"debug": "~2.2.0",
- "ejs": "^2.3.4",
"express": "~4.13.3",
- "express-force-ssl": "^0.3.0",
"express-session": "^1.12.0",
"fire-up": "^0.4.4",
- "font-awesome": "^4.4.0",
- "gulp": "^3.9.0",
- "gulp-cached": "^1.1.0",
- "gulp-concat": "^2.6.0",
- "gulp-connect": "^3.2.0",
- "gulp-environments": "^0.1.1",
- "gulp-eslint": "^2.0.0",
- "gulp-inject": "^4.0.0",
- "gulp-jade": "^1.1.0",
- "gulp-rimraf": "^0.2.0",
- "gulp-sass": "^2.1.0",
- "gulp-sequence": "^0.4.1",
- "gulp-util": "^3.0.7",
"jade": "~1.11.0",
"jszip": "^2.5.0",
"lodash": "^4.0.0",
@@ -63,15 +47,36 @@
"ws": "^0.8.0"
},
"devDependencies": {
+ "babel-core": "^6.7.2",
+ "babel-eslint": "^6.0.0-beta.6",
+ "babel-preset-es2015": "^6.6.0",
+ "babel-register": "^6.7.2",
+ "gulp": "^3.9.0",
+ "gulp-cached": "^1.1.0",
+ "gulp-connect": "^3.2.0",
+ "gulp-environments": "^0.1.1",
+ "gulp-eslint": "^2.0.0",
+ "gulp-html-replace": "^1.5.5",
+ "gulp-ignore": "^2.0.1",
+ "gulp-inject": "^4.0.0",
+ "gulp-jade": "^1.1.0",
+ "gulp-rimraf": "^0.2.0",
+ "gulp-sass": "^2.1.0",
+ "gulp-sequence": "^0.4.1",
+ "gulp-util": "^3.0.7",
"jspm": "^0.16.31",
- "mocha": "^2.4.5",
- "morgan": "^1.6.1",
- "should": "^8.2.2",
+ "mocha": "~2.4.5",
+ "morgan": "~1.6.1",
+ "should": "~8.2.2",
"supertest": "^1.1.0"
},
"jspm": {
+ "directories": {
+ "packages": "build/jspm_packages"
+ },
+ "configFile": "build/system.config.js",
"dependencies": {
- "ace": "github:ajaxorg/ace-builds@^1.2.2",
+ "ace": "github:ajaxorg/ace-builds@1.2.3",
"angular": "github:angular/bower-angular@^1.5.0",
"angular-animate": "github:angular/bower-angular-animate@^1.5.0",
"angular-drag-and-drop-lists": "github:marceljuenemann/angular-drag-and-drop-lists@^1.3.0",
@@ -91,7 +96,7 @@
"bootstrap-carousel": "github:twbs/bootstrap@^3.3.6",
"css": "github:systemjs/plugin-css@^0.1.20",
"file-saver": "github:eligrey/FileSaver.js@master",
- "font-awesome": "npm:font-awesome@^4.4.0",
+ "font-awesome": "npm:font-awesome@4.5.0",
"jade": "github:johnsoftek/plugin-jade@^0.6.0",
"jquery": "github:components/jquery@^2.1.4",
"json": "github:systemjs/plugin-json@^0.1.0",
@@ -165,7 +170,8 @@
"dist/angular-nvd3": {
"deps": [
"d3",
- "nvd3"
+ "nvd3",
+ "nvd3/build/nv.d3.css!"
]
}
}
@@ -173,7 +179,7 @@
"github:components/jquery@2.1.4": {
"format": "global"
},
- "github:ajaxorg/ace-builds@1.2.2": {
+ "github:ajaxorg/ace-builds@1.2.3": {
"format": "global",
"main": "theme-chrome",
"shim": {
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/public/stylesheets/_font-awesome-custom.scss
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/public/stylesheets/_font-awesome-custom.scss b/modules/control-center-web/src/main/js/public/stylesheets/_font-awesome-custom.scss
index 8c041de..6ce9550 100644
--- a/modules/control-center-web/src/main/js/public/stylesheets/_font-awesome-custom.scss
+++ b/modules/control-center-web/src/main/js/public/stylesheets/_font-awesome-custom.scss
@@ -15,17 +15,17 @@
* limitations under the License.
*/
-@import "../../node_modules/font-awesome/scss/variables";
-$fa-font-path: "/fonts";
+@import "../../build/jspm_packages/npm/font-awesome@4.5.0/scss/variables";
+$fa-font-path: "/jspm_packages/npm/font-awesome@4.5.0/fonts";
-@import "../../node_modules/font-awesome/scss/mixins";
-@import "../../node_modules/font-awesome/scss/path";
-@import "../../node_modules/font-awesome/scss/core";
-@import "../../node_modules/font-awesome/scss/larger";
-@import "../../node_modules/font-awesome/scss/fixed-width";
-@import "../../node_modules/font-awesome/scss/list";
-@import "../../node_modules/font-awesome/scss/bordered-pulled";
-@import "../../node_modules/font-awesome/scss/animated";
-@import "../../node_modules/font-awesome/scss/rotated-flipped";
-@import "../../node_modules/font-awesome/scss/stacked";
-@import "../../node_modules/font-awesome/scss/icons";
+@import "../../build/jspm_packages/npm/font-awesome@4.5.0/scss/mixins";
+@import "../../build/jspm_packages/npm/font-awesome@4.5.0/scss/path";
+@import "../../build/jspm_packages/npm/font-awesome@4.5.0/scss/core";
+@import "../../build/jspm_packages/npm/font-awesome@4.5.0/scss/larger";
+@import "../../build/jspm_packages/npm/font-awesome@4.5.0/scss/fixed-width";
+@import "../../build/jspm_packages/npm/font-awesome@4.5.0/scss/list";
+@import "../../build/jspm_packages/npm/font-awesome@4.5.0/scss/bordered-pulled";
+@import "../../build/jspm_packages/npm/font-awesome@4.5.0/scss/animated";
+@import "../../build/jspm_packages/npm/font-awesome@4.5.0/scss/rotated-flipped";
+@import "../../build/jspm_packages/npm/font-awesome@4.5.0/scss/stacked";
+@import "../../build/jspm_packages/npm/font-awesome@4.5.0/scss/icons";
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b0ddb51/modules/control-center-web/src/main/js/views/index.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/index.jade b/modules/control-center-web/src/main/js/views/index.jade
index c62fb1b..37c49ad 100644
--- a/modules/control-center-web/src/main/js/views/index.jade
+++ b/modules/control-center-web/src/main/js/views/index.jade
@@ -15,7 +15,7 @@
limitations under the License.
doctype html
-html(ng-app='ignite-web-console' id='app')
+html(ng-app='ignite-console' id='app' ng-strict-di)
head
base(href='/')
link(rel='shortcut icon' href='favicon.ico')
@@ -30,14 +30,18 @@ html(ng-app='ignite-web-console' id='app')
meta(name='keywords' content='{{$meta.keywords}}')
meta(ng-repeat='(key, value) in $meta.properties' name='{{::key}}' content='{{::value}}')
- link(rel='stylesheet', href='/app.min.css')
-
- script(src='/common-utils.js')
- script(src='/app.min.js')
-
- script(src='/common-module.js')
- script(src='/data-structures.js')
- script(src='/all.js')
+ // build:css
+ link(rel='stylesheet', href='/vendors.css')
+ link(rel='stylesheet', href='/app.css')
+ // endbuild
+
+ // build:js
+ script(src='jspm_packages/system.js')
+ script(src='system.config.js')
+ script(src='vendors.js')
+ script(src='app.js')
+ script System.import('app/index');
+ // endbuild
// ignite:plugins
// endignite