* [pdm-devel] [PATCH datacenter-manager 1/2] ui: pve tree: make name column collapse the text
@ 2025-01-29 10:44 Dominik Csapak
2025-01-29 10:44 ` [pdm-devel] [PATCH datacenter-manager 2/2] server: api: task: return upid in status Dominik Csapak
2025-01-29 17:22 ` [pdm-devel] [PATCH datacenter-manager 1/2] ui: pve tree: make name column collapse the text Thomas Lamprecht
0 siblings, 2 replies; 4+ messages in thread
From: Dominik Csapak @ 2025-01-29 10:44 UTC (permalink / raw)
To: pdm-devel
due to how the html/css layout is constructed, we have to manually take
care of the (text)overflow here to have properly ellipsed text when the
column gets too small.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
ui/src/pve/tree.rs | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/ui/src/pve/tree.rs b/ui/src/pve/tree.rs
index 50a5ae4..95fb0ec 100644
--- a/ui/src/pve/tree.rs
+++ b/ui/src/pve/tree.rs
@@ -557,10 +557,15 @@ fn columns(
.class(AlignItems::Baseline)
.gap(2)
.with_child(utils::render_lxc_status_icon(r))
- .with_child(render_lxc_name(r, true)),
+ .with_child(
+ Container::new()
+ .style("text-overflow", "ellipsis")
+ .style("overflow", "hidden")
+ .with_child(render_lxc_name(r, true)),
+ ),
};
- Container::new().with_child(el).into()
+ Container::new().min_width(0).with_child(el).into()
})
.into(),
DataTableColumn::new(tr!("Tags"))
--
2.39.5
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pdm-devel] [PATCH datacenter-manager 2/2] server: api: task: return upid in status
2025-01-29 10:44 [pdm-devel] [PATCH datacenter-manager 1/2] ui: pve tree: make name column collapse the text Dominik Csapak
@ 2025-01-29 10:44 ` Dominik Csapak
2025-01-29 17:31 ` [pdm-devel] applied: " Thomas Lamprecht
2025-01-29 17:22 ` [pdm-devel] [PATCH datacenter-manager 1/2] ui: pve tree: make name column collapse the text Thomas Lamprecht
1 sibling, 1 reply; 4+ messages in thread
From: Dominik Csapak @ 2025-01-29 10:44 UTC (permalink / raw)
To: pdm-devel
upid was not in params, since it's an extra parameter, so simply use that
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
server/src/api/nodes/tasks.rs | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/server/src/api/nodes/tasks.rs b/server/src/api/nodes/tasks.rs
index 13a713a..01361bd 100644
--- a/server/src/api/nodes/tasks.rs
+++ b/server/src/api/nodes/tasks.rs
@@ -273,18 +273,14 @@ fn stop_task(upid: UPID, rpcenv: &mut dyn RpcEnvironment) -> Result<(), Error> {
},
)]
/// Get task status.
-async fn get_task_status(
- upid: UPID,
- param: Value,
- rpcenv: &mut dyn RpcEnvironment,
-) -> Result<Value, Error> {
+async fn get_task_status(upid: UPID, rpcenv: &mut dyn RpcEnvironment) -> Result<Value, Error> {
let auth_id: Authid = rpcenv.get_auth_id().unwrap().parse()?;
check_task_access(&auth_id, &upid)?;
let task_auth_id: Authid = upid.auth_id.parse()?;
let mut result = json!({
- "upid": param["upid"],
+ "upid": upid.to_string(),
"node": upid.node,
"pid": upid.pid,
"pstart": upid.pstart,
--
2.39.5
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [pdm-devel] [PATCH datacenter-manager 1/2] ui: pve tree: make name column collapse the text
2025-01-29 10:44 [pdm-devel] [PATCH datacenter-manager 1/2] ui: pve tree: make name column collapse the text Dominik Csapak
2025-01-29 10:44 ` [pdm-devel] [PATCH datacenter-manager 2/2] server: api: task: return upid in status Dominik Csapak
@ 2025-01-29 17:22 ` Thomas Lamprecht
1 sibling, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2025-01-29 17:22 UTC (permalink / raw)
To: Proxmox Datacenter Manager development discussion, Dominik Csapak
Reading the subject painted the picture in my head that this is for
collapsing tree child elements, maybe reword this to:
ui: pve tree: ellipsize overly long guest name to avoid overflow
Am 29.01.25 um 11:44 schrieb Dominik Csapak:
Some short reasoning would be great; albeit I have to say that the subject
and the lack of doing this for VMs is the thing that mostly confused me,
with the subject clarified and either this being implemented for VMs too,
or stated why that is not required, I would be fine with the commit as is.
So, why just do this for CT names? A quick look at the code did not make
them look special compared to VM names (or even node name)
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pdm-devel] applied: [PATCH datacenter-manager 2/2] server: api: task: return upid in status
2025-01-29 10:44 ` [pdm-devel] [PATCH datacenter-manager 2/2] server: api: task: return upid in status Dominik Csapak
@ 2025-01-29 17:31 ` Thomas Lamprecht
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2025-01-29 17:31 UTC (permalink / raw)
To: Proxmox Datacenter Manager development discussion, Dominik Csapak
Am 29.01.25 um 11:44 schrieb Dominik Csapak:
> upid was not in params, since it's an extra parameter, so simply use that
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> server/src/api/nodes/tasks.rs | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
>
applied, thanks!
I reworded and extended the commit message a bit though, it wasn't exactly wrong,
but the subject could IMO interpreted as this commit adding a new property to the
return value, while it actually fixed returning the already existing upid property.
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-01-29 17:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-29 10:44 [pdm-devel] [PATCH datacenter-manager 1/2] ui: pve tree: make name column collapse the text Dominik Csapak
2025-01-29 10:44 ` [pdm-devel] [PATCH datacenter-manager 2/2] server: api: task: return upid in status Dominik Csapak
2025-01-29 17:31 ` [pdm-devel] applied: " Thomas Lamprecht
2025-01-29 17:22 ` [pdm-devel] [PATCH datacenter-manager 1/2] ui: pve tree: make name column collapse the text Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox