Skip to content

Commit

Permalink
Fix publix certificates page (#459)
Browse files Browse the repository at this point in the history
  • Loading branch information
anatheka authored Jul 18, 2023
1 parent 6bfb892 commit bcf0673
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/lib/CertificateCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export let certificate: Certificate;
</td>
<td>{state.timestamp}</td>
<!-- When it is a new certificate, there is no tree yet -->
<!-- svelte-ignore empty-block -->
{#if state.state == 'new'}
{:else}
<td><a href="https://cce-test.k8s.medina.esilab.org/#/?treeStateId={state.treeId}">{state.treeId}</a></td>
Expand Down
5 changes: 5 additions & 0 deletions src/lib/Navigation.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ console.log($page.url);
</NavLink>
</NavItem>
{/each} -->
<!--TODO: if not logged in, don't show-->
{#if loggedIn}
<NavItem>
<NavLink active={$page.url.pathname.startsWith("/cloud")} href="{base}{"/cloud"}">
<Fa icon={faCloud} /> Cloud Services
Expand All @@ -87,12 +89,14 @@ console.log($page.url);
<Fa icon={faCertificate} /> Certificates
</NavLink>
</NavItem>
{/if}
<!--TODO: if logged in, don't show-->
{#if !loggedIn}
<NavItem>
<NavLink href="{base}/login">Login</NavLink>
</NavItem>
{/if}

<NavItem>
<NavLink href="https://medina-project.eu/wp-content/uploads/MEDINA_User_Manuals/MEDINA_Orchestrator_UserManual.pdf" target="_blank">
<Fa icon={faQuestion} /> Help
Expand All @@ -110,6 +114,7 @@ console.log($page.url);
</Nav>
</Collapse>
</Navbar>

<div style="clear: both;"></div>

<style>
Expand Down
8 changes: 7 additions & 1 deletion src/routes/+layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@ export const load: LayoutLoad = async ({ fetch }) => {
})
.catch(() => {
// ignore, we will catch it later
console.error("error getting metrics")
return
});

listControls(null, null, fetch).then((list) => {
controls.set(list);
})
.catch(() => {
// ignore, we will catch it later
console.error("error getting controls")
return
});

try {
Expand All @@ -34,7 +38,9 @@ export const load: LayoutLoad = async ({ fetch }) => {
redirect: '/cloud'
}
} catch (error) {
return redirectLogin('/cloud');
console.warn("error start page load function")
return
// return redirectLogin('/cloud');
}
}

Expand Down
1 change: 0 additions & 1 deletion src/routes/catalogs/[id]/categories/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
<script lang="ts">
export let data: import('./$types').PageData;
</script>
2 changes: 1 addition & 1 deletion src/routes/public/certificates/+page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { redirectLogin } from '$lib/oauth';
/**
* @type {import('@sveltejs/kit').PageLoad}
*/
export async function load({ params, fetch, context }) {
export async function load({ params, fetch }) {
return listPublicCertificates()
.then((certificates) => {
return {
Expand Down

0 comments on commit bcf0673

Please sign in to comment.