diff --git a/README.md b/README.md index a03aefc..3e7ec62 100644 --- a/README.md +++ b/README.md @@ -1,47 +1,48 @@ -# IPM -IOTA Peer Manager. +!! Work in progress, absolute not ready for production or a working app !! +# F-IPM +Forked IOTA Peer Manager. -IPM is a nodejs program for monitoring and managing IOTA peers connected with your IOTA Reference Implementation (IRI) -To learn more about IOTA, please visit [iota.org](http://iota.org) +F-IPM is a nodejs program for monitoring and managing IOTA peers connected with your IOTA Reference Implementation (IRI) +The original IPM is available at https://github.com/akashgoswami/ipm +To learn more about IOTA, please visit [iota.org](https://iota.org) - + ## How to install To install this package, -> npm i -g iota-pm +> npm i -g iota-peers ## How to run ** Note: Before running this program, you should run your IOTA IRI or at least have a known IRI URI which is accessible. ** -> iota-pm +> iota-peers ``` -iota-pm [--iri=iri_api_url] [--port=IP:your_local_port] [--refresh=interval] +iota-peers [--iri=iri_api_url] [--port=IP:your_local_port] [--refresh=interval] -i --iri = The API endpoint for IOTA IRI implementation (Full Node). -p --port = Local server IP and port where the dashboard web server should be running -r --refresh = Refresh interval in seconds for IRI statistics gathering (default 10s) -h --help = print this message Example. -iota-pm -i http://127.0.0.1:14800 -p 127.0.0.1:8888 +iota-peers -i http://127.0.0.1:14265 -p 127.0.0.1:8888 IPM will connect to IOTA endpoint and produce the status at localhost port 8888 To view the dashboard, simply open a browser and point to http://127.0.0.1:8888 ``` ### As a daemon using systemd -Copy the file located in systemd/iota-pm.service to /etc/systemd/system/iota-pm.service, modifying the parameters to match your setup. -Run `systemctl daemon-reload` for reloading your configuration. From here on you can use normal start/stop/status commands to manage iota-pm as a daemon. +Copy the file located in systemd/iota-peers.service to /etc/systemd/system/iota-peers.service, modifying the parameters to match your setup. +Run `systemctl daemon-reload` for reloading your configuration. From here on you can use normal start/stop/status commands to manage iota-peers as a daemon. ## Persistent Tag -Any custom tag assigned to a peer will be saved inside user's home directory in file iota-pm.conf +Any custom tag assigned to a peer will be saved inside user's home directory in file iota-peers.conf In Windows this will be C:\Users\username and Linux it will be $HOME. If none of these could be found, it will try to create the file in current working directory. ## Peer management -The program doesn't manages peers configured in IRI config files. If you delete or add a peer via the UI, please make sure to update it also in the IRI config. - +The program doesn't manages peers configured in IRI config files. If you delete or add a peer via the UI, please make sure to update it also in the IRI config. diff --git a/package.json b/package.json index d840b8d..16defeb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "iota-pm", - "version": "1.1.0", + "name": "iota-peers", + "version": "1.0.0", "description": "An IOTA IRI peer manager", "main": "index.js", "scripts": { @@ -8,9 +8,10 @@ }, "keywords": [ "iota", + "iota-node", "peer" ], - "author": "Akash Goswami", + "author": "TeeVeeEss", "license": "MIT", "dependencies": { "async": "^2.5.0", @@ -18,6 +19,7 @@ "express-basic-auth": "^1.1.1", "gentelella": "^1.3.0", "iota.lib.js": "^0.4.2", + "@iota/core": "^1.0.0", "jsonfile": "^4.0.0", "minimist": "^1.2.0", "restler": "^3.4.0", diff --git a/public/app.js b/public/app.js index e20170f..b84d8cf 100644 --- a/public/app.js +++ b/public/app.js @@ -154,6 +154,9 @@ socket.on('peerInfo', function(info){ obj.datasets[2].data.push(info.numberOfSentTransactions - item.numberOfSentTransactions); if ( obj.datasets[2].data.length > maxHistory) obj.datasets[2].data.shift(); + obj.datasets[3].data.push(info.numberOfStaleTransactions - item.numberOfStaleTransactions); + if ( obj.datasets[3].data.length > maxHistory) obj.datasets[3].data.shift(); + Object.assign(item, info); Vue.set(item, "history", obj); @@ -182,6 +185,13 @@ socket.on('peerInfo', function(info){ borderColor: '#03a9f4', backgroundColor: 'rgba(0,0,0,0)', + data: [] + }, + { + label: 'Stale TX', + borderColor: '#ff7f50', + backgroundColor: 'rgba(0,0,0,0)', + data: [] }, @@ -221,4 +231,4 @@ swal('Response', ); }); -exp = 0; \ No newline at end of file +exp = 0; diff --git a/public/component/peer.js b/public/component/peer.js index 3b70105..7ee9474 100644 --- a/public/component/peer.js +++ b/public/component/peer.js @@ -13,7 +13,7 @@ var Template =` -