Skip to content

Commit 9e5c3f7

Browse files
committed
frontend: show snapshots even its empty
* empty snapshot table -> no snapshots found
1 parent 1812044 commit 9e5c3f7

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

webapp/app.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ zsd.controller('BySnapshotCtrl', ["Backend", "Difflib", function(Backend, Diffli
243243

244244
self.showSnapshotDiff = function(snap){
245245
self.currentSnapshot = snap;
246+
delete self.snapshotDiff;
246247
Backend.snapshotDiff(snap.Name).then(function(diff){
247248
self.snapshotDiff = diff;
248249
});
@@ -267,6 +268,11 @@ zsd.controller('ByFileCtrl', ["Backend", "Difflib", "$window", "$sce", "$q", fun
267268
});
268269
}
269270

271+
272+
self.snapshotsFetched = function(){
273+
return angular.isArray($scope.snapshots);
274+
};
275+
270276
self.snapshotSelected = function(snap, scrollToContent){
271277
self.currentSnapshot = snap;
272278

webapp/by-file.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@
66
</dir-browser>
77

88
<div ng-show="ctrl.isFileSelected">
9-
<div ng-hide="ctrl.snapshots">
10-
loading snapshots .....
11-
</div>
129

13-
<div ng-show="ctrl.snapshots">
10+
<div ng-show="ctrl.snapshotsFetched">
1411
<snapshots snapshots="ctrl.snapshots" on-snapshot-selected="ctrl.snapshotSelected(snap)">
1512
</snapshots>
1613

0 commit comments

Comments
 (0)