Compare commits
23 Commits
1d28e443a3
...
081da1efc6
Author | SHA1 | Date |
---|---|---|
|
081da1efc6 | |
|
7dc1f662e6 | |
|
fd0778d096 | |
|
d430091d54 | |
|
8fdee4fc9b | |
|
3cd61cfc8f | |
|
1f2c953509 | |
|
97b1ce15ab | |
|
3a5c4efecd | |
|
b5510ffa13 | |
|
5d54cf78ec | |
|
da8451d405 | |
|
84863cb0ac | |
|
4e7c823094 | |
|
063ed4c310 | |
|
c6b3deea41 | |
|
b4bf4909fa | |
|
1bf77166d6 | |
|
2f968499f6 | |
|
d4eec6e5ff | |
|
06f969f43f | |
|
251708e21e | |
|
fda7d9b154 |
|
@ -1,2 +1,9 @@
|
|||
ogWebconsole/.env
|
||||
ogWebconsole/test-results/ogGui-junit-report.xml
|
||||
node_modules/
|
||||
### Debian packaging
|
||||
debian/oggui
|
||||
debian/*.substvars
|
||||
debian/*.log
|
||||
debian/.debhelper/
|
||||
debian/files
|
||||
|
|
35
CHANGELOG.md
35
CHANGELOG.md
|
@ -1,12 +1,37 @@
|
|||
# Changelog
|
||||
## [0.10.0] - 2025-3-25
|
||||
### Added
|
||||
- Nuevo componenten de estado global.
|
||||
- Servicio para que el ogGui obtenga de forma dinamica las variables de entorno.
|
||||
- Nueva funcionalidad para convertir imagen en imagen virtual.
|
||||
- Nueva funcionalidad para importar imágenes externas al sistema.
|
||||
- Despliegue de imangenes sin cache. Cambios en el formulario de "despliegue".
|
||||
|
||||
### Improved
|
||||
- Mejoras en la internacionalización.
|
||||
- Nueva UX ogRepository. Ahora se gestionan las imagenes de forma mas sencilla.
|
||||
- Cambios en ogLive. Mejora en la sincronizacion y obtención de datos en la API
|
||||
|
||||
### Fixed
|
||||
- Cambios en la expresion regular para la validacion de documentos DHCP en la carga masiva de pc.
|
||||
|
||||
## [0.9.2] - 2025-03-19
|
||||
### Changed
|
||||
- Jenkinsfile to pubilsh packages in repo in case og release
|
||||
|
||||
## [0.9.1] - 2025-03-12
|
||||
### Changed
|
||||
- Se ha modificado el acceso a Mercure añadiendo nueva variable de entorno.
|
||||
|
||||
## [0.9.0] - 2025-3-4
|
||||
### 🔹 Added
|
||||
### Added
|
||||
- Integracion con Mercure. Subscriber tanto en "Trazas" con en "Clientes".
|
||||
- Nueva funcionalidad para checkear la integridad de una imagen. Boton en apartado "imagenes" dentro del repositorio.
|
||||
- Centralizacion de estilos.
|
||||
- Nueva funcionalidad para realizar backup de imágenes.
|
||||
- Botón para cancelar despliegues de imagenes. Aparece en "trazas" tan solo para los comendos "deploy" y para el estado "en progreso".
|
||||
|
||||
### ⚡ Changed
|
||||
### Changed
|
||||
- Nueva interfaz en "Grupos". Se ha aprovechado mejor el espacio y acortado el tamaño de las filas, para poder tener mas elementos por pantalla.
|
||||
- Cambios en filtros de "Grupos". Ahora se pueden filtrar por "Centro" y "Unidad Organizativa" y estado. Ahora se busca en base de datos, y no en una lista de clientes dados.
|
||||
- Refactorizados compontentes de crear/editar clientes en uno solo.
|
||||
|
@ -14,22 +39,18 @@
|
|||
- Para gestionar/añadir clientes a subredes ahora tenemos un botón para "añadir todos" y tan solo nos aparecn los equipos que no estén previamente asignados en una subred.
|
||||
|
||||
## [0.7.0] - 2024-12-10
|
||||
|
||||
### Refactored
|
||||
- Refactored the group screen, removing the separate tabs for clients, advanced search, and organizational units.
|
||||
- Added support for partitioning functionality in the client detail view.
|
||||
- Boton para cancelar despliegues de imagenes. Aparece en "trazas" tan solo para los comendos "deploy" y para el estado "en progreos".
|
||||
|
||||
## [0.6.1] - 2024-11-19
|
||||
|
||||
### Improved
|
||||
- Introduced a new automatic sync mode for the ogdhcp and ogBoot components.
|
||||
- Improve test coverage.
|
||||
- New view for clients inside the classroom on the main page.
|
||||
|
||||
## [0.6.0] - 2024-11-19
|
||||
|
||||
### 🔹 Added
|
||||
### Added
|
||||
- Added functionality to execute actions from the menu in the general groups screen.
|
||||
- Displayed the selected center on the general screen for better context.
|
||||
- Implemented the option to collapse the sidebar for improved usability.
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
oggui (1.0) unstable; urgency=low
|
||||
|
||||
* Initial release.
|
||||
|
||||
-- Your Name <nicolas.arenas@qindel.com> Thu, 01 Jan 1970 00:00:00 +0000
|
|
@ -1,9 +0,0 @@
|
|||
Package: oggui
|
||||
Version: %%VERSION%%
|
||||
Section: base
|
||||
Priority: optional
|
||||
Architecture: all
|
||||
Depends: nginx , npm , nodejs
|
||||
Maintainer: Nicolas Arenas <nicolas.arenas@qindel.com>
|
||||
Description: Description of the ogcore package
|
||||
This is a longer description of the ogcore package.
|
|
@ -1,21 +0,0 @@
|
|||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: ogcore
|
||||
Source: <source URL>
|
||||
|
||||
Files: *
|
||||
Copyright: 2023 Your Name <your.email@example.com>
|
||||
License: GPL-3+
|
||||
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
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
.
|
||||
This package is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this package; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
MA 02110-1301 USA.
|
|
@ -1,40 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Asegurarse de que el usuario exista
|
||||
USER="opengnsys"
|
||||
HASH_FILE="/opt/opengnsys/oggui/var/lib/oggui/oggui.config.hash"
|
||||
CONFIG_FILE="/opt/opengnsys/oggui/src/.env"
|
||||
|
||||
# Provisionar base de datos si es necesario en caso de instalación.
|
||||
|
||||
|
||||
# Detectar si es una instalación nueva o una actualización
|
||||
if [ "$1" = "configure" ] && [ -z "$2" ]; then
|
||||
cd /opt/opengnsys/oggui/src/
|
||||
npm install -g @angular/cli
|
||||
npm install
|
||||
/usr/local/bin/ng build --base-href=/ --output-path=dist/oggui --optimization=true --configuration=production --localize=false
|
||||
cp -pr /opt/opengnsys/oggui/src/dist/oggui/browser/* /opt/opengnsys/oggui/browser/
|
||||
md5sum "$CONFIG_FILE" > "$HASH_FILE"
|
||||
ln -s /opt/opengnsys/oggui/etc/systemd/system/oggui.service /etc/systemd/system/oggui.service
|
||||
systemctl daemon-reload
|
||||
systemctl enable oggui
|
||||
elif [ "$1" = "configure" ] && [ -n "$2" ]; then
|
||||
cd /opt/opengnsys/oggui
|
||||
echo "Actualización desde la versión $2"
|
||||
fi
|
||||
|
||||
# Cambiar la propiedad de los archivos al usuario especificado
|
||||
chown opengnsys:www-data /opt/opengnsys/
|
||||
chown -R opengnsys:www-data /opt/opengnsys/oggui
|
||||
# Install http server stuff
|
||||
ln -s /opt/opengnsys/oggui/etc/nginx/oggui.conf /etc/nginx/sites-enabled/oggui.conf
|
||||
# Reiniciar servicios si es necesario
|
||||
# systemctl restart nombre_del_servicio
|
||||
|
||||
systemctl daemon-reload
|
||||
systemctl restart nginx
|
||||
|
||||
exit 0
|
|
@ -0,0 +1,82 @@
|
|||
@Library('jenkins-shared-library') _
|
||||
pipeline {
|
||||
agent {
|
||||
label 'jenkins-slave'
|
||||
}
|
||||
environment {
|
||||
DEBIAN_FRONTEND = 'noninteractive'
|
||||
DEFAULT_DEV_NAME = 'Opengnsys Team'
|
||||
DEFAULT_DEV_EMAIL = 'opengnsys@qindel.com'
|
||||
}
|
||||
options {
|
||||
skipDefaultCheckout()
|
||||
}
|
||||
parameters {
|
||||
string(name: 'DEV_NAME', defaultValue: '', description: 'Nombre del desarrollador')
|
||||
string(name: 'DEV_EMAIL', defaultValue: '', description: 'Email del desarrollador')
|
||||
}
|
||||
stages {
|
||||
stage('Prepare Workspace') {
|
||||
steps {
|
||||
script {
|
||||
env.BUILD_DIR = "${WORKSPACE}/oggui"
|
||||
sh "mkdir -p ${env.BUILD_DIR}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Checkout') {
|
||||
steps {
|
||||
dir("${env.BUILD_DIR}") {
|
||||
checkout scm
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Generate Changelog') {
|
||||
when {
|
||||
expression {
|
||||
return env.TAG_NAME != null
|
||||
}
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def devName = params.DEV_NAME ? params.DEV_NAME : env.DEFAULT_DEV_NAME
|
||||
def devEmail = params.DEV_EMAIL ? params.DEV_EMAIL : env.DEFAULT_DEV_EMAIL
|
||||
|
||||
generateDebianChangelog(env.BUILD_DIR, devName, devEmail)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build') {
|
||||
steps {
|
||||
dir("${env.BUILD_DIR}") {
|
||||
sh '''
|
||||
dpkg-buildpackage -us -uc
|
||||
mkdir -p ../artifacts && mv ../*.deb ../*.changes ../*.buildinfo ../artifacts/
|
||||
ssh aptly@172.17.8.68 "rm -rf /var/tmp/opengnsys/debian-repo/oggui && mkdir -p /var/tmp/opengnsys/debian-repo/oggui"
|
||||
scp -r ../artifacts/* aptly@172.17.8.68:/var/tmp/opengnsys/debian-repo/oggui/
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ('Publish to Debian Repository') {
|
||||
when {
|
||||
expression {
|
||||
return env.TAG_NAME != null
|
||||
}
|
||||
}
|
||||
agent { label 'debian-repo' }
|
||||
steps {
|
||||
sh "aptly repo add opengnsys-devel /var/tmp/opengnsys/debian-repo/oggui/*.deb"
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
notifyBuildStatus('narenas@qindel.com')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
oggui (0.0.1-1) unstable; urgency=medium
|
||||
|
||||
* Add debian files
|
||||
* Update .gitignore
|
||||
* refs #1637 refactor: remove unused client edit and create components; add manage client component
|
||||
* refs #1619. Style: enhance cards view layout and paginator integration in groups component
|
||||
* refactor: update paginator settings and improve page change handling in groups component
|
||||
* Merge branch 'develop' of ssh://ognproject.evlt.uma.es:21987/opengnsys/oggui into develop
|
||||
* style: clean up and optimize CSS for groups component; enhance HTML structure and improve responsiveness
|
||||
* Updated groups paginator
|
||||
* Merge branch 'develop' of ssh://ognproject.evlt.uma.es:21987/opengnsys/oggui into develop
|
||||
* refs #1567. New subnet field: 'dns'
|
||||
|
||||
-- Tu Nombre <tuemail@example.com> Mon, 10 Mar 2025 14:48:36 +0000
|
|
@ -0,0 +1 @@
|
|||
12
|
|
@ -0,0 +1,13 @@
|
|||
Source: oggui
|
||||
Section: web
|
||||
Priority: optional
|
||||
Maintainer: Nicolas Arenas <nicolas.arenas@qindel.com>
|
||||
Build-Depends: debhelper (>= 12), nodejs, npm
|
||||
Standards-Version: 4.5.0
|
||||
|
||||
Package: oggui
|
||||
Architecture: any
|
||||
Maintainer: Nicolas Arenas <nicolas.arenas@qindel.com>
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, nginx, nodejs, npm
|
||||
Description: OpenGnsys GUI
|
||||
Una interfaz gráfica para OpenGnsys.
|
|
@ -0,0 +1 @@
|
|||
oggui
|
|
@ -0,0 +1,2 @@
|
|||
oggui_1.0.1+deb-pkg20250310-1_amd64.buildinfo web optional
|
||||
oggui_1.0.1+deb-pkg20250310-1_amd64.deb web optional
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
. /usr/share/debconf/confmodule
|
||||
|
||||
db_input high opengnsys/oggui_ogcoreUrl || true
|
||||
db_input high opengnsys/oggui_ogmercureUrl || true
|
||||
|
||||
|
||||
db_go
|
|
@ -0,0 +1,9 @@
|
|||
ogWebconsole/dist/oggui/browser /opt/opengnsys/oggui/browser/
|
||||
etc /opt/opengnsys/oggui/
|
||||
bin /opt/opengnsys/oggui/
|
||||
var /opt/opengnsys/oggui/
|
||||
ogWebconsole/*.json /opt/opengnsys/oggui/src/
|
||||
ogWebconsole/*.js /opt/opengnsys/oggui/src/
|
||||
ogWebconsole/src /opt/opengnsys/oggui/src/
|
||||
ogWebconsole/ssl/* /opt/opengnsys/oggui/etc/nginx/certs/
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
. /usr/share/debconf/confmodule
|
||||
|
||||
db_get opengnsys/oggui_ogcoreUrl
|
||||
OGCORE_URL="$RET"
|
||||
db_get opengnsys/oggui_ogmercureUrl
|
||||
OGMERCURE_URL="$RET"
|
||||
|
||||
# Asegurarse de que el usuario exista
|
||||
USER="opengnsys"
|
||||
HASH_FILE="/opt/opengnsys/oggui/var/lib/oggui/oggui.config.hash"
|
||||
CONFIG_FILE="/opt/opengnsys/oggui/src/.env"
|
||||
|
||||
# Detectar si es una instalación nueva o una actualización
|
||||
if [ "$1" = "configure" ] && [ -z "$2" ]; then
|
||||
cd /opt/opengnsys/oggui/src/
|
||||
echo NG_APP_BASE_API_URL=$OGCORE_URL > "$CONFIG_FILE"
|
||||
echo NG_APP_OGCORE_MERCURE_BASE_URL=$OGMERCURE_URL >> "$CONFIG_FILE"
|
||||
npm install -g @angular/cli
|
||||
npm install
|
||||
/usr/local/bin/ng build --base-href=/ --output-path=dist/oggui --optimization=true --configuration=production --localize=false
|
||||
cp -pr /opt/opengnsys/oggui/src/dist/oggui/browser /opt/opengnsys/oggui/
|
||||
md5sum "$CONFIG_FILE" > "$HASH_FILE"
|
||||
ln -s /opt/opengnsys/oggui/etc/systemd/system/oggui.service /etc/systemd/system/oggui.service
|
||||
ln -s /opt/opengnsys/oggui/etc/nginx/oggui.conf /etc/nginx/sites-enabled/oggui.conf
|
||||
mkdir -p /etc/nginx/certs/
|
||||
cp -p /opt/opengnsys/oggui/etc/nginx/certs/* /etc/nginx/certs/
|
||||
chown -R www-data:www-data /etc/nginx/certs
|
||||
systemctl daemon-reload
|
||||
systemctl enable oggui
|
||||
# systemctl restart nombre_del_s
|
||||
systemctl daemon-reload
|
||||
systemctl restart nginx
|
||||
elif [ "$1" = "configure" ] && [ -n "$2" ]; then
|
||||
cd /opt/opengnsys/oggui
|
||||
echo "Actualización desde la versión $2"
|
||||
/usr/local/bin/ng build --base-href=/ --output-path=dist/oggui --optimization=true --configuration=production --localize=false
|
||||
rm -rf /opt/opengnsys/oggui/browser
|
||||
cp -pr /opt/opengnsys/oggui/src/dist/oggui/browser /opt/opengnsys/oggui/
|
||||
md5sum "$CONFIG_FILE" > "$HASH_FILE"
|
||||
fi
|
||||
|
||||
# Cambiar la propiedad de los archivos al usuario especificado
|
||||
chown opengnsys:www-data /opt/opengnsys/
|
||||
chown -R opengnsys:www-data /opt/opengnsys/oggui
|
||||
chmod 755 /opt/opengnsys/oggui/bin/start-oggui.sh
|
||||
exit 0
|
|
@ -0,0 +1,6 @@
|
|||
# Automatically added by dh_installdebconf/13.14.1ubuntu5
|
||||
if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
|
||||
. /usr/share/debconf/confmodule
|
||||
db_purge
|
||||
fi
|
||||
# End automatically added section
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
if [ "$1" = "upgrade" ]; then
|
||||
# Eliminar enlaces simbólicos creados en postinst
|
||||
rm -f /etc/systemd/system/oggui.service
|
||||
rm -f /etc/nginx/sites-enabled/oggui.conf
|
||||
systemctl daemon-reload
|
||||
systemctl restart nginx
|
||||
fi
|
||||
|
||||
exit 0
|
|
@ -0,0 +1,9 @@
|
|||
Template: opengnsys/oggui_ogcoreUrl
|
||||
Type: string
|
||||
Default: https://127.0.0.1:8443
|
||||
Description: Introduzca la URL delAPI de OgCore
|
||||
|
||||
Template: opengnsys/oggui_ogmercureUrl
|
||||
Type: string
|
||||
Default: https://127.0.0.1:3000/.well-known/mercure
|
||||
Description: Introduzca el endpoint de mercure
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/make -f
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_auto_build:
|
||||
cd ogWebconsole && npm install
|
||||
cd ogWebconsole && /usr/local/bin/ng build --base-href=/ --output-path=dist/oggui --optimization=true --configuration=production --localize=false
|
||||
|
||||
override_dh_auto_install:
|
||||
dh_auto_install
|
||||
mkdir -p debian/oggui/opt/opengnsys/oggui/browser
|
||||
mkdir -p debian/oggui/opt/opengnsys/oggui/src/
|
||||
cp -pr ogWebconsole/dist/oggui/browser/* debian/oggui/opt/opengnsys/oggui/browser/
|
||||
rm -rf debian/oggui/opt/opengnsys/oggui/browser/node_modules
|
||||
cp -pr etc debian/oggui/opt/opengnsys/oggui/
|
||||
cp -pr bin debian/oggui/opt/opengnsys/oggui/
|
||||
cp -pr var debian/oggui/opt/opengnsys/oggui/
|
||||
cp -p ogWebconsole/.env debian/oggui/opt/opengnsys/oggui/src/
|
||||
md5sum debian/oggui/opt/opengnsys/oggui/src/.env > debian/oggui/opt/opengnsys/oggui/var/lib/oggui/oggui.config.hash
|
|
@ -1,5 +1,5 @@
|
|||
server {
|
||||
listen 4200;
|
||||
listen 4200 ssl;
|
||||
server_name localhost;
|
||||
|
||||
root /opt/opengnsys/oggui/browser;
|
||||
|
@ -13,7 +13,8 @@ server {
|
|||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
ssl_certificate /opt/opengnsys/oggui/etc/nginx/certs/oggui.uds-test.net.crt.pem;
|
||||
ssl_certificate_key /opt/opengnsys/oggui/etc/nginx/certs/oggui.uds-test.net.key.pem;
|
||||
# Configuración para evitar problemas con rutas de Angular
|
||||
error_page 404 /index.html;
|
||||
}
|
|
@ -5,6 +5,15 @@
|
|||
padding: 10px;
|
||||
}
|
||||
|
||||
.client-container {
|
||||
flex-grow: 1;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 0rem 1rem 0rem 0.5rem;
|
||||
}
|
||||
|
||||
.client-icon {
|
||||
flex-shrink: 0;
|
||||
margin-right: 20px;
|
||||
|
@ -258,27 +267,72 @@
|
|||
.disk-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
gap: 20px;
|
||||
background-color: #f5f7fa;
|
||||
border: 2px solid #d1d9e6;
|
||||
border-radius: 10px;
|
||||
padding: 20px;
|
||||
margin-top: 20px;
|
||||
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
align-items: center; /* Centra contenido verticalmente */
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.table-container {
|
||||
flex: 3;
|
||||
overflow-x: auto;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: center; /* Centrar la tabla */
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
table.mat-elevation-z8 {
|
||||
width: 100%;
|
||||
max-width: 800px;
|
||||
background-color: white;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.mat-header-cell {
|
||||
background-color: #d1d9e6 !important; /* Encabezado más moderno */
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mat-cell {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mat-chip {
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.charts-container {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center; /* Centra los gráficos */
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.disk-usage {
|
||||
background-color: white;
|
||||
padding: 15px;
|
||||
border-radius: 8px;
|
||||
justify-self: center;
|
||||
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.chart {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.back-button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
@ -302,4 +356,4 @@
|
|||
.back-button:disabled {
|
||||
background-color: #ced0df;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,68 +1,73 @@
|
|||
<div class="header-container">
|
||||
<h2 class="title">{{ 'clientDetailsTitle' | translate }}</h2>
|
||||
<div class="client-button-row">
|
||||
<button class="back-button" (click)="navigateToGroups()">
|
||||
<mat-icon>arrow_back</mat-icon>
|
||||
{{ 'Back' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<app-loading [isLoading]="loading"></app-loading>
|
||||
|
||||
<div *ngIf="!loading" class="client-info">
|
||||
<div class="info-section">
|
||||
<div class="two-column-table">
|
||||
<div class="table-row" *ngFor="let clientData of generalData">
|
||||
<div class="column property">{{ clientData?.property }}</div>
|
||||
<div class="column value">{{ clientData?.value }}</div>
|
||||
</div>
|
||||
<div class="client-container">
|
||||
<div class="header-container">
|
||||
<h2 class="title">{{ 'clientDetailsTitle' | translate }} {{ clientData.name }}</h2>
|
||||
<div class="client-button-row">
|
||||
<button class="back-button" (click)="navigateToGroups()">
|
||||
<mat-icon>arrow_back</mat-icon>
|
||||
{{ 'back' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
<div class="two-column-table">
|
||||
<div class="table-row" *ngFor="let clientData of networkData">
|
||||
<div class="column property">{{ clientData?.property }}</div>
|
||||
<div class="column value">{{ clientData?.value }}</div>
|
||||
</div>
|
||||
|
||||
<mat-divider></mat-divider>
|
||||
|
||||
<div *ngIf="!loading" class="client-info">
|
||||
<div class="info-section">
|
||||
<div class="two-column-table">
|
||||
<div class="table-row" *ngFor="let clientData of generalData">
|
||||
<div class="column property">{{ clientData?.property }}</div>
|
||||
<div class="column value">{{ clientData?.value }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="two-column-table">
|
||||
<div class="table-row" *ngFor="let clientData of networkData">
|
||||
<div class="column property">{{ clientData?.property }}</div>
|
||||
<div class="column value">{{ clientData?.value }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-container">
|
||||
<h2 class="title" i18n="@@adminImagesTitle">Discos/Particiones</h2>
|
||||
</div>
|
||||
<div class="header-container">
|
||||
<h2 class="title" i18n="@@adminImagesTitle">Discos/Particiones</h2>
|
||||
</div>
|
||||
|
||||
<div class="disk-container">
|
||||
<!-- Tabla de particiones -->
|
||||
<div class="table-container">
|
||||
<table mat-table [dataSource]="dataSource" class="mat-elevation-z8">
|
||||
<ng-container *ngFor="let column of columns" [matColumnDef]="column.columnDef">
|
||||
<th mat-header-cell *matHeaderCellDef> {{ column.header }} </th>
|
||||
<td mat-cell *matCellDef="let image">
|
||||
<ng-container *ngIf="column.columnDef !== 'size'">
|
||||
{{ column.cell(image) }}
|
||||
</ng-container>
|
||||
<ng-container *ngIf="column.columnDef === 'size'">
|
||||
<mat-chip color="primary">
|
||||
{{ (image.size / 1024).toFixed(2) }} GB
|
||||
</mat-chip>
|
||||
</ng-container>
|
||||
</td>
|
||||
<div class="disk-container">
|
||||
<!-- Tabla de particiones -->
|
||||
<div class="table-container">
|
||||
<table mat-table [dataSource]="dataSource" class="mat-elevation-z8">
|
||||
<ng-container *ngFor="let column of columns" [matColumnDef]="column.columnDef">
|
||||
<th mat-header-cell *matHeaderCellDef> {{ column.header }} </th>
|
||||
<td mat-cell *matCellDef="let image">
|
||||
<ng-container *ngIf="column.columnDef !== 'size'">
|
||||
{{ column.cell(image) }}
|
||||
</ng-container>
|
||||
<ng-container *ngIf="column.columnDef === 'size'">
|
||||
<mat-chip color="primary">
|
||||
{{ (image.size / 1024).toFixed(2) }} GB
|
||||
</mat-chip>
|
||||
</ng-container>
|
||||
</td>
|
||||
</ng-container>
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- Gráfico circular -->
|
||||
<div class="charts-container">
|
||||
<ng-container *ngIf="diskUsageData && diskUsageData.length > 0">
|
||||
<div *ngFor="let disk of chartDisk" class="disk-usage">
|
||||
<ngx-charts-pie-chart class="chart" [view]="view" [results]="disk.chartData" [doughnut]="true">
|
||||
</ngx-charts-pie-chart>
|
||||
|
||||
<h3>Disco {{ disk.diskNumber }}</h3>
|
||||
<p>Usado: {{ (disk.used).toFixed(2) }} GB ({{ disk.percentage }}%)</p>
|
||||
<p>Total: {{ disk.total }} GB</p>
|
||||
</div>
|
||||
</ng-container>
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Gráfico circular -->
|
||||
<div class="charts-container">
|
||||
<ng-container *ngIf="diskUsageData && diskUsageData.length > 0">
|
||||
<div *ngFor="let disk of chartDisk" class="disk-usage">
|
||||
<ngx-charts-pie-chart [view]="view" [results]="disk.chartData" [doughnut]="true">
|
||||
</ngx-charts-pie-chart>
|
||||
|
||||
<h3>Disco {{ disk.diskNumber }}</h3>
|
||||
<p>Usado: {{ (disk.used).toFixed(2) }} GB ({{ disk.percentage }}%)</p>
|
||||
<p>Total: {{ disk.total }} GB</p>
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
|
@ -207,8 +207,9 @@ export class ClientMainViewComponent implements OnInit {
|
|||
loadPartitions(): void {
|
||||
this.http.get<any>(`${this.baseUrl}/partitions?client.id=${this.clientData?.id}&order[diskNumber, partitionNumber]=ASC`).subscribe({
|
||||
next: data => {
|
||||
this.dataSource = data['hydra:member'];
|
||||
this.partitions = data['hydra:member'];
|
||||
const filteredPartitions = data['hydra:member'].filter((partition: any) => partition.partitionNumber !== 0);
|
||||
this.dataSource = filteredPartitions;
|
||||
this.partitions = filteredPartitions;
|
||||
this.calculateDiskUsage();
|
||||
},
|
||||
error: error => {
|
||||
|
@ -217,6 +218,7 @@ export class ClientMainViewComponent implements OnInit {
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
loadCommands(): void {
|
||||
this.http.get<any>(`${this.baseUrl}/commands?`).subscribe({
|
||||
next: data => {
|
||||
|
|
|
@ -101,6 +101,10 @@
|
|||
</mat-select>
|
||||
<mat-error>{{ 'menuError' | translate }}</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-checkbox formControlName="maintenance">
|
||||
{{ 'maintenance' | translate }}
|
||||
</mat-checkbox>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
@ -110,4 +114,4 @@
|
|||
{{ isEditMode ? 'Guardar' : 'Crear' }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -90,7 +90,8 @@ export class ManageClientComponent implements OnInit {
|
|||
hardwareProfile: [null],
|
||||
ogLive: [null],
|
||||
repository: [null],
|
||||
menu: [null]
|
||||
menu: [null],
|
||||
maintenance: [false]
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -249,6 +250,7 @@ export class ManageClientComponent implements OnInit {
|
|||
ogLive: data.ogLive ? data.ogLive['@id'] : null,
|
||||
template: data.template ? data.template['@id'] : null,
|
||||
menu: data.menu ? data.menu['@id'] : null,
|
||||
maintenance: data.maintenance
|
||||
});
|
||||
resolve();
|
||||
},
|
||||
|
@ -300,4 +302,4 @@ export class ManageClientComponent implements OnInit {
|
|||
onNoClick(): void {
|
||||
this.dialogRef.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -162,11 +162,12 @@ export class ShowImagesComponent implements OnInit {
|
|||
}
|
||||
|
||||
importImage(): void {
|
||||
console.log(this.data)
|
||||
this.dialog.open(ImportImageComponent, {
|
||||
width: '600px',
|
||||
data: {
|
||||
repositoryUuid: this.data.repositoryUuid,
|
||||
name: this.repository.name
|
||||
name: this.data.repositoryName
|
||||
}
|
||||
}).afterClosed().subscribe((result) => {
|
||||
if (result) {
|
||||
|
@ -180,7 +181,7 @@ export class ShowImagesComponent implements OnInit {
|
|||
width: '600px',
|
||||
data: {
|
||||
repositoryUuid: this.data.repositoryUuid,
|
||||
name: this.repository.name
|
||||
name: this.data.repositoryName
|
||||
}
|
||||
}).afterClosed().subscribe((result) => {
|
||||
if (result) {
|
||||
|
|
|
@ -43,29 +43,13 @@
|
|||
</mat-list-item>
|
||||
</mat-nav-list>
|
||||
|
||||
<mat-list-item (click)="toggleOgDhcpSub()" matTooltip="{{ 'TOOLTIP_DHCP' | translate }}" matTooltipShowDelay="1000">
|
||||
<mat-list-item routerLink="/subnets" matTooltip="{{ 'TOOLTIP_SUBNETS' | translate }}" matTooltipShowDelay="1000">
|
||||
<span class="entry">
|
||||
<mat-icon class="icon">settings_ethernet</mat-icon>
|
||||
<span>{{ 'dhcp' | translate }}</span>
|
||||
<mat-icon class="icon">lan</mat-icon>
|
||||
<span> {{ 'subnets' | translate }}</span>
|
||||
</span>
|
||||
</mat-list-item>
|
||||
|
||||
<!-- Submenu items for DHCP -->
|
||||
<mat-nav-list *ngIf="showOgDhcpSub" style="padding-left: 20px;">
|
||||
<mat-list-item routerLink="/ogdhcp-status" matTooltip="{{ 'TOOLTIP_DHCP_STATUS' | translate }}" matTooltipShowDelay="1000">
|
||||
<span class="entry">
|
||||
<mat-icon class="icon">analytics</mat-icon>
|
||||
<span>{{ 'status' | translate }}</span>
|
||||
</span>
|
||||
</mat-list-item>
|
||||
<mat-list-item routerLink="/subnets" matTooltip="{{ 'TOOLTIP_SUBNETS' | translate }}" matTooltipShowDelay="1000">
|
||||
<span class="entry">
|
||||
<mat-icon class="icon">lan</mat-icon>
|
||||
<span>{{ 'subnets' | translate }}</span>
|
||||
</span>
|
||||
</mat-list-item>
|
||||
</mat-nav-list>
|
||||
|
||||
<mat-list-item (click)="toggleOgBootSub()" matTooltip="{{ 'TOOLTIP_BOOT' | translate }}" matTooltipShowDelay="1000">
|
||||
<span class="entry">
|
||||
<mat-icon class="icon">desktop_windows</mat-icon>
|
||||
|
@ -75,12 +59,6 @@
|
|||
|
||||
<!-- Submenu items for Boot -->
|
||||
<mat-nav-list *ngIf="showOgBootSub" style="padding-left: 20px;">
|
||||
<mat-list-item routerLink="/ogboot-status" matTooltip="{{ 'TOOLTIP_BOOT_STATUS' | translate }}" matTooltipShowDelay="1000">
|
||||
<span class="entry">
|
||||
<mat-icon class="icon">analytics</mat-icon>
|
||||
<span>{{ 'status' | translate }}</span>
|
||||
</span>
|
||||
</mat-list-item>
|
||||
<mat-list-item routerLink="/pxe-images" matTooltip="{{ 'TOOLTIP_PXE_IMAGES' | translate }}" matTooltipShowDelay="1000">
|
||||
<span class="entry">
|
||||
<mat-icon class="icon">album</mat-icon>
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
"labelOrganizationalUnit": "Organizational Unit",
|
||||
"buttonCancel": "Cancel",
|
||||
"buttonAdd": "Add",
|
||||
"addRule": "Add rule",
|
||||
"rulesHeader": "Rules",
|
||||
"statusUnavailable": "Unavailable",
|
||||
"statusAvailable": "Available",
|
||||
"addClientDialogTitle": "Add Client",
|
||||
"dialogTitleEditUser": "Editar usuario",
|
||||
"dialogTitleChangePassword": "Change password",
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
"labelOrganizationalUnit": "Unidad organizativa",
|
||||
"buttonCancel": "Cancelar",
|
||||
"buttonAdd": "Añadir",
|
||||
"back": "Atrás",
|
||||
"addClientDialogTitle": "Añadir Cliente",
|
||||
"dialogTitleEditUser": "Editar usuario",
|
||||
"dialogTitleChangePassword": "Change password",
|
||||
|
@ -33,6 +34,10 @@
|
|||
"addRole": "Añadir rol",
|
||||
"searchRoleLabel": "Buscar nombre de rol",
|
||||
"dialogTitleAddRole": "Añadir Rol",
|
||||
"addRule": "Añadir regla",
|
||||
"rulesHeader": "Reglas",
|
||||
"statusUnavailable": "No disponible",
|
||||
"statusAvailable": "Disponible",
|
||||
"labelRoleName": "Nombre",
|
||||
"sectionTitlePermissions": "Permisos:",
|
||||
"checkboxSuperAdmin": "Super Admin",
|
||||
|
|
Loading…
Reference in New Issue