Introduction¶
DSH’s plugin system extends the web interface. For users who frequently need to restart dsh web, returning to the command line to execute a restart is inconvenient. restart-service-button is a DSH Web plugin that adds a restart button to the top-right corner of the web interface and provides a settings page to adjust the button position.
What is it¶
restart-service-button is maintained by DeBug-lzy and is licensed under MIT. It targets the DSH web interface using the web profile, with the documentation stating Node >=18. It solves the problem of completing a service restart within the DSH web interface and saving the button position locally in the browser.
Core Features¶
- Adds a “Restart Service” button to the top-right corner of the DSH web interface.
- Enters a confirmation state upon clicking; clicking again confirms the restart.
- The button survives service restarts and remains usable afterwards.
- The settings page allows adjusting the button’s
top/rightoffsets, with changes taking effect immediately. - The button position is saved via
localStorageand is retained after restarts. - Uses DSH design tokens, a transparent background, and lightweight hover effects to maintain a native look.
- The restart interface only allows local loopback access; DSH web exposed on a local area network cannot be remotely triggered to restart.
Installation and Usage¶
First, confirm you are currently on the DSH web interface and that the plugin uses the web profile. The installation command provided in the documentation is:
dsh plugin --profile web add github:<owner>/restart-service-button
The <owner> in the command is not resolved to a specific maintainer path from the documentation; you need to confirm the actual repository path before installing. If installing from a local directory, the command is:
dsh plugin --profile web add link:C:/path/to/restart-service-button
After installation is complete, execute a web service restart:
dsh web
Typical Usage¶
- Open the DSH web interface.
- Click “Restart Service” in the top-right corner; click again to confirm in the confirmation state.
- After the service restarts, click the button to refresh.
- If you need to adjust the button position, go to “Settings → Restart Button”, modify the distance from the top (
top) and distance from the right (right), or reset to the default 80 / 20.
Applicable Scenarios and Notes¶
Suitable for users who use the DSH web interface in a browser and wish to complete the dsh web restart operation within the interface. Please note:
- Windows is the primary platform and has been fully tested; POSIX restart paths are best-effort.
- Restarting will kill the current DSH process, interrupting any ongoing tasks; sessions are persisted and can be resumed.
- Button position is stored in
localStorageat the browser level and is an origin-level setting; after clearing browser data, it will revert to the default 80 / 20. - The plugin triggers a restart of the current
dsh webprocess; it is recommended to check the source code and the MIT license before installation.
Uninstall¶
dsh plugin --profile web remove restart-service-button
Restart dsh web after uninstalling.
Links¶
GitHub Repository: https://github.com/DeBug-lzy/Restart-service-button. The directory page URL is not provided in the documentation; please refer to the repository description and the actual repository path for installation.