From 419ae14b6f3a179e856d8a753b6d9866d4b877da Mon Sep 17 00:00:00 2001 From: shrotia <119420493+shrotia@users.noreply.github.com> Date: Tue, 20 Aug 2024 14:18:01 +0530 Subject: [PATCH 01/20] assets report (#96) --- .../assets-usage-tracking/assetDetails.css | 212 +++++ reports/assets-usage-tracking/assetDetails.js | 856 ++++++++++++++++++ .../assetsUsageReport.css | 432 +++++++++ .../assetsUsageReport.js | 614 +++++++++++++ reports/assets-usage-tracking/details.html | 37 + reports/assets-usage-tracking/home.html | 372 ++++++++ .../resources/thumb1.jpeg | Bin 0 -> 29559 bytes .../resources/thumb10.jpeg | Bin 0 -> 60832 bytes .../resources/thumb11.jpeg | Bin 0 -> 55881 bytes .../resources/thumb2.jpeg | Bin 0 -> 32281 bytes .../resources/thumb3.jpeg | Bin 0 -> 31128 bytes .../resources/thumb4.jpeg | Bin 0 -> 2323735 bytes .../resources/thumb5.jpeg | Bin 0 -> 35500 bytes .../resources/thumb6.jpeg | Bin 0 -> 33500 bytes .../resources/thumb7.jpeg | Bin 0 -> 29876 bytes .../resources/thumb8.jpeg | Bin 0 -> 300792 bytes .../resources/thumb9.jpeg | Bin 0 -> 24904 bytes 17 files changed, 2523 insertions(+) create mode 100644 reports/assets-usage-tracking/assetDetails.css create mode 100644 reports/assets-usage-tracking/assetDetails.js create mode 100644 reports/assets-usage-tracking/assetsUsageReport.css create mode 100644 reports/assets-usage-tracking/assetsUsageReport.js create mode 100644 reports/assets-usage-tracking/details.html create mode 100644 reports/assets-usage-tracking/home.html create mode 100644 reports/assets-usage-tracking/resources/thumb1.jpeg create mode 100644 reports/assets-usage-tracking/resources/thumb10.jpeg create mode 100644 reports/assets-usage-tracking/resources/thumb11.jpeg create mode 100644 reports/assets-usage-tracking/resources/thumb2.jpeg create mode 100644 reports/assets-usage-tracking/resources/thumb3.jpeg create mode 100644 reports/assets-usage-tracking/resources/thumb4.jpeg create mode 100644 reports/assets-usage-tracking/resources/thumb5.jpeg create mode 100644 reports/assets-usage-tracking/resources/thumb6.jpeg create mode 100644 reports/assets-usage-tracking/resources/thumb7.jpeg create mode 100644 reports/assets-usage-tracking/resources/thumb8.jpeg create mode 100644 reports/assets-usage-tracking/resources/thumb9.jpeg diff --git a/reports/assets-usage-tracking/assetDetails.css b/reports/assets-usage-tracking/assetDetails.css new file mode 100644 index 0000000000..a8b9cd3c7c --- /dev/null +++ b/reports/assets-usage-tracking/assetDetails.css @@ -0,0 +1,212 @@ +body { + background-color: #f8f8f8; + max-width: 81.15rem; + margin: auto; + font-family: source-sans-3, sans-serif; +} + +.asset-details-title { + text-align: center; + margin-bottom: 20px; + font-size: 48px; +} + +.asset-detail-container { + border-radius: 8px; + margin: 0 auto; + padding: 20px; + box-shadow: 0 2px 4px #2f4f4f; +} + +.media-section { + background-color: #fdfdfd; + margin-bottom: 20px; + padding: 15px; + display: flex; +} + +.media-section > div { + flex: 1; +} + +.media-display img { + object-fit: contain; + border-radius: 8px; + width: 600px; + height: 400px; +} + +.meta-data-section { + flex-wrap: wrap; + display: flex; +} + +.meta-data { + flex: auto; + width: 200px; + min-height: 64px; + padding: 10px; +} + +.meta-data .title { + padding: 10px 0; + font-size: 14px; + font-weight: 800; +} + +.meta-data .value { + color: #333; + padding: 10px 0; + font-size: 16px; +} + +.expirationDate .value.warning:before { + content: url("warning.92839cc2.svg"); + vertical-align: middle; + padding-right: 5px; +} + +.expirationDate .value.error:before { + content: url("error.a7ca33db.svg"); + vertical-align: middle; + padding-right: 5px; +} + +.meta-data .tags { + flex-wrap: wrap; + gap: 1rem; + padding: 10px 0; + display: flex; +} + +.meta-data .tags div { + color: #5a5d60; + background-color: #d3d3d3; + border-radius: 5px; + padding: 4px; + font-size: 14px; +} + +.meta-data.status.approved .value:before { + content: url("check.9ab5b0fd.svg"); + vertical-align: middle; + padding-right: 5px; +} + +.usage-section { + border: 1px solid #ccc; + border-radius: 8px; + flex-direction: column; + margin-top: 20px; + padding: 15px; + display: flex; +} + +.usage-section .page { + background-color: #fdfdfd; + border-bottom: 1px solid #ddd; + justify-content: space-between; + align-items: center; + padding: 10px; + display: flex; +} + +.mismatched-tag { + background-color: orange; + border-radius: 16px; + margin: 0 10px; + padding: 0 10px; +} + +.usage-section .page a { + color: #0054b6; + text-decoration: none; +} + +.usage-section .page a:hover { + text-decoration: underline; +} + +.usage-section .page:hover { + background-color: #ebebeb; +} + +.back-button:before { + content: "<"; + margin-right: 5px; +} + +.back-button { + color: #fff; + cursor: pointer; + text-align: center; + background-color: #0265dc; + border-radius: 16px; + width: 50px; + margin-bottom: 12px; + padding: 8px; + text-decoration: none; +} + +.copy-button:before { + content: url("copy.5a9cae89.svg"); + opacity: .7; + width: 40px; + margin-right: 5px; + display: block; +} + +.copy-button { + cursor: pointer; + align-items: center; + display: flex; +} + +.tooltip { + opacity: 1; + z-index: 99; + color: #fff; + text-align: center; + background-color: gray; + border-radius: 6px; + width: 100px; + margin-left: 10px; + padding: 3px 0; + transition: opacity .5s ease-in-out; +} + +.tooltip :after { + content: " "; + border: 5px solid #0000; + border-top-color: #555; + margin-left: -5px; + position: absolute; + top: 100%; + left: 50%; +} + +.assets-usage { + color: #fff; + cursor: pointer; + background-color: #0265dc; + border-radius: 16px; + padding: 8px; + text-decoration: none; +} + +.usage-section .page .link .tags { + flex-wrap: wrap; + gap: 1rem; + width: max-content; + padding-top: 5px; + display: flex; +} + +.usage-section .page .link .tags div { + color: #5a5d60; + background-color: #d3d3d3; + border-radius: 5px; + padding: 4px; + font-size: 14px; +} +/*# sourceMappingURL=assetDetails.283990f4.css.map */ diff --git a/reports/assets-usage-tracking/assetDetails.js b/reports/assets-usage-tracking/assetDetails.js new file mode 100644 index 0000000000..f61c64a106 --- /dev/null +++ b/reports/assets-usage-tracking/assetDetails.js @@ -0,0 +1,856 @@ +// modules are defined as an array +// [ module function, map of requires ] +// +// map of requires is short require name -> numeric require +// +// anything defined in a previous bundle is accessed via the +// orig method which is the require for previous bundles + +(function (modules, entry, mainEntry, parcelRequireName, globalName) { + /* eslint-disable no-undef */ + var globalObject = + typeof globalThis !== 'undefined' + ? globalThis + : typeof self !== 'undefined' + ? self + : typeof window !== 'undefined' + ? window + : typeof global !== 'undefined' + ? global + : {}; + /* eslint-enable no-undef */ + + // Save the require from previous bundle to this closure if any + var previousRequire = + typeof globalObject[parcelRequireName] === 'function' && + globalObject[parcelRequireName]; + + var cache = previousRequire.cache || {}; + // Do not use `require` to prevent Webpack from trying to bundle this call + var nodeRequire = + typeof module !== 'undefined' && + typeof module.require === 'function' && + module.require.bind(module); + + function newRequire(name, jumped) { + if (!cache[name]) { + if (!modules[name]) { + // if we cannot find the module within our internal map or + // cache jump to the current global require ie. the last bundle + // that was added to the page. + var currentRequire = + typeof globalObject[parcelRequireName] === 'function' && + globalObject[parcelRequireName]; + if (!jumped && currentRequire) { + return currentRequire(name, true); + } + + // If there are other bundles on this page the require from the + // previous one is saved to 'previousRequire'. Repeat this as + // many times as there are bundles until the module is found or + // we exhaust the require chain. + if (previousRequire) { + return previousRequire(name, true); + } + + // Try the node require function if it exists. + if (nodeRequire && typeof name === 'string') { + return nodeRequire(name); + } + + var err = new Error("Cannot find module '" + name + "'"); + err.code = 'MODULE_NOT_FOUND'; + throw err; + } + + localRequire.resolve = resolve; + localRequire.cache = {}; + + var module = (cache[name] = new newRequire.Module(name)); + + modules[name][0].call( + module.exports, + localRequire, + module, + module.exports, + this + ); + } + + return cache[name].exports; + + function localRequire(x) { + var res = localRequire.resolve(x); + return res === false ? {} : newRequire(res); + } + + function resolve(x) { + var id = modules[name][1][x]; + return id != null ? id : x; + } + } + + function Module(moduleName) { + this.id = moduleName; + this.bundle = newRequire; + this.exports = {}; + } + + newRequire.isParcelRequire = true; + newRequire.Module = Module; + newRequire.modules = modules; + newRequire.cache = cache; + newRequire.parent = previousRequire; + newRequire.register = function (id, exports) { + modules[id] = [ + function (require, module) { + module.exports = exports; + }, + {}, + ]; + }; + + Object.defineProperty(newRequire, 'root', { + get: function () { + return globalObject[parcelRequireName]; + }, + }); + + globalObject[parcelRequireName] = newRequire; + + for (var i = 0; i < entry.length; i++) { + newRequire(entry[i]); + } + + if (mainEntry) { + // Expose entry point to Node, AMD or browser globals + // Based on https://github.com/ForbesLindesay/umd/blob/master/template.js + var mainExports = newRequire(mainEntry); + + // CommonJS + if (typeof exports === 'object' && typeof module !== 'undefined') { + module.exports = mainExports; + + // RequireJS + } else if (typeof define === 'function' && define.amd) { + define(function () { + return mainExports; + }); + + // + + +