Merge branch 'main' of https://code.sdsdev.co.kr/SDSRV-IDP/sbt-idp
This commit is contained in:
commit
793205bb41
@ -394,7 +394,7 @@ class AccuracyViewSet(viewsets.ViewSet):
|
||||
|
||||
|
||||
paginator = Paginator(reports, page_size)
|
||||
page = paginator.get_page(page_number)
|
||||
page = paginator.get_page(page_number).order_by('created_at')
|
||||
|
||||
data = []
|
||||
for report in page:
|
||||
|
@ -130,10 +130,38 @@ class MonthReportAccumulate:
|
||||
self.accumulate(report)
|
||||
return True
|
||||
|
||||
def clear(self):
|
||||
self.month = None
|
||||
self.total = {
|
||||
'subs': "+",
|
||||
'extraction_date': "Subtotal ()",
|
||||
'total_images': 0,
|
||||
'images_quality': {
|
||||
'successful': 0,
|
||||
'successful_percent': 0,
|
||||
'bad': 0,
|
||||
'bad_percent': 0
|
||||
},
|
||||
'average_accuracy_rate': {
|
||||
'imei': IterAvg(),
|
||||
'purchase_date': IterAvg(),
|
||||
'retailer_name': IterAvg()
|
||||
},
|
||||
'average_processing_time': {
|
||||
'imei': IterAvg(),
|
||||
'invoice': IterAvg()
|
||||
},
|
||||
'usage': {
|
||||
'imei':0,
|
||||
'invoice': 0
|
||||
}
|
||||
}
|
||||
self.data = []
|
||||
|
||||
def __call__(self):
|
||||
self.total["images_quality"]["successful_percent"] += self.total["images_quality"]["successful"]/self.total["total_images"] if self.total["total_images"] else 0
|
||||
self.total["images_quality"]["bad_percent"] += self.total["images_quality"]["bad"]/self.total["total_images"] if self.total["total_images"] else 0
|
||||
total = copy.deepcopy(self.total)
|
||||
total["images_quality"]["successful_percent"] = total["images_quality"]["successful"]/total["total_images"] if total["total_images"] else 0
|
||||
total["images_quality"]["bad_percent"] = total["images_quality"]["bad"]/total["total_images"] if total["total_images"] else 0
|
||||
total["average_accuracy_rate"]["imei"] = total["average_accuracy_rate"]["imei"]()
|
||||
total["average_accuracy_rate"]["purchase_date"] = total["average_accuracy_rate"]["purchase_date"]()
|
||||
total["average_accuracy_rate"]["retailer_name"] = total["average_accuracy_rate"]["retailer_name"]()
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "sbt-ui",
|
||||
"version": "0.1.0",
|
||||
"scripts": {
|
||||
"start": "NODE_ENV=development vite --host",
|
||||
"start": "NODE_ENV=development npm run extract && npm run compile && vite --host",
|
||||
"build": "NODE_ENV=production npm run extract && npm run compile && tsc && vite build",
|
||||
"serve": "vite preview",
|
||||
"extract": "lingui extract --clean",
|
||||
|
@ -96,8 +96,10 @@ export async function downloadReport(report_id: string) {
|
||||
let filename = "report.xlsx";
|
||||
try {
|
||||
let basename = response.headers['content-disposition'].split('filename=')[1].split('.')[0];
|
||||
let extension = response.headers['content-disposition'].split('.')[1].split(';')[0];
|
||||
filename = `${basename}.${extension}`
|
||||
if (basename.charAt(0) === '_') {
|
||||
basename = basename.substring(1);
|
||||
}
|
||||
filename = `${basename}.xlsx`
|
||||
} catch(err) {
|
||||
console.log(err);
|
||||
}
|
||||
|
@ -84,12 +84,12 @@ services:
|
||||
depends_on:
|
||||
db-sbt:
|
||||
condition: service_started
|
||||
command: sh -c "chmod -R 777 /app; sleep 5; python manage.py collectstatic --no-input &&
|
||||
python manage.py makemigrations &&
|
||||
python manage.py migrate &&
|
||||
python manage.py compilemessages &&
|
||||
gunicorn fwd.asgi:application -k uvicorn.workers.UvicornWorker --timeout 300 -b 0.0.0.0:9000" # pre-makemigrations on prod
|
||||
# command: bash -c "tail -f > /dev/null"
|
||||
# command: sh -c "chmod -R 777 /app; sleep 5; python manage.py collectstatic --no-input &&
|
||||
# python manage.py makemigrations &&
|
||||
# python manage.py migrate &&
|
||||
# python manage.py compilemessages &&
|
||||
# gunicorn fwd.asgi:application -k uvicorn.workers.UvicornWorker --timeout 300 -b 0.0.0.0:9000" # pre-makemigrations on prod
|
||||
command: bash -c "tail -f > /dev/null"
|
||||
|
||||
minio:
|
||||
image: minio/minio
|
||||
|
1
document-classification-kv-demo
Submodule
1
document-classification-kv-demo
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 220954c5c6bfed15e93e26b2adacf28ff8b75baf
|
Loading…
Reference in New Issue
Block a user