feat(hooch): refine UI, persian digits, line-wrapping and auto-register protocol
This commit is contained in:
parent
e71c382e13
commit
5859716b1e
2 changed files with 146 additions and 80 deletions
|
|
@ -143,6 +143,7 @@
|
|||
transition: all 0.15s ease-in-out;
|
||||
border: 1px solid transparent;
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
|
|
@ -624,12 +625,16 @@
|
|||
margin-bottom: 16px;
|
||||
font-size: 11.5px;
|
||||
color: var(--text-muted);
|
||||
text-align: right;
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
.meta-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
align-items: flex-start;
|
||||
gap: 4px;
|
||||
text-align: right;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.meta-item strong {
|
||||
color: var(--text-secondary);
|
||||
|
|
@ -882,7 +887,7 @@
|
|||
<div class="brand-text">
|
||||
<h1>
|
||||
مرکز عملیات hooch
|
||||
<span class="info-tip info-icon" title="مرکز یکپارچه فرماندهی و پایش کلیه ۱۸ داشبورد و سابدامین اختصاصی ایکیپا در زیرساخت ابری">ⓘ</span>
|
||||
<span class="info-tip info-icon" title="مرکز یکپارچه فرماندهی و پایش کلیه ۱۹ داشبورد و سابدامین اختصاصی ایکیپا در زیرساخت ابری">ⓘ</span>
|
||||
</h1>
|
||||
<div class="sub-title">
|
||||
<span><span class="live-dot"></span> کلیه زیردامنهها و سرویسهای عملیاتی فعال هستند</span>
|
||||
|
|
@ -935,7 +940,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button class="btn btn-secondary btn-sm" onclick="openRuleModal()">جزییات قانون ↗</button>
|
||||
<button class="btn btn-secondary btn-sm" onclick="openRuleModal()">جزئیات قانون ↗</button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
|
@ -1151,7 +1156,7 @@
|
|||
priority: 1,
|
||||
is_master: true,
|
||||
features: ["رجیستری متمرکز زیردامنهها", "پایش زنده وضعیت سرویسها", "فیلتر و جستجوی لحظهای", "ثبت خودکار داشبوردهای جدید", "اتصال به دیتابیس PostgreSQL 17"],
|
||||
updated_at: "۱۴۰۵/۰۸/۲۰ - ۰۹:۰۰ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۱۹ - ۱۲:۳۰ UTC"
|
||||
},
|
||||
{
|
||||
slug: "experiences",
|
||||
|
|
@ -1161,7 +1166,7 @@
|
|||
datasource: "PostgreSQL 17 / Live Metabase",
|
||||
priority: 2,
|
||||
features: ["پایش زنده سانسها", "تحلیل نرخ کمیسیون و کنسلی", "همگامسازی استیت در PostgreSQL", "شلیک گزارش تلگرام"],
|
||||
updated_at: "۱۴۰۵/۰۸/۱۹ - ۱۹:۴۵ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۱۸ - ۱۹:۴۵ UTC"
|
||||
},
|
||||
{
|
||||
slug: "bd",
|
||||
|
|
@ -1171,7 +1176,7 @@
|
|||
datasource: "PostgreSQL 17 State Sync",
|
||||
priority: 3,
|
||||
features: ["مدل اعتباری مارکآپ ۱۰٪", "پایش دورههای تسویه حساب", "تعهدات و الحاقیههای بانکی", "ثبت وضعیت پیشرفت جلسات"],
|
||||
updated_at: "۱۴۰۵/۰۸/۲۰ - ۰۹:۱۳ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۱۹ - ۰۹:۱۳ UTC"
|
||||
},
|
||||
{
|
||||
slug: "partner-reports",
|
||||
|
|
@ -1181,7 +1186,7 @@
|
|||
datasource: "PostgreSQL 17 State Sync",
|
||||
priority: 4,
|
||||
features: ["لاگ تعاملی صورتجلسات", "مدیریت اقدامات بعدی (Action Items)", "پایش وضعیت سامانه مودیان", "همگامسازی امن دیتابیس"],
|
||||
updated_at: "۱۴۰۵/۰۸/۲۰ - ۰۹:۱۰ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۱۹ - ۰۹:۱۰ UTC"
|
||||
},
|
||||
{
|
||||
slug: "kr-workshops",
|
||||
|
|
@ -1191,7 +1196,7 @@
|
|||
datasource: "PostgreSQL 17 / Ekeepa API",
|
||||
priority: 5,
|
||||
features: ["شناسنامه ۳۴۸ رویداد", "بسته پیامک تککلیک دارا", "شناسایی کارگاههای زامبی", "پایش ظرفیت و فروش"],
|
||||
updated_at: "۱۴۰۵/۰۸/۱۹ - ۰۸:۳۸ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۱۸ - ۰۸:۳۸ UTC"
|
||||
},
|
||||
{
|
||||
slug: "workshop-audit",
|
||||
|
|
@ -1201,7 +1206,7 @@
|
|||
datasource: "Ekeepa API v2 / Live DB",
|
||||
priority: 6,
|
||||
features: ["افق تقویمی ۶۰ روزه", "کشف عدم تطابق سانسها", "گزارش سانسهای خالی", "ممیزی آنلاین"],
|
||||
updated_at: "۱۴۰۵/۰۸/۱۹ - ۰۶:۵۷ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۱۸ - ۰۶:۵۷ UTC"
|
||||
},
|
||||
{
|
||||
slug: "exp-acquisition",
|
||||
|
|
@ -1211,7 +1216,7 @@
|
|||
datasource: "PostgreSQL 17 State Sync",
|
||||
priority: 7,
|
||||
features: ["برد تعاملی کانبان", "پایش پیجهای هدف اینستاگرام", "رهگیری پیشرفت جذب تا انتشار", "ذخیره ابری وضعیت"],
|
||||
updated_at: "۱۴۰۵/۰۸/۱۸ - ۱۴:۰۰ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۱۷ - ۱۴:۰۰ UTC"
|
||||
},
|
||||
{
|
||||
slug: "campaign-sections",
|
||||
|
|
@ -1221,7 +1226,7 @@
|
|||
datasource: "PostgreSQL 17 / GA4 Stream",
|
||||
priority: 8,
|
||||
features: ["تحلیل تفکیکی ریلها", "رهگیری تگ from_sec", "پایش نرخ کلیک بخشها", "تضمین اصالت تاریخ داده"],
|
||||
updated_at: "۱۴۰۵/۰۸/۱۸ - ۱۲:۱۲ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۱۷ - ۱۲:۱۲ UTC"
|
||||
},
|
||||
{
|
||||
slug: "landings-report",
|
||||
|
|
@ -1231,7 +1236,7 @@
|
|||
datasource: "PostgreSQL 17 State Sync",
|
||||
priority: 9,
|
||||
features: ["تفکیک مسیرهای ورودی", "سنجش نرخ تبدیل هر لندینگ", "محاسبه ارزش سفارشها", "گزارش مدیریتی"],
|
||||
updated_at: "۱۴۰۵/۰۸/۱۸ - ۱۲:۰۰ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۱۷ - ۱۲:۰۰ UTC"
|
||||
},
|
||||
{
|
||||
slug: "event_brief_dashboard",
|
||||
|
|
@ -1241,7 +1246,7 @@
|
|||
datasource: "Local Storage / Direct State",
|
||||
priority: 10,
|
||||
features: ["صدور بریف رسمی ایونت", "تفکیک بودجه و هزینهها", "تقویم اجرایی هماهنگی", "پشتیبانی سازمانی"],
|
||||
updated_at: "۱۴۰۵/۰۸/۱۸ - ۰۶:۰۴ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۱۷ - ۰۶:۰۴ UTC"
|
||||
},
|
||||
{
|
||||
slug: "ops-report",
|
||||
|
|
@ -1251,7 +1256,7 @@
|
|||
datasource: "Static Audit & Ops DB",
|
||||
priority: 11,
|
||||
features: ["تلمتری قیف خرید و پرداخت", "پایش رضایت مشتریان (CSAT)", "مانیتورینگ خطاهای چکاوت", "آمار آزادسازی صندلیها"],
|
||||
updated_at: "۱۴۰۵/۰۸/۱۴ - ۰۶:۲۵ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۱۳ - ۰۶:۲۵ UTC"
|
||||
},
|
||||
{
|
||||
slug: "self-healing",
|
||||
|
|
@ -1261,7 +1266,7 @@
|
|||
datasource: "Ekeepa BI Data Warehouse",
|
||||
priority: 12,
|
||||
features: ["۵ ستون استراتژیک رشد", "ماتریس شکاف عرضه و تقاضا", "هشدارهای خودترمیمی", "گزارش فصلی اهداف"],
|
||||
updated_at: "۱۴۰۵/۰۸/۰۸ - ۰۸:۵۹ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۰۷ - ۰۸:۵۹ UTC"
|
||||
},
|
||||
{
|
||||
slug: "vendors",
|
||||
|
|
@ -1271,7 +1276,7 @@
|
|||
datasource: "Vendors Database",
|
||||
priority: 13,
|
||||
features: ["لیست سفید و سیاه وندورها", "ممیزی مغایرتهای واریزی", "پایش قراردادهای فعال", "تطابق کد اقتصادی"],
|
||||
updated_at: "۱۴۰۵/۰۸/۰۸ - ۱۱:۳۶ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۰۷ - ۱۱:۳۶ UTC"
|
||||
},
|
||||
{
|
||||
slug: "categories-geo",
|
||||
|
|
@ -1281,7 +1286,7 @@
|
|||
datasource: "Geo Database",
|
||||
priority: 14,
|
||||
features: ["نقشه پراکندگی استانی", "سهم دستهها به تفکیک شهر", "پتانسیلسنجی مناطق شهری", "توزیع اتاقهای فرار"],
|
||||
updated_at: "۱۴۰۵/۰۸/۱۱ - ۰۹:۴۸ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۱۰ - ۰۹:۴۸ UTC"
|
||||
},
|
||||
{
|
||||
slug: "packages",
|
||||
|
|
@ -1291,7 +1296,7 @@
|
|||
datasource: "Dynamic Simulator",
|
||||
priority: 15,
|
||||
features: ["ماشینحساب درآمدزایی", "مقایسه پکیجهای پروموشن", "پیشبینی فروش کارگاه", "نمودار بازگشت سرمایه"],
|
||||
updated_at: "۱۴۰۵/۰۸/۱۹ - ۱۰:۱۱ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۱۸ - ۱۰:۱۱ UTC"
|
||||
},
|
||||
{
|
||||
slug: "ekeepa-organizers",
|
||||
|
|
@ -1301,7 +1306,7 @@
|
|||
datasource: "Static Interactive Guide",
|
||||
priority: 16,
|
||||
features: ["مزایای همکاری با اکیپا", "راهنمای گامبهگام عضویت", "معرفی درگاههای اعتباری", "پاسخ به سوالات متداول"],
|
||||
updated_at: "۱۴۰۵/۰۸/۰۳ - ۱۲:۵۳ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۰۲ - ۱۲:۵۳ UTC"
|
||||
},
|
||||
{
|
||||
slug: "analytics",
|
||||
|
|
@ -1311,7 +1316,7 @@
|
|||
datasource: "Web Analytics APIs",
|
||||
priority: 17,
|
||||
features: ["تلمتری مایکروسافت کلاریتی", "شاخصهای کلیدی GA4", "تحلیل رفتار کاربران", "تحلیل نرخ پرش"],
|
||||
updated_at: "۱۴۰۵/۰۸/۰۸ - ۰۹:۳۳ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۰۷ - ۰۹:۳۳ UTC"
|
||||
},
|
||||
{
|
||||
slug: "book-event",
|
||||
|
|
@ -1321,7 +1326,7 @@
|
|||
datasource: "Presentation Engine",
|
||||
priority: 18,
|
||||
features: ["طرحدرس ۳ ساعته کارگاه", "جدول زمانبندی و گیمیفیکیشن", "نسخه بهینهشده موبایل", "ساختار هزینه و دستاوردها"],
|
||||
updated_at: "۱۴۰۵/۰۸/۱۴ - ۰۷:۱۶ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۱۳ - ۰۷:۱۶ UTC"
|
||||
},
|
||||
{
|
||||
slug: "weather",
|
||||
|
|
@ -1331,7 +1336,7 @@
|
|||
datasource: "Weather APIs",
|
||||
priority: 19,
|
||||
features: ["پیشبینی ۷ روزه مقاصد", "هشدارهای بارندگی و باد", "پایش رویدادهای فضای باز", "شاخص آسایش حرارتی"],
|
||||
updated_at: "۱۴۰۵/۰۸/۰۸ - ۰۹:۰۶ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۰۷ - ۰۹:۰۶ UTC"
|
||||
}
|
||||
];
|
||||
|
||||
|
|
@ -1381,6 +1386,21 @@
|
|||
await hydrateFromPostgres();
|
||||
}
|
||||
|
||||
function toPersianDigits(n) {
|
||||
if (n === null || n === undefined) return '';
|
||||
return String(n).replace(/\d/g, d => '۰۱۲۳۴۵۶۷۸۹'[d]);
|
||||
}
|
||||
|
||||
function escapeHtml(str) {
|
||||
if (str === null || str === undefined) return '';
|
||||
return String(str)
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''');
|
||||
}
|
||||
|
||||
// Render Category Filter Pills
|
||||
function renderCategoryPills() {
|
||||
const container = document.getElementById("category-pills");
|
||||
|
|
@ -1406,12 +1426,12 @@
|
|||
container.innerHTML = categories.map(cat => `
|
||||
<button class="pill-btn ${currentCategory === cat.id ? 'active' : ''}" onclick="setCategory('${cat.id}')">
|
||||
<span>${cat.label}</span>
|
||||
<span class="pill-badge">${counts[cat.id] || 0}</span>
|
||||
<span class="pill-badge">${toPersianDigits(counts[cat.id] || 0)}</span>
|
||||
</button>
|
||||
`).join("");
|
||||
|
||||
const totalEl = document.getElementById("kpi-total");
|
||||
if (totalEl) totalEl.textContent = appCatalog.length;
|
||||
if (totalEl) totalEl.textContent = toPersianDigits(appCatalog.length);
|
||||
}
|
||||
|
||||
function setCategory(catId) {
|
||||
|
|
@ -1489,21 +1509,28 @@
|
|||
// Render Grid Cards
|
||||
if (gridEl) {
|
||||
gridEl.innerHTML = items.map(dash => {
|
||||
const url = `https://${dash.slug}.ghazale.test.zebellkhan.com/`;
|
||||
const cleanSlug = escapeHtml(dash.slug);
|
||||
const cleanTitle = escapeHtml(dash.title);
|
||||
const cleanCat = escapeHtml(dash.category);
|
||||
const cleanDesc = escapeHtml(dash.description);
|
||||
const cleanDs = escapeHtml(dash.datasource || 'PostgreSQL');
|
||||
const cleanUpdated = toPersianDigits(escapeHtml(dash.updated_at || 'اخیر'));
|
||||
const url = `https://${cleanSlug}.ghazale.test.zebellkhan.com/`;
|
||||
|
||||
return `
|
||||
<article class="dash-card ${dash.is_master ? 'is-master' : ''}">
|
||||
<div>
|
||||
<div class="card-top">
|
||||
<div class="card-badge-group">
|
||||
<span class="badge-cat">${dash.category}</span>
|
||||
<span class="badge-cat">${cleanCat}</span>
|
||||
${dash.is_master ? '<span class="badge-master">مرکز فرماندهی اصلی</span>' : '<span class="badge-status-live"><span class="live-dot" style="width:6px; height:6px;"></span> آنلاین (SSL)</span>'}
|
||||
</div>
|
||||
<span class="card-slug">${dash.slug}</span>
|
||||
<span class="card-slug">${cleanSlug}</span>
|
||||
</div>
|
||||
|
||||
<h2 class="card-title">
|
||||
<span>${dash.title}</span>
|
||||
<span class="info-tip info-icon" title="اسلاگ رسمی: ${dash.slug} | منبع: ${dash.datasource}">ⓘ</span>
|
||||
<span>${cleanTitle}</span>
|
||||
<span class="info-tip info-icon" title="اسلاگ رسمی: ${cleanSlug} | منبع: ${cleanDs}">ⓘ</span>
|
||||
</h2>
|
||||
|
||||
<div class="card-url-box">
|
||||
|
|
@ -1511,10 +1538,10 @@
|
|||
<button class="copy-url-btn" onclick="copyToClipboard('${url}')" title="کپی آدرس">📋</button>
|
||||
</div>
|
||||
|
||||
<p class="card-desc">${dash.description}</p>
|
||||
<p class="card-desc">${cleanDesc}</p>
|
||||
|
||||
<div class="card-features">
|
||||
${(dash.features || []).map(f => `<span class="feat-tag"># ${f}</span>`).join('')}
|
||||
${(dash.features || []).map(f => `<span class="feat-tag"># ${escapeHtml(f)}</span>`).join('')}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -1522,11 +1549,11 @@
|
|||
<div class="card-meta-grid">
|
||||
<div class="meta-item">
|
||||
<span>📅</span>
|
||||
<span>آخرین آپدیت: <strong>${dash.updated_at || 'اخیر'}</strong></span>
|
||||
<span>آخرین آپدیت: <strong>${cleanUpdated}</strong></span>
|
||||
</div>
|
||||
<div class="meta-item">
|
||||
<span>🔌</span>
|
||||
<span>معماری: <strong>${dash.datasource || 'PostgreSQL'}</strong></span>
|
||||
<span>معماری: <strong>${cleanDs}</strong></span>
|
||||
</div>
|
||||
<div class="meta-item">
|
||||
<span>🛡️</span>
|
||||
|
|
@ -1546,7 +1573,7 @@
|
|||
<button class="btn-icon-action" onclick="copyToClipboard('${url}')" title="کپی لینک زیردامنه">
|
||||
<span>🔗</span>
|
||||
</button>
|
||||
<button class="btn-icon-action" onclick="checkHealth('${dash.slug}')" title="پایش اتصال و سلامت">
|
||||
<button class="btn-icon-action" onclick="checkHealth('${cleanSlug}')" title="پایش اتصال و سلامت">
|
||||
<span>💓</span>
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -1559,19 +1586,25 @@
|
|||
// Render Table Rows
|
||||
if (tableBody) {
|
||||
tableBody.innerHTML = items.map(dash => {
|
||||
const url = `https://${dash.slug}.ghazale.test.zebellkhan.com/`;
|
||||
const cleanSlug = escapeHtml(dash.slug);
|
||||
const cleanTitle = escapeHtml(dash.title);
|
||||
const cleanCat = escapeHtml(dash.category);
|
||||
const cleanDs = escapeHtml(dash.datasource);
|
||||
const cleanUpdated = toPersianDigits(escapeHtml(dash.updated_at || 'اخیر'));
|
||||
const url = `https://${cleanSlug}.ghazale.test.zebellkhan.com/`;
|
||||
|
||||
return `
|
||||
<tr>
|
||||
<td>
|
||||
<strong style="color: var(--text-main);">${dash.title}</strong>
|
||||
<br><small style="color: var(--text-muted); direction: ltr; display: inline-block;">${dash.slug}</small>
|
||||
<strong style="color: var(--text-main);">${cleanTitle}</strong>
|
||||
<br><small style="color: var(--text-muted); direction: ltr; display: inline-block;">${cleanSlug}</small>
|
||||
</td>
|
||||
<td>
|
||||
<a href="${url}" target="_blank" style="color: var(--primary); text-decoration: none; font-weight: 600; direction: ltr; display: inline-block;">${url}</a>
|
||||
</td>
|
||||
<td><span class="badge-cat">${dash.category}</span></td>
|
||||
<td><small>${dash.datasource}</small></td>
|
||||
<td><small>${dash.updated_at || 'اخیر'}</small></td>
|
||||
<td><span class="badge-cat">${cleanCat}</span></td>
|
||||
<td><small>${cleanDs}</small></td>
|
||||
<td><small>${cleanUpdated}</small></td>
|
||||
<td>
|
||||
<div style="display: flex; gap: 6px;">
|
||||
<a href="${url}" target="_blank" class="btn btn-secondary btn-sm" style="padding: 4px 8px;">ورود ↗</a>
|
||||
|
|
|
|||
113
hooch.html
113
hooch.html
|
|
@ -143,6 +143,7 @@
|
|||
transition: all 0.15s ease-in-out;
|
||||
border: 1px solid transparent;
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
|
|
@ -624,12 +625,16 @@
|
|||
margin-bottom: 16px;
|
||||
font-size: 11.5px;
|
||||
color: var(--text-muted);
|
||||
text-align: right;
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
.meta-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
align-items: flex-start;
|
||||
gap: 4px;
|
||||
text-align: right;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.meta-item strong {
|
||||
color: var(--text-secondary);
|
||||
|
|
@ -882,7 +887,7 @@
|
|||
<div class="brand-text">
|
||||
<h1>
|
||||
مرکز عملیات hooch
|
||||
<span class="info-tip info-icon" title="مرکز یکپارچه فرماندهی و پایش کلیه ۱۸ داشبورد و سابدامین اختصاصی ایکیپا در زیرساخت ابری">ⓘ</span>
|
||||
<span class="info-tip info-icon" title="مرکز یکپارچه فرماندهی و پایش کلیه ۱۹ داشبورد و سابدامین اختصاصی ایکیپا در زیرساخت ابری">ⓘ</span>
|
||||
</h1>
|
||||
<div class="sub-title">
|
||||
<span><span class="live-dot"></span> کلیه زیردامنهها و سرویسهای عملیاتی فعال هستند</span>
|
||||
|
|
@ -935,7 +940,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button class="btn btn-secondary btn-sm" onclick="openRuleModal()">جزییات قانون ↗</button>
|
||||
<button class="btn btn-secondary btn-sm" onclick="openRuleModal()">جزئیات قانون ↗</button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
|
@ -1151,7 +1156,7 @@
|
|||
priority: 1,
|
||||
is_master: true,
|
||||
features: ["رجیستری متمرکز زیردامنهها", "پایش زنده وضعیت سرویسها", "فیلتر و جستجوی لحظهای", "ثبت خودکار داشبوردهای جدید", "اتصال به دیتابیس PostgreSQL 17"],
|
||||
updated_at: "۱۴۰۵/۰۸/۲۰ - ۰۹:۰۰ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۱۹ - ۱۲:۳۰ UTC"
|
||||
},
|
||||
{
|
||||
slug: "experiences",
|
||||
|
|
@ -1161,7 +1166,7 @@
|
|||
datasource: "PostgreSQL 17 / Live Metabase",
|
||||
priority: 2,
|
||||
features: ["پایش زنده سانسها", "تحلیل نرخ کمیسیون و کنسلی", "همگامسازی استیت در PostgreSQL", "شلیک گزارش تلگرام"],
|
||||
updated_at: "۱۴۰۵/۰۸/۱۹ - ۱۹:۴۵ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۱۸ - ۱۹:۴۵ UTC"
|
||||
},
|
||||
{
|
||||
slug: "bd",
|
||||
|
|
@ -1171,7 +1176,7 @@
|
|||
datasource: "PostgreSQL 17 State Sync",
|
||||
priority: 3,
|
||||
features: ["مدل اعتباری مارکآپ ۱۰٪", "پایش دورههای تسویه حساب", "تعهدات و الحاقیههای بانکی", "ثبت وضعیت پیشرفت جلسات"],
|
||||
updated_at: "۱۴۰۵/۰۸/۲۰ - ۰۹:۱۳ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۱۹ - ۰۹:۱۳ UTC"
|
||||
},
|
||||
{
|
||||
slug: "partner-reports",
|
||||
|
|
@ -1181,7 +1186,7 @@
|
|||
datasource: "PostgreSQL 17 State Sync",
|
||||
priority: 4,
|
||||
features: ["لاگ تعاملی صورتجلسات", "مدیریت اقدامات بعدی (Action Items)", "پایش وضعیت سامانه مودیان", "همگامسازی امن دیتابیس"],
|
||||
updated_at: "۱۴۰۵/۰۸/۲۰ - ۰۹:۱۰ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۱۹ - ۰۹:۱۰ UTC"
|
||||
},
|
||||
{
|
||||
slug: "kr-workshops",
|
||||
|
|
@ -1191,7 +1196,7 @@
|
|||
datasource: "PostgreSQL 17 / Ekeepa API",
|
||||
priority: 5,
|
||||
features: ["شناسنامه ۳۴۸ رویداد", "بسته پیامک تککلیک دارا", "شناسایی کارگاههای زامبی", "پایش ظرفیت و فروش"],
|
||||
updated_at: "۱۴۰۵/۰۸/۱۹ - ۰۸:۳۸ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۱۸ - ۰۸:۳۸ UTC"
|
||||
},
|
||||
{
|
||||
slug: "workshop-audit",
|
||||
|
|
@ -1201,7 +1206,7 @@
|
|||
datasource: "Ekeepa API v2 / Live DB",
|
||||
priority: 6,
|
||||
features: ["افق تقویمی ۶۰ روزه", "کشف عدم تطابق سانسها", "گزارش سانسهای خالی", "ممیزی آنلاین"],
|
||||
updated_at: "۱۴۰۵/۰۸/۱۹ - ۰۶:۵۷ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۱۸ - ۰۶:۵۷ UTC"
|
||||
},
|
||||
{
|
||||
slug: "exp-acquisition",
|
||||
|
|
@ -1211,7 +1216,7 @@
|
|||
datasource: "PostgreSQL 17 State Sync",
|
||||
priority: 7,
|
||||
features: ["برد تعاملی کانبان", "پایش پیجهای هدف اینستاگرام", "رهگیری پیشرفت جذب تا انتشار", "ذخیره ابری وضعیت"],
|
||||
updated_at: "۱۴۰۵/۰۸/۱۸ - ۱۴:۰۰ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۱۷ - ۱۴:۰۰ UTC"
|
||||
},
|
||||
{
|
||||
slug: "campaign-sections",
|
||||
|
|
@ -1221,7 +1226,7 @@
|
|||
datasource: "PostgreSQL 17 / GA4 Stream",
|
||||
priority: 8,
|
||||
features: ["تحلیل تفکیکی ریلها", "رهگیری تگ from_sec", "پایش نرخ کلیک بخشها", "تضمین اصالت تاریخ داده"],
|
||||
updated_at: "۱۴۰۵/۰۸/۱۸ - ۱۲:۱۲ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۱۷ - ۱۲:۱۲ UTC"
|
||||
},
|
||||
{
|
||||
slug: "landings-report",
|
||||
|
|
@ -1231,7 +1236,7 @@
|
|||
datasource: "PostgreSQL 17 State Sync",
|
||||
priority: 9,
|
||||
features: ["تفکیک مسیرهای ورودی", "سنجش نرخ تبدیل هر لندینگ", "محاسبه ارزش سفارشها", "گزارش مدیریتی"],
|
||||
updated_at: "۱۴۰۵/۰۸/۱۸ - ۱۲:۰۰ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۱۷ - ۱۲:۰۰ UTC"
|
||||
},
|
||||
{
|
||||
slug: "event_brief_dashboard",
|
||||
|
|
@ -1241,7 +1246,7 @@
|
|||
datasource: "Local Storage / Direct State",
|
||||
priority: 10,
|
||||
features: ["صدور بریف رسمی ایونت", "تفکیک بودجه و هزینهها", "تقویم اجرایی هماهنگی", "پشتیبانی سازمانی"],
|
||||
updated_at: "۱۴۰۵/۰۸/۱۸ - ۰۶:۰۴ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۱۷ - ۰۶:۰۴ UTC"
|
||||
},
|
||||
{
|
||||
slug: "ops-report",
|
||||
|
|
@ -1251,7 +1256,7 @@
|
|||
datasource: "Static Audit & Ops DB",
|
||||
priority: 11,
|
||||
features: ["تلمتری قیف خرید و پرداخت", "پایش رضایت مشتریان (CSAT)", "مانیتورینگ خطاهای چکاوت", "آمار آزادسازی صندلیها"],
|
||||
updated_at: "۱۴۰۵/۰۸/۱۴ - ۰۶:۲۵ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۱۳ - ۰۶:۲۵ UTC"
|
||||
},
|
||||
{
|
||||
slug: "self-healing",
|
||||
|
|
@ -1261,7 +1266,7 @@
|
|||
datasource: "Ekeepa BI Data Warehouse",
|
||||
priority: 12,
|
||||
features: ["۵ ستون استراتژیک رشد", "ماتریس شکاف عرضه و تقاضا", "هشدارهای خودترمیمی", "گزارش فصلی اهداف"],
|
||||
updated_at: "۱۴۰۵/۰۸/۰۸ - ۰۸:۵۹ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۰۷ - ۰۸:۵۹ UTC"
|
||||
},
|
||||
{
|
||||
slug: "vendors",
|
||||
|
|
@ -1271,7 +1276,7 @@
|
|||
datasource: "Vendors Database",
|
||||
priority: 13,
|
||||
features: ["لیست سفید و سیاه وندورها", "ممیزی مغایرتهای واریزی", "پایش قراردادهای فعال", "تطابق کد اقتصادی"],
|
||||
updated_at: "۱۴۰۵/۰۸/۰۸ - ۱۱:۳۶ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۰۷ - ۱۱:۳۶ UTC"
|
||||
},
|
||||
{
|
||||
slug: "categories-geo",
|
||||
|
|
@ -1281,7 +1286,7 @@
|
|||
datasource: "Geo Database",
|
||||
priority: 14,
|
||||
features: ["نقشه پراکندگی استانی", "سهم دستهها به تفکیک شهر", "پتانسیلسنجی مناطق شهری", "توزیع اتاقهای فرار"],
|
||||
updated_at: "۱۴۰۵/۰۸/۱۱ - ۰۹:۴۸ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۱۰ - ۰۹:۴۸ UTC"
|
||||
},
|
||||
{
|
||||
slug: "packages",
|
||||
|
|
@ -1291,7 +1296,7 @@
|
|||
datasource: "Dynamic Simulator",
|
||||
priority: 15,
|
||||
features: ["ماشینحساب درآمدزایی", "مقایسه پکیجهای پروموشن", "پیشبینی فروش کارگاه", "نمودار بازگشت سرمایه"],
|
||||
updated_at: "۱۴۰۵/۰۸/۱۹ - ۱۰:۱۱ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۱۸ - ۱۰:۱۱ UTC"
|
||||
},
|
||||
{
|
||||
slug: "ekeepa-organizers",
|
||||
|
|
@ -1301,7 +1306,7 @@
|
|||
datasource: "Static Interactive Guide",
|
||||
priority: 16,
|
||||
features: ["مزایای همکاری با اکیپا", "راهنمای گامبهگام عضویت", "معرفی درگاههای اعتباری", "پاسخ به سوالات متداول"],
|
||||
updated_at: "۱۴۰۵/۰۸/۰۳ - ۱۲:۵۳ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۰۲ - ۱۲:۵۳ UTC"
|
||||
},
|
||||
{
|
||||
slug: "analytics",
|
||||
|
|
@ -1311,7 +1316,7 @@
|
|||
datasource: "Web Analytics APIs",
|
||||
priority: 17,
|
||||
features: ["تلمتری مایکروسافت کلاریتی", "شاخصهای کلیدی GA4", "تحلیل رفتار کاربران", "تحلیل نرخ پرش"],
|
||||
updated_at: "۱۴۰۵/۰۸/۰۸ - ۰۹:۳۳ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۰۷ - ۰۹:۳۳ UTC"
|
||||
},
|
||||
{
|
||||
slug: "book-event",
|
||||
|
|
@ -1321,7 +1326,7 @@
|
|||
datasource: "Presentation Engine",
|
||||
priority: 18,
|
||||
features: ["طرحدرس ۳ ساعته کارگاه", "جدول زمانبندی و گیمیفیکیشن", "نسخه بهینهشده موبایل", "ساختار هزینه و دستاوردها"],
|
||||
updated_at: "۱۴۰۵/۰۸/۱۴ - ۰۷:۱۶ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۱۳ - ۰۷:۱۶ UTC"
|
||||
},
|
||||
{
|
||||
slug: "weather",
|
||||
|
|
@ -1331,7 +1336,7 @@
|
|||
datasource: "Weather APIs",
|
||||
priority: 19,
|
||||
features: ["پیشبینی ۷ روزه مقاصد", "هشدارهای بارندگی و باد", "پایش رویدادهای فضای باز", "شاخص آسایش حرارتی"],
|
||||
updated_at: "۱۴۰۵/۰۸/۰۸ - ۰۹:۰۶ UTC"
|
||||
updated_at: "۱۴۰۵/۰۸/۰۷ - ۰۹:۰۶ UTC"
|
||||
}
|
||||
];
|
||||
|
||||
|
|
@ -1381,6 +1386,21 @@
|
|||
await hydrateFromPostgres();
|
||||
}
|
||||
|
||||
function toPersianDigits(n) {
|
||||
if (n === null || n === undefined) return '';
|
||||
return String(n).replace(/\d/g, d => '۰۱۲۳۴۵۶۷۸۹'[d]);
|
||||
}
|
||||
|
||||
function escapeHtml(str) {
|
||||
if (str === null || str === undefined) return '';
|
||||
return String(str)
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''');
|
||||
}
|
||||
|
||||
// Render Category Filter Pills
|
||||
function renderCategoryPills() {
|
||||
const container = document.getElementById("category-pills");
|
||||
|
|
@ -1406,12 +1426,12 @@
|
|||
container.innerHTML = categories.map(cat => `
|
||||
<button class="pill-btn ${currentCategory === cat.id ? 'active' : ''}" onclick="setCategory('${cat.id}')">
|
||||
<span>${cat.label}</span>
|
||||
<span class="pill-badge">${counts[cat.id] || 0}</span>
|
||||
<span class="pill-badge">${toPersianDigits(counts[cat.id] || 0)}</span>
|
||||
</button>
|
||||
`).join("");
|
||||
|
||||
const totalEl = document.getElementById("kpi-total");
|
||||
if (totalEl) totalEl.textContent = appCatalog.length;
|
||||
if (totalEl) totalEl.textContent = toPersianDigits(appCatalog.length);
|
||||
}
|
||||
|
||||
function setCategory(catId) {
|
||||
|
|
@ -1489,21 +1509,28 @@
|
|||
// Render Grid Cards
|
||||
if (gridEl) {
|
||||
gridEl.innerHTML = items.map(dash => {
|
||||
const url = `https://${dash.slug}.ghazale.test.zebellkhan.com/`;
|
||||
const cleanSlug = escapeHtml(dash.slug);
|
||||
const cleanTitle = escapeHtml(dash.title);
|
||||
const cleanCat = escapeHtml(dash.category);
|
||||
const cleanDesc = escapeHtml(dash.description);
|
||||
const cleanDs = escapeHtml(dash.datasource || 'PostgreSQL');
|
||||
const cleanUpdated = toPersianDigits(escapeHtml(dash.updated_at || 'اخیر'));
|
||||
const url = `https://${cleanSlug}.ghazale.test.zebellkhan.com/`;
|
||||
|
||||
return `
|
||||
<article class="dash-card ${dash.is_master ? 'is-master' : ''}">
|
||||
<div>
|
||||
<div class="card-top">
|
||||
<div class="card-badge-group">
|
||||
<span class="badge-cat">${dash.category}</span>
|
||||
<span class="badge-cat">${cleanCat}</span>
|
||||
${dash.is_master ? '<span class="badge-master">مرکز فرماندهی اصلی</span>' : '<span class="badge-status-live"><span class="live-dot" style="width:6px; height:6px;"></span> آنلاین (SSL)</span>'}
|
||||
</div>
|
||||
<span class="card-slug">${dash.slug}</span>
|
||||
<span class="card-slug">${cleanSlug}</span>
|
||||
</div>
|
||||
|
||||
<h2 class="card-title">
|
||||
<span>${dash.title}</span>
|
||||
<span class="info-tip info-icon" title="اسلاگ رسمی: ${dash.slug} | منبع: ${dash.datasource}">ⓘ</span>
|
||||
<span>${cleanTitle}</span>
|
||||
<span class="info-tip info-icon" title="اسلاگ رسمی: ${cleanSlug} | منبع: ${cleanDs}">ⓘ</span>
|
||||
</h2>
|
||||
|
||||
<div class="card-url-box">
|
||||
|
|
@ -1511,10 +1538,10 @@
|
|||
<button class="copy-url-btn" onclick="copyToClipboard('${url}')" title="کپی آدرس">📋</button>
|
||||
</div>
|
||||
|
||||
<p class="card-desc">${dash.description}</p>
|
||||
<p class="card-desc">${cleanDesc}</p>
|
||||
|
||||
<div class="card-features">
|
||||
${(dash.features || []).map(f => `<span class="feat-tag"># ${f}</span>`).join('')}
|
||||
${(dash.features || []).map(f => `<span class="feat-tag"># ${escapeHtml(f)}</span>`).join('')}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -1522,11 +1549,11 @@
|
|||
<div class="card-meta-grid">
|
||||
<div class="meta-item">
|
||||
<span>📅</span>
|
||||
<span>آخرین آپدیت: <strong>${dash.updated_at || 'اخیر'}</strong></span>
|
||||
<span>آخرین آپدیت: <strong>${cleanUpdated}</strong></span>
|
||||
</div>
|
||||
<div class="meta-item">
|
||||
<span>🔌</span>
|
||||
<span>معماری: <strong>${dash.datasource || 'PostgreSQL'}</strong></span>
|
||||
<span>معماری: <strong>${cleanDs}</strong></span>
|
||||
</div>
|
||||
<div class="meta-item">
|
||||
<span>🛡️</span>
|
||||
|
|
@ -1546,7 +1573,7 @@
|
|||
<button class="btn-icon-action" onclick="copyToClipboard('${url}')" title="کپی لینک زیردامنه">
|
||||
<span>🔗</span>
|
||||
</button>
|
||||
<button class="btn-icon-action" onclick="checkHealth('${dash.slug}')" title="پایش اتصال و سلامت">
|
||||
<button class="btn-icon-action" onclick="checkHealth('${cleanSlug}')" title="پایش اتصال و سلامت">
|
||||
<span>💓</span>
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -1559,19 +1586,25 @@
|
|||
// Render Table Rows
|
||||
if (tableBody) {
|
||||
tableBody.innerHTML = items.map(dash => {
|
||||
const url = `https://${dash.slug}.ghazale.test.zebellkhan.com/`;
|
||||
const cleanSlug = escapeHtml(dash.slug);
|
||||
const cleanTitle = escapeHtml(dash.title);
|
||||
const cleanCat = escapeHtml(dash.category);
|
||||
const cleanDs = escapeHtml(dash.datasource);
|
||||
const cleanUpdated = toPersianDigits(escapeHtml(dash.updated_at || 'اخیر'));
|
||||
const url = `https://${cleanSlug}.ghazale.test.zebellkhan.com/`;
|
||||
|
||||
return `
|
||||
<tr>
|
||||
<td>
|
||||
<strong style="color: var(--text-main);">${dash.title}</strong>
|
||||
<br><small style="color: var(--text-muted); direction: ltr; display: inline-block;">${dash.slug}</small>
|
||||
<strong style="color: var(--text-main);">${cleanTitle}</strong>
|
||||
<br><small style="color: var(--text-muted); direction: ltr; display: inline-block;">${cleanSlug}</small>
|
||||
</td>
|
||||
<td>
|
||||
<a href="${url}" target="_blank" style="color: var(--primary); text-decoration: none; font-weight: 600; direction: ltr; display: inline-block;">${url}</a>
|
||||
</td>
|
||||
<td><span class="badge-cat">${dash.category}</span></td>
|
||||
<td><small>${dash.datasource}</small></td>
|
||||
<td><small>${dash.updated_at || 'اخیر'}</small></td>
|
||||
<td><span class="badge-cat">${cleanCat}</span></td>
|
||||
<td><small>${cleanDs}</small></td>
|
||||
<td><small>${cleanUpdated}</small></td>
|
||||
<td>
|
||||
<div style="display: flex; gap: 6px;">
|
||||
<a href="${url}" target="_blank" class="btn btn-secondary btn-sm" style="padding: 4px 8px;">ورود ↗</a>
|
||||
|
|
|
|||
Loading…
Reference in a new issue