Loading .gitlab-ci.yml +2 −7 Original line number Diff line number Diff line Loading @@ -109,21 +109,16 @@ prepare-built-version: - dist*.tar.gz .deploy: script: - > deploy.sh IMAGE_NAME=${IMAGE_NAME} IMAGE_TAG=${IMAGE_TAG} COMPOSE_FILE=${COMPOSE_FILE} PUBLIC_HOSTNAME=${PUBLIC_HOSTNAME} OAUTH_URL=${OAUTH_URL} OAUTH_CLIENT_SECRET=${OAUTH_CLIENT_SECRET} API_URL=${API_URL} PRODUCTION=${PRODUCTION} environment: url: https://${PUBLIC_HOSTNAME} .deploy-development: variables: PRODUCTION: 0 DD_PRODUCTION: 0 .deploy-production: variables: PRODUCTION: 1 DD_PRODUCTION: 1 run-functional-tests: stage: test-deploy Loading deploy/docker-compose.tmpl.yml +3 −1 Original line number Diff line number Diff line Loading @@ -35,12 +35,14 @@ services: traefik.port: '${PORT}' restart_policy: delay: 10s window: 1m update_config: delay: 10s resources: limits: cpus: '1' memory: 128M reservations: cpus: '0.001' memory: 64M networks: Loading public/javascript/app/base/models/_Persistent.jsdeleted 100644 → 0 +0 −76 Original line number Diff line number Diff line define([ 'app/redmicConfig' , 'dojo/_base/declare' , 'dojo/_base/lang' , 'dojo/Deferred' , 'dojo/json' , 'dojo/request' ], function( redmicConfig , declare , lang , Deferred , JSON , request ){ return declare(null, { // summary: // Funcionalidades de persistencia para el modelo. // description: // Proporciona método 'save' al modelo. constructor: function(args) { this.config = { headers: { 'Content-Type': 'application/json', 'Accept': 'application/javascript, application/json' }, handleAs: 'json' }; lang.mixin(this, this.config, args); }, save: function() { if (!this.isValid) { console.error('Tried to save invalid model \'%s\' with this schema:', this.get('modelName'), this.get('schema')); return; } if (!this.hasChanged) { console.error('Tried to save unchanged model \'%s\' with this schema:', this.get('modelName'), this.get('schema')); return; } var envDfd = window.env, dfd = new Deferred(); if (envDfd) { envDfd.then(lang.hitch(this, function(retDfd, envData) { var id = this.getIdValue(), method = this.get('isNew') ? 'POST' : 'PUT', data = JSON.stringify(this.serialize()), target = redmicConfig.getServiceUrl(this.target, envData) + '/'; var reqDfd = request(id ? target + id : target, { headers: this.headers, handleAs: this.handleAs, method: method, data: data }); reqDfd.then(lang.hitch(retDfd, retDfd.resolve), lang.hitch(retDfd, retDfd.reject)); }, dfd)); } return dfd; } }); }); public/javascript/app/base/views/_SettingsHandler.js 0 → 100644 +78 −0 Original line number Diff line number Diff line define([ 'dojo/_base/declare' , 'dojo/_base/lang' , 'dojo/aspect' , 'redmic/modules/base/_ListenQueryParams' , 'redmic/modules/base/_Selection' ], function( declare , lang , aspect , _ListenQueryParams , _Selection ) { return declare([_Selection, _ListenQueryParams], { // summary: // Reconoce un identificador de settings para aplicarlos a la vista actual. constructor: function(args) { this.config = { settingsHandlerActions: { CLONE_SELECTION: 'cloneSelection' }, settingsHandlerEvents: { CLONE_SELECTION: 'cloneSelection' } }; lang.mixin(this, this.config, args); aspect.before(this, '_mixEventsAndActions', this._mixSettingsHandlerEventsAndActionsView); aspect.after(this, '_definePublications', this._defineSettingsHandlerPublications); }, _mixSettingsHandlerEventsAndActionsView: function() { lang.mixin(this.events, this.settingsHandlerEvents); lang.mixin(this.actions, this.settingsHandlerActions); delete this.settingsHandlerEvents; delete this.settingsHandlerActions; }, _defineSettingsHandlerPublications: function() { this.publicationsConfig.push({ event: 'CLONE_SELECTION', channel: this._buildChannel(this.selectorChannel, this.actions.CLONE_SELECTION) }); }, postCreate: function() { this.inherited(arguments); this._emitEvt('GET_QUERY_PARAMS'); }, _gotQueryParam: function(param, value) { if (param === 'settings-id') { this._onSettingsIdReceived(value); } }, _onSettingsIdReceived: function(settingsId) { this._emitEvt('CLEAR_SELECTION', { omitPersistence: true }); this._emitEvt('CLONE_SELECTION', { target: this.selectionTarget || this.target, id: settingsId }); } }); }); public/javascript/app/base/views/_View.js +11 −27 Original line number Diff line number Diff line Loading @@ -4,29 +4,24 @@ define([ , "dojo/aspect" , "app/base/views/_ListenRequestError" , "app/base/views/_ViewHandle" // QUITAR ,'./_SettingsHandler' ], function( declare , lang , aspect , _ListenRequestError , _ViewHandle // QUITAR , _SettingsHandler ) { return declare([_ListenRequestError, _ViewHandle], { // summary: // Base común para todas los módulos usados como vistas. // region: String // Región del ContentPane. // baseClass: String // Clase base del ContentPane. return declare([_ListenRequestError, _ViewHandle, _SettingsHandler], { // summary: // Extensión común para todas los módulos usados como vistas. Se adjunta automáticamente cuando la // navegación a través de la app requiere un módulo como contenido principal a mostrar. constructor: function(args) { this.config = { title: 'View', ownChannel: "view", region: "center", baseClass: "", viewActions: { PUT_META_TAGS: "putMetaTags" }, Loading @@ -37,18 +32,15 @@ define([ lang.mixin(this, this.config, args); this._initializeView && aspect.before(this, "_initialize", this._initializeView); this._mixEventsAndActionsView && aspect.before(this, "_mixEventsAndActions", this._mixEventsAndActionsView); this._doEvtFacadeView && aspect.before(this, "_doEvtFacade", this._doEvtFacadeView); this._setOwnCallbacksForEventsView && aspect.before(this, "_setOwnCallbacksForEvents", this._setOwnCallbacksForEventsView); this._defineViewSubscriptions && aspect.after(this, "_defineSubscriptions", this._defineViewSubscriptions); this._defineViewPublications && aspect.after(this, "_definePublications", this._defineViewPublications); this._initializeView && aspect.before(this, "_initialize", this._initializeView); aspect.after(this, "_definePublications", this._defineViewPublications); aspect.before(this, "_beforeShow", this._beforeShowView); aspect.before(this, "_afterShow", this._afterShowView); }, Loading @@ -75,9 +67,6 @@ define([ _afterShowView: function(request) { //this.startup(); //this.resize(); //this._publish(this._buildChannel(this.loadingChannel, this.actions.LOADED)); this._putMetaTags(); }, Loading @@ -97,11 +86,6 @@ define([ } }, _getNodeToShow: function() { return this.containerNode; }, _goTo404: function() { window.location.href = "/404"; Loading Loading
.gitlab-ci.yml +2 −7 Original line number Diff line number Diff line Loading @@ -109,21 +109,16 @@ prepare-built-version: - dist*.tar.gz .deploy: script: - > deploy.sh IMAGE_NAME=${IMAGE_NAME} IMAGE_TAG=${IMAGE_TAG} COMPOSE_FILE=${COMPOSE_FILE} PUBLIC_HOSTNAME=${PUBLIC_HOSTNAME} OAUTH_URL=${OAUTH_URL} OAUTH_CLIENT_SECRET=${OAUTH_CLIENT_SECRET} API_URL=${API_URL} PRODUCTION=${PRODUCTION} environment: url: https://${PUBLIC_HOSTNAME} .deploy-development: variables: PRODUCTION: 0 DD_PRODUCTION: 0 .deploy-production: variables: PRODUCTION: 1 DD_PRODUCTION: 1 run-functional-tests: stage: test-deploy Loading
deploy/docker-compose.tmpl.yml +3 −1 Original line number Diff line number Diff line Loading @@ -35,12 +35,14 @@ services: traefik.port: '${PORT}' restart_policy: delay: 10s window: 1m update_config: delay: 10s resources: limits: cpus: '1' memory: 128M reservations: cpus: '0.001' memory: 64M networks: Loading
public/javascript/app/base/models/_Persistent.jsdeleted 100644 → 0 +0 −76 Original line number Diff line number Diff line define([ 'app/redmicConfig' , 'dojo/_base/declare' , 'dojo/_base/lang' , 'dojo/Deferred' , 'dojo/json' , 'dojo/request' ], function( redmicConfig , declare , lang , Deferred , JSON , request ){ return declare(null, { // summary: // Funcionalidades de persistencia para el modelo. // description: // Proporciona método 'save' al modelo. constructor: function(args) { this.config = { headers: { 'Content-Type': 'application/json', 'Accept': 'application/javascript, application/json' }, handleAs: 'json' }; lang.mixin(this, this.config, args); }, save: function() { if (!this.isValid) { console.error('Tried to save invalid model \'%s\' with this schema:', this.get('modelName'), this.get('schema')); return; } if (!this.hasChanged) { console.error('Tried to save unchanged model \'%s\' with this schema:', this.get('modelName'), this.get('schema')); return; } var envDfd = window.env, dfd = new Deferred(); if (envDfd) { envDfd.then(lang.hitch(this, function(retDfd, envData) { var id = this.getIdValue(), method = this.get('isNew') ? 'POST' : 'PUT', data = JSON.stringify(this.serialize()), target = redmicConfig.getServiceUrl(this.target, envData) + '/'; var reqDfd = request(id ? target + id : target, { headers: this.headers, handleAs: this.handleAs, method: method, data: data }); reqDfd.then(lang.hitch(retDfd, retDfd.resolve), lang.hitch(retDfd, retDfd.reject)); }, dfd)); } return dfd; } }); });
public/javascript/app/base/views/_SettingsHandler.js 0 → 100644 +78 −0 Original line number Diff line number Diff line define([ 'dojo/_base/declare' , 'dojo/_base/lang' , 'dojo/aspect' , 'redmic/modules/base/_ListenQueryParams' , 'redmic/modules/base/_Selection' ], function( declare , lang , aspect , _ListenQueryParams , _Selection ) { return declare([_Selection, _ListenQueryParams], { // summary: // Reconoce un identificador de settings para aplicarlos a la vista actual. constructor: function(args) { this.config = { settingsHandlerActions: { CLONE_SELECTION: 'cloneSelection' }, settingsHandlerEvents: { CLONE_SELECTION: 'cloneSelection' } }; lang.mixin(this, this.config, args); aspect.before(this, '_mixEventsAndActions', this._mixSettingsHandlerEventsAndActionsView); aspect.after(this, '_definePublications', this._defineSettingsHandlerPublications); }, _mixSettingsHandlerEventsAndActionsView: function() { lang.mixin(this.events, this.settingsHandlerEvents); lang.mixin(this.actions, this.settingsHandlerActions); delete this.settingsHandlerEvents; delete this.settingsHandlerActions; }, _defineSettingsHandlerPublications: function() { this.publicationsConfig.push({ event: 'CLONE_SELECTION', channel: this._buildChannel(this.selectorChannel, this.actions.CLONE_SELECTION) }); }, postCreate: function() { this.inherited(arguments); this._emitEvt('GET_QUERY_PARAMS'); }, _gotQueryParam: function(param, value) { if (param === 'settings-id') { this._onSettingsIdReceived(value); } }, _onSettingsIdReceived: function(settingsId) { this._emitEvt('CLEAR_SELECTION', { omitPersistence: true }); this._emitEvt('CLONE_SELECTION', { target: this.selectionTarget || this.target, id: settingsId }); } }); });
public/javascript/app/base/views/_View.js +11 −27 Original line number Diff line number Diff line Loading @@ -4,29 +4,24 @@ define([ , "dojo/aspect" , "app/base/views/_ListenRequestError" , "app/base/views/_ViewHandle" // QUITAR ,'./_SettingsHandler' ], function( declare , lang , aspect , _ListenRequestError , _ViewHandle // QUITAR , _SettingsHandler ) { return declare([_ListenRequestError, _ViewHandle], { // summary: // Base común para todas los módulos usados como vistas. // region: String // Región del ContentPane. // baseClass: String // Clase base del ContentPane. return declare([_ListenRequestError, _ViewHandle, _SettingsHandler], { // summary: // Extensión común para todas los módulos usados como vistas. Se adjunta automáticamente cuando la // navegación a través de la app requiere un módulo como contenido principal a mostrar. constructor: function(args) { this.config = { title: 'View', ownChannel: "view", region: "center", baseClass: "", viewActions: { PUT_META_TAGS: "putMetaTags" }, Loading @@ -37,18 +32,15 @@ define([ lang.mixin(this, this.config, args); this._initializeView && aspect.before(this, "_initialize", this._initializeView); this._mixEventsAndActionsView && aspect.before(this, "_mixEventsAndActions", this._mixEventsAndActionsView); this._doEvtFacadeView && aspect.before(this, "_doEvtFacade", this._doEvtFacadeView); this._setOwnCallbacksForEventsView && aspect.before(this, "_setOwnCallbacksForEvents", this._setOwnCallbacksForEventsView); this._defineViewSubscriptions && aspect.after(this, "_defineSubscriptions", this._defineViewSubscriptions); this._defineViewPublications && aspect.after(this, "_definePublications", this._defineViewPublications); this._initializeView && aspect.before(this, "_initialize", this._initializeView); aspect.after(this, "_definePublications", this._defineViewPublications); aspect.before(this, "_beforeShow", this._beforeShowView); aspect.before(this, "_afterShow", this._afterShowView); }, Loading @@ -75,9 +67,6 @@ define([ _afterShowView: function(request) { //this.startup(); //this.resize(); //this._publish(this._buildChannel(this.loadingChannel, this.actions.LOADED)); this._putMetaTags(); }, Loading @@ -97,11 +86,6 @@ define([ } }, _getNodeToShow: function() { return this.containerNode; }, _goTo404: function() { window.location.href = "/404"; Loading