feat: Explorer KPI stats, enhanced views, start/stop expansion, Prompt Generator docs injection
- Explorer: KPI stats bar with cached counts (SQLite), background refresh, enhanced views for VCNs/Subnets/LBs/Buckets, start/stop for DB Systems, MySQL, Container Instances, dead state filtering across all 36 endpoints - Prompt Generator: same knowledge pipeline as Terraform Agent — resource type detection + official docs from GitHub + compact resource reference - Fix: NetworkFirewallPolicySummaryCollection not iterable (.items accessor)
This commit is contained in:
39
README.md
39
README.md
@@ -9,7 +9,7 @@
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<img src="https://img.shields.io/badge/version-2.4-C74634?style=flat-square" alt="Version">
|
||||
<img src="https://img.shields.io/badge/version-2.5-C74634?style=flat-square" alt="Version">
|
||||
<img src="https://img.shields.io/badge/python-3.12-3776AB?style=flat-square" alt="Python">
|
||||
<img src="https://img.shields.io/badge/FastAPI-0.115-009688?style=flat-square" alt="FastAPI">
|
||||
<img src="https://img.shields.io/badge/OCI-GenAI-C74634?style=flat-square" alt="OCI">
|
||||
@@ -80,7 +80,8 @@ The platform combines security compliance scanning, AI-powered chat with **RAG (
|
||||
- **AI-powered prompt generation** for OCI infrastructure — generates structured, optimized prompts to feed into the Terraform Agent
|
||||
- Dedicated chat interface (sub-menu under Terraform) matching Terraform Agent layout
|
||||
- **Curated model selection**: only 7 recommended models (GPT-4.1, o3, o4-mini, GPT-5.1, GPT-5.2, Gemini 2.5 Pro, Gemini 2.5 Flash), grouped by provider
|
||||
- **OCI Terraform Resource Reference**: prompt generation includes the full OCI provider resource catalog as context, ensuring accurate resource names and attributes
|
||||
- **Same knowledge pipeline as Terraform Agent**: compact resource reference + auto-detected resource types + official docs from GitHub (cached in SQLite)
|
||||
- **Official Terraform docs injection**: detects resource types from user message (keywords + explicit `oci_*` mentions), fetches Example Usage + Argument Reference from GitHub, cached in `tf_resource_docs` table
|
||||
- **Conversation history**: persistent sessions (agent_type `tf-prompt`) with sidebar history panel, rename/delete, session restore
|
||||
- **Contextual follow-up**: conversation history sent to GenAI for iterative prompt refinement
|
||||
- **Copy & Send**: action buttons on assistant messages to copy the prompt or send directly to the Terraform Agent input
|
||||
@@ -90,6 +91,7 @@ The platform combines security compliance scanning, AI-powered chat with **RAG (
|
||||
### ⚡ OCI Resource Actions
|
||||
- **Start/Stop Compute Instances** directly from OCI Account Explorer with one click
|
||||
- **Start/Stop Autonomous Databases** from Explorer with confirmation prompt
|
||||
- **Start/Stop DB Systems, MySQL, Container Instances** — 5 resource types with operational control
|
||||
- **Update Network Access**: add your IP to ADB ACL (whitelisted_ips) directly from Explorer
|
||||
- **ACL display**: view current whitelisted IPs for Autonomous Databases in Explorer cards
|
||||
- **Auto-refresh**: resource state updates automatically after Start/Stop actions (polling)
|
||||
@@ -97,18 +99,23 @@ The platform combines security compliance scanning, AI-powered chat with **RAG (
|
||||
- Actions audited in the audit log
|
||||
|
||||
### 🔍 OCI Account Explorer
|
||||
- **Tree-view navigation** with resizable side panel and drag handle
|
||||
- **40+ resource types** across 8 categories:
|
||||
- **IAM**: Users, Groups, Policies, Dynamic Groups
|
||||
- **Compute**: Instances, Instance Pools, Container Instances
|
||||
- **Networking**: VCNs, Subnets, Security Lists, NSGs, Route Tables, NAT/Internet/Service Gateways, Public IPs, Network Firewalls, Firewall Policies
|
||||
- **Storage**: Block Volumes, Boot Volumes, Object Storage Buckets, File Systems, Mount Targets
|
||||
- **KPI stats bar**: real-time resource counts per category with tooltip breakdown, cached in SQLite for instant loading
|
||||
- **Tree-view navigation** with resizable side panel (280px default) and drag handle
|
||||
- **36 resource types** across 9 categories:
|
||||
- **Compute**: Instances, Boot Volumes, Instance Pools
|
||||
- **Networking**: VCNs, Subnets, Security Lists, NSGs, Route Tables, NAT/Internet/Service Gateways, Public IPs, Load Balancers
|
||||
- **Storage**: Buckets, Block Volumes, File Systems, Mount Targets
|
||||
- **Database**: Autonomous Databases, DB Systems, MySQL DB Systems
|
||||
- **Kubernetes**: OKE Clusters
|
||||
- **Observability**: Alarms, Log Groups, Events Rules, Notification Topics
|
||||
- **Security**: Vaults, DNS Zones, API Gateways
|
||||
- **Containers**: Container Instances, OKE Clusters
|
||||
- **Serverless**: Functions, API Gateways
|
||||
- **Observability**: Alarms, Log Groups, Notification Topics, Events Rules
|
||||
- **Security**: Vaults, DNS Zones, Network Firewalls, Firewall Policies
|
||||
- **IAM**: Users, Groups, Policies, Dynamic Groups
|
||||
- **Enhanced views**: expandable cards for VCNs (CIDRs, DNS), Subnets (AD, route table), Load Balancers (listeners, backends), Buckets (size, object count, visibility)
|
||||
- **Multi-region support**: select and filter by multiple OCI regions with checkbox selection
|
||||
- **Compartment tree**: hierarchical compartment browser with full OCID visibility
|
||||
- **Dead state filtering**: automatically hides TERMINATED/DELETED/DELETING resources
|
||||
- **Background count refresh**: counts cached in SQLite, refreshed on compartment access without blocking UI
|
||||
- **Security list detail**: view ingress/egress rules directly in the explorer
|
||||
- Select which OCI connection to explore
|
||||
- Real-time API calls via OCI Python SDK
|
||||
@@ -411,14 +418,14 @@ Allow group <group-name> to read buckets in compartment <compartment-name>
|
||||
```
|
||||
oci-cis-agent/
|
||||
├── backend/
|
||||
│ ├── app.py # FastAPI application (~5500 lines)
|
||||
│ ├── app.py # FastAPI application (~5900 lines)
|
||||
│ ├── cis_reports.py # Oracle CIS Benchmark checker (6660 lines, report engine)
|
||||
│ ├── mcp_cis_server.py # MCP server with 12 granular CIS tools (~700 lines)
|
||||
│ ├── gen_tf_reference.py # OCI Terraform provider resource catalog generator
|
||||
│ ├── Dockerfile # Python 3.12 + OCI CLI + Terraform CLI
|
||||
│ └── requirements.txt # Dependencies
|
||||
├── frontend/
|
||||
│ └── index.html # SPA with Oracle Dark Premium theme (~2950 lines)
|
||||
│ └── index.html # SPA with Oracle Dark Premium theme (~3200 lines)
|
||||
├── nginx/
|
||||
│ └── default.conf # Reverse proxy config
|
||||
├── docker-compose.yml # Orchestration
|
||||
@@ -494,6 +501,8 @@ oci-cis-agent/
|
||||
| GET | `/api/oci/explore/{id}/log_groups` | List Log Groups |
|
||||
| GET | `/api/oci/explore/{id}/notification_topics` | List Notification Topics |
|
||||
| GET | `/api/oci/explore/{id}/events_rules` | List Events Rules |
|
||||
| GET | `/api/oci/explore/{id}/counts` | Get cached resource counts (instant from SQLite) |
|
||||
| POST | `/api/oci/explore/{id}/counts/refresh` | Refresh all resource counts in background |
|
||||
|
||||
### OCI Resource Actions
|
||||
|
||||
@@ -501,6 +510,9 @@ oci-cis-agent/
|
||||
|--------|----------|-------------|
|
||||
| POST | `/api/oci/instances/{id}/action` | Start/Stop compute instance |
|
||||
| POST | `/api/oci/autonomous-databases/{id}/action` | Start/Stop Autonomous Database |
|
||||
| POST | `/api/oci/db-systems/{id}/action` | Start/Stop DB System |
|
||||
| POST | `/api/oci/mysql-db-systems/{id}/action` | Start/Stop MySQL DB System |
|
||||
| POST | `/api/oci/container-instances/{id}/action` | Start/Stop Container Instance |
|
||||
|
||||
### Generative AI
|
||||
|
||||
@@ -685,6 +697,7 @@ All models include OCID mapping for `us-ashburn-1`. For other regions, use the "
|
||||
|
||||
| Version | Date | Changes |
|
||||
|---------|------|---------|
|
||||
| **v2.5** | 2026-03 | **Explorer Expansion**: KPI stats bar with per-category resource counts (cached in SQLite `explorer_counts_cache`, background refresh on compartment access), enhanced views for VCNs/Subnets/Load Balancers/Buckets with expandable cards, start/stop for DB Systems + MySQL + Container Instances (5 resource types total), dead state filtering (`TERMINATED`/`DELETED`/`DELETING` hidden across all 36 endpoints), wider compartment tree (280px), IAM excluded from compartment totals. **Prompt Generator Intelligence**: same knowledge pipeline as Terraform Agent — auto-detects resource types from user message, fetches official docs (Example Usage + Arguments) from GitHub cached in SQLite, uses compact categorized resource reference. **Network Firewall fix**: `NetworkFirewallPolicySummaryCollection` not iterable — added `.items` accessor for collection objects. |
|
||||
| **v2.4** | 2026-03 | **Terraform Safety & UX**: region safety guard (plan blocked if model omits `variable "region"` — prevents wrong-region provisioning), rollback button on apply failure (manual `terraform destroy` with "ROLLBACK" confirmation), SSH public key field in OCI configs (auto-injected into `terraform.tfvars` for compute instances), reasoning_effort uppercase fix for OCI SDK, split-panel layout (terminal right 40%, files/plan/resources below chat 60%), plan button persists after destroy. **Terraform tfvars**: expanded `oci_var_map` with `ssh_public_key`/`ssh_authorized_keys` auto-mapping from OCI config |
|
||||
| **v2.3** | 2026-03 | **Consult Embeddings**: dedicated sub-menu with chat-like interface for natural language Q&A against vector store — queries all active tables via cosine similarity, returns contextual answers with source citations (works with or without GenAI config). **Knowledge Base & RAG Enhancements**: Knowledge Base (Base de Conhecimento) with file upload + URL import to `engineerknowledgebase` vector table, CIS Recommendations upload to `cisrecom` table, URL content extraction (HTML tag/script stripping, remote PDF parsing), auto-resolve embedding config from OCI credentials (no separate GenAI config required), `report_date` metadata tracking for embedding freshness, purge & re-embed flow for updated reports. **ADB Vector Improvements**: case-insensitive table matching with quoted identifiers for Oracle ADB, table validation endpoint against `user_tables`, tables section moved inside edit connection card, case-preserving table registration (removed forced uppercase). **Vector search fix**: FLOAT32 compatibility for VECTOR_DISTANCE queries, base64-decoded compartment_id for auto-resolved OCI configs. **Embeddings tab cleanup**: removed delete buttons, simplified to read-only view, updated descriptions. **Dependencies**: added PyPDF2 for PDF text extraction |
|
||||
| **v2.2** | 2026-03 | **UI Modernization (Phases 1B-5)**: Oracle Dark Premium theme, 45+ Lucide SVG icons replacing all emojis, KPI dashboard with compliance gauge + Chart.js donut/bar charts, report summary API endpoint, Phase 5 animations (staggered fade-in, smooth theme transitions, hover effects) — animations scoped to tab switch only (no flickering on re-render). **Terraform Intelligence**: official resource docs injection from registry.terraform.io (Example Usage + Argument Reference, on-demand fetch + SQLite cache), smart tfvars auto-generation from declared variables, multi-region provider management with `var.region` support, RPC anti-cycle rule, system prompt auto-sync to DB, 60-min polling timeout for long-running applies. **ADB fix**: wallet_password always passed for thin mode mTLS (fixes DPY-6005). CIS_EMBEDDINGS default removed from ADB config |
|
||||
|
||||
Reference in New Issue
Block a user