feat(instances): command palette, unified nav, расширенное меню инстанса и правки табов
All checks were successful
Deploy to Production / Trigger production update (push) Successful in 8s
All checks were successful
Deploy to Production / Trigger production update (push) Successful in 8s
- Командная палитра (Ctrl+K) с общим реестром nav-items и его store - Новые общие UI-примитивы: alert, breadcrumb, checkbox, progress, switch, textarea - Меню инстанса: добавлены «Параметры», «Мигрировать», «Изменить ресурсы», «Создать резервную копию» (новый BackupDialog) и «Удалить»; исправлено закрытие меню при живом обновлении списка (стабильные columns + getRowId) - Вкладки инстанса: «Вычислительные ресурсы», «Опции CPU», «Управление дисками» и «Изменение размера диска» перенесены с «Настройки» на «Оборудование» для VM (для LXC, у которых нет вкладки «Оборудование», ресурсы и ресайз диска остаются в «Настройках»); общие карточки вынесены в ResourceCards.tsx - Локализация: новые ключи ru/en для добавленных пунктов меню и бэкапа Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import { useTranslation } from 'react-i18next';
|
||||
import { ArrowLeft, Pencil, Trash2, Plus } from 'lucide-react';
|
||||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Checkbox } from '@/components/ui/checkbox';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Label } from '@/components/ui/label';
|
||||
@@ -200,11 +201,11 @@ function NetworkActions({ network }: { network: IPAMNetwork }) {
|
||||
<WorkspaceSelect value={form.workspace_id} onChange={(id) => setForm(p => ({ ...p, workspace_id: id }))} />
|
||||
<Field label={t('ipam.description')} full><Input value={form.description} onChange={e => setForm(p => ({ ...p, description: e.target.value }))} /></Field>
|
||||
<label className="flex items-center gap-2 text-sm sm:col-span-2">
|
||||
<input type="checkbox" checked={form.is_default} onChange={e => setForm(p => ({ ...p, is_default: e.target.checked }))} />
|
||||
<Checkbox checked={form.is_default} onChange={e => setForm(p => ({ ...p, is_default: e.target.checked }))} />
|
||||
{t('ipam.is_default', 'Сеть по умолчанию для области')}
|
||||
</label>
|
||||
<label className="flex items-center gap-2 text-sm sm:col-span-2">
|
||||
<input type="checkbox" checked={form.is_active} onChange={e => setForm(p => ({ ...p, is_active: e.target.checked }))} />
|
||||
<Checkbox checked={form.is_active} onChange={e => setForm(p => ({ ...p, is_active: e.target.checked }))} />
|
||||
{t('ipam.is_active')}
|
||||
</label>
|
||||
</div>
|
||||
@@ -219,7 +220,7 @@ function NetworkActions({ network }: { network: IPAMNetwork }) {
|
||||
<DialogHeader><DialogTitle>{t('ipam.delete_network')}</DialogTitle></DialogHeader>
|
||||
<p className="text-sm text-muted-foreground">{t('ipam.delete_network_confirm', { name: network.name })}</p>
|
||||
<label className="flex items-center gap-2 text-sm">
|
||||
<input type="checkbox" checked={force} onChange={e => setForce(e.target.checked)} />
|
||||
<Checkbox checked={force} onChange={e => setForce(e.target.checked)} />
|
||||
{t('ipam.force_delete')}
|
||||
</label>
|
||||
<DialogFooter>
|
||||
@@ -339,7 +340,7 @@ function PoolsCard({ networkId, pools }: { networkId: number; pools: IPAMPool[]
|
||||
<Field label={`${t('ipam.range')} (end)`}><Input value={form.range_end} onChange={e => setForm(p => ({ ...p, range_end: e.target.value }))} placeholder="10.0.0.250" /></Field>
|
||||
<Field label={t('ipam.description')} full><Input value={form.description} onChange={e => setForm(p => ({ ...p, description: e.target.value }))} /></Field>
|
||||
<label className="flex items-center gap-2 text-sm sm:col-span-2">
|
||||
<input type="checkbox" checked={form.auto_assign} onChange={e => setForm(p => ({ ...p, auto_assign: e.target.checked }))} />
|
||||
<Checkbox checked={form.auto_assign} onChange={e => setForm(p => ({ ...p, auto_assign: e.target.checked }))} />
|
||||
{t('ipam.auto_assign')}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@@ -4,6 +4,7 @@ import { useTranslation } from 'react-i18next';
|
||||
import { Plus, Globe, Search } from 'lucide-react';
|
||||
import { Card, CardContent } from '@/components/ui/card';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Checkbox } from '@/components/ui/checkbox';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog';
|
||||
@@ -104,7 +105,7 @@ export default function IPAMNetworksPage() {
|
||||
<div><Label>Gateway</Label><Input value={form.gateway} onChange={e => setForm(p => ({ ...p, gateway: e.target.value }))} placeholder="10.0.0.1" /></div>
|
||||
<WorkspaceSelect value={form.workspace_id} onChange={(id) => setForm(p => ({ ...p, workspace_id: id }))} />
|
||||
<label className="flex items-center gap-2 text-sm">
|
||||
<input type="checkbox" checked={form.is_default} onChange={e => setForm(p => ({ ...p, is_default: e.target.checked }))} />
|
||||
<Checkbox checked={form.is_default} onChange={e => setForm(p => ({ ...p, is_default: e.target.checked }))} />
|
||||
{t('ipam.is_default', 'Сеть по умолчанию для области')}
|
||||
</label>
|
||||
<div><Label>{t('ipam.bridge')}</Label><Input value={form.proxmox_bridge} onChange={e => setForm(p => ({ ...p, proxmox_bridge: e.target.value }))} placeholder="vmbr0" /></div>
|
||||
|
||||
Reference in New Issue
Block a user