Skip to content

armgit / burr

Public Imported from GitHub
0

Build applications that make decisions (chatbots, agents, simulations, etc...). Monitor, trace, persist, and execute on your own infrastructure.

Adds indicator for null primary key in breadcrumb

elijahbenizzy3d85d8253ad0
diff --git a/telemetry/ui/src/components/nav/breadcrumb.tsx b/telemetry/ui/src/components/nav/breadcrumb.tsx
index 7487f212..1243fdf3 100644
--- a/telemetry/ui/src/components/nav/breadcrumb.tsx
+++ b/telemetry/ui/src/components/nav/breadcrumb.tsx
@@ -33,27 +33,35 @@ export const BreadCrumb = () => {
</Link>
</div>
</li>
- {pages.map((page) => (
- <li key={page.name}>
- <div className="flex items-center">
- <svg
- className="h-5 w-5 flex-shrink-0 text-gray-300"
- fill="currentColor"
- viewBox="0 0 20 20"
- aria-hidden="true"
- >
- <path d="M5.555 17.776l8-16 .894.448-8 16-.894-.448z" />
- </svg>
- <Link
- to={page.href}
- className="ml-4 text-sm font-medium text-gray-500 hover:text-gray-700"
- aria-current={page.current ? 'page' : undefined}
- >
- {page.name}
- </Link>
- </div>
- </li>
- ))}
+ {pages.map((page, index) => {
+ // Quick trick to catch null primary keys
+ const isNullPK = page.name === 'null' && index === 2;
+ return (
+ <li key={page.name}>
+ <div className="flex items-center">
+ <svg
+ className="h-5 w-5 flex-shrink-0 text-gray-300"
+ fill="currentColor"
+ viewBox="0 0 20 20"
+ aria-hidden="true"
+ >
+ <path d="M5.555 17.776l8-16 .894.448-8 16-.894-.448z" />
+ </svg>
+ {isNullPK ? (
+ <span className="ml-4 text-sm font-medium text-gray-200">no primary key</span>
+ ) : (
+ <Link
+ to={page.href}
+ className="ml-4 text-sm font-medium text-gray-500 hover:text-gray-700"
+ aria-current={page.current ? 'page' : undefined}
+ >
+ {page.name}
+ </Link>
+ )}
+ </div>
+ </li>
+ );
+ })}
</ol>
</nav>
);