Git Product home page Git Product logo

mmm-portscan's People

Contributors

wanztwurst avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mmm-portscan's Issues

Additional Features

Sorry that I'm very new to GitHub, so I don't know the best way to offer some features that I've added to your MMM-portscan. I prefer not to add a fork to create another module to look through, so here's a summary and attached modified code. I'm hoping that you'd like to incorporate it into your version. See the attached picture for how it looks. The attached "txt" file is the modified MMM-portscan.js

Added to the main config:
portalign: (in addition to text align) -- allows the port info to be aligned differently than the host
portfontsize: allows the port text font to be smaller (or larger) than the host

Added to each ports: definition
upText: Replaces the port (or displayedName) text with the upText if the port is open
downText: Replaces the port (or displayedName) text with the downText if the port is closed

Example config.js:

{
module: 'MMM-portscan',
  position: 'bottom_right',
  header: 'Network Status',
  config: {
                 updateInterval: 60,      // in seconds
                 textalign: 'left',       // left, right, center
                 portalign: 'right',      // left, right, center
                 portfontsize: '15px',    // font size for ports
                 color_open: '#00ff00',   // hex value or empty
                 color_closed: '#ff0000', // hex value or empty
                 hosts: [
                             {
                                hostname: '192.168.0.5',
                                displayedName: 'Automator',
                                ports: [
                                             {port: 80, displayedName: 'Apache'},
                                             {port: 8080, displayedName: 'HomeSeer'},
                                             {port: 1883, displayedName: 'MQQT'}
                                ]
                              },
                              {
                                hostname: '192.168.0.12',
                                displayedName: 'Epson ET-3760',
                                ports: [
                                             {port: 80, upText: 'Up', downText: 'DOWN'},
                                ]
                              },
                 ]
               }
}

MMM-portscan_modified
MMM-portscan.js.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.