Improving version section of dashboard
This commit is contained in:
parent
74aecdfd9d
commit
58eb45a560
|
@ -1,16 +1,17 @@
|
|||
{{#if foundProblems}}
|
||||
<div class="dashboard-stats detected-problems">
|
||||
<div class="look-here">{{d-icon "exclamation-triangle"}}</div>
|
||||
<div class="problem-messages">
|
||||
{{#conditional-loading-spinner condition=loadingProblems}}
|
||||
<p>
|
||||
{{i18n 'admin.dashboard.problems_found'}}
|
||||
<div>
|
||||
<h3>
|
||||
<span class="look-here">{{d-icon "exclamation-triangle"}}</span>
|
||||
{{i18n 'admin.dashboard.problems_found'}}</h3>
|
||||
<ul class="{{if loadingProblems 'invisible'}}">
|
||||
{{#each problems as |problem|}}
|
||||
<li>{{{problem}}}</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
<p class="actions">
|
||||
<small>{{i18n 'admin.dashboard.last_checked'}}: {{problemsTimestamp}}</small>
|
||||
{{d-button action="refreshProblems" class="btn-small" icon="refresh" label="admin.dashboard.refresh_problems"}}
|
||||
|
|
|
@ -2,12 +2,10 @@
|
|||
|
||||
<div class="section-top">
|
||||
{{#if showVersionChecks}}
|
||||
<div class="dashboard-left">
|
||||
<div class="version-checks">
|
||||
{{partial 'admin/templates/version-checks'}}
|
||||
</div>
|
||||
<div class="dashboard-right">
|
||||
{{partial 'admin/templates/dashboard-problems'}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class='clearfix'></div>
|
||||
</div>
|
||||
|
|
|
@ -1,73 +1,75 @@
|
|||
<div class="dashboard-stats version-check {{if versionCheck.critical_updates 'critical' 'normal'}}">
|
||||
<table class="table table-condensed table-hover">
|
||||
{{custom-html name="upgrade-header" versionCheck=versionCheck tagName="thead"}}
|
||||
</table>
|
||||
<h2>{{i18n 'admin.dashboard.version'}}</h2>
|
||||
<div class="dashboard-stats version-check {{if versionCheck.critical_updates 'critical' 'normal'}}">
|
||||
|
||||
<table class="table table-condensed table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th>{{i18n 'admin.dashboard.installed_version'}}</th>
|
||||
<th colspan="3">{{i18n 'admin.dashboard.latest_version'}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<td class="title">{{i18n 'admin.dashboard.version'}}</td>
|
||||
<td class="version-number"><a href={{versionCheck.gitLink}} target="_blank">{{dash-if-empty versionCheck.installed_describe}}</a></td>
|
||||
<div class="version-number">
|
||||
<h4>{{i18n 'admin.dashboard.installed_version'}}</h4>
|
||||
<h3><a href={{versionCheck.gitLink}} target="_blank">{{dash-if-empty versionCheck.installed_describe}}</a></h3>
|
||||
</div>
|
||||
|
||||
{{#if versionCheck.noCheckPerformed}}
|
||||
<td class="version-number">—</td>
|
||||
<td class="face">
|
||||
<span class="icon critical-updates-available">{{d-icon "frown-o"}}</span>
|
||||
</td>
|
||||
<td class="version-notes">
|
||||
<span class="normal-note">{{i18n 'admin.dashboard.no_check_performed'}}</span>
|
||||
</td>
|
||||
<div class="version-number">
|
||||
<h4>{{i18n 'admin.dashboard.latest_version'}}</h4>
|
||||
<h3>—</h3>
|
||||
</div>
|
||||
<div class="version-status">
|
||||
<div class="face">
|
||||
<span class="icon critical-updates-available">{{d-icon "frown-o"}}</span>
|
||||
</div>
|
||||
<div class="version-notes">
|
||||
<span class="normal-note">{{i18n 'admin.dashboard.no_check_performed'}}</span>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
{{#if versionCheck.stale_data}}
|
||||
<td class="version-number">{{#if versionCheck.version_check_pending}}{{dash-if-empty versionCheck.installed_version}}{{/if}}</td>
|
||||
<td class="face">
|
||||
{{#if versionCheck.version_check_pending}}
|
||||
<span class='icon up-to-date'>{{d-icon "smile-o"}}</span>
|
||||
{{else}}
|
||||
<span class="icon critical-updates-available">{{d-icon "frown-o"}}</span>
|
||||
{{/if}}
|
||||
</td>
|
||||
<td class="version-notes">
|
||||
<span class="normal-note">
|
||||
<div class="version-number">{{#if versionCheck.version_check_pending}}{{dash-if-empty versionCheck.installed_version}}{{/if}}</div>
|
||||
<div class="version-status">
|
||||
<div class="face">
|
||||
{{#if versionCheck.version_check_pending}}
|
||||
{{i18n 'admin.dashboard.version_check_pending'}}
|
||||
<span class='icon up-to-date'>{{d-icon "smile-o"}}</span>
|
||||
{{else}}
|
||||
{{i18n 'admin.dashboard.stale_data'}}
|
||||
<span class="icon critical-updates-available">{{d-icon "frown-o"}}</span>
|
||||
{{/if}}
|
||||
</span>
|
||||
</td>
|
||||
{{else}}
|
||||
<td class="version-number">{{dash-if-empty versionCheck.latest_version}}</td>
|
||||
<td class="face">
|
||||
{{#if versionCheck.upToDate }}
|
||||
<span class='icon up-to-date'>{{d-icon "smile-o"}}</span>
|
||||
{{else}}
|
||||
<span class="icon {{if versionCheck.critical_updates 'critical-updates-available' 'updates-available'}}">
|
||||
{{#if versionCheck.behindByOneVersion}}
|
||||
{{d-icon "meh-o"}}
|
||||
</div>
|
||||
<div class="version-notes">
|
||||
<span class="normal-note">
|
||||
{{#if versionCheck.version_check_pending}}
|
||||
{{i18n 'admin.dashboard.version_check_pending'}}
|
||||
{{else}}
|
||||
{{d-icon "frown-o"}}
|
||||
{{i18n 'admin.dashboard.stale_data'}}
|
||||
{{/if}}
|
||||
</span>
|
||||
{{/if}}
|
||||
</td>
|
||||
<td class="version-notes">
|
||||
{{#if versionCheck.upToDate }}
|
||||
{{i18n 'admin.dashboard.up_to_date'}}
|
||||
{{else}}
|
||||
<span class="critical-note">{{i18n 'admin.dashboard.critical_available'}}</span>
|
||||
<span class="normal-note">{{i18n 'admin.dashboard.updates_available'}}</span>
|
||||
{{i18n 'admin.dashboard.please_upgrade'}}
|
||||
{{/if}}
|
||||
</td>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="version-number">{{dash-if-empty versionCheck.latest_version}}</div>
|
||||
<div class="version-status">
|
||||
<div class="face">
|
||||
{{#if versionCheck.upToDate }}
|
||||
<span class='icon up-to-date'>{{d-icon "smile-o"}}</span>
|
||||
{{else}}
|
||||
<span class="icon {{if versionCheck.critical_updates 'critical-updates-available' 'updates-available'}}">
|
||||
{{#if versionCheck.behindByOneVersion}}
|
||||
{{d-icon "meh-o"}}
|
||||
{{else}}
|
||||
{{d-icon "frown-o"}}
|
||||
{{/if}}
|
||||
</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="version-notes">
|
||||
{{#if versionCheck.upToDate }}
|
||||
{{i18n 'admin.dashboard.up_to_date'}}
|
||||
{{else}}
|
||||
<span class="critical-note">{{i18n 'admin.dashboard.critical_available'}}</span>
|
||||
<span class="normal-note">{{i18n 'admin.dashboard.updates_available'}}</span>
|
||||
{{i18n 'admin.dashboard.please_upgrade'}}
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{{custom-html name="upgrade-header" versionCheck=versionCheck tagName="div" classNames="upgrade-header"}}
|
||||
|
||||
</div>
|
||||
|
|
|
@ -854,25 +854,81 @@ section.details {
|
|||
}
|
||||
}
|
||||
|
||||
.version-check {
|
||||
.version-checks {
|
||||
margin-bottom: 15px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
th {
|
||||
text-align: left !important;
|
||||
h2 {
|
||||
flex: 1 1 100%;
|
||||
border-bottom: 1px solid $primary-low;
|
||||
padding-bottom: .5em;
|
||||
}
|
||||
}
|
||||
|
||||
.version-check {
|
||||
display: flex;
|
||||
flex: 1 1 50%;
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-start;
|
||||
align-self: flex-start;
|
||||
justify-content: space-between;
|
||||
padding: 20px 0 10px 0;
|
||||
|
||||
.upgrade-header {
|
||||
flex: 1 1 100%;
|
||||
margin: 1em 0 1em 0;
|
||||
@media screen and (max-width: 650px) {
|
||||
margin: 0;
|
||||
}
|
||||
tr {
|
||||
border: none;
|
||||
}
|
||||
th {
|
||||
background: transparent;
|
||||
text-align: left;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
h2 {
|
||||
flex: 1 1 100%;
|
||||
}
|
||||
|
||||
.version-number {
|
||||
font-size: $font-up-3;
|
||||
font-weight: bold;
|
||||
font-size: $font-up-2;
|
||||
line-height: $line-height-medium;
|
||||
font-weight: bold;
|
||||
margin: 0 5% 1em 0;
|
||||
flex: 1 1 auto;
|
||||
min-width: 100px;
|
||||
h3 {
|
||||
flex: 1 0 auto;
|
||||
white-space: nowrap;
|
||||
}
|
||||
h4 {
|
||||
font-size: $font-down-2;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.face {
|
||||
width: 20px;
|
||||
.version-status {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 0 0 1em 0;
|
||||
flex: 1 1 50%;
|
||||
min-width: 250px;
|
||||
max-width: 300px;
|
||||
padding-right: 20px;
|
||||
@include small-width {
|
||||
max-width: unset;
|
||||
}
|
||||
.face {
|
||||
margin: 0 .75em 0 0;
|
||||
font-size: $font-up-3;
|
||||
}
|
||||
}
|
||||
|
||||
.version-notes .fa {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
&.critical .version-notes .normal-note {
|
||||
display: none;
|
||||
|
@ -921,13 +977,27 @@ table.api-keys {
|
|||
}
|
||||
|
||||
.dashboard-stats {
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 30px;
|
||||
margin-right: 40px;
|
||||
flex: 1 1 50%;
|
||||
box-sizing: border-box;
|
||||
&.version-check {
|
||||
margin: 0;
|
||||
}
|
||||
&.detected-problems {
|
||||
border-left: 1px solid $primary-low;
|
||||
margin: 20px 0 0 0;
|
||||
padding-left: 20px;
|
||||
}
|
||||
h4 {
|
||||
font-weight: normal;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 650px) {
|
||||
flex: 1 1 100%;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
|
||||
|
@ -993,40 +1063,56 @@ table.api-keys {
|
|||
}
|
||||
|
||||
&.detected-problems {
|
||||
background: $primary-low;
|
||||
margin-bottom: 20px;
|
||||
display: flex;
|
||||
margin-bottom: 30px;
|
||||
|
||||
.look-here {
|
||||
float: left;
|
||||
margin: 20px 10px 0 10px;
|
||||
margin: 10px 20px;
|
||||
|
||||
.fa {
|
||||
font-size: $font-up-5;
|
||||
vertical-align: middle;
|
||||
color: $primary
|
||||
color: $danger
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 650px) {
|
||||
border-left: none;
|
||||
border-top: 1px solid $primary-low;
|
||||
padding: 20px 0 0 0;
|
||||
.look-here {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
h3 {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
|
||||
.problem-messages {
|
||||
float: left;
|
||||
width: 80%;
|
||||
margin-left: 1%;
|
||||
display: flex;
|
||||
|
||||
a {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.actions {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.btn {
|
||||
background: $primary-low;
|
||||
}
|
||||
ul {
|
||||
margin-left: 0;
|
||||
padding-left: 20px;
|
||||
padding-left: 90px;
|
||||
@media screen and (max-width:650px) {
|
||||
padding-left: 20px;
|
||||
}
|
||||
li {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
p.actions {
|
||||
padding-left: 75px;
|
||||
@media screen and (max-width:650px) {
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid $primary-low-mid;
|
||||
border-bottom: 1px solid $primary-low;
|
||||
margin-bottom: .5em;
|
||||
padding-bottom: .5em;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue