()
| 278 | } |
| 279 | |
| 280 | export function showNamedRestorePoint() { |
| 281 | let title = arguments[0], |
| 282 | nodeData = arguments[1], |
| 283 | nodeObj = arguments[2], |
| 284 | itemNodeData = arguments[3]; |
| 285 | |
| 286 | const panelId = BROWSER_PANELS.SEARCH_OBJECTS; |
| 287 | const onClose = ()=>{pgAdmin.Browser.docker.default_workspace.close(panelId);}; |
| 288 | pgAdmin.Browser.docker.default_workspace.openDialog({ |
| 289 | id: panelId, |
| 290 | title: title, |
| 291 | content: ( |
| 292 | <NamedRestoreContent |
| 293 | closeModal={onClose} |
| 294 | onOK={(formData)=>{ |
| 295 | const api = getApiInstance(); |
| 296 | let _url = nodeObj.generate_url(itemNodeData, 'restore_point', nodeData, true); |
| 297 | |
| 298 | api.post(_url, formData) |
| 299 | .then(res=>{ |
| 300 | onClose(); |
| 301 | pgAdmin.Browser.notifier.success(res.data.data.result); |
| 302 | }) |
| 303 | .catch(function(error) { |
| 304 | pgAdmin.Browser.notifier.pgRespErrorNotify(error); |
| 305 | }); |
| 306 | }} |
| 307 | /> |
| 308 | ) |
| 309 | }, pgAdmin.Browser.stdW.md, 180); |
| 310 | } |
| 311 | |
| 312 | export function showChangeOwnership() { |
| 313 | let title = arguments[0], |
no test coverage detected