diff --git a/client/client.go b/client/client.go index 4bea6ce..a674318 100644 --- a/client/client.go +++ b/client/client.go @@ -2,6 +2,7 @@ package main import ( "encoding/json" + "fmt" "github.com/go-yaml/yaml" "github.com/gorilla/websocket" "github.com/shirou/gopsutil/cpu" @@ -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 { @@ -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) } }() diff --git a/web/asset-manifest.json b/web/asset-manifest.json index 650f5e8..675ff7b 100644 --- a/web/asset-manifest.json +++ b/web/asset-manifest.json @@ -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" } \ No newline at end of file diff --git a/web/index.html b/web/index.html index 739656d..ae2a7a5 100644 --- a/web/index.html +++ b/web/index.html @@ -1 +1 @@ -Platypus

Platypus Server Status

\ No newline at end of file +Platypus

Platypus Server Status

\ No newline at end of file diff --git a/web/precache-manifest.01aedb2ed2ef840338ddc85fd9afd892.js b/web/precache-manifest.01aedb2ed2ef840338ddc85fd9afd892.js deleted file mode 100644 index 5ddfdf0..0000000 --- a/web/precache-manifest.01aedb2ed2ef840338ddc85fd9afd892.js +++ /dev/null @@ -1,22 +0,0 @@ -self.__precacheManifest = [ - { - "revision": "dd5b86ce236c1c4592a3", - "url": "/static/css/main.0508ec29.chunk.css" - }, - { - "revision": "dd5b86ce236c1c4592a3", - "url": "/static/js/main.cfe6a328.chunk.js" - }, - { - "revision": "42ac5946195a7306e2a5", - "url": "/static/js/runtime~main.a8a9905a.js" - }, - { - "revision": "baf961a1263ccd6a2d24", - "url": "/static/js/2.0f58faaa.chunk.js" - }, - { - "revision": "fd847b7f9f8c7d6f94b692d5690fd471", - "url": "/index.html" - } -]; \ No newline at end of file diff --git a/web/service-worker.js b/web/service-worker.js index 257e2f7..f000f1d 100644 --- a/web/service-worker.js +++ b/web/service-worker.js @@ -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(); diff --git a/web/static/css/main.0508ec29.chunk.css b/web/static/css/main.0508ec29.chunk.css deleted file mode 100644 index cd560df..0000000 --- a/web/static/css/main.0508ec29.chunk.css +++ /dev/null @@ -1,2 +0,0 @@ -body{background-color:#1b2936;color:#fff;margin:0;padding:0;font-family:sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}h1{text-align:center}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.App{margin:20px 0;text-align:center;display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center}.Server,.ServersHeading{display:grid;grid-template-columns:repeat(4,1fr);padding:1em}.Server:nth-child(odd){background-color:#414f5c} -/*# sourceMappingURL=main.0508ec29.chunk.css.map */ \ No newline at end of file diff --git a/web/static/css/main.0508ec29.chunk.css.map b/web/static/css/main.0508ec29.chunk.css.map deleted file mode 100644 index 6d5aa8b..0000000 --- a/web/static/css/main.0508ec29.chunk.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["/home/gabriel/Projects/platypus-react/src/index.css","main.0508ec29.chunk.css","/home/gabriel/Projects/platypus-react/src/App.css"],"names":[],"mappings":"AAAA,KACE,wBAAA,CACA,UAAA,CACA,QAAA,CACA,SAAA,CACA,sBAAA,CACA,kCAAA,CACA,iCCCF,CDEA,GACE,iBCCF,CDEA,KACE,uECEF,CCjBA,KACE,aAAA,CACA,iBAAA,CACA,oBAAA,CAAA,YAAA,CACA,8BAAA,CAAA,sBDsBF,CCnBA,wBACE,YAAA,CACA,mCAAA,CACA,WDsBF,CCnBA,uBACE,wBDsBF","file":"main.0508ec29.chunk.css","sourcesContent":["body {\n background-color: #1b2936;\n color: #ffffff;\n margin: 0;\n padding: 0;\n font-family: sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\nh1 {\n text-align: center;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, \"Courier New\",\n monospace;\n}\n","body {\n background-color: #1b2936;\n color: #ffffff;\n margin: 0;\n padding: 0;\n font-family: sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\nh1 {\n text-align: center;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, \"Courier New\",\n monospace;\n}\n\n.App {\n margin: 20px 0;\n text-align: center;\n display: -webkit-flex;\n display: flex;\n -webkit-justify-content: center;\n justify-content: center;\n}\n\n.Server, .ServersHeading {\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n padding: 1em;\n}\n\n.Server:nth-child(odd) {\n background-color: #414f5c;\n}\n",".App {\n margin: 20px 0;\n text-align: center;\n display: flex;\n justify-content: center;\n}\n\n.Server, .ServersHeading {\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n padding: 1em;\n}\n\n.Server:nth-child(odd) {\n background-color: #414f5c;\n}"]} \ No newline at end of file diff --git a/web/static/js/2.0f58faaa.chunk.js b/web/static/js/2.0f58faaa.chunk.js deleted file mode 100644 index f4c0e80..0000000 --- a/web/static/js/2.0f58faaa.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(10)},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";function r(e,t){for(var n=0;nz.length&&z.push(e)}function U(e,t,n){return null==e?0:function e(t,n,r,l){var a=typeof t;"undefined"!==a&&"boolean"!==a||(t=null);var u=!1;if(null===t)u=!0;else switch(a){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case i:case o:u=!0}}if(u)return r(l,t,""===n?"."+D(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;cthis.eventPool.length&&this.eventPool.push(e)}function fe(e){e.eventPool=[],e.getPooled=ce,e.release=se}l(ue.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=oe)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=oe)},persist:function(){this.isPersistent=oe},isPersistent:ae,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=ae,this._dispatchInstances=this._dispatchListeners=null}}),ue.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},ue.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var i=new t;return l(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=l({},r.Interface,e),n.extend=r.extend,fe(n),n},fe(ue);var de=ue.extend({data:null}),pe=ue.extend({data:null}),me=[9,13,27,32],he=$&&"CompositionEvent"in window,ye=null;$&&"documentMode"in document&&(ye=document.documentMode);var ve=$&&"TextEvent"in window&&!ye,ge=$&&(!he||ye&&8=ye),be=String.fromCharCode(32),ke={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},xe=!1;function we(e,t){switch(e){case"keyup":return-1!==me.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function Te(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var _e=!1;var Se={eventTypes:ke,extractEvents:function(e,t,n,r){var l=void 0,i=void 0;if(he)e:{switch(e){case"compositionstart":l=ke.compositionStart;break e;case"compositionend":l=ke.compositionEnd;break e;case"compositionupdate":l=ke.compositionUpdate;break e}l=void 0}else _e?we(e,n)&&(l=ke.compositionEnd):"keydown"===e&&229===n.keyCode&&(l=ke.compositionStart);return l?(ge&&"ko"!==n.locale&&(_e||l!==ke.compositionStart?l===ke.compositionEnd&&_e&&(i=ie()):(re="value"in(ne=r)?ne.value:ne.textContent,_e=!0)),l=de.getPooled(l,t,n,r),i?l.data=i:null!==(i=Te(n))&&(l.data=i),H(l),i=l):i=null,(e=ve?function(e,t){switch(e){case"compositionend":return Te(t);case"keypress":return 32!==t.which?null:(xe=!0,be);case"textInput":return(e=t.data)===be&&xe?null:e;default:return null}}(e,n):function(e,t){if(_e)return"compositionend"===e||!he&&we(e,t)?(e=ie(),le=re=ne=null,_e=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1