Worked on web frontend for project versions list
This commit is contained in:
@@ -134,6 +134,7 @@
|
||||
<th>Status</th>
|
||||
<th>Stage</th>
|
||||
<th>Last Release</th>
|
||||
<th>Last Release File</th>
|
||||
<th>Last Version</th>
|
||||
<th>Last Log</th>
|
||||
</tr>
|
||||
@@ -144,8 +145,15 @@
|
||||
<td><a href="/project/{{.id}}/">{{.name}}</a></td>
|
||||
<td>{{.status}}</td>
|
||||
<td>{{.stage}}</td>
|
||||
<td>{{.releaseVersion}}</td>
|
||||
<td>{{.lastLog.version}}</td>
|
||||
<td>
|
||||
<a href="/project/{{.id}}/{{.releaseVersion}}">{{.releaseVersion}}</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="/release/{{.id}}?file">Download</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="/project/{{.id}}/{{.lastLog.version}}">{{.lastLog.version}}</a>
|
||||
</td>
|
||||
<td title="{{.lastLog.log}}">{{#if .lastLog.log}}{{.lastLog.log.substring(0,100) + " ..."}}{{/if}}</td>
|
||||
</tr>
|
||||
{{/projects}}
|
||||
@@ -168,7 +176,9 @@
|
||||
<tbody>
|
||||
{{#project.versions:i}}
|
||||
<tr>
|
||||
<td>{{.version}}</td>
|
||||
<td>
|
||||
<a href="/project/{{project.id}}/{{.version}}">{{.version}}</a>
|
||||
</td>
|
||||
<td>{{.stage}}</td>
|
||||
<td title="{{.log}}">{{#if .log}}{{.log.substring(0,100) + " ..."}}{{/if}}</td>
|
||||
<td>
|
||||
|
@@ -15,6 +15,7 @@ Ractive.DEBUG = false;
|
||||
return {
|
||||
project: null,
|
||||
version: null,
|
||||
stages: null,
|
||||
stage: null,
|
||||
projects: [],
|
||||
error: null,
|
||||
@@ -43,7 +44,7 @@ Ractive.DEBUG = false;
|
||||
if (paths[3]) {
|
||||
getVersion(paths[2], paths[3]);
|
||||
if (paths[4]) {
|
||||
getStage(paths[2], paths[3], paths[4]);
|
||||
getStage(paths[2], paths[3], paths[4]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -80,9 +81,10 @@ Ractive.DEBUG = false;
|
||||
}
|
||||
|
||||
function getVersion(id, version) {
|
||||
r.set("version", version);
|
||||
get("/log/" + id + "/" + version,
|
||||
function(result) {
|
||||
r.set("version", result.data);
|
||||
r.set("stages", result.data);
|
||||
},
|
||||
function(result) {
|
||||
r.set("error", err(result).message);
|
||||
|
Reference in New Issue
Block a user