From 6ad20bc2e4fd4015c7cbe89a5f5d016ed2753116 Mon Sep 17 00:00:00 2001 From: Samruddhi Date: Tue, 6 Feb 2024 18:26:20 -0800 Subject: [PATCH 1/3] Updated Data and Added Date/Time to Insights Page --- blocks/gmo-metrics/gmo-metrics.css | 6 ++++++ blocks/gmo-metrics/gmo-metrics.js | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/blocks/gmo-metrics/gmo-metrics.css b/blocks/gmo-metrics/gmo-metrics.css index c5b7317b..2b368efa 100644 --- a/blocks/gmo-metrics/gmo-metrics.css +++ b/blocks/gmo-metrics/gmo-metrics.css @@ -12,6 +12,11 @@ content: ''; } +.gmo-metrics .title { + display: flex; + justify-content: space-between; +} + .gmo-metrics .graph-container { display: flex; flex-flow: row wrap; @@ -100,4 +105,5 @@ align-items: center; justify-content: center; } + } diff --git a/blocks/gmo-metrics/gmo-metrics.js b/blocks/gmo-metrics/gmo-metrics.js index c35504ac..96f23a9d 100644 --- a/blocks/gmo-metrics/gmo-metrics.js +++ b/blocks/gmo-metrics/gmo-metrics.js @@ -323,7 +323,10 @@ function sortByAmount(values) { export default async function decorate(block) { const config = readBlockConfig(block); block.innerHTML = ` -

${config.title || 'Asset Metrics'}

+
+

${config.title || 'Asset Metrics'}

+

Updated: ${config.updated}

+

Asset Statistics

From 785ba53a86372e81cdd16629278f1c2c584ae2e2 Mon Sep 17 00:00:00 2001 From: Samruddhi Date: Tue, 6 Feb 2024 18:26:20 -0800 Subject: [PATCH 2/3] Updated Data and Added Date/Time to Insights Page --- blocks/gmo-metrics/gmo-metrics.css | 12 ++++++++++++ blocks/gmo-metrics/gmo-metrics.js | 5 ++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/blocks/gmo-metrics/gmo-metrics.css b/blocks/gmo-metrics/gmo-metrics.css index c5b7317b..58cd0d05 100644 --- a/blocks/gmo-metrics/gmo-metrics.css +++ b/blocks/gmo-metrics/gmo-metrics.css @@ -12,6 +12,17 @@ content: ''; } +.gmo-metrics .title { + display: flex; + justify-content: space-between; +} + +.gmo-metrics .updated-data { + font-size: 16px; + color: var(--assets-browser-text-color); + font-weight: normal; +} + .gmo-metrics .graph-container { display: flex; flex-flow: row wrap; @@ -100,4 +111,5 @@ align-items: center; justify-content: center; } + } diff --git a/blocks/gmo-metrics/gmo-metrics.js b/blocks/gmo-metrics/gmo-metrics.js index c35504ac..b01f0f1c 100644 --- a/blocks/gmo-metrics/gmo-metrics.js +++ b/blocks/gmo-metrics/gmo-metrics.js @@ -323,7 +323,10 @@ function sortByAmount(values) { export default async function decorate(block) { const config = readBlockConfig(block); block.innerHTML = ` -

${config.title || 'Asset Metrics'}

+
+

${config.title || 'Asset Metrics'}

+

Updated: ${config.updated}

+

Asset Statistics

From a34d41ef685fbfba50a5a7bd1f95c70f9a7b35e7 Mon Sep 17 00:00:00 2001 From: Samruddhi Date: Wed, 7 Feb 2024 14:48:07 -0800 Subject: [PATCH 3/3] Updated css class name and commented out metrics tiles as per the story description --- blocks/gmo-metrics/gmo-metrics.css | 2 +- blocks/gmo-metrics/gmo-metrics.js | 54 ++++++++++++++++-------------- 2 files changed, 29 insertions(+), 27 deletions(-) diff --git a/blocks/gmo-metrics/gmo-metrics.css b/blocks/gmo-metrics/gmo-metrics.css index 58cd0d05..17067ffe 100644 --- a/blocks/gmo-metrics/gmo-metrics.css +++ b/blocks/gmo-metrics/gmo-metrics.css @@ -17,7 +17,7 @@ justify-content: space-between; } -.gmo-metrics .updated-data { +.gmo-metrics .subtitle-right { font-size: 16px; color: var(--assets-browser-text-color); font-weight: normal; diff --git a/blocks/gmo-metrics/gmo-metrics.js b/blocks/gmo-metrics/gmo-metrics.js index b01f0f1c..7d208f39 100644 --- a/blocks/gmo-metrics/gmo-metrics.js +++ b/blocks/gmo-metrics/gmo-metrics.js @@ -6,20 +6,20 @@ import { logError } from '../../scripts/scripts.js'; const GENERAL_METRICS = [{ category: 'Total assets', - amount: 59475, + amount: 60882, }, { category: 'Total size', - amount: 1024 * 1024 * 1024 * 331.6, + amount: 1024 * 1024 * 1024 * 334, unit: 'bytes', }, { category: 'Uploads year-to-date', - amount: 59475, + amount: 261, }, { category: 'Uploads quarter-to-date', - amount: 56629, + amount: 57865, }, { category: 'Uploads last 30 days', - amount: 56486, + amount: 261, }]; function formatNumber(number) { @@ -57,40 +57,42 @@ function formatAmount(metric) { } const MIME_TYPES = [ - { category: 'video/mp4', amount: 3579 }, - { category: 'image/jpeg', amount: 51258 }, - { category: 'image/png', amount: 2102 }, - { category: 'video/quicktime', amount: 422 }, - { category: 'image/vnd.adobe.photoshop', amount: 380 }, - { category: 'audio/x-wav', amount: 104 }, - { category: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', amount: 102 }, - { category: 'application/vnd.adobe.sparkler.project+dcx', amount: 578 }, - { category: 'application/pdf', amount: 571 }, - { category: 'application/octet-stream', amount: 48 }, - { category: 'application/postscript', amount: 33 }, - { category: 'application/json', amount: 30 }, + { category: 'image/jpeg', amount: 51595 }, + { category: 'video/mp4', amount: 3794 }, + { category: 'image/png', amount: 2404 }, + { category: 'application/vnd.adobe.sparkler.project+dcx', amount: 632 }, + { category: 'application/pdf', amount: 631 }, + { category: 'video/quicktime', amount: 598 }, + { category: 'image/vnd.adobe.photoshop', amount: 402 }, + { category: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', amount: 170 }, + { category: 'audio/x-wav', amount: 166 }, + { category: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', amount: 137 }, + { category: 'application/octet-stream', amount: 56 }, + { category: 'image/tiff', amount: 50 }, + { category: 'application/postscript', amount: 48 }, + { category: 'image/svg+xml', amount: 35 }, + { category: 'application/x-subrip', amount: 30 }, + { category: 'application/zip', amount: 30 }, + { category: 'application/x-font-otf', amount: 22 }, { category: 'application/vnd.audiograph', amount: 19 }, - { category: 'application/x-subrip', amount: 18 }, { category: 'application/vnd.openxmlformats-officedocument.presentationml.presentation', amount: 15 }, - { category: 'application/zip', amount: 21 }, - { category: 'image/svg+xml', amount: 9 }, + { category: 'application/vnd.3gpp.pic-bw-small', amount: 11 }, { category: 'image/gif', amount: 11 }, - { category: 'application/vnd.3gpp.pic-bw-small', amount: 9 }, { category: 'video/ogg', amount: 9 }, - { category: 'image/tiff', amount: 8 }, - { category: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', amount: 170 }, { category: 'audio/mpeg', amount: 4 }, + { category: 'image/dng', amount: 3 }, { category: 'text/html', amount: 3 }, { category: 'text/plain', amount: 2 }, + { category: 'application/x-indesign', amount: 1 }, ]; -const BUSINESS_UNITS = [{ +/*const BUSINESS_UNITS = [{ category: 'Digital Media', amount: 2517, }, { category: 'Other', amount: 509, -}]; +}];*/ const PRODUCTS = [{ category: 'Photoshop', @@ -325,7 +327,7 @@ export default async function decorate(block) { block.innerHTML = `

${config.title || 'Asset Metrics'}

-

Updated: ${config.updated}

+

Updated: ${config.updated}