commit
d8fea29125
104
README.md
104
README.md
@ -1,59 +1,29 @@
|
||||
# *insight*
|
||||
# Insight UI
|
||||
|
||||
*insight* is an open-source bitcoin blockchain explorer with complete REST
|
||||
and websocket APIs. Insight runs in NodeJS, uses AngularJS for the
|
||||
front-end and LevelDB for storage.
|
||||
A Bitcoin blockchain explorer web application service for [Bitcore Node](https://github.com/bitpay/bitcore-node) using the [Insight API](https://github.com/bitpay/insight-api).
|
||||
|
||||
Check some screenshots and more details at [insight's project homepage](http://insight.is/).
|
||||
## Quick Start
|
||||
|
||||
*Insight* project is now split into two repositories. One for the [API](https://github.com/bitpay/insight-api) and for the front-end. This repository is for the front-end, which will install the API as a NPM dependency.
|
||||
Please see the guide at [https://bitcore.io/guides/full-node](https://bitcore.io/guides/full-node) for information about getting a block explorer running. This is only the front-end component of the block explorer, and is packaged together with all of the necessary components in [Bitcore](https://github.com/bitpay/bitcore).
|
||||
|
||||
## Prerequisites
|
||||
## Getting Started
|
||||
|
||||
* **Node.js v0.10.x** - Download and Install [Node.js](http://www.nodejs.org/download/).
|
||||
To manually install all of the necessary components, you can run these commands:
|
||||
|
||||
* **NPM** - Node.js package manager, should be automatically installed when you get node.js.
|
||||
|
||||
## Quick Install
|
||||
Check the Prerequisites section above before installing.
|
||||
|
||||
To install Insight, clone the main repository:
|
||||
|
||||
$ git clone https://github.com/bitpay/insight.git && cd insight
|
||||
|
||||
Install dependencies:
|
||||
|
||||
$ npm install
|
||||
|
||||
Run the main application:
|
||||
|
||||
$ npm start
|
||||
|
||||
Then open a browser and go to:
|
||||
|
||||
http://localhost:3001
|
||||
|
||||
If *insight* reports problems connecting to **bitcoind** please check the CONFIGURATION section of
|
||||
[insight-api README](https://github.com/bitpay/insight-api/blob/master/README.md). To set the
|
||||
environment variables run something like:
|
||||
|
||||
$ INSIGHT_NETWORK=livenet BITCOIND_USER=user BITCOIND_PASS=pass INSIGHT_PUBLIC_PATH=public npm start
|
||||
|
||||
|
||||
Please note that the app will need to sync its internal database
|
||||
with the blockchain state, which may take some time. You can check
|
||||
sync progress from within the web interface. More details about that process
|
||||
on [insight-api README](https://github.com/bitpay/insight-api/blob/master/README.md).
|
||||
|
||||
|
||||
## Nginx Setup
|
||||
|
||||
To use Nginx as a reverse proxy for Insight, use the following base [configuration](https://gist.github.com/matiu/bdd5e55ff0ad90b54261)
|
||||
```bash
|
||||
npm install -g bitcore-node
|
||||
bitcore-node create mynode
|
||||
cd mynode
|
||||
bitcore-node install insight-api
|
||||
bitcore-node install insight-ui
|
||||
bitcore-node start
|
||||
```
|
||||
|
||||
Open a web browser to `http://localhost:3001/insight/`
|
||||
|
||||
## Development
|
||||
|
||||
To run insight locally for development mode:
|
||||
To run Insight UI locally in development mode:
|
||||
|
||||
Install bower dependencies:
|
||||
|
||||
@ -67,44 +37,15 @@ To compile and minify the web application's assets:
|
||||
$ grunt compile
|
||||
```
|
||||
|
||||
There is a convinent Gruntfile.js for automation during editing the code
|
||||
There is a convenient Gruntfile.js for automation during editing the code
|
||||
|
||||
```
|
||||
$ grunt
|
||||
```
|
||||
|
||||
|
||||
In case you are developing *insight* and *insight-api* toghether, you can do the following:
|
||||
|
||||
* Install insight and insight-api on the same path ($IROOT)
|
||||
|
||||
```
|
||||
$ cd $IROOT/insight
|
||||
$ grunt
|
||||
```
|
||||
|
||||
in other terminal:
|
||||
|
||||
```
|
||||
$ cd $IROOT/insight-api
|
||||
$ ln -s ../insight/public
|
||||
$ INSIGHT_PUBLIC_PATH=public node insight.js
|
||||
```
|
||||
|
||||
|
||||
```
|
||||
INSIGHT_PUBLIC_PATH=insight/public grunt
|
||||
```
|
||||
|
||||
at insight-api's home path (edit the path according your setup).
|
||||
|
||||
**also** in the insight-api path. (So you will have two grunt processes running, one for insight and one for insight-api).
|
||||
|
||||
|
||||
## Multilanguage support
|
||||
|
||||
insight use [angular-gettext](http://angular-gettext.rocketeer.be) for
|
||||
multilanguage support.
|
||||
Insight UI uses [angular-gettext](http://angular-gettext.rocketeer.be) for multilanguage support.
|
||||
|
||||
To enable a text to be translated, add the ***translate*** directive to html tags. See more details [here](http://angular-gettext.rocketeer.be/dev-guide/annotate/). Then, run:
|
||||
|
||||
@ -112,12 +53,11 @@ To enable a text to be translated, add the ***translate*** directive to html tag
|
||||
grunt compile
|
||||
```
|
||||
|
||||
This action will create a template.pot file in ***po/*** folder. You can open
|
||||
it with some PO editor ([Poedit](http://poedit.net)). Read this [guide](http://angular-gettext.rocketeer.be/dev-guide/translate/) to learn how to edit/update/import PO files from a generated POT file. PO file will be generated inside po/ folder.
|
||||
This action will create a template.pot file in ***po/*** folder. You can open it with some PO editor ([Poedit](http://poedit.net)). Read this [guide](http://angular-gettext.rocketeer.be/dev-guide/translate/) to learn how to edit/update/import PO files from a generated POT file. PO file will be generated inside po/ folder.
|
||||
|
||||
If you make new changes, simply run **grunt compile** again to generate a new .pot template and the angular javascript ***js/translations.js***. Then (if use Poedit), open .po file and choose ***update from POT File*** from **Catalog** menu.
|
||||
|
||||
Finally changes your default language from ***public/src/js/config***
|
||||
Finally changes your default language from ***public/src/js/config***
|
||||
|
||||
```
|
||||
gettextCatalog.currentLanguage = 'es';
|
||||
@ -130,11 +70,11 @@ compile***.
|
||||
|
||||
## Note
|
||||
|
||||
For more details about the *insight API* configs and end-point, just go to [insight API github repository](https://github.com/bitpay/insight-api) or read the [documentation](https://github.com/bitpay/insight-api/blob/master/README.md)
|
||||
For more details about the [Insight API](https://github.com/bitpay/insight-api) configuration and end-points, go to [Insight API GitHub repository](https://github.com/bitpay/insight-api).
|
||||
|
||||
## Contribute
|
||||
|
||||
Contributions and suggestions are welcomed at [insight github repository](https://github.com/bitpay/insight).
|
||||
Contributions and suggestions are welcomed at the [Insight UI GitHub repository](https://github.com/bitpay/insight-ui).
|
||||
|
||||
|
||||
## License
|
||||
|
||||
71
bitcore-node/index.js
Normal file
71
bitcore-node/index.js
Normal file
@ -0,0 +1,71 @@
|
||||
'use strict';
|
||||
|
||||
var BaseService = require('./service');
|
||||
var inherits = require('util').inherits;
|
||||
var fs = require('fs');
|
||||
|
||||
var InsightUI = function(options) {
|
||||
BaseService.call(this, options);
|
||||
if (typeof options.apiPrefix !== 'undefined') {
|
||||
this.apiPrefix = options.apiPrefix;
|
||||
} else {
|
||||
this.apiPrefix = 'insight-api';
|
||||
}
|
||||
if (typeof options.routePrefix !== 'undefined') {
|
||||
this.routePrefix = options.routePrefix;
|
||||
} else {
|
||||
this.routePrefix = 'insight';
|
||||
}
|
||||
};
|
||||
|
||||
InsightUI.dependencies = ['insight-api'];
|
||||
|
||||
inherits(InsightUI, BaseService);
|
||||
|
||||
InsightUI.prototype.start = function(callback) {
|
||||
|
||||
var self = this;
|
||||
|
||||
var indexFile = __dirname + '/../public/index.html';
|
||||
|
||||
fs.readFile(indexFile, { encoding: 'utf8' }, function(err, data) {
|
||||
|
||||
if(err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
self.indexFile = self.filterIndexHTML(data);
|
||||
callback();
|
||||
});
|
||||
};
|
||||
|
||||
InsightUI.prototype.getRoutePrefix = function() {
|
||||
return this.routePrefix;
|
||||
};
|
||||
|
||||
InsightUI.prototype.setupRoutes = function(app, express) {
|
||||
var self = this;
|
||||
|
||||
app.use('/', function(req, res, next){
|
||||
|
||||
if (req.url === '/') {
|
||||
res.send(self.indexFile);
|
||||
} else {
|
||||
express.static(__dirname + '/../public')(req, res, next);
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
InsightUI.prototype.filterIndexHTML = function(data) {
|
||||
var transformed = data
|
||||
.replace(/apiPrefix = '\/api'/, "apiPrefix = '/" + this.apiPrefix + "'");
|
||||
|
||||
if (this.routePrefix) {
|
||||
transformed = transformed.replace(/<base href=\"\/\"/, '<base href="/' + this.routePrefix + '/"');
|
||||
}
|
||||
|
||||
return transformed;
|
||||
};
|
||||
|
||||
module.exports = InsightUI;
|
||||
91
bitcore-node/service.js
Normal file
91
bitcore-node/service.js
Normal file
@ -0,0 +1,91 @@
|
||||
'use strict';
|
||||
|
||||
var util = require('util');
|
||||
var EventEmitter = require('events').EventEmitter;
|
||||
|
||||
var Service = function(options) {
|
||||
EventEmitter.call(this);
|
||||
|
||||
this.node = options.node;
|
||||
this.name = options.name;
|
||||
};
|
||||
|
||||
util.inherits(Service, EventEmitter);
|
||||
|
||||
/**
|
||||
* Describes the dependencies that should be loaded before this service.
|
||||
*/
|
||||
Service.dependencies = [];
|
||||
|
||||
/**
|
||||
* blockHandler
|
||||
* @param {Block} block - the block being added or removed from the chain
|
||||
* @param {Boolean} add - whether the block is being added or removed
|
||||
* @param {Function} callback - call with the leveldb database operations to perform
|
||||
*/
|
||||
Service.prototype.blockHandler = function(block, add, callback) {
|
||||
// implement in the child class
|
||||
setImmediate(function() {
|
||||
callback(null, []);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* the bus events available for subscription
|
||||
* @return {Array} an array of event info
|
||||
*/
|
||||
Service.prototype.getPublishEvents = function() {
|
||||
// Example:
|
||||
// return [
|
||||
// ['eventname', this, this.subscribeEvent, this.unsubscribeEvent],
|
||||
// ];
|
||||
return [];
|
||||
};
|
||||
|
||||
/**
|
||||
* the API methods to expose
|
||||
* @return {Array} return array of methods
|
||||
*/
|
||||
Service.prototype.getAPIMethods = function() {
|
||||
// Example:
|
||||
// return [
|
||||
// ['getData', this, this.getData, 1]
|
||||
// ];
|
||||
|
||||
return [];
|
||||
};
|
||||
|
||||
// Example:
|
||||
// Service.prototype.getData = function(arg1, callback) {
|
||||
//
|
||||
// };
|
||||
|
||||
/**
|
||||
* Function which is called when module is first initialized
|
||||
*/
|
||||
Service.prototype.start = function(done) {
|
||||
setImmediate(done);
|
||||
};
|
||||
|
||||
/**
|
||||
* Function to be called when bitcore-node is stopped
|
||||
*/
|
||||
Service.prototype.stop = function(done) {
|
||||
setImmediate(done);
|
||||
};
|
||||
|
||||
/**
|
||||
* Setup express routes
|
||||
* @param {Express} app
|
||||
*/
|
||||
Service.prototype.setupRoutes = function(app) {
|
||||
// Setup express routes here
|
||||
};
|
||||
|
||||
Service.prototype.getRoutePrefix = function() {
|
||||
return this.name;
|
||||
};
|
||||
|
||||
|
||||
|
||||
module.exports = Service;
|
||||
19
package.json
19
package.json
@ -1,12 +1,8 @@
|
||||
{
|
||||
"name": "insight-bitcore",
|
||||
"name": "insight-ui",
|
||||
"description": "An open-source frontend for the Insight API. The Insight API provides you with a convenient, powerful and simple way to query and broadcast data on the bitcoin network and build your own services with it.",
|
||||
"version": "0.2.5",
|
||||
"author": {
|
||||
"name": "Ryan X Charles",
|
||||
"email": "ryan@bitpay.com"
|
||||
},
|
||||
"repository": "git://github.com/bitpay/insight.git",
|
||||
"version": "0.4.0",
|
||||
"repository": "git://github.com/bitpay/insight-ui.git",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Matias Alejo Garcia",
|
||||
@ -30,9 +26,9 @@
|
||||
}
|
||||
],
|
||||
"bugs": {
|
||||
"url": "https://github.com/bitpay/insight/issues"
|
||||
"url": "https://github.com/bitpay/insight-ui/issues"
|
||||
},
|
||||
"homepage": "https://github.com/bitpay/insight",
|
||||
"homepage": "https://github.com/bitpay/insight-ui",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"insight",
|
||||
@ -42,11 +38,8 @@
|
||||
"bitcore",
|
||||
"front-end"
|
||||
],
|
||||
"scripts": {
|
||||
"start": "INSIGHT_PUBLIC_PATH=public node node_modules/.bin/insight-bitcore-api"
|
||||
},
|
||||
"bitcoreNode": "bitcore-node",
|
||||
"dependencies": {
|
||||
"insight-bitcore-api": ">0.2.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bower": "~1.2.8",
|
||||
|
||||
@ -26,7 +26,7 @@ msgid ""
|
||||
"\"_blank\">open-source Bitcoin blockchain explorer</a> with complete REST "
|
||||
"and websocket APIs that can be used for writing web wallets and other apps "
|
||||
"that need more advanced blockchain queries than provided by bitcoind RPC. "
|
||||
"Check out the <a href=\"http://github.com/bitpay/insight\" target=\"_blank"
|
||||
"Check out the <a href=\"https://github.com/bitpay/insight-ui\" target=\"_blank"
|
||||
"\">source code</a>."
|
||||
msgstr ""
|
||||
"<strong>insight</strong> ist ein <a href=\"http://live.insight.is/\" target="
|
||||
@ -34,7 +34,7 @@ msgstr ""
|
||||
"REST und Websocket APIs um eigene Wallets oder Applikationen zu "
|
||||
"implementieren. Hierbei werden fortschrittlichere Abfragen der Blockchain "
|
||||
"ermöglicht, bei denen die RPC des Bitcoind nicht mehr ausreichen. Der "
|
||||
"aktuelle <a href=\"http://github.com/bitpay/insight\" target=\"_blank"
|
||||
"aktuelle <a href=\"https://github.com/bitpay/insight-ui\" target=\"_blank"
|
||||
"\">Quellcode</a> ist auf Github zu finden."
|
||||
|
||||
#: public/views/index.html
|
||||
@ -45,7 +45,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"<strong>insight</strong> befindet sich aktuell noch in der Entwicklung. "
|
||||
"Bitte sende alle gefundenen Fehler (Bugs) und Feedback zur weiteren "
|
||||
"Verbesserung an unseren <a href=\"https://github.com/bitpay/insight/issues"
|
||||
"Verbesserung an unseren <a href=\"https://github.com/bitpay/insight-ui/issues"
|
||||
"\" target=\"_blank\">Github Issue Tracker</a>."
|
||||
|
||||
#: public/views/index.html
|
||||
|
||||
4
po/es.po
4
po/es.po
@ -26,7 +26,7 @@ msgid ""
|
||||
"\"_blank\">open-source Bitcoin blockchain explorer</a> with complete REST "
|
||||
"and websocket APIs that can be used for writing web wallets and other apps "
|
||||
"that need more advanced blockchain queries than provided by bitcoind RPC. "
|
||||
"Check out the <a href=\"http://github.com/bitpay/insight\" target=\"_blank"
|
||||
"Check out the <a href=\"https://github.com/bitpay/insight-ui\" target=\"_blank"
|
||||
"\">source code</a>."
|
||||
msgstr ""
|
||||
"<strong>insight</strong> es un <a href=\"http://live.insight.is/\" target="
|
||||
@ -44,7 +44,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"<strong>insight</strong> esta en desarrollo aún, por ello agradecemos que "
|
||||
"nos reporten errores o sugerencias para mejorar el software. <a href="
|
||||
"\"https://github.com/bitpay/insight/issues\" target=\"_blank\">Github issue "
|
||||
"\"https://github.com/bitpay/insight-ui/issues\" target=\"_blank\">Github issue "
|
||||
"tracker</a>."
|
||||
|
||||
#: public/views/index.html
|
||||
|
||||
4
po/ja.po
4
po/ja.po
@ -25,14 +25,14 @@ msgid ""
|
||||
"\"_blank\">open-source Bitcoin blockchain explorer</a> with complete REST "
|
||||
"and websocket APIs that can be used for writing web wallets and other apps "
|
||||
"that need more advanced blockchain queries than provided by bitcoind RPC. "
|
||||
"Check out the <a href=\"http://github.com/bitpay/insight\" target=\"_blank"
|
||||
"Check out the <a href=\"https://github.com/bitpay/insight-ui\" target=\"_blank"
|
||||
"\">source code</a>."
|
||||
msgstr ""
|
||||
"<strong>insight</strong>は、bitcoind RPCの提供するものよりも詳細なブロック"
|
||||
"チェインへの問い合わせを必要とするウェブウォレットやその他のアプリを書くのに"
|
||||
"使える、完全なRESTおよびwebsocket APIを備えた<a href=\"http://live.insight."
|
||||
"is/\" target=\"_blank\">オープンソースのビットコインブロックエクスプローラ</"
|
||||
"a>です。<a href=\"http://github.com/bitpay/insight\" target=\"_blank\">ソース"
|
||||
"a>です。<a href=\"https://github.com/bitpay/insight-ui\" target=\"_blank\">ソース"
|
||||
"コード</a>を確認"
|
||||
|
||||
#: public/views/index.html
|
||||
|
||||
2
public/css/main.min.css
vendored
2
public/css/main.min.css
vendored
File diff suppressed because one or more lines are too long
@ -1,6 +1,7 @@
|
||||
<!doctype html>
|
||||
<html lang="en" data-ng-app="insight" data-ng-csp>
|
||||
<head>
|
||||
<base href="/" />
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
@ -8,9 +9,9 @@
|
||||
<title data-ng-bind="$root.title + $root.titleDetail + ' | Insight'">Insight</title>
|
||||
<meta name="keywords" content="bitcoins, transactions, blocks, address, block chain, best block, mining difficulty, hash serialized">
|
||||
<meta name="description" content="Bitcoin Insight. View detailed information on all bitcoin transactions and block. {{ $root.title + $root.titleDetail }}">
|
||||
<link rel="shortcut icon" href="/img/icons/favicon.ico" type="image/x-icon">
|
||||
<link rel="shortcut icon" href="img/icons/favicon.ico" type="image/x-icon">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700,400italic">
|
||||
<link rel="stylesheet" href="/css/main.min.css">
|
||||
<link rel="stylesheet" href="css/main.min.css">
|
||||
</head>
|
||||
<body ng-cloak class="ng-cloak">
|
||||
<div>
|
||||
@ -39,7 +40,7 @@
|
||||
</script>
|
||||
</div>
|
||||
<div id="wrap">
|
||||
<div class="navbar navbar-default navbar-fixed-top" data-ng-include="'/views/includes/header.html'" role='navigation'></div>
|
||||
<div class="navbar navbar-default navbar-fixed-top" data-ng-include="'views/includes/header.html'" role='navigation'></div>
|
||||
<section class="container" data-ng-view></section>
|
||||
</div>
|
||||
<div id="footer" role="navigation">
|
||||
@ -57,17 +58,18 @@
|
||||
</span>
|
||||
|
||||
[
|
||||
<a href="/messages/verify" translate>verify message</a>
|
||||
<a href="messages/verify" translate>verify message</a>
|
||||
<span> · </span>
|
||||
<a href="/tx/send" translate>broadcast transaction</a>
|
||||
<a href="tx/send" translate>broadcast transaction</a>
|
||||
]
|
||||
</div>
|
||||
<a class="insight m10v pull-right" target="_blank" href="http://insight.is">insight <small>API v{{version}}</small></a>
|
||||
</div>
|
||||
</div>
|
||||
<script language="javascript">window.apiPrefix = '/api';</script>
|
||||
<script src="/socket.io/socket.io.js"></script>
|
||||
<script src="/js/vendors.min.js"></script>
|
||||
<script src="/js/angularjs-all.min.js"></script>
|
||||
<script src="/js/main.min.js"></script>
|
||||
<script src="js/vendors.min.js"></script>
|
||||
<script src="js/angularjs-all.min.js"></script>
|
||||
<script src="js/main.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
2
public/js/angularjs-all.min.js
vendored
2
public/js/angularjs-all.min.js
vendored
File diff suppressed because one or more lines are too long
6
public/js/main.min.js
vendored
6
public/js/main.min.js
vendored
File diff suppressed because one or more lines are too long
2
public/js/vendors.min.js
vendored
2
public/js/vendors.min.js
vendored
File diff suppressed because one or more lines are too long
@ -184,7 +184,7 @@ margin-left: 0;
|
||||
#search-form { color: #fff; }
|
||||
|
||||
#search.loading {
|
||||
background-image: url('/img/loading.gif');
|
||||
background-image: url('../img/loading.gif');
|
||||
background-position: 5px center;
|
||||
background-repeat: no-repeat;
|
||||
padding-left: 25px;
|
||||
@ -548,7 +548,7 @@ margin-left: 0;
|
||||
}
|
||||
|
||||
.btn-copy {
|
||||
background: transparent url('/img/icons/copy.png') center center no-repeat;
|
||||
background: transparent url('../img/icons/copy.png') center center no-repeat;
|
||||
}
|
||||
|
||||
.btn-copy .tooltip {
|
||||
@ -614,22 +614,22 @@ margin-left: 0;
|
||||
height: 45px;
|
||||
}
|
||||
#powered a.bitcore {
|
||||
background-image: url('/img/logo.svg');
|
||||
background-image: url('../img/logo.svg');
|
||||
background-size: 80px;
|
||||
width: 30%;
|
||||
}
|
||||
#powered a.nodejs {
|
||||
background-image: url('/img/nodejs.png');
|
||||
background-image: url('../img/nodejs.png');
|
||||
background-size: 80px;
|
||||
width: 30%;
|
||||
}
|
||||
#powered a.angularjs {
|
||||
background-image: url('/img/angularjs.png');
|
||||
background-image: url('../img/angularjs.png');
|
||||
background-size: 50px;
|
||||
width: 20%;
|
||||
}
|
||||
#powered a.leveldb {
|
||||
background-image: url('/img/leveldb.png');
|
||||
background-image: url('../img/leveldb.png');
|
||||
background-size: 50px;
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
@ -4,47 +4,47 @@
|
||||
angular.module('insight').config(function($routeProvider) {
|
||||
$routeProvider.
|
||||
when('/block/:blockHash', {
|
||||
templateUrl: '/views/block.html',
|
||||
templateUrl: 'views/block.html',
|
||||
title: 'Bitcoin Block '
|
||||
}).
|
||||
when('/block-index/:blockHeight', {
|
||||
controller: 'BlocksController',
|
||||
templateUrl: '/views/redirect.html'
|
||||
templateUrl: 'views/redirect.html'
|
||||
}).
|
||||
when('/tx/send', {
|
||||
templateUrl: '/views/transaction_sendraw.html',
|
||||
templateUrl: 'views/transaction_sendraw.html',
|
||||
title: 'Broadcast Raw Transaction'
|
||||
}).
|
||||
when('/tx/:txId/:v_type?/:v_index?', {
|
||||
templateUrl: '/views/transaction.html',
|
||||
templateUrl: 'views/transaction.html',
|
||||
title: 'Bitcoin Transaction '
|
||||
}).
|
||||
when('/', {
|
||||
templateUrl: '/views/index.html',
|
||||
templateUrl: 'views/index.html',
|
||||
title: 'Home'
|
||||
}).
|
||||
when('/blocks', {
|
||||
templateUrl: '/views/block_list.html',
|
||||
templateUrl: 'views/block_list.html',
|
||||
title: 'Bitcoin Blocks solved Today'
|
||||
}).
|
||||
when('/blocks-date/:blockDate/:startTimestamp?', {
|
||||
templateUrl: '/views/block_list.html',
|
||||
templateUrl: 'views/block_list.html',
|
||||
title: 'Bitcoin Blocks solved '
|
||||
}).
|
||||
when('/address/:addrStr', {
|
||||
templateUrl: '/views/address.html',
|
||||
templateUrl: 'views/address.html',
|
||||
title: 'Bitcoin Address '
|
||||
}).
|
||||
when('/status', {
|
||||
templateUrl: '/views/status.html',
|
||||
templateUrl: 'views/status.html',
|
||||
title: 'Status'
|
||||
}).
|
||||
when('/messages/verify', {
|
||||
templateUrl: '/views/messages_verify.html',
|
||||
templateUrl: 'views/messages_verify.html',
|
||||
title: 'Verify Message'
|
||||
})
|
||||
.otherwise({
|
||||
templateUrl: '/views/404.html',
|
||||
templateUrl: 'views/404.html',
|
||||
title: 'Error'
|
||||
});
|
||||
});
|
||||
|
||||
@ -4,24 +4,34 @@ angular.module('insight.address').controller('AddressController',
|
||||
function($scope, $rootScope, $routeParams, $location, Global, Address, getSocket) {
|
||||
$scope.global = Global;
|
||||
|
||||
|
||||
var socket = getSocket($scope);
|
||||
var addrStr = $routeParams.addrStr;
|
||||
|
||||
var _startSocket = function () {
|
||||
socket.emit('subscribe', $routeParams.addrStr);
|
||||
socket.on($routeParams.addrStr, function(tx) {
|
||||
$rootScope.$broadcast('tx', tx);
|
||||
var beep = new Audio('/sound/transaction.mp3');
|
||||
beep.play();
|
||||
var _startSocket = function() {
|
||||
socket.on('bitcoind/addresstxid', function(data) {
|
||||
if (data.address === addrStr) {
|
||||
$rootScope.$broadcast('tx', data.txid);
|
||||
var base = document.querySelector('base');
|
||||
var beep = new Audio(base.href + '/sound/transaction.mp3');
|
||||
beep.play();
|
||||
}
|
||||
});
|
||||
socket.emit('subscribe', 'bitcoind/addresstxid', [addrStr]);
|
||||
};
|
||||
|
||||
var _stopSocket = function () {
|
||||
socket.emit('unsubscribe', 'bitcoind/addresstxid', [addrStr]);
|
||||
};
|
||||
|
||||
socket.on('connect', function() {
|
||||
_startSocket();
|
||||
});
|
||||
|
||||
$scope.params = $routeParams;
|
||||
$scope.$on('$destroy', function(){
|
||||
_stopSocket();
|
||||
});
|
||||
|
||||
$scope.params = $routeParams;
|
||||
|
||||
$scope.findOne = function() {
|
||||
$rootScope.currentAddr = $routeParams.addrStr;
|
||||
|
||||
@ -22,7 +22,7 @@ angular.module('insight.messages').controller('VerifyMessageController',
|
||||
$scope.verify = function() {
|
||||
$scope.verification.status = 'loading';
|
||||
$scope.verification.address = $scope.message.address;
|
||||
$http.post('/api/messages/verify', $scope.message)
|
||||
$http.post(window.apiPrefix + '/messages/verify', $scope.message)
|
||||
.success(function(data, status, headers, config) {
|
||||
if(typeof(data.result) != 'boolean') {
|
||||
// API returned 200 but result was not true or false
|
||||
|
||||
@ -56,11 +56,14 @@ function($scope, $rootScope, $routeParams, $location, Global, Transaction, Trans
|
||||
|
||||
tmp[addr].doubleSpentTxID = tmp[addr].doubleSpentTxID || items[i].doubleSpentTxID;
|
||||
tmp[addr].doubleSpentIndex = tmp[addr].doubleSpentIndex || items[i].doubleSpentIndex;
|
||||
tmp[addr].unconfirmedInput += items[i].unconfirmedInput;
|
||||
tmp[addr].dbError = tmp[addr].dbError || items[i].dbError;
|
||||
tmp[addr].valueSat += Math.round(items[i].value * COIN);
|
||||
tmp[addr].items.push(items[i]);
|
||||
tmp[addr].notAddr = notAddr;
|
||||
|
||||
if (items[i].unconfirmedInput)
|
||||
tmp[addr].unconfirmedInput = true;
|
||||
|
||||
tmp[addr].count++;
|
||||
}
|
||||
|
||||
@ -186,7 +189,7 @@ angular.module('insight.transactions').controller('SendRawTransactionController'
|
||||
rawtx: $scope.transaction
|
||||
};
|
||||
$scope.status = 'loading';
|
||||
$http.post('/api/tx/send', postData)
|
||||
$http.post(window.apiPrefix + '/tx/send', postData)
|
||||
.success(function(data, status, headers, config) {
|
||||
if(typeof(data.txid) != 'string') {
|
||||
// API returned 200 but the format is not known
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
angular.module('insight.address').factory('Address',
|
||||
function($resource) {
|
||||
return $resource('/api/addr/:addrStr/?noTxList=1', {
|
||||
return $resource(window.apiPrefix + '/addr/:addrStr/?noTxList=1', {
|
||||
addrStr: '@addStr'
|
||||
}, {
|
||||
get: {
|
||||
@ -21,3 +21,4 @@ angular.module('insight.address').factory('Address',
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
angular.module('insight.blocks')
|
||||
.factory('Block',
|
||||
function($resource) {
|
||||
return $resource('/api/block/:blockHash', {
|
||||
return $resource(window.apiPrefix + '/block/:blockHash', {
|
||||
blockHash: '@blockHash'
|
||||
}, {
|
||||
get: {
|
||||
@ -23,9 +23,9 @@ angular.module('insight.blocks')
|
||||
})
|
||||
.factory('Blocks',
|
||||
function($resource) {
|
||||
return $resource('/api/blocks');
|
||||
return $resource(window.apiPrefix + '/blocks');
|
||||
})
|
||||
.factory('BlockByHeight',
|
||||
function($resource) {
|
||||
return $resource('/api/block-index/:blockHeight');
|
||||
return $resource(window.apiPrefix + '/block-index/:blockHeight');
|
||||
});
|
||||
|
||||
@ -2,5 +2,5 @@
|
||||
|
||||
angular.module('insight.currency').factory('Currency',
|
||||
function($resource) {
|
||||
return $resource('/api/currency');
|
||||
return $resource(window.apiPrefix + '/currency');
|
||||
});
|
||||
|
||||
@ -8,5 +8,5 @@ angular.module('insight.system')
|
||||
])
|
||||
.factory('Version',
|
||||
function($resource) {
|
||||
return $resource('/api/version');
|
||||
return $resource(window.apiPrefix + '/version');
|
||||
});
|
||||
|
||||
@ -39,8 +39,9 @@ ScopedSocket.prototype.on = function(event, callback) {
|
||||
ScopedSocket.prototype.emit = function(event, data, callback) {
|
||||
var socket = this.socket;
|
||||
var $rootScope = this.$rootScope;
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
|
||||
socket.emit(event, data, function() {
|
||||
args.push(function() {
|
||||
var args = arguments;
|
||||
$rootScope.$apply(function() {
|
||||
if (callback) {
|
||||
@ -48,6 +49,8 @@ ScopedSocket.prototype.emit = function(event, data, callback) {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
socket.emit.apply(socket, args);
|
||||
};
|
||||
|
||||
angular.module('insight.socket').factory('getSocket',
|
||||
|
||||
@ -3,15 +3,15 @@
|
||||
angular.module('insight.status')
|
||||
.factory('Status',
|
||||
function($resource) {
|
||||
return $resource('/api/status', {
|
||||
return $resource(window.apiPrefix + '/status', {
|
||||
q: '@q'
|
||||
});
|
||||
})
|
||||
.factory('Sync',
|
||||
function($resource) {
|
||||
return $resource('/api/sync');
|
||||
return $resource(window.apiPrefix + '/sync');
|
||||
})
|
||||
.factory('PeerSync',
|
||||
function($resource) {
|
||||
return $resource('/api/peer');
|
||||
return $resource(window.apiPrefix + '/peer');
|
||||
});
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
angular.module('insight.transactions')
|
||||
.factory('Transaction',
|
||||
function($resource) {
|
||||
return $resource('/api/tx/:txId', {
|
||||
return $resource(window.apiPrefix + '/tx/:txId', {
|
||||
txId: '@txId'
|
||||
}, {
|
||||
get: {
|
||||
@ -23,17 +23,17 @@ angular.module('insight.transactions')
|
||||
})
|
||||
.factory('TransactionsByBlock',
|
||||
function($resource) {
|
||||
return $resource('/api/txs', {
|
||||
return $resource(window.apiPrefix + '/txs', {
|
||||
block: '@block'
|
||||
});
|
||||
})
|
||||
.factory('TransactionsByAddress',
|
||||
function($resource) {
|
||||
return $resource('/api/txs', {
|
||||
return $resource(window.apiPrefix + '/txs', {
|
||||
address: '@address'
|
||||
});
|
||||
})
|
||||
.factory('Transactions',
|
||||
function($resource) {
|
||||
return $resource('/api/txs');
|
||||
return $resource(window.apiPrefix + '/txs');
|
||||
});
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
||||
<div data-ng-include src="'/views/includes/connection.html'"></div>
|
||||
<div data-ng-include src="'views/includes/connection.html'"></div>
|
||||
<div class="jumbotron">
|
||||
<h1>Ooops!</h1>
|
||||
<h2 translate class="text-muted">404 Page not found :(</h2>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<div data-ng-include src="'/views/includes/connection.html'"></div>
|
||||
<div data-ng-include src="'views/includes/connection.html'"></div>
|
||||
<section data-ng-controller="AddressController" data-ng-init="findOne()">
|
||||
<div class="secondary_navbar hidden-xs hidden-sm" scroll data-ng-class="{'hidden': !secondaryNavbar}" data-ng-show="address.addrStr" data-ng-init="hideSNavbar=0">
|
||||
<div class="container" data-ng-if="!hideSNavbar">
|
||||
@ -74,7 +74,7 @@
|
||||
</div>
|
||||
<div data-ng-if="address.addrStr" data-ng-controller="transactionsController" data-ng-init="load('address')">
|
||||
<h2 translate>Transactions</h2>
|
||||
<div data-ng-include src="'/views/transaction/list.html'" when-scrolled="loadMore()"></div>
|
||||
<div data-ng-include src="'views/transaction/list.html'" when-scrolled="loadMore()"></div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
<div data-ng-include src="'/views/includes/connection.html'"></div>
|
||||
<div data-ng-include src="'views/includes/connection.html'"></div>
|
||||
<section data-ng-controller="BlocksController" data-ng-init="findOne()">
|
||||
<div class="secondary_navbar hidden-xs hidden-sm" scroll data-ng-class="{'hidden': !secondaryNavbar}" data-ng-show="block.hash" data-ng-init="hideSNavbar=0">
|
||||
<div class="container" data-ng-if="!hideSNavbar">
|
||||
<div class="row">
|
||||
<div class="col-md-1">
|
||||
<a href="/block/{{block.previousblockhash}}"><span class="lead glyphicon glyphicon-chevron-left"></span></a>
|
||||
<a href="block/{{block.previousblockhash}}"><span class="lead glyphicon glyphicon-chevron-left"></span></a>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<div class="row">
|
||||
@ -20,7 +20,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<a data-ng-show="block.nextblockhash" href="/block/{{block.nextblockhash}}"><span class="lead glyphicon glyphicon-chevron-right"></span></a>
|
||||
<a data-ng-show="block.nextblockhash" href="block/{{block.nextblockhash}}"><span class="lead glyphicon glyphicon-chevron-right"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- END OF CONTAINER -->
|
||||
@ -82,7 +82,7 @@
|
||||
</tr>
|
||||
<tr data-ng-show="block.previousblockhash">
|
||||
<td><strong translate>Previous Block</strong></td>
|
||||
<td class="text-right"><a href="/block/{{block.previousblockhash}}">{{block.height-1}}</a></td>
|
||||
<td class="text-right"><a href="block/{{block.previousblockhash}}">{{block.height-1}}</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -112,7 +112,7 @@
|
||||
</tr>
|
||||
<tr data-ng-show="block.nextblockhash">
|
||||
<td><strong translate>Next Block</strong></td>
|
||||
<td class="text-right"><a href="/block/{{block.nextblockhash}}">{{block.height+1}}</a></td>
|
||||
<td class="text-right"><a href="block/{{block.nextblockhash}}">{{block.height+1}}</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -121,7 +121,7 @@
|
||||
</div>
|
||||
<div data-ng-if="block.hash" data-ng-controller="transactionsController" data-ng-init="load('block')">
|
||||
<h3 translate>Transactions</h3>
|
||||
<div data-ng-include src="'/views/transaction/list.html'" when-scrolled="loadMore()"></div>
|
||||
<div data-ng-include src="'views/transaction/list.html'" when-scrolled="loadMore()"></div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<div data-ng-include src="'/views/includes/connection.html'"></div>
|
||||
<div data-ng-include src="'views/includes/connection.html'"></div>
|
||||
<section data-ng-controller="BlocksController" data-ng-init="list()">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-gray col-gray-fixed">
|
||||
@ -22,8 +22,8 @@
|
||||
<p class="text-center m20v" data-ng-show="!pagination.isToday && !loading">{{humanSince(pagination.currentTs)}}
|
||||
<p class="text-center m20v" data-ng-show="loading"> </p>
|
||||
<div class="m50v text-center">
|
||||
<a class="btn btn-primary" href="/blocks-date/{{pagination.prev}}"><small>← {{pagination.prev}}</small></a>
|
||||
<a class="btn btn-primary" href="/blocks-date/{{pagination.next}}" data-ng-show="!pagination.isToday"><small>{{pagination.next}} →</small></a>
|
||||
<a class="btn btn-primary" href="blocks-date/{{pagination.prev}}"><small>← {{pagination.prev}}</small></a>
|
||||
<a class="btn btn-primary" href="blocks-date/{{pagination.next}}" data-ng-show="!pagination.isToday"><small>{{pagination.next}} →</small></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -49,7 +49,7 @@
|
||||
<td colspan="5"><span translate>Waiting for blocks...</span> <span class="loader-gif"></span></td>
|
||||
</tr>
|
||||
<tr class="fader" data-ng-repeat='b in blocks'>
|
||||
<td><a href="/block/{{b.hash}}">{{b.height}}</a></td>
|
||||
<td><a href="block/{{b.hash}}">{{b.height}}</a></td>
|
||||
<td>{{b.time * 1000 | date:'medium'}}</td>
|
||||
<td class="text-right">{{b.txlength}}</td>
|
||||
<td class="text-right hidden-xs"><a href="{{b.poolInfo.url}}" title="{{b.poolInfo.poolName}}" target="_blank" data-ng-show="b.poolInfo">{{b.poolInfo.poolName}}</a></td>
|
||||
@ -58,8 +58,8 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<div data-ng-if="pagination.more">
|
||||
<a class="btn btn-primary" href="/blocks-date/{{pagination.current}}" data-ng-show="{{before}}">Lastest block from date</a>
|
||||
<a class="btn btn-primary" href="/blocks-date/{{pagination.current}}/{{pagination.moreTs}}">Older blocks from this date</a>
|
||||
<a class="btn btn-primary" href="blocks-date/{{pagination.current}}" data-ng-show="{{before}}">Lastest block from date</a>
|
||||
<a class="btn btn-primary" href="blocks-date/{{pagination.current}}/{{pagination.moreTs}}">Older blocks from this date</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -3,16 +3,16 @@
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a href="#" data-ng-click="setCurrency('USD')" data-ng-class="{active: currency.symbol == 'USD'}">USD</a>
|
||||
<a data-ng-click="setCurrency('USD')" data-ng-class="{active: currency.symbol == 'USD'}">USD</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" data-ng-click="setCurrency('BTC')" data-ng-class="{active: currency.symbol == 'BTC'}">BTC</a>
|
||||
<a data-ng-click="setCurrency('BTC')" data-ng-class="{active: currency.symbol == 'BTC'}">BTC</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" data-ng-click="setCurrency('mBTC')" data-ng-class="{active: currency.symbol == 'mBTC'}">mBTC</a>
|
||||
<a data-ng-click="setCurrency('mBTC')" data-ng-class="{active: currency.symbol == 'mBTC'}">mBTC</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" data-ng-click="setCurrency('bits')" data-ng-class="{active: currency.symbol == 'bits'}">bits</a>
|
||||
<a data-ng-click="setCurrency('bits')" data-ng-class="{active: currency.symbol == 'bits'}">bits</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
@ -7,15 +7,15 @@
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="insight navbar-brand" href="/">insight</a>
|
||||
<a class="insight navbar-brand" href=".">insight</a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse" collapse="$root.isCollapsed">
|
||||
<ul class="nav navbar-nav">
|
||||
<li data-ng-repeat="item in menu" ui-route="/{{item.link}}" data-ng-class="{active: $uiRoute}">
|
||||
<a href="/{{item.link}}">{{item.title|translate}}</a>
|
||||
<li data-ng-repeat="item in menu" ui-route="{{item.link}}" data-ng-class="{active: $uiRoute}">
|
||||
<a href="{{item.link}}">{{item.title|translate}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
<span class="hidden-xs navbar-form navbar-left" data-ng-include src="'/views/includes/search.html'"></span>
|
||||
<span class="hidden-xs navbar-form navbar-left" data-ng-include src="'views/includes/search.html'"></span>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<div class="status" data-ng-controller="StatusController">
|
||||
@ -38,10 +38,10 @@
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" data-ng-click="openScannerModal()"><span class="glyphicon
|
||||
<a data-ng-click="openScannerModal()"><span class="glyphicon
|
||||
glyphicon-qrcode"></span> Scan</a>
|
||||
</li>
|
||||
<li class="dropdown" data-ng-controller="CurrencyController" data-ng-include="'/views/includes/currency.html'"></li>
|
||||
<li class="dropdown" data-ng-controller="CurrencyController" data-ng-include="'views/includes/currency.html'"></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
<div class="alert alert-danger" data-ng-show="flashMessage">
|
||||
{{$root.flashMessage}}
|
||||
</div>
|
||||
<div data-ng-include src="'/views/includes/connection.html'"></div>
|
||||
<div data-ng-include src="'views/includes/connection.html'"></div>
|
||||
<section data-ng-controller="IndexController" data-ng-init="index()">
|
||||
<div class="container">
|
||||
<div id="home" class="row">
|
||||
<div class="col-xs-12 col-md-8">
|
||||
|
||||
<div id="search-form-mobile" class="visible-xs" data-ng-include src="'/views/includes/search.html'"></div>
|
||||
<div id="search-form-mobile" class="visible-xs" data-ng-include src="'views/includes/search.html'"></div>
|
||||
|
||||
<h1 translate>Latest Blocks</h1>
|
||||
<table class="table table-hover table-striped" style="table-layout: fixed">
|
||||
@ -24,7 +24,7 @@
|
||||
<tr data-ng-show="!blocks.length"><td colspan="4" translate>Waiting for blocks...</td></tr>
|
||||
<tr class="fader" data-ng-repeat='b in blocks'>
|
||||
<td>
|
||||
<a href="/block/{{b.hash}}">{{b.height}}</a>
|
||||
<a href="block/{{b.hash}}">{{b.height}}</a>
|
||||
</td>
|
||||
<td><span class="ellipsis">{{humanSince(b.time)}}</span></td>
|
||||
<td class="text-right">{{b.txlength}}</td>
|
||||
@ -34,7 +34,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="btn-more">
|
||||
<a href="/blocks" class="btn btn-default" translate>See all blocks</a>
|
||||
<a href="blocks" class="btn btn-default" translate>See all blocks</a>
|
||||
</div>
|
||||
|
||||
<h2 translate>Latest Transactions</h2>
|
||||
@ -50,7 +50,7 @@
|
||||
<tr data-ng-show="!txs.length"><td colspan="3" translate>Waiting for transactions...</td></tr>
|
||||
<tr class="fader" data-ng-repeat='tx in txs'>
|
||||
<td>
|
||||
<a class="ellipsis" href="/tx/{{tx.txid}}">{{tx.txid}}</a>
|
||||
<a class="ellipsis" href="tx/{{tx.txid}}">{{tx.txid}}</a>
|
||||
</td>
|
||||
<td class="text-right"><span class="ellipsis">{{$root.currency.getConvertion(tx.valueOut) || tx.valueOut + ' BTC'}}</span></td>
|
||||
</tr>
|
||||
@ -61,9 +61,9 @@
|
||||
|
||||
<div class="col-xs-12 col-md-4 col-gray">
|
||||
<h2 translate>About</h2>
|
||||
<p translate><strong>insight</strong> is an <a href="http://live.insight.is/"
|
||||
target="_blank">open-source Bitcoin blockchain explorer</a> with complete REST and websocket APIs that can be used for writing web wallets and other apps that need more advanced blockchain queries than provided by bitcoind RPC. Check out the <a href="http://github.com/bitpay/insight" target="_blank">source code</a>.</p>
|
||||
<p translate><strong>insight</strong> is still in development, so be sure to report any bugs and provide feedback for improvement at our <a href="https://github.com/bitpay/insight/issues" target="_blank">github issue tracker</a>.</p>
|
||||
<p translate><strong>insight</strong> is an <a href="https://insight.is/"
|
||||
target="_blank">open-source Bitcoin blockchain explorer</a> with complete REST and websocket APIs that can be used for writing web wallets and other apps that need more advanced blockchain queries than provided by bitcoind RPC. Check out the <a href="https://github.com/bitpay/insight-ui" target="_blank">source code</a>.</p>
|
||||
<p translate><strong>insight</strong> is still in development, so be sure to report any bugs and provide feedback for improvement at our <a href="https://github.com/bitpay/insight-ui/issues" target="_blank">github issue tracker</a>.</p>
|
||||
<div id="powered" class="row">
|
||||
<div class="powered-text">
|
||||
<small class="text-muted" translate>Powered by</small>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<div data-ng-include src="'/views/includes/connection.html'"></div>
|
||||
<div data-ng-include src="'views/includes/connection.html'"></div>
|
||||
<section>
|
||||
<div class="page-header">
|
||||
<h1 translate>Application Status</h1>
|
||||
@ -60,66 +60,25 @@
|
||||
|
||||
<h2 translate>Last Block</h2>
|
||||
<table class="table" style="table-layout: fixed" data-ng-controller="StatusController" data-ng-init="getStatus('LastBlockHash')">
|
||||
<thead data-ng-include src="'/views/includes/infoStatus.html'"></thead>
|
||||
<thead data-ng-include src="'views/includes/infoStatus.html'"></thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td translate>Last Block Hash (Bitcoind)</td>
|
||||
<td class="text-right ellipsis"><a href="/block/{{lastblockhash}}">{{lastblockhash}}</a></td>
|
||||
<td class="text-right ellipsis"><a href="block/{{lastblockhash}}">{{lastblockhash}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td translate>Current Blockchain Tip (insight)</td>
|
||||
<td class="text-right ellipsis"><a href="/block/{{syncTipHash}}">{{syncTipHash}}</a></td>
|
||||
<td class="text-right ellipsis"><a href="block/{{syncTipHash}}">{{syncTipHash}}</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h2 translate>Transaction Output Set Information</h2>
|
||||
<div data-ng-controller="StatusController">
|
||||
<button data-ng-click="txoutLoading=1;getStatus('TxOutSetInfo')" class="btn btn-default" data-ng-show="!txoutsetinfo.height">
|
||||
<span translate>Show Transaction Output data</span>
|
||||
<span data-ng-show="txoutLoading" class="glyphicon glyphicon-refresh icon-rotate"></span>
|
||||
</button >
|
||||
|
||||
<table class="table" data-ng-show="txoutsetinfo.height" style="table-layout: fixed" >
|
||||
<thead data-ng-include src="'/views/includes/infoStatus.html'"></thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td translate>Height</td>
|
||||
<td class="text-right"><a href="/block-index/{{txoutsetinfo.height}}">{{txoutsetinfo.height}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td translate>Best Block</td>
|
||||
<td class="text-right ellipsis"><a href="/block/{{txoutsetinfo.bestblock}}">{{txoutsetinfo.bestblock}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td translate>Transactions</td>
|
||||
<td class="text-right"> {{txoutsetinfo.transactions}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td translate>Transaction Outputs</td>
|
||||
<td class="text-right">{{txoutsetinfo.txouts}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td translate>Bytes Serialized</td>
|
||||
<td class="text-right">{{txoutsetinfo.bytes_serialized}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td translate>Hash Serialized</td>
|
||||
<td class="text-right ellipsis">{{txoutsetinfo.hash_serialized}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td translate>Total Amount</td>
|
||||
<td class="text-right">{{txoutsetinfo.total_amount}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div> <!-- END OF COL-8 -->
|
||||
|
||||
<div class="col-xs-12 col-md-4 col-gray">
|
||||
<h2 translate>Bitcoin node information</h2>
|
||||
<table class="table" data-ng-controller="StatusController" data-ng-init="getStatus('Info')">
|
||||
<thead data-ng-include src="'/views/includes/infoStatus.html'"></thead>
|
||||
<thead data-ng-include src="'views/includes/infoStatus.html'"></thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td translate>Version</td>
|
||||
@ -131,7 +90,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td translate>Blocks</td>
|
||||
<td class="text-right"><a href="/block-index/{{info.blocks}}">{{info.blocks}}</a></td>
|
||||
<td class="text-right"><a href="block-index/{{info.blocks}}">{{info.blocks}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td translate>Time Offset</td>
|
||||
@ -146,8 +105,8 @@
|
||||
<td class="text-right">{{info.difficulty}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td translate>Testnet</td>
|
||||
<td class="text-right">{{info.testnet}}</td>
|
||||
<td translate>Network</td>
|
||||
<td class="text-right">{{info.network}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td translate>Proxy setting</td>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<div data-ng-include src="'/views/includes/connection.html'"></div>
|
||||
<div data-ng-include src="'views/includes/connection.html'"></div>
|
||||
<section data-ng-controller="transactionsController" data-ng-init="findThis()">
|
||||
<div class="secondary_navbar hidden-xs hidden-sm" scroll data-ng-class="{'hidden': !secondaryNavbar}" data-ng-show="tx.txid" data-ng-init="hideSNavbar=0">
|
||||
<div class="container" data-ng-if="!hideSNavbar">
|
||||
@ -52,6 +52,10 @@
|
||||
<td><strong translate>Size</strong></td>
|
||||
<td class="text-muted text-right">{{tx.size}} (bytes)</td>
|
||||
</tr>
|
||||
<tr data-ng-show="tx.fees">
|
||||
<td><strong translate>Fee Rate</strong></td>
|
||||
<td class="text-muted text-right">{{$root.currency.getConvertion((tx.fees * 1000) / tx.size) + ' per kB' || ((tx.fees * 1000) / tx.size) + 'BTC per kB'}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong translate>Received Time</strong></td>
|
||||
<td data-ng-show="tx.time" class="text-muted text-right">{{tx.time * 1000|date:'medium'}}</td>
|
||||
@ -59,14 +63,14 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong translate>Mined Time</strong></td>
|
||||
<td data-ng-show="tx.time" class="text-muted text-right">{{tx.blocktime * 1000|date:'medium'}}</td>
|
||||
<td data-ng-show="!tx.time" class="text-muted text-right">N/A</td>
|
||||
<td data-ng-show="tx.blocktime" class="text-muted text-right">{{tx.blocktime * 1000|date:'medium'}}</td>
|
||||
<td data-ng-show="!tx.blocktime" class="text-muted text-right">N/A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong translate>Included in Block</strong></td>
|
||||
<td data-ng-show="tx.blockhash" class="text-muted text-right">
|
||||
<div class="ellipsis">
|
||||
<a href="/block/{{tx.blockhash}}">{{tx.blockhash}}</a>
|
||||
<a href="block/{{tx.blockhash}}">{{tx.blockhash}}</a>
|
||||
</div>
|
||||
<td data-ng-show="!tx.blockhash" class="text-muted text-right">Unconfirmed</td>
|
||||
</tr>
|
||||
@ -88,8 +92,7 @@
|
||||
</div>
|
||||
<h2 translate>Details</h2>
|
||||
<div class="block-tx" data-ng-if="tx.txid">
|
||||
<div data-ng-include src="'/views/transaction/tx.html'"></div>
|
||||
<div data-ng-include src="'views/transaction/tx.html'"></div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
data-ng-show="!txs[0].txid && !loading"
|
||||
translate>There are no transactions involving this address.</div>
|
||||
<div class="block-tx" data-ng-show="txs && txs[0].txid" data-ng-repeat="tx in txs">
|
||||
<div data-ng-include src="'/views/transaction/tx.html'"></div>
|
||||
<div data-ng-include src="'views/transaction/tx.html'"></div>
|
||||
</div>
|
||||
<div class="progress progress-striped active" data-ng-show="loading">
|
||||
<div class="progress-bar progress-bar-info" style="width: 100%">
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
<div class="line-bot row" data-ng-hide="!tx">
|
||||
<div class="col-xs-7 col-md-8">
|
||||
<div class="ellipsis">
|
||||
<a class="btn-expand" href="#" title="Show/Hide items details" data-ng-click="itemsExpanded = !itemsExpanded">
|
||||
<a class="btn-expand" title="Show/Hide items details" data-ng-click="itemsExpanded = !itemsExpanded">
|
||||
<span class="glyphicon glyphicon-plus-sign" data-ng-class="{'glyphicon-minus-sign': itemsExpanded}"></span>
|
||||
</a>
|
||||
<a href="/tx/{{tx.txid}}">{{tx.txid}}</a>
|
||||
<a href="tx/{{tx.txid}}">{{tx.txid}}</a>
|
||||
<span class="btn-copy" clip-copy="tx.txid"></span>
|
||||
</div>
|
||||
</div>
|
||||
@ -13,7 +13,7 @@
|
||||
<span translate>first seen at</span>
|
||||
<time>{{tx.firstSeenTs * 1000 | date:'medium'}}</time>
|
||||
</div>
|
||||
<div data-ng-show="tx.time && !tx.firstSeenTs">
|
||||
<div data-ng-show="tx.blocktime && !tx.firstSeenTs">
|
||||
<span translate>mined</span>
|
||||
<time>{{tx.time * 1000 | date:'medium'}}</time>
|
||||
</div>
|
||||
@ -40,7 +40,7 @@
|
||||
<div class="ellipsis">
|
||||
<span data-ng-show="vin.notAddr">{{vin.addr}}</span>
|
||||
<span class="text-muted" title="Current Bitcoin Address" data-ng-show="vin.addr == $root.currentAddr">{{vin.addr}}</span>
|
||||
<a href="/address/{{vin.addr}}" data-ng-show="!vin.notAddr && vin.addr != $root.currentAddr">{{vin.addr}}</a>
|
||||
<a href="address/{{vin.addr}}" data-ng-show="!vin.notAddr && vin.addr != $root.currentAddr">{{vin.addr}}</a>
|
||||
</div>
|
||||
<div data-ng-show="vin.unconfirmedInput" class="text-danger"> <span class="glyphicon glyphicon-warning-sign"></span> (Input unconfirmed)</div>
|
||||
<div data-ng-show="vin.dbError" class="text-danger">
|
||||
@ -50,7 +50,7 @@
|
||||
<div data-ng-show="vin.doubleSpentTxID" class="text-danger">
|
||||
<span class="glyphicon glyphicon-warning-sign"></span>
|
||||
<span translate>Double spent attempt detected. From tx:</span>
|
||||
<a href="/tx/{{vin.doubleSpentTxID}}">{{vin.doubleSpentTxID}},{{vin.doubleSpentIndex}}</a>
|
||||
<a href="tx/{{vin.doubleSpentTxID}}">{{vin.doubleSpentTxID}},{{vin.doubleSpentIndex}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -71,9 +71,9 @@
|
||||
{{$root.currency.getConvertion(vin.value) || vin.value + ' BTC'}}
|
||||
</div>
|
||||
<div class="ellipsis">
|
||||
<a class="glyphicon glyphicon-chevron-right" href="/tx/{{vin.txid}}/>/{{vin.vout}}" title="Outpoint: {{vin.txid}},{{vin.vout}}"></a>
|
||||
<a class="glyphicon glyphicon-chevron-right" href="tx/{{vin.txid}}/>/{{vin.vout}}" title="Outpoint: {{vin.txid}},{{vin.vout}}"></a>
|
||||
<span data-ng-show="vin.notAddr">{{vin.addr}}</span>
|
||||
<a href="/address/{{vin.addr}}" data-ng-show="!vin.notAddr">{{vin.addr}}</a>
|
||||
<a href="address/{{vin.addr}}" data-ng-show="!vin.notAddr">{{vin.addr}}</a>
|
||||
</div>
|
||||
<div data-ng-show="vin.unconfirmedInput" class="text-danger">
|
||||
<span class="glyphicon glyphicon-warning-sign"></span>
|
||||
@ -86,11 +86,12 @@
|
||||
<div data-ng-show="vin.doubleSpentTxID" class="text-danger">
|
||||
<span class="glyphicon glyphicon-warning-sign"></span>
|
||||
<span translate>Double spent attempt detected. From tx:</span>
|
||||
<a href="/tx/{{<vin class=""></vin>doubleSpentTxID}}">{{vin.doubleSpentTxID}},{{vin.doubleSpentIndex}}</a>
|
||||
<a href="tx/{{<vin class=""></vin>doubleSpentTxID}}">{{vin.doubleSpentTxID}},{{vin.doubleSpentIndex}}</a>
|
||||
</div>
|
||||
</div> <!-- END OF PANEL BODY -->
|
||||
</div> <!-- END OF PANEL-DEFAULT -->
|
||||
<div class="small" style="margin-left:0.7em; word-wrap:break-word;" data-ng-class="{true: 'v_highlight', false: ''}[from_vin == true && v_index == vin.n]" >
|
||||
<p><strong>Confirmations:</strong> {{vin.confirmations}}</p>
|
||||
<p><strong>scriptSig</strong></p>
|
||||
<div data-ng-repeat="item in vin.scriptSig.asm | split:' '" class="">
|
||||
<p class="col-md-11 ellipsis text-muted">{{item}}</p>
|
||||
@ -137,7 +138,7 @@
|
||||
<div class="ellipsis">
|
||||
<span data-ng-show="vout.notAddr">{{vout.addr}}</span>
|
||||
<span class="text-muted" title="Current Bitcoin Address" data-ng-show="address == $root.currentAddr" data-ng-repeat="address in vout.addr.split(',')">{{vout.addr}}</span>
|
||||
<a href="/address/{{address}}" data-ng-show="!vout.notAddr && address != $root.currentAddr" data-ng-repeat="address in vout.addr.split(',')">{{address}}</a>
|
||||
<a href="address/{{address}}" data-ng-show="!vout.notAddr && address != $root.currentAddr" data-ng-repeat="address in vout.addr.split(',')">{{address}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -158,11 +159,11 @@
|
||||
<div class="pull-right btc-value">
|
||||
<span>{{$root.currency.getConvertion(vout.value) || vout.value + ' BTC'}}
|
||||
<span class="text-success" data-ng-show="!vout.spentTxId" tooltip="Output is unspent" tooltip-placement="left">(U)</span>
|
||||
<a class="glyphicon glyphicon-chevron-right" data-ng-show="vout.spentTxId" href="/tx/{{vout.spentTxId}}/</{{vout.spentIndex}}" title="Spent at: {{vout.spentTxId}},{{vout.spentIndex}}"></a>
|
||||
<a class="glyphicon glyphicon-chevron-right" data-ng-show="vout.spentTxId" href="tx/{{vout.spentTxId}}/</{{vout.spentIndex}}" title="Spent at: {{vout.spentTxId}},{{vout.spentIndex}}"></a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="ellipsis">
|
||||
<a href="/address/{{address}}" data-ng-repeat="address in vout.scriptPubKey.addresses">{{address}}</a>
|
||||
<a href="address/{{address}}" data-ng-repeat="address in vout.scriptPubKey.addresses">{{address}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -192,7 +193,7 @@
|
||||
</div>
|
||||
|
||||
<div class="well well-sm bgwhite ellipsis" data-ng-if="itemsExpanded && !block.hash && tx.blockhash">
|
||||
<strong translate>Included in Block</strong> <a class="text-muted" href="/block/{{tx.blockhash}}">{{tx.blockhash}}</a>
|
||||
<strong translate>Included in Block</strong> <a class="text-muted" href="block/{{tx.blockhash}}">{{tx.blockhash}}</a>
|
||||
<span class="btn-copy" clip-copy="tx.blockhash"></span>
|
||||
</div>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user