+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>\r
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\r
-<!-- Generated by Microsoft Visio, SVG Export pc.svg Page-1 -->\r
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events"\r
- xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="6.0444in" height="6.0444in"\r
- viewBox="0 0 435.197 435.197" xml:space="preserve" color-interpolation-filters="sRGB" class="st4">\r
- <v:documentProperties v:langID="1033" v:viewMarkup="false"/>\r
-\r
- <style type="text/css">\r
- <![CDATA[\r
- .st1 {fill:none;stroke:#246767;stroke-linecap:round;stroke-linejoin:round;stroke-width:10}\r
- .st2 {stroke:#246767;stroke-linecap:round;stroke-linejoin:round;stroke-width:10}\r
- .st3 {stroke:#246767;stroke-width:10}\r
- .st4 {fill:none;fill-rule:evenodd;font-size:12px;overflow:visible;stroke-linecap:square;stroke-miterlimit:3}\r
- ]]>\r
- </style>\r
-\r
- <g v:mID="0" v:index="1" v:groupContext="foregroundPage">\r
- <title>Page-1</title>\r
- <v:pageProperties v:drawingScale="0.0393701" v:pageScale="0.0393701" v:drawingUnits="24" v:shadowOffsetX="8.50394"\r
- v:shadowOffsetY="-8.50394"/>\r
- <g id="shape3-1" v:mID="3" v:groupContext="shape" transform="translate(5,-5)">\r
- <title>Sheet.3</title>\r
- <rect x="0" y="350.157" width="425.197" height="85.0394" rx="22.6772" ry="22.6772" class="st1"/>\r
- </g>\r
- <g id="shape4-3" v:mID="4" v:groupContext="shape" transform="translate(5,-203.425)">\r
- <title>Sheet.4</title>\r
- <rect x="0" y="208.425" width="425.197" height="226.772" rx="22.6772" ry="22.6772" class="st1"/>\r
- </g>\r
- <g id="shape5-5" v:mID="5" v:groupContext="shape" transform="translate(189.252,-146.732)">\r
- <title>Sheet.5</title>\r
- <path d="M0 435.2 L56.69 435.2 L42.52 378.5 L14.17 378.5 L0 435.2 Z" class="st1"/>\r
- </g>\r
- <g id="shape6-7" v:mID="6" v:groupContext="shape" transform="translate(104.213,-146.732)">\r
- <title>Sheet.6</title>\r
- <path d="M0 435.2 L226.77 435.2" class="st2"/>\r
- </g>\r
- <g id="shape9-10" v:mID="9" v:groupContext="shape" transform="translate(33.3465,-61.6929)">\r
- <title>Sheet.9</title>\r
- <path d="M0 435.2 L226.77 435.2" class="st3"/>\r
- </g>\r
- <g id="shape11-13" v:mID="11" v:groupContext="shape" transform="translate(288.465,-61.6929)">\r
- <title>Sheet.11</title>\r
- <path d="M0 435.2 L113.39 435.2" class="st3"/>\r
- </g>\r
- <g id="shape12-16" v:mID="12" v:groupContext="shape" transform="translate(33.3465,-33.3465)">\r
- <title>Sheet.12</title>\r
- <path d="M0 435.2 L368.5 435.2" class="st3"/>\r
- </g>\r
- <g id="shape13-19" v:mID="13" v:groupContext="shape" transform="translate(104.213,-132.559)">\r
- <title>Sheet.13</title>\r
- <path d="M0 435.2 L226.77 435.2" class="st2"/>\r
- </g>\r
- </g>\r
-</svg>\r
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="38pt" height="26pt" viewBox="0 0 38 26" version="1.1">
-<defs>
-<clipPath id="clip1">
- <path d="M 0.0585938 0.820312 L 37 0.820312 L 37 25.820312 L 0.0585938 25.820312 L 0.0585938 0.820312 Z M 0.0585938 0.820312 "/>
-</clipPath>
-<clipPath id="clip2">
- <path d="M 0.0585938 0.820312 L 37 0.820312 L 37 25.820312 L 0.0585938 25.820312 L 0.0585938 0.820312 Z M 0.0585938 0.820312 "/>
-</clipPath>
-</defs>
-<g id="surface0">
-<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0.784314%,42.352941%,60.784314%);fill-opacity:1;" d="M 36.984375 8.171875 C 36.984375 12.121094 28.75 15.324219 18.59375 15.324219 C 8.433594 15.324219 0.199219 12.121094 0.199219 8.171875 L 0.199219 18.648438 C 0.199219 22.597656 8.433594 25.800781 18.59375 25.800781 C 28.75 25.800781 36.984375 22.597656 36.984375 18.648438 L 36.984375 8.171875 "/>
-<g clip-path="url(#clip1)" clip-rule="nonzero">
-<path style="fill:none;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(100%,100%,100%);stroke-opacity:1;stroke-miterlimit:4;" d="M 36.984375 17.828125 C 36.984375 13.878906 28.75 10.675781 18.59375 10.675781 C 8.433594 10.675781 0.199219 13.878906 0.199219 17.828125 L 0.199219 7.351562 C 0.199219 3.402344 8.433594 0.199219 18.59375 0.199219 C 28.75 0.199219 36.984375 3.402344 36.984375 7.351562 L 36.984375 17.828125 Z M 36.984375 17.828125 " transform="matrix(1,0,0,-1,0,26)"/>
-</g>
-<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0.784314%,42.352941%,60.784314%);fill-opacity:1;" d="M 18.59375 15.324219 C 28.75 15.324219 36.984375 12.121094 36.984375 8.171875 C 36.984375 4.222656 28.75 1.019531 18.59375 1.019531 C 8.433594 1.019531 0.199219 4.222656 0.199219 8.171875 C 0.199219 12.121094 8.433594 15.324219 18.59375 15.324219 "/>
-<g clip-path="url(#clip2)" clip-rule="nonzero">
-<path style="fill:none;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(100%,100%,100%);stroke-opacity:1;stroke-miterlimit:4;" d="M 18.59375 10.675781 C 28.75 10.675781 36.984375 13.878906 36.984375 17.828125 C 36.984375 21.777344 28.75 24.980469 18.59375 24.980469 C 8.433594 24.980469 0.199219 21.777344 0.199219 17.828125 C 0.199219 13.878906 8.433594 10.675781 18.59375 10.675781 Z M 18.59375 10.675781 " transform="matrix(1,0,0,-1,0,26)"/>
-</g>
-<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 14.394531 5.375 L 15.910156 7.652344 L 10.167969 8.980469 L 11.425781 7.9375 L 2.550781 6.417969 L 4.773438 4.75 L 13.339844 6.199219 L 14.394531 5.375 "/>
-<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 22.472656 10.898438 L 21.4375 8.550781 L 26.617188 7.515625 L 25.71875 8.320312 L 34.351562 9.796875 L 32.277344 11.453125 L 23.699219 9.839844 L 22.472656 10.898438 "/>
-<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 19.640625 4.132812 L 25.441406 2.542969 L 25.511719 5.027344 L 24.058594 4.753906 L 21.230469 7.101562 L 18.527344 6.707031 L 21.449219 4.410156 L 19.640625 4.132812 "/>
-<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 17.152344 13.039062 L 11.628906 14.074219 L 11.421875 11.519531 L 13.011719 11.867188 L 16.050781 9.269531 L 18.742188 9.726562 L 15.496094 12.558594 L 17.152344 13.039062 "/>
-</g>
-</svg>
function startRefresh() {
- setTimeout(startRefresh,10000);
+ setTimeout(startRefresh,30000);
loadFlows();
}
node.append("image")
.attr("xlink:href", function (d) {
if (d.type === "switch") {
- return "img/switch.svg"
+ return "img/switch.png"
} else if (d.type === "cloud") {
return "img/cloud.svg"
} else {
function getTopology() {
tabObj.buildTabs("#main", ["Graph", "Tables"], "Nothing to show!");
- var $svg = $('<svg width="1616" height="900"></svg>');
+ var $svg = $('<svg width="800" height="600"></svg>');
var $data = $('<div id="data"></div>');
tabObj.buildContent('Graph', $svg);
tabObj.buildContent('Tables', $data);
+++ /dev/null
-#!/usr/bin/env node
-
-var mime = require('./mime.js');
-var file = process.argv[2];
-var type = mime.lookup(file);
-
-process.stdout.write(type + '\n');
-
--- /dev/null
+../mime/cli.js
\ No newline at end of file
+++ /dev/null
-#!/usr/bin/env node
-
-var fs = require('fs'),
- tty = require('tty'),
- statik = require('./../lib/node-static');
-
- var argv = require('optimist')
- .usage([
- 'USAGE: $0 [-p <port>] [<directory>]',
- 'simple, rfc 2616 compliant file streaming module for node']
- .join('\n\n'))
- .option('port', {
- alias: 'p',
- 'default': 8080,
- description: 'TCP port at which the files will be served'
- })
- .option('host-address', {
- alias: 'a',
- 'default': '127.0.0.1',
- description: 'the local network interface at which to listen'
- })
- .option('cache', {
- alias: 'c',
- description: '"Cache-Control" header setting, defaults to 3600'
- })
- .option('version', {
- alias: 'v',
- description: 'node-static version'
- })
- .option('headers', {
- alias: 'H',
- description: 'additional headers (in JSON format)'
- })
- .option('header-file', {
- alias: 'f',
- description: 'JSON file of additional headers'
- })
- .option('gzip', {
- alias: 'z',
- description: 'enable compression (tries to serve file of same name plus \'.gz\')'
- })
- .option('spa', {
- description: 'serve the content as a single page app by redirecting all non-file requests to the index html file'
- })
- .option('indexFile', {
- alias: 'i',
- 'default': 'index.html',
- description: 'specify a custom index file when serving up directories'
- })
- .option('help', {
- alias: 'h',
- description: 'display this help message'
- })
- .argv;
-
- var dir = argv._[0] || '.';
-
- var colors = require('colors');
-
- var log = function(request, response, statusCode) {
- var d = new Date();
- var seconds = d.getSeconds() < 10? '0'+d.getSeconds() : d.getSeconds(),
- datestr = d.getHours() + ':' + d.getMinutes() + ':' + seconds,
- line = datestr + ' [' + response.statusCode + ']: ' + request.url,
- colorized = line;
- if (tty.isatty(process.stdout.fd))
- colorized = (response.statusCode >= 500) ? line.red.bold :
- (response.statusCode >= 400) ? line.red :
- line;
- console.log(colorized);
- };
-
- var file, options;
-
-if (argv.help) {
- require('optimist').showHelp(console.log);
- process.exit(0);
-}
-
-if (argv.version) {
- console.log('node-static', statik.version.join('.'));
- process.exit(0);
-}
-
-if (argv.cache) {
- (options = options || {}).cache = argv.cache;
-}
-
-if (argv.headers) {
- (options = options || {}).headers = JSON.parse(argv.headers);
-}
-
-if (argv['header-file']) {
- (options = options || {}).headers =
- JSON.parse(fs.readFileSync(argv['header-file']));
-}
-
-if (argv.gzip) {
- (options = options || {}).gzip = true;
-}
-
-if (argv.indexFile) {
- (options = options || {}).indexFile = argv['indexFile'];
-}
-
-file = new(statik.Server)(dir, options);
-
-require('http').createServer(function (request, response) {
- request.addListener('end', function () {
- var callback = function(e, rsp) {
- if (e && e.status === 404) {
- response.writeHead(e.status, e.headers);
- response.end("Not Found");
- log(request, response);
- } else {
- log(request, response);
- }
- };
-
- if (argv['spa'] && request.url.indexOf(".") == -1) {
- file.serveFile(argv['indexFile'], 200, {}, request, response);
- } else {
- file.serve(request, response, callback);
- }
- }).resume();
-}).listen(+argv.port, argv['host-address']);
-
-console.log('serving "' + dir + '" at http://' + argv['host-address'] + ':' + argv.port);
-if (argv.spa) {
- console.log('serving as a single page app (all non-file requests redirect to ' + argv['indexFile'] +')');
-}
--- /dev/null
+../node-static/bin/cli.js
\ No newline at end of file
+++ /dev/null
-#!/usr/bin/env node
-
-/*!
- * ws: a node.js websocket client
- * Copyright(c) 2011 Einar Otto Stangvik <einaros@gmail.com>
- * MIT Licensed
- */
-
-const EventEmitter = require('events');
-const fs = require('fs');
-const program = require('commander');
-const read = require('read');
-const readline = require('readline');
-const tty = require('tty');
-const WebSocket = require('ws');
-
-/**
- * InputReader - processes console input.
- *
- * @extends EventEmitter
- */
-class Console extends EventEmitter {
- constructor() {
- super();
-
- this.stdin = process.stdin;
- this.stdout = process.stdout;
-
- this.readlineInterface = readline.createInterface(this.stdin, this.stdout);
-
- this.readlineInterface
- .on('line', data => {
- this.emit('line', data);
- })
- .on('close', () => {
- this.emit('close');
- });
-
- this._resetInput = () => {
- this.clear();
- };
- }
-
- static get Colors() {
- return {
- Red: '\u001b[31m',
- Green: '\u001b[32m',
- Yellow: '\u001b[33m',
- Blue: '\u001b[34m',
- Default: '\u001b[39m'
- };
- }
-
- static get Types() {
- return {
- Incoming: '< ',
- Control: '',
- Error: 'error: '
- };
- }
-
- prompt() {
- this.readlineInterface.prompt();
- }
-
- print(type, msg, color) {
- if (tty.isatty(1)) {
- this.clear();
-
- if (program.execute) color = type = '';
- else if (!program.color) color = '';
-
- this.stdout.write(color + type + msg + Console.Colors.Default + '\n');
- this.prompt();
- } else if (type === Console.Types.Incoming) {
- this.stdout.write(msg + '\n');
- } else {
- // is a control message and we're not in a tty... drop it.
- }
- }
-
- clear() {
- if (tty.isatty(1)) {
- this.stdout.write('\u001b[2K\u001b[3D');
- }
- }
-
- pause() {
- this.stdin.on('keypress', this._resetInput);
- }
-
- resume() {
- this.stdin.removeListener('keypress', this._resetInput);
- }
-}
-
-function collect(val, memo) {
- memo.push(val);
- return memo;
-}
-
-function noop() {}
-
-/**
- * The actual application
- */
-const version = require('../package.json').version;
-
-program
- .version(version)
- .usage('[options] (--listen <port> | --connect <url>)')
- .option('-l, --listen <port>', 'listen on port')
- .option('-c, --connect <url>', 'connect to a websocket server')
- .option('-p, --protocol <version>', 'optional protocol version')
- .option('-o, --origin <origin>', 'optional origin')
- .option('-x, --execute <command>', 'execute command after connecting')
- .option('-w, --wait <seconds>', 'wait given seconds after executing command')
- .option('--host <host>', 'optional host')
- .option('-s, --subprotocol <protocol>', 'optional subprotocol', collect, [])
- .option('-n, --no-check', 'Do not check for unauthorized certificates')
- .option(
- '-H, --header <header:value>',
- 'Set an HTTP header. Repeat to set multiple. (--connect only)',
- collect,
- []
- )
- .option(
- '--auth <username:password>',
- 'Add basic HTTP authentication header. (--connect only)'
- )
- .option('--ca <ca>', 'Specify a Certificate Authority (--connect only)')
- .option('--cert <cert>', 'Specify a Client SSL Certificate (--connect only)')
- .option(
- '--key <key>',
- "Specify a Client SSL Certificate's key (--connect only)"
- )
- .option(
- '--passphrase [passphrase]',
- "Specify a Client SSL Certificate Key's passphrase (--connect only). " +
- "If you don't provide a value, it will be prompted for."
- )
- .option('--no-color', 'Run without color')
- .option(
- '--slash',
- 'Enable slash commands for control frames ' +
- '(/ping, /pong, /close [code [, reason]])'
- )
- .parse(process.argv);
-
-if (program.listen && program.connect) {
- console.error('\u001b[33merror: use either --listen or --connect\u001b[39m');
- process.exit(-1);
-}
-
-if (program.listen) {
- const wsConsole = new Console();
- wsConsole.pause();
-
- let ws = null;
- const wss = new WebSocket.Server({ port: program.listen }, () => {
- wsConsole.print(
- Console.Types.Control,
- `listening on port ${program.listen} (press CTRL+C to quit)`,
- Console.Colors.Green
- );
- wsConsole.clear();
- });
-
- wsConsole.on('close', () => {
- if (ws) ws.close();
- process.exit(0);
- });
-
- wsConsole.on('line', data => {
- if (ws) {
- ws.send(data);
- wsConsole.prompt();
- }
- });
-
- wss.on('connection', newClient => {
- if (ws) return newClient.terminate();
-
- ws = newClient;
- wsConsole.resume();
- wsConsole.prompt();
- wsConsole.print(
- Console.Types.Control,
- 'client connected',
- Console.Colors.Green
- );
-
- ws.on('close', code => {
- wsConsole.print(
- Console.Types.Control,
- `disconnected (code: ${code})`,
- Console.Colors.Green
- );
- wsConsole.clear();
- wsConsole.pause();
- ws = null;
- });
-
- ws.on('error', err => {
- wsConsole.print(Console.Types.Error, err.message, Console.Colors.Yellow);
- });
-
- ws.on('message', data => {
- wsConsole.print(Console.Types.Incoming, data, Console.Colors.Blue);
- });
- });
-
- wss.on('error', err => {
- wsConsole.print(Console.Types.Error, err.message, Console.Colors.Yellow);
- process.exit(-1);
- });
-} else if (program.connect) {
- const options = {};
- const cont = () => {
- const wsConsole = new Console();
-
- const headers = program.header.reduce((acc, cur) => {
- const i = cur.indexOf(':');
- const key = cur.slice(0, i);
- const value = cur.slice(i + 1);
- acc[key] = value;
- return acc;
- }, {});
-
- if (program.auth) {
- headers.Authorization =
- 'Basic ' + Buffer.from(program.auth).toString('base64');
- }
- if (program.host) headers.Host = program.host;
- if (program.protocol) options.protocolVersion = +program.protocol;
- if (program.origin) options.origin = program.origin;
- if (!program.check) options.rejectUnauthorized = program.check;
- if (program.ca) options.ca = fs.readFileSync(program.ca);
- if (program.cert) options.cert = fs.readFileSync(program.cert);
- if (program.key) options.key = fs.readFileSync(program.key);
-
- let connectUrl = program.connect;
- if (!connectUrl.match(/\w+:\/\/.*$/i)) {
- connectUrl = `ws://${connectUrl}`;
- }
-
- options.headers = headers;
- const ws = new WebSocket(connectUrl, program.subprotocol, options);
-
- ws.on('open', () => {
- if (program.execute) {
- ws.send(program.execute);
- setTimeout(() => {
- ws.close();
- }, program.wait ? program.wait * 1000 : 2000);
- } else {
- wsConsole.print(
- Console.Types.Control,
- 'connected (press CTRL+C to quit)',
- Console.Colors.Green
- );
-
- wsConsole.on('line', data => {
- if (program.slash && data[0] === '/') {
- const toks = data.split(/\s+/);
- switch (toks[0].substr(1)) {
- case 'ping':
- ws.ping(noop);
- break;
- case 'pong':
- ws.pong(noop);
- break;
- case 'close': {
- let closeStatusCode = 1000;
- let closeReason = '';
- if (toks.length >= 2) {
- closeStatusCode = parseInt(toks[1]);
- }
- if (toks.length >= 3) {
- closeReason = toks.slice(2).join(' ');
- }
- if (closeReason.length > 0) {
- ws.close(closeStatusCode, closeReason);
- } else {
- ws.close(closeStatusCode);
- }
- break;
- }
- default:
- wsConsole.print(
- Console.Types.Error,
- 'Unrecognized slash command.',
- Console.Colors.Yellow
- );
- }
- } else {
- ws.send(data);
- }
- wsConsole.prompt();
- });
- }
- });
-
- ws.on('close', code => {
- if (!program.execute) {
- wsConsole.print(
- Console.Types.Control,
- `disconnected (code: ${code})`,
- Console.Colors.Green
- );
- }
- wsConsole.clear();
- process.exit();
- });
-
- ws.on('error', err => {
- wsConsole.print(Console.Types.Error, err.message, Console.Colors.Yellow);
- process.exit(-1);
- });
-
- ws.on('message', data => {
- wsConsole.print(Console.Types.Incoming, data, Console.Colors.Blue);
- });
-
- ws.on('ping', () => {
- wsConsole.print(
- Console.Types.Incoming,
- 'Received ping',
- Console.Colors.Blue
- );
- });
-
- ws.on('pong', () => {
- wsConsole.print(
- Console.Types.Incoming,
- 'Received pong',
- Console.Colors.Blue
- );
- });
-
- wsConsole.on('close', () => {
- ws.close();
- process.exit();
- });
- };
-
- if (program.passphrase === true) {
- read(
- {
- prompt: 'Passphrase: ',
- silent: true,
- replace: '*'
- },
- (err, passphrase) => {
- options.passphrase = passphrase;
- cont();
- }
- );
- } else if (typeof program.passphrase === 'string') {
- options.passphrase = program.passphrase;
- cont();
- } else {
- cont();
- }
-} else {
- program.help();
-}
--- /dev/null
+../wscat/bin/wscat
\ No newline at end of file
--- /dev/null
+0 info it worked if it ends with ok
+1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]
+2 info using npm@1.4.21
+3 info using node@v8.11.1
+4 verbose run-script [ 'prestart', 'start', 'poststart' ]
+5 info prestart web@1.0.0
+6 info start web@1.0.0
+7 verbose unsafe-perm in lifecycle true
+8 info web@1.0.0 Failed to exec start script
+9 error web@1.0.0 start: `node src/index.js`
+9 error Exit status 1
+10 error Failed at the web@1.0.0 start script.
+10 error This is most likely a problem with the web package,
+10 error not with npm itself.
+10 error Tell the author that this fails on your system:
+10 error node src/index.js
+10 error You can get their info via:
+10 error npm owner ls web
+10 error There is likely additional logging output above.
+11 error System Linux 4.19.57-v7+
+12 error command "/usr/bin/node" "/usr/bin/npm" "start"
+13 error cwd /home/pi/VSoRC
+14 error node -v v8.11.1
+15 error npm -v 1.4.21
+16 error code ELIFECYCLE
+17 verbose exit [ 1, true ]