Compare commits

..

No commits in common. "master" and "v0.4.0" have entirely different histories.

60 changed files with 413 additions and 2037 deletions

1
.gitignore vendored
View File

@ -47,4 +47,3 @@ public/css/main.css
README.html
po/*
!po/*.po
*.codekit3

View File

@ -1,5 +0,0 @@
language: node_js
node_js:
- 'v8'
install:
- npm install

View File

@ -1,7 +1,5 @@
'use strict';
// var config = require('flosight-config.json');
module.exports = function(grunt) {
//Load NPM tasks
@ -12,27 +10,10 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-markdown');
grunt.loadNpmTasks('grunt-macreload');
grunt.loadNpmTasks('grunt-angular-gettext');
grunt.loadNpmTasks('grunt-replace');
// Project Configuration
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
replace: {
dist: {
options: {
patterns: [
{
match: 'INSIGHT_API_PREFIX',
replacement: '<%= pkg.flosightConfig.apiPrefix %>'
}
],
usePrefix: false
},
files: [
{src: ['public/src/templates/api.js'], dest: 'public/src/js/services/api.js'}
]
}
},
concat: {
options: {
process: function(src, filepath) {
@ -123,7 +104,7 @@ module.exports = function(grunt) {
nggettext_compile: {
all: {
options: {
module: 'flosight'
module: 'insight'
},
files: {
'public/src/js/translations.js': ['po/*.po']
@ -136,13 +117,13 @@ module.exports = function(grunt) {
grunt.option('force', true);
//Default task(s).
grunt.registerTask('default', ['replace', 'watch']);
grunt.registerTask('default', ['watch']);
//Update .pot file
grunt.registerTask('translate', ['nggettext_extract']);
//Compile task (concat + minify)
grunt.registerTask('compile', ['replace', 'nggettext_compile', 'concat', 'uglify', 'cssmin']);
grunt.registerTask('compile', ['nggettext_compile', 'concat', 'uglify', 'cssmin']);
};

View File

@ -1,69 +1,51 @@
# Flosight UI
# Insight UI
A Florincoin blockchain explorer web application service for [Flocore Node](https://github.com/bitpay/flocore-node) using the [Flosight API](https://github.com/bitpay/flosight-api).
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).
## Quick Start
Please see the guide at [https://flocore.io/guides/full-node](https://flocore.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 [Flocore](https://github.com/bitpay/flocore).
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).
## Getting Started
To manually install all of the necessary components, you can run these commands:
```bash
npm install -g flocore-node
flocore-node create mynode
npm install -g bitcore-node
bitcore-node create mynode
cd mynode
flocore-node install flosight-api
flocore-node install flosight-ui
flocore-node start
bitcore-node install insight-api
bitcore-node install insight-ui
bitcore-node start
```
Open a web browser to `http://localhost:3001/flosight/`
Open a web browser to `http://localhost:3001/insight/`
## Development
To build Flosight UI locally:
To run Insight UI locally in development mode:
Install bower dependencies:
```
$ npm run build
$ bower install
```
A watch task is also available:
To compile and minify the web application's assets:
```
$ npm run watch
$ grunt compile
```
## Changing routePrefix and apiPrefix
By default, the `flosightConfig` in `package.json` is:
```json
"flosightConfig": {
"apiPrefix": "flosight-api",
"routePrefix": "flosight"
}
```
To change these routes, first make your changes to `package.json`, for example:
```json
"flosightConfig": {
"apiPrefix": "api",
"routePrefix": ""
}
```
Then rebuild the `flosight-ui` service:
There is a convenient Gruntfile.js for automation during editing the code
```
$ npm run build
$ grunt
```
## Multilanguage support
Flosight UI uses [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:
@ -88,11 +70,11 @@ compile***.
## Note
For more details about the [Flosight API](https://github.com/bitpay/flosight-api) configuration and end-points, go to [Flosight API GitHub repository](https://github.com/bitpay/flosight-api).
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 the [Flosight UI GitHub repository](https://github.com/bitpay/flosight-ui).
Contributions and suggestions are welcomed at the [Insight UI GitHub repository](https://github.com/bitpay/insight-ui).
## License

60
bitcore-node/index.js Normal file
View File

@ -0,0 +1,60 @@
'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) {
this.indexFile = this.filterIndexHTML(fs.readFileSync(__dirname + '/../public/index.html', {encoding: 'utf8'}));
setImmediate(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.headers.accept && req.headers.accept.indexOf('text/html') !== -1 &&
req.headers["X-Requested-With"] !== 'XMLHttpRequest'
) {
res.setHeader('Content-Type', 'text/html');
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;

View File

@ -68,7 +68,7 @@ Service.prototype.start = function(done) {
};
/**
* Function to be called when flocore-node is stopped
* Function to be called when bitcore-node is stopped
*/
Service.prototype.stop = function(done) {
setImmediate(done);

View File

@ -1,6 +1,6 @@
{
"name": "Flosight",
"version": "5.0.0-beta.1",
"name": "Insight",
"version": "0.0.1",
"dependencies": {
"angular": "~1.2.13",
"angular-resource": "~1.2.13",

View File

@ -1,61 +0,0 @@
'use strict';
var BaseService = require('./service');
var inherits = require('util').inherits;
var fs = require('fs');
var exec = require('child_process').exec;
var pkg = require('../package.json');
var FlosightUI = function(options) {
BaseService.call(this, options);
this.apiPrefix = options.apiPrefix || 'api';
this.routePrefix = options.routePrefix || '';
};
FlosightUI.dependencies = ['flosight-api'];
inherits(FlosightUI, BaseService);
FlosightUI.prototype.start = function(callback) {
var self = this;
pkg.flosightConfig.apiPrefix = self.apiPrefix;
pkg.flosightConfig.routePrefix = self.routePrefix;
// fs.writeFileSync(__dirname + '/../package.json', JSON.stringify(pkg, null, 2));
// exec('cd ' + __dirname + '/../;' +
// ' npm run install-and-build', function(err) {
// if (err) {
// return callback(err);
// }
// self.indexFile = self.filterIndexHTML(fs.readFileSync(__dirname + '/../public/index-template.html', {encoding: 'utf8'}));
// callback();
// });
self.indexFile = self.filterIndexHTML(fs.readFileSync(__dirname + '/../public/index-template.html', {encoding: 'utf8'}));
callback();
};
FlosightUI.prototype.getRoutePrefix = function() {
return this.routePrefix;
};
FlosightUI.prototype.setupRoutes = function(app, express) {
var self = this;
app.use(express.static(__dirname + '/../public'));
// if not in found, fall back to indexFile (404 is handled client-side)
app.use(function(req, res) {
res.setHeader('Content-Type', 'text/html');
res.send(self.indexFile);
});
};
FlosightUI.prototype.filterIndexHTML = function(data) {
var transformed = data;
if (this.routePrefix !== '') {
transformed = transformed.replace('<base href="/"', '<base href="/' + this.routePrefix + '/"');
}
return transformed;
};
module.exports = FlosightUI;

1499
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,47 +1,57 @@
{
"name": "flosight-ui",
"description": "An open-source frontend for the Flosight API. The Flosight API provides you with a convenient, powerful and simple way to query and broadcast data on the florincoin network and build your own services with it.",
"version": "5.0.0-beta.72",
"repository": "git://github.com/bitpay/flosight-ui.git",
"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.4.0",
"repository": "git://github.com/bitpay/insight-ui.git",
"contributors": [
{
"name": "Matias Alejo Garcia",
"email": "ematiu@gmail.com"
},
{
"name": "Manuel Araoz",
"email": "manuelaraoz@gmail.com"
},
{
"name": "Mario Colque",
"email": "colquemario@gmail.com"
},
{
"name": "Gustavo Cortez",
"email": "cmgustavo83@gmail.com"
},
{
"name": "Juan Ignacio Sosa Lopez",
"email": "bechilandia@gmail.com"
}
],
"bugs": {
"url": "https://github.com/bitpay/flosight-ui/issues"
"url": "https://github.com/bitpay/insight-ui/issues"
},
"homepage": "https://github.com/bitpay/flosight-ui",
"homepage": "https://github.com/bitpay/insight-ui",
"license": "MIT",
"keywords": [
"flosight",
"insight",
"blockchain",
"blockexplorer",
"florincoin",
"flocore",
"bitcoin",
"bitcore",
"front-end"
],
"flocoreNode": "flocore-node",
"flosightConfig": {
"apiPrefix": "api",
"routePrefix": ""
"bitcoreNode": "bitcore-node",
"dependencies": {
},
"scripts": {
"build": "bower install && grunt compile",
"prepublishOnly": "npm run build",
"watch": "grunt",
"install-and-build": "npm install && npm run build",
"test": "mocha test"
},
"dependencies": {},
"devDependencies": {
"mocha": "^2.4.5",
"bower": "~1.8.0",
"bower": "~1.2.8",
"grunt": "~0.4.2",
"grunt-angular-gettext": "^0.2.15",
"grunt-cli": "~0.1.11",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-jshint": "~0.8.0",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-uglify": "~0.3.2",
"grunt-contrib-watch": "*",
"grunt-css": "~0.5.4",
"grunt-macreload": "*",
"grunt-css": "~0.5.4",
"grunt-markdown": "~0.5.0",
"grunt-replace": "^1.0.1"
"grunt-angular-gettext": "^0.2.15"
}
}

View File

@ -1,6 +1,6 @@
msgid ""
msgstr ""
"Project-Id-Version: Flosight\n"
"Project-Id-Version: Insight\n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: Sascha Dückers <s.dueckers@gmail.com>\n"
@ -22,35 +22,35 @@ msgstr "404 Seite nicht gefunden :("
#: public/views/index.html
msgid ""
"<strong>flosight</strong> is an <a href=\"http://flocha.in/\" target="
"\"_blank\">open-source Flo blockchain explorer</a> with complete REST "
"<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 Flod RPC. "
"Check out the <a href=\"https://github.com/oipwg/flosight-ui\" target=\"_blank"
"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>."
msgstr ""
"<strong>flosight</strong> ist ein <a href=\"http://flocha.in/\" target="
"\"_blank\">Open Source Flo Blockchain Explorer</a> mit vollständigen "
"<strong>insight</strong> ist ein <a href=\"http://live.insight.is/\" target="
"\"_blank\">Open Source Bitcoin Blockchain Explorer</a> mit vollständigen "
"REST und Websocket APIs um eigene Wallets oder Applikationen zu "
"implementieren. Hierbei werden fortschrittlichere Abfragen der Blockchain "
"ermöglicht, bei denen die RPC des Flod nicht mehr ausreichen. Der "
"aktuelle <a href=\"https://github.com/oipwg/flosight-ui\" target=\"_blank"
"ermöglicht, bei denen die RPC des Bitcoind nicht mehr ausreichen. Der "
"aktuelle <a href=\"https://github.com/bitpay/insight-ui\" target=\"_blank"
"\">Quellcode</a> ist auf Github zu finden."
#: public/views/index.html
msgid ""
"<strong>flosight</strong> is still in development, so be sure to report any "
"<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/oipwg/flosight-ui/issues\" target=\"_blank\">github issue tracker</a>."
"com/bitpay/insight/issues\" target=\"_blank\">github issue tracker</a>."
msgstr ""
"<strong>flosight</strong> befindet sich aktuell noch in der Entwicklung. "
"<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/oipwg/flosight-ui/issues"
"Verbesserung an unseren <a href=\"https://github.com/bitpay/insight-ui/issues"
"\" target=\"_blank\">Github Issue Tracker</a>."
#: public/views/index.html
msgid "About"
msgstr "Über flosight"
msgstr "Über insight"
#: public/views/address.html
msgid "Address"
@ -69,8 +69,8 @@ msgid "Best Block"
msgstr "Bester Block"
#: public/views/status.html
msgid "Flo node information"
msgstr "Flo-Node Info"
msgid "Bitcoin node information"
msgstr "Bitcoin-Node Info"
#: public/views/block.html
msgid "Block"
@ -91,17 +91,17 @@ msgstr "Serialisierte Bytes"
#: public/views/includes/connection.html
msgid ""
"Can't connect to flod to get live updates from the p2p network. (Tried "
"connecting to flod at {{host}}:{{port}} and failed.)"
"Can't connect to bitcoind to get live updates from the p2p network. (Tried "
"connecting to bitcoind at {{host}}:{{port}} and failed.)"
msgstr ""
"Es ist nicht möglich mit Flod zu verbinden um live Aktualisierungen vom "
"P2P Netzwerk zu erhalten. (Verbindungsversuch zu flod an {{host}}:"
"Es ist nicht möglich mit Bitcoind zu verbinden um live Aktualisierungen vom "
"P2P Netzwerk zu erhalten. (Verbindungsversuch zu bitcoind an {{host}}:"
"{{port}} ist fehlgeschlagen.)"
#: public/views/includes/connection.html
msgid "Can't connect to flosight server. Attempting to reconnect..."
msgid "Can't connect to insight server. Attempting to reconnect..."
msgstr ""
"Keine Verbindung zum flosight-Server möglich. Es wird versucht die "
"Keine Verbindung zum insight-Server möglich. Es wird versucht die "
"Verbindung neu aufzubauen..."
#: public/views/includes/connection.html
@ -125,8 +125,8 @@ msgid "Connections to other nodes"
msgstr "Verbindungen zu Nodes"
#: public/views/status.html
msgid "Current Blockchain Tip (flosight)"
msgstr "Aktueller Blockchain Tip (flosight)"
msgid "Current Blockchain Tip (insight)"
msgstr "Aktueller Blockchain Tip (insight)"
#: public/views/status.html
msgid "Current Sync Status"
@ -199,8 +199,8 @@ msgid "Last Block"
msgstr "Letzter Block"
#: public/views/status.html
msgid "Last Block Hash (Flod)"
msgstr "Letzter Hash (Flod)"
msgid "Last Block Hash (Bitcoind)"
msgstr "Letzter Hash (Bitcoind)"
#: public/views/index.html
msgid "Latest Blocks"

View File

@ -1,6 +1,6 @@
msgid ""
msgstr ""
"Project-Id-Version: Flosight\n"
"Project-Id-Version: Insight\n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
@ -22,29 +22,29 @@ msgstr "404 Página no encontrada :("
#: public/views/index.html
msgid ""
"<strong>flosight</strong> is an <a href=\"http://flocha.in/\" target="
"\"_blank\">open-source Flo blockchain explorer</a> with complete REST "
"<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 flod RPC. "
"Check out the <a href=\"https://github.com/oipwg/flosight-api\" target=\"_blank"
"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>."
msgstr ""
"<strong>flosight</strong> es un <a href=\"http://flocha.in/\" target="
"\"_blank\">explorador de bloques de Flo open-source</a> con un completo "
"<strong>insight</strong> es un <a href=\"http://live.insight.is/\" target="
"\"_blank\">explorador de bloques de Bitcoin open-source</a> con un completo "
"conjunto de REST y APIs de websockets que pueden ser usadas para escribir "
"monederos de Flos y otras aplicaciones que requieran consultar un "
"monederos de Bitcoins y otras aplicaciones que requieran consultar un "
"explorador de bloques. Obtén el código en <a href=\"http://github.com/"
"oipwg/flosight-api\" target=\"_blank\">el repositorio abierto de Github</a>."
"bitpay/insight\" target=\"_blank\">el repositorio abierto de Github</a>."
#: public/views/index.html
msgid ""
"<strong>flosight</strong> is still in development, so be sure to report any "
"<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/oipwg/flosight-ui/issues\" target=\"_blank\">github issue tracker</a>."
"com/bitpay/insight/issues\" target=\"_blank\">github issue tracker</a>."
msgstr ""
"<strong>flosight</strong> esta en desarrollo aún, por ello agradecemos que "
"<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/oipwg/flosight-ui/issues\" target=\"_blank\">Github issue "
"\"https://github.com/bitpay/insight-ui/issues\" target=\"_blank\">Github issue "
"tracker</a>."
#: public/views/index.html
@ -68,8 +68,8 @@ msgid "Best Block"
msgstr "Mejor Bloque"
#: public/views/status.html
msgid "Flo node information"
msgstr "Información del nodo Flo"
msgid "Bitcoin node information"
msgstr "Información del nodo Bitcoin"
#: public/views/block.html
msgid "Block"
@ -90,15 +90,15 @@ msgstr "Bytes Serializados"
#: public/views/includes/connection.html
msgid ""
"Can't connect to flod to get live updates from the p2p network. (Tried "
"connecting to flod at {{host}}:{{port}} and failed.)"
"Can't connect to bitcoind to get live updates from the p2p network. (Tried "
"connecting to bitcoind at {{host}}:{{port}} and failed.)"
msgstr ""
"No se pudo conectar a flod para obtener actualizaciones en vivo de la "
"red p2p. (Se intentó conectar a flod de {{host}}:{{port}} y falló.)"
"No se pudo conectar a bitcoind para obtener actualizaciones en vivo de la "
"red p2p. (Se intentó conectar a bitcoind de {{host}}:{{port}} y falló.)"
#: public/views/includes/connection.html
msgid "Can't connect to flosight server. Attempting to reconnect..."
msgstr "No se pudo conectar al servidor flosight. Intentando re-conectar..."
msgid "Can't connect to insight server. Attempting to reconnect..."
msgstr "No se pudo conectar al servidor insight. Intentando re-conectar..."
#: public/views/includes/connection.html
msgid "Can't connect to internet. Please, check your connection."
@ -121,8 +121,8 @@ msgid "Connections to other nodes"
msgstr "Conexiones a otros nodos"
#: public/views/status.html
msgid "Current Blockchain Tip (flosight)"
msgstr "Actual Blockchain Tip (flosight)"
msgid "Current Blockchain Tip (insight)"
msgstr "Actual Blockchain Tip (insight)"
#: public/views/status.html
msgid "Current Sync Status"
@ -195,8 +195,8 @@ msgid "Last Block"
msgstr "Último Bloque"
#: public/views/status.html
msgid "Last Block Hash (Flod)"
msgstr "Último Bloque Hash (Flod)"
msgid "Last Block Hash (Bitcoind)"
msgstr "Último Bloque Hash (Bitcoind)"
#: public/views/index.html
msgid "Latest Blocks"

View File

@ -21,28 +21,28 @@ msgstr "404 ページがみつかりません (´・ω・`)"
#: public/views/index.html
msgid ""
"<strong>flosight</strong> is an <a href=\"http://flocha.in/\" target="
"\"_blank\">open-source Flo blockchain explorer</a> with complete REST "
"<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 flod RPC. "
"Check out the <a href=\"https://github.com/bitpay/flosight-api\" target=\"_blank"
"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>."
msgstr ""
"<strong>flosight</strong>は、flod RPCの提供するものよりも詳細なブロック"
"<strong>insight</strong>は、bitcoind RPCの提供するものよりも詳細なブロック"
"チェインへの問い合わせを必要とするウェブウォレットやその他のアプリを書くのに"
"使える、完全なRESTおよびwebsocket APIを備えた<a href=\"http://flocha.in"
"/\" target=\"_blank\">オープンソースのビットコインブロックエクスプローラ</"
"a>です。<a href=\"https://github.com/bitpay/flosight-api\" target=\"_blank\">ソース"
"使える、完全なRESTおよびwebsocket APIを備えた<a href=\"http://live.insight."
"is/\" target=\"_blank\">オープンソースのビットコインブロックエクスプローラ</"
"a>です。<a href=\"https://github.com/bitpay/insight-ui\" target=\"_blank\">ソース"
"コード</a>を確認"
#: public/views/index.html
msgid ""
"<strong>flosight</strong> is still in development, so be sure to report any "
"<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/oipwg/flosight-ui/issues\" target=\"_blank\">github issue tracker</a>."
"com/bitpay/insight/issues\" target=\"_blank\">github issue tracker</a>."
msgstr ""
"<strong>flosight</strong>は現在開発中です。<a href=\"https://github.com/"
"oipwg/flosight-ui/issues\" target=\"_blank\">githubのissueトラッカ</a>にてバグの"
"<strong>insight</strong>は現在開発中です。<a href=\"https://github.com/"
"bitpay/insight/issues\" target=\"_blank\">githubのissueトラッカ</a>にてバグの"
"報告や改善案の提案をお願いします。"
#: public/views/index.html
@ -74,12 +74,12 @@ msgid "Best Block"
msgstr "最良ブロック"
#: public/views/messages_verify.html
msgid "Flo comes with a way of signing arbitrary messages."
msgstr "Floには任意のメッセージを署名する昨日が備わっています。"
msgid "Bitcoin comes with a way of signing arbitrary messages."
msgstr "Bitcoinには任意のメッセージを署名する昨日が備わっています。"
#: public/views/status.html
msgid "Flo node information"
msgstr "Floノード情報"
msgid "Bitcoin node information"
msgstr "Bitcoinノード情報"
#: public/views/block.html
msgid "Block"
@ -104,15 +104,15 @@ msgstr "シリアライズ後の容量 (バイト)"
#: public/views/includes/connection.html
msgid ""
"Can't connect to flod to get live updates from the p2p network. (Tried "
"connecting to flod at {{host}}:{{port}} and failed.)"
"Can't connect to bitcoind to get live updates from the p2p network. (Tried "
"connecting to bitcoind at {{host}}:{{port}} and failed.)"
msgstr ""
"P2Pネットワークからライブ情報を取得するためにflodへ接続することができませ"
"P2Pネットワークからライブ情報を取得するためにbitcoindへ接続することができませ"
"んでした。({{host}}:{{port}} への接続を試みましたが、失敗しました。)"
#: public/views/includes/connection.html
msgid "Can't connect to flosight server. Attempting to reconnect..."
msgstr "flosight サーバに接続できません。再接続しています..."
msgid "Can't connect to insight server. Attempting to reconnect..."
msgstr "insight サーバに接続できません。再接続しています..."
#: public/views/includes/connection.html
msgid "Can't connect to internet. Please, check your connection."
@ -135,8 +135,8 @@ msgid "Connections to other nodes"
msgstr "他ノードへの接続"
#: public/views/status.html
msgid "Current Blockchain Tip (flosight)"
msgstr "現在のブロックチェインのTip (flosight)"
msgid "Current Blockchain Tip (insight)"
msgstr "現在のブロックチェインのTip (insight)"
#: public/views/status.html
msgid "Current Sync Status"
@ -213,8 +213,8 @@ msgid "Last Block"
msgstr "直前のブロック"
#: public/views/status.html
msgid "Last Block Hash (Flod)"
msgstr "直前のブロックのハッシュ値 (Flod)"
msgid "Last Block Hash (Bitcoind)"
msgstr "直前のブロックのハッシュ値 (Bitcoind)"
#: public/views/index.html
msgid "Latest Blocks"
@ -426,17 +426,17 @@ msgstr "このアドレスに対するトランザクションはありません
#: public/views/transaction_sendraw.html
msgid ""
"This form can be used to broadcast a raw transaction in hex format over\n"
" the Flo network."
" the Bitcoin network."
msgstr ""
"このフォームでは、16進数フォーマットの生のトランザクションをFloネットワー"
"このフォームでは、16進数フォーマットの生のトランザクションをBitcoinネットワー"
"ク上に配信することができます。"
#: public/views/messages_verify.html
msgid ""
"This form can be used to verify that a message comes from\n"
" a specific Flo address."
" a specific Bitcoin address."
msgstr ""
"このフォームでは、メッセージが特定のFloアドレスから来たかどうかを検証する"
"このフォームでは、メッセージが特定のBitcoinアドレスから来たかどうかを検証する"
"ことができます。"
#: public/views/status.html
@ -453,7 +453,7 @@ msgstr "今日"
#: public/views/status.html
msgid "Total Amount"
msgstr "Flo総量"
msgstr "Bitcoin総量"
#: public/views/address.html
msgid "Total Received"

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -1,14 +1,14 @@
<!doctype html>
<html lang="en" data-ng-app="flosight" data-ng-csp>
<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">
<meta name="fragment" content="!">
<title data-ng-bind="$root.title + $root.titleDetail + ' | Flosight'">Flosight</title>
<meta name="keywords" content="flo, transactions, blocks, address, block chain, best block, mining difficulty, hash serialized">
<meta name="description" content="Flo Chain Explorer. View detailed information on all Flo transactions and blocks.">
<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="stylesheet" href="https://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700,400italic">
<link rel="stylesheet" href="css/main.min.css">
@ -63,32 +63,13 @@
<a href="tx/send" translate>broadcast transaction</a>
]
</div>
<a class="flosight m10v pull-right" target="_blank" href="http://flosight.is">flosight <small>API v{{version}}</small></a>
<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/clipboard.min.js"></script>
<script src="js/main.min.js"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-119772748-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-119772748-2');
</script>
<script>
var observer = new window.MutationObserver(function(mutations, observer) {
var clipboard = new ClipboardJS('.btn-copy');
});
observer.observe(document, {
subtree: true,
attributes: true
})
</script>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -24,7 +24,7 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
/* Styling for the ngProgress itself */
#ngProgress {
background-color: #306d8e !important;
background-color: #6C9032 !important;
box-shadow: none !important;
color: #373D42 !important;
height: 3px !important;
@ -103,7 +103,7 @@ margin-left: 0;
}
.table-hover>tbody>tr:hover>td, .table-hover>tbody>tr:hover>th {
background-color: #e8f6ff;
background-color: #F0F7E2;
}
.navbar { min-height: 64px; }
.navbar-default .navbar-toggle {
@ -115,7 +115,7 @@ margin-left: 0;
.navbar-default .navbar-toggle:hover, .navbar-default .navbar-toggle:focus {background-color: #373D42;}
.navbar-default {
background-color: #3d7c9f;
background-color: #8DC429;
margin: 0;
border: 0;
}
@ -128,7 +128,7 @@ margin-left: 0;
}
.navbar-default .navbar-nav>.active>a, .navbar-default .navbar-nav>.active>a:focus {
background-color: #406072;
background-color: #6C9032;
color: #fff;
}
@ -148,7 +148,7 @@ margin-left: 0;
cursor: pointer;
}
.flosight {
.insight {
font-family: 'Ubuntu', sans-serif;
font-size: 34px;
font-style: italic;
@ -166,7 +166,7 @@ margin-left: 0;
}
.navbar-form .form-control {
background-color: #376177;
background-color: #7CAD23;
border-radius: 3px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
@ -201,14 +201,14 @@ margin-left: 0;
#search { color: #fff; }
#search::-webkit-input-placeholder {
color: #87bfdd;
color: #BCDF7E;
font-family: 'Ubuntu', sans-serif;
font-style: italic;
font-weight: 100;
}
#search::-moz-placeholder {
color: #87bfdd;
color: #BCDF7E;
font-family: 'Ubuntu', sans-serif;
font-weight: 100;
}
@ -216,7 +216,7 @@ margin-left: 0;
.status {
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
background-color: #376177;
background-color: #597338;
border-radius: 3px;
margin: 15px 0;
padding: 8px 10px;
@ -316,8 +316,8 @@ margin-left: 0;
border-radius: 2px;
}
.btn-primary {
background-color: #218bc4;
border: 2px solid #0b71a8;
background-color: #8DC429;
border: 2px solid #76AF0F;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active,
@ -363,7 +363,7 @@ margin-left: 0;
}
.txvalues-primary {
background-color: #2587bc;
background-color: #8DC429;
}
.txvalues-default {
@ -386,7 +386,7 @@ margin-left: 0;
font-size: 14px;
font-weight: normal;
}
.progress-bar-info { background-color: #2587bc; }
.progress-bar-info { background-color: #8DC429; }
/* Set the fixed height of the footer here */
#footer {
@ -396,17 +396,17 @@ margin-left: 0;
overflow: hidden;
}
#footer a.flosight {
#footer a.insight {
font-size: 20px;
text-decoration: none;
color: #fff;
}
#footer a.flosight:hover {
#footer a.insight:hover {
color: #fffffe;
}
#footer a.flosight small { font-size: 11px; }
#footer a.insight small { font-size: 11px; }
.line-footer { border-top: 2px dashed #ccc; }
#footer .links {
@ -535,7 +535,6 @@ margin-left: 0;
width: 16px;
outline: none;
vertical-align: sub;
border: none !important;
}
.btn-expand {
@ -614,7 +613,7 @@ margin-left: 0;
float: left;
height: 45px;
}
#powered a.flocore {
#powered a.bitcore {
background-image: url('../img/logo.svg');
background-size: 80px;
width: 30%;
@ -754,7 +753,7 @@ a.v_highlight_more {
h3 {
font-size: 18px;
}
.flosight {
.insight {
font-size: 30px;
}
.navbar-default .navbar-nav>li>a {
@ -788,7 +787,7 @@ a.v_highlight_more {
.navbar-default .navbar-brand {
padding: 15px;
}
.flosight {
.insight {
font-size: 26px;
}
.navbar-nav>li>a {

View File

@ -1,9 +1,9 @@
'use strict';
var defaultLanguage = localStorage.getItem('flosight-language') || 'en';
var defaultCurrency = localStorage.getItem('flosight-currency') || 'FLO';
var defaultLanguage = localStorage.getItem('insight-language') || 'en';
var defaultCurrency = localStorage.getItem('insight-currency') || 'BTC';
angular.module('flosight',[
angular.module('insight',[
'ngAnimate',
'ngResource',
'ngRoute',
@ -13,27 +13,25 @@ angular.module('flosight',[
'monospaced.qrcode',
'gettext',
'angularMoment',
'flosight.system',
'flosight.socket',
'flosight.api',
'flosight.blocks',
'flosight.transactions',
'flosight.address',
'flosight.search',
'flosight.status',
'flosight.connection',
'flosight.currency',
'flosight.messages'
'insight.system',
'insight.socket',
'insight.blocks',
'insight.transactions',
'insight.address',
'insight.search',
'insight.status',
'insight.connection',
'insight.currency',
'insight.messages'
]);
angular.module('flosight.system', []);
angular.module('flosight.socket', []);
angular.module('flosight.api', []);
angular.module('flosight.blocks', []);
angular.module('flosight.transactions', []);
angular.module('flosight.address', []);
angular.module('flosight.search', []);
angular.module('flosight.status', []);
angular.module('flosight.connection', []);
angular.module('flosight.currency', []);
angular.module('flosight.messages', []);
angular.module('insight.system', []);
angular.module('insight.socket', []);
angular.module('insight.blocks', []);
angular.module('insight.transactions', []);
angular.module('insight.address', []);
angular.module('insight.search', []);
angular.module('insight.status', []);
angular.module('insight.connection', []);
angular.module('insight.currency', []);
angular.module('insight.messages', []);

View File

@ -1,11 +1,11 @@
'use strict';
//Setting up route
angular.module('flosight').config(function($routeProvider) {
angular.module('insight').config(function($routeProvider) {
$routeProvider.
when('/block/:blockHash', {
templateUrl: 'views/block.html',
title: 'Flo Block '
title: 'Bitcoin Block '
}).
when('/block-index/:blockHeight', {
controller: 'BlocksController',
@ -17,7 +17,7 @@ angular.module('flosight').config(function($routeProvider) {
}).
when('/tx/:txId/:v_type?/:v_index?', {
templateUrl: 'views/transaction.html',
title: 'Flo Transaction '
title: 'Bitcoin Transaction '
}).
when('/', {
templateUrl: 'views/index.html',
@ -25,15 +25,15 @@ angular.module('flosight').config(function($routeProvider) {
}).
when('/blocks', {
templateUrl: 'views/block_list.html',
title: 'Flo Blocks solved Today'
title: 'Bitcoin Blocks solved Today'
}).
when('/blocks-date/:blockDate/:startTimestamp?', {
templateUrl: 'views/block_list.html',
title: 'Flo Blocks solved '
title: 'Bitcoin Blocks solved '
}).
when('/address/:addrStr', {
templateUrl: 'views/address.html',
title: 'Flo Address '
title: 'Bitcoin Address '
}).
when('/status', {
templateUrl: 'views/status.html',
@ -50,7 +50,7 @@ angular.module('flosight').config(function($routeProvider) {
});
//Setting HTML5 Location Mode
angular.module('flosight')
angular.module('insight')
.config(function($locationProvider) {
$locationProvider.html5Mode(true);
$locationProvider.hashPrefix('!');

View File

@ -1,6 +1,6 @@
'use strict';
angular.module('flosight.address').controller('AddressController',
angular.module('insight.address').controller('AddressController',
function($scope, $rootScope, $routeParams, $location, Global, Address, getSocket) {
$scope.global = Global;
@ -8,7 +8,7 @@ angular.module('flosight.address').controller('AddressController',
var addrStr = $routeParams.addrStr;
var _startSocket = function() {
socket.on('florincoind/addresstxid', function(data) {
socket.on('bitcoind/addresstxid', function(data) {
if (data.address === addrStr) {
$rootScope.$broadcast('tx', data.txid);
var base = document.querySelector('base');
@ -16,11 +16,11 @@ angular.module('flosight.address').controller('AddressController',
beep.play();
}
});
socket.emit('subscribe', 'florincoind/addresstxid', [addrStr]);
socket.emit('subscribe', 'bitcoind/addresstxid', [addrStr]);
};
var _stopSocket = function () {
socket.emit('unsubscribe', 'florincoind/addresstxid', [addrStr]);
socket.emit('unsubscribe', 'bitcoind/addresstxid', [addrStr]);
};
socket.on('connect', function() {

View File

@ -1,6 +1,6 @@
'use strict';
angular.module('flosight.blocks').controller('BlocksController',
angular.module('insight.blocks').controller('BlocksController',
function($scope, $rootScope, $routeParams, $location, Global, Block, Blocks, BlockByHeight) {
$scope.global = Global;
$scope.loading = false;

View File

@ -1,6 +1,6 @@
'use strict';
angular.module('flosight.connection').controller('ConnectionController',
angular.module('insight.connection').controller('ConnectionController',
function($scope, $window, Status, getSocket, PeerSync) {
// Set initial values

View File

@ -1,6 +1,6 @@
'use strict';
angular.module('flosight.currency').controller('CurrencyController',
angular.module('insight.currency').controller('CurrencyController',
function($scope, $rootScope, Currency) {
$rootScope.currency.symbol = defaultCurrency;
@ -19,29 +19,16 @@ angular.module('flosight.currency').controller('CurrencyController',
var response;
if (this.symbol === 'USD') {
var USDValue = value * this.factor;
response = USDValue.toFixed(2)
if (parseFloat(response) === 0)
response = USDValue.toFixed(4)
if (parseFloat(response) === 0)
response = USDValue.toFixed(6)
if (parseFloat(response) === 0)
response = USDValue.toFixed(8)
if (parseFloat(response) === 0)
response = 0;
} else if (this.symbol === 'mFLO') {
response = _roundFloat((value * this.factor), 2);
} else if (this.symbol === 'mBTC') {
this.factor = 1000;
response = _roundFloat((value * this.factor), 5);
} else if (this.symbol === 'bits') {
this.factor = 1000000;
response = _roundFloat((value * this.factor), 2);
} else { // assumes symbol is BTC
} else {
this.factor = 1;
response = _roundFloat((value * this.factor), 8);
response = value;
}
// prevent sci notation
if (response < 1e-7) response=response.toFixed(8);
@ -54,13 +41,13 @@ angular.module('flosight.currency').controller('CurrencyController',
$scope.setCurrency = function(currency) {
$rootScope.currency.symbol = currency;
localStorage.setItem('flosight-currency', currency);
localStorage.setItem('insight-currency', currency);
if (currency === 'USD') {
Currency.get({}, function(res) {
$rootScope.currency.factor = $rootScope.currency.bitstamp = res.data.bitstamp;
});
} else if (currency === 'mFLO') {
} else if (currency === 'mBTC') {
$rootScope.currency.factor = 1000;
} else if (currency === 'bits') {
$rootScope.currency.factor = 1000000;

View File

@ -1,6 +1,6 @@
'use strict';
angular.module('flosight.system').controller('FooterController',
angular.module('insight.system').controller('FooterController',
function($scope, $route, $templateCache, gettextCatalog, amMoment, Version) {
$scope.defaultLanguage = defaultLanguage;
@ -31,7 +31,7 @@ angular.module('flosight.system').controller('FooterController',
$scope.setLanguage = function(isoCode) {
gettextCatalog.currentLanguage = $scope.defaultLanguage = defaultLanguage = isoCode;
amMoment.changeLocale(isoCode);
localStorage.setItem('flosight-language', isoCode);
localStorage.setItem('insight-language', isoCode);
var currentPageTemplate = $route.current.templateUrl;
$templateCache.remove(currentPageTemplate);
$route.reload();

View File

@ -1,13 +1,13 @@
'use strict';
angular.module('flosight.system').controller('HeaderController',
function($scope, $rootScope, $modal, getSocket, Global, Block, Status) {
angular.module('insight.system').controller('HeaderController',
function($scope, $rootScope, $modal, getSocket, Global, Block) {
$scope.global = Global;
$rootScope.currency = {
factor: 1,
bitstamp: 0,
symbol: 'FLO'
symbol: 'BTC'
};
$scope.menu = [{
@ -25,19 +25,6 @@ angular.module('flosight.system').controller('HeaderController',
});
};
$scope.getStatus = function(q) {
Status.get({
q: 'get' + q
},
function(d) {
$scope.loaded = 1;
angular.extend($scope, d);
},
function(e) {
$scope.error = 'API ERROR: ' + e.data;
});
};
var _getBlock = function(hash) {
Block.get({
blockHash: hash

View File

@ -3,29 +3,16 @@
var TRANSACTION_DISPLAYED = 10;
var BLOCKS_DISPLAYED = 5;
angular.module('flosight.system').controller('IndexController',
angular.module('insight.system').controller('IndexController',
function($scope, Global, getSocket, Blocks) {
$scope.global = Global;
var _getBlocks = function(loadTxs) {
var _getBlocks = function() {
Blocks.get({
limit: BLOCKS_DISPLAYED
}, function(res) {
$scope.blocks = res.blocks;
$scope.blocksLength = res.length;
if (loadTxs) {
TransactionsByBlock.get({
block: res.blocks[0].hash
}, function(txs){
for (var i = txs.length; i > 0; i--){
$scope.txs.unshift(txs[i]);
if (parseInt($scope.txs.length, 10) >= parseInt(TRANSACTION_DISPLAYED, 10)) {
$scope.txs = $scope.txs.splice(0, TRANSACTION_DISPLAYED);
}
}
})
}
});
};
@ -41,7 +28,7 @@ angular.module('flosight.system').controller('IndexController',
});
socket.on('block', function() {
_getBlocks(false);
_getBlocks();
});
};
@ -49,13 +36,15 @@ angular.module('flosight.system').controller('IndexController',
_startSocket();
});
$scope.humanSince = function(time) {
var m = moment.unix(time);
return m.max().fromNow();
};
$scope.index = function() {
_getBlocks(true);
_getBlocks();
_startSocket();
};

View File

@ -1,7 +1,7 @@
'use strict';
angular.module('flosight.messages').controller('VerifyMessageController',
function($scope, $http, Api) {
angular.module('insight.messages').controller('VerifyMessageController',
function($scope, $http) {
$scope.message = {
address: '',
signature: '',
@ -22,7 +22,7 @@ angular.module('flosight.messages').controller('VerifyMessageController',
$scope.verify = function() {
$scope.verification.status = 'loading';
$scope.verification.address = $scope.message.address;
$http.post(Api.apiPrefix + '/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

View File

@ -1,6 +1,6 @@
'use strict';
angular.module('flosight.system').controller('ScannerController',
angular.module('insight.system').controller('ScannerController',
function($scope, $rootScope, $modalInstance, Global) {
$scope.global = Global;
@ -112,7 +112,7 @@ angular.module('flosight.system').controller('ScannerController',
qrcode.callback = function(data) {
_scanStop();
var str = (data.indexOf('flo:') === 0) ? data.substring(8) : data;
var str = (data.indexOf('bitcoin:') === 0) ? data.substring(8) : data;
console.log('QR code detected: ' + str);
$searchInput
.val(str)

View File

@ -1,6 +1,6 @@
'use strict';
angular.module('flosight.search').controller('SearchController',
angular.module('insight.search').controller('SearchController',
function($scope, $routeParams, $location, $timeout, Global, Block, Transaction, Address, BlockByHeight) {
$scope.global = Global;
$scope.loading = false;

View File

@ -1,6 +1,6 @@
'use strict';
angular.module('flosight.status').controller('StatusController',
angular.module('insight.status').controller('StatusController',
function($scope, $routeParams, $location, Global, Status, Sync, getSocket) {
$scope.global = Global;

View File

@ -1,6 +1,6 @@
'use strict';
angular.module('flosight.transactions').controller('transactionsController',
angular.module('insight.transactions').controller('transactionsController',
function($scope, $rootScope, $routeParams, $location, Global, Transaction, TransactionsByBlock, TransactionsByAddress) {
$scope.global = Global;
$scope.loading = false;
@ -174,8 +174,8 @@ function($scope, $rootScope, $routeParams, $location, Global, Transaction, Trans
});
angular.module('flosight.transactions').controller('SendRawTransactionController',
function($scope, $http, Api) {
angular.module('insight.transactions').controller('SendRawTransactionController',
function($scope, $http) {
$scope.transaction = '';
$scope.status = 'ready'; // ready|loading|sent|error
$scope.txid = '';
@ -189,7 +189,7 @@ angular.module('flosight.transactions').controller('SendRawTransactionController
rawtx: $scope.transaction
};
$scope.status = 'loading';
$http.post(Api.apiPrefix + '/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

View File

@ -2,7 +2,7 @@
var ZeroClipboard = window.ZeroClipboard;
angular.module('flosight')
angular.module('insight')
.directive('scroll', function ($window) {
return function(scope, element, attrs) {
angular.element($window).bind('scroll', function() {
@ -40,31 +40,36 @@ angular.module('flosight')
}
};
})
.directive('dataClipboardText', function() {
.directive('clipCopy', function() {
ZeroClipboard.config({
moviePath: '/lib/zeroclipboard/ZeroClipboard.swf',
trustedDomains: ['*'],
allowScriptAccess: 'always',
forceHandCursor: true
});
return {
restric: 'A',
scope: { dataClipboardText: '=dataClipboardText' },
scope: { clipCopy: '=clipCopy' },
template: '<div class="tooltip fade right in"><div class="tooltip-arrow"></div><div class="tooltip-inner">Copied!</div></div>',
link: function(scope, elm) {
var clip = new ClipboardJS(elm, {
text: scope.dataClipboardText
var clip = new ZeroClipboard(elm);
clip.on('load', function(client) {
var onMousedown = function(client) {
client.setText(scope.clipCopy);
};
client.on('mousedown', onMousedown);
scope.$on('$destroy', function() {
client.off('mousedown', onMousedown);
});
});
// clip.on('load', function(client) {
// var onMousedown = function(client) {
// client.setText(scope.clipCopy);
// };
// client.on('mousedown', onMousedown);
// scope.$on('$destroy', function() {
// client.off('mousedown', onMousedown);
// });
// });
// clip.on('noFlash wrongflash', function() {
// return elm.remove();
// });
clip.on('noFlash wrongflash', function() {
return elm.remove();
});
}
};
})

View File

@ -1,6 +1,6 @@
'use strict';
angular.module('flosight')
angular.module('insight')
.filter('startFrom', function() {
return function(input, start) {
start = +start; //parse to int

View File

@ -2,5 +2,5 @@
angular.element(document).ready(function() {
// Init the app
// angular.bootstrap(document, ['flosight']);
// angular.bootstrap(document, ['insight']);
});

View File

@ -1,8 +1,8 @@
'use strict';
angular.module('flosight.address').factory('Address',
function($resource, Api) {
return $resource(Api.apiPrefix + '/addr/:addrStr/?noTxList=1', {
angular.module('insight.address').factory('Address',
function($resource) {
return $resource(window.apiPrefix + '/addr/:addrStr/?noTxList=1', {
addrStr: '@addStr'
}, {
get: {

View File

@ -1,9 +0,0 @@
'use strict';
angular.module('flosight.api')
.factory('Api',
function() {
return {
apiPrefix: '/api'
}
});

View File

@ -1,9 +1,9 @@
'use strict';
angular.module('flosight.blocks')
angular.module('insight.blocks')
.factory('Block',
function($resource, Api) {
return $resource(Api.apiPrefix + '/block/:blockHash', {
function($resource) {
return $resource(window.apiPrefix + '/block/:blockHash', {
blockHash: '@blockHash'
}, {
get: {
@ -22,10 +22,10 @@ angular.module('flosight.blocks')
});
})
.factory('Blocks',
function($resource, Api) {
return $resource(Api.apiPrefix + '/blocks');
function($resource) {
return $resource(window.apiPrefix + '/blocks');
})
.factory('BlockByHeight',
function($resource, Api) {
return $resource(Api.apiPrefix + '/block-index/:blockHeight');
function($resource) {
return $resource(window.apiPrefix + '/block-index/:blockHeight');
});

View File

@ -1,6 +1,6 @@
'use strict';
angular.module('flosight.currency').factory('Currency',
function($resource, Api) {
return $resource(Api.apiPrefix + '/currency');
angular.module('insight.currency').factory('Currency',
function($resource) {
return $resource(window.apiPrefix + '/currency');
});

View File

@ -1,12 +1,12 @@
'use strict';
//Global service for global variables
angular.module('flosight.system')
angular.module('insight.system')
.factory('Global',[
function() {
}
])
.factory('Version',
function($resource, Api) {
return $resource(Api.apiPrefix + '/version');
function($resource) {
return $resource(window.apiPrefix + '/version');
});

View File

@ -53,7 +53,7 @@ ScopedSocket.prototype.emit = function(event, data, callback) {
socket.emit.apply(socket, args);
};
angular.module('flosight.socket').factory('getSocket',
angular.module('insight.socket').factory('getSocket',
function($rootScope) {
var socket = io.connect(null, {
'reconnect': true,

View File

@ -1,17 +1,17 @@
'use strict';
angular.module('flosight.status')
angular.module('insight.status')
.factory('Status',
function($resource, Api) {
return $resource(Api.apiPrefix + '/status', {
function($resource) {
return $resource(window.apiPrefix + '/status', {
q: '@q'
});
})
.factory('Sync',
function($resource, Api) {
return $resource(Api.apiPrefix + '/sync');
function($resource) {
return $resource(window.apiPrefix + '/sync');
})
.factory('PeerSync',
function($resource, Api) {
return $resource(Api.apiPrefix + '/peer');
function($resource) {
return $resource(window.apiPrefix + '/peer');
});

View File

@ -1,9 +1,9 @@
'use strict';
angular.module('flosight.transactions')
angular.module('insight.transactions')
.factory('Transaction',
function($resource, Api) {
return $resource(Api.apiPrefix + '/tx/:txId', {
function($resource) {
return $resource(window.apiPrefix + '/tx/:txId', {
txId: '@txId'
}, {
get: {
@ -22,18 +22,18 @@ angular.module('flosight.transactions')
});
})
.factory('TransactionsByBlock',
function($resource, Api) {
return $resource(Api.apiPrefix + '/txs', {
function($resource) {
return $resource(window.apiPrefix + '/txs', {
block: '@block'
});
})
.factory('TransactionsByAddress',
function($resource, Api) {
return $resource(Api.apiPrefix + '/txs', {
function($resource) {
return $resource(window.apiPrefix + '/txs', {
address: '@address'
});
})
.factory('Transactions',
function($resource, Api) {
return $resource(Api.apiPrefix + '/txs');
function($resource) {
return $resource(window.apiPrefix + '/txs');
});

File diff suppressed because one or more lines are too long

View File

@ -1,9 +0,0 @@
'use strict';
angular.module('flosight.api')
.factory('Api',
function() {
return {
apiPrefix: '/INSIGHT_API_PREFIX'
}
});

View File

@ -4,7 +4,7 @@
<div class="container" data-ng-if="!hideSNavbar">
<div class="col-md-8 text-left">
<h3 translate>Address</h3> {{address.addrStr}}
<button class="btn-copy" data-clipboard-text="{{address.addrStr}}"></button>
<span class="btn-copy" clip-copy="address.addrStr"></span>
</div>
<div class="col-md-4">
<span class="txvalues txvalues-primary"><strong translate>Final Balance</strong> {{$root.currency.getConvertion(address.balance) || address.balance + ' BTC' }}</span>
@ -25,7 +25,7 @@
<div class="well well-sm ellipsis">
<strong translate>Address</strong>
<span class="text-muted">{{address.addrStr}}</span>
<button class="btn-copy" data-clipboard-text="{{address.addrStr}}"></button>
<span class="btn-copy" clip-copy="address.addrStr"></span>
</div>
<h2 translate>Summary <small>confirmed</small></h2>
<div class="row" data-ng-hide="!address.addrStr">

View File

@ -15,7 +15,7 @@
<strong>Hash</strong> {{block.hash}}
</p>
<div class="col-md-1 text-left">
<button class="btn-copy" data-clipboard-text="{{block.hash}}"></button>
<span class="btn-copy" clip-copy="block.hash"></span>
</div>
</div>
</div>
@ -39,7 +39,7 @@
<div class="well well-sm ellipsis">
<strong>BlockHash</strong>
<span class="txid text-muted">{{block.hash}}</span>
<button class="btn-copy" data-clipboard-text="{{block.hash}}"></button>
<span class="btn-copy" clip-copy="block.hash"></span>
</div>
<h2 translate>Summary</h2>
<div class="row">
@ -75,7 +75,7 @@
<td><strong>Merkle Root</strong></td>
<td class="text-right text-muted">
<div class="ellipsis">
<button class="btn-copy" data-clipboard-text="{{block.merkleroot}}"></button>
<span class="btn-copy" clip-copy="block.merkleroot"></span>
<span>{{block.merkleroot}}</span>
</div>
</td>

View File

@ -7,11 +7,11 @@
<strong translate>Error!</strong>
<p data-ng-show="!apiOnline" translate>
Can't connect to flod to get live updates from the p2p network. (Tried connecting to flod at {{host}}:{{port}} and failed.)
Can't connect to bitcoind to get live updates from the p2p network. (Tried connecting to bitcoind at {{host}}:{{port}} and failed.)
</p>
<p data-ng-show="!serverOnline" translate>
Can't connect to flosight server. Attempting to reconnect...
Can't connect to insight server. Attempting to reconnect...
</p>
<p data-ng-show="!clienteOnline" translate>

View File

@ -6,10 +6,10 @@
<a data-ng-click="setCurrency('USD')" data-ng-class="{active: currency.symbol == 'USD'}">USD</a>
</li>
<li>
<a data-ng-click="setCurrency('FLO')" data-ng-class="{active: currency.symbol == 'FLO'}">FLO</a>
<a data-ng-click="setCurrency('BTC')" data-ng-class="{active: currency.symbol == 'BTC'}">BTC</a>
</li>
<li>
<a data-ng-click="setCurrency('mFLO')" data-ng-class="{active: currency.symbol == 'mFLO'}">mFLO</a>
<a data-ng-click="setCurrency('mBTC')" data-ng-class="{active: currency.symbol == 'mBTC'}">mBTC</a>
</li>
<li>
<a data-ng-click="setCurrency('bits')" data-ng-class="{active: currency.symbol == 'bits'}">bits</a>

View File

@ -7,7 +7,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="flosight navbar-brand" href="." data-ng-init="getStatus('Info')">flosight <sub data-ng-hide="info.network === 'livenet'" style="font-size: 35%">({{info.network}})</sub></a>
<a class="insight navbar-brand" href=".">insight</a>
</div>
<div class="navbar-collapse collapse" collapse="$root.isCollapsed">
<ul class="nav navbar-nav">

View File

@ -44,7 +44,6 @@
<tr>
<th>Hash</th>
<th class="text-right" translate>Value Out</th>
<th class="text-right" translate>floData</th>
</tr>
</thead>
<tbody>
@ -54,7 +53,6 @@
<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>
<td class="text-right"><span class="ellipsis">{{tx.floData}}</span></td>
</tr>
</tbody>
</table>
@ -63,14 +61,14 @@
<div class="col-xs-12 col-md-4 col-gray">
<h2 translate>About</h2>
<p translate><strong>flosight</strong> is an <a href="https://flocha.in/"
target="_blank">open-source Flo 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 flod RPC. Check out the <a href="https://github.com/oipwg/flosight-ui" target="_blank">source code</a>.</p>
<p translate><strong>flosight</strong> is still in development, so be sure to report any bugs and provide feedback for improvement at our <a href="https://github.com/oipwg/flosight-ui/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>
</div>
<a href="http://bitcore.io" target="_blank" class="flocore" title="Bitcore"></a>
<a href="http://bitcore.io" target="_blank" class="bitcore" title="Bitcore"></a>
<a href="http://angularjs.org" target="_blank" class="angularjs" title="AngularJS"></a>
<a href="https://code.google.com/p/leveldb/" target="_blank" class="leveldb" title="LevelDB"></a>
<a href="http://nodejs.org" target="_blank" class="nodejs" title="NodeJs"></a>

View File

@ -70,10 +70,11 @@
</div>
<div class="col-xs-12 col-md-4 col-gray">
<p translate>
Flo comes with a way of signing arbitrary messages.
Bitcoin comes with a way of signing arbitrary messages.
</p>
<p translate>
This form can be used to verify that a message comes from a specific Flo address.
This form can be used to verify that a message comes from
a specific Bitcoin address.
</p>
</div>
</div>

View File

@ -63,11 +63,11 @@
<thead data-ng-include src="'views/includes/infoStatus.html'"></thead>
<tbody>
<tr>
<td translate>Last Block Hash (Flod)</td>
<td translate>Last Block Hash (Bitcoind)</td>
<td class="text-right ellipsis"><a href="block/{{lastblockhash}}">{{lastblockhash}}</a></td>
</tr>
<tr>
<td translate>Current Blockchain Tip (flosight)</td>
<td translate>Current Blockchain Tip (insight)</td>
<td class="text-right ellipsis"><a href="block/{{syncTipHash}}">{{syncTipHash}}</a></td>
</tr>
</tbody>
@ -76,7 +76,7 @@
</div> <!-- END OF COL-8 -->
<div class="col-xs-12 col-md-4 col-gray">
<h2 translate>Flo node information</h2>
<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>
<tbody>

View File

@ -6,7 +6,7 @@
<h3 translate>Transaction</h3>
<div class="ellipsis">
<small>{{tx.txid}}</small>
<button class="btn-copy" data-clipboard-text="{{tx.txid}}"></button>
<span class="btn-copy" clip-copy="tx.txid"></span>
</div>
</div>
<div class="col-md-6 col-lg-5 text-right">
@ -43,7 +43,7 @@
<div class="well well-sm ellipsis">
<strong translate>Transaction</strong>
<span class="txid text-muted">{{tx.txid}}</span>
<button class="btn-copy" data-clipboard-text="{{tx.txid}}"></button>
<span class="btn-copy" clip-copy="tx.txid"></span>
</div>
<h2 translate>Summary</h2>
<table class="table" style="table-layout: fixed">
@ -82,7 +82,7 @@
<td><strong>Coinbase</strong></td>
<td class="text-muted text-right">
<div class="ellipsis">
<button class="btn-copy ng-isolate-scope" data-clipboard-text="{{tx.vin[0].coinbase}}"></button>
<span class="btn-copy ng-isolate-scope" clip-copy="tx.vin[0].coinbase"></span>
<span class="ng-binding">{{tx.vin[0].coinbase}}</span>
</div>
</td>

View File

@ -5,7 +5,7 @@
<span class="glyphicon glyphicon-plus-sign" data-ng-class="{'glyphicon-minus-sign': itemsExpanded}"></span>
</a>
<a href="tx/{{tx.txid}}">{{tx.txid}}</a>
<button class="btn-copy" data-clipboard-text="{{tx.txid}}"></button>
<span class="btn-copy" clip-copy="tx.txid"></span>
</div>
</div>
<div class="col-xs-5 col-md-4 text-right text-muted">
@ -39,7 +39,7 @@
</div>
<div class="ellipsis">
<span data-ng-show="vin.notAddr">{{vin.addr}}</span>
<span class="text-muted" title="Current Flo Address" data-ng-show="vin.addr == $root.currentAddr">{{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>
</div>
<div data-ng-show="vin.unconfirmedInput" class="text-danger"> <span class="glyphicon glyphicon-warning-sign"></span> (Input unconfirmed)</div>
@ -95,7 +95,7 @@
<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>
<button class="btn-copy" data-clipboard-text="{{item}}"></button>
<p class="btn-copy" clip-copy="item"></p>
</div>
</div>
</div>
@ -137,7 +137,7 @@
<div class="ellipsis">
<span data-ng-show="vout.notAddr">{{vout.addr}}</span>
<span class="text-muted" title="Current Flo Address" data-ng-show="address == $root.currentAddr" data-ng-repeat="address in vout.addr.split(',')">{{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>
</div>
</div>
@ -175,7 +175,7 @@
<div class="small">
<p><strong>scriptPubKey</strong></p>
<span class="col-md-11 text-muted ellipsis">{{vout.scriptPubKey.asm}}</span>
<button class="btn-copy col-md-1" data-clipboard-text="{{vout.scriptPubKey.asm}}"></button>
<span class="btn-copy col-md-1" clip-copy="vout.scriptPubKey.asm"></span>
</div>
</div>
</div>
@ -194,27 +194,18 @@
<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>
<button class="btn-copy" data-clipboard-text="{{tx.blockhash}}"></button>
<span class="btn-copy" clip-copy="tx.blockhash"></span>
</div>
<div class="line-top row" data-ng-hide="!tx">
<div class="col-xs-6 col-sm-4 col-md-4">
<span data-ng-show="!tx.isCoinBase && !isNaN(parseFloat(tx.fees))"
class="txvalues txvalues-default"><span translate>Fee</span>: {{$root.currency.getConvertion(tx.fees) || tx.fees + 'FLO'}} </span>
class="txvalues txvalues-default"><span translate>Fee</span>: {{$root.currency.getConvertion(tx.fees) || tx.fees + 'BTC'}} </span>
</div>
<div class="col-xs-6 col-sm-8 col-md-8 text-right">
<span data-ng-show="tx.confirmations" class="txvalues
txvalues-success">{{tx.confirmations}} <span translate>Confirmations</span></span>
<span data-ng-show="!tx.confirmations" class="txvalues txvalues-danger" translate>Unconfirmed Transaction!</span>
<span class="txvalues txvalues-primary">{{$root.currency.getConvertion(tx.valueOut) || tx.valueOut + ' FLO' }}</span>
</div>
</div>
<div class="line-top row" style="margin-top: 15px;" data-ng-hide="tx.floData === ''">
<div class="col-12">
<div class="well well-sm" style="margin: 0px 10px">
<strong>floData: </strong>
<span class="text-muted ng-binding" style="word-break: break-all">{{tx.floData}}</span>
<button class="btn-copy" data-clipboard-text="{{tx.floData}}"></button>
</div>
<span class="txvalues txvalues-primary">{{$root.currency.getConvertion(tx.valueOut) || tx.valueOut + ' BTC' }}</span>
</div>
</div>

View File

@ -47,7 +47,8 @@
</div>
<div class="col-xs-12 col-md-4 col-gray">
<p translate>
This form can be used to broadcast a raw transaction in hex format over the Flo network.
This form can be used to broadcast a raw transaction in hex format over
the Bitcoin network.
</p>
</div>
</div>

View File

@ -1,4 +0,0 @@
describe('should test', function() {
it('test', function() {
});
});