Git status test commit

oggui/ogdhcp
Alvaro Puente Mella 2024-09-12 14:00:56 +02:00
parent 993c56d4e8
commit aa2875aedf
31 changed files with 798 additions and 66 deletions

View File

@ -0,0 +1 @@
NG_APP_BASE_API_URL=http://127.0.0.1:8090

View File

@ -6,8 +6,7 @@
"name": "ng serve",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: start",
"url": "http://127.0.0.1:8001/"
"preLaunchTask": "npm: start"
},
{
"name": "ng test",

View File

@ -27,7 +27,7 @@
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:application",
"builder": "@ngx-env/builder:application",
"options": {
"localize": true,
"aot": true,
@ -72,16 +72,20 @@
"sourceMap": true
},
"es": {
"localize": ["es-ES"]
"localize": [
"es-ES"
]
},
"en": {
"localize": ["en-US"]
"localize": [
"en-US"
]
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"builder": "@ngx-env/builder:dev-server",
"configurations": {
"production": {
"buildTarget": "ogWebconsole:build:production"
@ -99,13 +103,13 @@
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"builder": "@ngx-env/builder:extract-i18n",
"options": {
"buildTarget": "ogWebconsole:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"builder": "@ngx-env/builder:karma",
"options": {
"polyfills": [
"zone.js",

View File

@ -30,6 +30,7 @@
"@angular/cli": "^18.0.1",
"@angular/compiler-cli": "^18.0.0",
"@angular/localize": "^18.1.0",
"@ngx-env/builder": "^18.0.1",
"@types/jasmine": "~5.1.0",
"jasmine-core": "~5.1.0",
"karma": "~6.4.0",
@ -2424,6 +2425,182 @@
"node": ">=10.0.0"
}
},
"node_modules/@dotenv-run/core": {
"version": "1.3.5",
"resolved": "https://registry.npmjs.org/@dotenv-run/core/-/core-1.3.5.tgz",
"integrity": "sha512-jwXSX/r4VIGUOd/xqRjD5QUYRhKhKOmhhFSPDaIOsajFL+LVYBGADTFcakZ5O9x2BOGxDjIVUJzIE8jTpJ29JA==",
"dev": true,
"dependencies": {
"chalk": "^4.1.0",
"dotenv": "^16.1.4",
"dotenv-expand": "^10.0.0",
"find-up": "^5.0.0"
}
},
"node_modules/@dotenv-run/core/node_modules/ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"dependencies": {
"color-convert": "^2.0.1"
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
"node_modules/@dotenv-run/core/node_modules/chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"dependencies": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
"node_modules/@dotenv-run/core/node_modules/color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"dependencies": {
"color-name": "~1.1.4"
},
"engines": {
"node": ">=7.0.0"
}
},
"node_modules/@dotenv-run/core/node_modules/color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
"node_modules/@dotenv-run/core/node_modules/find-up": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
"integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
"dev": true,
"dependencies": {
"locate-path": "^6.0.0",
"path-exists": "^4.0.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/@dotenv-run/core/node_modules/has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"engines": {
"node": ">=8"
}
},
"node_modules/@dotenv-run/core/node_modules/locate-path": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
"integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
"dev": true,
"dependencies": {
"p-locate": "^5.0.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/@dotenv-run/core/node_modules/p-limit": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
"integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
"dev": true,
"dependencies": {
"yocto-queue": "^0.1.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/@dotenv-run/core/node_modules/p-locate": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
"integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
"dev": true,
"dependencies": {
"p-limit": "^3.0.2"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/@dotenv-run/core/node_modules/path-exists": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
"integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
"dev": true,
"engines": {
"node": ">=8"
}
},
"node_modules/@dotenv-run/core/node_modules/supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"dependencies": {
"has-flag": "^4.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/@dotenv-run/core/node_modules/yocto-queue": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
"integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
"dev": true,
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/@dotenv-run/webpack": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/@dotenv-run/webpack/-/webpack-1.4.0.tgz",
"integrity": "sha512-gQKOdSWs4iYaJ628A3YpPbM0XJvdCg44Wck1kL+UuumRboGcPoq5M35KKmrBQ/abjGeawrZyYimD4T1PiZ9bCA==",
"dev": true,
"dependencies": {
"@dotenv-run/core": "^1.3.4"
},
"peerDependencies": {
"webpack": "^5.0.0"
}
},
"node_modules/@esbuild/aix-ppc64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz",
@ -4300,6 +4477,503 @@
"webpack": "^5.54.0"
}
},
"node_modules/@ngx-env/builder": {
"version": "18.0.1",
"resolved": "https://registry.npmjs.org/@ngx-env/builder/-/builder-18.0.1.tgz",
"integrity": "sha512-zADxSVnhbRqRSWJI09481JNFdsApAwPynDY1UeHWp5BGFI7Qur1fyqjV8ZMqAHhzOv35Z0Wb4JEm8d1/ukQTIg==",
"dev": true,
"dependencies": {
"@dotenv-run/esbuild": "^1.4.0",
"@dotenv-run/webpack": "^1.4.0",
"glob": "^10.3.10"
}
},
"node_modules/@ngx-env/builder/node_modules/@dotenv-run/esbuild": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/@dotenv-run/esbuild/-/esbuild-1.4.0.tgz",
"integrity": "sha512-pXT4qARGRtWtL+/8MVGNc+oatVeNjK5Y415IjxMnGfriMwYuAwz5cWHB4YHIUTpPjkVCxsnPVb4wwr888IuN3g==",
"dev": true,
"dependencies": {
"@dotenv-run/core": "~1.3.5"
},
"peerDependencies": {
"esbuild": "0.21.3"
}
},
"node_modules/@ngx-env/builder/node_modules/@esbuild/aix-ppc64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.3.tgz",
"integrity": "sha512-yTgnwQpFVYfvvo4SvRFB0SwrW8YjOxEoT7wfMT7Ol5v7v5LDNvSGo67aExmxOb87nQNeWPVvaGBNfQ7BXcrZ9w==",
"cpu": [
"ppc64"
],
"dev": true,
"optional": true,
"os": [
"aix"
],
"peer": true,
"engines": {
"node": ">=12"
}
},
"node_modules/@ngx-env/builder/node_modules/@esbuild/android-arm": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.3.tgz",
"integrity": "sha512-bviJOLMgurLJtF1/mAoJLxDZDL6oU5/ztMHnJQRejbJrSc9FFu0QoUoFhvi6qSKJEw9y5oGyvr9fuDtzJ30rNQ==",
"cpu": [
"arm"
],
"dev": true,
"optional": true,
"os": [
"android"
],
"peer": true,
"engines": {
"node": ">=12"
}
},
"node_modules/@ngx-env/builder/node_modules/@esbuild/android-arm64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.3.tgz",
"integrity": "sha512-c+ty9necz3zB1Y+d/N+mC6KVVkGUUOcm4ZmT5i/Fk5arOaY3i6CA3P5wo/7+XzV8cb4GrI/Zjp8NuOQ9Lfsosw==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"android"
],
"peer": true,
"engines": {
"node": ">=12"
}
},
"node_modules/@ngx-env/builder/node_modules/@esbuild/android-x64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.3.tgz",
"integrity": "sha512-JReHfYCRK3FVX4Ra+y5EBH1b9e16TV2OxrPAvzMsGeES0X2Ndm9ImQRI4Ket757vhc5XBOuGperw63upesclRw==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"android"
],
"peer": true,
"engines": {
"node": ">=12"
}
},
"node_modules/@ngx-env/builder/node_modules/@esbuild/darwin-arm64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.3.tgz",
"integrity": "sha512-U3fuQ0xNiAkXOmQ6w5dKpEvXQRSpHOnbw7gEfHCRXPeTKW9sBzVck6C5Yneb8LfJm0l6le4NQfkNPnWMSlTFUQ==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"darwin"
],
"peer": true,
"engines": {
"node": ">=12"
}
},
"node_modules/@ngx-env/builder/node_modules/@esbuild/darwin-x64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.3.tgz",
"integrity": "sha512-3m1CEB7F07s19wmaMNI2KANLcnaqryJxO1fXHUV5j1rWn+wMxdUYoPyO2TnAbfRZdi7ADRwJClmOwgT13qlP3Q==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"darwin"
],
"peer": true,
"engines": {
"node": ">=12"
}
},
"node_modules/@ngx-env/builder/node_modules/@esbuild/freebsd-arm64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.3.tgz",
"integrity": "sha512-fsNAAl5pU6wmKHq91cHWQT0Fz0vtyE1JauMzKotrwqIKAswwP5cpHUCxZNSTuA/JlqtScq20/5KZ+TxQdovU/g==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"freebsd"
],
"peer": true,
"engines": {
"node": ">=12"
}
},
"node_modules/@ngx-env/builder/node_modules/@esbuild/freebsd-x64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.3.tgz",
"integrity": "sha512-tci+UJ4zP5EGF4rp8XlZIdq1q1a/1h9XuronfxTMCNBslpCtmk97Q/5qqy1Mu4zIc0yswN/yP/BLX+NTUC1bXA==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"freebsd"
],
"peer": true,
"engines": {
"node": ">=12"
}
},
"node_modules/@ngx-env/builder/node_modules/@esbuild/linux-arm": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.3.tgz",
"integrity": "sha512-f6kz2QpSuyHHg01cDawj0vkyMwuIvN62UAguQfnNVzbge2uWLhA7TCXOn83DT0ZvyJmBI943MItgTovUob36SQ==",
"cpu": [
"arm"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"peer": true,
"engines": {
"node": ">=12"
}
},
"node_modules/@ngx-env/builder/node_modules/@esbuild/linux-arm64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.3.tgz",
"integrity": "sha512-vvG6R5g5ieB4eCJBQevyDMb31LMHthLpXTc2IGkFnPWS/GzIFDnaYFp558O+XybTmYrVjxnryru7QRleJvmZ6Q==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"peer": true,
"engines": {
"node": ">=12"
}
},
"node_modules/@ngx-env/builder/node_modules/@esbuild/linux-ia32": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.3.tgz",
"integrity": "sha512-HjCWhH7K96Na+66TacDLJmOI9R8iDWDDiqe17C7znGvvE4sW1ECt9ly0AJ3dJH62jHyVqW9xpxZEU1jKdt+29A==",
"cpu": [
"ia32"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"peer": true,
"engines": {
"node": ">=12"
}
},
"node_modules/@ngx-env/builder/node_modules/@esbuild/linux-loong64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.3.tgz",
"integrity": "sha512-BGpimEccmHBZRcAhdlRIxMp7x9PyJxUtj7apL2IuoG9VxvU/l/v1z015nFs7Si7tXUwEsvjc1rOJdZCn4QTU+Q==",
"cpu": [
"loong64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"peer": true,
"engines": {
"node": ">=12"
}
},
"node_modules/@ngx-env/builder/node_modules/@esbuild/linux-mips64el": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.3.tgz",
"integrity": "sha512-5rMOWkp7FQGtAH3QJddP4w3s47iT20hwftqdm7b+loe95o8JU8ro3qZbhgMRy0VuFU0DizymF1pBKkn3YHWtsw==",
"cpu": [
"mips64el"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"peer": true,
"engines": {
"node": ">=12"
}
},
"node_modules/@ngx-env/builder/node_modules/@esbuild/linux-ppc64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.3.tgz",
"integrity": "sha512-h0zj1ldel89V5sjPLo5H1SyMzp4VrgN1tPkN29TmjvO1/r0MuMRwJxL8QY05SmfsZRs6TF0c/IDH3u7XYYmbAg==",
"cpu": [
"ppc64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"peer": true,
"engines": {
"node": ">=12"
}
},
"node_modules/@ngx-env/builder/node_modules/@esbuild/linux-riscv64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.3.tgz",
"integrity": "sha512-dkAKcTsTJ+CRX6bnO17qDJbLoW37npd5gSNtSzjYQr0svghLJYGYB0NF1SNcU1vDcjXLYS5pO4qOW4YbFama4A==",
"cpu": [
"riscv64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"peer": true,
"engines": {
"node": ">=12"
}
},
"node_modules/@ngx-env/builder/node_modules/@esbuild/linux-s390x": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.3.tgz",
"integrity": "sha512-vnD1YUkovEdnZWEuMmy2X2JmzsHQqPpZElXx6dxENcIwTu+Cu5ERax6+Ke1QsE814Zf3c6rxCfwQdCTQ7tPuXA==",
"cpu": [
"s390x"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"peer": true,
"engines": {
"node": ">=12"
}
},
"node_modules/@ngx-env/builder/node_modules/@esbuild/linux-x64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.3.tgz",
"integrity": "sha512-IOXOIm9WaK7plL2gMhsWJd+l2bfrhfilv0uPTptoRoSb2p09RghhQQp9YY6ZJhk/kqmeRt6siRdMSLLwzuT0KQ==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"peer": true,
"engines": {
"node": ">=12"
}
},
"node_modules/@ngx-env/builder/node_modules/@esbuild/netbsd-x64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.3.tgz",
"integrity": "sha512-uTgCwsvQ5+vCQnqM//EfDSuomo2LhdWhFPS8VL8xKf+PKTCrcT/2kPPoWMTs22aB63MLdGMJiE3f1PHvCDmUOw==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"netbsd"
],
"peer": true,
"engines": {
"node": ">=12"
}
},
"node_modules/@ngx-env/builder/node_modules/@esbuild/openbsd-x64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.3.tgz",
"integrity": "sha512-vNAkR17Ub2MgEud2Wag/OE4HTSI6zlb291UYzHez/psiKarp0J8PKGDnAhMBcHFoOHMXHfExzmjMojJNbAStrQ==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"openbsd"
],
"peer": true,
"engines": {
"node": ">=12"
}
},
"node_modules/@ngx-env/builder/node_modules/@esbuild/sunos-x64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.3.tgz",
"integrity": "sha512-W8H9jlGiSBomkgmouaRoTXo49j4w4Kfbl6I1bIdO/vT0+0u4f20ko3ELzV3hPI6XV6JNBVX+8BC+ajHkvffIJA==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"sunos"
],
"peer": true,
"engines": {
"node": ">=12"
}
},
"node_modules/@ngx-env/builder/node_modules/@esbuild/win32-arm64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.3.tgz",
"integrity": "sha512-EjEomwyLSCg8Ag3LDILIqYCZAq/y3diJ04PnqGRgq8/4O3VNlXyMd54j/saShaN4h5o5mivOjAzmU6C3X4v0xw==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"win32"
],
"peer": true,
"engines": {
"node": ">=12"
}
},
"node_modules/@ngx-env/builder/node_modules/@esbuild/win32-ia32": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.3.tgz",
"integrity": "sha512-WGiE/GgbsEwR33++5rzjiYsKyHywE8QSZPF7Rfx9EBfK3Qn3xyR6IjyCr5Uk38Kg8fG4/2phN7sXp4NPWd3fcw==",
"cpu": [
"ia32"
],
"dev": true,
"optional": true,
"os": [
"win32"
],
"peer": true,
"engines": {
"node": ">=12"
}
},
"node_modules/@ngx-env/builder/node_modules/@esbuild/win32-x64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.3.tgz",
"integrity": "sha512-xRxC0jaJWDLYvcUvjQmHCJSfMrgmUuvsoXgDeU/wTorQ1ngDdUBuFtgY3W1Pc5sprGAvZBtWdJX7RPg/iZZUqA==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"win32"
],
"peer": true,
"engines": {
"node": ">=12"
}
},
"node_modules/@ngx-env/builder/node_modules/brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dev": true,
"dependencies": {
"balanced-match": "^1.0.0"
}
},
"node_modules/@ngx-env/builder/node_modules/esbuild": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.3.tgz",
"integrity": "sha512-Kgq0/ZsAPzKrbOjCQcjoSmPoWhlcVnGAUo7jvaLHoxW1Drto0KGkR1xBNg2Cp43b9ImvxmPEJZ9xkfcnqPsfBw==",
"dev": true,
"hasInstallScript": true,
"peer": true,
"bin": {
"esbuild": "bin/esbuild"
},
"engines": {
"node": ">=12"
},
"optionalDependencies": {
"@esbuild/aix-ppc64": "0.21.3",
"@esbuild/android-arm": "0.21.3",
"@esbuild/android-arm64": "0.21.3",
"@esbuild/android-x64": "0.21.3",
"@esbuild/darwin-arm64": "0.21.3",
"@esbuild/darwin-x64": "0.21.3",
"@esbuild/freebsd-arm64": "0.21.3",
"@esbuild/freebsd-x64": "0.21.3",
"@esbuild/linux-arm": "0.21.3",
"@esbuild/linux-arm64": "0.21.3",
"@esbuild/linux-ia32": "0.21.3",
"@esbuild/linux-loong64": "0.21.3",
"@esbuild/linux-mips64el": "0.21.3",
"@esbuild/linux-ppc64": "0.21.3",
"@esbuild/linux-riscv64": "0.21.3",
"@esbuild/linux-s390x": "0.21.3",
"@esbuild/linux-x64": "0.21.3",
"@esbuild/netbsd-x64": "0.21.3",
"@esbuild/openbsd-x64": "0.21.3",
"@esbuild/sunos-x64": "0.21.3",
"@esbuild/win32-arm64": "0.21.3",
"@esbuild/win32-ia32": "0.21.3",
"@esbuild/win32-x64": "0.21.3"
}
},
"node_modules/@ngx-env/builder/node_modules/glob": {
"version": "10.4.5",
"resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz",
"integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==",
"dev": true,
"dependencies": {
"foreground-child": "^3.1.0",
"jackspeak": "^3.1.2",
"minimatch": "^9.0.4",
"minipass": "^7.1.2",
"package-json-from-dist": "^1.0.0",
"path-scurry": "^1.11.1"
},
"bin": {
"glob": "dist/esm/bin.mjs"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/@ngx-env/builder/node_modules/minimatch": {
"version": "9.0.5",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
"integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
"dev": true,
"dependencies": {
"brace-expansion": "^2.0.1"
},
"engines": {
"node": ">=16 || 14 >=14.17"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
@ -7319,6 +7993,27 @@
"url": "https://github.com/fb55/domutils?sponsor=1"
}
},
"node_modules/dotenv": {
"version": "16.4.5",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz",
"integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==",
"dev": true,
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://dotenvx.com"
}
},
"node_modules/dotenv-expand": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-10.0.0.tgz",
"integrity": "sha512-GopVGCpVS1UKH75VKHGuQFqS1Gusej0z4FyQkPdwjil2gNIv+LNsqBlboOzpJFZKVT95GkCyWJbBSdFEFUWI2A==",
"dev": true,
"engines": {
"node": ">=12"
}
},
"node_modules/eastasianwidth": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",

View File

@ -32,6 +32,7 @@
"@angular/cli": "^18.0.1",
"@angular/compiler-cli": "^18.0.0",
"@angular/localize": "^18.1.0",
"@ngx-env/builder": "^18.0.1",
"@types/jasmine": "~5.1.0",
"jasmine-core": "~5.1.0",
"karma": "~6.4.0",

View File

@ -13,6 +13,7 @@ import { ToastrService } from 'ngx-toastr';
styleUrls: ['./roles.component.css']
})
export class RolesComponent implements OnInit {
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
dataSource = new MatTableDataSource<any>();
columns = [
{
@ -64,7 +65,7 @@ export class RolesComponent implements OnInit {
dialogRef.afterClosed().subscribe(result => {
if (result) {
const apiUrl = `http://127.0.0.1:8081/user-groups/${role.uuid}`;
const apiUrl = `${this.baseUrl}/user-groups/${role.uuid}`;
this.http.delete(apiUrl).subscribe({
next: () => {

View File

@ -12,7 +12,8 @@ interface Role {
providedIn: 'root'
})
export class RoleService {
private apiUrl = 'http://127.0.0.1:8081';
private apiUrl = import.meta.env.NG_APP_BASE_API_URL;
constructor(private http: HttpClient) {}

View File

@ -14,6 +14,7 @@ import { ToastrService } from 'ngx-toastr';
styleUrls: ['./users.component.css']
})
export class UsersComponent implements OnInit {
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
dataSource = new MatTableDataSource<any>();
columns = [
{
@ -81,7 +82,7 @@ export class UsersComponent implements OnInit {
dialogRef.afterClosed().subscribe(result => {
if (result) {
const apiUrl = `http://127.0.0.1:8081/users/${user.uuid}`;
const apiUrl = `${this.baseUrl}/users/${user.uuid}`;
this.http.delete(apiUrl).subscribe({
next: () => {

View File

@ -26,7 +26,7 @@ interface UserGroup {
providedIn: 'root'
})
export class UserService {
private apiUrl = 'http://127.0.0.1:8081';
private apiUrl = import.meta.env.NG_APP_BASE_API_URL;
constructor(private http: HttpClient) {}

View File

@ -16,7 +16,7 @@ interface GroupedClients {
styleUrls: ['./classroom-view.component.css']
})
export class ClassroomViewComponent implements OnInit, OnChanges {
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
@Input() clients: any[] = [];
@Input() pcInTable: number = 5;
groupedClients: GroupedClients[] = [];
@ -85,7 +85,7 @@ export class ClassroomViewComponent implements OnInit, OnChanges {
this.groupedClients.forEach(group => {
group.clientRows.forEach(row => {
row.forEach(client => {
const url = `http://127.0.0.1:8081/clients/${client.uuid}`;
const url = `${this.baseUrl}/clients/${client.uuid}`;
const payload = {
name: client.name,
position: client.position

View File

@ -12,6 +12,7 @@ import { DataService } from '../../data.service';
styleUrls: ['./create-client.component.css']
})
export class CreateClientComponent implements OnInit {
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
clientForm!: FormGroup;
parentUnits: any[] = [];
hardwareProfiles: any[] = [];
@ -71,7 +72,7 @@ export class CreateClientComponent implements OnInit {
loadParentUnits() {
this.loading = true;
const url = 'http://127.0.0.1:8081/organizational-units?page=1&itemsPerPage=10000';
const url = `${this.baseUrl}/organizational-units?page=1&itemsPerPage=10000`;
this.http.get<any>(url).subscribe(
response => {
@ -87,7 +88,7 @@ export class CreateClientComponent implements OnInit {
loadOgLives() {
const url = 'http://127.0.0.1:8081/og-lives?page=1&itemsPerPage=30';
const url = `${this.baseUrl}/og-lives?page=1&itemsPerPage=30`;
this.http.get<any>(url).subscribe(
response => {
this.ogLives = response['hydra:member'];
@ -104,7 +105,7 @@ export class CreateClientComponent implements OnInit {
const formData = this.clientForm.value;
formData.ogLive = formData.ogLive;
console.log('Form data:', formData );
this.http.post('http://127.0.0.1:8081/clients', formData).subscribe(
this.http.post(`${this.baseUrl}/clients`, formData).subscribe(
response => {
this.dialogRef.close(response);
this.openSnackBar(false, 'Cliente creado exitosamente');

View File

@ -12,6 +12,7 @@ import { ToastrService } from 'ngx-toastr';
styleUrls: ['./edit-client.component.css']
})
export class EditClientComponent {
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
clientForm!: FormGroup;
parentUnits: any[] = [];
hardwareProfiles: any[] = [];
@ -60,7 +61,7 @@ export class EditClientComponent {
}
loadParentUnits() {
const url = 'http://127.0.0.1:8081/organizational-units?page=1&itemsPerPage=10000';
const url = `${this.baseUrl}/organizational-units?page=1&itemsPerPage=10000`;
this.http.get<any>(url).subscribe(
response => {
@ -84,7 +85,7 @@ export class EditClientComponent {
}
loadOgLives(): void {
const url = 'http://127.0.0.1:8081/og-lives?page=1&itemsPerPage=10000';
const url = `${this.baseUrl}/og-lives?page=1&itemsPerPage=10000`;
this.http.get<any>(url).subscribe(
response => {
@ -98,7 +99,7 @@ export class EditClientComponent {
loadData(uuid: string) {
this.loading = true;
const url = `http://127.0.0.1:8081/clients/${uuid}`;
const url = `${this.baseUrl}/clients/${uuid}`;
this.http.get<any>(url).subscribe(
data => {
@ -129,7 +130,7 @@ export class EditClientComponent {
if (this.isEditMode) {
// Edit mode: Send PUT request to update the unit
const putUrl = `http://127.0.0.1:8081/clients/${this.data.uuid}`;
const putUrl = `${this.baseUrl}/clients/${this.data.uuid}`;
const headers = new HttpHeaders({ 'Content-Type': 'application/json' });
this.http.patch<any>(putUrl, formData, { headers }).subscribe(
@ -146,7 +147,7 @@ export class EditClientComponent {
);
} else {
// Create mode: Send POST request to create a new unit
const postUrl = 'http://127.0.0.1:8081/clients';
const postUrl = `${this.baseUrl}/clients`;
const headers = new HttpHeaders({ 'Content-Type': 'application/json' });
this.http.post<any>(postUrl, formData, { headers }).subscribe(

View File

@ -9,8 +9,10 @@ import { UnidadOrganizativa } from './model';
})
export class DataService {
private apiUrl = 'http://127.0.0.1:8001/organizational-units?page=1&itemsPerPage=1000';
private clientsUrl = 'http://127.0.0.1:8001/clients?page=1&itemsPerPage=1000';
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
private apiUrl = `${this.baseUrl}/organizational-units?page=1&itemsPerPage=1000`;
private clientsUrl = `${this.baseUrl}/clients?page=1&itemsPerPage=1000`;
constructor(private http: HttpClient) {}
@ -68,7 +70,7 @@ export class DataService {
}
getHardwareProfiles(): Observable<any[]> {
const url = 'http://127.0.0.1:8001/hardware-profiles';
const url = `${this.baseUrl}/hardware-profiles`;
return this.http.get<any>(url).pipe(
map(response => {
if (response['hydra:member'] && Array.isArray(response['hydra:member'])) {
@ -86,8 +88,8 @@ export class DataService {
deleteElement(uuid: string, type: string): Observable<void> {
const url = type === 'client'
? `http://127.0.0.1:8001/clients/${uuid}`
: `http://127.0.0.1:8001/organizational-units/${uuid}`;
? `${this.baseUrl}/clients/${uuid}`
: `${this.baseUrl}/organizational-units/${uuid}`;
return this.http.delete<void>(url).pipe(
catchError(error => {
console.error('Error deleting element', error);
@ -97,7 +99,7 @@ export class DataService {
}
changeParent(uuid: string): Observable<void> {
const url = `http://127.0.0.1:8001/organizational-units/${uuid}/change-parent`;
const url = `${this.baseUrl}/organizational-units/${uuid}/change-parent`;
// @ts-ignore
return this.http.post<void>(url).pipe(
catchError(error => {
@ -149,7 +151,7 @@ export class DataService {
}
getFilters(): Observable<any> {
return this.http.get<any>('http://127.0.0.1:8001/views?page=1&itemsPerPage=30').pipe(
return this.http.get<any>(`${this.baseUrl}/views?page=1&itemsPerPage=30`).pipe(
map(response => {
if (response['hydra:member'] && Array.isArray(response['hydra:member'])) {
return response['hydra:member'];
@ -165,7 +167,7 @@ export class DataService {
}
getFilter(id: string): Observable<any> {
return this.http.get<any>('http://127.0.0.1:8001/views/' + id).pipe(
return this.http.get<any>(`${this.baseUrl}/views/` + id).pipe(
map(response => {

View File

@ -24,6 +24,7 @@ import { AcctionsModalComponent } from './acctions-modal/acctions-modal.componen
styleUrls: ['./groups.component.css']
})
export class GroupsComponent implements OnInit {
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
organizationalUnits: UnidadOrganizativa[] = [];
selectedUnidad: UnidadOrganizativa | null = null;
selectedDetail: any | null = null;
@ -338,7 +339,7 @@ export class GroupsComponent implements OnInit {
}
};
this.http.post('http://127.0.0.1:8081/views', filters).subscribe(response => {
this.http.post(`${this.baseUrl}/views`, filters).subscribe(response => {
console.log('Response from server:', response);
this.toastService.success('Se ha guardado el filtro correctamente');
}, error => {
@ -350,7 +351,7 @@ export class GroupsComponent implements OnInit {
}
loadSelectedFilter(savedFilter: any) {
const url = 'http://127.0.0.1:8081/views/' + savedFilter[1];
const url = `${this.baseUrl}/views/` + savedFilter[1];
console.log('llamando a:', url);
this.dataService.getFilter(savedFilter[1]).subscribe(response => {

View File

@ -11,6 +11,7 @@ import {DataService} from "../../data.service";
styleUrls: ['./create-organizational-unit.component.css']
})
export class CreateOrganizationalUnitComponent implements OnInit {
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
isLinear = true;
generalFormGroup: FormGroup;
additionalInfoFormGroup: FormGroup;
@ -85,7 +86,7 @@ export class CreateOrganizationalUnitComponent implements OnInit {
}
loadParentUnits() {
const url = 'http://127.0.0.1:8001/organizational-units?page=1&itemsPerPage=10000';
const url = `${this.baseUrl}/organizational-units?page=1&itemsPerPage=1000`;
this.http.get<any>(url).subscribe(
response => {
@ -134,7 +135,7 @@ export class CreateOrganizationalUnitComponent implements OnInit {
};
console.log('POST data:', formData);
const postUrl = 'http://127.0.0.1:8001/organizational-units';
const postUrl = `${this.baseUrl}/organizational-units`;
const headers = new HttpHeaders({ 'Content-Type': 'application/json' });
this.http.post<any>(postUrl, formData, { headers }).subscribe(

View File

@ -12,6 +12,7 @@ import {ToastrService} from "ngx-toastr";
styleUrl: './edit-organizational-unit.component.css'
})
export class EditOrganizationalUnitComponent implements OnInit {
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
isLinear = true;
generalFormGroup: FormGroup;
additionalInfoFormGroup: FormGroup;
@ -88,7 +89,7 @@ export class EditOrganizationalUnitComponent implements OnInit {
}
loadParentUnits() {
const url = 'http://127.0.0.1:8081/organizational-units?page=1&itemsPerPage=10000';
const url = `${this.baseUrl}/organizational-units?page=1&itemsPerPage=10000`;
this.http.get<any>(url).subscribe(
response => {
@ -112,7 +113,7 @@ export class EditOrganizationalUnitComponent implements OnInit {
}
loadData(uuid: string) {
const url = `http://127.0.0.1:8081/organizational-units/${uuid}`;
const url = `${this.baseUrl}/organizational-units/${uuid}`;
this.http.get<any>(url).subscribe(
data => {
@ -172,7 +173,7 @@ export class EditOrganizationalUnitComponent implements OnInit {
if (this.isEditMode) {
// Edit mode: Send PUT request to update the unit
const putUrl = `http://127.0.0.1:8081/organizational-units/${this.data.uuid}`;
const putUrl = `${this.baseUrl}/organizational-units/${this.data.uuid}`;
const headers = new HttpHeaders({ 'Content-Type': 'application/json' });
this.http.put<any>(putUrl, formData, { headers }).subscribe(
@ -187,7 +188,7 @@ export class EditOrganizationalUnitComponent implements OnInit {
);
} else {
// Create mode: Send POST request to create a new unit
const postUrl = 'http://127.0.0.1:8081/organizational-units';
const postUrl = `${this.baseUrl}/organizational-units`;
const headers = new HttpHeaders({ 'Content-Type': 'application/json' });
this.http.post<any>(postUrl, formData, { headers }).subscribe(

View File

@ -16,6 +16,8 @@ export class LoginComponent {
errorMessage: string = '';
isLoading: boolean = false;
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
constructor(
private http: HttpClient,
private router: Router,
@ -43,7 +45,8 @@ export class LoginComponent {
return;
}
this.http.post('http://127.0.0.1:8001/auth/login', this.loginObj).subscribe({
// Usar la URL base de la variable de entorno
this.http.post(`${this.baseUrl}/auth/login`, this.loginObj).subscribe({
next: (res: any) => {
if (res.token) {
localStorage.setItem('loginToken', res.token);
@ -56,7 +59,7 @@ export class LoginComponent {
},
error: (err) => {
this.isLoading = false;
this.openSnackBar(true, 'Error al iniciar sesion: ' + err.error.message);
this.openSnackBar(true, 'Error al iniciar sesión: ' + err.error.message);
}
});
}
@ -69,12 +72,12 @@ export class LoginComponent {
openSnackBar(isError: boolean, message: string) {
if (isError) {
this.toastService.error(message, 'Error');
} else
} else {
this.toastService.success(message, 'Éxito');
}
}
//SOLO PARA LA DEMO BORRAR EN PRODUCCION
// SOLO PARA LA DEMO BORRAR EN PRODUCCIÓN
redirectToUrl1() {
window.location.href = 'http://localhost:4200/auth/login';
}

View File

@ -9,6 +9,7 @@ import { ToastrService } from 'ngx-toastr';
styleUrls: ['./create-image.component.css']
})
export class CreateImageComponent implements OnInit {
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
name: string = '';
downloads: any[] = [];
selectedDownload: any;
@ -33,7 +34,7 @@ export class CreateImageComponent implements OnInit {
}
fetchDownloads(): void {
this.http.get('http://127.0.0.1:8081/og-lives/server/get-isos?page=1&itemsPerPage=30')
this.http.get(`${this.baseUrl}/og-lives/server/get-isos?page=1&itemsPerPage=30`)
.subscribe({
next: (response: any) => {
this.downloads = response.data.downloads;
@ -56,7 +57,7 @@ export class CreateImageComponent implements OnInit {
};
if (this.isEditMode && this.imageId) {
this.http.patch(`http://127.0.0.1:8081/og-lives/${this.imageId}`, payload)
this.http.patch(`${this.baseUrl}/og-lives/${this.imageId}`, payload)
.subscribe({
next: (response) => {
this.toastService.success('Image updated successfully');
@ -68,7 +69,7 @@ export class CreateImageComponent implements OnInit {
}
});
} else {
this.http.post('http://127.0.0.1:8081/og-lives', payload)
this.http.post(`${this.baseUrl}/og-lives`, payload)
.subscribe({
next: (response) => {
this.toastService.success('Image created successfully');

View File

@ -7,7 +7,8 @@ import { catchError, map } from 'rxjs/operators';
providedIn: 'root'
})
export class DataService {
private apiUrl = 'http://127.0.0.1:8081/og-lives?page=1&itemsPerPage=1000';
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
private apiUrl = `${this.baseUrl}/og-lives?page=1&itemsPerPage=1000`;
constructor(private http: HttpClient) {}

View File

@ -16,6 +16,7 @@ import {DataService} from "./data.service";
styleUrls: ['./images.component.css']
})
export class ImagesComponent implements OnInit {
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
images: { downloadUrl: string; name: string; uuid: string }[] = [];
dataSource = new MatTableDataSource<any>();
length: number = 0;
@ -62,7 +63,7 @@ export class ImagesComponent implements OnInit {
];
displayedColumns = [...this.columns.map(column => column.columnDef), 'actions'];
private apiUrl = 'http://127.0.0.1:8081/og-lives';
private apiUrl = `${this.baseUrl}/og-lives`;
constructor(
public dialog: MatDialog,

View File

@ -7,6 +7,7 @@ import { HttpClient } from '@angular/common/http';
styleUrls: ['./ogboot-status.component.css']
})
export class OgbootStatusComponent implements OnInit {
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
diskUsage: any = {};
servicesStatus: any = {};
installedOglives: any[] = [];
@ -30,7 +31,7 @@ export class OgbootStatusComponent implements OnInit {
}
loadStatus(): void {
this.http.get<any>('http://127.0.0.1:8081/og-boot/status').subscribe(data => {
this.http.get<any>(`${this.baseUrl}/og-boot/status`).subscribe(data => {
this.diskUsage = data.disk_usage;
this.servicesStatus = data.services_status;
this.installedOglives = data.installed_oglives;

View File

@ -9,6 +9,7 @@ import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
styleUrls: ['./create-pxe-boot-file.component.css']
})
export class CreatePxeBootFileComponent implements OnInit {
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
pxeTemplates: any[] = [];
selectedPxeTemplate: string | undefined;
clientes: string[] = [];
@ -39,7 +40,7 @@ export class CreatePxeBootFileComponent implements OnInit {
}
loadPxeTemplates(): void {
this.http.get('http://127.0.0.1:8081/pxe-templates?page=1&itemsPerPage=30')
this.http.get(`${this.baseUrl}/pxe-templates?page=1&itemsPerPage=30`)
.subscribe((response: any) => {
this.pxeTemplates = response['hydra:member'];
}, error => {
@ -60,7 +61,7 @@ export class CreatePxeBootFileComponent implements OnInit {
if (this.isEditMode && this.data.bootFile) {
// Edit mode: Actualizar boot file existente
this.http.put(`http://127.0.0.1:8081/pxe-boot-files/${this.data.bootFile.uuid}`, payload)
this.http.put(`${this.baseUrl}/pxe-boot-files/${this.data.bootFile.uuid}`, payload)
.subscribe({
next: response => {
this.toastService.success('PXE actualizado con éxito');
@ -72,7 +73,7 @@ export class CreatePxeBootFileComponent implements OnInit {
});
} else {
// Create mode: Crear nuevo boot file
this.http.post('http://127.0.0.1:8081/pxe-boot-files', payload)
this.http.post(`${this.baseUrl}/pxe-boot-files`, payload)
.subscribe({
next: response => {
this.toastService.success('PXE asignado con éxito');

View File

@ -8,7 +8,8 @@ import { DataService as TemplateDataService } from './../pxe/data.service';
providedIn: 'root'
})
export class DataService {
private apiUrl = 'http://127.0.0.1:8081/pxe-boot-files?page=1&itemsPerPage=1000';
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
private apiUrl = `${this.baseUrl}/pxe-boot-files?page=1&itemsPerPage=1000`;
constructor(
private http: HttpClient,

View File

@ -14,7 +14,8 @@ import {DataService} from "./data.service";
styleUrl: './pxe-boot-files.component.css'
})
export class PxeBootFilesComponent {
pxeTemplates: any[] = []; // Inicializa el array de plantillas
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
pxeTemplates: any[] = [];
currentPage: number = 1;
dataSource = new MatTableDataSource<any>();
length: number = 0;
@ -51,7 +52,7 @@ export class PxeBootFilesComponent {
];
displayedColumns = [...this.columns.map(column => column.columnDef), 'actions'];
private apiUrl = 'http://127.0.0.1:8081/pxe-boot-files';
private apiUrl = `${this.baseUrl}/pxe-boot-files`;
constructor(
public dialog: MatDialog,

View File

@ -10,6 +10,7 @@ import { ToastrService } from 'ngx-toastr';
styleUrls: ['./create-pxe-template.component.css']
})
export class CreatePxeTemplateComponent implements OnInit {
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
templateForm!: FormGroup;
previewContent: string = '';
isEditMode: boolean = false;
@ -46,7 +47,7 @@ export class CreatePxeTemplateComponent implements OnInit {
templateContent: formValues.templateContent
};
this.http.post<any>('http://127.0.0.1:8081/pxe-templates', payload).subscribe({
this.http.post<any>(`${this.baseUrl}/pxe-templates`, payload).subscribe({
next: data => {
console.log('Plantilla PXE creada:', data);
this.toastService.success('Plantilla PXE creada exitosamente');
@ -67,7 +68,7 @@ export class CreatePxeTemplateComponent implements OnInit {
templateContent: formValues.templateContent
};
this.http.patch<any>(`http://127.0.0.1:8081/pxe-templates/${this.data.uuid}`, payload).subscribe({
this.http.patch<any>(`${this.baseUrl}/pxe-templates/${this.data.uuid}`, payload).subscribe({
next: data => {
console.log('Plantilla PXE actualizada:', data);
this.toastService.success('Plantilla PXE actualizada exitosamente');

View File

@ -8,7 +8,8 @@ import { catchError, map } from 'rxjs/operators';
providedIn: 'root'
})
export class DataService {
private apiUrl = 'http://127.0.0.1:8081/pxe-templates?page=1&itemsPerPage=1000';
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
private apiUrl = `${this.baseUrl}/pxe-templates?page=1&itemsPerPage=1000`;
constructor(private http: HttpClient) {}

View File

@ -15,6 +15,7 @@ import { DataService } from './data.service';
styleUrls: ['./pxe.component.css']
})
export class PxeComponent {
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
pxeTemplates: any[] = [];
currentPage: number = 1;
dataSource = new MatTableDataSource<any>();
@ -53,7 +54,7 @@ export class PxeComponent {
];
displayedColumns = [...this.columns.map(column => column.columnDef), 'actions'];
private apiUrl = 'http://127.0.0.1:8081/pxe-templates';
private apiUrl = `${this.baseUrl}/pxe-templates`;
constructor(
public dialog: MatDialog,

View File

@ -8,6 +8,7 @@ import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
styleUrls: ['./add-clients-to-subnet.component.css']
})
export class AddClientsToSubnetComponent implements OnInit {
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
clients: any[] = [];
selectedClients: any[] = [];
loading: boolean = true;
@ -22,7 +23,7 @@ export class AddClientsToSubnetComponent implements OnInit {
console.log('Selected subnet UUID:', this.data);
this.loading = true;
this.http.get<any>('http://127.0.0.1:8080/clients?page=1&itemsPerPage=30').subscribe(
this.http.get<any>(`${this.baseUrl}/clients?page=1&itemsPerPage=30`).subscribe(
response => {
this.clients = response['hydra:member'];
this.loading = false;
@ -39,7 +40,7 @@ export class AddClientsToSubnetComponent implements OnInit {
clients: JSON.stringify(this.selectedClients.map(client => client.uuid))
};
this.http.post(`http://127.0.0.1:8080/og-dhcp/server/${this.data.subnetUuid}/post-host`, postData).subscribe(
this.http.post(`${this.baseUrl}/og-dhcp/server/${this.data.subnetUuid}/post-host`, postData).subscribe(
response => {
console.log('Clients assigned successfully:', response);
this.dialogRef.close(this.selectedClients);

View File

@ -9,6 +9,7 @@ import { ToastrService } from 'ngx-toastr';
styleUrls: ['./create-subnet.component.css']
})
export class CreateSubnetComponent implements OnInit {
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
name: string = '';
netmask: string = '';
ipAddress: string = '';
@ -39,7 +40,7 @@ export class CreateSubnetComponent implements OnInit {
bootFileName: this.bootFileName
};
this.http.post('http://127.0.0.1:8080/subnets', payload)
this.http.post(`${this.baseUrl}/subnets`, payload)
.subscribe({
next: (response) => {
console.log('Success:', response);

View File

@ -28,7 +28,7 @@ export interface Subnet {
styleUrls: ['./og-dhcp-subnets.component.css']
})
export class OgDhcpSubnetsComponent {
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
displayedColumns: string[] = ['name', 'netmask', 'ipAddress', 'nextServer', 'bootFileName', 'actions'];
dataSource = new MatTableDataSource<Subnet>([]);
length = 0;
@ -54,7 +54,7 @@ export class OgDhcpSubnetsComponent {
}
loadSubnets() {
this.http.get<any>(`http://127.0.0.1:8001/subnets?page=1&itemsPerPage=${this.itemsPerPage}`).subscribe({
this.http.get<any>(`${this.baseUrl}/subnets?page=1&itemsPerPage=${this.itemsPerPage}`).subscribe({
next: (response) => {
this.dataSource.data = response['hydra:member'];
this.length = response['hydra:totalItems'];
@ -107,7 +107,7 @@ export class OgDhcpSubnetsComponent {
dialogRef.afterClosed().subscribe(result => {
if (result) {
const apiUrl = `http://127.0.0.1:8081${subnet['@id']}`;
const apiUrl = `${this.baseUrl}${subnet['@id']}`;
this.http.delete(apiUrl).subscribe({
next: () => {

7
ogWebconsole/src/env.d.ts vendored 100644
View File

@ -0,0 +1,7 @@
interface ImportMetaEnv {
readonly NG_APP_BASE_API_URL: string; // Define aquí todas las variables que necesitas
}
interface ImportMeta {
readonly env: ImportMetaEnv;
}