Skip to content

Commit 71671cf

Browse files
committed
fix:updating the app
1 parent 6489cac commit 71671cf

File tree

4 files changed

+38
-42
lines changed

4 files changed

+38
-42
lines changed

web-src/index.html

Lines changed: 35 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -7,53 +7,48 @@
77
<meta charset="UTF-8">
88
<meta name="viewport" content="width=device-width, initial-scale=1.0">
99
<meta http-equiv="X-UA-Compatible" content="ie=edge">
10-
<link rel="stylesheet" href="https://unpkg.com/@spectrum-css/vars/dist/spectrum-global.css">
11-
<link rel="stylesheet" href="https://unpkg.com/@spectrum-css/typography/index.css">
12-
<link rel="stylesheet" href="index.css">
13-
<title>EDSAssetTracker</title>
14-
<script src="./src/utils.js" type="module"></script>
10+
<link rel="stylesheet" href="assetsUsageReport.css">
11+
<link rel="stylesheet" href="https://use.typekit.net/dil4fkj.css">
12+
<title>Assets Usage Report</title>
1513
<script src="./src/index.js" type="module"></script>
1614
</head>
1715
<body>
18-
<h1>Welcome to EDSAssetTracker!</h1>
19-
<div class="spectrum--large spectrum-Typography spectrum-Site">
20-
<div>
21-
<h2>Run your application backend actions</h2>
22-
<form id='actionForm'>
23-
<div>
24-
<label for='action-list'>Select an action.</label>
25-
<span id="action-list" name="action-list"></span>
26-
</div>
27-
<div>
28-
<label for="actionParams">headers { json } to pass to your action:</label>
29-
<textarea id='actionHeaders' name='actionHeaders' placeholder='{ "key": "value" }'></textarea>
16+
<div class="assets-usage-report">
17+
<h1 class="assets-title">Assets Usage Report</h1>
18+
<div class="view-toggle">
19+
<button class="card-view" id="toggleViewBtn">Card View
20+
</button>
21+
</div>
22+
<div id="all-asset-usage-report"></div>
23+
<div class="page-filter all">For all pages</div>
24+
<div class="assets-container">
25+
26+
<div class="assets-flex-container">
27+
<div class="asset-row header">
28+
<div class="asset-header">Thumbnail</div>
29+
<div id="sortTitle" class="asset-header">Title
30+
<i class="sort-icon"></i>
3031
</div>
31-
<div>
32-
<label for="actionParams">params { json } to pass to your action:</label>
33-
<textarea id='actionParams' name='actionParams' placeholder='{ "key": "value" }'></textarea>
32+
<div class="asset-header">Mime Type</div>
33+
<div id="sortUsage" class="asset-header">Usage
34+
<i class="sort-icon"></i>
3435
</div>
35-
<input type="submit" value="Invoke">
36-
</form>
36+
<div class="asset-header">Actions</div>
37+
<div class="asset-header">Details</div>
38+
</div>
39+
<!-- Asset rows will be added here by assetsData.js -->
40+
</div>
41+
<div class="card-view-container" style="display: none;">
42+
<!-- Cards will be added here by JavaScript -->
3743
</div>
38-
<div>
39-
<h2>results</h2>
40-
<textarea id='taOutput' readonly spellcheck="false" style="min-height:260px;"></textarea>
44+
<div class="insights-panel">
45+
<div class="title">Assets insights</div>
46+
<div id="assets-insights" class="insights-container">
47+
<!-- Recommendations will be added here by JavaScript -->
48+
</div>
4149
</div>
42-
<footer>
43-
<h2>Useful documentation for your app</h2>
44-
<a href='https://github.com/AdobeDocs/project-firefly/blob/master/README.md#project-firefly-developer-guide' target='_blank'>
45-
Adobe Developer App Builder
46-
</a>
47-
<a href='https://github.com/adobe/aio-sdk#adobeaio-sdk' target='_blank'>
48-
Adobe I/O SDK
49-
</a>
50-
<a href='https://adobedocs.github.io/adobeio-runtime/' target='_blank'>
51-
Adobe I/O Runtime
52-
</a>
53-
<a href='https://react-spectrum.adobe.com/react-spectrum/index.html' target='_blank'>
54-
React Spectrum
55-
</a>
56-
</footer>
5750
</div>
51+
<script type='module' src="src/assetsData.js"></script>
52+
</div>
5853
</body>
5954
</html>

web-src/src/assetDetails.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ let accessToken;
123123
viewDetail.classList.add('assets-usage');
124124
viewDetail.textContent = "Assets Usage Report";
125125
viewDetail.addEventListener('click', () => {
126-
window.location.href = `/assetsUsageReport.html?pagePath=${page}`;
126+
window.location.href = `/index.html?pagePath=${page}`;
127127
});
128128
pageDiv.appendChild(viewDetail);
129129
pagesSection.appendChild(pageDiv);

web-src/src/assetsData.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ let accessToken;
101101
allAssetsDiv.classList.add('all-asset-usage-report');
102102
allAssetsDiv.textContent = '< Back to site assets usage report';
103103
allAssetsDiv.addEventListener('click', () => {
104-
window.location.href = `/assetsUsageReport.html?hlxUrl=${hlxUrl}`;
104+
window.location.href = `/index.html?hlxUrl=${hlxUrl}`;
105105
});
106106
const pageFilter = document.querySelector('.page-filter');
107107
pageFilter.classList.remove('all');

web-src/src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ async function invokeAction (action, _headers, _params) {
205205
}
206206

207207
export async function getState() {
208+
console.log('Getting state');
208209
let attempts = 0;
209210
while (!state.imsToken) {
210211
attempts++;

0 commit comments

Comments
 (0)