Merge pull request #285 from colkito/bug/clean-error-message-not-found
Hide error message when a tx, addr or block is not found
This commit is contained in:
commit
5c8bdd8c0c
|
@ -12,6 +12,7 @@ function($scope, $rootScope, $routeParams, $location, Global, Address, getSocket
|
|||
},
|
||||
function(address) {
|
||||
$rootScope.titleDetail = address.addrStr.substring(0,7) + '...';
|
||||
$rootScope.flashMessage = null;
|
||||
$scope.address = address;
|
||||
},
|
||||
function(e) {
|
||||
|
|
|
@ -68,6 +68,7 @@ angular.module('insight.blocks').controller('BlocksController',
|
|||
blockHash: $routeParams.blockHash
|
||||
}, function(block) {
|
||||
$rootScope.titleDetail = block.height;
|
||||
$rootScope.flashMessage = null;
|
||||
$scope.loading = false;
|
||||
$scope.block = block;
|
||||
}, function(e) {
|
||||
|
|
|
@ -4,7 +4,7 @@ var TRANSACTION_DISPLAYED = 10;
|
|||
var BLOCKS_DISPLAYED = 5;
|
||||
|
||||
angular.module('insight.system').controller('IndexController',
|
||||
function($scope, $rootScope, Global, getSocket, Blocks) {
|
||||
function($scope, Global, getSocket, Blocks) {
|
||||
$scope.global = Global;
|
||||
|
||||
var _getBlocks = function() {
|
||||
|
@ -19,9 +19,6 @@ angular.module('insight.system').controller('IndexController',
|
|||
var socket = getSocket($scope);
|
||||
socket.emit('subscribe', 'inv');
|
||||
|
||||
//show errors
|
||||
$scope.flashMessage = $rootScope.flashMessage || null;
|
||||
|
||||
socket.on('tx', function(tx) {
|
||||
$scope.txs.unshift(tx);
|
||||
if (parseInt($scope.txs.length, 10) >= parseInt(TRANSACTION_DISPLAYED, 10)) {
|
||||
|
|
|
@ -112,6 +112,7 @@ function($scope, $rootScope, $routeParams, $location, Global, Transaction, Trans
|
|||
txId: txid
|
||||
}, function(tx) {
|
||||
$rootScope.titleDetail = tx.txid.substring(0,7) + '...';
|
||||
$rootScope.flashMessage = null;
|
||||
$scope.tx = tx;
|
||||
_processTX(tx);
|
||||
$scope.txs.unshift(tx);
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</div>
|
||||
<div class="m10v">
|
||||
<button class="pull-right btn-copy" clip-copy="block.hash"></button>
|
||||
<a class="ellipsis" href="/address/{{block.hash}}">{{block.hash}}</a>
|
||||
<a class="ellipsis" href="/block/{{block.hash}}">{{block.hash}}</a>
|
||||
</div>
|
||||
<div class="m20v" data-ng-show="!tx.isCoinBase">
|
||||
<h4>Hashes</h4>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="alert alert-danger" data-ng-show="flashMessage">
|
||||
{{flashMessage}}
|
||||
{{$root.flashMessage}}
|
||||
</div>
|
||||
<div data-ng-include src="'/views/includes/connection.html'"></div>
|
||||
<section data-ng-controller="IndexController" data-ng-init="index()">
|
||||
|
|
Loading…
Reference in New Issue