Skip to content

Commit

Permalink
Add analyze table action (#737)
Browse files Browse the repository at this point in the history
  • Loading branch information
sosedoff authored May 15, 2024
1 parent cf86131 commit 40f582d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ <h3 class="text-center">SSH Connection</h3>
<div id="tables_context_menu">
<ul class="dropdown-menu" role="menu">
<li><a href="#" data-action="copy">Copy Table Name</a></li>
<li><a href="#" data-action="analyze">Analyze Table</a></li>
<li class="divider"></li>
<li><a href="#" data-action="export" data-format="json">Export to JSON</a></li>
<li><a href="#" data-action="export" data-format="csv">Export to CSV</a></li>
Expand Down
6 changes: 6 additions & 0 deletions static/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,12 @@ function performTableAction(table, action, el) {
case "copy":
copyToClipboard(table.split('.')[1]);
break;
case "analyze":
executeQuery("ANALYZE " + table, function(data) {
if (data.error) alert(data.error);
resetTable();
});
break;
}
}

Expand Down

0 comments on commit 40f582d

Please sign in to comment.