Skip to content

Commit

Permalink
Remove client logging, add friendly UX, update frontend to latest com…
Browse files Browse the repository at this point in the history
…mit.
  • Loading branch information
gmemstr committed May 4, 2019
1 parent ad5766b commit 8bec1b4
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 42 deletions.
12 changes: 10 additions & 2 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"encoding/json"
"fmt"
"github.com/go-yaml/yaml"
"github.com/gorilla/websocket"
"github.com/shirou/gopsutil/cpu"
Expand Down Expand Up @@ -44,6 +45,14 @@ func main() {
}

addr := conf.Master
if addr == "" {
fmt.Println("Missing master server URL, please edit your config.yml")
os.Exit(1)
}
if conf.Secret == "" {
fmt.Println("Missing master server secret key, please edit your config.yml")
os.Exit(1)
}
u := url.URL{Scheme: "ws", Host: addr, Path: "/stats"}
c, _, err := websocket.DefaultDialer.Dial(u.String(), nil)
if err != nil {
Expand All @@ -61,11 +70,10 @@ func main() {
go func() {
defer close(done)
for {
_, message, err := c.ReadMessage()
_, _, err := c.ReadMessage()
if err != nil {
break
}
log.Printf("recv: %v", message)
}
}()

Expand Down
14 changes: 7 additions & 7 deletions web/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"main.css": "/static/css/main.0508ec29.chunk.css",
"main.js": "/static/js/main.cfe6a328.chunk.js",
"main.js.map": "/static/js/main.cfe6a328.chunk.js.map",
"main.css": "/static/css/main.d78aed46.chunk.css",
"main.js": "/static/js/main.b1c4488b.chunk.js",
"main.js.map": "/static/js/main.b1c4488b.chunk.js.map",
"runtime~main.js": "/static/js/runtime~main.a8a9905a.js",
"runtime~main.js.map": "/static/js/runtime~main.a8a9905a.js.map",
"static/js/2.0f58faaa.chunk.js": "/static/js/2.0f58faaa.chunk.js",
"static/js/2.0f58faaa.chunk.js.map": "/static/js/2.0f58faaa.chunk.js.map",
"static/js/2.2668f2aa.chunk.js": "/static/js/2.2668f2aa.chunk.js",
"static/js/2.2668f2aa.chunk.js.map": "/static/js/2.2668f2aa.chunk.js.map",
"index.html": "/index.html",
"precache-manifest.01aedb2ed2ef840338ddc85fd9afd892.js": "/precache-manifest.01aedb2ed2ef840338ddc85fd9afd892.js",
"precache-manifest.05368f6ab5abf2f58e58ee5b080e5c12.js": "/precache-manifest.05368f6ab5abf2f58e58ee5b080e5c12.js",
"service-worker.js": "/service-worker.js",
"static/css/main.0508ec29.chunk.css.map": "/static/css/main.0508ec29.chunk.css.map"
"static/css/main.d78aed46.chunk.css.map": "/static/css/main.d78aed46.chunk.css.map"
}
2 changes: 1 addition & 1 deletion web/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><meta name="theme-color" content="#000000"/><link rel="manifest" href="/manifest.json"/><title>Platypus</title><link href="/static/css/main.0508ec29.chunk.css" rel="stylesheet"></head><body><a href="https://github.com/gmemstr/platypus" class="github-corner" aria-label="View source on GitHub"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#fff;color:#151513;position:absolute;top:0;border:0;right:0" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin:130px 106px" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style><h1>Platypus Server Status</h1><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(l){function e(e){for(var r,t,n=e[0],o=e[1],u=e[2],f=0,i=[];f<n.length;f++)t=n[f],p[t]&&i.push(p[t][0]),p[t]=0;for(r in o)Object.prototype.hasOwnProperty.call(o,r)&&(l[r]=o[r]);for(s&&s(e);i.length;)i.shift()();return c.push.apply(c,u||[]),a()}function a(){for(var e,r=0;r<c.length;r++){for(var t=c[r],n=!0,o=1;o<t.length;o++){var u=t[o];0!==p[u]&&(n=!1)}n&&(c.splice(r--,1),e=f(f.s=t[0]))}return e}var t={},p={1:0},c=[];function f(e){if(t[e])return t[e].exports;var r=t[e]={i:e,l:!1,exports:{}};return l[e].call(r.exports,r,r.exports,f),r.l=!0,r.exports}f.m=l,f.c=t,f.d=function(e,r,t){f.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(r,e){if(1&e&&(r=f(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var t=Object.create(null);if(f.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var n in r)f.d(t,n,function(e){return r[e]}.bind(null,n));return t},f.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(r,"a",r),r},f.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},f.p="/";var r=window.webpackJsonp=window.webpackJsonp||[],n=r.push.bind(r);r.push=e,r=r.slice();for(var o=0;o<r.length;o++)e(r[o]);var s=n;a()}([])</script><script src="/static/js/2.0f58faaa.chunk.js"></script><script src="/static/js/main.cfe6a328.chunk.js"></script></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><meta name="theme-color" content="#000000"/><link rel="manifest" href="/manifest.json"/><title>Platypus</title><link href="/static/css/main.d78aed46.chunk.css" rel="stylesheet"></head><body><a href="https://github.com/gmemstr/platypus" class="github-corner" aria-label="View source on GitHub"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#fff;color:#151513;position:absolute;top:0;border:0;right:0" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin:130px 106px" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style><h1>Platypus Server Status</h1><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(l){function e(e){for(var r,t,n=e[0],o=e[1],u=e[2],f=0,i=[];f<n.length;f++)t=n[f],p[t]&&i.push(p[t][0]),p[t]=0;for(r in o)Object.prototype.hasOwnProperty.call(o,r)&&(l[r]=o[r]);for(s&&s(e);i.length;)i.shift()();return c.push.apply(c,u||[]),a()}function a(){for(var e,r=0;r<c.length;r++){for(var t=c[r],n=!0,o=1;o<t.length;o++){var u=t[o];0!==p[u]&&(n=!1)}n&&(c.splice(r--,1),e=f(f.s=t[0]))}return e}var t={},p={1:0},c=[];function f(e){if(t[e])return t[e].exports;var r=t[e]={i:e,l:!1,exports:{}};return l[e].call(r.exports,r,r.exports,f),r.l=!0,r.exports}f.m=l,f.c=t,f.d=function(e,r,t){f.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(r,e){if(1&e&&(r=f(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var t=Object.create(null);if(f.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var n in r)f.d(t,n,function(e){return r[e]}.bind(null,n));return t},f.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(r,"a",r),r},f.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},f.p="/";var r=window.webpackJsonp=window.webpackJsonp||[],n=r.push.bind(r);r.push=e,r=r.slice();for(var o=0;o<r.length;o++)e(r[o]);var s=n;a()}([])</script><script src="/static/js/2.2668f2aa.chunk.js"></script><script src="/static/js/main.b1c4488b.chunk.js"></script></body></html>
22 changes: 0 additions & 22 deletions web/precache-manifest.01aedb2ed2ef840338ddc85fd9afd892.js

This file was deleted.

2 changes: 1 addition & 1 deletion web/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.3/workbox-sw.js");

importScripts(
"/precache-manifest.01aedb2ed2ef840338ddc85fd9afd892.js"
"/precache-manifest.05368f6ab5abf2f58e58ee5b080e5c12.js"
);

workbox.clientsClaim();
Expand Down
2 changes: 0 additions & 2 deletions web/static/css/main.0508ec29.chunk.css

This file was deleted.

1 change: 0 additions & 1 deletion web/static/css/main.0508ec29.chunk.css.map

This file was deleted.

2 changes: 0 additions & 2 deletions web/static/js/2.0f58faaa.chunk.js

This file was deleted.

1 change: 0 additions & 1 deletion web/static/js/2.0f58faaa.chunk.js.map

This file was deleted.

2 changes: 0 additions & 2 deletions web/static/js/main.cfe6a328.chunk.js

This file was deleted.

Loading

0 comments on commit 8bec1b4

Please sign in to comment.