Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
daca53c
Update Docker workflow to support new branch naming and improve image…
breyr Mar 2, 2025
0a66c41
Refactor Docker workflow to use correct pull request number syntax fo…
breyr Mar 2, 2025
3926313
Update action (#54)
breyr Mar 2, 2025
d7f5fb4
Red 76 UI changes (#55)
Tylermui Mar 3, 2025
2d2d9ab
refactored react code (#56)
breyr Mar 4, 2025
b4d6da1
Red 72 topology send create and delete link requests (#57)
breyr Mar 4, 2025
4220c89
Auth and onboarding fixes (#58)
breyr Mar 7, 2025
7f754ec
Bug fixes (#59)
breyr Mar 20, 2025
a2b4030
DONE (#60)
Tylermui Mar 20, 2025
3366342
table (#61)
Tylermui Mar 20, 2025
6a7f60e
Implement table structure and layout adjustments (#62)
breyr Mar 21, 2025
acf79af
Connections table again (#63)
breyr Mar 21, 2025
a27088e
Refactor table layout for improved responsiveness (#64)
breyr Mar 21, 2025
e0adcac
Stretch features (#65)
breyr Mar 21, 2025
f9fea0f
Stretch features (#66)
breyr Mar 22, 2025
acad8f8
Stretch features (#67)
breyr Mar 22, 2025
8241fb7
Stretch features (#68)
breyr Mar 24, 2025
d790a3c
Stretch features (#69)
breyr Mar 25, 2025
361993b
Stretch features (#70)
breyr Mar 25, 2025
3a0fe9e
Stretch features (#71)
breyr Mar 25, 2025
b3f11b8
Stretch features (#72)
breyr Mar 25, 2025
067b917
Stretch features (#73)
breyr Mar 28, 2025
dc97442
Stretch features (#74)
breyr Mar 28, 2025
181ff1d
Merge branch 'main' into dev
breyr Mar 31, 2025
fcdfdd5
Enhance port calculation logic to adjust for device number in VLAN ma…
breyr Mar 31, 2025
cd5c521
Bug fixes (#77)
breyr Mar 31, 2025
8482cc3
Refactor link operations and enhance substring extraction for port fo…
breyr Mar 31, 2025
117654d
Bump vite version (#79)
breyr Mar 31, 2025
2c18564
Topology card updates (#81)
breyr Mar 31, 2025
96090a0
Enhance context menu and link creation modal to display available por…
breyr Mar 31, 2025
7cf332a
More fixes (#83)
breyr Apr 1, 2025
8fce0e7
Update README.md (#85)
AdamSpera Apr 4, 2025
6b588db
Merge branch 'main' into dev
breyr Apr 8, 2025
3cb2de9
fix for links reinitializing if someone changes the topology name (#89)
breyr Apr 8, 2025
9a81d3d
bump version
breyr Apr 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions compose.prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ services:
- postgres_data:/var/lib/postgresql/data

backend:
image: breyr/top-backend:1.0.2
image: breyr/top-backend:1.0.3
container_name: backend
environment:
DATABASE_URL: postgres://demo:demo@postgres:5432/demo
Expand All @@ -25,15 +25,15 @@ services:
- postgres

frontend:
image: breyr/top-frontend:1.0.2
image: breyr/top-frontend:1.0.3
container_name: frontend
ports:
- "80:80"
depends_on:
- backend

interconnect-api:
image: breyr/top-interconnectapi:1.0.2
image: breyr/top-interconnectapi:1.0.3
container_name: interconnect-api
environment:
SECRET_KEY: your_secret
Expand Down
30 changes: 27 additions & 3 deletions frontend/src/components/reactflow/overlayui/TopologyName.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,27 @@ export default function TopologyName() {
const [isEditing, setIsEditing] = useState(false);
const [inputWidth, setInputWidth] = useState(0);
const spanRef = useRef<HTMLSpanElement>(null);
const initialNameRef = useRef<string>(topologyData?.name || "");
const inputRef = useRef<HTMLInputElement>(null);
const { authenticatedApiClient } = useAuth();

const prevRenderTopologyName = topologyData?.name || "Topology Name";

useEffect(() => {
if (spanRef.current) {
setInputWidth(spanRef.current.offsetWidth);
}
}, [topologyName, isEditing]);

useEffect(() => {
if (!topologyData?.name) return;

document.title = topologyData.name;

return () => {
document.title = 'TOPHAT'
}
}, [topologyData?.name]);

const updateTopologyName = useCallback(async () => {
setIsSaving(true);
try {
Expand All @@ -30,7 +42,6 @@ export default function TopologyName() {
setTopologyData(res.data);
}
}
initialNameRef.current = topologyName; // Update the initial name reference
} catch (error) {
console.error("Failed to update topology name:", error);
} finally {
Expand All @@ -44,7 +55,7 @@ export default function TopologyName() {

const handleBlur = async () => {
setIsEditing(false);
if (topologyName !== initialNameRef.current) {
if (topologyName !== prevRenderTopologyName) {
await updateTopologyName();
}
};
Expand All @@ -53,14 +64,27 @@ export default function TopologyName() {
setIsEditing(true);
};

const handleKeyDown = async (e: React.KeyboardEvent<HTMLInputElement>) => {
if (e.key === 'Enter') {
e.preventDefault();
if (inputRef.current) {
inputRef.current.blur();
}
await updateTopologyName();
}
};


return (
<div className="flex flex-row items-center">
{/* Topology Name Input */}
{isEditing ? (
<input
ref={inputRef}
value={topologyName}
onChange={handleInputChange}
onBlur={handleBlur}
onKeyDown={handleKeyDown}
autoFocus
style={{ width: inputWidth }}
className="border rounded-sm p-2 text-black"
Expand Down
10 changes: 0 additions & 10 deletions frontend/src/routes/topology.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,6 @@ const TopologyPageContent: React.FC = () => {
})();
}, [user, authenticatedApiClient, id, setTopologyData, setLastUpdated, navigateTo, bookDevices]);

useEffect(() => {
if (!topologyData?.name) return;

document.title = topologyData.name;

return () => {
document.title = 'TOPHAT'
}
}, [topologyData?.name]);

useEffect(() => {
if (!loading && topologyData?.reactFlowState?.edges && !hasReinitializedLinks.current) {
hasReinitializedLinks.current = true;
Expand Down