Skip to content

Commit

Permalink
Allow user to redeploy, show current SHA if defined.
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonBenn committed May 17, 2017
1 parent 14aa63a commit bb39b62
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
4 changes: 4 additions & 0 deletions src/inject/pull.css
Expand Up @@ -87,3 +87,7 @@
.qai-drawer pre:last-child {
margin-bottom: 15px;
}

a:hover .qai-pre {
text-decoration: underline;
}
2 changes: 1 addition & 1 deletion src/inject/pull.js
@@ -1,7 +1,7 @@
var initialUIState = {
// state part 1: UI-only state
loading: false,
newerShaAvailable: true,
sha: undefined,

// state part 2: progress outputs from long-running API functions
overallProgress: "",
Expand Down
32 changes: 15 additions & 17 deletions src/templates/online.html
Expand Up @@ -29,28 +29,26 @@ <h4 class="status-heading qai-status-heading">QA instance online</h4>

</div>

<% if (newerShaAvailable) { %>

<div class="merge-status-list qai-merge-status-list">
<div class="merge-status-item d-flex flex-items-baseline">
<div class="qai-li-icon-wrapper flex-self-center">
<svg class="octicon octicon-repo text-<%= stateToColor(deployInstanceState) %>" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M13 8V6H7V4h6V2l3 3-3 3zM4 2H3v1h1V2zm7 5h1v6c0 .55-.45 1-1 1H6v2l-1.5-1.5L3 16v-2H1c-.55 0-1-.45-1-1V1c0-.55.45-1 1-1h10c.55 0 1 .45 1 1v2h-1V1H2v9h9V7zm0 4H1v2h2v-1h3v1h5v-2zM4 6H3v1h1V6zm0-2H3v1h1V4zM3 9h1V8H3v1z"></path></svg>
</div>
<div class="merge-status-list qai-merge-status-list">
<div class="merge-status-item d-flex flex-items-baseline">
<div class="qai-li-icon-wrapper flex-self-center">
<svg class="octicon octicon-repo text-<%= stateToColor(deployInstanceState) %>" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M13 8V6H7V4h6V2l3 3-3 3zM4 2H3v1h1V2zm7 5h1v6c0 .55-.45 1-1 1H6v2l-1.5-1.5L3 16v-2H1c-.55 0-1-.45-1-1V1c0-.55.45-1 1-1h10c.55 0 1 .45 1 1v2h-1V1H2v9h9V7zm0 4H1v2h2v-1h3v1h5v-2zM4 6H3v1h1V6zm0-2H3v1h1V4zM3 9h1V8H3v1z"></path></svg>
</div>

<div class="text-gray col-10 css-truncate css-truncate-target">
<%= getCopy("deployInstance", deployInstanceState, deployInstanceProgress, deployInstanceError) %>
</div>
<div class="text-gray col-9 css-truncate css-truncate-target">
<%= getCopy("deployInstance", deployInstanceState, deployInstanceProgress, deployInstanceError) %>
</div>

<div class="d-flex col-2 flex-shrink-0">
<a id="qai-retry" data-ui-type="deploy" class="status-actions text-red qai-link">Redeploy</a>
</div>
<div class="d-flex col-3 flex-grow-1">
<a id="qai-retry" data-ui-type="deploy" class="status-actions qai-link">
Deploy <% if (sha) { %> (at: <pre class="qai-pre d-inline-block"><%= sha %></pre>) <% } %>
</a>
</div>

<div class="qai-drawer" id="deployInstanceLogs"></div>
<div class="qai-drawer" id="deployInstanceLogs"></div>

</div>
</div>

<% } %>
</div>

<div class="merge-status-list qai-merge-status-list">

Expand Down

0 comments on commit bb39b62

Please sign in to comment.