# Possibilité de dupliquer un tableau de bord

**URL:** <https://community.gladysassistant.com/t/possibilite-de-dupliquer-un-tableau-de-bord/10393>\
**Category:** Demande de fonctionnalités\
**Tags:** feature-core, in-progress\
**Created:** [Juillet 29, 2026, 5:47 UTC](https://community.gladysassistant.com/t/possibilite-de-dupliquer-un-tableau-de-bord/10393 "2026-07-29T17:47:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris75](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/c/6a8cbe/32.png) [@Chris75](https://community.gladysassistant.com/u/Chris75)\
**Post date:** [Juillet 29, 2026, 5:47 UTC](https://community.gladysassistant.com/t/possibilite-de-dupliquer-un-tableau-de-bord/10393/1 "2026-07-29T17:47:55Z")

</div>

possibilité de pouvoir dupliquer un tableau de bord (comme on peut le faire avec les scènes)

---

<div class="post-metadata">

**Author:** ![cursor-bot](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/cursor-bot/32/22252_2.png) [@cursor-bot](https://community.gladysassistant.com/u/cursor-bot)\
**Post date:** [Août 17, 2026, 12:07 UTC](https://community.gladysassistant.com/t/possibilite-de-dupliquer-un-tableau-de-bord/10393/2 "2026-08-17T12:07:03Z")

</div>

Salut tout le monde !

Ce sujet est désormais **en cours de développement**.

Une PR a été ouverte pour permettre de dupliquer un tableau de bord :

> <https://github.com/GladysAssistant/Gladys/pull/2912>
>
> Implements feature request: https://community.gladysassistant.com/t/possibilite-…de-dupliquer-un-tableau-de-bord/10393
> 
> \### Description
> 
> A user asked on the forum to be able to duplicate a dashboard, the way scenes can already be duplicated. This PR mirrors the scene duplication design end to end for dashboards.
> 
> \*\*Server\*\*
> 
> \- New \`server/lib/dashboard/dashboard.duplicate.js\`, modelled on \`scene.duplicate\`:
> - the source dashboard is looked up with the same permission rule the existing dashboard \`getBySelector\`/\`update\`/\`updateOrder\` code uses (a dashboard I created, or a public one), and a \`NotFoundError\` is thrown otherwise;
> - the copy keeps the \`type\` and the \`boxes\` of the source dashboard (faithful copy of the widgets/content);
> - the copy gets a brand new unique selector built with \`slugify(name, true)\` (slug + 4 random characters), like scenes do;
> - the copy is created through \`dashboard.create\` for the user asking for it, so it is placed at the end of \*their\* dashboard list (position = highest position + 1);
> - visibility: a dashboard you own keeps its visibility, while a public dashboard belonging to another user is duplicated as a \*\*private\*\* dashboard, so duplicating never re-shares a second copy with the whole installation.
> \- New route \`POST /api/v1/dashboard/:dashboard\_selector/duplicate\` (authenticated) and its controller, returning \`201\` with the new dashboard.
> 
> \*\*Front\*\*
> 
> \- New "Duplicate" button in the dashboard edit page actions (next to Cancel / Delete / Save), which opens the new page \`/dashboard/:dashboardSelector/duplicate\`.
> \- New \`front/src/routes/dashboard/duplicate-dashboard/\` page, built like the scene duplication page: it loads the source dashboard, prefills the name with \`Copy of \<name\>\`, lets the user change it, calls the new endpoint and redirects to the edit page of the new dashboard. Name conflicts (\`409\`, dashboard names are unique) and unknown errors are displayed.
> \- New i18n keys (\`duplicateDashboard.\*\` and \`dashboard.editDashboardDuplicateButton\`) added to \`en.json\`, \`fr.json\` and \`de.json\`.
> 
> \*\*Tests\*\*
> 
> \- \`server/test/lib/dashboard/dashboard.duplicate.test.js\`: duplicating my dashboard (name, type, boxes, position, unique selector with random suffix), duplicating my own public dashboard (stays public), duplicating a public dashboard of another user (becomes private and belongs to me), unknown selector and private dashboard of another user (both not found).
> \- \`server/test/controllers/dashboard/dashboard.controller.test.js\`: \`POST /api/v1/dashboard/:dashboard\_selector/duplicate\` success (201) and 404 cases.
> \- Patch coverage of the changed server files verified locally at 100 % (statements, branches, functions, lines).
> 
> \## Forum
> 
> Forum: https://community.gladysassistant.com/t/possibilite-de-dupliquer-un-tableau-de-bord/10393
> 
> \### Checklist
> 
> \- \[x\] Server tests pass: new \`dashboard.duplicate\` lib and controller tests pass, and the full \`npm test\` suite shows no new failure (the only failures in my sandbox are pre-existing environment ones: gateway backup/restore shelling out to the \`sqlite3\` CLI, Docker and network tests)
> \- \[x\] Coverage: \`c8\` run on the changed server files reports 100 % on \`lib/dashboard/dashboard.duplicate.js\` and \`api/controllers/dashboard.controller.js\`
> \- \[x\] Linter and prettier pass on both front and server (\`npm run prettier\`, \`npm run prettier-check\`, \`npm run eslint\`)
> \- \[x\] \`npm run compare-translations\` passes and \`npm run build\` (front) succeeds
> \- \[x\] No undocumented breaking change (only additive: one new endpoint, one new front route)
> \- \[\] Cypress not run in my environment (no browser binary). The existing dashboard specs under \`front/cypress/e2e/routes/dashboard/\` were reviewed: they target the Save/Delete/Edit buttons by their own translation keys, which the new Duplicate button does not collide with.
> 
> Note: this pull request was opened by an automated Claude Code run. It needs a human review before merging.
> 
> 
> \---
> \_Generated by \[Claude Code\](https://claude.ai/code/session\_01BRdJPgpjHkz9LKu39n8fm8)\_
> 
> 
> \## Summary by CodeRabbit
> 
> \* \*\*New Features\*\*
> \* Added the ability to duplicate dashboards from the dashboard editor.
> \* Users can customize the copied dashboard’s name with validation and conflict feedback.
> \* Public dashboards can be copied, while copies made from another owner’s dashboard are private by default.
> \* Added localized duplication flows in English, French, and German.
> \* \*\*Bug Fixes\*\*
> \* Added handling for missing dashboards and duplication errors.

N’hésitez pas à suivre la PR, à tester dès que possible et à faire vos retours ici.
