Skip to content

Commit

Permalink
Update build and deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
andyyu824 committed Jan 14, 2025
1 parent 1824af6 commit 33a7a0a
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 75 deletions.
52 changes: 26 additions & 26 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- 'main'
paths-ignore:
- '**/README.md'
workflow_dispatch:
# workflow_dispatch:

env:
ACTIONS_STEP_DEBUG: true
Expand All @@ -29,36 +29,36 @@ jobs:
- name: Initialize Sub-Packages
run: npm run init-project container

- name: Initialize project agin
- name: Initialize Project
run: npm run init-project twice

- name: build tapis-ui
run: npm run build
# run: |
# echo "Initializing TapisUI sub-packages..."
# # Directories to build
# dirs=(
# "packages/tapisui-api"
# "packages/tapisui-hooks"
# "packages/tapisui-common"
# "packages/tapisui-extensions-core"
# "packages/tapisui-extension-devtools"
# "packages/icicle-tapisui-extension"
# ""
# )
#
# for dir in "${dirs[@]}"; do
# echo "Processing $dir..."
# cd "$dir" || { echo "Package directory $dir does not exist"; exit 1; }
# echo "Installing dependencies..."
# npm install --verbose || { echo "Failed to install dependencies in $dir"; exit 1; }
# echo "Building package..."
# npm run build || { echo "Failed to build package in $dir"; exit 1; }
# cd ../../ || exit 1
# done
# run: |
# echo "Initializing TapisUI sub-packages..."
# # Directories to build
# dirs=(
# "packages/tapisui-api"
# "packages/tapisui-hooks"
# "packages/tapisui-common"
# "packages/tapisui-extensions-core"
# "packages/tapisui-extension-devtools"
# "packages/icicle-tapisui-extension"
# ""
# )
#
# for dir in "${dirs[@]}"; do
# echo "Processing $dir..."
# cd "$dir" || { echo "Package directory $dir does not exist"; exit 1; }
# echo "Installing dependencies..."
# npm install --verbose || { echo "Failed to install dependencies in $dir"; exit 1; }
# echo "Building package..."
# npm run build || { echo "Failed to build package in $dir"; exit 1; }
# cd ../../ || exit 1
# done

# - name: Format Code
# run: npm run prettier
# - name: Format Code
# run: npm run prettier

# - name: add config
# run: echo "${{ secrets.CONFIG_JSON }}" | base64 -d > src/config.json
Expand Down
64 changes: 32 additions & 32 deletions src/app/Apps/_components/AppsTable/AppsTable.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from "react";
import { useRouteMatch, NavLink } from "react-router-dom";
import { useList } from "@tapis/tapisui-hooks/dist/apps";
import { Apps as Hooks } from "@tapis/tapisui-hooks";
import { Apps } from "@tapis/tapis-typescript";
import { QueryWrapper } from "@tapis/tapisui-common/dist/wrappers";
import { Column, Row, CellProps } from "react-table";
import { InfiniteScrollTable, Icon } from "@tapis/tapisui-common/dist/ui";
import styles from "./AppsTable.module.scss";
import React from 'react';
import { useRouteMatch, NavLink } from 'react-router-dom';
import { useList } from '@tapis/tapisui-hooks/dist/apps';
import { Apps as Hooks } from '@tapis/tapisui-hooks';
import { Apps } from '@tapis/tapis-typescript';
import { QueryWrapper } from '@tapis/tapisui-common/dist/wrappers';
import { Column, Row, CellProps } from 'react-table';
import { InfiniteScrollTable, Icon } from '@tapis/tapisui-common/dist/ui';
import styles from './AppsTable.module.scss';

interface AppData {
id: string;
Expand All @@ -23,7 +23,7 @@ type AppListingTableProps = {
getRowProps?: (row: Row<AppData>) => any;
onInfiniteScroll?: () => any;
isLoading?: boolean;
fields?: Array<"label" | "shortDescription">;
fields?: Array<'label' | 'shortDescription'>;
};

export const AppListingTable: React.FC<AppListingTableProps> = React.memo(
Expand All @@ -37,35 +37,35 @@ export const AppListingTable: React.FC<AppListingTableProps> = React.memo(
const { data, isLoading, error } = Hooks.useList(
{
listType: Apps.ListTypeEnum.All,
select: "allAttributes",
select: 'allAttributes',
computeTotal: true,
},
{ refetchOnWindowFocus: false }
);

const appList: Array<Apps.TapisApp> = data?.result ?? [];

const excludeList: string[] = [""];
const excludeList: string[] = [''];

const filteredAppList = appList.filter((app) => {
if (!app || !app.id) return false;
return !excludeList.includes(app.id);
});

const appOrder = [
"demux-uhhpc",
"ITS-pipeline-uhhpc",
"16S-v0.0.2-pipeline-uhhpc",
"16Sv1-pipeline-uhhpc",
"ampliseq-ITS-pipeline-uhhpc",
"ampliseq-16S-pipeline-uhhpc",
"ampliseq-condensed-pipeline-test",
"ampliseq-pipeline-test",
'demux-uhhpc',
'ITS-pipeline-uhhpc',
'16S-v0.0.2-pipeline-uhhpc',
'16Sv1-pipeline-uhhpc',
'ampliseq-ITS-pipeline-uhhpc',
'ampliseq-16S-pipeline-uhhpc',
'ampliseq-condensed-pipeline-test',
'ampliseq-pipeline-test',
];

const sortedAppList = filteredAppList.sort((a, b) => {
const indexA = appOrder.indexOf(a.id ?? "");
const indexB = appOrder.indexOf(b.id ?? "");
const indexA = appOrder.indexOf(a.id ?? '');
const indexB = appOrder.indexOf(b.id ?? '');

const orderA = indexA === -1 ? appOrder.length : indexA;
const orderB = indexB === -1 ? appOrder.length : indexB;
Expand All @@ -76,30 +76,30 @@ export const AppListingTable: React.FC<AppListingTableProps> = React.memo(
const tableColumns: Array<Column<AppData>> = [
...prependColumns,
{
Header: "Name",
accessor: "id",
Header: 'Name',
accessor: 'id',
Cell: ({ value }: CellProps<AppData, string>) => <span>{value}</span>,
},
{
Header: "Short Description",
accessor: "description",
Header: 'Short Description',
accessor: 'description',
Cell: ({ value }: CellProps<AppData, string | undefined>) => (
<span>{value}</span>
),
},
{
Header: "App Version",
accessor: "version",
Header: 'App Version',
accessor: 'version',
Cell: ({ value }: CellProps<AppData, string>) => <span>{value}</span>,
},
{
Header: "Actions",
Header: 'Actions',
Cell: ({ row }: CellProps<AppData>) => (
<NavLink
to={`${url}/${row.original.id}/${row.original.version}`}
className={styles["action-button"]}
className={styles['action-button']}
>
<Icon name={"push-right"} /> <span>Run</span>
<Icon name={'push-right'} /> <span>Run</span>
</NavLink>
),
},
Expand Down Expand Up @@ -128,7 +128,7 @@ const AppsTable: React.FC = () => {
);

return (
<div style={{ padding: "0.5rem", margin: "0.5rem", border: "1px #88888" }}>
<div style={{ padding: '0.5rem', margin: '0.5rem', border: '1px #88888' }}>
<QueryWrapper isLoading={isLoading} error={error}>
<AppListingTable />
</QueryWrapper>
Expand Down
32 changes: 16 additions & 16 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
import React from 'react';
import { HashRouter as Router } from 'react-router-dom';
import { createRoot } from 'react-dom/client';
import App from 'app';
import { TapisProvider } from '@tapis/tapisui-hooks';
import 'styles/index.css';
import { resolveBasePath } from 'utils/resolveBasePath';
import reportWebVitals from './reportWebVitals';
import { ExtensionsProvider } from './extensions';
import { Extension } from '@tapis/tapisui-extensions-core';
import { extension as icicleExtension } from '@icicle/tapisui-extension';
import { NotificationsProvider } from 'app/_components/Notifications';
import Theme from './theme'; // Import the Theme component
import React from "react";
import { HashRouter as Router } from "react-router-dom";
import { createRoot } from "react-dom/client";
import App from "app";
import { TapisProvider } from "@tapis/tapisui-hooks";
import "styles/index.css";
import { resolveBasePath } from "utils/resolveBasePath";
import reportWebVitals from "./reportWebVitals";
import { ExtensionsProvider } from "./extensions";
import { Extension } from "@tapis/tapisui-extensions-core";
import { extension as icicleExtension } from "@icicle/tapisui-extension";
import { NotificationsProvider } from "app/_components/Notifications";
import Theme from "./theme"; // Import the Theme component

const initializedExtensions: { [key: string]: Extension } = {
'@icicle/tapisui-extension': icicleExtension,
"@icicle/tapisui-extension": icicleExtension,
};

const container = document.getElementById('react-root');
const container = document.getElementById("react-root");
const root = createRoot(container!);

root.render(
<React.StrictMode>
<ExtensionsProvider extensions={initializedExtensions}>
<TapisProvider basePath="https://tacc.tapis.io">
<TapisProvider basePath="https://dev.tapis.io">
{/*<TapisProvider basePath={resolveBasePath()}>*/}
<Theme>
<NotificationsProvider>
Expand Down
2 changes: 1 addition & 1 deletion src/utils/resolveBasePath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ export const resolveBasePath = () => {
// return import.meta.env.VITE_TAPIS_BASE_URL;
// }

return "https://dev.tapis.io";
return 'https://dev.tapis.io';
};

0 comments on commit 33a7a0a

Please sign in to comment.