update sometimes
This commit is contained in:
@@ -67,12 +67,6 @@ $(document).ready(function () {
|
||||
const basePrice = parseFloat($productContainer.data('base-price'));
|
||||
const selectedMonths = parseInt(months);
|
||||
|
||||
console.log('Updating price display:', {
|
||||
basePrice: basePrice,
|
||||
selectedMonths: selectedMonths,
|
||||
productContainer: $productContainer.length
|
||||
});
|
||||
|
||||
// Calculate prices
|
||||
const originalPrice = basePrice * selectedMonths;
|
||||
const savings = selectedMonths >= 12 ? Math.round(originalPrice * 0.1) : 0;
|
||||
@@ -408,50 +402,25 @@ $(document).ready(function () {
|
||||
// Load Guest OS info when page loads
|
||||
loadGuestOSInfo();
|
||||
|
||||
// Debug: Show what data we have
|
||||
console.log(
|
||||
"Template IDs available:",
|
||||
$(".guest-os")
|
||||
.map(function () {
|
||||
return {
|
||||
templateId: $(this).data("template-id"),
|
||||
hasTemplateId: Boolean($(this).data("template-id")),
|
||||
};
|
||||
})
|
||||
.get()
|
||||
);
|
||||
|
||||
// Expose cache management to global scope for debugging
|
||||
window.vmInfoCache = {
|
||||
clear: function () {
|
||||
localStorage.removeItem(VM_INFO_CACHE_KEY);
|
||||
console.log("VM Info cache cleared");
|
||||
},
|
||||
refresh: function () {
|
||||
this.clear();
|
||||
loadGuestOSInfo();
|
||||
console.log("VM Info cache refreshed");
|
||||
},
|
||||
info: function () {
|
||||
const vmInfoCache = getVMInfoCache();
|
||||
if (!vmInfoCache) {
|
||||
console.log("No VM Info cache found");
|
||||
return;
|
||||
}
|
||||
|
||||
const templateIds = Object.keys(vmInfoCache.data);
|
||||
console.log(`VM Info cache entries: ${templateIds.length}`);
|
||||
console.log(
|
||||
`Last updated: ${new Date(
|
||||
vmInfoCache.lastUpdated
|
||||
).toLocaleString()}`
|
||||
);
|
||||
|
||||
templateIds.forEach((templateId) => {
|
||||
const data = getVMInfoFromCache(templateId);
|
||||
console.log(
|
||||
`${templateId}: ${data ? data.formattedOS : "expired"}`
|
||||
);
|
||||
});
|
||||
},
|
||||
get: function (templateId) {
|
||||
@@ -459,7 +428,6 @@ $(document).ready(function () {
|
||||
},
|
||||
remove: function (templateId) {
|
||||
removeVMInfoFromCache(templateId);
|
||||
console.log(`Removed ${templateId} from cache`);
|
||||
},
|
||||
raw: function () {
|
||||
return getVMInfoCache();
|
||||
|
||||
Reference in New Issue
Block a user