feat: Add history endpoints for resource versioning and implement rollback functionality in server, along with UI integration in ASNs, Domains, and IPRanges managers for enhanced data management
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 4m45s
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 4m45s
This commit is contained in:
@@ -21,6 +21,7 @@ import LockBanner from './components/LockBanner.jsx';
|
||||
import TableSkeleton from './components/TableSkeleton.jsx';
|
||||
import S3MetaBar from './components/S3MetaBar.jsx';
|
||||
import ConfirmDiffModal from './components/ConfirmDiffModal.jsx';
|
||||
import HistoryModal from './components/HistoryModal.jsx';
|
||||
|
||||
const API_URL = '/api';
|
||||
|
||||
@@ -214,6 +215,7 @@ function IPRangesManager() {
|
||||
const [showDiff, setShowDiff] = useState(false);
|
||||
const [diff, setDiff] = useState({ added: [], removed: [], changed: [] });
|
||||
const [confirmSaveOpen, setConfirmSaveOpen] = useState(false);
|
||||
const [historyOpen, setHistoryOpen] = useState(false);
|
||||
|
||||
const handlePreviewDiff = () => {
|
||||
const valid = items.filter(i => isValidCidr(i.ipRange) && isValidCommunity(i.community))
|
||||
@@ -563,6 +565,9 @@ function IPRangesManager() {
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button className="btn btn-outline-secondary" onClick={() => setHistoryOpen(true)}>История</button>
|
||||
</div>
|
||||
</div>
|
||||
{/* Мета-информация будет показана внизу карточки */}
|
||||
{loading ? (
|
||||
@@ -722,6 +727,12 @@ function IPRangesManager() {
|
||||
onConfirm={performSave}
|
||||
onClose={() => setConfirmSaveOpen(false)}
|
||||
/>
|
||||
<HistoryModal
|
||||
resource="ip-ranges"
|
||||
show={historyOpen}
|
||||
onClose={() => setHistoryOpen(false)}
|
||||
onRolledBack={() => fetchItems()}
|
||||
/>
|
||||
{/* Diff Modal */}
|
||||
{showDiff && (
|
||||
<div className="modal modal-blur fade show" style={{display: 'block'}} tabIndex="-1">
|
||||
|
||||
Reference in New Issue
Block a user