mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
51 lines
1.2 KiB
JavaScript
51 lines
1.2 KiB
JavaScript
/////////////////////////////////////////////////////////////
|
|
//
|
|
// pgAdmin 4 - PostgreSQL Tools
|
|
//
|
|
// Copyright (C) 2013 - 2021, The pgAdmin Development Team
|
|
// This software is released under the PostgreSQL Licence
|
|
//
|
|
//////////////////////////////////////////////////////////////
|
|
|
|
import React from 'react';
|
|
import ReactDOM from 'react-dom';
|
|
import _ from 'lodash';
|
|
|
|
import BodyWidget from './ui_components/BodyWidget';
|
|
import getDialog from './dialogs';
|
|
import Alertify from 'pgadmin.alertifyjs';
|
|
import pgWindow from 'sources/window';
|
|
import pgAdmin from 'sources/pgadmin';
|
|
|
|
export default class ERDTool {
|
|
constructor(container, params) {
|
|
this.container = document.querySelector(container);
|
|
this.params = params;
|
|
}
|
|
|
|
getPreferencesForModule() {
|
|
|
|
}
|
|
|
|
render() {
|
|
/* Mount the React ERD tool to the container */
|
|
let panel = null;
|
|
_.each(pgWindow.pgAdmin.Browser.docker.findPanels('frm_erdtool'), function(p) {
|
|
if (p.isVisible()) {
|
|
panel = p;
|
|
}
|
|
});
|
|
|
|
ReactDOM.render(
|
|
<BodyWidget
|
|
params={this.params}
|
|
getDialog={getDialog}
|
|
pgWindow={pgWindow}
|
|
pgAdmin={pgAdmin}
|
|
panel={panel}
|
|
alertify={Alertify} />,
|
|
this.container
|
|
);
|
|
}
|
|
}
|