Status page: tables for the kernel, communities by AS, attributes as text
The kernel section was one run-on line of interfaces and addresses. It is now a small table of the installation state, and a table of interfaces with their IPv4, IPv6 and link-local addresses one per line; ports that are down and have no addresses share one line at the bottom. Communities ran together into one block that wrapped anywhere. Each AS's communities are now a line of their own, kept whole so that they copy, with a hanging indent where a line wraps; pointing at a line names the AS. Where control communities are on (now in /api/status), those of ours that ask for something say what as a tooltip. A rejected route's details were a fold-out that repeated the summary and then dumped the decoded attributes as JSON. Rejected routes now have the same columns as received ones, and both have an "other attributes" column for what the summary had no field for, as text: aggregator, extended communities (route targets and origins by name), AS4_PATH with its sets in braces, originator ID, cluster list, and unknown attributes in hex. The API has them as summary.other; the JSON stays in `attributes`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
89e0c3a3e2
commit
17045a3634
5 files changed
+332
-51
No files matched your search
@@ -46,6 +46,9 @@ pub struct RouterInfo {
|
||||
/// The configuration file as read at startup (path and raw text), shown
|
||||
/// on the status page. `None` when the server was configured in code.
|
||||
pub config: Option<(String, String)>,
|
||||
/// Whether large communities of our AS ask for things here
|
||||
/// (`control_communities`), so that the status page can say what.
|
||||
pub control_communities: bool,
|
||||
}
|
||||
|
||||
impl RouterInfo {
|
||||
@@ -58,9 +61,16 @@ impl RouterInfo {
|
||||
started_at: SystemTime::now(),
|
||||
hostname: hostname(),
|
||||
config: None,
|
||||
control_communities: false,
|
||||
}
|
||||
}
|
||||
|
||||
/// Records whether control communities are acted on.
|
||||
pub fn with_control_communities(mut self, on: bool) -> Self {
|
||||
self.control_communities = on;
|
||||
self
|
||||
}
|
||||
|
||||
/// Records the configuration file so the status page can show it.
|
||||
pub fn with_config(mut self, path: impl Into<String>, text: impl Into<String>) -> Self {
|
||||
self.config = Some((path.into(), text.into()));
|
||||
|
||||
Reference in new issue
Block a user