diff --git a/backend/apps.yaml b/backend/apps.yaml index 5d815ea..887a24c 100644 --- a/backend/apps.yaml +++ b/backend/apps.yaml @@ -8,6 +8,10 @@ sections: icon: prometheus.svg name: Prometheus url: https://prometheus.dvirlabs.com + - description: Kibana logs server + icon: kibana.svg + name: Kibana + url: https://kibana.dvirlabs.com name: Monitoring - apps: - description: Git server @@ -22,4 +26,12 @@ sections: icon: woodpecker-ci.svg name: Woodpecker url: https://woodpecker.dvirlabs.com - name: Dev-tools \ No newline at end of file + - description: CD tool + icon: argocd.svg + name: ArgoCD + url: https://argocd.dvirlabs.com + - description: Hashicorp vault + icon: vault.svg + name: Vault + url: https://vault.dvirlabs.com + name: Devtools diff --git a/frontend/src/components/AddAppModal.jsx b/frontend/src/components/AddAppModal.jsx index 0608d0a..c37ee16 100644 --- a/frontend/src/components/AddAppModal.jsx +++ b/frontend/src/components/AddAppModal.jsx @@ -1,5 +1,5 @@ -import { useState } from 'react'; -import { addAppToSection } from '../services/api'; +import { useEffect, useState } from 'react'; +import { addAppToSection, fetchSections } from '../services/api'; import '../style/AddAppModal.css'; import { IoIosAdd } from "react-icons/io"; @@ -7,11 +7,16 @@ function AddAppModal({ onAdded }) { const [open, setOpen] = useState(false); const [section, setSection] = useState(''); + const [customSection, setCustomSection] = useState(false); const [name, setName] = useState(''); const [icon, setIcon] = useState(''); const [description, setDescription] = useState(''); const [url, setUrl] = useState(''); + const [sections, setSections] = useState([]); + useEffect(() => { + fetchSections().then(data => setSections(data.sections || [])); + }, []); const handleSubmit = async (e) => { e.preventDefault(); @@ -23,6 +28,7 @@ function AddAppModal({ onAdded }) { setIcon(''); setDescription(''); setUrl(''); + setCustomSection(false); if (onAdded) onAdded(); } catch (err) { alert('Failed to add app'); @@ -31,17 +37,44 @@ function AddAppModal({ onAdded }) { return ( <> - setOpen(true)} - /> + setOpen(true)} /> {open && (
setOpen(false)}>
e.stopPropagation()}>

Add New App

- setSection(e.target.value)} required /> + + + {customSection && ( + setSection(e.target.value)} + required + /> + )} + setName(e.target.value)} required /> setIcon(e.target.value)} /> setDescription(e.target.value)} /> diff --git a/frontend/src/style/AddAppModal.css b/frontend/src/style/AddAppModal.css index b1bb0e3..70db2f4 100644 --- a/frontend/src/style/AddAppModal.css +++ b/frontend/src/style/AddAppModal.css @@ -60,6 +60,31 @@ animation: fadeInUp 0.3s ease-out; } +.modal select { + width: 95%; + height: 40px; + padding: 0.6rem; + margin-bottom: 1rem; + background-color: #1f1f1f; + border: 1px solid #2c2c2c; + color: #fff; + border-radius: 8px; + transition: border 0.3s; + font-family: inherit; + font-size: 1rem; +} + +.modal select:focus { + border: 1px solid #00f0ff; + outline: none; + box-shadow: 0 0 6px #00f0ff40; +} + +.modal option { + background-color: #1f1f1f; + color: #fff; +} + .modal h2 { color: #fff; font-size: 1.8rem; diff --git a/frontend/src/style/AppCard.css b/frontend/src/style/AppCard.css index 5fa515b..bcce67d 100644 --- a/frontend/src/style/AppCard.css +++ b/frontend/src/style/AppCard.css @@ -1,7 +1,7 @@ .app-card { background-color: #1e1e1e; color: #fff; - padding: 1.3rem; + padding: 0.9rem; border-radius: 12px; text-align: center; text-decoration: none;