Skip to content

Commit

Permalink
Release 2.0.2 (#1023)
Browse files Browse the repository at this point in the history
* Release 2.0.2

* Task/fix bug delete stage (#1027)

* Fix bug at backstage can not delete stage

* Fix Bug Studio UI load file i18n form dashboard get 403 code

* Task/fix statis duplicate delete (#1040)

* Move button Clone, Delete from Stage to Stage Management

* Update Code Sort by Created Date and Id DESC

* FIx bug statistics worng

* sort by created date decs

* fix bug statistics wrong

* debug fix statistics on dev-app env

* debug fix statistics wrong

* debug

* debug

* debug

* Fix bug Created_on have the same date after clone

* change "manage stage" to "manage"

* Check upload file limit on studio

* implement player upload limit enhancement

* Update format  size

* Fix does not return to start at end of playing (once mode)

* Add Create_On and last access in backstage

* add create date and last access on backstage

* delete notify

* update "without time zone"

Co-authored-by: TU_COMPUTER\justr <nhtu160220@gmail.com>

* make clear chat to clear player and public chat on stage- clear all chat in clear chat button in stage management (#1042)

* Merge branch 'main' into BlueMoon-2.0.2

* make save chat option on stage (#1048)

* Make separate chat log and make timestamp for file name (#1045)

* Rebase

* Update mail_utils.py

Need a more forgiving encoding scheme.

* Make owner display name in player and edit access column (#1051)

Co-authored-by: fuyloon2018 <62701756+fuyloon2018@users.noreply.github.com>
Co-authored-by: TU_COMPUTER\justr <nhtu160220@gmail.com>
Co-authored-by: tunguyentk <117065175+tunguyentk@users.noreply.github.com>
Co-authored-by: Jamse Liew <liew2018@gmail.com>
  • Loading branch information
5 people authored Jan 15, 2023
1 parent ddbfa32 commit fc477e4
Show file tree
Hide file tree
Showing 18 changed files with 662 additions and 144 deletions.
1 change: 0 additions & 1 deletion studio/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ class Mutation(graphene.ObjectType):
requestPermission = RequestPermission.Field()
quickAssignMutation = QuickAssignMutation.Field()


# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
studio_schema = graphene.Schema(query=Query, mutation=Mutation)
app.add_url_rule(
Expand Down
28 changes: 13 additions & 15 deletions system/prod/certbot_renew_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ DOMAIN=SET_THIS_TO_THE_FULL_DOMAIN_NAME_NOT_HOSTNAME
#SVC_SERVER=
#SVC_SERVER=1
#APP_SERVER=
#APP_SERVER=1
APP_SERVER=1

CERTCHECK_FILE=/etc/letsencrypt/live/${DOMAIN}/cert.pem
if [[ -n ${SVC_SERVER} ]]
Expand All @@ -18,28 +18,28 @@ else
OTHER_COPY=
fi

now_seconds=`date +%s`
sleep 2
$CERTBOT renew
cert_seconds=`/usr/bin/stat -c %Y $CERTCHECK_FILE`

# See if certs were updated. certbot doesn't always return a 0 status when expected.
# So ignore return code issued by certbot and do our own check.
if [[ ! -f "${OTHER_COPY}" ]]
then
mos_seconds=0
else
mos_seconds=`/usr/bin/stat -c %Y $OTHER_COPY`
fi
mod_seconds=`/usr/bin/stat -c %Y $CERTCHECK_FILE`

if [[ $cert_seconds -ne $mos_seconds ]]
if [[ $now_seconds -lt $mod_seconds ]]
then
echo "Updating..."
systemctl reload nginx
if [[ -n ${SVC_SERVER} ]]
then
cd /etc/letsencrypt/live/${DOMAIN}
cp -Lpr * /etc/mosquitto/ca_certificates
chown -R mosquitto:mosquitto /etc/mosquitto/ca_certificates
systemctl reload mosquitto.service >> /var/log/le-renew.log 2>&1
other_seconds=`/usr/bin/stat -c %Y $OTHER_COPY`
if [[ $other_seconds -lt $mod_seconds ]]
then
cd /etc/letsencrypt/live/${DOMAIN}
cp * /etc/mosquitto/ca_certificates
chown -R mosquitto:mosquitto /etc/mosquitto/ca_certificates
systemctl reload mosquitto.service >> /var/log/le-renew.log 2>&1
fi
fi
else
echo "No update."
Expand All @@ -52,8 +52,6 @@ then
systemctl restart event_archive.service >> /var/log/le-renew.log 2>&1
elif [[ -n ${STREAMING_SERVER} ]]
then
echo "Restarting our nodejs streaming service, in case streaming1 server certs were updated. This does not restart jitsi-videobridge, which uses its own cert files"then
echo "Restarting our nodejs streaming service, in case streaming1 server certs were updated. This does not restart jitsi-videobridge, which uses its own cert files"
systemctl restart upstage-streaming.service >> /var/log/le-renew.log 2>&1
fi

25 changes: 25 additions & 0 deletions system/prod/mosquitto_root_cron.crontab
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').
#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command
30 2 * * 1 certbot renew --post-hook "cp /etc/letsencrypt/live/svc1.upstage.org.nz/* /etc/mosquitto/ca_certificates && chown -R mosquitto:mosquitto /etc/mosquitto/ca_certificates && systemctl reload mosquitto.service" >> /var/log/le-renew.log 2>&1

83 changes: 0 additions & 83 deletions system/prod/streaming_nms_app.js

This file was deleted.

2 changes: 1 addition & 1 deletion system/prod/upstage.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ chmod-socket=777
chdir=/home/upstage/upstage/
module = run_upstage:app
env = PYTHONPATH=/home/upstage/upstage
# NO!!! daemonize=/var/log/uwsgi/upstage.log
# NO!!! daemonize=/var/log/uwsgi/urbn_stripe_webhook.log
logto2 = /var/log/uwsgi/upstage.log

182 changes: 182 additions & 0 deletions ui/dashboard/src/components/MultiTransferAccessColumn.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
<template>
<div class="columns">
<template v-for="(column, i) in columns" :key="column">
<div class="column">
<article class="panel is-light">
<p class="panel-heading">
{{ column }}
<span class="tag is-primary">
{{i==(columns.length-1)? count(i)+1: count(i) }}
</span>
</p>
<div class="panel-heading pt-0">
<p class="control has-icons-left">
<input
class="input is-primary"
type="text"
placeholder="Search"
v-model="searchs[i]"
/>
<span class="icon is-left">
<i class="fas fa-search" aria-hidden="true"></i>
</span>
</p>
</div>
<div class="panel-body">
<a
v-if="i==(columns.length-1)"
class="panel-block owner"
>
{{ renderLabel(owner) }}
<p class="panel-tag">owner</p>
</a>
<template v-for="(item, j) in data" :key="renderValue(item)">
<a
v-if="shouldVisible(j, i)"
class="panel-block"
@click="moveRight(j)"
@contextmenu.prevent="moveLeft(j)"
>
{{ renderLabel(item) }}
</a>
</template>
</div>
</article>
</div>
<div class="column is-narrow px-0" v-if="i < columns.length - 1">
<button class="button is-primary is-small" @click="moveAll(i, i + 1)">
<i class="fas fa-angle-double-right"></i>
</button>
<br />
<br />
<button class="button is-primary is-small" @click="moveAll(i + 1, i)">
<i class="fas fa-angle-double-left"></i>
</button>
</div>
</template>
</div>
</template>

<script>
import { reactive } from "@vue/reactivity";
import { watch } from "@vue/runtime-core";
import { includesIgnoreCase } from "@/utils/common";
export default {
props: {
columns: Number,
modelValue: Array,
data: { type: Array, default: () => [] },
owner: Object,
renderLabel: {
type: Function,
default: (item) => item,
},
renderValue: {
type: Function,
default: (item) => item,
},
renderKeywords: Function,
},
emits: ["update:modelValue"],
setup: (props, { emit }) => {
const positions = reactive([]);
const searchs = reactive([]);
const matchSearch = (item, column) => {
if (!searchs[column]) {
return true;
}
const transform = props.renderKeywords ?? props.renderLabel;
return includesIgnoreCase(transform(props.data[item]), searchs[column]);
};
const shouldVisible = (item, column) => {
return (positions[item] ?? 0) === column && matchSearch(item, column);
};
const moveRight = (item) => {
let currentPosition = positions[item] ?? 0;
if (currentPosition < props.columns.length - 1) {
positions[item] = currentPosition + 1;
}
};
const moveLeft = (item) => {
positions[item] = (positions[item] ?? 1) - 1;
};
watch(positions, () => {
let res = [];
for (let i = 1; i < props.columns.length; i++) {
if (!res[i - 1]) {
res[i - 1] = [];
}
for (let j = 0; j < props.data.length; j++) {
if (positions[j] === i) {
res[i - 1].push(props.renderValue(props.data[j]));
}
}
}
emit("update:modelValue", res);
});
watch(
[() => props.modelValue, () => props.data],
([val]) => {
if (props.data) {
for (let i = 0; i < val.length; i++) {
for (let j = 0; j < (val[i] ?? []).length; j++) {
positions[
props.data.findIndex(
(item) => props.renderValue(item) === val[i][j]
)
] = i + 1;
}
}
}
},
{ immediate: true }
);
const count = (i) =>
props.data
? props.data.filter((item, p) => (positions[p] ?? 0) === i).length
: 0;
const moveAll = (from, to) => {
for (let i = 0; i < props.data.length; i++) {
if ((positions[i] ?? 0) === from && shouldVisible(i, from)) {
positions[i] = to;
}
}
};
return { shouldVisible, moveRight, moveLeft, count, searchs, moveAll };
},
};
</script>
<style scoped>
article.panel {
width: 100%;
}
.panel-heading {
font-size: unset;
}
.panel-body {
max-height: 50vh;
overflow-y: auto !important;
}
.panel-block.owner{
position: relative;
background-color: #00000015;
}
.panel-tag{
position: absolute;
background-color: #007011;
font-size: 0.8rem;
color: #fff;
padding:0 5px;
right: 10px;
}
</style>
27 changes: 27 additions & 0 deletions ui/dashboard/src/components/form/DownloadButton.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<template>
<button
class="button is-primary"
:class="{ 'is-loading': loading }"
v-bind="$attrs"
>
<slot>
<span class="icon is-small">
<i class="fas fa-download"></i>
</span>
<span>{{ $t("download") }}</span>
</slot>
</button>
</template>

<script>
export default {
props: ["loading"],
};
</script>

<style scoped>
.button {
margin-left: auto;
display: block;
}
</style>
Loading

0 comments on commit fc477e4

Please sign in to comment.