Skip to content

Commit

Permalink
Adding a new tab and page via TapisUI Extension feature
Browse files Browse the repository at this point in the history
  • Loading branch information
NotChristianGarcia committed Aug 2, 2024
1 parent e45cfe1 commit 1aea601
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/icicle-tapisui-extension/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
DigitalAg,
VisualAnalytics,
SmartScheduler,
TrainingCatalog,
} from './pages';

const extension = createExtension({
Expand All @@ -36,6 +37,7 @@ const extension = createExtension({
'digital-ag',
'visual-analytics',
'smart-scheduler',
'training-catalog',
],
authMethods: ['implicit', 'password'],
logo: {
Expand Down Expand Up @@ -101,6 +103,13 @@ extension.registerService({
component: SmartScheduler,
});

extension.registerService({
id: 'training-catalog',
sidebarDisplayName: 'Training Catalog',
iconName: 'globe',
component: TrainingCatalog,
});

extension.serviceCustomizations.workflows.dagTasks = generatedTasks;

export { extension };
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import * as React from 'react';
import { SectionHeader } from '@tapis/tapisui-common';
import { Component } from '@tapis/tapisui-extensions-core';

export const TrainingCatalog: Component = ({ accessToken }) => {
return (
<div
style={{
width: '100%',
height: '100%',
display: 'flex',
flexDirection: 'column',
overflow: 'hidden',
}}
>
{accessToken ? (
<iframe
style={{ flexGrow: 1, border: 'none' }}
src={`https://davidl0914.github.io/mkdocs-testing/`}
/>
) : (
<>Invalid JWT. Log out of TapisUI then log back in</>
)}
</div>
);
};

export default TrainingCatalog;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as TrainingCatalog } from './TrainingCatalog';

0 comments on commit 1aea601

Please sign in to comment.