Compare commits
14 Commits
7be9339645
...
mb-npm-cho
Author | SHA1 | Date | |
---|---|---|---|
![]() |
397092bff5 | ||
627a515a42 | |||
1c6421139d | |||
f4509b8504 | |||
b53b8b6f0b | |||
3f76e5be78 | |||
a14a76399e | |||
b15050cd63 | |||
2907ed5caf | |||
bc8cd88af4 | |||
539d299c1a | |||
f0936c7784 | |||
59478a5ee1 | |||
2f5d483bff |
@@ -63,16 +63,16 @@ jobs:
|
|||||||
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
|
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
|
||||||
chmod 600 ~/.ssh/id_rsa
|
chmod 600 ~/.ssh/id_rsa
|
||||||
|
|
||||||
scp -C target/$CARGO_TARGET/release/rot $SSH_USER@$SSH_HOST:/home/rowing-staging/rot-updating
|
scp -C target/$CARGO_TARGET/release/rot $SSH_USER@$SSH_HOST:/root/rowing-staging/rot-updating
|
||||||
|
|
||||||
scp -C staging-diff.sql $SSH_USER@$SSH_HOST:/home/rowing-staging/
|
scp -C staging-diff.sql $SSH_USER@$SSH_HOST:/root/rowing-staging/
|
||||||
scp -C -r static $SSH_USER@$SSH_HOST:/home/rowing-staging/
|
scp -C -r static $SSH_USER@$SSH_HOST:/root/rowing-staging/
|
||||||
scp -C -r templates $SSH_USER@$SSH_HOST:/home/rowing-staging/
|
scp -C -r templates $SSH_USER@$SSH_HOST:/root/rowing-staging/
|
||||||
scp -C -r svelte $SSH_USER@$SSH_HOST:/home/rowing-staging/
|
scp -C -r svelte $SSH_USER@$SSH_HOST:/root/rowing-staging/
|
||||||
ssh $SSH_USER@$SSH_HOST 'sudo systemctl stop rotstaging'
|
ssh $SSH_USER@$SSH_HOST 'sudo systemctl stop rowing-staging'
|
||||||
ssh $SSH_USER@$SSH_HOST 'rm /home/rowing-staging/db.sqlite && cp /home/rowing/db.sqlite /home/rowing-staging/db.sqlite && mkdir -p /home/rowing-staging/svelte/build && mkdir -p /home/rowing-staging/data-ergo/thirty && mkdir -p /home/rowing-staging/data-ergo/dozen && sqlite3 /home/rowing-staging/db.sqlite < /home/rowing-staging/staging-diff.sql'
|
ssh $SSH_USER@$SSH_HOST 'rm -f /root/rowing-staging/db.sqlite && cp /root/rowing-prod/db.sqlite /root/rowing-staging/db.sqlite && mkdir -p /root/rowing-staging/svelte/build && mkdir -p /root/rowing-staging/data-ergo/thirty && mkdir -p /root/rowing-staging/data-ergo/dozen && sqlite3 /root/rowing-staging/db.sqlite < /root/rowing-staging/staging-diff.sql'
|
||||||
ssh $SSH_USER@$SSH_HOST 'mv /home/rowing-staging/rot-updating /home/rowing-staging/rot'
|
ssh $SSH_USER@$SSH_HOST 'mv /root/rowing-staging/rot-updating /root/rowing-staging/rot'
|
||||||
ssh $SSH_USER@$SSH_HOST 'sudo systemctl start rotstaging'
|
ssh $SSH_USER@$SSH_HOST 'sudo systemctl start rowing-staging'
|
||||||
env:
|
env:
|
||||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
SSH_HOST: ${{ secrets.SSH_HOST }}
|
SSH_HOST: ${{ secrets.SSH_HOST }}
|
||||||
@@ -106,14 +106,14 @@ jobs:
|
|||||||
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
|
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
|
||||||
chmod 600 ~/.ssh/id_rsa
|
chmod 600 ~/.ssh/id_rsa
|
||||||
|
|
||||||
scp -C target/$CARGO_TARGET/release/rot $SSH_USER@$SSH_HOST:/home/rowing/rot-updating
|
scp -C target/$CARGO_TARGET/release/rot $SSH_USER@$SSH_HOST:/root/rowing-prod/rot-updating
|
||||||
scp -C -r static $SSH_USER@$SSH_HOST:/home/rowing/
|
scp -C -r static $SSH_USER@$SSH_HOST:/root/rowing-prod/
|
||||||
scp -C -r templates $SSH_USER@$SSH_HOST:/home/rowing/
|
scp -C -r templates $SSH_USER@$SSH_HOST:/root/rowing-prod/
|
||||||
scp -C -r svelte $SSH_USER@$SSH_HOST:/home/rowing/
|
scp -C -r svelte $SSH_USER@$SSH_HOST:/root/rowing-prod/
|
||||||
ssh $SSH_USER@$SSH_HOST 'mkdir -p /home/rowing/svelte/build && mkdir -p /home/rowing/data-ergo/thirty && mkdir -p /home/rowing/data-ergo/dozen'
|
ssh $SSH_USER@$SSH_HOST 'mkdir -p /root/rowing-prod/svelte/build && mkdir -p /root/rowing-prod/data-ergo/thirty && mkdir -p /root/rowing-prod/data-ergo/dozen'
|
||||||
ssh $SSH_USER@$SSH_HOST 'sudo systemctl stop rot'
|
ssh $SSH_USER@$SSH_HOST 'sudo systemctl stop rowing-prod'
|
||||||
ssh $SSH_USER@$SSH_HOST 'mv /home/rowing/rot-updating /home/rowing/rot'
|
ssh $SSH_USER@$SSH_HOST 'mv /root/rowing-prod/rot-updating /root/rowing-prod/rot'
|
||||||
ssh $SSH_USER@$SSH_HOST 'sudo systemctl start rot'
|
ssh $SSH_USER@$SSH_HOST 'sudo systemctl start rowing-prod'
|
||||||
env:
|
env:
|
||||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
SSH_HOST: ${{ secrets.SSH_HOST }}
|
SSH_HOST: ${{ secrets.SSH_HOST }}
|
||||||
|
2
fd
2
fd
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
scp root@128.140.64.118:/home/rowing/db.sqlite db.sqlite
|
scp root@app.rudernlinz.at:/root/rowing-prod/db.sqlite db.sqlite
|
||||||
#sqlite3 db.sqlite < seeds.sql
|
#sqlite3 db.sqlite < seeds.sql
|
||||||
|
|
||||||
|
@@ -413,6 +413,7 @@ function initNewChoice(select: HTMLInputElement) {
|
|||||||
steering_person.setAttribute("required", "required");
|
steering_person.setAttribute("required", "required");
|
||||||
}
|
}
|
||||||
const choice = new Choices(select, {
|
const choice = new Choices(select, {
|
||||||
|
searchResultLimit: -1,
|
||||||
searchFields: ["label", "value", "customProperties.searchableText"],
|
searchFields: ["label", "value", "customProperties.searchableText"],
|
||||||
removeItemButton: true,
|
removeItemButton: true,
|
||||||
loadingText: "Wird geladen...",
|
loadingText: "Wird geladen...",
|
||||||
@@ -425,6 +426,7 @@ function initNewChoice(select: HTMLInputElement) {
|
|||||||
return `Nur ${maxItemCount} Ruderer können hinzugefügt werden`;
|
return `Nur ${maxItemCount} Ruderer können hinzugefügt werden`;
|
||||||
},
|
},
|
||||||
callbackOnInit: function () {
|
callbackOnInit: function () {
|
||||||
|
console.log(this);
|
||||||
this._currentState.items.forEach(function (obj) {
|
this._currentState.items.forEach(function (obj) {
|
||||||
if (boat_in_ottensheim && obj.customProperties) {
|
if (boat_in_ottensheim && obj.customProperties) {
|
||||||
if (obj.customProperties.is_racing) {
|
if (obj.customProperties.is_racing) {
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
"vite-plugin-static-copy": "^0.13.1"
|
"vite-plugin-static-copy": "^0.13.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"choices.js": "^10.2.0",
|
"choices.js": "^11.1.0",
|
||||||
"d3": "^7.8.5",
|
"d3": "^7.8.5",
|
||||||
"terser": "^5.21.0"
|
"terser": "^5.21.0"
|
||||||
}
|
}
|
||||||
|
@@ -431,7 +431,7 @@ WHERE family_id IS NULL;
|
|||||||
"
|
"
|
||||||
SELECT id, name, pw, deleted, last_access, dob, weight, sex, member_since_date, birthdate, mail, nickname, phone, address, family_id, user_token
|
SELECT id, name, pw, deleted, last_access, dob, weight, sex, member_since_date, birthdate, mail, nickname, phone, address, family_id, user_token
|
||||||
FROM user
|
FROM user
|
||||||
WHERE deleted = 0 AND (SELECT COUNT(*) FROM user_role WHERE user_id=user.id AND role_id = (SELECT id FROM role WHERE name = 'cox')) > 0
|
WHERE deleted = 0 AND (SELECT COUNT(*) FROM user_role WHERE user_id=user.id AND role_id in (SELECT id FROM role WHERE name = 'cox' or name = 'Bootsführer')) > 0
|
||||||
ORDER BY last_access DESC
|
ORDER BY last_access DESC
|
||||||
"
|
"
|
||||||
)
|
)
|
||||||
@@ -856,7 +856,7 @@ special_user!(ErgoUser, +"ergo");
|
|||||||
special_user!(SteeringUser, +"cox", +"Bootsführer");
|
special_user!(SteeringUser, +"cox", +"Bootsführer");
|
||||||
special_user!(AdminUser, +"admin");
|
special_user!(AdminUser, +"admin");
|
||||||
special_user!(AllowedForPlannedTripsUser, +"Donau Linz", +"scheckbuch", +"Förderndes Mitglied");
|
special_user!(AllowedForPlannedTripsUser, +"Donau Linz", +"scheckbuch", +"Förderndes Mitglied");
|
||||||
special_user!(DonauLinzUser, +"Donau Linz", -"Unterstützend", -"Förderndes Mitglied"); // TODO:
|
special_user!(DonauLinzUser, +"Donau Linz", +"Förderndes Mitglied", -"Unterstützend"); // TODO:
|
||||||
// remove ->
|
// remove ->
|
||||||
// RegularUser
|
// RegularUser
|
||||||
special_user!(SchnupperBetreuerUser, +"schnupper-betreuer");
|
special_user!(SchnupperBetreuerUser, +"schnupper-betreuer");
|
||||||
|
@@ -62,7 +62,8 @@ async fn index_loggedin(
|
|||||||
&UserWithDetails::from_user(user.into_inner(), db).await,
|
&UserWithDetails::from_user(user.into_inner(), db).await,
|
||||||
);
|
);
|
||||||
|
|
||||||
index(db, flash, context).await
|
let context = index(db, flash, context).await;
|
||||||
|
Template::render("log", context.into_json())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[get("/")]
|
#[get("/")]
|
||||||
@@ -78,10 +79,11 @@ async fn index_kiosk(
|
|||||||
|
|
||||||
context.insert("show_kiosk_header", &true);
|
context.insert("show_kiosk_header", &true);
|
||||||
|
|
||||||
index(db, flash, context).await
|
let context = index(db, flash, context).await;
|
||||||
|
Template::render("kiosk", context.into_json())
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn index(db: &SqlitePool, flash: Option<FlashMessage<'_>>, mut context: Context) -> Template {
|
async fn index(db: &SqlitePool, flash: Option<FlashMessage<'_>>, mut context: Context) -> Context {
|
||||||
if let Some(msg) = flash {
|
if let Some(msg) = flash {
|
||||||
context.insert("flash", &msg.into_inner());
|
context.insert("flash", &msg.into_inner());
|
||||||
}
|
}
|
||||||
@@ -120,7 +122,7 @@ async fn index(db: &SqlitePool, flash: Option<FlashMessage<'_>>, mut context: Co
|
|||||||
context.insert("on_water", &on_water);
|
context.insert("on_water", &on_water);
|
||||||
context.insert("distances", &distances);
|
context.insert("distances", &distances);
|
||||||
|
|
||||||
Template::render("kiosk", context.into_json())
|
context
|
||||||
}
|
}
|
||||||
|
|
||||||
#[get("/show", rank = 3)]
|
#[get("/show", rank = 3)]
|
||||||
|
Reference in New Issue
Block a user