diff --git a/.env.development b/.env.development index 9d2eb46..83c264d 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,3 @@ NODE_ENV=development VUE_APP_DJANGO_PATH=http://localhost:8000 -# VUE_APP_DJANGO_PATH=https://acc.dashboard.internet.nl \ No newline at end of file +# VUE_APP_DJANGO_PATH=https://dashboard.internet.nl \ No newline at end of file diff --git a/.gitignore b/.gitignore index 403adbc..44c8676 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,6 @@ pnpm-debug.log* *.njsproj *.sln *.sw? + +# development +.env.development diff --git a/src/components/reports/ReportTableVirtualListRecord.vue b/src/components/reports/ReportTableVirtualListRecord.vue index b899958..92cea4d 100644 --- a/src/components/reports/ReportTableVirtualListRecord.vue +++ b/src/components/reports/ReportTableVirtualListRecord.vue @@ -274,7 +274,12 @@ export default { if (!url.endpoints[0].ratings_by_type[category_name]['since']) return '' - let evidence = url.endpoints[0].ratings_by_type[category_name]['evidence'] + // evidence is in new reports since sept 2023. + let evidence = '' + if ('key' in url.endpoints[0].ratings_by_type[category_name]) { + evidence = url.endpoints[0].ratings_by_type[category_name]['evidence'] + } + let displayed_evidence = '' if (evidence.charAt(0) === '{' && evidence !== '{}') { displayed_evidence = JSON.stringify(JSON.parse(evidence), null, 2); diff --git a/src/main.js b/src/main.js index 710b294..a736953 100644 --- a/src/main.js +++ b/src/main.js @@ -205,7 +205,12 @@ Vue.mixin( humanize_date_unix_timestamp: function (date) { if ([undefined, null, "", 0].includes(date)) return "" - return format(new Date(date * 1000), 'PPPP', {locale: this.dateLocales[this.locale]}); + try { + return format(new Date(date * 1000), 'PPPP', {locale: this.dateLocales[this.locale]}); + } catch (e) { + // old reports have datetime strings, sep 2023 + return this.humanize_date(date); + } }, humanize_date_date_only: function (date) { if ([undefined, null, "", 0].includes(date))