Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eavesdocker

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eavesdocker - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

6

CHANGELOG.md

@@ -8,2 +8,7 @@ # Eavesdocker Changelog

## [v0.1.7] - 2021-07-19
### Fixed
- container list endpoint ignoring swarm siblings
## [v0.1.6] - 2021-07-19

@@ -84,1 +89,2 @@

[v0.1.6]: https://gitlab.com/GCSBOSS/eavesdocker/-/tags/v0.1.6
[v0.1.7]: https://gitlab.com/GCSBOSS/eavesdocker/-/tags/v0.1.7

2

lib/api.js

@@ -47,3 +47,3 @@ const { v4: uuidv4 } = require('uuid');

Object.keys(all).forEach(c => all[c].node = swarm[nid]);
containers = { ...containers, all };
cs = { ...cs, all };
}

@@ -50,0 +50,0 @@ }

@@ -14,22 +14,3 @@ const LAST_COLOR = 13;

function onEntry(listId, { data }){
data = JSON.parse(data);
const lst = currentLists[listId];
if(lst.focusServices.size > 0 && !lst.focusServices.has(data.source.service))
return;
entry = data.entry;
if(typeof entry.message == 'string' && entry.message.length > 2 && entry.message.charAt(0) == '{')
entry = { ...entry, message: null, ...JSON.parse(entry.message) };
data.source.label = data.source.service +
(serviceCount[data.source.service] > 1 ? ' • ' + data.source.number : '');
data.source.index = activeContainers[data.source.id].index;
lst.events.push({ container: data.source, entry, id: randomId() });
m.redraw();
}
function randomId() {

@@ -44,3 +25,2 @@ const uint32 = window.crypto.getRandomValues(new Uint32Array(1))[0];

eventSource.removeEventListener('log', lst.cb);
delete currentLists[lst.id];

@@ -69,8 +49,6 @@ minLists.delete(lst.id);

const id = randomId();
const cb = onEntry.bind(null, id);
currentLists[id] = { id, name: 'Untitled', cb, events: [],
currentLists[id] = { id, name: 'Untitled', events: [],
focusServices: new Set(), hideFields: {} };
// TODO When this is loaded from file, populate 'historyServices' from 'excludeServices'
eventSource.addEventListener('log', cb);
}

@@ -504,2 +482,31 @@

eventSource.addEventListener('log', function({ data }){
data = JSON.parse(data);
if(!activeContainers[data.source.id])
return;
const lists = Object.values(currentLists).filter(l =>
l.focusServices.size == 0 || l.focusServices.has(data.source.service));
if(lists.length == 0)
return;
entry = data.entry;
if(typeof entry.message == 'string' && entry.message.length > 2 && entry.message.charAt(0) == '{')
entry = { ...entry, message: null, ...JSON.parse(entry.message) };
data.source.label = data.source.service +
(serviceCount[data.source.service] > 1 ? ' • ' + data.source.number : '');
data.source.index = activeContainers[data.source.id].index;
const log = { container: data.source, entry, id: randomId() };
lists.forEach(lst => lst.events.push(log));
m.redraw();
});
const viewEl = document.getElementById('view');

@@ -506,0 +513,0 @@ viewEl.setAttribute('data-name', 'main');

{
"name": "eavesdocker",
"version": "0.1.6",
"version": "0.1.7",
"main": "lib/main.js",

@@ -5,0 +5,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc