mirror of
https://github.com/AtlasMediaGroup/Scissors-Website.git
synced 2024-12-25 11:27:41 +00:00
fleek did this
This commit is contained in:
parent
4043486550
commit
3b35680b72
@ -41,10 +41,10 @@ const DownloadPage = () => {
|
||||
<div className="header">
|
||||
<h1>Scissors Downloads</h1>
|
||||
</div>
|
||||
<br/>
|
||||
<br />
|
||||
<div className="download_section">
|
||||
<ul className="versions">
|
||||
{Array.from(jobs.keys()).sort(function(x, y) {
|
||||
{Array.from(jobs.keys()).sort(function (x, y) {
|
||||
let x1 = x.name.split(".")
|
||||
let y1 = y.name.split(".")
|
||||
if (x1.length >= 3) {
|
||||
@ -58,18 +58,18 @@ const DownloadPage = () => {
|
||||
return <li key={job.name} className={version === job.name ? "selected" : "selectable"} onClick={() => setVersion(job.name)}>{job.name}</li>
|
||||
})}
|
||||
</ul>
|
||||
<br/><br/>
|
||||
<br /><br />
|
||||
<table className="downloads">
|
||||
<tbody>
|
||||
{jobs.get(Array.from(jobs.keys()).filter(value => value.name == version)[0])?.map(value => {
|
||||
return <tr key={value.number}>
|
||||
<td align="center"><Button className="download" href={value.artifact ? `${value.url}/artifact/${value.artifact}` : value.url}>#{value.number}</Button></td>
|
||||
<td className="commits"><ul>{value.changes?.map(value1 => {
|
||||
return (<li key={value1.id}>[<a className="commit_id" href={`https://github.com/AtlasMediaGroup/Scissors/commit/${value1.id}`}>{value1.id}</a>] {value1.comment}</li>)
|
||||
})}</ul></td>
|
||||
<td className="date" align="center">{dayjs(value.timestamp!).format("MM/DD/YYYY [at] hh:mm A")}</td>
|
||||
</tr>
|
||||
})}
|
||||
{jobs.get(Array.from(jobs.keys()).filter(value => value.name == version)[0])?.map(value => {
|
||||
return <tr key={value.number}>
|
||||
<td align="center"><Button className="download" href={value.artifact ? `${value.url}/artifact/${value.artifact}` : value.url}>#{value.number}</Button></td>
|
||||
<td className="commits"><ul>{value.changes?.map(value1 => {
|
||||
return (<li key={value1.id}>[<a className="commit_id" href={value1.id !== "x" ? `https://github.com/AtlasMediaGroup/Scissors/commit/${value1.id}` : `https://github.com/AtlasMediaGroup/Scissors/tree/${version}`}>{value1.id}</a>] {value1.comment}</li>)
|
||||
})}</ul></td>
|
||||
<td className="date" align="center">{dayjs(value.timestamp!).format("MM/DD/YYYY [at] hh:mm A")}</td>
|
||||
</tr>
|
||||
})}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -32,7 +32,6 @@ export function getJobs(): Promise<Job[]> {
|
||||
}).catch(() => reject)
|
||||
})
|
||||
}
|
||||
|
||||
export function getBuilds(version: string): Promise<Build[]> {
|
||||
let builds: Build[] = []
|
||||
let request = axios.get(`${JENKINS_URL}/${ARTIFACT_NAME}/job/${version}/api/json?pretty=true`)
|
||||
@ -46,22 +45,30 @@ export function getBuilds(version: string): Promise<Build[]> {
|
||||
let changeSet: any[] = value1.data.changeSets
|
||||
if (changeSet.length > 0) {
|
||||
let changes = changeSet[0].items as BuildChange[]
|
||||
for (let change of changes) {
|
||||
change.id = change.id.substring(0, 7)
|
||||
if (changes.length > 0) {
|
||||
for (let change of changes) {
|
||||
change.id = change.id.substring(0, 7)
|
||||
}
|
||||
}
|
||||
build.changes = changes
|
||||
if (value1.data.artifacts) {
|
||||
let artifacts: any[] = value1.data.artifacts
|
||||
if (artifacts.length > 0) {
|
||||
build.artifact = value1.data.artifacts[0].relativePath
|
||||
build.artifact = artifacts[0].relativePath
|
||||
}
|
||||
}
|
||||
|
||||
resolve(builds)
|
||||
} else {
|
||||
let changes: BuildChange[] = []
|
||||
changes.push({
|
||||
id: "x",
|
||||
comment: "No changes"
|
||||
})
|
||||
build.changes = changes
|
||||
}
|
||||
|
||||
resolve(builds)
|
||||
})
|
||||
}
|
||||
}).catch(() => reject)
|
||||
})
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user