feat: more blocks, view other boards, taller buttons
This commit is contained in:
parent
846b934ed2
commit
f1d29a2a5b
|
@ -1,34 +1,34 @@
|
||||||
services:
|
services:
|
||||||
# scylla:
|
scylla:
|
||||||
# image: scylladb/scylla:latest
|
image: scylladb/scylla:latest
|
||||||
# container_name: scylla
|
container_name: scylla
|
||||||
# restart: always
|
restart: always
|
||||||
# ports:
|
ports:
|
||||||
# - "9042:9042"
|
- "9042:9042"
|
||||||
# volumes:
|
volumes:
|
||||||
# - scylla_data1:/var/lib/scylla
|
- /mnt/temp:/var/lib/scylla
|
||||||
# networks:
|
networks:
|
||||||
# - scylla-network
|
- scylla-network
|
||||||
# healthcheck:
|
# healthcheck:
|
||||||
# test: ["CMD-SHELL", "curl -f http://localhost:10000/metrics || exit 1"]
|
# test: ["CMD-SHELL", "curl -f http://localhost:10000/metrics || exit 1"]
|
||||||
# interval: 30s
|
# interval: 30s
|
||||||
# timeout: 10s
|
# timeout: 10s
|
||||||
# retries: 5
|
# retries: 5
|
||||||
|
|
||||||
queueb:
|
# queueb:
|
||||||
image: maxwellmichael/paradisbend:QB-Latest
|
# image: maxwellmichael/paradisbend:QB-Latest
|
||||||
container_name: queueb
|
# container_name: queueb
|
||||||
restart: always
|
# restart: always
|
||||||
ports:
|
# ports:
|
||||||
- "3000:3000"
|
# - "3000:3000"
|
||||||
networks:
|
# networks:
|
||||||
- scylla-network
|
# - scylla-network
|
||||||
environment:
|
# environment:
|
||||||
- SCYLLA_HOST=scylla
|
# - SCYLLA_HOST=scylla
|
||||||
depends_on:
|
# depends_on:
|
||||||
- scylla
|
# - scylla
|
||||||
scylla:
|
# scylla:
|
||||||
condition: service_healthy
|
# condition: service_healthy
|
||||||
|
|
||||||
# volumes:
|
# volumes:
|
||||||
# scylla_data1:
|
# scylla_data1:
|
||||||
|
|
|
@ -8,9 +8,9 @@ async function sydb(client) {
|
||||||
"CREATE TABLE IF NOT EXISTS qb.scores (id UUID, username TEXT, email TEXT, day INT, count INT, score INT, cube TEXT, PRIMARY KEY (day, score, username, id));";
|
"CREATE TABLE IF NOT EXISTS qb.scores (id UUID, username TEXT, email TEXT, day INT, count INT, score INT, cube TEXT, PRIMARY KEY (day, score, username, id));";
|
||||||
let blocks =
|
let blocks =
|
||||||
"CREATE TABLE IF NOT EXISTS qb.blocks (day INT PRIMARY KEY, blocks list<int>);";
|
"CREATE TABLE IF NOT EXISTS qb.blocks (day INT PRIMARY KEY, blocks list<int>);";
|
||||||
//let drop = "DROP TABLE qb.scores;"
|
let drop = "DROP TABLE qb.blocks;"
|
||||||
|
|
||||||
let queries = [keyspace, users, blocks, scores];
|
let queries = [keyspace, drop, users, blocks, scores];
|
||||||
|
|
||||||
async function executeQueries() {
|
async function executeQueries() {
|
||||||
for (const query of queries) {
|
for (const query of queries) {
|
||||||
|
|
|
@ -13,7 +13,7 @@ let hof = [];
|
||||||
let blockList = [
|
let blockList = [
|
||||||
[0, 1, 1, 0, 1, 1, 1, 3, 1, 1, 1, 1, 0, 1, 1, 0],
|
[0, 1, 1, 0, 1, 1, 1, 3, 1, 1, 1, 1, 0, 1, 1, 0],
|
||||||
[1, 1, 0, 0, 1, 1, 3, 1, 1, 0, 0, 0, 1, 0, 0, 0],
|
[1, 1, 0, 0, 1, 1, 3, 1, 1, 0, 0, 0, 1, 0, 0, 0],
|
||||||
[0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1],
|
[0, 0, 1, 0, 1, 1, 3, 1, 0, 0, 1, 0, 0, 0, 1, 1],
|
||||||
[1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 3, 1],
|
[1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 3, 1],
|
||||||
[0, 0, 1, 0, 0, 1, 1, 0, 0, 3, 1, 0, 1, 1, 1, 1],
|
[0, 0, 1, 0, 0, 1, 1, 0, 0, 3, 1, 0, 1, 1, 1, 1],
|
||||||
[1, 0, 0, 1, 1, 0, 0, 1, 1, 0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 1, 1, 1, 0, 0, 0, 1],
|
||||||
|
[1, 1, 0, 3, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0],
|
||||||
|
[0, 0, 0, 1, 1, 1, 3, 1, 0, 0, 0, 1, 1, 1, 1, 1],
|
||||||
|
[0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0],
|
||||||
|
[1, 0, 0, 1, 1, 3, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0]
|
||||||
];
|
];
|
||||||
|
|
||||||
let dailyBlocks = [];
|
let dailyBlocks = [];
|
||||||
|
@ -75,7 +90,7 @@ async function getBlocks(date) {
|
||||||
async function makeBlocks(date) {
|
async function makeBlocks(date) {
|
||||||
const randomInts = [];
|
const randomInts = [];
|
||||||
for (let i = 0; i < 25; i++) {
|
for (let i = 0; i < 25; i++) {
|
||||||
const randInt = Math.floor(Math.random() * 18); // Generates a random integer between 0 and 50
|
const randInt = Math.floor(Math.random() * (blockList.length - 1)); // Generates a random integer between 0 and 50
|
||||||
randomInts.push(randInt);
|
randomInts.push(randInt);
|
||||||
}
|
}
|
||||||
//return randomInts;
|
//return randomInts;
|
||||||
|
@ -145,7 +160,7 @@ app.get("/", (req, res) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get("/api/blocks", (req, res) => {
|
app.get("/api/blocks", (req, res) => {
|
||||||
console.log(dailyBlocks[0]);
|
//console.log(dailyBlocks[0]);
|
||||||
let data = {blocks: dailyBlocks, day: getDay(0)}
|
let data = {blocks: dailyBlocks, day: getDay(0)}
|
||||||
res.send(data);
|
res.send(data);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue