Add inbound country flags and node load in location picker
- Inbound.CountryCode (ISO alpha-2), set on publish; flag shown before the location name (SVG via country-flag-icons on the site, emoji in bot) - Node.Capacity (optional, not a limit); available inbounds report load percent of capacity or active config count, sorted least loaded first Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d7743977a1
commit
bb5e59904f
51 files changed
+3160
-284
No files matched your search
@@ -212,4 +212,26 @@ public class NodeTests
|
||||
Assert.DoesNotContain("protected-secret", text);
|
||||
Assert.Contains("REDACTED", text);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(50)]
|
||||
[InlineData(null)]
|
||||
public void SetCapacity_WithPositiveOrNull_SetsCapacity(int? capacity)
|
||||
{
|
||||
var node = Node.Register("Germany-1", new Uri("https://de1.example.com"), Credentials, null);
|
||||
|
||||
node.SetCapacity(capacity);
|
||||
|
||||
Assert.Equal(capacity, node.Capacity);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(0)]
|
||||
[InlineData(-1)]
|
||||
public void SetCapacity_WithNonPositive_Throws(int capacity)
|
||||
{
|
||||
var node = Node.Register("Germany-1", new Uri("https://de1.example.com"), Credentials, null);
|
||||
|
||||
Assert.Throws<DomainException>(() => node.SetCapacity(capacity));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user