Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Update frontend/src/pages/SuperAdminPanel.jsx
Browse files
frontend/src/pages/SuperAdminPanel.jsx
CHANGED
|
@@ -1574,7 +1574,7 @@ const SuperAdminPanel = () => {
|
|
| 1574 |
<td className="px-md py-sm"><span className="px-2 py-0.5 rounded border text-[11px] font-bold tracking-wide bg-surface-container-high border-outline-variant text-on-surface-variant">{org.tier || org.subscription_tier}</span></td>
|
| 1575 |
<td className="px-md py-sm"><div className="flex items-center gap-xs text-[12.5px] font-bold"><span className={`w-2 h-2 rounded-full ${org.status === 'active' || org.is_active ? 'bg-green-500' : 'bg-red-500'}`}></span><span className={org.status === 'active' || org.is_active ? 'text-green-600 dark:text-green-500' : 'text-error'}>{org.status ? org.status.charAt(0).toUpperCase() + org.status.slice(1) : (org.is_active ? 'Active' : 'Inactive')}</span></div></td>
|
| 1576 |
<td className="px-md py-sm">
|
| 1577 |
-
<div className="flex flex-
|
| 1578 |
{org.quotas?.map((q, idx) => {
|
| 1579 |
const remaining = q.allocated_count === -1 ? '∞' : Math.max(0, q.allocated_count - (q.used_count || 0));
|
| 1580 |
const style = q.scan_type === 'Deep' ? 'bg-orange-500/10 text-orange-600 border-orange-500/30' :
|
|
@@ -1589,26 +1589,28 @@ const SuperAdminPanel = () => {
|
|
| 1589 |
})}
|
| 1590 |
</div>
|
| 1591 |
</td>
|
| 1592 |
-
<td className="px-md py-sm text-right">
|
| 1593 |
-
<
|
| 1594 |
-
<
|
| 1595 |
-
|
| 1596 |
-
|
| 1597 |
-
|
| 1598 |
-
<
|
| 1599 |
-
<
|
| 1600 |
-
|
| 1601 |
-
|
| 1602 |
-
<
|
| 1603 |
-
|
| 1604 |
-
|
| 1605 |
-
<
|
| 1606 |
-
|
| 1607 |
-
|
| 1608 |
-
<
|
| 1609 |
-
|
| 1610 |
-
|
| 1611 |
-
|
|
|
|
|
|
|
| 1612 |
</td>
|
| 1613 |
</tr>
|
| 1614 |
))}
|
|
|
|
| 1574 |
<td className="px-md py-sm"><span className="px-2 py-0.5 rounded border text-[11px] font-bold tracking-wide bg-surface-container-high border-outline-variant text-on-surface-variant">{org.tier || org.subscription_tier}</span></td>
|
| 1575 |
<td className="px-md py-sm"><div className="flex items-center gap-xs text-[12.5px] font-bold"><span className={`w-2 h-2 rounded-full ${org.status === 'active' || org.is_active ? 'bg-green-500' : 'bg-red-500'}`}></span><span className={org.status === 'active' || org.is_active ? 'text-green-600 dark:text-green-500' : 'text-error'}>{org.status ? org.status.charAt(0).toUpperCase() + org.status.slice(1) : (org.is_active ? 'Active' : 'Inactive')}</span></div></td>
|
| 1576 |
<td className="px-md py-sm">
|
| 1577 |
+
<div className="flex flex-wrap gap-1.5 items-center">
|
| 1578 |
{org.quotas?.map((q, idx) => {
|
| 1579 |
const remaining = q.allocated_count === -1 ? '∞' : Math.max(0, q.allocated_count - (q.used_count || 0));
|
| 1580 |
const style = q.scan_type === 'Deep' ? 'bg-orange-500/10 text-orange-600 border-orange-500/30' :
|
|
|
|
| 1589 |
})}
|
| 1590 |
</div>
|
| 1591 |
</td>
|
| 1592 |
+
<td className="px-md py-sm text-right whitespace-nowrap">
|
| 1593 |
+
<div className="inline-flex items-center justify-end gap-1 whitespace-nowrap">
|
| 1594 |
+
<button onClick={() => handleImpersonate(org.id, org.name)} className="text-on-surface-variant hover:text-primary transition-colors bg-transparent border-0 cursor-pointer p-1" title="View Customer Environment / Assist Troubleshooting">
|
| 1595 |
+
<span className="material-symbols-outlined text-[18px]">vpn_key</span>
|
| 1596 |
+
</button>
|
| 1597 |
+
{!isSupportEngineer && (
|
| 1598 |
+
<>
|
| 1599 |
+
<button onClick={() => handleAssignScans(org)} className="text-on-surface-variant hover:text-primary transition-colors bg-transparent border-0 cursor-pointer p-1" title="Assign Custom Scans">
|
| 1600 |
+
<span className="material-symbols-outlined text-[18px]">add_box</span>
|
| 1601 |
+
</button>
|
| 1602 |
+
<button onClick={() => handleEditTenant(org)} className="text-on-surface-variant hover:text-primary transition-colors bg-transparent border-0 cursor-pointer p-1" title="Edit Tenant">
|
| 1603 |
+
<span className="material-symbols-outlined text-[18px]">edit</span>
|
| 1604 |
+
</button>
|
| 1605 |
+
<button onClick={() => handleSuspend(org.id, org.status)} className="text-on-surface-variant hover:text-error transition-colors bg-transparent border-0 cursor-pointer p-1" title="Suspend Tenant">
|
| 1606 |
+
<span className="material-symbols-outlined text-[18px]">{org.status === 'suspended' ? 'play_arrow' : 'pause_circle'}</span>
|
| 1607 |
+
</button>
|
| 1608 |
+
<button onClick={() => handleDeleteTenant(org.id, org.name)} className="text-on-surface-variant hover:text-error transition-colors bg-transparent border-0 cursor-pointer p-1" title="Delete Tenant">
|
| 1609 |
+
<span className="material-symbols-outlined text-[18px]">delete</span>
|
| 1610 |
+
</button>
|
| 1611 |
+
</>
|
| 1612 |
+
)}
|
| 1613 |
+
</div>
|
| 1614 |
</td>
|
| 1615 |
</tr>
|
| 1616 |
))}
|