Commit 948e5ae7 by Torkel Ödegaard

dashboard_history: further css & markup fixes, removing style overrides &…

dashboard_history: further css & markup fixes, removing style overrides & resuing existing styles and markup components
parent c4e872b9
...@@ -283,7 +283,7 @@ func GetDashboardVersions(c *middleware.Context) Response { ...@@ -283,7 +283,7 @@ func GetDashboardVersions(c *middleware.Context) Response {
for _, version := range query.Result { for _, version := range query.Result {
if version.RestoredFrom == version.Version { if version.RestoredFrom == version.Version {
version.Message = "Initial save (created migration)" version.Message = "Initial save (created by migration)"
continue continue
} }
......
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
<div class="gf-form-group" ng-show="ctrl.mode === 'list'"> <div class="gf-form-group" ng-show="ctrl.mode === 'list'">
<div class="gf-form-button-row"> <div class="gf-form-button-row">
<a type="button" <a type="button"
class="btn gf-form-button btn-primary" class="btn gf-form-button btn-secondary"
ng-if="ctrl.revisions.length > 1" ng-if="ctrl.revisions.length > 1"
ng-class="{disabled: !ctrl.isComparable()}" ng-class="{disabled: !ctrl.isComparable()}"
ng-click="ctrl.getDiff(ctrl.diff)" ng-click="ctrl.getDiff(ctrl.diff)"
...@@ -99,58 +99,52 @@ ...@@ -99,58 +99,52 @@
</div> </div>
</div> </div>
<div class="history-list" ng-if="ctrl.mode === 'compare'"> <div class="edit-tab-with-sidemenu" ng-if="ctrl.mode === 'compare'">
<div class="page-container"> <aside class="edit-sidemenu-aside">
<div class="page-body"> <ul class="edit-sidemenu">
<aside class="page-sidebar"> <li ng-class="{active: ctrl.diff === 'basic'}"><a ng-click="ctrl.getDiff('basic')" href="">Change Summary</a></li>
<section class="page-sidebar-section"> <li ng-class="{active: ctrl.diff === 'html'}"><a ng-click="ctrl.getDiff('html')" href="">JSON Code View</a></li>
<ul class="ui-list"> </ul>
<li><a ng-class="{active: ctrl.diff === 'basic'}" ng-click="ctrl.getDiff('basic')" href="">Change Summary</a></li> </aside>
<li><a ng-class="{active: ctrl.diff === 'html'}" ng-click="ctrl.getDiff('html')" href="">JSON Code View</a></li>
</ul>
</section>
</aside>
<div class="tab-content page-content-with-sidebar"> <div class="edit-tab-content">
<div ng-if="ctrl.loading"> <div ng-if="ctrl.loading">
<i class="fa fa-spinner fa-spin"></i> <i class="fa fa-spinner fa-spin"></i>
<em>Fetching changes&hellip;</em> <em>Fetching changes&hellip;</em>
</div> </div>
<div ng-if="!ctrl.loading" ng-init="new = ctrl.selected[0]; original = ctrl.selected[1]"> <div ng-if="!ctrl.loading" ng-init="new = ctrl.selected[0]; original = ctrl.selected[1]">
<a type="button" <a type="button"
class="btn gf-form-button btn-primary diff-restore-btn" class="btn gf-form-button btn-secondary pull-right"
ng-click="ctrl.restore(new)" ng-click="ctrl.restore(new)"
ng-if="ctrl.isOriginalCurrent()"> ng-if="ctrl.isOriginalCurrent()">
<i class="fa fa-rotate-right" ></i>&nbsp;&nbsp;Restore to version {{new}} <i class="fa fa-rotate-right" ></i>&nbsp;&nbsp;Restore to version {{new}}
</a> </a>
<h4> <h4>
Comparing Version {{ctrl.selected[0]}} Comparing Version {{ctrl.selected[0]}}
<i class="fa fa-arrows-h"></i> <i class="fa fa-arrows-h"></i>
Version {{ctrl.selected[1]}} Version {{ctrl.selected[1]}}
<cite class="muted" ng-if="ctrl.isOriginalCurrent()">(Current)</cite> <cite class="muted" ng-if="ctrl.isOriginalCurrent()">(Current)</cite>
</h4> </h4>
<section ng-if="ctrl.diff === 'basic'"> <section ng-if="ctrl.diff === 'basic'">
<p class="small muted"> <p class="small muted">
<strong>Version {{new}}</strong> updated by <strong>Version {{new}}</strong> updated by
<span>{{ctrl.getMeta(new, 'createdBy')}} </span> <span>{{ctrl.getMeta(new, 'createdBy')}} </span>
<span>{{ctrl.formatBasicDate(ctrl.getMeta(new, 'created'))}}</span> <span>{{ctrl.formatBasicDate(ctrl.getMeta(new, 'created'))}}</span>
<span> - {{ctrl.getMeta(new, 'message')}}</span> <span> - {{ctrl.getMeta(new, 'message')}}</span>
</p> </p>
<p class="small muted"> <p class="small muted">
<strong>Version {{original}}</strong> updated by <strong>Version {{original}}</strong> updated by
<span>{{ctrl.getMeta(original, 'createdBy')}} </span> <span>{{ctrl.getMeta(original, 'createdBy')}} </span>
<span>{{ctrl.formatBasicDate(ctrl.getMeta(original, 'created'))}}</span> <span>{{ctrl.formatBasicDate(ctrl.getMeta(original, 'created'))}}</span>
<span> - {{ctrl.getMeta(original, 'message')}}</span> <span> - {{ctrl.getMeta(original, 'message')}}</span>
</p> </p>
</section> </section>
<div id="delta" diff-delta> <div id="delta" diff-delta>
<div class="delta-basic" ng-show="ctrl.diff === 'basic'" compile="ctrl.delta.basic"></div> <div class="delta-basic" ng-show="ctrl.diff === 'basic'" compile="ctrl.delta.basic"></div>
<div class="delta-html" ng-show="ctrl.diff === 'html'" compile="ctrl.delta.html"></div> <div class="delta-html" ng-show="ctrl.diff === 'html'" compile="ctrl.delta.html"></div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div>
</div>
</div> </div>
...@@ -286,9 +286,6 @@ $footer-link-hover: $gray-4; ...@@ -286,9 +286,6 @@ $footer-link-hover: $gray-4;
$diff-label-bg: $dark-2; $diff-label-bg: $dark-2;
$diff-label-fg: $white; $diff-label-fg: $white;
$diff-switch-bg: $dark-5;
$diff-switch-disabled: $gray-1;
$diff-group-bg: $dark-4; $diff-group-bg: $dark-4;
$diff-arrow-color: $white; $diff-arrow-color: $white;
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
} }
.edit-sidemenu-aside { .edit-sidemenu-aside {
min-width: 6rem;
margin-right: $spacer*2; margin-right: $spacer*2;
} }
......
// Diff View
.history-list {
h4 {
margin-bottom: 0.75em;
}
.page-container {
padding: 0;
background: none;
}
.page-sidebar {
margin-left: 0;
margin-right: 3em;
}
.small.muted { margin-bottom: 0.25em; }
.ui-list > li {
margin-bottom: 1.5em;
& > a { padding-left: 15px; }
& > a.active { @include left-brand-border-gradient(); }
}
}
// Actual Diff // Actual Diff
#delta { #delta {
margin: 2em 0; margin: 2em 0;
...@@ -105,10 +78,6 @@ ...@@ -105,10 +78,6 @@
.diff-item-added, .diff-item-deleted { list-style: none; } .diff-item-added, .diff-item-deleted { list-style: none; }
.diff-restore-btn {
float: right;
}
.diff-group { .diff-group {
background: $diff-group-bg; background: $diff-group-bg;
font-size: 16px; font-size: 16px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment