Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)


![IPM snapshot](/public/img/ipm.jpg)
![F-IPM snapshot](/public/img/ipm.jpg)

## 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.
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
{
"name": "iota-pm",
"version": "1.1.0",
"name": "iota-peers",
"version": "1.0.0",
"description": "An IOTA IRI peer manager",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"iota",
"iota-node",
"peer"
],
"author": "Akash Goswami",
"author": "TeeVeeEss",
"license": "MIT",
"dependencies": {
"async": "^2.5.0",
"express": "^4.15.3",
"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",
Expand Down
12 changes: 11 additions & 1 deletion public/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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: []
},

Expand Down Expand Up @@ -221,4 +231,4 @@ swal('Response',
);

});
exp = 0;
exp = 0;
3 changes: 2 additions & 1 deletion public/component/peer.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var Template =`

<i v-on:click="editTag" v-bind:class="[updating ? 'fa fa-2x fa-check text-success' : 'fa fa-2x fa-pencil text-black-lt']"></i>

<div class="text-info text-md">{{state.connectionType}}://{{state.address}}</div>
<div class="text-info text-md">{{state.connectionType}}://{{state.address}} {{state.domain}}</div>

</div>
</div>
Expand All @@ -28,6 +28,7 @@ var Template =`
<div class="list-group-item" href="#"> <span class="badge bg-success">{{state.numberOfAllTransactions}}</span>Received Transactions</div>
<div class="list-group-item" href="#"> <span class="badge bg-success">{{state.numberOfNewTransactions}}</span>Received New Transactions</div>
<div class="list-group-item" href="#"> <span class="badge bg-success">{{state.numberOfRandomTransactionRequests}}</span>Received Random Transaction Requests</div>
<div class="list-group-item" href="#"> <span class="badge bg-success">{{state.numberOfStaleTransactionRequests}}</span>Stale Transactions</div>
<div class="list-group-item" href="#"> <span class="badge bg-success">{{state.numberOfInvalidTransactions}}</span>Received Invalid Transactions</div>
</div>
</section>
Expand Down