Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
BenElferink committed Nov 20, 2024
2 parents ed87a46 + 224d326 commit a5de5e9
Show file tree
Hide file tree
Showing 90 changed files with 261 additions and 273 deletions.
15 changes: 4 additions & 11 deletions frontend/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,21 +124,14 @@ func startHTTPServer(flags *Flags, odigosMetrics *collectormetrics.OdigosMetrics
}

func httpFileServerWith404(fs http.FileSystem) http.Handler {
// Init outside of handler to respect manipulated paths
fileServer := http.FileServer(fs)

return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
path := r.URL.Path

// Check if the requested file exists
_, err := fs.Open(path)
_, err := fs.Open(r.URL.Path)
if err != nil {
// Redirect to root path
r.URL.Path = "/index.html"
// Serve index.html
r.URL.Path = "/"
}

// Serve the file
fileServer.ServeHTTP(w, r)
http.FileServer(fs).ServeHTTP(w, r)
})
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ export const SourcesList: React.FC<Props> = ({
onSelectFutureApps,

searchText,
selectAllForNamespace,
onSelectAll,
showSelectedOnly,

Expand All @@ -125,10 +124,10 @@ export const SourcesList: React.FC<Props> = ({
const selected = selectedSources[namespace] || [];
const futureApps = selectedFutureApps[namespace] || false;

const namespacePassesFilters = !searchText || namespace.toLowerCase().includes(searchText);
const namespacePassesFilters = (!searchText || namespace.toLowerCase().includes(searchText)) && (!showSelectedOnly || !!selected.length);
if (!namespacePassesFilters) return null;

const isNamespaceSelected = selectedNamespace === namespace && !selectAllForNamespace;
const isNamespaceSelected = selectedNamespace === namespace;
const isNamespaceCanSelect = namespaceLoaded && !!available.length;
const isNamespaceAllSourcesSelected = isNamespaceCanSelect && selected.length === sources.length;

Expand All @@ -139,7 +138,14 @@ export const SourcesList: React.FC<Props> = ({
<Group key={`namespace-${namespace}`} $selected={isNamespaceAllSourcesSelected} $isOpen={isNamespaceSelected && hasFilteredSources}>
<NamespaceItem $selected={isNamespaceAllSourcesSelected} onClick={() => onSelectNamespace(namespace)}>
<FlexRow>
<Checkbox disabled={namespaceLoaded && !isNamespaceCanSelect} initialValue={isNamespaceAllSourcesSelected} onChange={(bool) => onSelectAll(bool, namespace)} />
<Checkbox
// disabled={!isNamespaceCanSelect}
initialValue={isNamespaceAllSourcesSelected}
onChange={(bool) => {
if (bool) onSelectNamespace(namespace);
onSelectAll(bool, namespace);
}}
/>
<Text>{namespace}</Text>
</FlexRow>

Expand Down Expand Up @@ -169,7 +175,7 @@ export const SourcesList: React.FC<Props> = ({
<Checkbox initialValue={isSourceSelected} onChange={() => onSelectSource(source, namespace)} />
<Text>{source.name}</Text>
<Text opacity={0.8} size={10}>
{source.numberOfInstances} running instance{source.numberOfInstances !== 1 && 's'} · {source.kind}
{source.numberOfInstances} running instances · {source.kind}
</Text>
</FlexRow>
</SourceItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export const SourcesList: React.FC<Props> = ({
<TextWrapper>
<Text>{source.name}</Text>
<Text opacity={0.8} size={10}>
{source.numberOfInstances} running instance{source.numberOfInstances !== 1 && 's'} · {source.kind}
{source.numberOfInstances} running instances · {source.kind}
</Text>
</TextWrapper>
</ListItemContent>
Expand Down
2 changes: 1 addition & 1 deletion frontend/webapp/dep-out/404.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/b4846eed11c4725f.css" crossorigin="" data-precedence="next"/><link rel="preload" href="/_next/static/chunks/webpack-6ff63b03f4023a47.js" as="script" fetchPriority="low" crossorigin=""/><script src="/_next/static/chunks/fd9d1056-9cea142d2b41eb16.js" async="" crossorigin=""></script><script src="/_next/static/chunks/650-975aaf0197a949b5.js" async="" crossorigin=""></script><script src="/_next/static/chunks/main-app-2f75cbb4ad4c612e.js" async="" crossorigin=""></script><title>404: This page could not be found.</title><script src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js" crossorigin="" noModule=""></script><style data-styled="" data-styled-version="6.0.7"></style></head><body style="margin:0;position:fixed;scrollbar-width:none;width:100vw;height:100vh;background-color:#07111A"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><div class="notification-manager__NotificationsWrapper-sc-i62zdt-0 OHHxt"></div><script src="/_next/static/chunks/webpack-6ff63b03f4023a47.js" crossorigin="" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/css/b4846eed11c4725f.css\",\"style\",{\"crossOrigin\":\"\"}]\n0:\"$L2\"\n"])</script><script>self.__next_f.push([1,"3:I{\"id\":3710,\"chunks\":[\"272:static/chunks/webpack-6ff63b03f4023a47.js\",\"971:static/chunks/fd9d1056-9cea142d2b41eb16.js\",\"650:static/chunks/650-975aaf0197a949b5.js\"],\"name\":\"\",\"async\":false}\n5:I{\"id\":1271,\"chunks\":[\"272:static/chunks/webpack-6ff63b03f4023a47.js\",\"971:static/chunks/fd9d1056-9cea142d2b41eb16.js\",\"650:static/chunks/650-975aaf0197a949b5.js\"],\"name\":\"\",\"async\":false}\n"])</script><script>self.__next_f.push([1,"6:I{\"id\":9228,\"chunks\":[\"573:static/chunks/7af96b1d-661b23cf9b38f432.js\",\"727:static/chunks/9ccfb3e7-a5cf8b8ce3814083.js\",\"28:static/chunks/decd49cc-dce671d85655dfc2.js\",\"845:static/chunks/845-89170f42495c5944.js\",\"320:static/chunks/320-e9b7d301c5d0406b.js\",\"433:static/chunks/433-e81cb52d52eafb19.js\",\"267:static/chunks/267-57acc36961035831.js\",\"374:static/chunks/374-2ba1f41af5190f4d.js\",\"32:static/chunks/32-05f69fa51f26447b.js\",\"585:static/chunks/585-82bbcbf01c3dfd29.js\",\"785:static/chunks/785-a83a8c06b8294aa1.js\",\"152:static/chunks/152-71a80fa64d88647e.js\",\"185:static/chunks/app/layout-f1bf1bb53a8c1c88.js\"],\"name\":\"\",\"async\":false}\n"])</script><script>self.__next_f.push([1,"7:I{\"id\":3602,\"chunks\":[\"272:static/chunks/webpack-6ff63b03f4023a47.js\",\"971:static/chunks/fd9d1056-9cea142d2b41eb16.js\",\"650:static/chunks/650-975aaf0197a949b5.js\"],\"name\":\"\",\"async\":false}\n8:I{\"id\":9347,\"chunks\":[\"272:static/chunks/webpack-6ff63b03f4023a47.js\",\"971:static/chunks/fd9d1056-9cea142d2b41eb16.js\",\"650:static/chunks/650-975aaf0197a949b5.js\"],\"name\":\"\",\"async\":false}\n"])</script><script>self.__next_f.push([1,"2:[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/b4846eed11c4725f.css\",\"precedence\":\"next\",\"crossOrigin\":\"\"}]],[\"$\",\"$L3\",null,{\"buildId\":\"0Oiwe1o8xnhEZZqmjsPv9\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/_not-found\",\"initialTree\":[\"\",{\"children\":[\"__PAGE__\",{}]},\"$undefined\",\"$undefined\",true],\"initialHead\":[false,\"$L4\"],\"globalErrorComponent\":\"$5\",\"children\":[null,[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$L7\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"template\":[\"$\",\"$L8\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[],\"childProp\":{\"current\":[\"$L9\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],\"segment\":\"__PAGE__\"},\"styles\":[]}],\"params\":{}}],null]}]]\n"])</script><script>self.__next_f.push([1,"4:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n9:null\n"])</script></body></html><style data-styled="" data-styled-version="6.0.7"></style>
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/b4846eed11c4725f.css" crossorigin="" data-precedence="next"/><link rel="preload" href="/_next/static/chunks/webpack-6ff63b03f4023a47.js" as="script" fetchPriority="low" crossorigin=""/><script src="/_next/static/chunks/fd9d1056-9cea142d2b41eb16.js" async="" crossorigin=""></script><script src="/_next/static/chunks/650-975aaf0197a949b5.js" async="" crossorigin=""></script><script src="/_next/static/chunks/main-app-2f75cbb4ad4c612e.js" async="" crossorigin=""></script><title>404: This page could not be found.</title><script src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js" crossorigin="" noModule=""></script><style data-styled="" data-styled-version="6.0.7"></style></head><body style="margin:0;position:fixed;scrollbar-width:none;width:100vw;height:100vh;background-color:#07111A"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><div class="notification-manager__NotificationsWrapper-sc-i62zdt-0 OHHxt"></div><script src="/_next/static/chunks/webpack-6ff63b03f4023a47.js" crossorigin="" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/css/b4846eed11c4725f.css\",\"style\",{\"crossOrigin\":\"\"}]\n0:\"$L2\"\n"])</script><script>self.__next_f.push([1,"3:I{\"id\":3710,\"chunks\":[\"272:static/chunks/webpack-6ff63b03f4023a47.js\",\"971:static/chunks/fd9d1056-9cea142d2b41eb16.js\",\"650:static/chunks/650-975aaf0197a949b5.js\"],\"name\":\"\",\"async\":false}\n5:I{\"id\":1271,\"chunks\":[\"272:static/chunks/webpack-6ff63b03f4023a47.js\",\"971:static/chunks/fd9d1056-9cea142d2b41eb16.js\",\"650:static/chunks/650-975aaf0197a949b5.js\"],\"name\":\"\",\"async\":false}\n"])</script><script>self.__next_f.push([1,"6:I{\"id\":9228,\"chunks\":[\"573:static/chunks/7af96b1d-661b23cf9b38f432.js\",\"727:static/chunks/9ccfb3e7-a5cf8b8ce3814083.js\",\"28:static/chunks/decd49cc-dce671d85655dfc2.js\",\"845:static/chunks/845-89170f42495c5944.js\",\"320:static/chunks/320-e9b7d301c5d0406b.js\",\"433:static/chunks/433-e81cb52d52eafb19.js\",\"611:static/chunks/611-4368b8e4d58ddaa0.js\",\"305:static/chunks/305-80ab836000a4f9a3.js\",\"32:static/chunks/32-708c0ff33a8c4e4f.js\",\"585:static/chunks/585-bacbad42c2242b55.js\",\"514:static/chunks/514-b3691d6ac242362e.js\",\"152:static/chunks/152-ad6c32c72bd57158.js\",\"185:static/chunks/app/layout-c0a6904761fd962b.js\"],\"name\":\"\",\"async\":false}\n"])</script><script>self.__next_f.push([1,"7:I{\"id\":3602,\"chunks\":[\"272:static/chunks/webpack-6ff63b03f4023a47.js\",\"971:static/chunks/fd9d1056-9cea142d2b41eb16.js\",\"650:static/chunks/650-975aaf0197a949b5.js\"],\"name\":\"\",\"async\":false}\n8:I{\"id\":9347,\"chunks\":[\"272:static/chunks/webpack-6ff63b03f4023a47.js\",\"971:static/chunks/fd9d1056-9cea142d2b41eb16.js\",\"650:static/chunks/650-975aaf0197a949b5.js\"],\"name\":\"\",\"async\":false}\n"])</script><script>self.__next_f.push([1,"2:[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/b4846eed11c4725f.css\",\"precedence\":\"next\",\"crossOrigin\":\"\"}]],[\"$\",\"$L3\",null,{\"buildId\":\"MlkLHWULwZSrLjScYaxbg\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/_not-found\",\"initialTree\":[\"\",{\"children\":[\"__PAGE__\",{}]},\"$undefined\",\"$undefined\",true],\"initialHead\":[false,\"$L4\"],\"globalErrorComponent\":\"$5\",\"children\":[null,[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$L7\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"template\":[\"$\",\"$L8\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[],\"childProp\":{\"current\":[\"$L9\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],\"segment\":\"__PAGE__\"},\"styles\":[]}],\"params\":{}}],null]}]]\n"])</script><script>self.__next_f.push([1,"4:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n9:null\n"])</script></body></html><style data-styled="" data-styled-version="6.0.7"></style>

Large diffs are not rendered by default.

Loading

0 comments on commit a5de5e9

Please sign in to comment.