feat(x2a): Adding ModulePage with details, former phase retrigger and logs#2327
feat(x2a): Adding ModulePage with details, former phase retrigger and logs#2327elai-shalev merged 7 commits intoredhat-developer:mainfrom
Conversation
Unexpected ChangesetsThe following changeset(s) reference packages that have not been changed in this PR:
Note that only changes that affect the published package require changesets, for example changes to tests and storybook stories do not require changesets. Changed Packages
|
fc09a3b to
00d5523
Compare
| // Do not merge | ||
| useSeedTestData(); | ||
|
|
There was a problem hiding this comment.
this needs to be removed before merging
| /* | ||
| * Copyright Red Hat, Inc. | ||
| * |
There was a problem hiding this comment.
this file should not be merged
| /* | ||
| * Copyright Red Hat, Inc. | ||
| * |
There was a problem hiding this comment.
this file should not be merged
| <Grid container direction="row" spacing={3}> | ||
| {phase && ( | ||
| <RunAction | ||
| instructions={t('modulePage.phases.reanalyzeInstructions')} | ||
| actionText={t('modulePage.phases.rerunAnalyze')} | ||
| /> | ||
| )} | ||
| {!phase && ( | ||
| <RunAction | ||
| instructions={t('modulePage.phases.analyzeInstructions')} | ||
| actionText={t('modulePage.phases.runAnalyze')} | ||
| /> | ||
| )} | ||
| {/* TODO: Button for canceling the current job execution */} |
There was a problem hiding this comment.
this has analyze hardcoded?
There was a problem hiding this comment.
Only analyze in taken care of, both here and in the Button grid on L77.
I think this PR would need all three possibilities introduced (analyze, migrate, publish)
| <Grid item xs={12}> | ||
| <Button variant="primary">{actionText}</Button> | ||
| </Grid> | ||
| <Grid item xs={12}> | ||
| <Typography>{instructions}</Typography> | ||
| </Grid> | ||
| </> |
There was a problem hiding this comment.
this button has no OnClick method, it does nothing
| return ( | ||
| <Link | ||
| to={buildArtifactUrl(artifact.value, '')} | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| key={artifact.id} | ||
| > | ||
| {humanizeArtifactType(t, artifact.type)} | ||
| </Link> | ||
| ); |
There was a problem hiding this comment.
This seems like it can create a broken link if the artifact value is a relative path
| > | ||
| <Link to="/">{t('page.title')}</Link> | ||
| <Typography>{t('modulePage.title')}</Typography> | ||
| <Typography>Breadcrumbs</Typography> |
There was a problem hiding this comment.
this is leftover? (leftover bread)
| separator=">" | ||
| className={classes.breadcrumbs} | ||
| > | ||
| <Link to="/">{t('page.title')}</Link> |
| <Grid item xs={3}> | ||
| <ItemField | ||
| label={t('modulePage.phases.startedAt')} | ||
| value={humanizeDate(phase?.startedAt || empty)} |
There was a problem hiding this comment.
when phase?.startedAt is falsy, empty is the translation of 'module.phases.none' (e.g., "None").
new Date("None") returns Invalid Date, which toLocaleString renders as the string "Invalid Date". The callers in ModuleTable.tsx guard against this by checking if (!lastJob) before calling humanizeDate, but PhasesCard does not — it always calls through. The fallback should be handled before calling humanizeDate.
99fef1f to
89cf58d
Compare
… logs Signed-off-by: Marek Libra <marek.libra@gmail.com>
Signed-off-by: Eloy Coto <eloy.coto@acalustra.com>
89cf58d to
f2f6a1e
Compare
| } | ||
| return ( | ||
| <Link | ||
| to={buildArtifactUrl(artifact.value, targetRepoUrl)} |
There was a problem hiding this comment.
needs to add target repo branch after 2332 was merged
| <Grid container direction="row" spacing={3}> | ||
| {phase && ( | ||
| <RunAction | ||
| instructions={t('modulePage.phases.reanalyzeInstructions')} | ||
| actionText={t('modulePage.phases.rerunAnalyze')} | ||
| /> | ||
| )} | ||
| {!phase && ( | ||
| <RunAction | ||
| instructions={t('modulePage.phases.analyzeInstructions')} | ||
| actionText={t('modulePage.phases.runAnalyze')} | ||
| /> | ||
| )} | ||
| {/* TODO: Button for canceling the current job execution */} |
There was a problem hiding this comment.
Only analyze in taken care of, both here and in the Button grid on L77.
I think this PR would need all three possibilities introduced (analyze, migrate, publish)
| <Breadcrumbs | ||
| aria-label="breadcrumb" | ||
| separator=">" | ||
| className={classes.breadcrumbs} | ||
| > | ||
| <Link to="/x2a/api">{t('page.title')}</Link> | ||
| <Typography>{t('modulePage.title')}</Typography> | ||
| </Breadcrumbs> | ||
| ); | ||
| }; |
There was a problem hiding this comment.
I think we might need to dynamically generate the links here rather than hardcode /x2a/api. I know I said otherwise in a prior PR, I'm not sure how the breadcrumbs are used here
So maybe at least let's add a TODO: revise here so we take another look at it
Signed-off-by: Eloy Coto <eloy.coto@acalustra.com>
f2f6a1e to
ff357a7
Compare
|



A rebase form #2319