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/09/08 04:46:39 UTC
[22/50] [abbrv] ignite git commit: Fixed wrong merge.
Fixed wrong merge.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/1bb10f90
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/1bb10f90
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/1bb10f90
Branch: refs/heads/ignite-3629
Commit: 1bb10f90595ae01f95e34f4f5e86718ff12907cf
Parents: 38f0e0a
Author: Maxim Afanasiev <ma...@gmail.com>
Authored: Fri Aug 26 16:41:32 2016 +0700
Committer: Maxim Afanasiev <ma...@gmail.com>
Committed: Fri Aug 26 16:42:01 2016 +0700
----------------------------------------------------------------------
.../web-console/src/main/js/app/app.config.js | 86 --------
.../main/js/app/controllers/auth.controller.js | 30 ---
.../js/app/controllers/notebooks.controller.js | 69 -------
.../controllers/reset-password.controller.js | 51 -----
.../js/app/directives/auto-focus.directive.js | 26 ---
.../directives/copy-to-clipboard.directive.js | 29 ---
.../main/js/app/directives/match.directive.js | 27 ---
.../app/directives/on-click-focus.directive.js | 26 ---
.../directives/on-enter-focus-move.directive.js | 29 ---
.../js/app/directives/on-escape.directive.js | 32 ---
.../js/app/filters/domainsValidation.filter.js | 33 ---
.../src/main/js/app/services/Clone.service.js | 64 ------
.../js/app/services/ConfirmBatch.service.js | 92 ---------
.../js/app/services/CopyToClipboard.service.js | 50 -----
.../src/main/js/app/services/Focus.service.js | 33 ---
.../main/js/app/services/LegacyTable.service.js | 205 -------------------
.../main/js/app/services/Messages.service.js | 63 ------
.../app/services/UnsavedChangesGuard.service.js | 38 ----
.../src/main/js/app/services/confirm.service.js | 0
modules/web-console/src/main/js/app/vendor.js | 54 -----
.../main/js/gulpfile.babel.js/webpack/common.js | 192 -----------------
.../webpack/environments/production.js | 45 ----
.../main/js/gulpfile.babel.js/webpack/index.js | 32 ---
.../webpack/plugins/progress.js | 82 --------
24 files changed, 1388 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/1bb10f90/modules/web-console/src/main/js/app/app.config.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/app.config.js b/modules/web-console/src/main/js/app/app.config.js
deleted file mode 100644
index 25c24b0..0000000
--- a/modules/web-console/src/main/js/app/app.config.js
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import alertTemplateUrl from '../views/templates/alert.jade';
-
-const igniteConsoleCfg = angular.module('ignite-console.config', ['ngAnimate', 'mgcrea.ngStrap']);
-
-// Configure AngularJS animation: do not animate fa-spin.
-igniteConsoleCfg.config(['$animateProvider', ($animateProvider) => {
- $animateProvider.classNameFilter(/^((?!(fa-spin)).)*$/);
-}]);
-
-// AngularStrap modal popup configuration.
-igniteConsoleCfg.config(['$modalProvider', ($modalProvider) => {
- angular.extend($modalProvider.defaults, {
- animation: 'am-fade-and-scale',
- html: true
- });
-}]);
-
-// AngularStrap popover configuration.
-igniteConsoleCfg.config(['$popoverProvider', ($popoverProvider) => {
- angular.extend($popoverProvider.defaults, {
- trigger: 'manual',
- placement: 'right',
- container: 'body',
- templateUrl: '/templates/validation-error.html'
- });
-}]);
-
-// AngularStrap tooltips configuration.
-igniteConsoleCfg.config(['$tooltipProvider', ($tooltipProvider) => {
- angular.extend($tooltipProvider.defaults, {
- container: 'body',
- delay: 150,
- placement: 'right',
- html: 'true',
- trigger: 'click hover'
- });
-}]);
-
-// AngularStrap select (combobox) configuration.
-igniteConsoleCfg.config(['$selectProvider', ($selectProvider) => {
- angular.extend($selectProvider.defaults, {
- container: 'body',
- maxLength: '5',
- allText: 'Select All',
- noneText: 'Clear All',
- templateUrl: '/templates/select.html',
- iconCheckmark: 'fa fa-check',
- caretHtml: ''
- });
-}]);
-
-// AngularStrap alerts configuration.
-igniteConsoleCfg.config(['$alertProvider', ($alertProvider) => {
- angular.extend($alertProvider.defaults, {
- container: 'body',
- placement: 'top-right',
- duration: '5',
- templateUrl: alertTemplateUrl,
- type: 'danger'
- });
-}]);
-
-
-// AngularStrap dropdowns () configuration.
-igniteConsoleCfg.config(['$dropdownProvider', ($dropdownProvider) => {
- angular.extend($dropdownProvider.defaults, {
- templateUrl: 'templates/dropdown.html'
- });
-}]);
http://git-wip-us.apache.org/repos/asf/ignite/blob/1bb10f90/modules/web-console/src/main/js/app/controllers/auth.controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/controllers/auth.controller.js b/modules/web-console/src/main/js/app/controllers/auth.controller.js
deleted file mode 100644
index 21ffeb8..0000000
--- a/modules/web-console/src/main/js/app/controllers/auth.controller.js
+++ /dev/null
@@ -1,30 +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.
- */
-
-// Sign in controller.
-// TODO IGNITE-1936 Refactor this controller.
-export default ['auth', [
- '$scope', 'IgniteFocus', 'IgniteCountries', 'Auth',
- ($scope, Focus, Countries, Auth) => {
- $scope.auth = Auth.auth;
- $scope.forgotPassword = Auth.forgotPassword;
- $scope.action = 'signin';
- $scope.countries = Countries.getAll();
-
- Focus.move('user_email');
- }
-]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/1bb10f90/modules/web-console/src/main/js/app/controllers/notebooks.controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/controllers/notebooks.controller.js b/modules/web-console/src/main/js/app/controllers/notebooks.controller.js
deleted file mode 100644
index 0440c46..0000000
--- a/modules/web-console/src/main/js/app/controllers/notebooks.controller.js
+++ /dev/null
@@ -1,69 +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.
- */
-
-// Controller that load notebooks in navigation bar .
-export default ['notebooks', [
- '$rootScope', '$scope', '$modal', '$state', '$http', 'IgniteMessages',
- ($root, $scope, $modal, $state, $http, Messages) => {
- $root.notebooks = [];
-
- // Pre-fetch modal dialogs.
- const _notebookNewModal = $modal({scope: $scope, templateUrl: '/sql/notebook-new.html', show: false});
-
- $root.rebuildDropdown = function() {
- $scope.notebookDropdown = [
- {text: 'Create new notebook', click: 'inputNotebookName()'},
- {divider: true}
- ];
-
- _.forEach($root.notebooks, (notebook) => $scope.notebookDropdown.push({
- text: notebook.name,
- sref: 'base.sql.notebook({noteId:"' + notebook._id + '"})'
- }));
- };
-
- $root.reloadNotebooks = function() {
- // When landing on the page, get clusters and show them.
- $http.post('/api/v1/notebooks/list')
- .success((data) => {
- $root.notebooks = data;
-
- $root.rebuildDropdown();
- })
- .error(Messages.showError);
- };
-
- $root.inputNotebookName = () => {
- _notebookNewModal.$promise.then(_notebookNewModal.show);
- };
-
- $root.createNewNotebook = (name) => {
- $http.post('/api/v1/notebooks/new', {name})
- .success((noteId) => {
- _notebookNewModal.hide();
-
- $root.reloadNotebooks();
-
- $state.go('base.sql.notebook', {noteId});
- })
- .error(Messages.showError);
- };
-
- $root.reloadNotebooks();
-
- }
-]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/1bb10f90/modules/web-console/src/main/js/app/controllers/reset-password.controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/controllers/reset-password.controller.js b/modules/web-console/src/main/js/app/controllers/reset-password.controller.js
deleted file mode 100644
index f3cee81..0000000
--- a/modules/web-console/src/main/js/app/controllers/reset-password.controller.js
+++ /dev/null
@@ -1,51 +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.
- */
-
-// Controller for password reset.
-export default ['resetPassword', [
- '$scope', '$modal', '$http', '$state', 'IgniteMessages', 'IgniteFocus',
- ($scope, $modal, $http, $state, Messages, Focus) => {
- if ($state.params.token) {
- $http.post('/api/v1/password/validate/token', {token: $state.params.token})
- .success((res) => {
- $scope.email = res.email;
- $scope.token = res.token;
- $scope.error = res.error;
-
- if ($scope.token && !$scope.error)
- Focus.move('user_password');
- });
- }
-
- // Try to reset user password for provided token.
- $scope.resetPassword = (reset_info) => {
- $http.post('/api/v1/password/reset', reset_info)
- .success(() => {
- Messages.showInfo('Password successfully changed');
-
- $state.go('base.configuration.clusters');
- })
- .error((err, state) => {
- Messages.showError(err);
-
- if (state === 503)
- $state.go('base.configuration.clusters');
- });
- };
-
- }
-]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/1bb10f90/modules/web-console/src/main/js/app/directives/auto-focus.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/auto-focus.directive.js b/modules/web-console/src/main/js/app/directives/auto-focus.directive.js
deleted file mode 100644
index 326fe1f..0000000
--- a/modules/web-console/src/main/js/app/directives/auto-focus.directive.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Directive to auto-focus specified element.
-export default ['igniteAutoFocus', ['$timeout', ($timeout) => {
- return {
- restrict: 'AC',
- link(scope, element) {
- $timeout(() => element[0].focus());
- }
- };
-}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/1bb10f90/modules/web-console/src/main/js/app/directives/copy-to-clipboard.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/copy-to-clipboard.directive.js b/modules/web-console/src/main/js/app/directives/copy-to-clipboard.directive.js
deleted file mode 100644
index ee2110e..0000000
--- a/modules/web-console/src/main/js/app/directives/copy-to-clipboard.directive.js
+++ /dev/null
@@ -1,29 +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.
- */
-
-// Directive for copy to clipboard.
-export default ['igniteCopyToClipboard', ['IgniteCopyToClipboard', (CopyToClipboard) => {
- return {
- restrict: 'A',
- link(scope, element, attrs) {
- element.bind('click', () => CopyToClipboard.copy(attrs.igniteCopyToClipboard));
-
- if (!document.queryCommandSupported('copy'))
- element.hide();
- }
- };
-}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/1bb10f90/modules/web-console/src/main/js/app/directives/match.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/match.directive.js b/modules/web-console/src/main/js/app/directives/match.directive.js
deleted file mode 100644
index 3a45f6d..0000000
--- a/modules/web-console/src/main/js/app/directives/match.directive.js
+++ /dev/null
@@ -1,27 +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.
- */
-
-// Directive to enable validation to match specified value.
-export default ['igniteMatch', ['$parse', ($parse) => {
- return {
- require: 'ngModel',
- link(scope, elem, attrs, ctrl) {
- scope.$watch(() => $parse(attrs.igniteMatch)(scope) === ctrl.$modelValue,
- (currentValue) => ctrl.$setValidity('mismatch', currentValue));
- }
- };
-}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/1bb10f90/modules/web-console/src/main/js/app/directives/on-click-focus.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/on-click-focus.directive.js b/modules/web-console/src/main/js/app/directives/on-click-focus.directive.js
deleted file mode 100644
index 5c9ee88..0000000
--- a/modules/web-console/src/main/js/app/directives/on-click-focus.directive.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Directive to describe element that should be focused on click.
-export default ['igniteOnClickFocus', ['IgniteFocus', (Focus) => {
- return function(scope, elem, attrs) {
- elem.on('click', () => Focus.move(attrs.igniteOnClickFocus));
-
- // Removes bound events in the element itself when the scope is destroyed
- scope.$on('$destroy', () => elem.off('click'));
- };
-}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/1bb10f90/modules/web-console/src/main/js/app/directives/on-enter-focus-move.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/on-enter-focus-move.directive.js b/modules/web-console/src/main/js/app/directives/on-enter-focus-move.directive.js
deleted file mode 100644
index 2dd2884..0000000
--- a/modules/web-console/src/main/js/app/directives/on-enter-focus-move.directive.js
+++ /dev/null
@@ -1,29 +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.
- */
-
-// Directive to move focus to specified element on ENTER key.
-export default ['igniteOnEnterFocusMove', ['IgniteFocus', (Focus) => {
- return function(scope, elem, attrs) {
- elem.on('keydown keypress', (event) => {
- if (event.which === 13) {
- event.preventDefault();
-
- Focus.move(attrs.igniteOnEnterFocusMove);
- }
- });
- };
-}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/1bb10f90/modules/web-console/src/main/js/app/directives/on-escape.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/on-escape.directive.js b/modules/web-console/src/main/js/app/directives/on-escape.directive.js
deleted file mode 100644
index aa1accd..0000000
--- a/modules/web-console/src/main/js/app/directives/on-escape.directive.js
+++ /dev/null
@@ -1,32 +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.
- */
-
-// Directive to bind ESC key press with some user action.
-export default ['igniteOnEscape', ['$timeout', ($timeout) => {
- return function(scope, elem, attrs) {
- elem.on('keydown keypress', (event) => {
- if (event.which === 27) {
- scope.$apply(() => $timeout(() => scope.$eval(attrs.igniteOnEscape)));
-
- event.preventDefault();
- }
- });
-
- // Removes bound events in the element itself when the scope is destroyed.
- scope.$on('$destroy', () => elem.off('keydown keypress'));
- };
-}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/1bb10f90/modules/web-console/src/main/js/app/filters/domainsValidation.filter.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/filters/domainsValidation.filter.js b/modules/web-console/src/main/js/app/filters/domainsValidation.filter.js
deleted file mode 100644
index 1a38392..0000000
--- a/modules/web-console/src/main/js/app/filters/domainsValidation.filter.js
+++ /dev/null
@@ -1,33 +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.
- */
-
-// Filter domain models with key fields configuration.
-export default ['domainsValidation', ['IgniteLegacyUtils', (LegacyUtils) => (domains, valid, invalid) => {
- if (valid && invalid)
- return domains;
-
- const out = [];
-
- _.forEach(domains, function(domain) {
- const _valid = !LegacyUtils.domainForStoreConfigured(domain) || LegacyUtils.isJavaBuiltInClass(domain.keyType) || !_.isEmpty(domain.keyFields);
-
- if (valid && _valid || invalid && !_valid)
- out.push(domain);
- });
-
- return out;
-}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/1bb10f90/modules/web-console/src/main/js/app/services/Clone.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/services/Clone.service.js b/modules/web-console/src/main/js/app/services/Clone.service.js
deleted file mode 100644
index 52a4e4e..0000000
--- a/modules/web-console/src/main/js/app/services/Clone.service.js
+++ /dev/null
@@ -1,64 +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.
- */
-
-// Service for clone objects.
-export default ['IgniteClone', ['$rootScope', '$q', '$modal', ($root, $q, $modal) => {
- const scope = $root.$new();
-
- let _names = [];
- let deferred;
- let _validator;
-
- function _nextAvailableName(name) {
- let num = 1;
- let tmpName = name;
-
- while (_.includes(_names, tmpName)) {
- tmpName = name + '_' + num.toString();
-
- num++;
- }
-
- return tmpName;
- }
-
- const cloneModal = $modal({templateUrl: '/templates/clone.html', scope, placement: 'center', show: false});
-
- scope.ok = function(newName) {
- if (!_validator || _validator(newName)) {
- deferred.resolve(_nextAvailableName(newName));
-
- cloneModal.hide();
- }
- };
-
- cloneModal.confirm = function(oldName, names, validator) {
- _names = names;
-
- scope.newName = _nextAvailableName(oldName);
-
- _validator = validator;
-
- deferred = $q.defer();
-
- cloneModal.$promise.then(cloneModal.show);
-
- return deferred.promise;
- };
-
- return cloneModal;
-}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/1bb10f90/modules/web-console/src/main/js/app/services/ConfirmBatch.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/services/ConfirmBatch.service.js b/modules/web-console/src/main/js/app/services/ConfirmBatch.service.js
deleted file mode 100644
index ef66335..0000000
--- a/modules/web-console/src/main/js/app/services/ConfirmBatch.service.js
+++ /dev/null
@@ -1,92 +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.
- */
-
-// Service for confirm or skip several steps.
-export default ['IgniteConfirmBatch', ['$rootScope', '$q', '$modal', ($root, $q, $modal) => {
- const scope = $root.$new();
-
- scope.confirmModal = $modal({
- templateUrl: '/templates/batch-confirm.html',
- scope,
- placement: 'center',
- show: false,
- backdrop: 'static',
- keyboard: false
- });
-
- const _done = (cancel) => {
- scope.confirmModal.hide();
-
- if (cancel)
- scope.deferred.reject('cancelled');
- else
- scope.deferred.resolve();
- };
-
- const _nextElement = (skip) => {
- scope.items[scope.curIx++].skip = skip;
-
- if (scope.curIx < scope.items.length)
- scope.content = scope.contentGenerator(scope.items[scope.curIx]);
- else
- _done();
- };
-
- scope.cancel = () => {
- _done(true);
- };
-
- scope.skip = (applyToAll) => {
- if (applyToAll) {
- for (let i = scope.curIx; i < scope.items.length; i++)
- scope.items[i].skip = true;
-
- _done();
- }
- else
- _nextElement(true);
- };
-
- scope.overwrite = (applyToAll) => {
- if (applyToAll)
- _done();
- else
- _nextElement(false);
- };
-
- return {
- /**
- * Show confirm all dialog.
- *
- * @param confirmMessageFn Function to generate a confirm message.
- * @param itemsToConfirm Array of element to process by confirm.
- */
- confirm(confirmMessageFn, itemsToConfirm) {
- scope.deferred = $q.defer();
-
- scope.contentGenerator = confirmMessageFn;
-
- scope.items = itemsToConfirm;
- scope.curIx = 0;
- scope.content = (scope.items && scope.items.length > 0) ? scope.contentGenerator(scope.items[0]) : null;
-
- scope.confirmModal.$promise.then(scope.confirmModal.show);
-
- return scope.deferred.promise;
- }
- };
-}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/1bb10f90/modules/web-console/src/main/js/app/services/CopyToClipboard.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/services/CopyToClipboard.service.js b/modules/web-console/src/main/js/app/services/CopyToClipboard.service.js
deleted file mode 100644
index 74c4764..0000000
--- a/modules/web-console/src/main/js/app/services/CopyToClipboard.service.js
+++ /dev/null
@@ -1,50 +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.
- */
-
-// Service to copy some value to OS clipboard.
-export default ['IgniteCopyToClipboard', ['$window', 'IgniteMessages', ($window, Messages) => {
- const body = angular.element($window.document.body);
-
- const textArea = angular.element('<textarea/>');
-
- textArea.css({
- position: 'fixed',
- opacity: '0'
- });
-
- return {
- copy(toCopy) {
- textArea.val(toCopy);
-
- body.append(textArea);
-
- textArea[0].select();
-
- try {
- if (document.execCommand('copy'))
- Messages.showInfo('Value copied to clipboard');
- else
- window.prompt('Copy to clipboard: Ctrl+C, Enter', toCopy); // eslint-disable-line no-alert
- }
- catch (err) {
- window.prompt('Copy to clipboard: Ctrl+C, Enter', toCopy); // eslint-disable-line no-alert
- }
-
- textArea.remove();
- }
- };
-}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/1bb10f90/modules/web-console/src/main/js/app/services/Focus.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/services/Focus.service.js b/modules/web-console/src/main/js/app/services/Focus.service.js
deleted file mode 100644
index a07e181..0000000
--- a/modules/web-console/src/main/js/app/services/Focus.service.js
+++ /dev/null
@@ -1,33 +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.
- */
-
-// Service to transfer focus for specified element.
-export default ['IgniteFocus', ['$timeout', ($timeout) => {
- return {
- move(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
- // in a disabled state but are enabled when those events are triggered.
- $timeout(() => {
- const elem = $('#' + id);
-
- if (elem.length > 0)
- elem[0].focus();
- }, 100);
- }
- };
-}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/1bb10f90/modules/web-console/src/main/js/app/services/LegacyTable.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/services/LegacyTable.service.js b/modules/web-console/src/main/js/app/services/LegacyTable.service.js
deleted file mode 100644
index 8f3b791..0000000
--- a/modules/web-console/src/main/js/app/services/LegacyTable.service.js
+++ /dev/null
@@ -1,205 +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.
- */
-
-// TODO: Refactor this service for legacy tables with more than one input field.
-export default ['IgniteLegacyTable', ['IgniteLegacyUtils', 'IgniteFocus', (LegacyUtils, Focus) => {
- function _model(item, field) {
- return LegacyUtils.getModel(item, field);
- }
-
- const table = {name: 'none', editIndex: -1};
-
- function _tableReset() {
- delete table.field;
- table.name = 'none';
- table.editIndex = -1;
-
- LegacyUtils.hidePopover();
- }
-
- function _tableSaveAndReset() {
- const field = table.field;
-
- const save = LegacyUtils.isDefined(field) && LegacyUtils.isDefined(field.save);
-
- if (!save || !LegacyUtils.isDefined(field) || field.save(field, table.editIndex, true)) {
- _tableReset();
-
- return true;
- }
-
- return false;
- }
-
- function _tableState(field, editIndex, specName) {
- table.field = field;
- table.name = specName || field.model;
- table.editIndex = editIndex;
- }
-
- function _tableUI(field) {
- const ui = field.ui;
-
- return ui ? ui : field.type;
- }
-
- function _tableFocus(focusId, index) {
- Focus.move((index < 0 ? 'new' : 'cur') + focusId + (index >= 0 ? index : ''));
- }
-
- function _tablePairValue(filed, index) {
- return index < 0 ? {key: filed.newKey, value: filed.newValue} : {key: filed.curKey, value: filed.curValue};
- }
-
- function _tableStartEdit(item, tbl, index, save) {
- _tableState(tbl, index);
-
- const val = _.get(_model(item, tbl), tbl.model)[index];
-
- const ui = _tableUI(tbl);
-
- tbl.save = save;
-
- if (ui === 'table-pair') {
- tbl.curKey = val[tbl.keyName];
- tbl.curValue = val[tbl.valueName];
-
- _tableFocus('Key' + tbl.focusId, index);
- }
- else if (ui === 'table-db-fields') {
- tbl.curDatabaseFieldName = val.databaseFieldName;
- tbl.curDatabaseFieldType = val.databaseFieldType;
- tbl.curJavaFieldName = val.javaFieldName;
- tbl.curJavaFieldType = val.javaFieldType;
-
- _tableFocus('DatabaseFieldName' + tbl.focusId, index);
- }
- else if (ui === 'table-indexes') {
- tbl.curIndexName = val.name;
- tbl.curIndexType = val.indexType;
- tbl.curIndexFields = val.fields;
-
- _tableFocus(tbl.focusId, index);
- }
- }
-
- function _tableNewItem(tbl) {
- _tableState(tbl, -1);
-
- const ui = _tableUI(tbl);
-
- if (ui === 'table-pair') {
- tbl.newKey = null;
- tbl.newValue = null;
-
- _tableFocus('Key' + tbl.focusId, -1);
- }
- else if (ui === 'table-db-fields') {
- tbl.newDatabaseFieldName = null;
- tbl.newDatabaseFieldType = null;
- tbl.newJavaFieldName = null;
- tbl.newJavaFieldType = null;
-
- _tableFocus('DatabaseFieldName' + tbl.focusId, -1);
- }
- else if (ui === 'table-indexes') {
- tbl.newIndexName = null;
- tbl.newIndexType = 'SORTED';
- tbl.newIndexFields = null;
-
- _tableFocus(tbl.focusId, -1);
- }
- }
-
- return {
- tableState: _tableState,
- tableReset: _tableReset,
- tableSaveAndReset: _tableSaveAndReset,
- tableNewItem: _tableNewItem,
- tableNewItemActive(tbl) {
- return table.name === tbl.model && table.editIndex < 0;
- },
- tableEditing(tbl, index) {
- return table.name === tbl.model && table.editIndex === index;
- },
- tableEditedRowIndex() {
- return table.editIndex;
- },
- tableField() {
- return table.field;
- },
- tableStartEdit: _tableStartEdit,
- tableRemove(item, field, index) {
- _tableReset();
-
- _.get(_model(item, field), field.model).splice(index, 1);
- },
- tablePairValue: _tablePairValue,
- tablePairSave(pairValid, item, field, index, stopEdit) {
- const valid = pairValid(item, field, index);
-
- if (valid) {
- const pairValue = _tablePairValue(field, index);
-
- let pairModel = {};
-
- const container = _.get(item, field.model);
-
- if (index < 0) {
- pairModel[field.keyName] = pairValue.key;
- pairModel[field.valueName] = pairValue.value;
-
- if (container)
- container.push(pairModel);
- else
- _.set(item, field.model, [pairModel]);
-
- if (!stopEdit)
- _tableNewItem(field);
- }
- else {
- pairModel = container[index];
-
- pairModel[field.keyName] = pairValue.key;
- pairModel[field.valueName] = pairValue.value;
-
- if (!stopEdit) {
- if (index < container.length - 1)
- _tableStartEdit(item, field, index + 1);
- else
- _tableNewItem(field);
- }
- }
- }
-
- return valid;
- },
- tablePairSaveVisible(field, index) {
- const pairValue = _tablePairValue(field, index);
-
- return !LegacyUtils.isEmptyString(pairValue.key) && !LegacyUtils.isEmptyString(pairValue.value);
- },
- tableFocusInvalidField(index, id) {
- _tableFocus(id, index);
-
- return false;
- },
- tableFieldId(index, id) {
- return (index < 0 ? 'new' : 'cur') + id + (index >= 0 ? index : '');
- }
- };
-}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/1bb10f90/modules/web-console/src/main/js/app/services/Messages.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/services/Messages.service.js b/modules/web-console/src/main/js/app/services/Messages.service.js
deleted file mode 100644
index e679488..0000000
--- a/modules/web-console/src/main/js/app/services/Messages.service.js
+++ /dev/null
@@ -1,63 +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.
- */
-
-// Service to show various information and error messages.
-export default ['IgniteMessages', ['$alert', ($alert) => {
- // Common instance of alert modal.
- let msgModal;
-
- const errorMessage = (prefix, err) => {
- prefix = prefix || '';
-
- if (err) {
- if (err.hasOwnProperty('message'))
- return prefix + err.message;
-
- return prefix + err;
- }
-
- return prefix + 'Internal error.';
- };
-
- const hideAlert = () => {
- if (msgModal)
- msgModal.hide();
- };
-
- const _showMessage = (err, type, duration, icon) => {
- hideAlert();
-
- const title = errorMessage(null, err);
-
- msgModal = $alert({type, title, duration});
-
- msgModal.$scope.icon = icon;
- };
-
- return {
- errorMessage,
- hideAlert,
- showError(err) {
- _showMessage(err, 'danger', 10, 'fa-exclamation-triangle');
-
- return false;
- },
- showInfo(err) {
- _showMessage(err, 'success', 3, 'fa-check-circle-o');
- }
- };
-}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/1bb10f90/modules/web-console/src/main/js/app/services/UnsavedChangesGuard.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/services/UnsavedChangesGuard.service.js b/modules/web-console/src/main/js/app/services/UnsavedChangesGuard.service.js
deleted file mode 100644
index 91244b0..0000000
--- a/modules/web-console/src/main/js/app/services/UnsavedChangesGuard.service.js
+++ /dev/null
@@ -1,38 +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.
- */
-
-const MSG = 'You have unsaved changes.\n\nAre you sure you want to discard them?';
-
-// Service that show confirmation about unsaved changes on user change location.
-export default ['IgniteUnsavedChangesGuard', ['$rootScope', ($root) => {
- return {
- install(scope, customDirtyCheck = () => scope.ui.inputForm.$dirty) {
- scope.$on('$destroy', () => window.onbeforeunload = null);
-
- const unbind = $root.$on('$stateChangeStart', (event) => {
- if (_.get(scope, 'ui.inputForm', false) && customDirtyCheck()) {
- if (!confirm(MSG)) // eslint-disable-line no-alert
- event.preventDefault();
- else
- unbind();
- }
- });
-
- window.onbeforeunload = () => _.get(scope, 'ui.inputForm.$dirty', false) ? MSG : null;
- }
- };
-}]];
http://git-wip-us.apache.org/repos/asf/ignite/blob/1bb10f90/modules/web-console/src/main/js/app/services/confirm.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/services/confirm.service.js b/modules/web-console/src/main/js/app/services/confirm.service.js
deleted file mode 100644
index e69de29..0000000
http://git-wip-us.apache.org/repos/asf/ignite/blob/1bb10f90/modules/web-console/src/main/js/app/vendor.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/vendor.js b/modules/web-console/src/main/js/app/vendor.js
deleted file mode 100644
index a8eeea7..0000000
--- a/modules/web-console/src/main/js/app/vendor.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import 'jquery';
-import 'angular';
-import 'angular-animate';
-import 'angular-sanitize';
-import 'angular-strap';
-import 'angular-strap/dist/angular-strap.tpl';
-import 'angular-socket-io';
-import 'angular-retina';
-import 'angular-ui-router';
-import 'ui-router-metatags/dist/ui-router-metatags';
-import 'angular-smart-table';
-import 'angular-ui-grid/ui-grid';
-import 'angular-drag-and-drop-lists';
-import 'angular-nvd3';
-import 'angular-tree-control';
-import 'angular-gridster';
-import 'bootstrap-sass/assets/javascripts/bootstrap/transition';
-import 'bootstrap-sass/assets/javascripts/bootstrap/carousel';
-import 'brace';
-import 'brace/mode/xml';
-import 'brace/mode/sql';
-import 'brace/mode/java';
-import 'brace/mode/dockerfile';
-import 'brace/mode/snippets';
-import 'brace/theme/chrome';
-import 'brace/ext/language_tools';
-import 'brace/ext/searchbox';
-import 'file-saver';
-import 'jszip';
-import 'nvd3';
-import 'query-command-supported';
-import 'angular-gridster/dist/angular-gridster.min.css';
-import 'angular-tree-control/css/tree-control-attribute.css';
-import 'angular-tree-control/css/tree-control.css';
-import 'angular-ui-grid/ui-grid.css';
-import 'angular-motion/dist/angular-motion.css';
-import 'nvd3/build/nv.d3.css';
http://git-wip-us.apache.org/repos/asf/ignite/blob/1bb10f90/modules/web-console/src/main/js/gulpfile.babel.js/webpack/common.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/gulpfile.babel.js/webpack/common.js b/modules/web-console/src/main/js/gulpfile.babel.js/webpack/common.js
deleted file mode 100644
index 237f2e7..0000000
--- a/modules/web-console/src/main/js/gulpfile.babel.js/webpack/common.js
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import path from 'path';
-import fs from 'fs';
-import webpack from 'webpack';
-import autoprefixer from 'autoprefixer-core';
-import jade from 'jade';
-import progressPlugin from './plugins/progress';
-import eslintFormatter from 'eslint-friendly-formatter';
-
-import ExtractTextPlugin from 'extract-text-webpack-plugin';
-import HtmlWebpackPlugin from 'html-webpack-plugin';
-
-import {srcDir, destDir, rootDir} from '../paths';
-
-const NODE_ENV = process.env.NODE_ENV || 'production';
-const development = NODE_ENV === 'development';
-const node_modules_path = path.resolve('node_modules');
-const cssLoader = 'css-loader?sourceMap!postcss-loader';
-const stylesLoader = cssLoader + '!sass-loader?outputStyle=expanded&sourceMap=true&sourceMapContents=true';
-
-let favicon;
-
-try {
- fs.accessSync('build/ignite_modules/favicon.ico', fs.F_OK);
-
- favicon = 'build/ignite_modules/favicon.ico';
-} catch (ignore) {
- favicon = 'build/favicon.ico';
-}
-
-export default () => {
- return {
- node: {
- fs: 'empty'
- },
-
- // Entry points.
- entry: {
- polyfill: 'babel-polyfill',
- app: path.join(srcDir, 'app.js'),
- vendor: path.join(srcDir, 'vendor.js')
- },
-
- // Output system.
- output: {
- path: destDir,
- publicPath: './',
- filename: '[name].js'
- },
-
- // Resolves modules.
- resolve: {
- extensions: [
- '',
- '.js'
- ],
- root: [rootDir],
- modulesDirectories: [
- node_modules_path,
- './'
- ]
- },
-
- // Modules resolvers.
- /* global require */
- module: {
- noParse: [],
- preLoaders: [
- {
- test: /\.js$/,
- exclude: [node_modules_path],
- loader: 'eslint-loader'
- }
- ],
- loaders: [
- {
- test: /\.json$/,
- loader: 'json-loader'
- },
- {
- test: /\.jade$/,
- loaders: [
- `ngtemplate-loader?relativeTo=${rootDir}`,
- 'html-loader?attrs[]=img:src&attrs[]=img:data-src',
- 'jade-html-loader'
- ]
- },
- {
- test: /\.js$/,
- exclude: [node_modules_path],
- loaders: ['ng-annotate-loader']
- },
- {
- test: /\.js$/,
- exclude: [node_modules_path],
- loader: 'babel-loader',
- query: {
- cacheDirectory: true,
- plugins: ['transform-runtime',
- 'add-module-exports'],
- presets: ['angular']
-
- }
- },
- {
- test: /\.css$/,
- loader: development ? `style-loader!${cssLoader}` : ExtractTextPlugin.extract('style-loader', cssLoader)
- },
- {
- test: /\.(scss|sass)$/,
- loader: development ? `style-loader!${stylesLoader}` : ExtractTextPlugin.extract('style-loader', stylesLoader)
- },
- {
- test: /\.(woff2|woff|ttf|eot|svg)?(\?v=[0-9]\.[0-9]\.[0-9])?$/,
- loaders: [
- 'file-loader?name=assets/fonts/[name].[ext]'
- ]
- },
- {
- test: /\.(jpe?g|png|gif)$/i,
- loaders: ['file-loader?name=assets/images/[name]_[hash].[ext]']
- },
- {
- test: require.resolve('jquery'),
- loaders: [
- 'expose-loader?$',
- 'expose-loader?jQuery'
- ]
- },
- {
- test: require.resolve('nvd3'),
- loaders: [
- 'expose-loader?nv'
- ]
- }
- ]
- },
-
- // Postcss configuration.
- postcss: [autoprefixer({browsers: ['last 2 versions']})],
-
- // ESLint loader configuration.
- eslint: {
- failOnWarning: false,
- failOnError: false,
- formatter: eslintFormatter
- },
-
- // Load plugins.
- plugins: [
- new webpack.ProvidePlugin({
- $: 'jquery',
- jQuery: 'jquery',
- _: 'lodash',
- nv: 'nvd3'
- }),
- new webpack.DefinePlugin({NODE_ENV: JSON.stringify(NODE_ENV)}),
- // new webpack.NoErrorsPlugin(),
- new webpack.optimize.DedupePlugin(),
- new webpack.optimize.CommonsChunkPlugin({
- name: 'common',
- chunks: ['vendor', 'app']
- }),
- new webpack.optimize.AggressiveMergingPlugin({moveToParents: true}),
- new ExtractTextPlugin('assets/css/[name]' + (development ? '' : '.[chunkhash]') + '.css', {allChunks: true}),
- new HtmlWebpackPlugin({
- filename: 'index.html',
- templateContent: () => {
- return jade.renderFile(path.join(rootDir, 'views', 'index.jade'));
- },
- favicon
- }),
- progressPlugin
- ]
- };
-};
http://git-wip-us.apache.org/repos/asf/ignite/blob/1bb10f90/modules/web-console/src/main/js/gulpfile.babel.js/webpack/environments/production.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/gulpfile.babel.js/webpack/environments/production.js b/modules/web-console/src/main/js/gulpfile.babel.js/webpack/environments/production.js
deleted file mode 100644
index db66720..0000000
--- a/modules/web-console/src/main/js/gulpfile.babel.js/webpack/environments/production.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import webpack from 'webpack';
-
-import {destDir, rootDir} from '../../paths';
-
-export default () => {
- const plugins = [
- new webpack.optimize.UglifyJsPlugin({
- path: destDir,
- minimize: true,
- warnings: false,
- sourceMap: false,
- mangle: true
- })
- ];
-
- return {
- context: rootDir,
- bail: true, // Cancel build on error.
- debug: false,
- devtool: 'cheap-source-map',
- output: {
- publicPath: '/',
- filename: '[name].[chunkhash].js',
- path: destDir
- },
- plugins
- };
-};
http://git-wip-us.apache.org/repos/asf/ignite/blob/1bb10f90/modules/web-console/src/main/js/gulpfile.babel.js/webpack/index.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/gulpfile.babel.js/webpack/index.js b/modules/web-console/src/main/js/gulpfile.babel.js/webpack/index.js
deleted file mode 100644
index 6682f9c..0000000
--- a/modules/web-console/src/main/js/gulpfile.babel.js/webpack/index.js
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import _ from 'lodash';
-import commonConfig from './common';
-import devConfig from './environments/development';
-import prodConfig from './environments/production';
-
-const env = process.env.NODE_ENV || 'production';
-
-// Config by environments.
-const configs = {
- production: prodConfig,
- development: devConfig
-};
-
-// Load config file by environment
-export default _.merge(commonConfig(), configs[env]());
http://git-wip-us.apache.org/repos/asf/ignite/blob/1bb10f90/modules/web-console/src/main/js/gulpfile.babel.js/webpack/plugins/progress.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/gulpfile.babel.js/webpack/plugins/progress.js b/modules/web-console/src/main/js/gulpfile.babel.js/webpack/plugins/progress.js
deleted file mode 100644
index 5f753c7..0000000
--- a/modules/web-console/src/main/js/gulpfile.babel.js/webpack/plugins/progress.js
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import ProgressPlugin from 'webpack/lib/ProgressPlugin';
-
-let chars = 0;
-let lastState = 0;
-let lastStateTime = 0;
-
-const outputStream = process.stdout;
-
-const _goToLineStart = (nextMessage) => {
- let str = '';
-
- for (; chars > nextMessage.length; chars--)
- str += '\b \b';
-
- chars = nextMessage.length;
-
- for (let i = 0; i < chars; i++)
- str += '\b';
-
- if (str)
- outputStream.write(str);
-};
-
-export default new ProgressPlugin((percentage, msg) => {
- let state = msg;
-
- if (percentage < 1) {
- percentage = Math.floor(percentage * 100);
-
- msg = percentage + '% ' + msg;
-
- if (percentage < 100)
- msg = ' ' + msg;
-
- if (percentage < 10)
- msg = ' ' + msg;
- }
-
- state = state.replace(/^\d+\/\d+\s+/, '');
-
- if (percentage === 0) {
- lastState = null;
- lastStateTime = (new Date()).getTime();
- }
- else if (state !== lastState || percentage === 1) {
- const now = (new Date()).getTime();
-
- if (lastState) {
- const stateMsg = (now - lastStateTime) + 'ms ' + lastState;
-
- _goToLineStart(stateMsg);
-
- outputStream.write(stateMsg + '\n');
-
- chars = 0;
- }
-
- lastState = state;
- lastStateTime = now;
- }
-
- _goToLineStart(msg);
-
- outputStream.write(msg);
-});