mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Dashboard graph Y-axis width should increase with label. #5929
This commit is contained in:
parent
e32019882e
commit
f72f4aa359
@ -80,7 +80,7 @@ export function getNodeView(nodeType, treeNodeInfo, actionType, itemNodeData, fo
|
||||
resolve(res.data);
|
||||
onSave && onSave(res.data);
|
||||
}).catch((err)=>{
|
||||
Notify.pgNotifier('error', err, '', function(msg) {
|
||||
Notify.pgNotifier('error-noalert', err, '', function(msg) {
|
||||
if (msg == 'CRYPTKEY_SET') {
|
||||
return Promise.resolve(onSaveClick(isNew, data));
|
||||
} else if (msg == 'CRYPTKEY_NOT_SET') {
|
||||
|
@ -92,6 +92,16 @@ export default function StreamingChart({xRange=75, data, options}) {
|
||||
{
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
size: function(_obj, values) {
|
||||
let size = 40;
|
||||
if(values?.length > 0) {
|
||||
size = values[values.length-1].length*12;
|
||||
if(size < 40) size = 40;
|
||||
}
|
||||
return size;
|
||||
}
|
||||
}
|
||||
],
|
||||
plugins: options.showTooltip ? [tooltipPlugin(data.refreshRate)] : [],
|
||||
}), [data.refreshRate, data?.datasets?.length, width, height, options]);
|
||||
|
@ -192,6 +192,9 @@ let Notifier = {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(type == 'error-noalert' && onJSONResult && typeof(onJSONResult) == 'function') {
|
||||
return onJSONResult();
|
||||
}
|
||||
this.alert(promptmsg, msg.replace(new RegExp(/\r?\n/, 'g'), '<br />'));
|
||||
},
|
||||
alert: (title, text, onOkClick, okLabel=gettext('OK'))=>{
|
||||
|
Loading…
Reference in New Issue
Block a user