дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 19:25:54 +02:00
feat(docker): add Services dashboards, layers, processes, view filters and log editor tabs (#2246)
Цей коміт міститься в:
1 джерело
a206ac0ca5
коміт
c5124b809d
52 files changed
+3679
-137
No files matched your search
@@ -3,8 +3,8 @@
|
||||
use crate::state::AppState;
|
||||
use ide_core::{IdeError, IdeResult, RequestId};
|
||||
use ide_docker::{
|
||||
ComposeOp, ContainerOp, DockerEndpoint, DockerEvent, DockerLogLine, DockerObject, DockerRegistry, DockerSettings,
|
||||
DockerSnapshot, PruneTarget, RegistryAuth,
|
||||
ComposeOp, ContainerOp, DockerContainerStats, DockerEndpoint, DockerEvent, DockerImageLayer, DockerLogLine,
|
||||
DockerObject, DockerProcessList, DockerRegistry, DockerSettings, DockerSnapshot, PruneTarget, RegistryAuth,
|
||||
};
|
||||
use tauri::State;
|
||||
use tauri::ipc::Channel;
|
||||
@@ -56,6 +56,27 @@ pub async fn docker_inspect(endpoint: DockerEndpoint, object: DockerObject, id:
|
||||
blocking(move || ide_docker::inspect(&endpoint, object, &id)).await
|
||||
}
|
||||
|
||||
/// Layers of an image (`docker image history`).
|
||||
#[tauri::command]
|
||||
#[specta::specta]
|
||||
pub async fn docker_image_history(endpoint: DockerEndpoint, id: String) -> IdeResult<Vec<DockerImageLayer>> {
|
||||
blocking(move || ide_docker::image_history(&endpoint, &id)).await
|
||||
}
|
||||
|
||||
/// Processes running inside a container (`docker top`).
|
||||
#[tauri::command]
|
||||
#[specta::specta]
|
||||
pub async fn docker_container_top(endpoint: DockerEndpoint, id: String) -> IdeResult<DockerProcessList> {
|
||||
blocking(move || ide_docker::container_top(&endpoint, &id)).await
|
||||
}
|
||||
|
||||
/// One-shot resource usage snapshot of a running container (`docker stats --no-stream`).
|
||||
#[tauri::command]
|
||||
#[specta::specta]
|
||||
pub async fn docker_container_stats(endpoint: DockerEndpoint, id: String) -> IdeResult<DockerContainerStats> {
|
||||
blocking(move || ide_docker::container_stats(&endpoint, &id)).await
|
||||
}
|
||||
|
||||
/// Streams a container's log lines until it stops or the request is cancelled.
|
||||
#[tauri::command]
|
||||
#[specta::specta]
|
||||
|
||||
@@ -563,6 +563,9 @@ pub fn builder() -> tauri_specta::Builder<tauri::Wry> {
|
||||
docker::docker_container_op,
|
||||
docker::docker_remove,
|
||||
docker::docker_inspect,
|
||||
docker::docker_image_history,
|
||||
docker::docker_container_top,
|
||||
docker::docker_container_stats,
|
||||
docker::docker_logs,
|
||||
docker::docker_events,
|
||||
docker::docker_pull,
|
||||
|
||||
Reference in new issue
Заблокувати користувача