Skip to content

Commit 03dfa88

Browse files
committedJan 12, 2016
Merge pull request #188 from ipfs/0-3-11
Fixes and release of a new version for 0.3.11
2 parents 795a71b + 988a693 commit 03dfa88

31 files changed

+1278
-41
lines changed
 

‎app/scripts/pages/connections.js

+24-22
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react'
22
import ConnectionList from '../views/connectionlist'
33
import Globe from '../views/globe'
4-
// import {lookupPretty as getLocation} from 'ipfs-geoip'
4+
import {lookupPretty as getLocation} from 'ipfs-geoip'
55
import i18n from '../utils/i18n.js'
66
import {Row, Col} from 'react-bootstrap'
77

@@ -38,32 +38,34 @@ export default React.createClass({
3838
peers = peers.sort(function (a, b) {
3939
return a.ID > b.ID ? 1 : -1
4040
})
41-
peers.map(function (peer) {
41+
peers.forEach(function (peer, i) {
4242
peer.ipfs = t.props.ipfs
4343
peer.location = { formatted: '' }
4444

45-
// var location = t.state.locations[peer.ID]
46-
// if (!location) {
47-
// t.state.locations[peer.ID] = {}
48-
// t.props.ipfs.id(peer.ID, function (err, id) {
49-
// if (err) return console.error(err)
45+
var location = t.state.locations[peer.ID]
46+
if (!location) {
47+
t.state.locations[peer.ID] = {}
48+
t.props.ipfs.id(peer.ID, function (err, id) {
49+
if (err) return console.error(err)
5050

51-
// getLocation(t.props.ipfs, id.Addresses, function (err, res) {
52-
// if (err) return console.error(err)
53-
// // If we've unmounted, abort
54-
// if (!t.isMounted()) return
51+
getLocation(t.props.ipfs, id.Addresses, function (err, res) {
52+
if (err) return console.error(err)
53+
// If we've unmounted, abort
54+
if (!t.isMounted()) return
5555

56-
// res = res || {}
57-
// peer.location = res
58-
// t.state.locations[peer.ID] = res
59-
// t.setState({
60-
// peers: peers,
61-
// locations: t.state.locations,
62-
// nonce: t.state.nonce++
63-
// })
64-
// })
65-
// })
66-
// }
56+
res = res || {}
57+
peer.location = res
58+
var locations = t.state.locations
59+
locations[peer.ID] = res
60+
peers[i] = peer
61+
t.setState({
62+
peers: peers,
63+
locations: locations,
64+
nonce: t.state.nonce++
65+
})
66+
})
67+
})
68+
}
6769
})
6870
})
6971
}

‎app/scripts/pages/home.js

+19-16
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react'
22
import Peer from '../views/peer'
3-
// import {lookupPretty as getLocation} from 'ipfs-geoip'
3+
import {lookupPretty as getLocation} from 'ipfs-geoip'
44
import i18n from '../utils/i18n.js'
55
import {Row, Col, Well} from 'react-bootstrap'
66

@@ -10,29 +10,32 @@ export default React.createClass({
1010
var t = this
1111
t.props.ipfs.id(function (err, peer) {
1212
if (err || !peer) return console.error(err)
13+
if (!t.isMounted()) return
1314
t.setState({
1415
node: {
1516
peer: peer,
1617
location: {}
1718
}
1819
})
1920

20-
// getLocation(t.props.ipfs, peer.Addresses, function (err, location) {
21-
// if (err || !location) return console.error(err)
22-
// t.setState({
23-
// node: {
24-
// peer: peer,
25-
// location: location
26-
// }
27-
// })
28-
// })
21+
getLocation(t.props.ipfs, peer.Addresses, function (err, location) {
22+
if (err || !location) return console.error(err)
23+
if (!t.isMounted()) return
24+
t.setState({
25+
node: {
26+
peer: peer,
27+
location: location
28+
}
29+
})
30+
})
2931
})
3032

31-
// Fix: The request always fails, not sure why (was broken before already)
32-
// t.props.ipfs.config.get('Gateway.Enabled', function (err, enabled) {
33-
// if (err) return console.error(err)
34-
// t.setState({ GatewayEnabled: enabled.Value })
35-
// })
33+
t.props.ipfs.config.get('Gateway', function (err, {Value}) {
34+
if (err) return console.error(err)
35+
t.setState({
36+
GatewayEnabled: !!Value
37+
})
38+
})
3639

3740
return {
3841
node: {
@@ -74,7 +77,7 @@ export default React.createClass({
7477
<h3>{i18n.t('Node Info')}</h3>
7578
<Peer {...this.state.node} />
7679

77-
<Well className='hidden'>
80+
<Well>
7881
<h4>{i18n.t('HTTP Gateway')}</h4>
7982
<div className='checkbox'>
8083
<label>

‎app/scripts/pages/logs.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ export default class Logs extends Component {
1515
log: [],
1616
tailing: true,
1717
nonce: 0,
18-
request: null
18+
request: null,
19+
stream: null
1920
};
2021

2122
_onLogData = chunk => {
@@ -37,6 +38,7 @@ export default class Logs extends Component {
3738
const request = this.props.ipfs.log.tail((err, stream) => {
3839
if (err) return console.error(err)
3940
stream.on('data', this._onLogData)
41+
this.setState({stream})
4042
})
4143

4244
this.setState({request})
@@ -47,6 +49,11 @@ export default class Logs extends Component {
4749
this.state.request.destroy()
4850
this.setState({request: null})
4951
}
52+
53+
if (this.state.stream) {
54+
this.state.stream.removeAllListeners('data')
55+
this.setState({stream: null})
56+
}
5057
}
5158

5259
componentDidUpdate () {

‎make-config.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ module.exports = function makeConfig (isDev) {
44
var config = createConfig({
55
isDev: isDev,
66
in: './app/scripts/app.js',
7-
out: 'dist',
7+
out: './dist',
8+
output: {
9+
publicPath: ''
10+
},
811
html: function (ctx) {
912
return ctx.defaultTemplate({
1013
publicPath: ''

‎package.json

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"i18next-sprintf-postprocessor": "^0.0.6",
1313
"i18next-xhr-backend": "^0.2.0",
1414
"ipfs-api": "^2.10.0",
15+
"ipfs-geoip": "^1.4.5",
1516
"jquery": "^2.1.4",
1617
"lodash": "^3.10.1",
1718
"react": "^0.14.2",
Loading
Loading
Loading

‎versions/QmRyWyKWmphamkMRnJVjUTzSFSAAZowYP4rnbgnfMXC9Mr/89889688147bd7575d6327160d64e760.svg

+288
Loading
Loading
Loading

‎versions/QmRyWyKWmphamkMRnJVjUTzSFSAAZowYP4rnbgnfMXC9Mr/f775f9cca88e21d45bebe185b27c0e5b.svg

+655
Loading
Binary file not shown.
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<!doctype html><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/><link rel="stylesheet" href="ipfs-webui.0.3.0.css"/></head><body><div id="root"></div></body><script src="ipfs-webui.0.3.0.js"></script>

‎versions/QmRyWyKWmphamkMRnJVjUTzSFSAAZowYP4rnbgnfMXC9Mr/ipfs-webui.0.3.0.css

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎versions/QmRyWyKWmphamkMRnJVjUTzSFSAAZowYP4rnbgnfMXC9Mr/ipfs-webui.0.3.0.js

+48
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{
2+
"Saving...": "Ukládám...",
3+
"Saved": "Uloženo",
4+
"Save": "Uložit",
5+
"Reset": "Resetovat",
6+
"Error in config:": "Chyba v nastavení:",
7+
"Config": "Nastavení",
8+
"Type": "Typ",
9+
"Name": "Jméno",
10+
"ID": "ID",
11+
"Actions": "Akce",
12+
"RAW": "RAW",
13+
"DAG": "DAG",
14+
"Remove": "Odstranit",
15+
"Home": "Hlavní stránka",
16+
"Connections": "Připojení",
17+
"Files": "Soubory",
18+
"Logs": "Log",
19+
"Parent object": "Nadřazený objekt",
20+
"This object has no links": "Tento objekt neobsahuje žádné odkazy",
21+
"Object links": "Odkazy v objektu",
22+
"Hash": "Hash",
23+
"Size": "Velikost",
24+
"permalink:": "trvalý odkaz:",
25+
"Object data (%s bytes)": "Data objektu (%s bytů)",
26+
"This object has no data": "Tento objekt neobsahuje žádná data",
27+
"Object": "Objekt",
28+
"Download": "Stáhnout",
29+
"A new version of IPFS is available.": "Je dostupná nová verze IPFS.",
30+
"IPFS": "IPFS",
31+
"Enter a hash or path": "Zadejte hash nebo cestu",
32+
"GO": "Otevřít",
33+
"About IPFS": "O programu IPFS",
34+
"Help": "Nápověda",
35+
"Github Repository": "Repository na GitHubu",
36+
"Github": "GitHub",
37+
"Report Bugs": "Nahlásit chybu",
38+
"Report a bug": "Nahlásit chybu",
39+
"Peer ID:": "ID uzlu:",
40+
"Location:": "Místo:",
41+
"Unknown": "Neznámé",
42+
"Agent Version:": "Verze klienta:",
43+
"Protocol Version:": "Verze protokolu:",
44+
"Public Key:": "Veřejný klíč:",
45+
"Network Addresses": "Adresy v síti",
46+
"Bitswap": "Bitswap",
47+
"Wantlist": "Požadované soubory",
48+
"X file": "%s soubor",
49+
"X file_plural_2": "%s soubory",
50+
"X file_plural_5": "%s souborů",
51+
"Connected to X peer": "Připojeno k %s jinému uzlu",
52+
"Connected to X peer_plural_2": "Připojeno k %s jiným uzlům",
53+
"Connected to X peer_plural_5": "Připojeno k %s jiným uzlům",
54+
"Pinned": "Připíchnuté",
55+
"All": "Všechny",
56+
"Drag-and-drop your files here": "Přetáhněte sem své soubory",
57+
"or": "nebo",
58+
"Select files...": "Vyberte soubory...",
59+
"Drop your file here to add it to IPFS": "Vhozením souboru sem jej přidáte do IPFS",
60+
"Added": "Přidáno",
61+
"Pinned Files": "Připíchnuté soubory",
62+
"All Local Files": "Všechny lokální soubory",
63+
"Go to gateway": "Přejít do brány",
64+
"Node Info": "Informace o uzlu",
65+
"HTTP Gateway": "HTTP Brána",
66+
"Enabled": "Zapnuta",
67+
"are temporarily disabled due to a logging bug. instead, use commandline (ipfs log)": "funkce je dočasně nedostupná kvůli chybě logování, použijte místo ní příkazovou řádku (ipfs log)",
68+
"Clear": "Smazat",
69+
"Tail": "Nejnovější",
70+
"Event Log": "Log událostí",
71+
"404 - Not Found": "404 - Stránka Nenalezena",
72+
"Go to console home": "Přejít na hlavní stránku",
73+
"Error": "Chyba",
74+
"Enter hash or path": "Zadejte hash nebo cestu",
75+
"Enter hash or path: /ipfs/QmBpath...": "Zadejte hash nebo cestu: /ipfs/QmBpath..."
76+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"Saving...": "Speichern...",
3+
"Saved": "Gespeichert",
4+
"Save": "Speichern",
5+
"Reset": "Zurücksetzen",
6+
"Error in config:": "Fehler in der Konfiguration:",
7+
"Config": "Konfiguration",
8+
"Type": "Typ",
9+
"Name": "Name",
10+
"ID": "ID",
11+
"Actions": "Aktionen",
12+
"RAW": "RAW",
13+
"DAG": "DAG",
14+
"Remove": "Entfernen",
15+
"Home": "Home",
16+
"Connections": "Verbindungen",
17+
"Files": "Dateien",
18+
"Logs": "Logs",
19+
"Parent object": "Elternobjekt",
20+
"This object has no links": "Dieses Objekt hat keine Links",
21+
"Object links": "Objekt Links",
22+
"Hash": "Hash",
23+
"Size": "Größe",
24+
"permalink:": "Permanenter Link:",
25+
"Object data (%s bytes)": "Objekt Daten (%s bytes)",
26+
"This object has no data": "Dieses Objekt hat keine Daten",
27+
"Object": "Objekt",
28+
"Download": "Download",
29+
"A new version of IPFS is available.": "Einen neue version von IPFS is verfügbar",
30+
"IPFS": "IPFS",
31+
"Enter a hash or path": "Gebe einen Hash oder Pfad ein",
32+
"GO": "LOS",
33+
"About IPFS": "Über IPFS",
34+
"Help": "Hilfe",
35+
"Github Repository": "Github Repository",
36+
"Github": "Github",
37+
"Report Bugs": "Fehler berichten",
38+
"Report a bug": "Berichte einen Fehler",
39+
"Peer ID:": "Peer ID:",
40+
"Location:": "Standort:",
41+
"Unknown": "Unbekannt",
42+
"Agent Version:": "Agentenversion:",
43+
"Protocol Version:": "Protokollversion:",
44+
"Public Key:": "Öffentlicher Schlüssel:",
45+
"Network Addresses": "Netzwerkaddressen",
46+
"Bitswap": "Bitswap",
47+
"Wantlist": "Wantlist",
48+
"X file": "%s Datei",
49+
"X file_plural": "%s Datei",
50+
"Connected to X peer": "Verbunden zu %s Peer",
51+
"Connected to X peer_plural": "Verbunden zu %s Peer",
52+
"Pinned": "Gepinned",
53+
"All": "Alle",
54+
"Drag-and-drop your files here": "Drag and drop deine Dateien hier",
55+
"or": "oder",
56+
"Select files...": "Ausgewählte Dateien ...",
57+
"Drop your file here to add it to IPFS": "Ziehe deine Dateien hier herein um sie zu IPFS hinzuzufügen",
58+
"Added": "Hinzugefügt",
59+
"Pinned Files": "Gepinnte Dateien",
60+
"All Local Files": "Alle lokalen Dateien",
61+
"Go to gateway": "Gehe zum Gateway",
62+
"Node Info": "Node Informationen",
63+
"HTTP Gateway": "HTTP Gateway",
64+
"Enabled": "Aktiv",
65+
"are temporarily disabled due to a logging bug. instead, use commandline (ipfs log)": "Derzeit wegen eines Fehlers im Logging deaktiviert. Benutze anstatt die Kommandozeile (ipfs log)",
66+
"Clear": "Löschen",
67+
"Tail": "Folgen",
68+
"Event Log": "Ereignislog",
69+
"404 - Not Found": "404 - Nicht gefunden",
70+
"Go to console home": "Gehe zur Konsole Home",
71+
"Error": "Fehler",
72+
"Enter hash or path": "Gebe einen Hash oder Pfad ein",
73+
"Enter hash or path: /ipfs/QmBpath...": "Gebe einen Hash oder Pfad in der Form ein: /ipfs/QmBpath ..."
74+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"Saving...": "Saving...",
3+
"Saved": "Saved",
4+
"Save": "Save",
5+
"Reset": "Reset",
6+
"Error in config:": "Error in config:",
7+
"Config": "Config",
8+
"Type": "Type",
9+
"Name": "Name",
10+
"ID": "ID",
11+
"Actions": "Actions",
12+
"RAW": "RAW",
13+
"DAG": "DAG",
14+
"Remove": "Remove",
15+
"Home": "Home",
16+
"Connections": "Connections",
17+
"Files": "Files",
18+
"Logs": "Logs",
19+
"Parent object": "Parent object",
20+
"This object has no links": "This object has no links",
21+
"Object links": "Object links",
22+
"Hash": "Hash",
23+
"Size": "Size",
24+
"permalink:": "permalink:",
25+
"Object data (%s bytes)": "Object data (%s bytes)",
26+
"This object has no data": "This object has no data",
27+
"Object": "Object",
28+
"Download": "Download",
29+
"A new version of IPFS is available.": "A new version of IPFS is available.",
30+
"IPFS": "IPFS",
31+
"Enter a hash or path": "Enter a hash or path",
32+
"GO": "GO",
33+
"About IPFS": "About IPFS",
34+
"Help": "Help",
35+
"Github Repository": "Github Repository",
36+
"Github": "Github",
37+
"Report Bugs": "Report Bugs",
38+
"Report a bug": "Report a bug",
39+
"Peer ID:": "Peer ID:",
40+
"Location:": "Location:",
41+
"Unknown": "Unknown",
42+
"Agent Version:": "Agent Version:",
43+
"Protocol Version:": "Protocol Version:",
44+
"Public Key:": "Public Key:",
45+
"Network Addresses": "Network Addresses",
46+
"Bitswap": "Bitswap",
47+
"Wantlist": "Wantlist",
48+
"X file": "%s file",
49+
"X file_plural": "%s files",
50+
"Connected to X peer": "Connected to %s peer",
51+
"Connected to X peer_plural": "Connected to %s peers",
52+
"Pinned": "Pinned",
53+
"All": "All",
54+
"Drag-and-drop your files here": "Drag-and-drop your files here",
55+
"or": "or",
56+
"Select files...": "Select files...",
57+
"Drop your file here to add it to IPFS": "Drop your file here to add it to IPFS",
58+
"Added": "Added",
59+
"Pinned Files": "Pinned Files",
60+
"All Local Files": "All Local Files",
61+
"Go to gateway": "Go to gateway",
62+
"Node Info": "Node Info",
63+
"HTTP Gateway": "HTTP Gateway",
64+
"Enabled": "Enabled",
65+
"are temporarily disabled due to a logging bug. instead, use commandline (ipfs log)": "are temporarily disabled due to a logging bug. instead, use commandline (ipfs log)",
66+
"Clear": "Clear",
67+
"Tail": "Tail",
68+
"Event Log": "Event Log",
69+
"404 - Not Found": "404 - Not Found",
70+
"Go to console home": "Go to console home",
71+
"Error": "Error",
72+
"Enter hash or path": "Enter hash or path",
73+
"Enter hash or path: /ipfs/QmBpath...": "Enter hash or path: /ipfs/QmBpath..."
74+
}

‎versions/current

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
QmR9MzChjp1MdFWik7NjEjqKQMzVmBkdK3dz14A6B5Cupm
1+
QmRyWyKWmphamkMRnJVjUTzSFSAAZowYP4rnbgnfMXC9Mr

‎versions/history

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ QmX4eQoPToCURdzuS8ddj11ve3xYqSotswzsZWp2TTFkxJ
55
QmS2HL9v5YeKgQkkWMvs1EMnFtUowTEdFfSSeMT4pos1e6
66
QmXLEfJtDAiaatZyBB8TqT7Q7rhU99hSTvLRpuf7hLSvGS
77
QmR9MzChjp1MdFWik7NjEjqKQMzVmBkdK3dz14A6B5Cupm
8+
QmRyWyKWmphamkMRnJVjUTzSFSAAZowYP4rnbgnfMXC9Mr

0 commit comments

Comments
 (0)
Please sign in to comment.