import { useMemo, useState } from 'react' import { convertCurrency, formatCurrency, faviconUrlFromWebsite, normalizeWebsiteUrl } from '../lib/utils' import { IconArrowDown, IconArrowUp, IconMapPin, IconRefresh, IconSearch, IconServer, } from '@tabler/icons-react' import { syncAccount } from '../lib/api' import { EmptyState } from '../components/EmptyState' import { PageHeader } from '../components/PageHeader' import { noBrowserSuggestProps } from '../lib/noBrowserSuggestProps' import { billmanagerSyncableAccounts } from '../lib/billmanager-ui' const SORT_COLUMNS = ['name', 'vcpu', 'ramGb', 'diskGb', 'diskType', 'virtualization', 'channel', 'country', 'location', 'price'] function SortHeader({ column, children, onSort, sortBy, sortDir }) { return (
| Хостер / Аккаунт | CPU | ₽/vCPU | ₽/GB RAM | ₽/GB диск | Заказ | Панель | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
{item.name || '—'}
{item.desc ? (
{item.desc}
) : null}
|
{faviconUrlFromWebsite(provider?.website) ? (
{account?.name || '—'}
|
{item.vcpu || '—'} | {item.ramGb ? `${item.ramGb} GB` : '—'} | {item.diskGb ? `${item.diskGb} GB` : '—'} | {item.diskType || '—'} | {item.virtualization || '—'} | {item.channel || '—'} | {item.country ? ( {item.country} ) : ( '—' )} | {item.location || item.datacenterName || '—'} | {item.cpuModel ? ( {item.cpuModel.length > 20 ? `${item.cpuModel.slice(0, 20)}…` : item.cpuModel} ) : ( '—' )} | {item.price || '—'} | {pricePerVcpu != null ? formatCurrency(pricePerVcpu, baseCurrency) : '—'} | {pricePerRam != null ? formatCurrency(pricePerRam, baseCurrency) : '—'} | {pricePerDisk != null ? formatCurrency(pricePerDisk, baseCurrency) : '—'} | {item.orderAvailable ? 'Да' : 'Нет'} | {normalizeWebsiteUrl(account?.panelUrl || provider?.website) ? ( Открыть ) : ( — )} |