feat(desktop): tabs UI (Resumo/Inventário/Diagnóstico/Configurações) + enviar inventário agora; docs: admin inventory UI + release CI notes + roadmap

This commit is contained in:
Esdras Renan 2025-10-09 22:22:24 -03:00
parent 479c66d52c
commit 335accb596
7 changed files with 263 additions and 41 deletions

View file

@ -243,6 +243,15 @@ fn build_inventory_metadata(system: &System) -> serde_json::Value {
json!({ "inventory": inventory })
}
pub fn collect_inventory_plain() -> serde_json::Value {
let system = collect_system();
let meta = build_inventory_metadata(&system);
match meta.get("inventory") {
Some(value) => value.clone(),
None => json!({}),
}
}
#[cfg(target_os = "linux")]
fn collect_software_linux() -> serde_json::Value {
use std::process::Command;

View file

@ -1,6 +1,6 @@
mod agent;
use agent::{collect_profile, AgentRuntime, MachineProfile};
use agent::{collect_inventory_plain, collect_profile, AgentRuntime, MachineProfile};
use tauri_plugin_store::Builder as StorePluginBuilder;
use tauri_plugin_keyring as keyring;
@ -9,6 +9,11 @@ fn collect_machine_profile() -> Result<MachineProfile, String> {
collect_profile().map_err(|error| error.to_string())
}
#[tauri::command]
fn collect_machine_inventory() -> Result<serde_json::Value, String> {
Ok(collect_inventory_plain())
}
#[tauri::command]
fn start_machine_agent(
state: tauri::State<AgentRuntime>,
@ -37,6 +42,7 @@ pub fn run() {
.plugin(keyring::init())
.invoke_handler(tauri::generate_handler![
collect_machine_profile,
collect_machine_inventory,
start_machine_agent,
stop_machine_agent
])