Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -523,8 +523,7 @@ define('pgadmin.node.database', [
i = item,
label = data.label;
let disconnect = function() {
d.label = `<span class='text-muted'>[Disconnecting...]</span> ${label}`;
t.setLabel(i,{label:d.label});
t.setLabel(i, {label: `[Disconnecting...] ${label}`, className: 'text-muted'});
t.close(i);
let data = d;
getApiInstance().delete(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -822,8 +822,7 @@ define('pgadmin.node.server', [
label = data.label;

let disconnect = function() {
d.label = `<span class='text-muted'>[Disconnecting...]</span> ${label}`;
t.setLabel(i,{label:d.label});
t.setLabel(i, {label: `[Disconnecting...] ${label}`, className: 'text-muted'});
t.close(i);
getApiInstance().delete(
obj.generate_url(i, 'connect', d, true),
Expand Down
5 changes: 5 additions & 0 deletions web/pgadmin/static/js/components/PgTree/FileTreeX/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -455,10 +455,15 @@ export class FileTreeX extends React.Component<IFileTreeXProps> {
const label$ = ref.querySelector('span.file-name') as HTMLDivElement;

if (label$) {
let className = '';
if (typeof(label) == 'object' && label.label) {
className = label.className ?? '';
label = label.label;
}
// Render the label as plain text (never as an HTML string) and apply
// any requested styling via a CSS class instead of embedding markup.
label$.textContent = label;
label$.className = 'file-name' + (className ? ' ' + className : '');
}

}
Expand Down
Loading