progress bar fixes
ci / build (push) Waiting to run Details

This commit is contained in:
CJ_Clippy 2024-06-12 21:17:44 -08:00
parent 333b4b49aa
commit 3540765356
5 changed files with 22 additions and 6 deletions

View File

@ -10,14 +10,17 @@ export default async function ArchiveProgress ({ vtuber }: IArchiveProgressProps
// // Check if totalStreams is not zero before calculating completedPercentage // // Check if totalStreams is not zero before calculating completedPercentage
// const completedPercentage = (totalStreams !== 0) ? Math.round(eligibleStreams / totalStreams * 100) : 0; // const completedPercentage = (totalStreams !== 0) ? Math.round(eligibleStreams / totalStreams * 100) : 0;
const totalStreams = await getStreamCountForVtuber(vtuber.id); const goodStreams = await getStreamCountForVtuber(vtuber.id, ['good'])
const eligibleStreams = await getStreamCountForVtuber(vtuber.id, ['good', 'issue']); const issueStreams = await getStreamCountForVtuber(vtuber.id, ['issue'])
const totalStreams = await getStreamCountForVtuber(vtuber.id)
const eligibleStreams = goodStreams+issueStreams
const completedPercentage = (eligibleStreams / totalStreams) * 100 const completedPercentage = (eligibleStreams / totalStreams) * 100
return ( return (
<div> <div>
{/* <p> {/* <p>
{totalStreams} known streams<br /> {totalStreams} known streams<br />
{eligibleStreams} archived<br /> {goodStreams} streams archived<br />
{issueStreams} streams with issues<br />
</p> */} </p> */}
<p className="heading">{eligibleStreams}/{totalStreams} Streams Archived ({completedPercentage}%)</p> <p className="heading">{eligibleStreams}/{totalStreams} Streams Archived ({completedPercentage}%)</p>
<progress className="progress is-success" value={eligibleStreams} max={totalStreams}>{completedPercentage}%</progress> <progress className="progress is-success" value={eligibleStreams} max={totalStreams}>{completedPercentage}%</progress>

View File

@ -38,7 +38,11 @@ export default async function FundingGoal(): Promise<React.JSX.Element> {
Funding Goal Funding Goal
<figure className="image is-32x32 is-rounded"> <figure className="image is-32x32 is-rounded">
<Link target="_blank" href="https://twitter.com/cj_clippy"> <Link target="_blank" href="https://twitter.com/cj_clippy">
<Image className="is-rounded" src="https://futureporn-b2.b-cdn.net/cj_clippy.jpg" alt="CJ_Clippy" fill /> <Image
className="is-rounded"
src="https://futureporn-b2.b-cdn.net/cj_clippy.jpg"
alt="CJ_Clippy"
layout="fill" />
</Link> </Link>
</figure> </figure>
</div> </div>

View File

@ -81,7 +81,7 @@ export default function StreamsTable() {
} }
}, },
{ {
header: 'Date2', header: 'Date',
accessorFn: d => format(new Date(d.attributes.date2), 'yyyy-MM-dd HH:mm'), accessorFn: d => format(new Date(d.attributes.date2), 'yyyy-MM-dd HH:mm'),
// accessorFn: d => new Date(d.attributes.date2), // accessorFn: d => new Date(d.attributes.date2),
sortingFn: 'datetime', sortingFn: 'datetime',

View File

@ -35,7 +35,7 @@ export default function VodCard({id, title, date, muxAsset, thumbnail = 'https:/
alt={title} alt={title}
placeholder="blur" placeholder="blur"
blurDataURL={vtuber.attributes.imageBlur} blurDataURL={vtuber.attributes.imageBlur}
fill={true} layout="fill"
style={{ style={{
objectFit: 'cover', objectFit: 'cover',
}} }}

View File

@ -6,6 +6,7 @@
load('ext://dotenv', 'dotenv') load('ext://dotenv', 'dotenv')
dotenv(fn='.env') dotenv(fn='.env')
default_registry('localhost:5001')
# kubefwd all namespaces Tilt deploys to. # kubefwd all namespaces Tilt deploys to.
@ -229,10 +230,18 @@ docker_build(
'fp/scout-worker', 'fp/scout-worker',
'.', '.',
only=['./pnpm-lock.yaml', './package.json', './packages/scout', './packages/next'], only=['./pnpm-lock.yaml', './package.json', './packages/scout', './packages/next'],
# ignore=['./packages/next'],
dockerfile='d.scout.dockerfile', dockerfile='d.scout.dockerfile',
target='worker', target='worker',
# cache_from='localhost:5001',
live_update=[ live_update=[
sync('./packages/scout', '/app'), sync('./packages/scout', '/app'),
## this is a hack to avoid complete scout image rebuilds when src in ./packages/next is updated
## ./packages/next needs to be in the build context because scout depends on types exported from next module (a feature of pnpm workspaces)
## instead of a full rebuild, we put ./packages/next in the live_update spec so the changed files get shoved into /ignore-me
## ideally, I would like to include ./packages/next in the build context, but ignore file changes there for rebuilds.
## however, I don't think tilt has this capability.
sync('./packages/next', '/ignore-me'),
run('cd /app && pnpm i', trigger=['./packages/scout/package.json', './packages/scout/pnpm-lock.yaml']), run('cd /app && pnpm i', trigger=['./packages/scout/package.json', './packages/scout/pnpm-lock.yaml']),
], ],
entrypoint='pnpm nodemon --ext js,ts,json,yaml --exec node --no-warnings=ExperimentalWarning --loader ts-node/esm ./src/temporal/worker.ts' entrypoint='pnpm nodemon --ext js,ts,json,yaml --exec node --no-warnings=ExperimentalWarning --loader ts-node/esm ./src/temporal/worker.ts'