Skip to content

Commit

Permalink
Updated css class name and commented out metrics tiles as per the sto…
Browse files Browse the repository at this point in the history
…ry description
  • Loading branch information
staware30 committed Feb 7, 2024
1 parent 5a43385 commit a34d41e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 27 deletions.
2 changes: 1 addition & 1 deletion blocks/gmo-metrics/gmo-metrics.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
54 changes: 28 additions & 26 deletions blocks/gmo-metrics/gmo-metrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -325,7 +327,7 @@ export default async function decorate(block) {
block.innerHTML = `
<div class="title">
<h1>${config.title || 'Asset Metrics'}</h1>
<h1 class="updated-data">Updated: ${config.updated}</h1>
<h1 class="subtitle-right">Updated: ${config.updated}</h1>
</div>
<div class="graph-container">
<div>
Expand Down

0 comments on commit a34d41e

Please sign in to comment.