Compare commits
306 Commits
dev
...
tests-chan
Author | SHA1 | Date |
---|---|---|
|
bf25e871f3 | |
|
3aad2eaeec | |
|
0f1bde3b77 | |
|
99c1386627 | |
|
d913eba277 | |
|
dedb8a73a5 | |
|
09866f5b41 | |
|
41196b4a23 | |
|
65923fee9f | |
|
52e45b93a0 | |
|
221d0e7b8c | |
|
e7289b05e9 | |
|
9fb67992ae | |
|
be0636a832 | |
|
0aeacc88bc | |
|
e4770c045d | |
|
9cff4a9ea6 | |
|
f52ee3f649 | |
|
3c3e88b044 | |
|
c61b047fed | |
|
b80d6e499a | |
|
0661f4dd74 | |
|
f8da4a09bb | |
|
456522e1dd | |
|
11e1404b93 | |
|
0806f63d8d | |
|
af7db23fed | |
|
3ddf73c958 | |
|
26320f098f | |
|
7d0d52c704 | |
|
63b43506ab | |
|
16b1e205d3 | |
|
7c2f6183b0 | |
|
8fd4448aab | |
|
2507b7c7e2 | |
|
fe2b1e3e79 | |
|
77bc288682 | |
|
cc06eaa203 | |
|
cf17529b80 | |
|
151ec4bcbb | |
|
33bc413e8c | |
|
e7aebc371e | |
|
fed067c533 | |
|
f1f40527bc | |
|
65280ccbc9 | |
|
5b84a03e16 | |
|
850f4ba804 | |
|
b05aaa36ba | |
|
bc97cd4a0a | |
|
56a4d46ac8 | |
|
b47b63a550 | |
|
0280a1ae82 | |
|
fdda9a56c4 | |
|
d6a8fa03dc | |
|
65b9d3d139 | |
|
ba0883fc7a | |
|
18e9f7cbe1 | |
|
2bf1c1f6dc | |
|
a8d5f06866 | |
|
cfceee4838 | |
|
6c9e3bbc55 | |
|
a285e1acc7 | |
|
bf6690113d | |
|
3c18f64d58 | |
|
aec14f8ebd | |
|
e1be2703e8 | |
|
46b828bd0c | |
|
dfc8096b19 | |
|
1dc5bfe90c | |
|
8fc5c8e3e4 | |
|
3219d44bdb | |
|
833e464a99 | |
|
650fa0006f | |
|
94a105ab31 | |
|
56262d91b4 | |
|
247ad94199 | |
|
e554dd1cb1 | |
|
5a0dc0a927 | |
|
8863b6428c | |
|
f27dd79dcc | |
|
bb28805d23 | |
|
484e41e86b | |
|
0fc1fc58e6 | |
|
69abcf6870 | |
|
dff5820ed4 | |
|
ab7c1d1fe0 | |
|
f70b98b514 | |
|
22153c5171 | |
|
12ff0b5845 | |
|
1471d323d6 | |
|
879e3cbb44 | |
|
a142ceb151 | |
|
e4bc14ef3b | |
|
40444ac46a | |
|
5f0a2f9181 | |
|
eea2ad7984 | |
|
0bec75b2d3 | |
|
186ec60937 | |
|
cb1542937a | |
|
cfff9f7aeb | |
|
ff423ae79b | |
|
693b309e79 | |
|
62349278ed | |
|
9450be744a | |
|
bbaa6f936e | |
|
8021a171f8 | |
|
2d9225f05f | |
|
cd7a4b13f6 | |
|
4c041f42b2 | |
|
c9812cd320 | |
|
b669adab5a | |
|
1cbbc092be | |
|
56cf0f0e64 | |
|
0b70344708 | |
|
ec9d2bce56 | |
|
851d97f321 | |
|
c72bfdc100 | |
|
57e1f66a94 | |
|
ef3b41e4e2 | |
|
a97219ad59 | |
|
0246e39f0f | |
|
e5efdff1d8 | |
|
15c5dc761f | |
|
514af4f11e | |
|
72da0cb5a1 | |
|
baa1422025 | |
|
261fddb1cf | |
|
c950bf5ef1 | |
|
fdff59a74d | |
|
68f32c36e7 | |
|
3e93f14196 | |
|
5cab14f371 | |
|
49244a411c | |
|
2eb0963829 | |
|
477c42b964 | |
|
baaff90aef | |
|
4111dd8669 | |
|
ce7e04379a | |
|
6927b86570 | |
|
577a6281b8 | |
|
4358ef70c0 | |
|
d8ec175328 | |
|
0f5014088d | |
|
202c22b8a9 | |
|
58b7325605 | |
|
e6f0320cf5 | |
|
fac528b42f | |
|
101ac917a2 | |
|
0529505cc2 | |
|
622ce6ae28 | |
|
8664f40e06 | |
|
e39cab82f6 | |
|
72cd9e6cd6 | |
|
ff0d2db8fe | |
|
bbaa6d87ff | |
|
c3e3b4d7b6 | |
|
d824df5eb0 | |
|
f4fea5e904 | |
|
d09f90d47c | |
|
bc97e000b8 | |
|
cdf534e70b | |
|
f8e67f0d98 | |
|
2b41bc31c1 | |
|
cc44041e31 | |
|
85eee7bb7a | |
|
2a43ab023a | |
|
be868b60ab | |
|
f56d4cca14 | |
|
67847e798b | |
|
79ddbe4916 | |
|
8ffe9a6a96 | |
|
21b6e96148 | |
|
f1a8fd2710 | |
|
59e8285bd2 | |
|
2176c6e259 | |
|
533c7560dc | |
|
c4a64bff91 | |
|
3c71c71df1 | |
|
e76e4e4f8c | |
|
f95a8c9daa | |
|
2758dcf2c8 | |
|
facb565d26 | |
|
a7edc9b87a | |
|
93e739f35c | |
|
65e0d752d6 | |
|
418911b903 | |
|
decf955224 | |
|
d736ea716b | |
|
a9427ddab9 | |
|
057bfae517 | |
|
929623949b | |
|
38a88bb0cc | |
|
265ff5c47f | |
|
c41d1430f7 | |
|
2bff9304e8 | |
|
c53658e6e0 | |
|
e94f8c6b23 | |
|
c52fe7a870 | |
|
bfbe3621d6 | |
|
05568280f3 | |
|
6bfa5b9715 | |
|
6631be401b | |
|
ba2ded5c48 | |
|
723a977ecd | |
|
a1d67ebc6f | |
|
7026e3416f | |
|
975495113d | |
|
8e0f09cc0f | |
|
95e23c05fa | |
|
6423ecfb05 | |
|
3a21292030 | |
|
f2bd3c2fa6 | |
|
020e0afc96 | |
|
766417bb73 | |
|
c77c2e6648 | |
|
6fe518601f | |
|
cb2c9871cc | |
|
a832a1889a | |
|
7c4123ca0b | |
|
facbe9b990 | |
|
57880705d0 | |
|
ed29a1939c | |
|
5456db8add | |
|
053b9f8457 | |
|
8866331926 | |
|
33ef1da2a9 | |
|
2e2c83dcde | |
|
73eb3dcbee | |
|
05d735702e | |
|
462a8a3cf8 | |
|
f821b8689a | |
|
e47edb9827 | |
|
25f4f822b4 | |
|
ef35914f34 | |
|
b19bf710e8 | |
|
17a519e2ee | |
|
95a2bfb69c | |
|
6e41548fdf | |
|
c86c1cc0c0 | |
|
87c151c057 | |
|
13af1d03a3 | |
|
14bef2383f | |
|
5053a908f7 | |
|
7e0c591026 | |
|
594b17b4ab | |
|
887ee8aea4 | |
|
44627dbc8a | |
|
f2c8b90324 | |
|
e0f55f8ca3 | |
|
f36eb1bd88 | |
|
b728ecaf29 | |
|
7c96106faa | |
|
a0fc1cfc07 | |
|
b66c47955c | |
|
ec14ca334a | |
|
7837925be9 | |
|
2fb892c71a | |
|
2a1cd59492 | |
|
76b99ed293 | |
|
67c6f84de3 | |
|
745e9a569c | |
|
ad2d494481 | |
|
24687e57e6 | |
|
c20f48b2bf | |
|
6bad41db20 | |
|
eb0328753a | |
|
e067f5f7bd | |
|
34a0d93ece | |
|
4256f45373 | |
|
93cc0d4286 | |
|
ef36566442 | |
|
06cd9b01d3 | |
|
7f831ae3a5 | |
|
382378e867 | |
|
401487dfd3 | |
|
aa4ccf65f5 | |
|
fb267b910b | |
|
24a9c130d1 | |
|
f59b37c722 | |
|
160552ff2f | |
|
83e3e034a8 | |
|
61062c1418 | |
|
2cbbaf619c | |
|
ec0d783672 | |
|
07c5f64265 | |
|
dcbc154caa | |
|
0d3da684b4 | |
|
8d2f041c46 | |
|
28b2dd386f | |
|
d589b89a62 | |
|
04660bd05e | |
|
1d6ec00c78 | |
|
ce557dc5b9 | |
|
4387a868bc | |
|
003f42dd03 | |
|
9dfeb2f7ef | |
|
8bea750244 | |
|
bf2094163d | |
|
e0cc4e40ba | |
|
47c6fe02ec | |
|
6458d8db5e | |
|
0234e14c6b | |
|
7e26aa773c | |
|
0d0be4ee5f | |
|
042b8b0309 | |
|
b7658b76cf |
|
@ -0,0 +1,9 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
|
@ -0,0 +1,8 @@
|
|||
/dist
|
||||
/src-bex/www
|
||||
/src-capacitor
|
||||
/src-cordova
|
||||
/.quasar
|
||||
/node_modules
|
||||
.eslintrc.js
|
||||
babel.config.js
|
|
@ -0,0 +1,86 @@
|
|||
module.exports = {
|
||||
// https://eslint.org/docs/user-guide/configuring#configuration-cascading-and-hierarchy
|
||||
// This option interrupts the configuration hierarchy at this file
|
||||
// Remove this if you have an higher level ESLint config file (it usually happens into a monorepos)
|
||||
root: true,
|
||||
|
||||
parserOptions: {
|
||||
parser: '@babel/eslint-parser',
|
||||
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
|
||||
sourceType: 'module' // Allows for the use of imports
|
||||
},
|
||||
|
||||
env: {
|
||||
browser: true,
|
||||
'vue/setup-compiler-macros': true
|
||||
},
|
||||
|
||||
extends: ['standard'],
|
||||
plugins: ['vue', 'prettier'],
|
||||
globals: {
|
||||
ga: 'readonly', // Google Analytics
|
||||
cordova: 'readonly',
|
||||
__statics: 'readonly',
|
||||
__QUASAR_SSR__: 'readonly',
|
||||
__QUASAR_SSR_SERVER__: 'readonly',
|
||||
__QUASAR_SSR_CLIENT__: 'readonly',
|
||||
__QUASAR_SSR_PWA__: 'readonly',
|
||||
process: 'readonly',
|
||||
Capacitor: 'readonly',
|
||||
chrome: 'readonly'
|
||||
},
|
||||
|
||||
// add your custom rules here
|
||||
rules: {
|
||||
// allow async-await
|
||||
'generator-star-spacing': 'off',
|
||||
// allow paren-less arrow functions
|
||||
'arrow-parens': 'off',
|
||||
'one-var': 'off',
|
||||
'no-void': 'off',
|
||||
'multiline-ternary': 'off',
|
||||
|
||||
'import/first': 'off',
|
||||
'import/named': 'error',
|
||||
'import/namespace': 'error',
|
||||
'import/default': 'error',
|
||||
'import/export': 'error',
|
||||
'import/extensions': 'off',
|
||||
'import/no-unresolved': 'off',
|
||||
'import/no-extraneous-dependencies': 'off',
|
||||
|
||||
'prefer-promise-reject-errors': 'off',
|
||||
semi: 'off',
|
||||
// allow debugger during development only
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: ['src/**/*.{js,vue,scss}', 'quasar.config.js'], // Aplica ESLint solo a archivos .js, .vue y .scss dentro de src (Proyecto de quasar)
|
||||
extends: [
|
||||
// Base ESLint recommended rules
|
||||
'eslint:recommended',
|
||||
// Uncomment any of the lines below to choose desired strictness,
|
||||
// but leave only one uncommented!
|
||||
// See https://eslint.vuejs.org/rules/#available-rules
|
||||
// 'plugin:vue/vue3-essential', // Priority A: Essential (Error Prevention)
|
||||
'plugin:vue/vue3-strongly-recommended', // Priority B: Strongly Recommended (Improving Readability)
|
||||
// 'plugin:vue/vue3-recommended', // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead)
|
||||
// https://github.com/prettier/eslint-config-prettier#installation
|
||||
// usage with Prettier, provided by 'eslint-config-prettier'.
|
||||
'prettier',
|
||||
'plugin:cypress/recommended'
|
||||
],
|
||||
rules: {
|
||||
semi: 'off',
|
||||
'space-before-function-paren': 'off',
|
||||
'prefer-promise-reject-errors': 'off',
|
||||
'vue/no-multiple-template-root': 'off'
|
||||
},
|
||||
parserOptions: {
|
||||
ecmaVersion: '2021'
|
||||
},
|
||||
plugins: ['vue']
|
||||
}
|
||||
]
|
||||
};
|
|
@ -1,15 +0,0 @@
|
|||
extends: eslint:recommended
|
||||
parserOptions:
|
||||
ecmaVersion: 2017
|
||||
sourceType: module
|
||||
rules:
|
||||
no-undef: 0
|
||||
no-redeclare: 0
|
||||
no-mixed-spaces-and-tabs: 0
|
||||
no-console: 0
|
||||
no-cond-assign: 0
|
||||
no-unexpected-multiline: 0
|
||||
brace-style: [error, 1tbs]
|
||||
space-before-function-paren: [error, never]
|
||||
padded-blocks: [error, never]
|
||||
func-call-spacing: [error, never]
|
|
@ -1,4 +1,36 @@
|
|||
node_modules
|
||||
build/
|
||||
config.my.php
|
||||
.vscode/
|
||||
|
||||
.DS_Store
|
||||
.thumbs.db
|
||||
node_modules
|
||||
|
||||
# Quasar core related directories
|
||||
.quasar
|
||||
/dist
|
||||
|
||||
# Cordova related directories and files
|
||||
/src-cordova/node_modules
|
||||
/src-cordova/platforms
|
||||
/src-cordova/plugins
|
||||
/src-cordova/www
|
||||
|
||||
# Capacitor related directories and files
|
||||
/src-capacitor/www
|
||||
/src-capacitor/node_modules
|
||||
|
||||
# BEX related directories and files
|
||||
/src-bex/www
|
||||
/src-bex/js/core
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
/* eslint-disable */
|
||||
// https://github.com/michael-ciniawsky/postcss-load-config
|
||||
|
||||
module.exports = {
|
||||
plugins: [
|
||||
// to edit target browsers: use "browserslist" field in package.json
|
||||
require('autoprefixer')
|
||||
]
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
module.exports = {
|
||||
printWidth: 80,
|
||||
tabWidth: 4,
|
||||
useTabs: false,
|
||||
singleQuote: true,
|
||||
bracketSpacing: true,
|
||||
arrowParens: 'avoid',
|
||||
trailingComma: 'none'
|
||||
};
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"recommendations": [
|
||||
"dbaeumer.vscode-eslint",
|
||||
"editorconfig.editorconfig",
|
||||
"vue.volar",
|
||||
"wayou.vscode-todo-highlight"
|
||||
],
|
||||
"unwantedRecommendations": [
|
||||
"octref.vetur",
|
||||
"hookyqr.beautify",
|
||||
"dbaeumer.jshint",
|
||||
"ms-vscode.vscode-typescript-tslint-plugin"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Listen for XDebug",
|
||||
"type": "php",
|
||||
"request": "launch",
|
||||
"port": 9000
|
||||
},
|
||||
{
|
||||
"name": "Launch currently open script",
|
||||
"type": "php",
|
||||
"request": "launch",
|
||||
"program": "${file}",
|
||||
"cwd": "${fileDirname}",
|
||||
"port": 9000
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"editor.bracketPairColorization.enabled": true,
|
||||
"editor.guides.bracketPairs": true,
|
||||
"editor.formatOnSave": true,
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.codeActionsOnSave": ["source.fixAll.eslint"],
|
||||
"eslint.validate": ["javascript", "javascriptreact", "typescript", "vue"],
|
||||
"cSpell.words": ["axios", "composables"]
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
# Not using buster because of bug: https://bugs.php.net/bug.php?id=78870
|
||||
FROM debian:stretch-slim
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
|
@ -23,19 +23,19 @@ RUN a2dissite 000-default
|
|||
|
||||
# NodeJs
|
||||
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - \
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
||||
&& apt-get install -y --no-install-recommends nodejs
|
||||
|
||||
# Hedera
|
||||
|
||||
RUN curl -sL https://apt.verdnatura.es/conf/verdnatura.gpg | apt-key add - \
|
||||
&& echo "deb http://apt.verdnatura.es/ stretch main" \
|
||||
&& echo "deb http://apt.verdnatura.es/ bookworm main" \
|
||||
> /etc/apt/sources.list.d/vn.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
php-apcu \
|
||||
php-image-text \
|
||||
php-text-captcha \
|
||||
php-apcu \
|
||||
php-zip \
|
||||
hedera-web \
|
||||
cron
|
||||
|
|
|
@ -1,87 +1,108 @@
|
|||
#!/usr/bin/env groovy
|
||||
|
||||
def PROTECTED_BRANCH
|
||||
def RUN_BUILD
|
||||
|
||||
def BRANCH_ENV = [
|
||||
test: 'test',
|
||||
master: 'production',
|
||||
beta: 'test'
|
||||
]
|
||||
def remote = [:]
|
||||
|
||||
node {
|
||||
stage('Setup') {
|
||||
env.NODE_ENV = BRANCH_ENV[env.BRANCH_NAME] ?: 'dev'
|
||||
|
||||
PROTECTED_BRANCH = [
|
||||
'dev',
|
||||
'test',
|
||||
'master',
|
||||
'beta'
|
||||
].contains(env.BRANCH_NAME)
|
||||
|
||||
RUN_BUILD = PROTECTED_BRANCH
|
||||
|
||||
echo "NODE_NAME: ${env.NODE_NAME}"
|
||||
echo "WORKSPACE: ${env.WORKSPACE}"
|
||||
}
|
||||
}
|
||||
pipeline {
|
||||
agent any
|
||||
environment {
|
||||
PROJECT_NAME = 'hedera-web'
|
||||
STACK_NAME = "${env.PROJECT_NAME}-${env.BRANCH_NAME}"
|
||||
}
|
||||
stages {
|
||||
stage('Checkout') {
|
||||
steps {
|
||||
script {
|
||||
def packageJson = readJSON file: 'package.json'
|
||||
env.VERSION = packageJson.version
|
||||
|
||||
switch (env.BRANCH_NAME) {
|
||||
case 'master':
|
||||
env.NODE_ENV = 'production'
|
||||
env.MAIN_REPLICAS = 3
|
||||
env.CRON_REPLICAS = 1
|
||||
break
|
||||
case 'test':
|
||||
env.NODE_ENV = 'test'
|
||||
env.MAIN_REPLICAS = 1
|
||||
env.CRON_REPLICAS = 0
|
||||
break
|
||||
}
|
||||
}
|
||||
setEnv()
|
||||
}
|
||||
}
|
||||
stage('Debuild') {
|
||||
when {
|
||||
anyOf {
|
||||
branch 'master'
|
||||
branch 'test'
|
||||
}
|
||||
expression { PROTECTED_BRANCH }
|
||||
}
|
||||
agent {
|
||||
docker {
|
||||
image 'registry.verdnatura.es/debuild:2.21.3-vn2'
|
||||
image 'registry.verdnatura.es/verdnatura/debuild:2.23.4-vn8'
|
||||
registryUrl 'https://registry.verdnatura.es/'
|
||||
registryCredentialsId 'docker-registry'
|
||||
args '-v /mnt/appdata/reprepro:/reprepro'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'debuild -us -uc -b'
|
||||
sh 'vn-includedeb stretch'
|
||||
}
|
||||
}
|
||||
stage('Container') {
|
||||
when {
|
||||
anyOf {
|
||||
branch 'master'
|
||||
branch 'test'
|
||||
sh 'mkdir -p debuild'
|
||||
sh 'mv ../hedera-web_* debuild'
|
||||
|
||||
script {
|
||||
def files = findFiles(glob: 'debuild/*.changes')
|
||||
files.each { file -> env.CHANGES_FILE = file.name }
|
||||
}
|
||||
|
||||
configFileProvider([
|
||||
configFile(fileId: "dput.cf", variable: 'DPUT_CONFIG')
|
||||
]) {
|
||||
sshagent(credentials: ['jenkins-agent']) {
|
||||
sh 'dput --config "$DPUT_CONFIG" verdnatura "debuild/$CHANGES_FILE"'
|
||||
}
|
||||
}
|
||||
}
|
||||
environment {
|
||||
CREDS = credentials('docker-registry')
|
||||
}
|
||||
steps {
|
||||
sh 'docker login --username $CREDS_USR --password $CREDS_PSW $REGISTRY'
|
||||
sh 'docker-compose build --build-arg BUILD_ID=$BUILD_ID --parallel'
|
||||
sh 'docker-compose push'
|
||||
}
|
||||
}
|
||||
stage('Deploy') {
|
||||
when {
|
||||
anyOf {
|
||||
branch 'master'
|
||||
branch 'test'
|
||||
}
|
||||
expression { PROTECTED_BRANCH }
|
||||
}
|
||||
environment {
|
||||
DOCKER_HOST = "${env.SWARM_HOST}"
|
||||
CREDS = credentials('docker-registry')
|
||||
IMAGE = "$REGISTRY/verdnatura/hedera-web"
|
||||
}
|
||||
steps {
|
||||
sh "docker stack deploy --with-registry-auth --compose-file docker-compose.yml ${env.STACK_NAME}"
|
||||
script {
|
||||
def packageJson = readJSON file: 'package.json'
|
||||
env.VERSION = "${packageJson.version}"
|
||||
env.TAG = "${packageJson.version}-build${env.BUILD_ID}"
|
||||
}
|
||||
|
||||
sh 'docker-compose build --build-arg BUILD_ID=$BUILD_ID --parallel'
|
||||
sh 'docker login --username $CREDS_USR --password $CREDS_PSW $REGISTRY'
|
||||
sh 'docker push $IMAGE:$TAG'
|
||||
|
||||
script {
|
||||
if (env.BRANCH_NAME == 'master') {
|
||||
sh 'docker tag $IMAGE:$TAG $IMAGE:latest'
|
||||
sh 'docker push $IMAGE:latest'
|
||||
}
|
||||
}
|
||||
|
||||
withKubeConfig([
|
||||
serverUrl: "$KUBERNETES_API",
|
||||
credentialsId: 'kubernetes',
|
||||
namespace: 'salix'
|
||||
]) {
|
||||
sh 'kubectl set image deployment/hedera-web-$BRANCH_NAME hedera-web-$BRANCH_NAME=$IMAGE:$TAG'
|
||||
sh 'kubectl set image deployment/hedera-web-cron-$BRANCH_NAME hedera-web-cron-$BRANCH_NAME=$IMAGE:$TAG'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
unsuccessful {
|
||||
setEnv()
|
||||
sendEmail()
|
||||
}
|
||||
}
|
||||
|
|
2
LICENSE
2
LICENSE
|
@ -1,4 +1,4 @@
|
|||
Copyright (C) 2016 - Juan Ferrer Toribio
|
||||
Copyright (C) 2024 - Verdnatura Levante SL
|
||||
|
||||
This package is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
24
README.md
24
README.md
|
@ -5,21 +5,31 @@ Hedera is the main web page for Verdnatura.
|
|||
## Getting Started
|
||||
|
||||
Required dependencies.
|
||||
* PHP >= 7.0
|
||||
* Node.js >= 8.0
|
||||
|
||||
- PHP >= 7.0
|
||||
- Node.js >= 18.0
|
||||
|
||||
Launch application for development.
|
||||
|
||||
```
|
||||
$ npm run dev
|
||||
$ quasar dev
|
||||
```
|
||||
|
||||
Launch Salix backend.
|
||||
|
||||
```
|
||||
|
||||
pnpm run back
|
||||
```
|
||||
|
||||
Run server side method from command line.
|
||||
|
||||
```
|
||||
$ php hedera-web.php -m method_path
|
||||
php hedera-web.php -m method_path
|
||||
```
|
||||
|
||||
## Built with
|
||||
|
||||
* [Webpack](https://webpack.js.org/)
|
||||
* [MooTools](https://mootools.net/)
|
||||
* [TinyMCE](https://www.tinymce.com/)
|
||||
- [Webpack](https://webpack.js.org/)
|
||||
- [MooTools](https://mootools.net/)
|
||||
- [TinyMCE](https://www.tinymce.com/)
|
||||
|
|
41
app.js
41
app.js
|
@ -1,41 +0,0 @@
|
|||
__webpack_public_path__ = _PUBLIC_PATH;
|
||||
|
||||
import 'promise-polyfill/src/polyfill';
|
||||
import 'hedera/hedera';
|
||||
const locales = require('./import').locales;
|
||||
const packageJson = require('./package.json');
|
||||
|
||||
window.onload = function() {
|
||||
loadLocale(main);
|
||||
}
|
||||
|
||||
function main() {
|
||||
Vn.setVersion(packageJson.version);
|
||||
const hederaWeb = new Hedera.App();
|
||||
window.hederaWeb = hederaWeb;
|
||||
hederaWeb.run();
|
||||
}
|
||||
|
||||
function loadLocale(callback) {
|
||||
Vn.Locale.init();
|
||||
var lang = Vn.Locale.language;
|
||||
|
||||
var req = require.context('js', true, /locale\/en.yml$/);
|
||||
onLocaleLoad(Vn.Locale.fallbackLang, req);
|
||||
|
||||
const loadFn = locales[lang];
|
||||
if (loadFn)
|
||||
loadFn(function(req) {
|
||||
onLocaleLoad(lang, req);
|
||||
callback();
|
||||
});
|
||||
else
|
||||
callback();
|
||||
}
|
||||
|
||||
function onLocaleLoad(lang, req) {
|
||||
var keys = req.keys();
|
||||
|
||||
for (var i = 0; i < keys.length; i++)
|
||||
Vn.Locale.add(req(keys[i]), lang);
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
/* eslint-disable */
|
||||
|
||||
module.exports = api => {
|
||||
return {
|
||||
presets: [
|
||||
[
|
||||
'@quasar/babel-preset-app',
|
||||
api.caller(caller => caller && caller.target === 'node')
|
||||
? { targets: { node: 'current' } }
|
||||
: {}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
|
@ -9,14 +9,26 @@
|
|||
</IfModule>
|
||||
|
||||
<VirtualHost *:80>
|
||||
DocumentRoot /usr/share/hedera-web/
|
||||
DocumentRoot /usr/share/hedera-web/spa
|
||||
|
||||
RewriteEngine On
|
||||
RewriteCond %{QUERY_STRING} (^|&)srv=([^&]+) [OR]
|
||||
RewriteCond %{REQUEST_METHOD} POST
|
||||
RewriteRule ^/$ /usr/share/hedera-web/back/index.php [L]
|
||||
</VirtualHost>
|
||||
|
||||
<Directory /usr/share/hedera-web/>
|
||||
<Directory /usr/share/hedera-web/back>
|
||||
Options -Indexes -FollowSymLinks
|
||||
AllowOverride None
|
||||
Require all granted
|
||||
|
||||
SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
|
||||
</Directory>
|
||||
|
||||
<Directory /usr/share/hedera-web/spa>
|
||||
Options -FollowSymLinks
|
||||
AllowOverride None
|
||||
Require all granted
|
||||
|
||||
<FilesMatch "\.(css|js|json|yml|php|xml|html|svg)$">
|
||||
SetOutputFilter DEFLATE
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
require_once __DIR__.'/../php-vn-lib/env.php';
|
||||
require_once __DIR__.'/../../php-vn-lib/env.php';
|
||||
|
||||
set_include_path(__DIR__.PATH_SEPARATOR.get_include_path());
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"name": "hedera-web-back",
|
||||
"version": "24.50.14",
|
||||
"description": "Verdnatura web page backend",
|
||||
"license": "GPL-3.0",
|
||||
"author": "Verdnatura Levante SL"
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
const { defineConfig } = require('cypress');
|
||||
|
||||
module.exports = defineConfig({
|
||||
e2e: {
|
||||
baseUrl: 'http://localhost:8080/',
|
||||
supportFile: 'src/test/cypress/support/index.js',
|
||||
fixturesFolder: 'src/test/cypress/fixtures',
|
||||
specPattern: 'src/test/cypress/integration/**/*.spec.js',
|
||||
viewportHeight: 660,
|
||||
viewportWidth: 1240,
|
||||
experimentalMemoryManagement: true,
|
||||
numTestsKeptInMemory: 0,
|
||||
video: false,
|
||||
screenshotOnRunFailure: false,
|
||||
reporter: 'cypress-mochawesome-reporter',
|
||||
reporterOptions: {
|
||||
charts: true,
|
||||
reportPageTitle: 'Hedera-Web E2E Reporter',
|
||||
embeddedScreenshots: true,
|
||||
reportDir: 'src/test/cypress/reports',
|
||||
inlineAssets: true
|
||||
},
|
||||
setupNodeEvents (on, config) {
|
||||
require('cypress-mochawesome-reporter/plugin')(on);
|
||||
on('after:spec', (spec, results) => {
|
||||
console.log('Finished running', spec.relative);
|
||||
console.log('❌spec:', results.stats.failures);
|
||||
console.log('✅spec:', results.stats.passes);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
|
@ -1,4 +1,4 @@
|
|||
hedera-web (22.48.2) stable; urgency=low
|
||||
hedera-web (24.50.14) stable; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
|
|
|
@ -1,19 +1,12 @@
|
|||
apache.conf etc/hedera-web
|
||||
config.php etc/hedera-web
|
||||
php.ini etc/hedera-web
|
||||
web usr/share/php/vn
|
||||
doc/* usr/share/doc/hedera-web
|
||||
hedera-web.php usr/share/hedera-web
|
||||
forms usr/share/hedera-web
|
||||
image usr/share/hedera-web
|
||||
js usr/share/hedera-web
|
||||
pages usr/share/hedera-web
|
||||
reports usr/share/hedera-web
|
||||
rest usr/share/hedera-web
|
||||
utils usr/share/hedera-web
|
||||
index.php usr/share/hedera-web
|
||||
package.json usr/share/hedera-web
|
||||
build usr/share/hedera-web
|
||||
back/apache.conf etc/hedera-web
|
||||
back/config.php etc/hedera-web
|
||||
back/php.ini etc/hedera-web
|
||||
back/web usr/share/php/vn
|
||||
back/index.php usr/share/hedera-web/back
|
||||
back/hedera-web.php usr/share/hedera-web/back
|
||||
back/rest usr/share/hedera-web/back
|
||||
back/package.json usr/share/hedera-web/back
|
||||
dist/spa/* usr/share/hedera-web/spa
|
||||
build-deps/node_modules usr/share/hedera-web/spa
|
||||
back/utils usr/share/hedera-web
|
||||
README.md usr/share/hedera-web
|
||||
webpack.config.json usr/share/hedera-web
|
||||
build-deps/node_modules usr/share/hedera-web
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
usr/share/hedera-web/hedera-web.php usr/bin/hedera-web.php
|
||||
etc/hedera-web/apache.conf etc/apache2/conf-available/hedera-web.conf
|
||||
etc/hedera-web/php.ini etc/php/7.0/apache2/conf.d/99-hedera-web.ini
|
||||
usr/share/hedera-web/back/hedera-web.php usr/bin/hedera-web.php
|
||||
etc/hedera-web/apache.conf etc/apache2/conf-available/hedera-web.conf
|
||||
etc/hedera-web/php.ini etc/php/7.0/apache2/conf.d/99-hedera-web.ini
|
||||
|
|
|
@ -10,9 +10,9 @@ clean:
|
|||
dh_clean $@
|
||||
|
||||
build:
|
||||
npm install --no-audit --prefer-offline
|
||||
npm --omit=dev run build
|
||||
pnpm install --prefer-offline
|
||||
pnpm exec quasar build
|
||||
|
||||
mkdir -p build-deps
|
||||
cp package.json package-lock.json build-deps
|
||||
cp package.json build-deps
|
||||
(cd build-deps && npm install --omit=dev --no-audit --prefer-offline)
|
||||
|
|
BIN
doc/Htk.odg
BIN
doc/Htk.odg
Binary file not shown.
|
@ -1,41 +1,9 @@
|
|||
version: '3.7'
|
||||
services:
|
||||
main:
|
||||
image: registry.verdnatura.es/hedera-web:${BRANCH_NAME:?}
|
||||
image: registry.verdnatura.es/verdnatura/hedera-web:${TAG:?}
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
- VERSION=${VERSION:?}
|
||||
ports:
|
||||
- 80
|
||||
configs:
|
||||
- source: config
|
||||
target: /etc/hedera-web/config.my.php
|
||||
volumes:
|
||||
- /mnt/appdata:/mnt/storage
|
||||
- /mnt/appdata/image:/var/lib/hedera-web/image-db
|
||||
- /mnt/appdata/vn-access:/var/lib/hedera-web/vn-access
|
||||
deploy:
|
||||
replicas: ${MAIN_REPLICAS:?}
|
||||
placement:
|
||||
constraints:
|
||||
- node.role == worker
|
||||
cron:
|
||||
image: registry.verdnatura.es/hedera-web:${BRANCH_NAME:?}
|
||||
command: 'cron -f'
|
||||
configs:
|
||||
- source: config
|
||||
target: /etc/hedera-web/config.my.php
|
||||
volumes:
|
||||
- /mnt/appdata:/mnt/storage
|
||||
- /mnt/appdata/image:/var/lib/hedera-web/image-db
|
||||
deploy:
|
||||
replicas: ${CRON_REPLICAS:?}
|
||||
placement:
|
||||
constraints:
|
||||
- node.role == worker
|
||||
configs:
|
||||
config:
|
||||
external: true
|
||||
name: ${PROJECT_NAME:?}-${BRANCH_NAME:?}
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
import './style.scss';
|
||||
|
||||
export default new Class({
|
||||
Extends: Hedera.Form,
|
||||
Template: require('./ui.xml')
|
||||
|
||||
,activate() {
|
||||
this.$.userModel.setInfo('c', 'myClient', 'hedera');
|
||||
this.$.addresses.setInfo('a', 'myAddress', 'hedera');
|
||||
}
|
||||
|
||||
,onAddAddressClick() {
|
||||
this.hash.setAll({
|
||||
form: 'account/address',
|
||||
address: 0
|
||||
});
|
||||
}
|
||||
|
||||
,onReturnClick() {
|
||||
window.history.back();
|
||||
}
|
||||
|
||||
,onSetDefaultClick(event, addressId) {
|
||||
if (event.defaultPrevented) return;
|
||||
this.$.defaultAddress.value = addressId;
|
||||
Htk.Toast.showMessage(_('DefaultAddressModified'));
|
||||
}
|
||||
|
||||
,async onRemoveAddressClick(form) {
|
||||
if (confirm(_('AreYouSureDeleteAddress'))) {
|
||||
await form.set('isActive', false);
|
||||
await form.refresh();
|
||||
}
|
||||
}
|
||||
|
||||
,onEditAddressClick(address) {
|
||||
this.hash.setAll({
|
||||
form: 'account/address',
|
||||
address
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
Addresses: Adreces
|
||||
Return: Tornar
|
||||
AddAddress: Afegir adreça
|
||||
SetAsDefault: Establir com per defecte
|
||||
RemoveAddress: Esborrar direcció
|
||||
EditAddress: Modificar direcció
|
||||
AreYouSureDeleteAddress: Estàs segur de que vols eliminar la direcció?
|
||||
DefaultAddressModified: Adreça per defecte modificada
|
|
@ -1,8 +0,0 @@
|
|||
Addresses: Addresses
|
||||
Return: Return
|
||||
AddAddress: Add address
|
||||
SetAsDefault: Set as default
|
||||
RemoveAddress: Remove address
|
||||
EditAddress: Edit address
|
||||
AreYouSureDeleteAddress: Are you sure you want to delete the address?
|
||||
DefaultAddressModified: Default address modified
|
|
@ -1,8 +0,0 @@
|
|||
Addresses: Direcciones
|
||||
Return: Volver
|
||||
AddAddress: Añadir dirección
|
||||
SetAsDefault: Establecer como predeterminada
|
||||
RemoveAddress: Borrar dirección
|
||||
EditAddress: Modificar dirección
|
||||
AreYouSureDeleteAddress: ¿Estás seguro de que quieres borrar la dirección?
|
||||
DefaultAddressModified: Dirección por defecto modificada
|
|
@ -1,8 +0,0 @@
|
|||
Addresses: Adresses
|
||||
Return: Retour
|
||||
AddAddress: Ajouter une adresse
|
||||
SetAsDefault: Définir par défaut
|
||||
RemoveAddress: Supprimer l'adresse
|
||||
EditAddress: Changement d'adresse
|
||||
AreYouSureDeleteAddress: Souhaitez-vous vraiment supprier l'adresse?
|
||||
DefaultAddressModified: Adresse par défaut modifiée
|
|
@ -1,8 +0,0 @@
|
|||
Addresses: Moradas
|
||||
Return: Voltar
|
||||
AddAddress: Adicionar Morada
|
||||
SetAsDefault: Selecionar como pre-determinado
|
||||
RemoveAddress: Eliminar Morada
|
||||
EditAddress: Modificar Morada
|
||||
AreYouSureDeleteAddress: Tens certeza que queres eliminar esta morada?
|
||||
DefaultAddressModified: Endereço padrão modificado
|
|
@ -1,6 +0,0 @@
|
|||
|
||||
hedera-address-list {
|
||||
.htk-list .side {
|
||||
padding-right: 16px;
|
||||
}
|
||||
}
|
|
@ -1,70 +0,0 @@
|
|||
<vn>
|
||||
<vn-group>
|
||||
<db-form id="user-form">
|
||||
<db-model property="model" id="user-model" updatable="true">
|
||||
SELECT id, defaultAddressFk
|
||||
FROM myClient c
|
||||
</db-model>
|
||||
</db-form>
|
||||
<db-model id="addresses" updatable="true">
|
||||
SELECT a.id, a.nickname, p.name province, a.postalCode,
|
||||
a.city, a.street, a.isActive
|
||||
FROM myAddress a
|
||||
LEFT JOIN vn.province p ON p.id = a.provinceFk
|
||||
WHERE a.isActive
|
||||
</db-model>
|
||||
</vn-group>
|
||||
<div id="title">
|
||||
<h1><t>Addresses</t></h1>
|
||||
</div>
|
||||
<div id="actions">
|
||||
<htk-bar-button
|
||||
icon="add"
|
||||
tip="_AddAddress"
|
||||
on-click="this.onAddAddressClick()"/>
|
||||
</div>
|
||||
<div id="form" class="hedera-address-list">
|
||||
<div class="box vn-w-sm">
|
||||
<htk-radio-group
|
||||
id="default-address"
|
||||
column="defaultAddressFk"
|
||||
form="user-form"/>
|
||||
<htk-repeater model="addresses" form-id="address" class="htk-list">
|
||||
<custom>
|
||||
<div class="item clickable" on-click="this.onSetDefaultClick($event, address.id)">
|
||||
<div class="side">
|
||||
<htk-radio
|
||||
radio-group="default-address"
|
||||
val="{{address.id}}"
|
||||
tip="_SetAsDefault"
|
||||
name="test"/>
|
||||
</div>
|
||||
<div class="content">
|
||||
<p class="important">
|
||||
{{address.nickname}}
|
||||
</p>
|
||||
<p>
|
||||
{{address.street}}
|
||||
</p>
|
||||
<p>
|
||||
{{address.postalCode}}, {{address.city}}
|
||||
</p>
|
||||
</div>
|
||||
<div
|
||||
class="actions"
|
||||
on-click="$event.preventDefault()">
|
||||
<htk-button
|
||||
icon="delete"
|
||||
tip="_RemoveAddress"
|
||||
on-click="this.onRemoveAddressClick($iter)"/>
|
||||
<htk-button
|
||||
icon="edit"
|
||||
tip="_EditAddress"
|
||||
on-click="this.onEditAddressClick(address.id)"/>
|
||||
</div>
|
||||
</div>
|
||||
</custom>
|
||||
</htk-repeater>
|
||||
</div>
|
||||
</div>
|
||||
</vn>
|
|
@ -1,20 +0,0 @@
|
|||
export default new Class({
|
||||
Extends: Hedera.Form,
|
||||
Template: require('./ui.xml'),
|
||||
|
||||
activate() {
|
||||
this.$.model.setInfo('a', 'myAddress', 'hedera', ['id'], 'id');
|
||||
this.$.model.setDefault('clientFk', 'a',
|
||||
new Sql.Function({schema: 'account', name: 'myUser_getId'}));
|
||||
},
|
||||
|
||||
onStatusChange() {
|
||||
if (this.$.iter.ready && this.hash.$.address == 0)
|
||||
this.$.iter.insertRow();
|
||||
},
|
||||
|
||||
onOperationsDone() {
|
||||
Htk.Toast.showMessage(_('AddressChangedSuccessfully'));
|
||||
window.history.back()
|
||||
}
|
||||
});
|
|
@ -1,10 +0,0 @@
|
|||
AddEditAddress: Afegir o modificar adreça
|
||||
Name: Consignatari
|
||||
Address: Direcció
|
||||
City: Ciutat
|
||||
ZipCode: Codi postal
|
||||
Country: País
|
||||
Province: Província
|
||||
Return: Tornar
|
||||
Accept: Acceptar
|
||||
AddressChangedSuccessfully: Adreça modificada correctament
|
|
@ -1,10 +0,0 @@
|
|||
AddEditAddress: Add or edit address
|
||||
Name: Consignee
|
||||
Address: Address
|
||||
City: City
|
||||
ZipCode: Zip code
|
||||
Country: Country
|
||||
Province: Province
|
||||
Return: Return
|
||||
Accept: Accept
|
||||
AddressChangedSuccessfully: Address changed successfully
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue