diff --git a/backend/framework/src/main/java/org/jumpserver/chen/framework/console/DataViewConsole.java b/backend/framework/src/main/java/org/jumpserver/chen/framework/console/DataViewConsole.java index 7e6bd3d..0f9c9eb 100644 --- a/backend/framework/src/main/java/org/jumpserver/chen/framework/console/DataViewConsole.java +++ b/backend/framework/src/main/java/org/jumpserver/chen/framework/console/DataViewConsole.java @@ -104,7 +104,8 @@ public void onConnect(Connect connect) { public void createDataView(String schemaName, String tableName) { var viewTitle = this.getTitle() + "child"; - this.getPacketIO().sendPacket("new_data_view", Map.of("title", viewTitle)); + var data = Map.of("title", viewTitle, "schema", this.schema, "table", this.table); + this.getPacketIO().sendPacket("new_data_view", data); var dataView = new DataView(viewTitle, this.getPacketIO(), this.getConsoleLogger()); var session = SessionManager.getCurrentSession(); diff --git a/frontend/src/components/Main/Explore/DataView/DataView.vue b/frontend/src/components/Main/Explore/DataView/DataView.vue index 3383327..d147ece 100644 --- a/frontend/src/components/Main/Explore/DataView/DataView.vue +++ b/frontend/src/components/Main/Explore/DataView/DataView.vue @@ -1,7 +1,8 @@ diff --git a/frontend/src/components/Main/Explore/DataView/RightMenu.vue b/frontend/src/components/Main/Explore/DataView/RightMenu.vue new file mode 100644 index 0000000..8c6fb82 --- /dev/null +++ b/frontend/src/components/Main/Explore/DataView/RightMenu.vue @@ -0,0 +1,130 @@ + + + + + diff --git a/frontend/src/components/Main/Explore/DataView/const.js b/frontend/src/components/Main/Explore/DataView/const.js new file mode 100644 index 0000000..d155671 --- /dev/null +++ b/frontend/src/components/Main/Explore/DataView/const.js @@ -0,0 +1,12 @@ +export const GeneralUpdateSQL = 'UPDATE {table_name} SET {updated_attrs} WHERE {conditional_attrs};' +export const GeneralInsertSQL = 'INSERT INTO {table_name} ({fields}) VALUES ({values});' + +export const SpecialCharacters = { + mysql: '`', + mariadb: '`', + postgresql: '"', + sqlserver: '', + oracle: '"', + dameng: '"', + db2: '' +}