OPC # 0006: OPC Git Trunk-Based management
This commit is contained in:
@@ -64,7 +64,7 @@ function GitHistoryPanel({ relativePath }: { relativePath: string }) {
|
||||
<p style={{ fontSize: '0.75rem', color: '#8f99a8', marginTop: '0.5rem' }}>No commits found for this path.</p>
|
||||
)}
|
||||
{commits.length > 0 && (
|
||||
<HTMLTable className="bp5-html-table-condensed bp5-html-table-striped" style={{ width: '100%', marginTop: '0.5rem', fontSize: '0.72rem' }}>
|
||||
<HTMLTable className="bp6-html-table-condensed bp6-html-table-striped" style={{ width: '100%', marginTop: '0.5rem', fontSize: '0.72rem' }}>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style={{ width: 60 }}>Commit</th>
|
||||
@@ -250,9 +250,9 @@ export default function BuildMonitorPage() {
|
||||
|
||||
useEffect(() => { (async () => { await load(); })(); }, []);
|
||||
|
||||
// Find latest build per project
|
||||
const lastBuildFor = (name: string): BuildRecord | undefined =>
|
||||
history.find((b) => b.target.includes(name.split(' ')[0]) || b.target.endsWith(name));
|
||||
// Find latest build per project — match exactly by relativePath (= build target)
|
||||
const lastBuildFor = (project: ProjectDefinition): BuildRecord | undefined =>
|
||||
history.find((b) => b.target === project.relativePath);
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -292,7 +292,7 @@ export default function BuildMonitorPage() {
|
||||
<ProjectCard
|
||||
key={p.name}
|
||||
project={p}
|
||||
lastBuild={lastBuildFor(p.name)}
|
||||
lastBuild={lastBuildFor(p)}
|
||||
onBuilt={load}
|
||||
/>
|
||||
))}
|
||||
|
||||
@@ -226,7 +226,7 @@ export default function PipelinesPage() {
|
||||
try {
|
||||
const [r, b] = await Promise.all([getReleaseHistory(), getBuildHistory()]);
|
||||
setReleases(r);
|
||||
setBuilds(b.filter((b) => b.kind === 'DockerImage'));
|
||||
setBuilds(b.filter((b) => b.kind === 'SolutionBuild'));
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
@@ -252,7 +252,7 @@ export default function PipelinesPage() {
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3 style={{ margin: '0 0 0.5rem' }}>Image Build History</h3>
|
||||
<h3 style={{ margin: '0 0 0.5rem' }}>Solution Build History</h3>
|
||||
{loading ? <Spinner size={20} /> : <BuildHistoryTable records={builds} />}
|
||||
</section>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user