diff --git a/Jenkinsfile b/Jenkinsfile index 754b7a288..30b549181 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,6 +6,7 @@ pipeline { disableConcurrentBuilds() } environment { + PROJECT_NAME = 'salix' REGISTRY = 'registry.verdnatura.es' DOCKER_HOST_1 = 'vch1.verdnatura.es' DOCKER_HOST_2 = 'vch2.verdnatura.es' @@ -15,7 +16,7 @@ pipeline { stage('Checkout') { steps { script { - env.COMPOSE_PROJECT_NAME = env.JOB_NAME.replace('/', '-') + env.COMPOSE_PROJECT_NAME = "${env.PROJECT_NAME}-${env.BRANCH_NAME}" env.GIT_COMMITTER_EMAIL = sh( script: 'git --no-pager show -s --format="%ae"', returnStdout: true @@ -28,9 +29,6 @@ pipeline { case 'test': env.PORT = 5001 break - case 'test': - env.PORT = 5000 - break } switch (env.BRANCH_NAME) { case 'master': @@ -39,9 +37,6 @@ pipeline { case 'test': env.NODE_ENV = 'test' break - case 'dev': - env.NODE_ENV = 'development' - break } } echo "Committer: ${env.GIT_COMMITTER_EMAIL}" @@ -59,9 +54,10 @@ pipeline { } } stage('Test') { - when { - branch 'dev' - } + when { not { anyOf { + branch 'test' + branch 'master' + }}} environment { NODE_ENV = "" FIREFOX_BIN = "/opt/firefox/firefox-bin" @@ -75,9 +71,10 @@ pipeline { } } stage('Build') { - when { - not { branch 'dev' } - } + when { anyOf { + branch 'test' + branch 'master' + }} environment { CREDS = credentials('docker-registry') } @@ -92,9 +89,10 @@ pipeline { } } stage('Deploy') { - when { - not { branch 'dev' } - } + when { anyOf { + branch 'test' + branch 'master' + }} environment { DOCKER_TLS_VERIFY = 1 } @@ -124,9 +122,10 @@ pipeline { } } stage('Cleanup') { - when { - not { branch 'dev' } - } + when { anyOf { + branch 'test' + branch 'master' + }} steps { sh 'docker logout $REGISTRY' } @@ -135,9 +134,13 @@ pipeline { post { always { script { - if (env.BRANCH_NAME == 'dev') { - junit '*/junitresults.xml' - junit 'junitresults.xml' + if (!['master', 'test'].contains(env.BRANCH_NAME)) { + try { + junit '*/junitresults.xml' + junit 'junitresults.xml' + } catch (e) { + echo e.toString() + } } if (!env.GIT_COMMITTER_EMAIL) return diff --git a/front/core/components/check/check.html b/front/core/components/check/check.html index c2d16005a..0df887f9b 100644 --- a/front/core/components/check/check.html +++ b/front/core/components/check/check.html @@ -1,5 +1,5 @@ .mdl-checkbox { - width: initial; - } & > i { padding-left: 5px; position: absolute; - bottom: 3px; color: $color-font-secondary; - font-size: 20px !important + font-size: 20px !important; + cursor: help + } + + md-checkbox.md-checked .md-icon { + background-color: $color-main; } } diff --git a/front/core/components/label-value/label-value.js b/front/core/components/label-value/label-value.js index ecf3bf4b3..515df45c7 100644 --- a/front/core/components/label-value/label-value.js +++ b/front/core/components/label-value/label-value.js @@ -8,23 +8,37 @@ export default class Controller { this.hasInfo = Boolean($attrs.info); this.info = $attrs.info || null; } + set label(value) { let label = this.element.querySelector('vn-label'); label.textContent = this._.instant(value); this._label = value; } + get label() { return this._label; } + set value(value) { let span = this.element.querySelector('span'); span.title = value; span.textContent = value ? value : '-'; this._value = value; } + get value() { return this._value; } + + get title() { + return this._title; + } + + set title(value) { + let span = this.element.querySelector('span'); + span.title = value; + this._title = value; + } } Controller.$inject = ['$element', '$translate', '$attrs']; @@ -32,6 +46,7 @@ ngModule.component('vnLabelValue', { controller: Controller, template: require('./label-value.html'), bindings: { + title: '@?', label: '@', value: '@' } diff --git a/front/core/components/treeview/child.html b/front/core/components/treeview/child.html index af5fe128b..8589790ec 100644 --- a/front/core/components/treeview/child.html +++ b/front/core/components/treeview/child.html @@ -1,24 +1,24 @@