http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/ace.module.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/ace.module.js b/modules/web-console/src/main/js/app/modules/ace.module.js deleted file mode 100644 index 4920a6f..0000000 --- a/modules/web-console/src/main/js/app/modules/ace.module.js +++ /dev/null @@ -1,269 +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 angular from 'angular'; - -angular - .module('ignite-console.ace', []) - .constant('igniteAceConfig', {}) - .directive('igniteAce', ['igniteAceConfig', (aceConfig) => { - if (angular.isUndefined(window.ace)) - throw new Error('ignite-ace need ace to work... (o rly?)'); - - /** - * Sets editor options such as the wrapping mode or the syntax checker. - * - * The supported options are: - * - * <ul> - * <li>showGutter</li> - * <li>useWrapMode</li> - * <li>onLoad</li> - * <li>theme</li> - * <li>mode</li> - * </ul> - * - * @param acee - * @param session ACE editor session. - * @param {object} opts Options to be set. - */ - const setOptions = (acee, session, opts) => { - // Sets the ace worker path, if running from concatenated or minified source. - if (angular.isDefined(opts.workerPath)) { - const config = window.ace.acequire('ace/config'); - - config.set('workerPath', opts.workerPath); - } - - // Ace requires loading. - _.forEach(opts.require, (n) => window.ace.acequire(n)); - - // Boolean options. - if (angular.isDefined(opts.showGutter)) - acee.renderer.setShowGutter(opts.showGutter); - - if (angular.isDefined(opts.useWrapMode)) - session.setUseWrapMode(opts.useWrapMode); - - if (angular.isDefined(opts.showInvisibles)) - acee.renderer.setShowInvisibles(opts.showInvisibles); - - if (angular.isDefined(opts.showIndentGuides)) - acee.renderer.setDisplayIndentGuides(opts.showIndentGuides); - - if (angular.isDefined(opts.useSoftTabs)) - session.setUseSoftTabs(opts.useSoftTabs); - - if (angular.isDefined(opts.showPrintMargin)) - acee.setShowPrintMargin(opts.showPrintMargin); - - // Commands. - if (angular.isDefined(opts.disableSearch) && opts.disableSearch) { - acee.commands.addCommands([{ - name: 'unfind', - bindKey: { - win: 'Ctrl-F', - mac: 'Command-F' - }, - exec: _.constant(false), - readOnly: true - }]); - } - - // Base options. - if (angular.isString(opts.theme)) - acee.setTheme('ace/theme/' + opts.theme); - - if (angular.isString(opts.mode)) - session.setMode('ace/mode/' + opts.mode); - - if (angular.isDefined(opts.firstLineNumber)) { - if (angular.isNumber(opts.firstLineNumber)) - session.setOption('firstLineNumber', opts.firstLineNumber); - else if (angular.isFunction(opts.firstLineNumber)) - session.setOption('firstLineNumber', opts.firstLineNumber()); - } - - // Advanced options. - if (angular.isDefined(opts.advanced)) { - for (const key in opts.advanced) { - if (opts.advanced.hasOwnProperty(key)) { - // Create a javascript object with the key and value. - const obj = {name: key, value: opts.advanced[key]}; - - // Try to assign the option to the ace editor. - acee.setOption(obj.name, obj.value); - } - } - } - - // Advanced options for the renderer. - if (angular.isDefined(opts.rendererOptions)) { - for (const key in opts.rendererOptions) { - if (opts.rendererOptions.hasOwnProperty(key)) { - // Create a javascript object with the key and value. - const obj = {name: key, value: opts.rendererOptions[key]}; - - // Try to assign the option to the ace editor. - acee.renderer.setOption(obj.name, obj.value); - } - } - } - - // onLoad callbacks. - _.forEach(opts.callbacks, (cb) => { - if (angular.isFunction(cb)) - cb(acee); - }); - }; - - return { - restrict: 'EA', - require: ['?ngModel', '?^form'], - link: (scope, elm, attrs, [ngModel, form]) => { - /** - * Corresponds the igniteAceConfig ACE configuration. - * - * @type object - */ - const options = aceConfig.ace || {}; - - /** - * IgniteAceConfig merged with user options via json in attribute or data binding. - * - * @type object - */ - let opts = angular.extend({}, options, scope.$eval(attrs.igniteAce)); - - /** - * ACE editor. - * - * @type object - */ - const acee = window.ace.edit(elm[0]); - - /** - * ACE editor session. - * - * @type object - * @see [EditSession]{@link http://ace.c9.io/#nav=api&api=edit_session} - */ - const session = acee.getSession(); - - /** - * Reference to a change listener created by the listener factory. - * - * @function - * @see listenerFactory.onChange - */ - let onChangeListener; - - /** - * Creates a change listener which propagates the change event and the editor session - * to the callback from the user option onChange. - * It might be exchanged during runtime, if this happens the old listener will be unbound. - * - * @param callback Callback function defined in the user options. - * @see onChangeListener - */ - const onChangeFactory = (callback) => { - return (e) => { - const newValue = session.getValue(); - - if (ngModel && newValue !== ngModel.$viewValue && - // HACK make sure to only trigger the apply outside of the - // digest loop 'cause ACE is actually using this callback - // for any text transformation ! - !scope.$$phase && !scope.$root.$$phase) - scope.$eval(() => ngModel.$setViewValue(newValue)); - - if (angular.isDefined(callback)) { - scope.$evalAsync(() => { - if (angular.isFunction(callback)) - callback([e, acee]); - else - throw new Error('ignite-ace use a function as callback'); - }); - } - }; - }; - - attrs.$observe('readonly', (value) => acee.setReadOnly(!!value || value === '')); - - // Value Blind. - if (ngModel) { - // Remove "ngModel" controller from parent form for correct dirty checks. - form && form.$removeControl(ngModel); - - ngModel.$formatters.push((value) => { - if (angular.isUndefined(value) || value === null) - return ''; - - if (angular.isObject(value) || angular.isArray(value)) - throw new Error('ignite-ace cannot use an object or an array as a model'); - - return value; - }); - - ngModel.$render = () => session.setValue(ngModel.$viewValue); - - acee.on('change', () => ngModel.$setViewValue(acee.getValue())); - } - - // Listen for option updates. - const updateOptions = (current, previous) => { - if (current === previous) - return; - - opts = angular.extend({}, options, scope.$eval(attrs.igniteAce)); - - opts.callbacks = [opts.onLoad]; - - // Also call the global onLoad handler. - if (opts.onLoad !== options.onLoad) - opts.callbacks.unshift(options.onLoad); - - // Unbind old change listener. - session.removeListener('change', onChangeListener); - - // Bind new change listener. - onChangeListener = onChangeFactory(opts.onChange); - - session.on('change', onChangeListener); - - setOptions(acee, session, opts); - }; - - scope.$watch(attrs.igniteAce, updateOptions, /* deep watch */ true); - - // Set the options here, even if we try to watch later, - // if this line is missing things go wrong (and the tests will also fail). - updateOptions(options); - - elm.on('$destroy', () => { - acee.session.$stopWorker(); - acee.destroy(); - }); - - scope.$watch(() => [elm[0].offsetWidth, elm[0].offsetHeight], - () => { - acee.resize(); - acee.renderer.updateFull(); - }, true); - } - }; - }]);
http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/agent/agent.module.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/agent/agent.module.js b/modules/web-console/src/main/js/app/modules/agent/agent.module.js deleted file mode 100644 index ca95166..0000000 --- a/modules/web-console/src/main/js/app/modules/agent/agent.module.js +++ /dev/null @@ -1,323 +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 angular from 'angular'; -import io from 'socket.io-client'; // eslint-disable-line no-unused-vars - -class IgniteAgentMonitor { - constructor(socketFactory, $root, $q, $state, $modal, Messages) { - this._scope = $root.$new(); - - $root.$watch('user', () => { - this._scope.user = $root.user; - }); - - $root.$on('$stateChangeStart', () => { - this.stopWatch(); - }); - - // Pre-fetch modal dialogs. - this._downloadAgentModal = $modal({ - scope: this._scope, - templateUrl: '/templates/agent-download.html', - show: false, - backdrop: 'static', - keyboard: false - }); - - const _modalHide = this._downloadAgentModal.hide; - - /** - * Special dialog hide function. - */ - this._downloadAgentModal.hide = () => { - Messages.hideAlert(); - - _modalHide(); - }; - - /** - * Close dialog and go by specified link. - */ - this._scope.back = () => { - this.stopWatch(); - - if (this._scope.backState) - this._scope.$$postDigest(() => $state.go(this._scope.backState)); - }; - - this._scope.downloadAgent = () => { - const lnk = document.createElement('a'); - - lnk.setAttribute('href', '/api/v1/agent/download/zip'); - lnk.setAttribute('target', '_self'); - lnk.setAttribute('download', null); - lnk.style.display = 'none'; - - document.body.appendChild(lnk); - - lnk.click(); - - document.body.removeChild(lnk); - }; - - this._scope.hasAgents = null; - this._scope.showModal = false; - - /** - * @type {Socket} - */ - this._socket = null; - - this._socketFactory = socketFactory; - - this._$q = $q; - - this.Messages = Messages; - } - - /** - * @private - */ - 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) - this._downloadAgentModal.hide(); - } - - /** - * @returns {Promise} - */ - awaitAgent() { - if (this._scope.hasAgents) - return this._$q.when(); - - const latch = this._$q.defer(); - - const offConnected = this._scope.$on('agent:watch', (event, state) => { - if (state !== 'DISCONNECTED') - offConnected(); - - if (state === 'CONNECTED') - return latch.resolve(); - - if (state === 'STOPPED') - return latch.reject('Agent watch stopped.'); - }); - - return latch.promise; - } - - init() { - this._socket = this._socketFactory(); - - const disconnectFn = () => { - this._scope.hasAgents = false; - - this.checkModal(); - - this._scope.$broadcast('agent:watch', 'DISCONNECTED'); - }; - - this._socket.on('connect_error', disconnectFn); - this._socket.on('disconnect', disconnectFn); - - this._socket.on('agent:count', ({count}) => { - this._scope.hasAgents = count > 0; - - this.checkModal(); - - this._scope.$broadcast('agent:watch', this._scope.hasAgents ? 'CONNECTED' : 'DISCONNECTED'); - }); - } - - /** - * @param {Object} back - * @returns {Promise} - */ - startWatch(back) { - this._scope.backState = back.state; - this._scope.backText = back.text; - - this._scope.agentGoal = back.goal; - - if (back.onDisconnect) { - this._scope.offDisconnect = this._scope.$on('agent:watch', (e, state) => - state === 'DISCONNECTED' && back.onDisconnect()); - } - - this._scope.showModal = true; - - // Remove blinking on init. - if (this._scope.hasAgents !== null) - this.checkModal(); - - return this.awaitAgent(); - } - - /** - * - * @param {String} event - * @param {Object} [args] - * @returns {Promise} - * @private - */ - _emit(event, ...args) { - if (!this._socket) - return this._$q.reject('Failed to connect to server'); - - const latch = this._$q.defer(); - - const onDisconnect = () => { - this._socket.removeListener('disconnect', onDisconnect); - - latch.reject('Connection to server was closed'); - }; - - this._socket.on('disconnect', onDisconnect); - - args.push((err, res) => { - this._socket.removeListener('disconnect', onDisconnect); - - if (err) - latch.reject(err); - - latch.resolve(res); - }); - - this._socket.emit(event, ...args); - - return latch.promise; - } - - drivers() { - return this._emit('schemaImport:drivers'); - } - - /** - * - * @param {Object} preset - * @returns {Promise} - */ - schemas(preset) { - return this._emit('schemaImport:schemas', preset); - } - - /** - * - * @param {Object} preset - * @returns {Promise} - */ - tables(preset) { - return this._emit('schemaImport:tables', preset); - } - - /** - * @param {Object} err - */ - showNodeError(err) { - if (this._scope.showModal) { - this._downloadAgentModal.$promise.then(this._downloadAgentModal.show); - - this.Messages.showError(err); - } - } - - /** - * - * @param {String} event - * @param {Object} [args] - * @returns {Promise} - * @private - */ - _rest(event, ...args) { - return this._downloadAgentModal.$promise - .then(() => this._emit(event, ...args)); - } - - /** - * @param {Boolean} [attr] - * @param {Boolean} [mtr] - * @returns {Promise} - */ - topology(attr, mtr) { - return this._rest('node:topology', !!attr, !!mtr); - } - - /** - * @param {int} [queryId] - * @returns {Promise} - */ - queryClose(queryId) { - return this._rest('node:query:close', queryId); - } - - /** - * @param {String} cacheName Cache name. - * @param {int} pageSize - * @param {String} [query] Query if null then scan query. - * @returns {Promise} - */ - query(cacheName, pageSize, query) { - return this._rest('node:query', _.isEmpty(cacheName) ? null : cacheName, pageSize, query); - } - - /** - * @param {String} cacheName Cache name. - * @param {String} [query] Query if null then scan query. - * @returns {Promise} - */ - queryGetAll(cacheName, query) { - return this._rest('node:query:getAll', _.isEmpty(cacheName) ? null : cacheName, query); - } - - /** - * @param {String} [cacheName] Cache name. - * @returns {Promise} - */ - metadata(cacheName) { - return this._rest('node:cache:metadata', _.isEmpty(cacheName) ? null : cacheName); - } - - /** - * @param {int} queryId - * @param {int} pageSize - * @returns {Promise} - */ - next(queryId, pageSize) { - return this._rest('node:query:fetch', queryId, pageSize); - } - - stopWatch() { - this._scope.showModal = false; - - this.checkModal(); - - this._scope.offDisconnect && this._scope.offDisconnect(); - - this._scope.$broadcast('agent:watch', 'STOPPED'); - } -} - -IgniteAgentMonitor.$inject = ['igniteSocketFactory', '$rootScope', '$q', '$state', '$modal', 'IgniteMessages']; - -angular - .module('ignite-console.agent', [ - - ]) - .service('IgniteAgentMonitor', IgniteAgentMonitor); http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/branding/branding.module.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/branding/branding.module.js b/modules/web-console/src/main/js/app/modules/branding/branding.module.js deleted file mode 100644 index cae7c91..0000000 --- a/modules/web-console/src/main/js/app/modules/branding/branding.module.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 angular from 'angular'; - -import IgniteBranding from './branding.provider'; - -import igniteHeaderLogo from './header-logo.directive'; -import igniteHeaderTitle from './header-title.directive'; -import igniteTerms from './terms.directive'; -import igniteFeatures from './features.directive'; -import igniteFooter from './footer.directive'; -import ignitePoweredByApache from './powered-by-apache.directive'; - -angular -.module('ignite-console.branding', [ - 'ui.router.metatags' -]) -.provider(...IgniteBranding) -.config(['UIRouterMetatagsProvider', (UIRouterMetatagsProvider) => { - UIRouterMetatagsProvider - .setDefaultTitle('Apache Ignite - Management Tool and Configuration Wizard') - .setTitleSuffix(' â Apache Ignite Web Console') - .setDefaultDescription('The Apache Ignite Web Console is an interactive management tool and configuration wizard which walks you through the creation of config files. Try it now.'); -}]) -.directive(...ignitePoweredByApache) -.directive(...igniteHeaderLogo) -.directive(...igniteHeaderTitle) -.directive(...igniteTerms) -.directive(...igniteFeatures) -.directive(...igniteFooter); http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/branding/branding.provider.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/branding/branding.provider.js b/modules/web-console/src/main/js/app/modules/branding/branding.provider.js deleted file mode 100644 index ce14b34..0000000 --- a/modules/web-console/src/main/js/app/modules/branding/branding.provider.js +++ /dev/null @@ -1,111 +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 ['IgniteBranding', [function() { - let titleSuffix = ' â Apache Ignite Web Console'; - - let headerLogo = '/images/ignite-logo.png'; - - let headerText = 'Management console for Apache Ignite'; - - let showIgniteLogo = false; - - let footerHtml = [ - '<p>Apache Ignite Web Console</p>', - '<p>© 2016 The Apache Software Foundation.</p>', - '<p>Apache, Apache Ignite, the Apache feather and the Apache Ignite logo are trademarks of The Apache Software Foundation.</p>' - ]; - - let termsState; - - let featuresHtml = [ - '<p>Web Console is an interactive management tool which allows to:</p>', - '<ul>', - ' <li>Create and download cluster configurations</li>', - ' <li>Automatically import domain model from any RDBMS</li>', - ' <li>Connect to cluster and run SQL analytics on it</li>', - '</ul>' - ]; - - /** - * Change title suffix. - * - * @param {String} suffix. - */ - this.titleSuffix = (suffix) => { - titleSuffix = suffix; - }; - - /** - * Change logo in header. - * - * @param {String} url Logo path. - */ - this.headerLogo = (url) => { - headerLogo = url; - - showIgniteLogo = true; - }; - - /** - * Change text in header. - * - * @param {String} text Header text. - */ - this.headerText = (text) => { - headerText = text; - }; - - /** - * Change text in features. - * - * @param {Array.<String>} rows Features text. - */ - this.featuresHtml = (rows) => { - featuresHtml = rows; - }; - - /** - * Change text in footer. - * - * @param {Array.<String>} rows Footer text. - */ - this.footerHtml = (rows) => { - footerHtml = rows; - }; - - /** - * Set terms and conditions stage. - * - * @param {String} state - */ - this.termsState = (state) => { - termsState = state; - }; - - this.$get = [() => { - return { - titleSuffix, - headerLogo, - headerText, - featuresHtml: featuresHtml.join('\n'), - footerHtml: footerHtml.join('\n'), - showIgniteLogo, - termsState - }; - }]; -}]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/branding/features.directive.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/branding/features.directive.js b/modules/web-console/src/main/js/app/modules/branding/features.directive.js deleted file mode 100644 index 9226a3f..0000000 --- a/modules/web-console/src/main/js/app/modules/branding/features.directive.js +++ /dev/null @@ -1,35 +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 template = '<div class="features" ng-bind-html="features.html"></div>'; - -export default ['igniteFeatures', ['IgniteBranding', (branding) => { - function controller() { - const ctrl = this; - - ctrl.html = branding.featuresHtml; - } - - return { - restrict: 'E', - template, - controller, - controllerAs: 'features', - replace: true - }; -}]]; - http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/branding/footer.directive.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/branding/footer.directive.js b/modules/web-console/src/main/js/app/modules/branding/footer.directive.js deleted file mode 100644 index f0b1994..0000000 --- a/modules/web-console/src/main/js/app/modules/branding/footer.directive.js +++ /dev/null @@ -1,34 +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 template = '<div class="footer" ng-bind-html="footer.html"></div>'; - -export default ['igniteFooter', ['IgniteBranding', (branding) => { - function controller() { - const ctrl = this; - - ctrl.html = branding.footerHtml; - } - - return { - restrict: 'E', - template, - controller, - controllerAs: 'footer', - replace: true - }; -}]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/branding/header-logo.directive.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/branding/header-logo.directive.js b/modules/web-console/src/main/js/app/modules/branding/header-logo.directive.js deleted file mode 100644 index 423de9c..0000000 --- a/modules/web-console/src/main/js/app/modules/branding/header-logo.directive.js +++ /dev/null @@ -1,34 +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 templateUrl from './header-logo.jade'; - -export default ['igniteHeaderLogo', ['IgniteBranding', (branding) => { - function controller() { - const ctrl = this; - - ctrl.url = branding.headerLogo; - } - - return { - restrict: 'E', - templateUrl, - controller, - controllerAs: 'logo', - replace: true - }; -}]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/branding/header-logo.jade ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/branding/header-logo.jade b/modules/web-console/src/main/js/app/modules/branding/header-logo.jade deleted file mode 100644 index b807921..0000000 --- a/modules/web-console/src/main/js/app/modules/branding/header-logo.jade +++ /dev/null @@ -1,18 +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. - -a(href='/') - img.navbar-brand(ng-src='{{logo.url}}' height='40') http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/branding/header-title.directive.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/branding/header-title.directive.js b/modules/web-console/src/main/js/app/modules/branding/header-title.directive.js deleted file mode 100644 index d560e0a..0000000 --- a/modules/web-console/src/main/js/app/modules/branding/header-title.directive.js +++ /dev/null @@ -1,35 +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 template = '<h1 class="title">{{::title.text}}</h1>'; - -export default ['igniteHeaderTitle', ['IgniteBranding', (branding) => { - function controller() { - const ctrl = this; - - ctrl.text = branding.headerText; - } - - return { - restrict: 'E', - template, - controller, - controllerAs: 'title', - replace: true - }; -}]]; - http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/branding/powered-by-apache.directive.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/branding/powered-by-apache.directive.js b/modules/web-console/src/main/js/app/modules/branding/powered-by-apache.directive.js deleted file mode 100644 index 2f02446..0000000 --- a/modules/web-console/src/main/js/app/modules/branding/powered-by-apache.directive.js +++ /dev/null @@ -1,35 +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 templateUrl from './powered-by-apache.jade'; - -export default ['ignitePoweredByApache', ['IgniteBranding', (branding) => { - function controller() { - const ctrl = this; - - ctrl.show = branding.showIgniteLogo; - } - - return { - restrict: 'E', - templateUrl, - controller, - controllerAs: 'poweredBy', - replace: true - }; -}]]; - http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/branding/powered-by-apache.jade ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/branding/powered-by-apache.jade b/modules/web-console/src/main/js/app/modules/branding/powered-by-apache.jade deleted file mode 100644 index af9aadf..0000000 --- a/modules/web-console/src/main/js/app/modules/branding/powered-by-apache.jade +++ /dev/null @@ -1,18 +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. - -a(ng-if='poweredBy.show' href='//ignite.apache.org' target='_blank') - img(ng-src='/images/pb-ignite.png' height='65') http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/branding/terms.directive.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/branding/terms.directive.js b/modules/web-console/src/main/js/app/modules/branding/terms.directive.js deleted file mode 100644 index 0207745..0000000 --- a/modules/web-console/src/main/js/app/modules/branding/terms.directive.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. - */ - -export default ['igniteTerms', ['IgniteBranding', (branding) => { - function controller() { - const ctrl = this; - - ctrl.termsState = branding.termsState; - } - - return { - restrict: 'A', - controller, - controllerAs: 'terms' - }; -}]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/configuration/EventGroups.provider.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/configuration/EventGroups.provider.js b/modules/web-console/src/main/js/app/modules/configuration/EventGroups.provider.js deleted file mode 100644 index 61f3188..0000000 --- a/modules/web-console/src/main/js/app/modules/configuration/EventGroups.provider.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. - */ - -// Events groups. -import GROUPS from 'app/data/event-types.json'; - -export default ['igniteEventGroups', function() { - const groups = GROUPS; - - this.push = (data) => groups.push(data); - - this.$get = [() => { - return groups; - }]; -}]; - http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/configuration/Sidebar.provider.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/configuration/Sidebar.provider.js b/modules/web-console/src/main/js/app/modules/configuration/Sidebar.provider.js deleted file mode 100644 index 8bd5ba3..0000000 --- a/modules/web-console/src/main/js/app/modules/configuration/Sidebar.provider.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. - */ - -import angular from 'angular'; - -export default ['igniteSidebar', function() { - const items = [ - { text: 'Clusters', sref: 'base.configuration.clusters' }, - { text: 'Model', sref: 'base.configuration.domains' }, - { text: 'Caches', sref: 'base.configuration.caches' }, - { text: 'IGFS', sref: 'base.configuration.igfs' } - ]; - - this.push = function(data) { - items.push(data); - }; - - this.$get = [function() { - const r = angular.copy(items); - - r.push({ text: 'Summary', sref: 'base.configuration.summary' }); - - return r; - }]; -}]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/configuration/configuration.module.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/configuration/configuration.module.js b/modules/web-console/src/main/js/app/modules/configuration/configuration.module.js deleted file mode 100644 index 99830b0..0000000 --- a/modules/web-console/src/main/js/app/modules/configuration/configuration.module.js +++ /dev/null @@ -1,41 +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 angular from 'angular'; - -import igniteEventGroups from './EventGroups.provider'; -import igniteSidebar from './Sidebar.provider'; - -import GeneratorXml from './generator/Xml.service'; -import GeneratorJava from './generator/Java.service'; -import GeneratorDocker from './generator/Docker.service'; -import GeneratorPom from './generator/Pom.service'; - -import igniteSidebarDirective from './sidebar.directive'; - -// Ignite events groups. -angular -.module('ignite-console.configuration', [ - -]) -.provider(...igniteEventGroups) -.provider(...igniteSidebar) -.directive(...igniteSidebarDirective) -.service(...GeneratorXml) -.service(...GeneratorJava) -.service(...GeneratorDocker) -.service(...GeneratorPom); http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/configuration/generator/Docker.service.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/configuration/generator/Docker.service.js b/modules/web-console/src/main/js/app/modules/configuration/generator/Docker.service.js deleted file mode 100644 index f9776a2..0000000 --- a/modules/web-console/src/main/js/app/modules/configuration/generator/Docker.service.js +++ /dev/null @@ -1,78 +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. - */ - -/** - * Docker file generation entry point. - */ -class GeneratorDocker { - /** - * Generate from section. - * - * @param {Object} cluster Cluster. - * @param {String} ver Ignite version. - * @returns {String} - */ - from(cluster, ver) { - return [ - '# Start from Apache Ignite image.', - `FROM apacheignite/ignite:${ver}` - ].join('\n'); - } - - /** - * Generate Docker file for cluster. - * - * @param {Object} cluster Cluster. - * @param {String} ver Ignite version. - */ - generate(cluster, ver) { - return [ - this.from(cluster, ver), - '', - '# Set config uri for node.', - `ENV CONFIG_URI config/${cluster.name}-server.xml`, - '', - '# Copy ignite-http-rest from optional.', - 'ENV OPTION_LIBS ignite-rest-http', - '', - '# Update packages and install maven.', - 'RUN \\', - ' apt-get update &&\\', - ' apt-get install -y maven', - '', - '# Append project to container.', - `ADD . ${cluster.name}`, - '', - '# Build project in container.', - `RUN mvn -f ${cluster.name}/pom.xml clean package -DskipTests`, - '', - '# Copy project jars to node classpath.', - `RUN mkdir $IGNITE_HOME/libs/${cluster.name} && \\`, - ` find ${cluster.name}/target -name "*.jar" -type f -exec cp {} $IGNITE_HOME/libs/${cluster.name} \\; && \\`, - ` cp -r ${cluster.name}/config/* $IGNITE_HOME/config` - ].join('\n'); - } - - ignoreFile() { - return [ - 'target', - 'Dockerfile' - ].join('\n'); - } -} - -export default ['GeneratorDocker', GeneratorDocker]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/configuration/generator/Java.service.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/configuration/generator/Java.service.js b/modules/web-console/src/main/js/app/modules/configuration/generator/Java.service.js deleted file mode 100644 index 67e19b9..0000000 --- a/modules/web-console/src/main/js/app/modules/configuration/generator/Java.service.js +++ /dev/null @@ -1,21 +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 IGNITE-2054: need move $generatorJava to services. -export default ['GeneratorJava', () => { - return $generatorJava; -}]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/configuration/generator/Pom.service.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/configuration/generator/Pom.service.js b/modules/web-console/src/main/js/app/modules/configuration/generator/Pom.service.js deleted file mode 100644 index 674c16e..0000000 --- a/modules/web-console/src/main/js/app/modules/configuration/generator/Pom.service.js +++ /dev/null @@ -1,210 +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. - */ - -// Java built-in class names. -import POM_DEPENDENCIES from 'app/data/pom-dependencies.json'; - -/** - * Pom file generation entry point. - */ -class GeneratorPom { - escapeId(s) { - if (typeof (s) !== 'string') - return s; - - return s.replace(/[^A-Za-z0-9_\-.]+/g, '_'); - } - - addProperty(res, tag, val) { - res.line('<' + tag + '>' + val + '</' + tag + '>'); - } - - addDependency(deps, groupId, artifactId, version, jar) { - if (!_.find(deps, (dep) => dep.groupId === groupId && dep.artifactId === artifactId)) - deps.push({groupId, artifactId, version, jar}); - } - - addResource(res, dir, exclude) { - res.startBlock('<resource>'); - if (dir) - this.addProperty(res, 'directory', dir); - - if (exclude) { - res.startBlock('<excludes>'); - this.addProperty(res, 'exclude', exclude); - res.endBlock('</excludes>'); - } - - res.endBlock('</resource>'); - } - - artifact(res, cluster, igniteVersion) { - this.addProperty(res, 'groupId', 'org.apache.ignite'); - this.addProperty(res, 'artifactId', this.escapeId(cluster.name) + '-project'); - this.addProperty(res, 'version', igniteVersion); - - res.needEmptyLine = true; - } - - dependencies(res, cluster, deps) { - if (!res) - res = $generatorCommon.builder(); - - res.startBlock('<dependencies>'); - - _.forEach(deps, (dep) => { - res.startBlock('<dependency>'); - - this.addProperty(res, 'groupId', dep.groupId); - this.addProperty(res, 'artifactId', dep.artifactId); - this.addProperty(res, 'version', dep.version); - - if (dep.jar) { - this.addProperty(res, 'scope', 'system'); - this.addProperty(res, 'systemPath', '${project.basedir}/jdbc-drivers/' + dep.jar); - } - - res.endBlock('</dependency>'); - }); - - res.endBlock('</dependencies>'); - - return res; - } - - build(res, cluster, excludeGroupIds) { - res.startBlock('<build>'); - res.startBlock('<resources>'); - this.addResource(res, 'src/main/java', '**/*.java'); - this.addResource(res, 'src/main/resources'); - res.endBlock('</resources>'); - - res.startBlock('<plugins>'); - res.startBlock('<plugin>'); - this.addProperty(res, 'artifactId', 'maven-dependency-plugin'); - res.startBlock('<executions>'); - res.startBlock('<execution>'); - this.addProperty(res, 'id', 'copy-libs'); - this.addProperty(res, 'phase', 'test-compile'); - res.startBlock('<goals>'); - this.addProperty(res, 'goal', 'copy-dependencies'); - res.endBlock('</goals>'); - res.startBlock('<configuration>'); - this.addProperty(res, 'excludeGroupIds', excludeGroupIds.join(',')); - this.addProperty(res, 'outputDirectory', 'target/libs'); - this.addProperty(res, 'includeScope', 'compile'); - this.addProperty(res, 'excludeTransitive', 'true'); - res.endBlock('</configuration>'); - res.endBlock('</execution>'); - res.endBlock('</executions>'); - res.endBlock('</plugin>'); - res.startBlock('<plugin>'); - this.addProperty(res, 'artifactId', 'maven-compiler-plugin'); - this.addProperty(res, 'version', '3.1'); - res.startBlock('<configuration>'); - this.addProperty(res, 'source', '1.7'); - this.addProperty(res, 'target', '1.7'); - res.endBlock('</configuration>'); - res.endBlock('</plugin>'); - res.endBlock('</plugins>'); - res.endBlock('</build>'); - - res.endBlock('</project>'); - } - - /** - * Generate pom.xml. - * - * @param cluster Cluster to take info about dependencies. - * @param igniteVersion Ignite version for Ignite dependencies. - * @param res Resulting output with generated pom. - * @returns {string} Generated content. - */ - generate(cluster, igniteVersion, res) { - const caches = cluster.caches; - const deps = []; - const storeDeps = []; - const excludeGroupIds = ['org.apache.ignite']; - - const blobStoreFactory = {cacheStoreFactory: {kind: 'CacheHibernateBlobStoreFactory'}}; - - if (!res) - res = $generatorCommon.builder(); - - _.forEach(caches, (cache) => { - if (cache.cacheStoreFactory && cache.cacheStoreFactory.kind) { - const storeFactory = cache.cacheStoreFactory[cache.cacheStoreFactory.kind]; - - if (storeFactory.dialect && (!storeFactory.connectVia || storeFactory.connectVia === 'DataSource')) { - const dep = POM_DEPENDENCIES[storeFactory.dialect]; - - this.addDependency(storeDeps, dep.groupId, dep.artifactId, dep.version, dep.jar); - } - } - }); - - res.line('<?xml version="1.0" encoding="UTF-8"?>'); - - res.needEmptyLine = true; - - res.line('<!-- ' + $generatorCommon.mainComment() + ' -->'); - - res.needEmptyLine = true; - - res.startBlock('<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">'); - - res.line('<modelVersion>4.0.0</modelVersion>'); - - res.needEmptyLine = true; - - this.artifact(res, cluster, igniteVersion); - - this.addDependency(deps, 'org.apache.ignite', 'ignite-core', igniteVersion); - - this.addDependency(deps, 'org.apache.ignite', 'ignite-spring', igniteVersion); - this.addDependency(deps, 'org.apache.ignite', 'ignite-indexing', igniteVersion); - this.addDependency(deps, 'org.apache.ignite', 'ignite-rest-http', igniteVersion); - - let dep = POM_DEPENDENCIES[cluster.discovery.kind]; - - if (dep) - this.addDependency(deps, 'org.apache.ignite', dep.artifactId, igniteVersion); - - if (_.find(cluster.igfss, (igfs) => igfs.secondaryFileSystemEnabled)) - this.addDependency(deps, 'org.apache.ignite', 'ignite-hadoop', igniteVersion); - - if (_.find(caches, blobStoreFactory)) - this.addDependency(deps, 'org.apache.ignite', 'ignite-hibernate', igniteVersion); - - if (cluster.logger && cluster.logger.kind) { - dep = POM_DEPENDENCIES[cluster.logger.kind]; - - if (dep) - this.addDependency(deps, 'org.apache.ignite', dep.artifactId, igniteVersion); - } - - this.dependencies(res, cluster, deps.concat(storeDeps)); - - res.needEmptyLine = true; - - this.build(res, cluster, excludeGroupIds); - - return res; - } -} - -export default ['GeneratorPom', GeneratorPom]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/configuration/generator/Xml.service.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/configuration/generator/Xml.service.js b/modules/web-console/src/main/js/app/modules/configuration/generator/Xml.service.js deleted file mode 100644 index 58d1ce0..0000000 --- a/modules/web-console/src/main/js/app/modules/configuration/generator/Xml.service.js +++ /dev/null @@ -1,21 +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 IGNITE-2052: need move $generatorXml to services. -export default ['GeneratorXml', () => { - return $generatorXml; -}]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/configuration/sidebar.directive.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/configuration/sidebar.directive.js b/modules/web-console/src/main/js/app/modules/configuration/sidebar.directive.js deleted file mode 100644 index e51553b..0000000 --- a/modules/web-console/src/main/js/app/modules/configuration/sidebar.directive.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. - */ - -export default ['igniteSidebar', ['igniteSidebar', (igniteSidebar) => { - function controller() { - const ctrl = this; - - ctrl.items = igniteSidebar; - } - - return { - restrict: 'A', - controller, - controllerAs: 'sidebar' - }; -}]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/dialog/dialog-content.directive.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/dialog/dialog-content.directive.js b/modules/web-console/src/main/js/app/modules/dialog/dialog-content.directive.js deleted file mode 100644 index 98e9903..0000000 --- a/modules/web-console/src/main/js/app/modules/dialog/dialog-content.directive.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. - */ - -export default ['igniteDialogContent', [() => { - const link = ($scope, $element, $attrs, igniteDialog) => { - igniteDialog.content = $element.html(); - - $element.hide(); - }; - - return { - scope: {}, - restrict: 'E', - link, - require: '^igniteDialog' - }; -}]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/dialog/dialog-title.directive.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/dialog/dialog-title.directive.js b/modules/web-console/src/main/js/app/modules/dialog/dialog-title.directive.js deleted file mode 100644 index ed4adb8..0000000 --- a/modules/web-console/src/main/js/app/modules/dialog/dialog-title.directive.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. - */ - -export default ['igniteDialogTitle', [() => { - const link = ($scope, $element, $attrs, igniteDialog) => { - igniteDialog.title = $element.text(); - - $element.hide(); - }; - - return { - scope: {}, - restrict: 'E', - link, - require: '^igniteDialog' - }; -}]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/dialog/dialog.controller.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/dialog/dialog.controller.js b/modules/web-console/src/main/js/app/modules/dialog/dialog.controller.js deleted file mode 100644 index 05518d3..0000000 --- a/modules/web-console/src/main/js/app/modules/dialog/dialog.controller.js +++ /dev/null @@ -1,40 +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 ['$rootScope', '$scope', 'IgniteDialog', function($root, $scope, IgniteDialog) { - const ctrl = this; - - const dialog = new IgniteDialog({ - scope: $scope - }); - - ctrl.show = () => { - dialog.$promise.then(dialog.show); - }; - - $scope.$watch(() => ctrl.title, () => { - $scope.title = ctrl.title; - }); - - $scope.$watch(() => ctrl.content, () => { - $scope.content = ctrl.content; - }); - - $root.$on('$stateChangeStart', () => { - dialog.hide(); - }); -}]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/dialog/dialog.directive.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/dialog/dialog.directive.js b/modules/web-console/src/main/js/app/modules/dialog/dialog.directive.js deleted file mode 100644 index 7aab10f..0000000 --- a/modules/web-console/src/main/js/app/modules/dialog/dialog.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. - */ - -import controller from './dialog.controller'; - -const template = '<a ng-click="ctrl.show()"><span ng-transclude=""></span></a>'; - -export default ['igniteDialog', [() => { - return { - restrict: 'E', - template, - controller, - controllerAs: 'ctrl', - replace: true, - transclude: true, - require: '^igniteDialog' - }; -}]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/dialog/dialog.factory.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/dialog/dialog.factory.js b/modules/web-console/src/main/js/app/modules/dialog/dialog.factory.js deleted file mode 100644 index e15891f..0000000 --- a/modules/web-console/src/main/js/app/modules/dialog/dialog.factory.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 templateUrl from './dialog.jade'; - -export default ['IgniteDialog', ['$modal', ($modal) => { - const defaults = { - templateUrl, - placement: 'center', - show: false - }; - - return function(options) { - options = _.extend({}, defaults, options); - - return $modal(options); - }; -}]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/dialog/dialog.jade ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/dialog/dialog.jade b/modules/web-console/src/main/js/app/modules/dialog/dialog.jade deleted file mode 100644 index 0043709..0000000 --- a/modules/web-console/src/main/js/app/modules/dialog/dialog.jade +++ /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. - -.modal(tabindex='-1' role='dialog') - .modal-dialog - .modal-content - .modal-header - button.close(ng-click='$hide()' aria-hidden='true') × - h4.modal-title {{title}} - .modal-body(ng-show='content') - p(ng-bind-html='content' style='text-align: left;') - .modal-footer - button.btn.btn-primary(id='confirm-btn-confirm' ng-click='$hide()') Ok http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/dialog/dialog.module.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/dialog/dialog.module.js b/modules/web-console/src/main/js/app/modules/dialog/dialog.module.js deleted file mode 100644 index c9ba9f9..0000000 --- a/modules/web-console/src/main/js/app/modules/dialog/dialog.module.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 angular from 'angular'; - -import igniteDialog from './dialog.directive'; -import igniteDialogTitle from './dialog-title.directive'; -import igniteDialogContent from './dialog-content.directive'; -import IgniteDialog from './dialog.factory'; - -angular -.module('ignite-console.dialog', [ - -]) -.factory(...IgniteDialog) -.directive(...igniteDialog) -.directive(...igniteDialogTitle) -.directive(...igniteDialogContent); http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/form/field/bs-select-placeholder.directive.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/form/field/bs-select-placeholder.directive.js b/modules/web-console/src/main/js/app/modules/form/field/bs-select-placeholder.directive.js deleted file mode 100644 index 83f438d..0000000 --- a/modules/web-console/src/main/js/app/modules/form/field/bs-select-placeholder.directive.js +++ /dev/null @@ -1,47 +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. - */ - -// Override AngularStrap "bsSelect" in order to dynamically change placeholder and class. -export default ['bsSelect', [() => { - const link = (scope, $element, attrs, [ngModel]) => { - if (!ngModel) - return; - - const $render = ngModel.$render; - - ngModel.$render = () => { - $render(); - - const value = ngModel.$viewValue; - - if (_.isNil(value) || (attrs.multiple && !value.length)) { - $element.html(attrs.placeholder); - - $element.addClass('placeholder'); - } - else - $element.removeClass('placeholder'); - }; - }; - - return { - priority: 1, - restrict: 'A', - link, - require: ['?ngModel'] - }; -}]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/form/field/down.directive.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/form/field/down.directive.js b/modules/web-console/src/main/js/app/modules/form/field/down.directive.js deleted file mode 100644 index 91be945..0000000 --- a/modules/web-console/src/main/js/app/modules/form/field/down.directive.js +++ /dev/null @@ -1,43 +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 template = '<i class="tipField fa fa-arrow-down ng-scope" ng-click="down()"></i>'; - -export default ['igniteFormFieldDown', ['$tooltip', ($tooltip) => { - const link = (scope, $element) => { - $tooltip($element, { title: 'Move item down' }); - - scope.down = () => { - const i = scope.models.indexOf(scope.model); - scope.models.splice(i, 1); - scope.models.splice(i + 1, 0, scope.model); - }; - }; - - return { - restrict: 'E', - scope: { - model: '=ngModel', - models: '=models' - }, - template, - link, - replace: true, - transclude: true, - require: '^form' - }; -}]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/form/field/dropdown.directive.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/form/field/dropdown.directive.js b/modules/web-console/src/main/js/app/modules/form/field/dropdown.directive.js deleted file mode 100644 index 23c900a..0000000 --- a/modules/web-console/src/main/js/app/modules/form/field/dropdown.directive.js +++ /dev/null @@ -1,83 +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 templateUrl from './dropdown.jade'; - -export default ['igniteFormFieldDropdown', ['IgniteFormGUID', 'IgniteLegacyTable', (guid, LegacyTable) => { - const controller = () => {}; - - const link = (scope, $element, attrs, [form, label]) => { - const {id, name} = scope; - - scope.id = id || guid(); - - if (label) { - label.for = scope.id; - - scope.label = label; - - scope.$watch('required', (required) => { - label.required = required || false; - }); - } - - form.$defaults = form.$defaults || {}; - form.$defaults[name] = _.cloneDeep(scope.value); - - const setAsDefault = () => { - if (!form.$pristine) return; - - form.$defaults = form.$defaults || {}; - form.$defaults[name] = _.cloneDeep(scope.value); - }; - - scope.$watch(() => form.$pristine, setAsDefault); - scope.$watch('value', setAsDefault); - - scope.tableReset = () => { - LegacyTable.tableSaveAndReset(); - }; - }; - - return { - restrict: 'E', - scope: { - id: '@', - name: '@', - required: '=ngRequired', - value: '=ngModel', - - focus: '=ngFocus', - - onEnter: '@' - }, - bindToController: { - value: '=ngModel', - placeholder: '@', - options: '=', - ngDisabled: '=', - multiple: '=' - }, - link, - templateUrl, - controller, - controllerAs: 'dropdown', - replace: true, - transclude: true, - require: ['^form', '?^igniteFormField'] - }; -}]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/form/field/dropdown.jade ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/form/field/dropdown.jade b/modules/web-console/src/main/js/app/modules/form/field/dropdown.jade deleted file mode 100644 index 5b7cdf6..0000000 --- a/modules/web-console/src/main/js/app/modules/form/field/dropdown.jade +++ /dev/null @@ -1,61 +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. - -.input-tip - button.select-toggle.form-control( - ng-if='dropdown.multiple' - id='{{ id }}' - name='{{ name }}' - data-placeholder='{{ dropdown.placeholder }}' - - bs-select - bs-options='item.value as item.label for item in dropdown.options' - data-multiple='1' - - ng-model='dropdown.value' - ng-disabled='dropdown.ngDisabled || !dropdown.options || !dropdown.options.length' - - data-ng-required='required || false' - - ignite-on-enter='{{ onEnter }}' - - tabindex='0' - - data-ng-focus='tableReset()' - ) - - button.select-toggle.form-control( - ng-if='!dropdown.multiple' - id='{{ id }}' - name='{{ name }}' - data-placeholder='{{ dropdown.placeholder }}' - - bs-select - bs-options='item.value as item.label for item in dropdown.options' - - ng-model='dropdown.value' - ng-disabled='dropdown.ngDisabled || !dropdown.options || !dropdown.options.length' - - data-ng-required='required || false' - - ignite-on-enter='{{ onEnter }}' - - tabindex='0' - - data-ng-focus='tableReset()' - ) - - span(ng-transclude='') http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/form/field/field.css ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/form/field/field.css b/modules/web-console/src/main/js/app/modules/form/field/field.css deleted file mode 100644 index 3ea64f4..0000000 --- a/modules/web-console/src/main/js/app/modules/form/field/field.css +++ /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. - */ - -.indexField { - float: left; - line-height: 28px; - margin-right: 5px; - color: #ec1c24; -} http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/form/field/field.directive.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/form/field/field.directive.js b/modules/web-console/src/main/js/app/modules/form/field/field.directive.js deleted file mode 100644 index 630f74f..0000000 --- a/modules/web-console/src/main/js/app/modules/form/field/field.directive.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. - */ - -import templateUrl from './field.jade'; -import './field.css'; - -export default ['igniteFormField', [() => { - const controller = [function() { - const ctrl = this; - - ctrl.type = ctrl.type || 'external'; - }]; - - return { - restrict: 'E', - scope: {}, - bindToController: { - for: '@', - label: '@', - type: '@', - name: '@' - }, - templateUrl, - controller, - controllerAs: 'field', - replace: true, - transclude: true, - require: '^form' - }; -}]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6af6560a/modules/web-console/src/main/js/app/modules/form/field/field.jade ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/form/field/field.jade b/modules/web-console/src/main/js/app/modules/form/field/field.jade deleted file mode 100644 index 08250ac..0000000 --- a/modules/web-console/src/main/js/app/modules/form/field/field.jade +++ /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. - -div - div(ng-if='field.type == "external"') - label.col-xs-4.col-sm-4.col-md-4( - id='{{::field.for}}Label' - for='{{::field.for}}' - class='{{ field.required ? "required" : "" }}' - ) - span(ng-if='field.label') {{::field.label}}: - .col-xs-8.col-sm-8.col-md-8(ng-transclude='') - div(ng-if='field.type == "internal"') - label.col-xs-12.col-sm-12.col-md-12(ng-transclude id='{{::field.for}}Label')
