A new chapter, src/devtools. ConnectionManager lists saved connections with their engine and address, or why one failed, and connects on Enter; ConnectionForm fills a connection with a port checked from 1 to 65535, tests it and saves it. SchemaTree shows schemas, tables, views and fields with keys marked; ERDiagram draws tables and their foreign keys on NodeGraph, whose fixed wires show only the sockets that hold one. QueryHistory finds past runs and runs one again; QueryPlanViewer shows each step's share of the cost. TableStructureEditor edits fields in place; IndexManager lists and draws up indexes; RedisKeyBrowser finds keys by glob and lays out each type. QueryEditor is editor::CodeEditor, whose lexer now knows SQL's words, and QueryResultGrid is tables::DataGrid. lists::row_action keeps a row's button its own.
29 lines
702 B
Rust
29 lines
702 B
Rust
use gpui::{AnyElement, App, Window, div, prelude::*};
|
|
|
|
mod data;
|
|
mod db;
|
|
|
|
use super::Page;
|
|
use crate::script::Step;
|
|
|
|
pub const PAGE: Page = Page {
|
|
number: 33,
|
|
slug: "devtools",
|
|
title: "DB & Dev Tools",
|
|
summary: "Connections, schemas and queries, data to read, requests to send, and the machines that run them.",
|
|
render,
|
|
script: SCRIPT,
|
|
};
|
|
|
|
const SCRIPT: &[Step] = &[];
|
|
|
|
fn render(window: &mut Window, cx: &mut App) -> AnyElement {
|
|
div()
|
|
.child(db::connections(window, cx))
|
|
.child(db::schema(window, cx))
|
|
.child(data::queries(window, cx))
|
|
.child(db::structure(window, cx))
|
|
.child(data::redis(window, cx))
|
|
.into_any_element()
|
|
}
|