Skip to content

Commit

Permalink
Merge pull request #1 from daskeyboard
Browse files Browse the repository at this point in the history
ICMP Ping version 1.1.1
  • Loading branch information
Conroman16 authored Apr 2, 2019
2 parents ee507ef + b3dcc47 commit 225b83a
Show file tree
Hide file tree
Showing 7 changed files with 688 additions and 23 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Changelog Q Applet ICMP ping

## Version 1.1.1 - April 02, 2019
Review.
32 changes: 29 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,30 @@
# DasKeyboard ICMP Ping
A DasKeyboard applet for displaying ICMP ping response time as a color gradient depending on ping time. Makes use of the OS's `ping` command to avoid having to build unmanaged code via `node-gyp`. Fully compatible with \*nix/BSD, Mac, and Windows
# Q Applet: ICMP Ping

![ICMP Ping on Das Keyboard 5Q](assets/dashboard_example.png "ICMP Ping Dashboard Example")
A Das Keyboard applet for displaying ICMP ping response time as a color
gradient depending on ping time. Makes use of the OS's `ping` command
to avoid having to build unmanaged code via `node-gyp`.

Fully compatible with \*nix/BSD, Mac, and Windows.

[GitHub repository](https://github.com/Conroman16/daskeyboard-applet--icmp-ping)

![ICMP Ping on Das Keyboard 5Q](assets/image.png "ICMP Ping Dashboard Example")

## Changelog

[CHANGELOG.MD](CHANGELOG.md)

## Installation

Requires a Das Keyboard Q Series: www.daskeyboard.com.

Installation, configuration and uninstallation of applets is done within
the Q Desktop application (https://www.daskeyboard.com/q)

## Running tests

- `yarn test`

## Contributions

Pull requests welcome.
5 changes: 3 additions & 2 deletions README_ENDUSER.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# ICMP Ping

A highly-customizable applet that displays ICMP ping response times as a color gradient depending the average round-trip time duration
A highly-customizable applet that displays ICMP ping response times
as a color gradient depending the average round-trip time duration.

![ICMP Ping on Das Keyboard 5Q](assets/dashboard_example.png "ICMP Ping Dashboard Example")
![ICMP Ping on Das Keyboard 5Q](assets/image.png "ICMP Ping Dashboard Example")
File renamed without changes
14 changes: 3 additions & 11 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ICMPPing extends q.DesktopApp {
.then(avgResponseTime => ICMPPing.buildSignal($this.config.pingAddress, $this.getColor(avgResponseTime), avgResponseTime))
.catch(err => {
logger.error(`Error while pinging ${$this.config.pingAddress}: ${err}`);
ICMPPing.buildSignal($this.config.pingAddress, ICMPPingDefaults.FailureColor, null, err);
return ICMPPing.buildSignal($this.config.pingAddress, ICMPPingDefaults.FailureColor, null, err);
});
}

Expand Down Expand Up @@ -108,16 +108,8 @@ class ICMPPing extends q.DesktopApp {
}

static buildSignal(address, color, avgResponseTime, err) {
if (!!err || !avgResponseTime){
return new q.Signal({
points: [[new q.Point(color || ICMPPingDefaults.FailureColor)]],
name: 'ICMP Ping',
message: `Error while pinging ${address}`,
action: 'ERROR',
errors: [
err
]
});
if ( !(typeof err === 'undefined') || (avgResponseTime == null)){
return q.Signal.error([`Error while pinging ${address}`]);
}
return new q.Signal({
points: [[new q.Point(color)]],
Expand Down
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"name": "daskeyboard-applet--icmp-ping",
"displayName": "ICMP Ping",
"version": "1.1.0",
"description": "Displays network latency as a color gradient",
"longDescription": "Displays ICMP ping response times as a color gradient depending the average round-trip time duration",
"version": "1.1.1",
"description": "Displays network latency as a color gradient.",
"longDescription": "Displays ICMP ping response times as a color gradient depending the average round-trip time duration.",
"officialProductName": "ICMP Ping",
"appUrl": "",
"publisher": "Connor Kennedy",
"isSingleton": false,
"videoUrl": "",
"icon": "assets/icon.png",
"image": "assets/dashboard_example.png",
"image": "assets/image.png",
"authorName": "Connor Kennedy",
"authorUrl": "https://github.com/Conroman16",
"issuesUrl": "https://github.com/Conroman16/daskeyboard-applet--ping-time/issues",
"homePageUrl": "https://github.com/Conroman16/daskeyboard-applet--ping-time",
"developerRepoUrl": "https://github.com/Conroman16/daskeyboard-applet--ping-time",
"issuesUrl": "https://github.com/Conroman16/daskeyboard-applet--icmp-ping/issues",
"homePageUrl": "https://github.com/Conroman16/daskeyboard-applet--icmp-ping",
"developerRepoUrl": "https://github.com/Conroman16/daskeyboard-applet--icmp-ping",
"licenseUrl": "https://opensource.org/licenses/MIT",
"changelogUrl": "CHANGELOG.md",
"readMeUrl": "README.md",
Expand Down Expand Up @@ -44,6 +44,7 @@
"key": "pingAddress",
"label": "Address",
"help": "Address of server to ICMP ping",
"placeholder":"e.g. www.example.com",
"required": true,
"order": 1,
"controlType": "textbox"
Expand Down
Loading

0 comments on commit 225b83a

Please sign in to comment.