diff --git a/src/components/dashboard/bakery-card.js b/src/components/dashboard/bakery-card.js
deleted file mode 100644
index 27c4d75d..00000000
--- a/src/components/dashboard/bakery-card.js
+++ /dev/null
@@ -1,73 +0,0 @@
-import { Link } from '@/components'
-import {
- Badge,
- Box,
- Heading,
- LinkBox,
- LinkOverlay,
- Stack,
- Text,
- VStack,
- WrapItem,
-} from '@chakra-ui/react'
-import React from 'react'
-import { BsGlobe2 } from 'react-icons/bs'
-
-export const BakeryCard = ({ name, region, description, id }) => {
- const href = `/dashboard/bakery/${id}`
- return (
-
-
-
-
-
- {name}
-
-
- {' '}
-
- {description}
-
-
-
-
-
-
- {region}
-
-
-
-
-
-
-
-
- )
-}
diff --git a/src/components/dashboard/feedstock-card.js b/src/components/dashboard/feedstock-card.js
deleted file mode 100644
index 3a61eea6..00000000
--- a/src/components/dashboard/feedstock-card.js
+++ /dev/null
@@ -1,121 +0,0 @@
-import { Error, Link } from '@/components'
-import { MaintainersGroup } from '@/components/dashboard'
-import { useMeta, useRepo } from '@/lib/endpoints'
-import { TimeDeltaFormatter } from '@/lib/time-delta'
-import {
- Box,
- Heading,
- LinkBox,
- LinkOverlay,
- Skeleton,
- Stack,
- Text,
-} from '@chakra-ui/react'
-import { GoMarkGithub } from 'react-icons/go'
-
-export const FeedstockCard = ({ spec, id }) => {
- const href = `/dashboard/feedstock/${id}`
-
- const {
- repo,
- repoError,
- isLoading: repoIsLoading,
- } = useRepo(`https://api.github.com/repos/${spec}/commits/HEAD`)
-
- const { meta, metaError, isLoading: metaIsLoading } = useMeta(spec)
-
- if (repoError || metaError)
- return (
-
- )
-
- return (
-
-
-
-
-
-
- {meta?.title
- ? meta.title
- : spec
- .toLowerCase()
- .replace('pangeo-forge/', '')
- .replace('-feedstock', '')}
-
-
-
-
-
- {meta?.description
- ? meta.description
- : spec.includes('staged-recipes')
- ? 'A place to submit pangeo-forge recipes before they become fully fledged pangeo-forge feedstocks'
- : repo?.commit.message}
-
-
-
-
-
-
-
-
-
-
-
-
- {TimeDeltaFormatter(
- Date.now() - Date.parse(repo?.commit.committer.date),
- )}{' '}
- via
-
-
-
-
-
-
-
-
-
- )
-}
diff --git a/src/components/dashboard/feedstock-datasets.js b/src/components/dashboard/feedstock-datasets.js
deleted file mode 100644
index 2175510b..00000000
--- a/src/components/dashboard/feedstock-datasets.js
+++ /dev/null
@@ -1,42 +0,0 @@
-import { Link } from '@/components'
-import { DatasetsAccordion } from '@/components/dashboard'
-import { Alert, AlertIcon, Box, Stack, Text } from '@chakra-ui/react'
-
-export const FeedstockDatasets = ({ datasets }) => {
- const myBinderLink =
- 'https://mybinder.org/v2/gh/pangeo-forge/sandbox/binder?urlpath=git-pull%3Frepo%3Dhttps%253A%252F%252Fgithub.com%252Fpangeo-forge%252Fsandbox%26urlpath%3Dlab%252Ftree%252Fsandbox%252Fscratch.ipynb%26branch%3Dmain'
- return (
- <>
- {' '}
-
-
-
-
-
- Each dataset can be accessed by running the Python code available
- under the dataset's respective section below. This code can be
- run on{' '}
-
- MyBinder
-
- .
-
-
-
-
-
-
- >
- )
-}
diff --git a/src/components/dashboard/feedstock-info.js b/src/components/dashboard/feedstock-info.js
deleted file mode 100644
index 471b2be8..00000000
--- a/src/components/dashboard/feedstock-info.js
+++ /dev/null
@@ -1,106 +0,0 @@
-import { Link } from '@/components'
-import { License, Maintainers, Providers } from '@/components/dashboard'
-import {
- Box,
- Button,
- Heading,
- HStack,
- SimpleGrid,
- Stack,
- Text,
- VStack,
-} from '@chakra-ui/react'
-import { GoRepo } from 'react-icons/go'
-import { MdDynamicFeed } from 'react-icons/md'
-
-export const FeedstockInfo = ({
- id,
- repo,
- name,
- title,
- description,
- bakery,
- license,
- license_link,
- providers,
- maintainers,
-}) => {
- const details = {
- Title: title,
- Description: description,
- Bakery: bakery,
- License: ,
- Providers: ,
- Maintainers: ,
- }
- return (
- <>
-
- {name?.split('-feedstock')[0]}
-
-
-
-
-
- {' '}
- {repo == 'pangeo-forge/staged-recipes' && (
-
- A place to submit pangeo-forge recipes before they become fully
- fledged pangeo-forge feedstocks.
-
- )}
- {repo !== 'pangeo-forge/staged-recipes' && (
-
- {Object.keys(details).map((key, index) => (
-
- {' '}
-
- {key}
-
-
- {details[key]}
-
-
-
- ))}
-
- )}
- >
- )
-}
diff --git a/src/components/dashboard/flow-runs-accordion.js b/src/components/dashboard/flow-runs-accordion.js
deleted file mode 100644
index 13b82017..00000000
--- a/src/components/dashboard/flow-runs-accordion.js
+++ /dev/null
@@ -1,59 +0,0 @@
-import { LogLine } from '@/components/dashboard'
-import { AddIcon, MinusIcon } from '@chakra-ui/icons'
-import {
- Accordion,
- AccordionButton,
- AccordionItem,
- AccordionPanel,
- Box,
-} from '@chakra-ui/react'
-
-const FlowRun = ({ index, run }) => {
- return (
-
- {({ isExpanded }) => (
- <>
-
-
-
- Flow Run {index}
-
- {isExpanded ? (
-
- ) : (
-
- )}
-
-
-
- {run.logs?.map((log, index) => (
-
-
-
- ))}
-
- >
- )}
-
- )
-}
-
-export const FlowRunsAccordion = ({ runs }) => {
- return (
-
-
- {runs && (
- <>
- {runs.map((run, index) => {
- return
- })}
- >
- )}
-
-
- )
-}
diff --git a/src/components/dashboard/index.js b/src/components/dashboard/index.js
deleted file mode 100644
index 8ff0cf7d..00000000
--- a/src/components/dashboard/index.js
+++ /dev/null
@@ -1,20 +0,0 @@
-export { BakeryCard } from '@/components/dashboard/bakery-card'
-export { FeedstockCard } from '@/components/dashboard/feedstock-card'
-export { FeedstockDatasets } from '@/components/dashboard/feedstock-datasets'
-export { FeedstockInfo } from '@/components/dashboard/feedstock-info'
-export { FlowRunsAccordion } from '@/components/dashboard/flow-runs-accordion'
-export { License } from '@/components/dashboard/license'
-export { LogLine } from '@/components/dashboard/log-line'
-export {
- Maintainers,
- MaintainersGroup,
-} from '@/components/dashboard/maintainers'
-export { Menu } from '@/components/dashboard/menu'
-export { Providers } from '@/components/dashboard/providers'
-export { RecipeRunCard } from '@/components/dashboard/recipe-run-card'
-export { RecipeRunDetails } from '@/components/dashboard/recipe-run-details'
-export { RecipeRuns } from '@/components/dashboard/recipe-runs'
-export { StatusBadge } from '@/components/dashboard/status-badge'
-export { StatusIndicatorIcon } from '@/components/dashboard/status-indicator-icon'
-export { Summary } from '@/components/dashboard/summary'
-export { DatasetsAccordion } from '@/components/dataset/datasets-accordion'
diff --git a/src/components/dashboard/license.js b/src/components/dashboard/license.js
deleted file mode 100644
index b0b3e617..00000000
--- a/src/components/dashboard/license.js
+++ /dev/null
@@ -1,16 +0,0 @@
-import { Link } from '@/components'
-
-export const License = ({ name, link }) => {
- const href =
- name === 'proprietary' ? link?.url : `https://spdx.org/licenses/${name}`
-
- const text = name === 'proprietary' ? link?.title : name
-
- return (
- <>
-
- {text}
-
- >
- )
-}
diff --git a/src/components/dashboard/log-line.js b/src/components/dashboard/log-line.js
deleted file mode 100644
index 5ded0ff3..00000000
--- a/src/components/dashboard/log-line.js
+++ /dev/null
@@ -1,20 +0,0 @@
-import { SimpleGrid, Text } from '@chakra-ui/react'
-import React from 'react'
-
-export const LogLine = ({ timestamp, level, message }) => {
- return (
-
-
- {' '}
- {timestamp} ({level})
-
-
- {message}
-
- )
-}
diff --git a/src/components/dashboard/maintainers.js b/src/components/dashboard/maintainers.js
deleted file mode 100644
index 46f1d133..00000000
--- a/src/components/dashboard/maintainers.js
+++ /dev/null
@@ -1,49 +0,0 @@
-import { Link } from '@/components'
-import { Avatar, AvatarGroup, Wrap, WrapItem } from '@chakra-ui/react'
-
-export const Maintainers = ({ maintainers }) => {
- if (!maintainers) return null
- return (
-
- {maintainers.map((maintainer) => (
-
-
-
- ))}
-
- )
-}
-
-export const MaintainersGroup = ({ maintainers }) => {
- if (!maintainers)
- return (
-
- {' '}
-
- )
- return (
-
- {maintainers.map((maintainer) => (
-
- ))}
-
- )
-}
diff --git a/src/components/dashboard/menu.js b/src/components/dashboard/menu.js
deleted file mode 100644
index 09ed8096..00000000
--- a/src/components/dashboard/menu.js
+++ /dev/null
@@ -1,64 +0,0 @@
-import { Link } from '@/components'
-import {
- Box,
- Container,
- Tab,
- TabList,
- TabPanel,
- TabPanels,
- Tabs,
-} from '@chakra-ui/react'
-import { useRouter } from 'next/router'
-import React from 'react'
-
-export const Menu = () => {
- const router = useRouter()
- const tabs = {
- '/dashboard/feedstocks': {
- index: 0,
- label: 'Feedstocks',
- },
- '/dashboard/bakeries': {
- index: 1,
- label: 'Bakeries',
- },
- '/dashboard/recipe-runs': {
- index: 2,
- label: 'Recipe Runs',
- },
- }
- const [activeTab, setActiveTab] = React.useState(tabs[router.route].index)
- const onChange = (index) => setActiveTab(index)
-
- const selectedColor = { color: 'white', bg: 'teal.500' }
-
- return (
-
-
- {' '}
-
-
- {Object.keys(tabs).map((key) => (
-
- {tabs[key].label}
-
- ))}
-
-
- {Object.keys(tabs).map((key) => (
-
- ))}
-
-
-
-
- )
-}
diff --git a/src/components/dashboard/providers.js b/src/components/dashboard/providers.js
deleted file mode 100644
index 12d49295..00000000
--- a/src/components/dashboard/providers.js
+++ /dev/null
@@ -1,18 +0,0 @@
-import { Link } from '@/components'
-import { List, ListIcon, ListItem, VStack } from '@chakra-ui/react'
-import { BsBuilding } from 'react-icons/bs'
-
-export const Providers = ({ providers }) => {
- if (!providers) return null
-
- return (
-
- {providers.map((provider, index) => (
-
-
- {provider.name}
-
- ))}
-
- )
-}
diff --git a/src/components/dashboard/recipe-run-card.js b/src/components/dashboard/recipe-run-card.js
deleted file mode 100644
index 17f9e0d9..00000000
--- a/src/components/dashboard/recipe-run-card.js
+++ /dev/null
@@ -1,107 +0,0 @@
-import { Link } from '@/components'
-import { StatusBadge, StatusIndicatorIcon } from '@/components/dashboard'
-import { TimeDeltaFormatter } from '@/lib/time-delta'
-import {
- HStack,
- Icon,
- LinkBox,
- LinkOverlay,
- SimpleGrid,
- Stack,
- Text,
-} from '@chakra-ui/react'
-import { GiSandsOfTime } from 'react-icons/gi'
-import { GoCalendar, GoNote, GoTag } from 'react-icons/go'
-
-export const RecipeRunCard = ({
- id,
- recipe_id,
- started_at,
- message,
- status,
- conclusion,
- version,
- feedstock_id,
-}) => {
- // TODO: have API return timestamps with UTC suffix
- // Here I'm mannually adding the +Z
- const timeSinceRun = TimeDeltaFormatter(
- Date.now() - Date.parse(started_at + 'Z'),
- )
-
- const href = `/dashboard/recipe-run/${id}?feedstock_id=${feedstock_id}`
-
- return (
-
-
-
-
-
-
-
- {recipe_id}
-
- {message && (
-
-
-
- {message}
-
-
- )}
-
-
-
-
-
-
- {started_at} ({timeSinceRun})
-
-
-
-
-
- {' '}
-
-
-
-
-
- {version}
-
-
-
-
-
- )
-}
diff --git a/src/components/dashboard/recipe-run-details.js b/src/components/dashboard/recipe-run-details.js
deleted file mode 100644
index 7598e56e..00000000
--- a/src/components/dashboard/recipe-run-details.js
+++ /dev/null
@@ -1,60 +0,0 @@
-import { Link } from '@/components'
-import { StatusBadge } from '@/components/dashboard'
-import { Badge, HStack, SimpleGrid, Text, VStack } from '@chakra-ui/react'
-import { formatDistance } from 'date-fns'
-
-export const RecipeRunDetails = ({
- id,
- name,
- started_at,
- completed_at,
- spec,
- head_sha,
- status,
- conclusion,
-}) => {
- const details = {
- Status: ,
- ID: id,
- Name: name,
- 'Started at': started_at ? started_at : '-',
- 'Finished at': completed_at ? completed_at : '-',
- Duration: completed_at
- ? formatDistance(new Date(completed_at), new Date(started_at))
- : '-',
- 'Git SHA': (
-
- {head_sha?.slice(0, 7)}
-
- ),
- }
-
- return (
- <>
-
- {Object.keys(details).map((key, index) => (
-
- {' '}
-
- {key}
-
- {details[key]}
-
-
-
- ))}
-
- >
- )
-}
diff --git a/src/components/dashboard/recipe-runs.js b/src/components/dashboard/recipe-runs.js
deleted file mode 100644
index acf3cf52..00000000
--- a/src/components/dashboard/recipe-runs.js
+++ /dev/null
@@ -1,33 +0,0 @@
-import { RecipeRunCard } from '@/components/dashboard'
-import { SimpleGrid } from '@chakra-ui/react'
-
-export const RecipeRuns = ({ runs }) => {
- return (
- <>
-
- {/* TODO: Add filter options */}
- {runs
- .sort((a, b) => a.started_at.localeCompare(b.started_at))
- .reverse()
- .map((recipe) => (
-
- ))}
-
- >
- )
-}
diff --git a/src/components/dashboard/status-badge.js b/src/components/dashboard/status-badge.js
deleted file mode 100644
index 6dd7eeff..00000000
--- a/src/components/dashboard/status-badge.js
+++ /dev/null
@@ -1,44 +0,0 @@
-import { Badge } from '@/components'
-
-export const StatusBadge = ({ status, conclusion }) => {
- if (status === 'queued') {
- return
- }
-
- if (status === 'in_progress') {
- return
- }
-
- if (status === 'completed') {
- switch (conclusion) {
- case 'success':
- return
-
- case 'failure':
- return
-
- case 'action_required':
- return
-
- case 'cancelled':
- return
-
- case 'neutral':
- return
-
- case 'skipped':
- return
-
- case 'stale':
- return
-
- case 'timed_out':
- return
-
- default:
- return
- }
- }
-
- return
-}
diff --git a/src/components/dashboard/status-indicator-icon.js b/src/components/dashboard/status-indicator-icon.js
deleted file mode 100644
index eb6d3028..00000000
--- a/src/components/dashboard/status-indicator-icon.js
+++ /dev/null
@@ -1,101 +0,0 @@
-import { Icon } from '@chakra-ui/react'
-import {
- BsCheckCircleFill,
- BsFillDashCircleFill,
- BsFillExclamationOctagonFill,
- BsFillRecordCircleFill,
- BsFillSlashCircleFill,
- BsFillXCircleFill,
-} from 'react-icons/bs'
-import { FaCircle } from 'react-icons/fa'
-
-export const StatusIndicatorIcon = ({ status, conclusion, ...props }) => {
- if (status === 'queued') {
- return
- }
-
- if (status === 'in_progress') {
- return (
-
- )
- }
-
- if (status === 'completed') {
- switch (conclusion) {
- case 'success':
- return (
-
- )
-
- case 'failure':
- return (
-
- )
-
- case 'action_required':
- return (
-
- )
-
- case 'neutral':
- return (
-
- )
-
- case 'stale':
- return (
-
- )
-
- case 'cancelled':
- return (
-
- )
-
- case 'skipped':
- return (
-
- )
-
- case 'timed_out':
- return (
-
- )
- }
- }
-}
diff --git a/src/components/dashboard/summary.js b/src/components/dashboard/summary.js
deleted file mode 100644
index d546818b..00000000
--- a/src/components/dashboard/summary.js
+++ /dev/null
@@ -1,82 +0,0 @@
-import { Link } from '@/components'
-import { useStats } from '@/lib/endpoints'
-import {
- Box,
- Container,
- Heading,
- SimpleGrid,
- Stack,
- Text,
- useBreakpointValue,
- useColorModeValue,
-} from '@chakra-ui/react'
-import React from 'react'
-
-const Stat = (props) => {
- const { label, value, ...boxProps } = props
- return (
-
- {' '}
-
- {label}
-
- {value}
-
-
-
- )
-}
-
-export const Summary = () => {
- const borderColor = useColorModeValue('gray.800', 'gray.500')
- const feedstocks = useStats('feedstocks')
- const recipeRuns = useStats('recipe_runs')
- const datasets = useStats('datasets?exclude_test_runs=true')
-
- const reports = [
- { label: 'Feedstocks', href: '/dashboard/feedstocks', stats: feedstocks },
- { label: 'Recipe Runs', href: '/dashboard/recipe-runs', stats: recipeRuns },
- { label: 'Datasets', href: '/catalog', stats: datasets },
- ]
- return (
-
-
-
- {reports.map(({ label, href, stats }) => (
-
- ))}
-
-
-
- )
-}
diff --git a/src/components/dataset/datasets-accordion.js b/src/components/dataset/datasets-accordion.js
deleted file mode 100644
index d1adba90..00000000
--- a/src/components/dataset/datasets-accordion.js
+++ /dev/null
@@ -1,48 +0,0 @@
-import { DatasetRepr } from '@/components/dataset'
-import { getDatasetName } from '@/lib/dataset-utils'
-import { AddIcon, MinusIcon } from '@chakra-ui/icons'
-import {
- Accordion,
- AccordionButton,
- AccordionItem,
- AccordionPanel,
- Box,
-} from '@chakra-ui/react'
-
-export const DatasetCard = ({ dataset }) => {
- const name = getDatasetName(dataset)
-
- return (
-
- {({ isExpanded }) => (
- <>
-
-
- {name}
-
-
- {isExpanded ? (
-
- ) : (
-
- )}
-
-
-
-
-
- >
- )}
-
- )
-}
-
-export const DatasetsAccordion = ({ datasets }) => {
- return (
-
- {datasets?.map((dataset, index) => {
- return
- })}
-
- )
-}
diff --git a/src/components/dataset/index.js b/src/components/dataset/index.js
deleted file mode 100644
index a5d38275..00000000
--- a/src/components/dataset/index.js
+++ /dev/null
@@ -1 +0,0 @@
-export { DatasetRepr } from '@/components/dataset/repr'
diff --git a/src/components/dataset/repr.js b/src/components/dataset/repr.js
deleted file mode 100644
index 0a659758..00000000
--- a/src/components/dataset/repr.js
+++ /dev/null
@@ -1,45 +0,0 @@
-import { CodeBlock, Error } from '@/components'
-import { useXarrayDatasetRepr } from '@/lib/endpoints'
-import { Box, Spinner } from '@chakra-ui/react'
-
-export const DatasetRepr = ({ dataset, includeSnippet = true }) => {
- const code = `import xarray as xr
-
-store = '${dataset}'
-ds = xr.open_dataset(store, engine='zarr', chunks={})
-ds`
- const { repr, reprError, isLoading } = useXarrayDatasetRepr(dataset)
-
- if (reprError)
- return (
-
- )
-
- return (
- <>
- {includeSnippet && (
-
- {code}
-
- )}
-
-
- {isLoading && (
-
- )}
-
-
-
- >
- )
-}
diff --git a/src/components/header/data.js b/src/components/header/data.js
index dd66eaba..2d40fe86 100644
--- a/src/components/header/data.js
+++ b/src/components/header/data.js
@@ -1,14 +1,4 @@
export const navItems = [
{ label: 'Home', href: '/' },
- { label: 'Catalog', href: '/catalog' },
- {
- label: 'Dashboard',
- href: '/dashboard/feedstocks',
- children: [
- { label: 'Feedstocks', href: '/dashboard/feedstocks', subLabel: '' },
- { label: 'Bakeries', href: '/dashboard/bakeries' },
- { label: 'Recipe-Runs', href: '/dashboard/recipe-runs' },
- ],
- },
{ label: 'Docs', href: 'https://pangeo-forge.readthedocs.io/en/latest/' },
]
diff --git a/src/components/hero.js b/src/components/hero.js
index d0161a66..be1ebe20 100644
--- a/src/components/hero.js
+++ b/src/components/hero.js
@@ -19,17 +19,16 @@ export const Hero = () => {
-
- {' '}
- A cloud-native data repository for ocean, weather, and climate
- science
-
+
+ {' '}
+ Cloud-native data for ocean, weather, and climate science
+
)
diff --git a/src/components/layout.js b/src/components/layout.js
index f8381bdb..14037420 100644
--- a/src/components/layout.js
+++ b/src/components/layout.js
@@ -1,5 +1,4 @@
import { Footer, Header } from '@/components'
-import { Menu } from '@/components/dashboard'
import { getRootURL } from '@/lib/seo-utils'
import { Box, Flex } from '@chakra-ui/react'
import { NextSeo } from 'next-seo'
@@ -39,7 +38,7 @@ export const Layout = ({
>
- {menu && }
+ {menu}
{children}
diff --git a/src/lib/dataset-utils.js b/src/lib/dataset-utils.js
deleted file mode 100644
index 12e2526c..00000000
--- a/src/lib/dataset-utils.js
+++ /dev/null
@@ -1,6 +0,0 @@
-export function getDatasetName(dataset) {
- return dataset
- .split('/')
- .filter((elem) => elem)
- .slice(-1)
-}
diff --git a/src/lib/endpoints.js b/src/lib/endpoints.js
deleted file mode 100644
index ac42e9ab..00000000
--- a/src/lib/endpoints.js
+++ /dev/null
@@ -1,198 +0,0 @@
-import { jsonFetcher, yamlFetcher } from '@/lib/fetchers'
-import { useRouter } from 'next/router'
-import useSWR from 'swr'
-
-export function useOrchestratorEndpoint() {
- const { query } = useRouter()
- const endpoint = query?.orchestratorEndpoint || 'api.pangeo-forge.org'
- return endpoint
-}
-
-// dedupe requests with the same key in a 2 minutes time span (https://swr.vercel.app/docs/options)
-// This allows us to avoid making requests for the same data (used on multiple pages e.g.feedstockInfo) multiple times
-const defaultDedupingInterval = 120000
-
-export const useFeedstocks = () => {
- const orchestratorEndpoint = useOrchestratorEndpoint()
- const { data, error } = useSWR(
- `https://${orchestratorEndpoint}/feedstocks/`,
- jsonFetcher,
- { refreshInterval: 300000, dedupingInterval: defaultDedupingInterval },
- )
- return {
- feedstocks: data,
- feedstocksError: error,
- isLoading: !data && !error,
- }
-}
-
-export const useFeedstock = (id) => {
- const orchestratorEndpoint = useOrchestratorEndpoint()
- const { data, error } = useSWR(
- id ? `https://${orchestratorEndpoint}/feedstocks/${id}` : null,
- jsonFetcher,
- { refreshInterval: 300000, dedupingInterval: defaultDedupingInterval },
- )
- return {
- fs: data,
- fsError: error,
- isLoading: !data && !error,
- }
-}
-
-export const useBakeries = () => {
- const orchestratorEndpoint = useOrchestratorEndpoint()
- const { data, error } = useSWR(
- `https://${orchestratorEndpoint}/bakeries/`,
- jsonFetcher,
- { refreshInterval: 3600000, dedupingInterval: defaultDedupingInterval },
- )
- return {
- bakeries: data,
- bakeriesError: error,
- isLoading: !data && !error,
- }
-}
-
-export const useBakery = (id) => {
- const orchestratorEndpoint = useOrchestratorEndpoint()
- const { data, error } = useSWR(
- id ? `https://${orchestratorEndpoint}/bakeries/${id}` : null,
- jsonFetcher,
- { refreshInterval: 3600000, dedupingInterval: defaultDedupingInterval },
- )
- return {
- bakery: data,
- bakeryError: error,
- isLoading: !data && !error,
- }
-}
-
-export const useRecipeRuns = () => {
- const orchestratorEndpoint = useOrchestratorEndpoint()
- const { data, error } = useSWR(
- `https://${orchestratorEndpoint}/recipe_runs/`,
- jsonFetcher,
- { refreshInterval: 10000 },
- )
- return {
- recipeRuns: data,
- recipeRunsError: error,
- isLoading: !data && !error,
- }
-}
-
-export const useFeedstockDatasets = (id, type = 'production') => {
- const orchestratorEndpoint = useOrchestratorEndpoint()
- const { data, error } = useSWR(
- id
- ? `https://${orchestratorEndpoint}/feedstocks/${id}/datasets?type=${type}`
- : null,
- jsonFetcher,
- { refreshInterval: 300000, dedupingInterval: defaultDedupingInterval },
- )
-
- // sort values by latest run id first and remove duplicates entries
-
- return {
- datasets: data
- ?.sort((a, b) => b.id - a.id)
- ?.reduce((acc, curr) => {
- const x = acc.find(
- (item) => item.dataset_public_url === curr.dataset_public_url,
- )
- if (!x) {
- return acc.concat([curr])
- } else {
- return acc
- }
- }, []),
-
- datasetsError: error,
- isLoading: !data && !error,
- }
-}
-export const useRecipeRun = (id) => {
- const orchestratorEndpoint = useOrchestratorEndpoint()
- const { data, error } = useSWR(
- id ? `https://${orchestratorEndpoint}/recipe_runs/${id}` : null,
- jsonFetcher,
- { refreshInterval: 10000 },
- )
- return {
- recipeRun: data,
- recipeRunError: error,
- isLoading: !data && !error,
- }
-}
-
-export const useStats = (key) => {
- const orchestratorEndpoint = useOrchestratorEndpoint()
- const { data, error } = useSWR(
- key ? `https://${orchestratorEndpoint}/stats/${key}` : null,
- jsonFetcher,
- { refreshInterval: 600000 },
- )
- return {
- stat: data,
- statError: error,
- isLoading: !data && !error,
- }
-}
-
-export const useRepo = (APIPath) => {
- const { data, error } = useSWR(
- APIPath ? `/api/github/feedstock-meta?path=${APIPath}` : null,
- jsonFetcher,
- { dedupingInterval: defaultDedupingInterval },
- )
- return {
- repo: data,
- repoError: error,
- isLoading: !data && !error,
- }
-}
-
-export const useMeta = (spec) => {
- const { data, error } = useSWR(
- spec
- ? `https://raw.githubusercontent.com/${spec}/main/feedstock/meta.yaml`
- : null,
- yamlFetcher,
- { dedupingInterval: defaultDedupingInterval },
- )
- return {
- meta: data,
- metaError: error,
- isLoading: !data && !error,
- }
-}
-
-export const usePrefect = (id, active = true) => {
- let options = {}
-
- if (active) {
- options = { refreshInterval: 1000 }
- }
-
- const { data, error } = useSWR(`/api/prefect/${id}`, jsonFetcher, options)
- return {
- prefect: data,
- prefectError: error,
- isLoading: !data && !error,
- }
-}
-
-export const useXarrayDatasetRepr = (url) => {
- const reprEndpoint = 'https://api.pangeo-forge.org/repr'
- const { data, error } = useSWR(
- url ? `${reprEndpoint}/xarray/?url=${url}` : null,
- jsonFetcher,
- { dedupingInterval: defaultDedupingInterval },
- )
- return {
- repr: data?.html,
- reprError: error,
- isLoading: !data && !error,
- }
-}
diff --git a/src/lib/feedstock-utils.js b/src/lib/feedstock-utils.js
deleted file mode 100644
index d7eb50f8..00000000
--- a/src/lib/feedstock-utils.js
+++ /dev/null
@@ -1,3 +0,0 @@
-export function getName(repo) {
- return repo.replace('pangeo-forge/', '').replace(new RegExp('_', 'g'), '-')
-}
diff --git a/src/lib/fetchers.js b/src/lib/fetchers.js
deleted file mode 100644
index bfb09403..00000000
--- a/src/lib/fetchers.js
+++ /dev/null
@@ -1,23 +0,0 @@
-import yaml from 'js-yaml'
-
-export const jsonFetcher = async (url) => {
- const response = await fetch(url)
- // If the status code is not in the range 200-299,
- // we still try to parse and throw it.
- if (!response.ok) {
- const error = new Error(
- `An error occurred while fetching data from URL: ${url}`,
- )
- // Attach extra info to the error object.
- error.info = await response.json()
- error.status = response.status
- throw error
- }
-
- return response.json()
-}
-export const yamlFetcher = (url) =>
- fetch(url)
- .then((res) => res.blob())
- .then((blob) => blob.text())
- .then(yaml.load)
diff --git a/src/lib/time-delta.js b/src/lib/time-delta.js
deleted file mode 100644
index d2f90758..00000000
--- a/src/lib/time-delta.js
+++ /dev/null
@@ -1,23 +0,0 @@
-export function TimeDeltaFormatter(millis) {
- const days = millis / 1000 / 86400
-
- if (days > 2) {
- return Math.floor(days) + ' days ago'
- }
-
- if (days < 2) {
- const hours = days * 24
- if (hours < 1) {
- const minutes = Math.floor(hours * 60)
- if (minutes == 1) {
- return '1 minute ago'
- }
- return Math.floor(minutes) + ' minutes ago'
- }
- if (hours < 2) {
- return '1 hour ago'
- }
- return Math.floor(hours) + ' hours ago'
- }
- return ''
-}
diff --git a/src/pages/api/github/feedstock-meta.js b/src/pages/api/github/feedstock-meta.js
deleted file mode 100644
index 6e832151..00000000
--- a/src/pages/api/github/feedstock-meta.js
+++ /dev/null
@@ -1,20 +0,0 @@
-export const config = {
- runtime: 'experimental-edge',
-}
-
-export default async function handler(req, res) {
- const { searchParams } = new URL(req.url)
-
- const requestURL = searchParams.get('path')
-
- const headers = {
- Accept: 'application/vnd.github.v3+json',
- //'cache-control': 'public, s-maxage=600, stale-while-revalidate=300',
- }
-
- if (process.env.GITHUB_TOKEN)
- headers['Authorization'] = `token ${process.env.GITHUB_TOKEN}`
-
- const result = await fetch(requestURL, { headers })
- return new Response(result.body, { status: result.status })
-}
diff --git a/src/pages/api/og/feedstock.js b/src/pages/api/og/feedstock.js
deleted file mode 100644
index c75600b3..00000000
--- a/src/pages/api/og/feedstock.js
+++ /dev/null
@@ -1,218 +0,0 @@
-import { getName } from '@/lib/feedstock-utils'
-import { jsonFetcher, yamlFetcher } from '@/lib/fetchers'
-import { ImageResponse } from '@vercel/og'
-
-export const config = {
- runtime: 'experimental-edge',
-}
-
-export default async function handler(req) {
- try {
- const { searchParams } = new URL(req.url)
- const id = searchParams.get('id')
- const spec = searchParams.get('repo')
- const name = getName(spec)
-
- const meta = spec.toLowerCase().includes('staged-recipes')
- ? {}
- : await yamlFetcher(
- `https://raw.githubusercontent.com/${spec}/main/feedstock/meta.yaml`,
- )
-
- const title = searchParams.get('title') || meta?.title || '-'
-
- const bakery = meta?.bakery?.id || '-'
- const license =
- searchParams.get('license') || meta.provenance?.license_link
- ? meta.provenance?.license_link?.title
- : meta.provenance?.license || '-'
-
- const endpoint =
- searchParams.get('endpoint') || 'https://api.pangeo-forge.org'
- const recipeRuns = await jsonFetcher(`${endpoint}/feedstocks/${id}/`)
- const runs = recipeRuns?.recipe_runs?.length || 0
- const data = await jsonFetcher(
- `${endpoint}/feedstocks/${id}/datasets?type=production`,
- )
- const datasets = data?.length || 0
-
- const maintainers = meta?.maintainers
-
- const labelStyle = {
- fontSize: 24,
- textTransform: 'uppercase',
- letterSpacing: '0.06em',
- }
-
- const wrapperStyle = {
- display: 'flex',
- flexDirection: 'column',
- width: '100%',
- }
-
- const valueStyle = {
- fontSize: 52,
- margin: '-24px 0px 10px 0px',
- width: '100%',
- overflow: 'hidden',
- whiteSpace: 'nowrap',
- textOverflow: 'ellipsis',
- }
-
- const metadataStyle = {
- fontSize: 36,
- margin: '-10px 0px 10px 0px',
- width: '100%',
- overflow: 'hidden',
- whiteSpace: 'nowrap',
- textOverflow: 'ellipsis',
- }
-
- const avatarStyle = {
- top: 0,
- left: 0,
- width: '72px',
- height: '72px',
- borderRadius: '20%',
- }
-
- return new ImageResponse(
- (
-
-
-
-
-
-
-
-
-
-
-
Maintainers
-
- {maintainers?.map((maintainer, i) => (
-
0 ? '16px' : 0,
- }}
- src={`https://github.com/${maintainer.github}.png`}
- />
- ))}
-
-
-
-
-
-
Datasets
-
{datasets}
-
-
-
-
-
-
- ),
- {
- width: 1200,
- height: 630,
- },
- )
- } catch (error) {
- console.log(`Error: ${error.message}`)
- return new Response('Failed to generate image', { status: 500 })
- }
-}
diff --git a/src/pages/api/prefect/[id].js b/src/pages/api/prefect/[id].js
deleted file mode 100644
index 70e36220..00000000
--- a/src/pages/api/prefect/[id].js
+++ /dev/null
@@ -1,59 +0,0 @@
-import {
- ApolloClient,
- InMemoryCache,
- createHttpLink,
- gql,
-} from '@apollo/client'
-import { setContext } from '@apollo/client/link/context'
-
-const orchestratorEndpoint = 'api.pangeo-forge.org'
-
-const QUERY = gql`
- query FlowRun($name: String!) {
- flow_run(where: { name: { _ilike: $name } }) {
- logs {
- timestamp
- level
- message
- }
- }
- }
-`
-
-const httpLink = createHttpLink({
- uri: 'https://api.prefect.io/',
- credentials: 'include',
-})
-
-const authLink = setContext((_, { headers }) => {
- // get the authentication token from local storage if it exists
- const token = process.env.PREFECT__CLOUD__AUTH_TOKEN
- // return the headers to the context so httpLink can read them
- return {
- headers: {
- ...headers,
- authorization: token ? `Bearer ${token}` : '',
- },
- }
-})
-
-const client = new ApolloClient({
- link: authLink.concat(httpLink),
- cache: new InMemoryCache(),
-})
-
-export default async function handler(req, res) {
- // Inspired by:
- // https://learn.vonage.com/blog/2020/03/12/using-apollo-to-query-graphql-from-node-js-dr/
-
- const { id } = req.query
-
- const name = `https_${orchestratorEndpoint}_recipe_runs_${id}%`
-
- try {
- const result = await client.query({ query: QUERY, variables: { name } })
- res.status(200).json(result)
- } catch (err) {
- res.status(500).json(JSON.stringify(err))
- }
-}
diff --git a/src/pages/catalog.js b/src/pages/catalog.js
deleted file mode 100644
index 238b70c3..00000000
--- a/src/pages/catalog.js
+++ /dev/null
@@ -1,273 +0,0 @@
-import { Error, Link } from '@/components/'
-import { License } from '@/components/dashboard'
-import { Layout } from '@/components/layout'
-import {
- useFeedstockDatasets,
- useFeedstocks,
- useMeta,
- useRepo,
-} from '@/lib/endpoints'
-import { getRootURL } from '@/lib/seo-utils'
-import { AddIcon, MinusIcon } from '@chakra-ui/icons'
-import {
- Accordion,
- AccordionButton,
- AccordionItem,
- AccordionPanel,
- Box,
- Button,
- Container,
- Heading,
- SimpleGrid,
- Skeleton,
- Table,
- TableContainer,
- Tbody,
- Td,
- Text,
- Th,
- Thead,
- Tr,
- useColorModeValue,
-} from '@chakra-ui/react'
-
-const Feedstock = ({ id, spec, arrayIndex }) => {
- const bgWeight = useColorModeValue(100, 500)
- const {
- datasets,
- datasetsError,
- isLoading: datasetsAreLoading,
- } = useFeedstockDatasets(id)
-
- const {
- repo,
- repoError,
- isLoading: repoIsLoading,
- } = useRepo(`https://api.github.com/repos/${spec}/commits/HEAD`)
-
- const { meta, metaError, isLoading: metaIsLoading } = useMeta(spec)
-
- if (metaError || repoError || datasetsError) {
- return (
-
-
-
- )
- }
-
- const placeholderImages = [
- 'https://images.unsplash.com/photo-1563974318767-a4de855d7b43?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2074&q=80',
- 'https://images.unsplash.com/photo-1454789476662-53eb23ba5907?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=752&q=80',
- 'https://images.unsplash.com/photo-1584267759777-8a74a4f72a91?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8Mjh8fG1ldGVvcm9sb2d5fGVufDB8fDB8fA%3D%3D&auto=format&fit=crop&w=500&q=60',
- 'https://images.unsplash.com/photo-1513553404607-988bf2703777?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=736&q=80',
- 'https://images.unsplash.com/photo-1583325958573-3c89e40551ad?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1471&q=80',
- 'https://images.unsplash.com/photo-1580193813605-a5c78b4ee01a?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=765&q=80',
- ]
-
- const image =
- meta?.image || placeholderImages[arrayIndex % placeholderImages.length]
-
- const colors = [
- 'red',
- 'orange',
- 'yellow',
- 'green',
- 'teal',
- 'blue',
- 'cyan',
- 'purple',
- 'pink',
- ]
- const color = colors[arrayIndex % colors.length]
-
- return (
- <>
- {' '}
- {datasets?.length > 0 ? (
-
-
-
-
-
-
-
-
-
-
- {({ isExpanded }) => (
- <>
-
-
-
-
- {meta?.title}
-
-
-
-
- {isExpanded ? (
-
- ) : (
-
- )}
-
-
-
-
- {meta?.description}
-
-
-
-
-
-
- |
- |
-
-
-
-
- License: |
-
-
-
-
- |
-
-
-
- Last Updated: |
-
-
- {repo?.commit.committer.date}{' '}
-
- |
-
-
-
- Dataset Count: |
-
-
- {datasets?.length}{' '}
-
- |
-
-
-
-
-
- >
- )}
-
-
-
-
-
-
- ) : (
- <>>
- )}
- >
- )
-}
-
-const Catalog = () => {
- const { feedstocks, feedstocksError, isLoading } = useFeedstocks()
-
- if (feedstocksError) {
- return (
-
-
-
- )
- }
-
- return (
-
-
-
-
- Catalog
-
-
-
- This is a public catalog of datasets produced via Pangeo-Forge.
-
-
-
-
- {feedstocks
- ?.filter(
- (feedstock) => !feedstock.spec.includes('staged-recipes'),
- )
- .sort((a, b) =>
- a.spec
- .toLowerCase()
- .replace('pangeo-forge/', '')
- .replace('-feedstock', '')
- .localeCompare(b.spec),
- )
- .map((feedstock, index) => (
-
- ))}
-
-
-
-
-
- )
-}
-
-export default Catalog
diff --git a/src/pages/dashboard/bakeries.js b/src/pages/dashboard/bakeries.js
deleted file mode 100644
index e031f84c..00000000
--- a/src/pages/dashboard/bakeries.js
+++ /dev/null
@@ -1,65 +0,0 @@
-import { Error } from '@/components'
-import { BakeryCard } from '@/components/dashboard'
-import { Layout } from '@/components/layout'
-import { useBakeries } from '@/lib/endpoints'
-import { getRootURL } from '@/lib/seo-utils'
-import { Box, Container, Heading, SimpleGrid, Text } from '@chakra-ui/react'
-
-const Bakeries = () => {
- const { bakeries, bakeriesError, isLoading } = useBakeries()
-
- if (bakeriesError)
- return (
-
-
-
- )
-
- return (
-
-
-
-
- Bakeries
-
-
- Bakeries turn recipes into data. They do the heavy lifting of
- actually executing the recipes: extracting data from its source,
- transforming it, and loading it into its target destination.
- Bakeries are controlled by triggers from GitHub workflows.
-
-
-
- {bakeries?.map((bakery, index) => (
-
- ))}
-
-
-
-
- )
-}
-
-export default Bakeries
diff --git a/src/pages/dashboard/bakery/[id].js b/src/pages/dashboard/bakery/[id].js
deleted file mode 100644
index 37a36d20..00000000
--- a/src/pages/dashboard/bakery/[id].js
+++ /dev/null
@@ -1,113 +0,0 @@
-import { Error, Link } from '@/components'
-import { RecipeRunCard } from '@/components/dashboard'
-import { Layout } from '@/components/layout'
-import { useBakery } from '@/lib/endpoints'
-import { getRootURL } from '@/lib/seo-utils'
-import {
- Box,
- Container,
- Flex,
- Heading,
- IconButton,
- SimpleGrid,
- Skeleton,
- Stack,
- Text,
-} from '@chakra-ui/react'
-import { useRouter } from 'next/router'
-import { GoRepo } from 'react-icons/go'
-
-const Bakery = () => {
- const router = useRouter()
- const { id } = router.query
-
- const { bakery, bakeryError, isLoading } = useBakery(id)
-
- const repoUrl = 'https://github.com/pangeo-forge/pangeo-forge-gcs-bakery'
-
- if (bakeryError)
- return (
-
-
-
- )
-
- return (
-
-
-
-
-
-
-
- }
- variant='ghost'
- />
-
-
-
- {bakery?.name}
-
-
-
- {bakery?.description}
-
-
-
-
-
-
- Recipe Runs
-
-
-
- {bakery?.recipe_runs
- .sort((a, b) => a.started_at.localeCompare(b.started_at))
- .reverse()
- .map((recipe, index) => (
-
- ))}
-
-
-
-
-
-
- )
-}
-
-export default Bakery
diff --git a/src/pages/dashboard/feedstock/[id].js b/src/pages/dashboard/feedstock/[id].js
deleted file mode 100644
index 09d8b19a..00000000
--- a/src/pages/dashboard/feedstock/[id].js
+++ /dev/null
@@ -1,180 +0,0 @@
-import { Error } from '@/components'
-import {
- FeedstockDatasets,
- FeedstockInfo,
- RecipeRuns,
-} from '@/components/dashboard'
-import { Layout } from '@/components/layout'
-import { useFeedstock, useFeedstockDatasets } from '@/lib/endpoints'
-import { getName } from '@/lib/feedstock-utils'
-import { jsonFetcher, yamlFetcher } from '@/lib/fetchers'
-import { getRootURL } from '@/lib/seo-utils'
-import {
- Box,
- Container,
- Skeleton,
- Tab,
- TabList,
- TabPanel,
- TabPanels,
- Tabs,
- Text,
-} from '@chakra-ui/react'
-import { GoDatabase, GoTerminal } from 'react-icons/go'
-
-export async function getServerSideProps({ res, params }) {
- // Enable caching
- // docs: https://nextjs.org/docs/basic-features/data-fetching/get-server-side-props#caching-with-server-side-rendering-ssr
-
- // This value is considered fresh for 3600 seconds (maxage=3600).
- // If a request is repeated within the next 3600 seconds, the previously
- // cached value will still be fresh. If the request is repeated after, it will request the
- // data again from the server.
-
- res.setHeader(
- 'Cache-Control',
- 'public, s-maxage=3600, stale-while-revalidate=3700',
- )
-
- const id = params.id
- const endpoint =
- params?.orchestratorEndpoint || 'https://api.pangeo-forge.org'
- const specs = await jsonFetcher(`${endpoint}/feedstocks`)
- const spec = specs.find((entry) => entry.id === parseInt(id)).spec
-
- if (id === '1') {
- return {
- props: {
- id: id,
- repo: spec,
- endpoint: endpoint,
- meta: {
- title: 'Staged Recipes',
- description:
- 'A place to submit pangeo-forge recipes before they become fully fledged pangeo-forge feedstocks.',
- },
- },
- }
- }
-
- const url = `https://raw.githubusercontent.com/${spec}/main/feedstock/meta.yaml`
- const meta = await yamlFetcher(url)
- return {
- props: {
- id: id,
- repo: spec,
- endpoint: endpoint,
- meta: meta,
- },
- }
-}
-
-const Feedstock = ({ id, repo, endpoint, meta }) => {
- const url = getRootURL()
-
- const {
- datasets,
- datasetsError,
- isLoading: datasetsAreLoading,
- } = useFeedstockDatasets(id)
- const {
- fs: { spec = '', recipe_runs = [] } = {},
- fsError,
- isLoading: feedstockIsLoading,
- } = useFeedstock(id)
-
- const params = {
- id: id,
- endpoint: endpoint,
- title: meta?.title,
- repo: repo,
- }
-
- const paramsString = new URLSearchParams(params).toString()
-
- if (fsError || datasetsError)
- return (
-
-
-
-
-
-
-
- )
-
- const selectedColor = { color: 'white', bg: 'teal.500' }
-
- return (
-
-
-
-
-
-
-
-
-
-
- {`${datasets?.length} Dataset${
- datasets?.length > 1 ? 's' : ''
- }`}
-
-
-
-
-
- {`${recipe_runs?.length} Recipe Run${
- recipe_runs?.length > 1 ? 's' : ''
- }`}
-
-
-
-
-
-
-
-
-
-
- {' '}
-
-
-
-
-
-
-
-
-
- )
-}
-
-export default Feedstock
diff --git a/src/pages/dashboard/feedstocks.js b/src/pages/dashboard/feedstocks.js
deleted file mode 100644
index 7416439c..00000000
--- a/src/pages/dashboard/feedstocks.js
+++ /dev/null
@@ -1,89 +0,0 @@
-import { Error } from '@/components'
-import { FeedstockCard } from '@/components/dashboard'
-import { Layout } from '@/components/layout'
-import { useFeedstocks } from '@/lib/endpoints'
-import { getRootURL } from '@/lib/seo-utils'
-import { Box, Container, Heading, SimpleGrid, Text } from '@chakra-ui/react'
-
-const Feedstocks = () => {
- const { feedstocks, feedstocksError, isLoading } = useFeedstocks()
-
- if (feedstocksError) {
- return (
-
-
-
- )
- }
-
- return (
-
-
-
-
- Feedstocks
-
-
- Feedstocks are recipes that are managed and executed by Pangeo Forge
- cloud automation.
-
-
-
- {feedstocks
- ?.filter(
- (feedstock) => !feedstock.spec.includes('staged-recipes'),
- )
- .sort((a, b) => a.spec.localeCompare(b.spec))
- .map((feedstock) => (
-
- ))}
-
-
-
- Staged Recipes
-
-
-
- {feedstocks
- ?.filter((feedstock) => feedstock.spec.includes('staged-recipes'))
- .sort((a, b) => a.spec.localeCompare(b.spec))
- .map((feedstock) => (
-
- ))}
-
-
-
-
- )
-}
-
-export default Feedstocks
diff --git a/src/pages/dashboard/recipe-run/[id].js b/src/pages/dashboard/recipe-run/[id].js
deleted file mode 100644
index 2be8c793..00000000
--- a/src/pages/dashboard/recipe-run/[id].js
+++ /dev/null
@@ -1,156 +0,0 @@
-import { Error } from '@/components'
-import {
- FeedstockInfo,
- FlowRunsAccordion,
- RecipeRunDetails,
-} from '@/components/dashboard'
-import { DatasetRepr } from '@/components/dataset'
-import { Layout } from '@/components/layout'
-import {
- useFeedstock,
- useMeta,
- usePrefect,
- useRecipeRun,
-} from '@/lib/endpoints'
-import { getName } from '@/lib/feedstock-utils'
-import { getRootURL } from '@/lib/seo-utils'
-import {
- Alert,
- AlertDescription,
- AlertIcon,
- AlertTitle,
- Box,
- Container,
- Divider,
- Heading,
- Skeleton,
-} from '@chakra-ui/react'
-import { useRouter } from 'next/router'
-
-const RecipeRun = () => {
- const router = useRouter()
- const { id, feedstock_id } = router.query
- const {
- recipeRun,
- recipeRunError,
- isLoading: recipeIsLoading,
- } = useRecipeRun(id)
-
- const {
- fs: { spec = '', recipe_runs = [] } = {},
- fsError,
- isLoading: feedstockIsLoading,
- } = useFeedstock(feedstock_id)
-
- const { meta, metaError, isLoading: metaIsLoading } = useMeta(spec)
-
- let active = false
-
- if (recipeRun) {
- active = recipeRun.status != 'completed'
- }
-
- const {
- prefect,
- prefectError,
- isLoading: prefectIsLoading,
- } = usePrefect(id, active)
-
- if (recipeRunError || metaError || prefectError || fsError) {
- return (
-
-
-
-
-
-
-
- )
- }
-
- return (
-
-
-
-
-
-
-
-
-
- Recipe Run Details
-
-
-
-
-
-
-
-
-
- Dataset
-
-
-
- {recipeRun?.dataset_public_url !== null && (
-
- )}
-
-
-
-
-
- Logs
-
- {prefectError && (
-
-
-
- Error!
-
- Unable to load prefect logs.
-
-
-
- )}
-
-
-
-
-
-
-
-
-
- )
-}
-
-export default RecipeRun
diff --git a/src/pages/dashboard/recipe-runs.js b/src/pages/dashboard/recipe-runs.js
deleted file mode 100644
index da17dbfb..00000000
--- a/src/pages/dashboard/recipe-runs.js
+++ /dev/null
@@ -1,68 +0,0 @@
-import { Error } from '@/components'
-import { RecipeRunCard } from '@/components/dashboard'
-import { Layout } from '@/components/layout'
-import { useRecipeRuns } from '@/lib/endpoints'
-import { getRootURL } from '@/lib/seo-utils'
-import { Box, Container, Heading, SimpleGrid } from '@chakra-ui/react'
-
-const RecipeRuns = () => {
- const { recipeRuns, recipeRunsError, isLoading } = useRecipeRuns()
-
- if (recipeRunsError) {
- return (
-
-
-
- )
- }
-
- return (
-
-
-
-
- Recipe Runs
-
-
-
- {recipeRuns
- ?.sort((a, b) => a.recipe_id.localeCompare(b.recipe_id))
- .sort((a, b) => a.started_at.localeCompare(b.started_at))
- .reverse()
- .map((recipe, index) => (
-
- ))}
-
-
-
-
- )
-}
-
-export default RecipeRuns
diff --git a/src/pages/index.js b/src/pages/index.js
index 1ff33365..74e0bde4 100644
--- a/src/pages/index.js
+++ b/src/pages/index.js
@@ -1,11 +1,9 @@
import { Layout, Hero, About, HowItWorks } from '@/components'
-import { Summary } from '@/components/dashboard'
const Index = () => {
return (
-