Skip to content

Commit 4dcd1b7

Browse files
committed
show file / snapshot name in the browser / diff ui
1 parent 696221c commit 4dcd1b7

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

webapp/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<span class="icon-bar"></span>
2020
<span class="icon-bar"></span>
2121
</button>
22-
<a class="navbar-brand" href="#">ZFS-Snap-Diff</a>
22+
<a class="navbar-brand" href="#/browse-actual">ZFS-Snap-Diff</a>
2323
</div>
2424
<div class="collapse navbar-collapse">
2525
<ul class="nav navbar-nav">

webapp/js/zsd-file-actions.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ angular.module('zsdFileActions', ['zsdServices', 'zsdUtils']).
2424

2525
// trigger actions if a file is selected
2626
this.fileSelected = function(pathInActual, pathInSnap, curSnap){
27+
$scope.fileName = PathUtils.extractFileName(pathInActual);
2728
$scope.pathInActual = pathInActual;
2829
$scope.pathInSnap = pathInSnap;
2930
$scope.curSnap = curSnap;

webapp/js/zsd-file-diff.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ angular.module('zsdFileDiff', ['zsdServices']).
55
scope: {
66
diffResult: '=',
77
path: '=',
8+
fileName: '=',
89
curSnap: '='
910
},
1011
templateUrl: 'template-file-diff.html',

webapp/template-file-actions.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353

5454
<!-- text file content -->
5555
<div class="panel panel-default center-block" ng-if="textFileContent">
56-
<div class="panel-heading">{{curSnap.Name}}</div>
56+
<div class="panel-heading">content of: <strong>{{fileName}}</strong> from snapshot: <strong>{{curSnap.Name}}</strong></div>
5757
<div class="pandel-body"><pre><code ng-bind-html="textFileContent"></code></pre></div>
5858
</div>
5959

@@ -71,5 +71,5 @@
7171
</div>
7272
</div>
7373

74-
<zsd-file-diff diff-result="diffResult" path="pathInActual", cur-snap="curSnap">
74+
<zsd-file-diff diff-result="diffResult" path="pathInActual", cur-snap="curSnap" file-name="fileName">
7575
</zsd-file-diff>

webapp/template-file-diff.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<!-- intext -->
1010
<div class="container" ng-show="diffResult && diffType === 'intext'">
1111
<div class="panel panel-default center-block">
12-
<div class="panel-heading">{{curSnap.Name}}</div>
12+
<div class="panel-heading">difference of: <strong>{{fileName}}</strong> between the actual version and the version from the snapshot: <strong>{{curSnap.Name}}</strong></div>
1313
<div class="pandel-body">
1414
<div ng-repeat="diffContext in diffResult.intext">
1515
<div style="margin-bottom: 5px;">
@@ -35,11 +35,11 @@
3535
<!-- side by side -->
3636
<div class="container-fluid" ng-show="diffResult && diffType ==='sideBySide'">
3737
<div class="panel panel-default center-block">
38-
<div class="panel-heading">{{curSnap.Name}}</div>
38+
<div class="panel-heading">difference of: <strong>{{fileName}}</strong> between the actual version and the version from the snapshot: <strong>{{curSnap.Name}}</strong></div>
3939
<div class="pandel-body">
4040
<table class="side-by-side-diff">
4141
<tr>
42-
<th colspan="2"><h4 class="text-center" style="margin-bottom: -20px;">Snapshot</h4></td>
42+
<th colspan="2"><h4 class="text-center" style="margin-bottom: -20px;">Snapshot (<small>{{curSnap.Name}}</small>)</h4></td>
4343
<th colspan="2"><h4 class="text-center" style="margin-bottom: -20px;">Actual</h4></td>
4444
</tr>
4545
<tr zsd-side-by-side-diff-rows blocks="diffResult.sideBySide">

0 commit comments

Comments
 (0)