mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-10 23:45:58 -06:00
24 lines
711 B
JavaScript
24 lines
711 B
JavaScript
|
/////////////////////////////////////////////////////////////
|
||
|
//
|
||
|
// pgAdmin 4 - PostgreSQL Tools
|
||
|
//
|
||
|
// Copyright (C) 2013 - 2018, The pgAdmin Development Team
|
||
|
// This software is released under the PostgreSQL Licence
|
||
|
//
|
||
|
//////////////////////////////////////////////////////////////
|
||
|
|
||
|
import {isValidTreeNodeData} from '../../../../static/js/tree/tree';
|
||
|
|
||
|
export const backupSupportedNodes = [
|
||
|
'database', 'schema', 'table', 'partition',
|
||
|
];
|
||
|
|
||
|
function isNodeAServerAndConnected(treeNodeData) {
|
||
|
return (('server' === treeNodeData._type) && treeNodeData.connected);
|
||
|
}
|
||
|
|
||
|
export function menuEnabledServer(treeNodeData) {
|
||
|
return isValidTreeNodeData(treeNodeData)
|
||
|
&& isNodeAServerAndConnected(treeNodeData);
|
||
|
}
|