Merge pull request #55648 from ClickHouse/reimplement-55639

Show move/maximize only if there is more than a single chart
This commit is contained in:
Alexey Milovidov 2023-10-16 05:00:16 +02:00 committed by GitHub
commit 6d16a85364
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -420,6 +420,10 @@
color: var(--auth-error-color);
}
#charts > div:only-child .display-only-if-more-than-one-chart {
display: none;
}
/* Source: https://cdn.jsdelivr.net/npm/uplot@1.6.21/dist/uPlot.min.css
* It is copy-pasted to lower the number of requests.
*/
@ -931,6 +935,9 @@ function insertChart(i) {
saveState();
});
move.classList.add('display-only-if-more-than-one-chart');
maximize.classList.add('display-only-if-more-than-one-chart');
edit_buttons.appendChild(move);
edit_buttons.appendChild(maximize);
edit_buttons.appendChild(edit);