@@ -236,10 +236,10 @@ <h1>Prozorro Sale AWS Auth Controller Chart Repository</h1>
236236</ div >
237237
238238< script >
239- function getVersionFromUrl ( url ) {
239+ /* function getVersionFromUrl(url) {
240240 const match = url.match(/\/download\/([^/]+)\/aws-auth-controller/);
241241 return match ? match[1] : null;
242- }
242+ }*/
243243
244244 function findLatestVersion ( chartEntries ) {
245245 return chartEntries . reduce ( ( latest , current ) => {
@@ -250,7 +250,7 @@ <h1>Prozorro Sale AWS Auth Controller Chart Repository</h1>
250250 const currentParts = current . version . split ( '.' ) . map ( Number ) ;
251251 const latestParts = latest . version . split ( '.' ) . map ( Number ) ;
252252
253- // Порівнюємо кожен компонент версії
253+ // Compare every component of a version
254254 for ( let i = 0 ; i < Math . max ( currentParts . length , latestParts . length ) ; i ++ ) {
255255 const currentPart = currentParts [ i ] || 0 ;
256256 const latestPart = latestParts [ i ] || 0 ;
@@ -259,7 +259,7 @@ <h1>Prozorro Sale AWS Auth Controller Chart Repository</h1>
259259 if ( currentPart < latestPart ) return latest ;
260260 }
261261
262- return latest ; // Якщо версії однакові, залишаємо поточну "latest "
262+ return latest ; // If the versions are the same, we leave the current "Latest "
263263 } , null ) ;
264264 }
265265
@@ -299,13 +299,13 @@ <h1>Prozorro Sale AWS Auth Controller Chart Repository</h1>
299299 return ;
300300 }
301301
302- // Перевіряємо структуру maintainers перед використанням
302+ // Check the Maintainers structure before using
303303 const maintainersHtml = chartInfo . maintainers && Array . isArray ( chartInfo . maintainers ) && chartInfo . maintainers . length > 0
304304 ? `
305305 <div class="meta-item">
306306 <strong>Maintainers</strong>
307307 ${ chartInfo . maintainers . map ( maintainer => {
308- // Перевіряємо наявність об'єкта maintainer та його властивостей
308+ // Check the presence of the facility Maintainer and its properties
309309 if ( ! maintainer || typeof maintainer !== 'object' ) return '' ;
310310
311311 const name = maintainer . name || 'Unknown' ;
@@ -326,7 +326,7 @@ <h1>Prozorro Sale AWS Auth Controller Chart Repository</h1>
326326 `
327327 : '' ;
328328
329- const chartInfoHtml = `
329+ document . getElementById ( 'chartInfo' ) . innerHTML = `
330330 <div class="chart-header">
331331 ${ chartInfo . icon ? `<img src="${ chartInfo . icon } " alt="Chart icon" class="chart-icon">` : '' }
332332 <div class="chart-title">
@@ -344,7 +344,14 @@ <h2>${chartInfo.name || 'Unknown'} <span style="font-size: 0.8em;">v${chartInfo.
344344 </div>
345345 <div class="meta-item">
346346 <strong>Created</strong>
347- ${ chartInfo . created ? new Date ( chartInfo . created ) . toLocaleDateString ( ) : 'Unknown' }
347+ ${ chartInfo . created ? new Date ( chartInfo . created ) . toLocaleDateString ( "uk-UA" , {
348+ hour : "numeric" ,
349+ minute : "numeric" ,
350+ second : "numeric" ,
351+ year : "numeric" ,
352+ month : "numeric" ,
353+ day : "numeric" ,
354+ } ) : 'Unknown' }
348355 </div>
349356 <div class="meta-item description-item">
350357 <strong>Description</strong>
@@ -384,12 +391,12 @@ <h2>${chartInfo.name || 'Unknown'} <span style="font-size: 0.8em;">v${chartInfo.
384391 const numA = versionA [ i ] || 0 ;
385392 const numB = versionB [ i ] || 0 ;
386393 if ( numA !== numB ) {
387- return numB - numA ; // Сортування за спаданням
394+ return numB - numA ; // Sorting by descending
388395 }
389396 }
390397 return 0 ;
391398 } )
392- . map ( ( v , idx ) => `
399+ . map ( ( v ) => `
393400 <span class="version-tag ${ v . version === chartInfo . version ? 'latest-badge' : '' } ">
394401 ${ v . version || 'Unknown' }
395402 ${ v . version === chartInfo . version ? ' (latest)' : '' }
@@ -399,11 +406,8 @@ <h2>${chartInfo.name || 'Unknown'} <span style="font-size: 0.8em;">v${chartInfo.
399406</div>
400407
401408 ` ;
402-
403- document . getElementById ( 'chartInfo' ) . innerHTML = chartInfoHtml ;
404409 }
405410
406-
407411 // Load chart info when the page loads
408412 document . addEventListener ( 'DOMContentLoaded' , loadChartInfo ) ;
409413</ script >
0 commit comments