adrian-ortega / duster-brews-dashboard Goto Github PK
View Code? Open in Web Editor NEWI make beer with my friends. This is an app to keep tabs on our beer through a locally hosted website.
License: MIT License
I make beer with my friends. This is an app to keep tabs on our beer through a locally hosted website.
License: MIT License
SVG support babay!
The dashboard is currently pulling ALL rows and returning that information instead of only returning results that match Plaato Keg sheet.
Error happened in getBeersFromGoogleSheets: GaxiosError: The service is currently unavailable.
at Gaxios.<anonymous> (C:\Users\Chris\Documents\Github\Duster-Brews-Dashboard\node_modules\gaxios\build\src\gaxios.js:73:27)
at Generator.next (<anonymous>)
at fulfilled (C:\Users\Chris\Documents\Github\Duster-Brews-Dashboard\node_modules\gaxios\build\src\gaxios.js:16:58)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
response: {
config: {
url: 'https://sheets.googleapis.com/v4/spreadsheets/1BxvDhm1t2vnh5vSwpPjEMgBURN6GGVJhDFkpPJPBoHA/values/Brews%21A2%3AE',
method: 'GET',
paramsSerializer: [Function (anonymous)],
headers: [Object],
params: [Object: null prototype] {},
validateStatus: [Function (anonymous)],
responseType: 'json'
},
data: { error: [Object] },
headers: {
'alt-svc': 'h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"',
'cache-control': 'private',
connection: 'close',
'content-encoding': 'gzip',
'content-type': 'application/json; charset=UTF-8',
date: 'Thu, 08 Sep 2022 08:04:55 GMT',
server: 'ESF',
'transfer-encoding': 'chunked',
vary: 'Origin, X-Origin, Referer',
'x-content-type-options': 'nosniff',
'x-frame-options': 'SAMEORIGIN',
'x-xss-protection': '0'
},
status: 503,
statusText: 'Service Unavailable'
},
config: {
url: 'https://sheets.googleapis.com/v4/spreadsheets/1BxvDhm1t2vnh5vSwpPjEMgBURN6GGVJhDFkpPJPBoHA/values/Brews%21A2%3AE',
method: 'GET',
paramsSerializer: [Function (anonymous)],
headers: {
'Accept-Encoding': 'gzip',
'User-Agent': 'google-api-nodejs-client/0.7.2 (gzip)',
Authorization: 'Bearer ya29.a0AVA9y1t9IKfznyRKueWCtwPuqHSGEdLGMlIUWY4Njdb7rNYEnYpDTONm2dlRa3S7G8XMAlwyaHoC55IXzc3R2aJEM68hvWWy5h7na6nIuTg6jey8unooEAjlI9S5cUepTyKj4p47TCrN66HriPI0hTHFQLN1WMIaCgYKATASAQASFQE65dr8d6Tti9cLmr96AVDNJzKZ_A0166',
Accept: 'application/json'
},
params: [Object: null prototype] {},
validateStatus: [Function (anonymous)],
responseType: 'json'
},
code: 503,
errors: [
{
message: 'The service is currently unavailable.',
domain: 'global',
reason: 'backendError'
}
]
}
Error happened in getKegsFromGoogleSheets: GaxiosError: The service is currently unavailable.
at Gaxios.<anonymous> (C:\Users\Chris\Documents\Github\Duster-Brews-Dashboard\node_modules\gaxios\build\src\gaxios.js:73:27)
at Generator.next (<anonymous>)
at fulfilled (C:\Users\Chris\Documents\Github\Duster-Brews-Dashboard\node_modules\gaxios\build\src\gaxios.js:16:58)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
response: {
config: {
url: 'https://sheets.googleapis.com/v4/spreadsheets/1BxvDhm1t2vnh5vSwpPjEMgBURN6GGVJhDFkpPJPBoHA/values/Plaato%20Keg%20Auth_Tokens%21A2%3AB',
method: 'GET',
paramsSerializer: [Function (anonymous)],
headers: [Object],
params: [Object: null prototype] {},
validateStatus: [Function (anonymous)],
responseType: 'json'
},
data: { error: [Object] },
headers: {
'alt-svc': 'h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"',
'cache-control': 'private',
connection: 'close',
'content-encoding': 'gzip',
'content-type': 'application/json; charset=UTF-8',
date: 'Thu, 08 Sep 2022 08:04:58 GMT',
server: 'ESF',
'transfer-encoding': 'chunked',
vary: 'Origin, X-Origin, Referer',
'x-content-type-options': 'nosniff',
'x-frame-options': 'SAMEORIGIN',
'x-xss-protection': '0'
},
status: 503,
statusText: 'Service Unavailable'
},
config: {
url: 'https://sheets.googleapis.com/v4/spreadsheets/1BxvDhm1t2vnh5vSwpPjEMgBURN6GGVJhDFkpPJPBoHA/values/Plaato%20Keg%20Auth_Tokens%21A2%3AB',
method: 'GET',
paramsSerializer: [Function (anonymous)],
headers: {
'Accept-Encoding': 'gzip',
'User-Agent': 'google-api-nodejs-client/0.7.2 (gzip)',
Authorization: 'Bearer ya29.a0AVA9y1slaRW94B93Iu9GQTzcy9HfPa3i3cHO9HLXvDGDbT_dhsW934Xl9cerJdCHU1drogBkh5JCTWIbgcX8yXsMViLUspjhF283OMusF0R-iVbIuUGUp09Hezx7vC01yG0eb7u959vioapWdivFhXvwmACrSmIaCgYKATASAQASFQE65dr8vM2AllbC54fhf6umnlv6Cg0166',
Accept: 'application/json'
},
params: [Object: null prototype] {},
validateStatus: [Function (anonymous)],
responseType: 'json'
},
code: 503,
errors: [
{
message: 'The service is currently unavailable.',
domain: 'global',
reason: 'backendError'
}
]
}
<--- Last few GCs --->
[18648:0000025F239E6960] 110657349 ms: Mark-sweep 4042.3 (4134.1) -> 4029.4 (4135.3) MB, 3694.5 / 0.0 ms (average mu = 0.155, current mu = 0.054) task scavenge might not succeed
[18648:0000025F239E6960] 110661136 ms: Mark-sweep 4042.6 (4135.3) -> 4030.6 (4136.3) MB, 3605.1 / 0.0 ms (average mu = 0.104, current mu = 0.048) task scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 00007FF7AB887C4F v8::internal::CodeObjectRegistry::~CodeObjectRegistry+114207
2: 00007FF7AB815EC6 DSA_meth_get_flags+65542
3: 00007FF7AB816D7D node::OnFatalError+301
4: 00007FF7AC14B6CE v8::Isolate::ReportExternalAllocationLimitReached+94
5: 00007FF7AC135CAD v8::SharedArrayBuffer::Externalize+781
6: 00007FF7ABFD907C v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1468
7: 00007FF7ABFE5D29 v8::internal::Heap::PublishPendingAllocations+1129
8: 00007FF7ABFE2CFA v8::internal::Heap::PageFlagsAreConsistent+2842
9: 00007FF7ABFD5959 v8::internal::Heap::CollectGarbage+2137
10: 00007FF7ABF85EC5 v8::internal::IndexGenerator::~IndexGenerator+22165
11: 00007FF7AB7A779F std::basic_ostream<char,std::char_traits<char> >::operator<<+80159
12: 00007FF7AB7A5FB6 std::basic_ostream<char,std::char_traits<char> >::operator<<+74038
13: 00007FF7AB8E715B uv_async_send+331
14: 00007FF7AB8E68EC uv_loop_init+1292
15: 00007FF7AB8E6A8A uv_run+202
16: 00007FF7AB8B58F5 node::SpinEventLoop+309
17: 00007FF7AB7CE683 v8::internal::Isolate::stack_guard+53843
18: 00007FF7AB84AC7C node::Start+220
19: 00007FF7AB66873C RC4_options+347708
20: 00007FF7AC6D03D8 v8::internal::compiler::RepresentationChanger::Uint32OverflowOperatorFor+14472
21: 00007FFAC4DE7034 BaseThreadInitThunk+20
22: 00007FFAC67C26A1 RtlUserThreadStart+33
Google is currently returning an error about too many API requests in 1 minute.
While we need Plaato Keg API information as often as possible (for pour and leak reporting) we don’t need information from Google Sheets more than once every 15 minutes.
You said you had an idea for this. This issue is just a reminder. The brewery logos are defined in the spreadsheet. Remember that you need to download the images from the shared drive for the to work.
Remove all mentions of Google, Google Auth Flow and Google Spreadsheets
The dashboard looks great on wide screens. On narrow screens (like a phone) the boxes should stack instead of staying aligned horizontally.
Pull labels from "Duster Brews Dashboard" spreadsheet, "Plaato Keg Auth_Tokens" sheet, "Keg Location" column.
If it's in Plaato, pull it. But like abv and other values, add a field for a local value.
Display ABV rounded to nearest hundredth (e.g., #.##%)
Split logo settings, one for the menu one for the app
Note: in this case, menu means the actual Drinks Menu.
Add this tag:
<meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, user-scalable=no, maximum-scale=1, minimum-scale=1" />
Update logic for Taps (previously tap location)
Fatal errors happen when Plaato Keg information is not returned from API
Taps (previously tap location)
We need a favicon yo. https://svgshare.com/i/k8A.svg
There’s a known bug with the Plaato Keg that sometimes results in pour “burps” (quick pour notifications when there’s really no pour happening).
In the interest of avoiding false positives I propose the following modified functionality:
Only report a “pour” if it lasts more than 5 seconds (I believe that’s the frequency of the API request).
Light up the dashboard if a legitimate pour has happened in the last 5 minutes.
Change as follows
Tap -> Drink
Tap Location -> Tap
Brewery -> Brewery (no change)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.