diff --git a/frontend/src/pages/ObjectDetail.tsx b/frontend/src/pages/ObjectDetail.tsx index 108c1fd..7e8c2a6 100644 --- a/frontend/src/pages/ObjectDetail.tsx +++ b/frontend/src/pages/ObjectDetail.tsx @@ -25,7 +25,6 @@ import { Select, Space, Spin, - Switch, Table, Tag, Tooltip, @@ -72,9 +71,9 @@ type GroupRow = { type DeviceRow = DeviceItem & { _type: 'device' } type TableRow = GroupRow | DeviceRow -// Inventory cols: IP, Hostname, Rack, Category, Ping+Status, Source, Actions = 7 -// Work cols: IP, Hostname, Category, Ping+Status, Actions = 5 -const COL_SPAN: Record = { inventory: 7, work: 5 } +// Inventory cols: IP, Hostname, Category, Ping+Status, Source, Actions = 6 +// Work cols: IP, Hostname, Category, Ping+Status, Actions = 5 +const COL_SPAN: Record = { inventory: 6, work: 5 } function PingButton({ scope, @@ -127,7 +126,6 @@ export function ObjectDetailPage({ defaultMode = 'inventory' }: { defaultMode?: const queryClient = useQueryClient() const [mode, setMode] = useState(defaultMode) - const [editMode, setEditMode] = useState(false) const toggleMode = () => setMode((m) => (m === 'inventory' ? 'work' : 'inventory')) @@ -397,19 +395,6 @@ export function ObjectDetailPage({ defaultMode = 'inventory' }: { defaultMode?: ) }, }, - ...(mode === 'inventory' ? [{ - title: 'Стойка / локация', - key: 'location', - onCell: (row: TableRow) => row._type === 'group' ? { colSpan: 0 } : {}, - render: (_: unknown, row: TableRow) => { - if (row._type === 'group') return null - const d = row as DeviceRow - if (d.rack_name) return {rackLabel(d.rack_name, d.rack_type)} - if (d.location === 'server_room') return Серверная - if (d.location === 'street') return Улица - return - }, - }] : []), { title: 'Категория', dataIndex: 'category', @@ -509,7 +494,6 @@ export function ObjectDetailPage({ defaultMode = 'inventory' }: { defaultMode?: ) } - if (!editMode) return null return (