From c984bc1adf4fa6b168f9925adef2db20482f2c8b Mon Sep 17 00:00:00 2001 From: manuel83 Date: Mon, 7 Jan 2019 22:34:11 +0100 Subject: [PATCH] config change --- .gitignore | 3 +- .idea/misc.xml | 3 + .idea/workspace.xml | 920 ++++++++++++++++++++++++++------------------ config/config.yaml | 1 + craftbeerpi.db | Bin 53248 -> 53248 bytes requirements.txt | 2 +- samples.txt | 51 +++ setup.py | 2 +- 8 files changed, 613 insertions(+), 369 deletions(-) create mode 100644 samples.txt diff --git a/.gitignore b/.gitignore index e5d8a41..e62999f 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ dist .idea *.log cbpi.egg-info -logs \ No newline at end of file +logs +cbpi/extension/ui \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index f83f698..1dc20ae 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,7 @@ + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 994fc39..5b19fe7 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,10 +2,13 @@ - + + + + - - - - - - - + + + + + + + + - @@ -279,7 +355,7 @@ - + - @@ -563,18 +640,18 @@ - + - + - + - + @@ -586,12 +663,12 @@ - + - + @@ -633,317 +710,428 @@ - + - - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + + + + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + diff --git a/config/config.yaml b/config/config.yaml index 59aa9ff..ebef840 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -6,6 +6,7 @@ index_url: /api/doc port: 8080 +# login data username: cbpi password: 123 diff --git a/craftbeerpi.db b/craftbeerpi.db index fa97ecf488b5f694dfec70b68e9287499831dd91..e17d82d7054e453f5a0edcc660ad4b8ddfcc406b 100644 GIT binary patch delta 871 zcmaiyPe>F|9LL|xyw&|PZ@xQivZ$#Ox`(o`StZCz%B~RjZ*iv%738La7`bci28ro< z4kF`GmoAn;bW7$?)Wwbo7E1>s3Qv(8!$YT_H#@T>b!gsYzHfft@B4jzZ+ zS*qMUl#(jz7IjtxHR2&6=*&|Gn5xw#UA)9rp2m z%bAT{VF9H_A&l>|+@RV!lHnIxOOy~P$lq6A$O<298xuREmp^Pf77kK{#4Wp6N;=zZ z$D=C6l8n!IfqPhTq9^j`XrKWSYuA&>Wa@gcRG8_XC>7=w77r@{(%9Z!Roy(7JSds` z`RQ}g9Ukp#aXR}Z(JBs!>j~X7J!96+7hPwk93Y9r5&n9(gI7kogEH0#HnGN|nI>*z zsB<(kj{^x=B{6_>=@2=lc=-Con7n8@o0od~T2)vC-|+<>@CGmO6c2D4%eaQiu(06h zZ0^$*c1?jIfxOiX3UeeeB{Up5ZO_ zu!c{_V*@$d!g)uZ?L^syl6)wasX>VSdnyyTZb6kZ;wuj`?AKcYGUS`8j6q*i5$hoc pMM7=lb+ttISLm4w_|m%|>PNbKikNB4HKxhZ^MsJB9fW{2lJ&- zFbJIG9ST}%h`=SHK^nrLAtIU@T#T}A=w hZ)aV8nLGSRu=jZzFD(ptxSXj$)NwH*sa(FU;RgT)YrOyf diff --git a/requirements.txt b/requirements.txt index c019d57..f0381c6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,4 +8,4 @@ aiojobs==0.2.2 aiosqlite==0.7.0 cryptography==2.3.1 voluptuous==0.11.5 -pyfigle==0.7.6 \ No newline at end of file +pyfiglet==0.7.6 \ No newline at end of file diff --git a/samples.txt b/samples.txt new file mode 100644 index 0000000..79fd3e8 --- /dev/null +++ b/samples.txt @@ -0,0 +1,51 @@ +function noop() {} + +export default function (url, opts) { + opts = opts || {}; + + var ws, num=0, $={}; + var max = opts.maxAttempts || Infinity; + + $.open = function () { + ws = new WebSocket(url, opts.protocols || []); + + ws.onmessage = opts.onmessage || noop; + + ws.onopen = function (e) { + (opts.onopen || noop)(e); + num = 0; + }; + + ws.onclose = function (e) { + e.code === 1e3 || e.code === 1005 || $.reconnect(e); + (opts.onclose || noop)(e); + }; + + ws.onerror = function (e) { + (e && e.code==='ECONNREFUSED') ? $.reconnect(e) : (opts.onerror || noop)(e); + }; + }; + + $.reconnect = function (e) { + (num++ < max) ? setTimeout(function () { + (opts.onreconnect || noop)(e); + $.open(); + }, opts.timeout || 1e3) : (opts.onmaximum || noop)(e); + }; + + $.json = function (x) { + ws.send(JSON.stringify(x)); + }; + + $.send = function (x) { + ws.send(x); + }; + + $.close = function (x, y) { + ws.close(x || 1e3, y); + }; + + $.open(); // init + + return $; +} \ No newline at end of file diff --git a/setup.py b/setup.py index 02f132d..90f8bef 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages setup(name='cbpi', - version='4.0.3', + version='4.0.4', description='CraftBeerPi API', author='Manuel Fritsch', author_email='manuel@craftbeerpi.com',