Skip to content
This repository was archived by the owner on Dec 8, 2019. It is now read-only.
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
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.git
Dockerfile
test
test
node_modules
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ sudo: false
language: node_js

node_js:
- "4"
- "6"
- "6"
- "8"
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM mhart/alpine-node:base
FROM node:8-alpine

WORKDIR /app
COPY . .
RUN yarn install --production

EXPOSE 3000
EXPOSE 3001
Expand Down
19 changes: 9 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"lint:build": "jshint --reporter checkstyle lib/* test/* > reports/jshint-checkstyle.xml",
"depcheck": "dependency-check . lib/*",
"depcheck:unused": "dependency-check ./package.json --unused --no-dev lib/*",
"test:unit": "mkdir -p reports/ && NODE_ENV=test multi='spec=- xunit=reports/mocha-xunit.xml' istanbul cover _mocha -- -R mocha-multi && istanbul check-coverage",
"test:unit": "mkdir -p reports/ && NODE_ENV=test multi='spec=- xunit=reports/mocha-xunit.xml' istanbul cover _mocha -- -R mocha-multi --exit && istanbul check-coverage",
"test:coveralls": "cat reports/coverage/lcov.info | node_modules/coveralls/bin/coveralls.js",
"test": "npm run lint && npm run test:unit",
"start": "bin/natsboard"
Expand All @@ -30,19 +30,18 @@
"license": "MIT",
"homepage": "http://github.com/devfacet/natsboard",
"dependencies": {
"express": "4.15.x",
"request": "2.80.x",
"express": "^4.16.3",
"request": "^2.87.0",
"utilex": "3.x.x",
"ws": "3.x.x"
"ws": "^6.0.0"
},
"devDependencies": {
"chai": "3.5.x",
"chai": "^4.1.2",
"dependency-check": "^3.2.0",
"istanbul": "0.4.x",
"jshint": "2.9.x",
"jshint-stylish": "2.2.x",
"mocha": "3.2.x",
"mocha-multi": "0.10.x",
"dependency-check": "2.8.x",
"istanbul": "0.4.x",
"nats": "0.7.x"
"mocha": "^5.2.0",
"mocha-multi": "^1.0.1"
}
}
76 changes: 35 additions & 41 deletions public/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,26 +150,23 @@ var app = function app() {
var content;

// Iterate data
for(var key in data.connections) {
if(data.connections.hasOwnProperty(key)) {

var val = data.connections[key];

// Row
content += '<tr id="connz-list-row-' + val.cid + '" class="small">';

// Columns
content += '<td>' + val.cid + '</td>';
content += '<td>' + val.ip + ':' + val.port + '</td>';
content += '<td>' + val.lang + '/' + val.version + (val.name ? ' (' + val.name + ')' : '') + '</td>';
content += '<td>' + val.pending_bytes + '</td>';
content += '<td>' + val.in_msgs + '/' + val.out_msgs + '</td>';
content += '<td>' + val.in_bytes + '/' + val.out_bytes + '</td>';
content += '<td>' + val.subscriptions + '</td>';
content += '<td>' + (val.subscriptions_list ? val.subscriptions_list.join(', ') : '') + '</td>';

content += '</tr>';
}
for(var i = 0; i < data.connections.length; i++) {
var val = data.connections[i];

// Row
content += '<tr id="connz-list-row-' + val.cid + '" class="small">';

// Columns
content += '<td>' + val.cid + '</td>';
content += '<td>' + val.ip + ':' + val.port + '</td>';
content += '<td>' + val.lang + '/' + val.version + (val.name ? ' (' + val.name + ')' : '') + '</td>';
content += '<td>' + val.pending_bytes + '</td>';
content += '<td>' + val.in_msgs + '/' + val.out_msgs + '</td>';
content += '<td>' + val.in_bytes + '/' + val.out_bytes + '</td>';
content += '<td>' + val.subscriptions + '</td>';
content += '<td>' + (val.subscriptions_list ? val.subscriptions_list.join('<br />') : '') + '</td>';

content += '</tr>';
}

// If content exists then
Expand All @@ -196,27 +193,24 @@ var app = function app() {
var content;

// Iterate data
for(var key in data.routes) {
if(data.routes.hasOwnProperty(key)) {

var val = data.routes[key];

// Row
content += '<tr id="routez-list-row-' + val.cid + '" class="small">';

// Columns
content += '<td>' + val.rid + '</td>';
content += '<td>' + val.ip + ':' + val.port + '</td>';
content += '<td>' + val.remote_id + '</td>';
content += '<td>' + val.did_solicit + '</td>';
content += '<td>' + val.pending_size + '</td>';
content += '<td>' + val.in_msgs + ' / ' + val.out_msgs + '</td>';
content += '<td>' + val.in_bytes + ' / ' + val.out_bytes + '</td>';
content += '<td>' + val.subscriptions + '</td>';
content += '<td>' + (val.subscriptions_list ? val.subscriptions_list.join(', ') : '') + '</td>';

content += '</tr>';
}
for(var i = 0; i < data.routes.length; i++) {
var val = data.routes[i];

// Row
content += '<tr id="routez-list-row-' + val.cid + '" class="small">';

// Columns
content += '<td>' + val.rid + '</td>';
content += '<td>' + val.ip + ':' + val.port + '</td>';
content += '<td>' + val.remote_id + '</td>';
content += '<td>' + val.did_solicit + '</td>';
content += '<td>' + val.pending_size + '</td>';
content += '<td>' + val.in_msgs + ' / ' + val.out_msgs + '</td>';
content += '<td>' + val.in_bytes + ' / ' + val.out_bytes + '</td>';
content += '<td>' + val.subscriptions + '</td>';
content += '<td>' + (val.subscriptions_list ? val.subscriptions_list.join(', ') : '') + '</td>';

content += '</tr>';
}

// If content exists then
Expand Down
Loading