Better build panel.

master
Blog Manager Robot 3 years ago
parent 915db5f8dd
commit 46f28bacce
  1. 5
      Web/templates/_svg/checkmark.html.ep
  2. 5
      Web/templates/_svg/chevron.html.ep
  3. 5
      Web/templates/_svg/exclaim.html.ep
  4. 6
      Web/templates/_svg/failed.html.ep
  5. 6
      Web/templates/_svg/loading.html.ep
  6. 15
      Web/templates/dashboard/_milestone.html.ep
  7. 61
      Web/templates/dashboard/blog.html.ep
  8. 33
      Web/templates/dashboard/blog_builds.html.ep

@ -0,0 +1,5 @@
<!-- Start _svg/checkmark.tx -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-check-circle-fill" viewBox="0 0 16 16">
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"/>
</svg>
<!-- End _svg/checkmark.tx -->

After

Width:  |  Height:  |  Size: 407 B

@ -0,0 +1,5 @@
<!-- Start _svg/chevron.tx -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-down" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/>
</svg>
<!-- End _svg/chevron.tx -->

After

Width:  |  Height:  |  Size: 353 B

@ -0,0 +1,5 @@
<!-- Start _svg/exclaim.tx -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-exclamation-octagon-fill" viewBox="0 0 16 16">
<path d="M11.46.146A.5.5 0 0 0 11.107 0H4.893a.5.5 0 0 0-.353.146L.146 4.54A.5.5 0 0 0 0 4.893v6.214a.5.5 0 0 0 .146.353l4.394 4.394a.5.5 0 0 0 .353.146h6.214a.5.5 0 0 0 .353-.146l4.394-4.394a.5.5 0 0 0 .146-.353V4.893a.5.5 0 0 0-.146-.353L11.46.146zM8 4c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995A.905.905 0 0 1 8 4zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"/>
</svg>
<!-- End _svg/exclaim.tx -->

After

Width:  |  Height:  |  Size: 592 B

@ -0,0 +1,6 @@
<!-- Start _svg/failed.tx -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-circle" viewBox="0 0 16 16">
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
<path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"/>
</svg>
<!-- End _svg/failed.tx -->

After

Width:  |  Height:  |  Size: 486 B

@ -0,0 +1,6 @@
<!-- Start _svg/loading.tx -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-repeat" viewBox="0 0 16 16">
<path d="M11.534 7h3.932a.25.25 0 0 1 .192.41l-1.966 2.36a.25.25 0 0 1-.384 0l-1.966-2.36a.25.25 0 0 1 .192-.41zm-11 2h3.932a.25.25 0 0 0 .192-.41L2.692 6.23a.25.25 0 0 0-.384 0L.342 8.59A.25.25 0 0 0 .534 9z"/>
<path fill-rule="evenodd" d="M8 3c-1.552 0-2.94.707-3.857 1.818a.5.5 0 1 1-.771-.636A6.002 6.002 0 0 1 13.917 7H12.9A5.002 5.002 0 0 0 8 3zM3.1 9a5.002 5.002 0 0 0 8.757 2.182.5.5 0 1 1 .771.636A6.002 6.002 0 0 1 2.083 9H3.1z"/>
</svg>
<!-- End _svg/loading.tx -->

After

Width:  |  Height:  |  Size: 647 B

@ -0,0 +1,15 @@
<!-- Begin dashboard/_website/milestone -->
<div class="card mb-4">
<div class="card-header">
% if ( $milestone->{is_complete} && $milestone->{is_complete} == 1 ) {
<span class="text-success" >
%= include '_svg/checkmark'
</span>
% } else {
%= include '_svg/loading'
% }
<%= $milestone->{text} %>
</div>
</div>
<!-- End dashboard/_website/milestone -->

@ -25,22 +25,49 @@
</div>
% }
<table style="border: 1px solid #ccc" class="table table-striped mb-5 mt-3">
<thead>
<tr>
<th class="text-nowrap">Setting</th>
<th class="text-nowrap">Value</th>
<th class="text-nowrap">Meaning</th>
</tr>
</thead>
<tbody>
<tr>
<th>Domain</th>
<td><a href="https://<%= $blog->domain->name %>"><%= $blog->domain->name %></a></td>
<td>This is the domain name for your website. Users from the Internet can visit this domain to see your website.</td>
</tr>
% if ( $blog ) {
<h3 class="h3 mt-5 mb-3">My Websites</h3>
<table style="border: 1px solid #ccc" class="table mb-5">
<tbody>
<tr>
<th class="text-nowrap">Domain</th>
<th class="text-nowrap">Status Link</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="https://<%= $blog->domain->name %>"><%= $blog->domain->name %></a></td>
<td><a href="<%= $c->url_for( 'show_dashboard_blog', { id => $blog->id } ) %>">Manage Blog</a></td>
</tr>
</tbody>
</table>
% }
%# <tr>
%# <th>Repository</th>
%# <td><%= $blog->repo->url %></td>
%# <td>This is the URL we use to fetch your git repository when the website is built.</td>
%# </tr>
<tr>
<th>Last Build</th>
% if ( $blog->minutes_since_last_build ) {
<td><%= $blog->minutes_since_last_build %> minutes ago</td>
% } else {
<td>Never Built</td>
% }
<td>How long ago the last build was.</td>
</tr>
%# Build & Site Restrictions %>
<tr>
<th>Actions</th>
<td colspan=2>
<div class="btn-group">
%# <form method="post" action="<%= $c->url_for( 'do_dashboard_website_rebuild', { site_id => $blog->id } ) %>">
%# <div class="input-group">
%# <button class="btn btn-sm btn-primary" type="submit">Rebuild &amp; Deploy</button>
%# </div>
%# </form>
</div>
</td>
</tr>
</tbody>
</table>

@ -61,23 +61,6 @@
</div>
% }
%= include 'dashboard/_website/information'
<ul class="nav nav-tabs">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="<%= $c->url_for( 'show_dashboard_website' ) %>">Jobs</a>
</li>
<li class="nav-item">
<a class="nav-link" href="<%= $c->url_for( 'show_dashboard_website_limits' ) %>">Limits</a>
</li>
<li class="nav-item">
<a class="nav-link" href="<%= $c->url_for( 'show_dashboard_website_settings' ) %>">Settings</a>
</li>
<li class="nav-item">
<a class="nav-link" href="<%= $c->url_for( 'show_dashboard_website_hooks' ) %>">Hooks</a>
</li>
</ul>
%# Job Panel %
% my $index = 0;
% foreach my $build ( @{$blog->get_builds} ) {
@ -89,18 +72,18 @@
<div class="card mt-4">
<div class="card-header alert-success">
%= include '_svg/checkmark'
Build <%= $build->{id} %> completed successfully. (Queued: <%= $build->{date} %>)
Build job <%= $build->{id} %>/<%= $job->{task} %> completed successfully. (Queued: <%= $build->{date} %>)
<button class="btn" data-bs-toggle="collapse" data-bs-target="#job_window_<%= $job->{id} %>">
%= include '_svg/chevron'
</button>
</div>
<div id="job_window_<%= $job->{id} %>" class="card-body <%= $index == 1 ? '' : 'collapse' %>">
%= include 'dashboard/_website/milestone', milestone => { is_complete => $job->{notes}->{is_deploy_complete}, text => 'Deploy to Webserver' };
%= include 'dashboard/_milestone', milestone => { is_complete => $job->{notes}->{is_deploy_complete}, text => 'Deploy to Webserver' };
%= include 'dashboard/_website/milestone', milestone => { is_complete => $job->{notes}->{is_build_complete}, text => 'Build Website' };
%= include 'dashboard/_milestone', milestone => { is_complete => $job->{notes}->{is_build_complete}, text => 'Build Website' };
%= include 'dashboard/_website/milestone', milestone => { is_complete => $job->{notes}->{is_clone_complete}, text => 'Clone Repo & Check Settings' };
%= include 'dashboard/_milestone', milestone => { is_complete => $job->{notes}->{is_clone_complete}, text => 'Clone Repo & Check Settings' };
<hr />
@ -171,16 +154,16 @@
<span class="visually-hidden">Building...</span>
</div>
Building <%= $build->{id} %>... (Queued: <%= $build->{date} %>)
Building job <%= $build->{id} %>/<%= $job->{task} %>... (Queued: <%= $build->{date} %>)
</div>
<div id="job_window_<%= $job->{id} %>" class="card-body">
%= include 'dashboard/_website/milestone', milestone => { is_complete => $job->{notes}->{is_deploy_complete}, text => 'Deploy to Webserver' };
%= include 'dashboard/_milestone', milestone => { is_complete => $job->{notes}->{is_deploy_complete}, text => 'Deploy to Webserver' };
%= include 'dashboard/_website/milestone', milestone => { is_complete => $job->{notes}->{is_build_complete}, text => 'Build Website' };
%= include 'dashboard/_milestone', milestone => { is_complete => $job->{notes}->{is_build_complete}, text => 'Build Website' };
%= include 'dashboard/_website/milestone', milestone => { is_complete => $job->{notes}->{is_clone_complete}, text => 'Clone Repo & Check Settings' };
%= include 'dashboard/_milestone', milestone => { is_complete => $job->{notes}->{is_clone_complete}, text => 'Clone Repo & Check Settings' };
<hr />

Loading…
Cancel
Save