Skip to content

Commit

Permalink
Fix layout styles and open web ui page
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandf committed Jun 27, 2024
1 parent 82b8975 commit 7fbbabf
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 27 deletions.
6 changes: 3 additions & 3 deletions lib/icicle-tapisui-extension/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ extension.registerService({

extension.registerService({
id: 'jupyter-lab',
sidebarDisplayName: 'Jupyter',
iconName: 'globe',
sidebarDisplayName: 'JupyterLab',
iconName: 'jupyter',
component: JupyterLabPage,
});

extension.registerService({
id: 'open-web-ui',
sidebarDisplayName: 'Open Web UI',
sidebarDisplayName: 'Open WebUI',
iconName: 'globe',
component: OpenWebUIPage,
});
Expand Down
4 changes: 3 additions & 1 deletion lib/icicle-tapisui-extension/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ export const JupyterLabPage: React.FC = () => {
return (
<div>
<SectionHeader>Jupyter Lab</SectionHeader>
<iframe style={{width: "100%", height: "800px", border: "none"}} src="https://jupyterlab.pods.tacc.develop.tapis.io/" />
</div>
);
};

export const OpenWebUIPage: React.FC = () => {
return (
<div>
<div style={{width: "100%", height: "100%", display: "flex", flexDirection: "column", overflow: "hidden"}}>
<SectionHeader>Open Web UI</SectionHeader>
<iframe style={{flexGrow: 1, border: "none"}} src="https://openwebui.pods.tacc.develop.tapis.io/" />
</div>
);
};
26 changes: 6 additions & 20 deletions src/app/_Layout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,11 @@ const Layout: React.FC = () => {
<div className="tapis-ui__header">
<div>
<Link to={'/'}>
{extension?.logo?.url ? (
<img
style={{ height: '30px' }}
className="logo"
src={extension?.logo.url}
/>
) : (
<img
style={{ height: '30px' }}
className="logo"
src="./tapislogo.png"
/>
)}
<img
style={{ height: '30px' }}
className="logo"
src={extension?.logo?.url || "./tapislogo.png"}
/>
</Link>
{extension?.logo?.logoText || 'TapisUI'}
</div>
Expand Down Expand Up @@ -98,16 +90,10 @@ const Layout: React.FC = () => {
</div>
);

const workbenchContent = (
<div className="workbench-content">
<Router />
</div>
);

return (
<NotificationsProvider>
<div style={{ display: 'flex', flexGrow: 1, height: '100vh' }}>
<PageLayout top={header} left={<Sidebar />} right={workbenchContent} />
<PageLayout top={header} left={<Sidebar />} right={<Router />} />
</div>
</NotificationsProvider>
);
Expand Down
6 changes: 3 additions & 3 deletions src/extensions/useExtension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ const useExtension = () => {
const { extensions } = useContext(ExtensionsContext);
let basePath = resolveBasePath();
// TODO Add logic to toggle between baseUrls iff in a local environment
// if (basePath == 'https://dev.develop.tapis.io') {
// basePath = 'https://icicleai.tapis.io';
// }
if (basePath == 'https://dev.develop.tapis.io') {
basePath = 'https://icicleai.tapis.io';
}

let extension = undefined;
let extensionName = undefined;
Expand Down

0 comments on commit 7fbbabf

Please sign in to comment.