Finished most of the front end stuff.

Need to fix release file downloads
This commit is contained in:
Tim Shannon 2016-04-18 20:11:22 +00:00
parent e0bc90e954
commit 7082d69bab
2 changed files with 8 additions and 12 deletions

View File

@ -152,7 +152,6 @@
<tr> <tr>
<th>Project</th> <th>Project</th>
<th>Status</th> <th>Status</th>
<th>Stage</th>
<th>Last Release</th> <th>Last Release</th>
<th>Last Release File</th> <th>Last Release File</th>
<th>Last Version</th> <th>Last Version</th>
@ -164,7 +163,6 @@
<tr title="{{formatDate(.lastLog.when)}}"> <tr title="{{formatDate(.lastLog.when)}}">
<td><a href="/project/{{.id}}/">{{.name}}</a></td> <td><a href="/project/{{.id}}/">{{.name}}</a></td>
<td>{{.status}}</td> <td>{{.status}}</td>
<td>{{.stage}}</td>
<td> <td>
<a href="/project/{{.id}}/{{.releaseVersion}}">{{.releaseVersion}}</a> <a href="/project/{{.id}}/{{.releaseVersion}}">{{.releaseVersion}}</a>
</td> </td>
@ -178,7 +176,7 @@
<td> <td>
<a href="/project/{{.id}}/{{.lastLog.version}}">{{.lastLog.version}}</a> <a href="/project/{{.id}}/{{.lastLog.version}}">{{.lastLog.version}}</a>
</td> </td>
<td title="{{.lastLog.log}}">{{#if .lastLog.log}}{{.lastLog.log.substring(0,100) + " ..."}}{{/if}}</td> <td title="{{.lastLog.log}}">{{#if .lastLog.log}}{{.lastLog.log.substring(0,100)}}{{/if}}</td>
</tr> </tr>
{{/projects}} {{/projects}}
</tbody> </tbody>
@ -204,7 +202,7 @@
<a href="/project/{{project.id}}/{{.version}}">{{.version}}</a> <a href="/project/{{project.id}}/{{.version}}">{{.version}}</a>
</td> </td>
<td>{{.stage}}</td> <td>{{.stage}}</td>
<td title="{{.log}}">{{#if .log}}{{.log.substring(0,100) + " ..."}}{{/if}}</td> <td title="{{.log}}">{{#if .log}}{{.log.substring(0,100)}}{{/if}}</td>
<td> <td>
{{#if releases[project.id + .version]}} {{#if releases[project.id + .version]}}
<a href="/release/{{project.id}}/{{.version}}?file">{{releases[project.id + .version].fileName}}</a> <a href="/release/{{project.id}}/{{.version}}?file">{{releases[project.id + .version].fileName}}</a>
@ -240,15 +238,11 @@
<div class="log"> <div class="log">
{{#if currentStage}} {{#if currentStage}}
<h3>{{currentStage}}<small class="timestamp">{{formatDate(logs.when)}}</small></h3> <h3>{{currentStage}}<small class="timestamp">{{formatDate(logs.when)}}</small></h3>
<pre><samp> <pre><samp>{{logs.log}}</samp></pre>
{{logs.log}}
</samp></pre>
{{else}} {{else}}
{{#stages:i}} {{#stages:i}}
<h3>{{.stage}}<small class="timestamp">{{formatDate(.when)}}</small></h3> <h3>{{.stage}}<small class="timestamp">{{formatDate(.when)}}</small></h3>
<pre><samp> <pre><samp>{{.log}}</samp></pre>
{{.log}}
</samp></pre>
{{/stages}} {{/stages}}
{{/if}} {{/if}}
</div> </div>

View File

@ -125,8 +125,10 @@ Ractive.DEBUG = false;
function setStatus(project) { function setStatus(project) {
//statuses //statuses
if (project.lastLog.version.trim() == project.releaseVersion.trim()) { if (project.stage != "waiting") {
project.status = "Success"; project.status = project.stage;
} else if (project.lastLog.version.trim() == project.releaseVersion.trim()) {
project.status = "Successfully Released";
} else { } else {
if (project.lastLog.stage == "loading") { if (project.lastLog.stage == "loading") {
project.status = "Load Failing"; project.status = "Load Failing";