[PR #3628] [MERGED] feat: introducing server configurations in admin dashboard #4459

Closed
opened 2026-03-17 01:59:35 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/3628
Author: @joeljstephen
Created: 12/6/2023
Status: Merged
Merged: 12/13/2023
Merged by: @AndrewBastin

Base: release/2023.12.0Head: feat/dashboard-server-config


📝 Commits (10+)

  • 89e7430 chore: new i18n strings
  • dd9b6cf refactor: using query to show allowed providers in login page
  • d398614 feat: introducing settings page with config tabs and auth provider component
  • 79319be feat: new graphql queries for obtaining server config info
  • d6c73e0 feat: new composable for queries using useClientHandle
  • 30a0549 feat: new component for mail configs
  • ecc14e9 feat: new composables to handle all config related code
  • 9786579 feat: new reset component for handling backend server restart
  • ee96fdd feat: new component to handle saving of updated configs
  • d41d529 feat: new auth provider composable

📊 Changes

22 files changed (+1007 additions, -29 deletions)

View changed files

📝 packages/hoppscotch-sh-admin/locales/en.json (+37 -0)
📝 packages/hoppscotch-sh-admin/package.json (+1 -0)
📝 packages/hoppscotch-sh-admin/src/components.d.ts (+9 -1)
📝 packages/hoppscotch-sh-admin/src/components/app/Login.vue (+32 -21)
📝 packages/hoppscotch-sh-admin/src/components/app/Sidebar.vue (+7 -0)
packages/hoppscotch-sh-admin/src/components/settings/AuthProvider.vue (+132 -0)
packages/hoppscotch-sh-admin/src/components/settings/Configurations.vue (+22 -0)
packages/hoppscotch-sh-admin/src/components/settings/Reset.vue (+45 -0)
packages/hoppscotch-sh-admin/src/components/settings/ServerRestart.vue (+87 -0)
packages/hoppscotch-sh-admin/src/components/settings/SmtpConfiguration.vue (+110 -0)
packages/hoppscotch-sh-admin/src/composables/useClientHandler.ts (+49 -0)
packages/hoppscotch-sh-admin/src/composables/useConfigHandler.ts (+345 -0)
📝 packages/hoppscotch-sh-admin/src/helpers/auth.ts (+5 -0)
packages/hoppscotch-sh-admin/src/helpers/backend/gql/mutations/EnableAndDisableSso.graphql (+3 -0)
packages/hoppscotch-sh-admin/src/helpers/backend/gql/mutations/ResetInfraConfigs.graphql (+3 -0)
packages/hoppscotch-sh-admin/src/helpers/backend/gql/mutations/UpdateInfraConfigs.graphql (+6 -0)
packages/hoppscotch-sh-admin/src/helpers/backend/gql/queries/AllowedAuthProviders.graphql (+3 -0)
packages/hoppscotch-sh-admin/src/helpers/backend/gql/queries/InfraConfigs.graphql (+6 -0)
📝 packages/hoppscotch-sh-admin/src/helpers/backend/rest/authQuery.ts (+1 -0)
📝 packages/hoppscotch-sh-admin/src/pages/settings.vue (+79 -1)

...and 2 more files

📄 Description

Ticket

  • Closes HFE-332
  • Depends on #3591

Description

This PR introduces Server Configurations to the Admin Dashboard. Admins can now make changes to the server configurations directly from the Dashboard UI. A new settings page is added where admins can make changes to the configs. A backend server restart will be initiated in order to apply all the requested changes to the server configurations, which is facilitated by the Dashboard, by displaying a non dismissible modal with a timer of 30 seconds, on obtaining confirmation from the admin.

List of Server Configurations that can be updated:

Auth Providers

  • Enable or Disable SSO Auth Providers.
  • Update the Client ID and Client Secret of each individual auth provider.

SMTP Configurations

  • Enable or Disable Email based Authentication.
  • Update the SMTP URL and Mailer From Address.

Objectives

  • Allow Admins to make changes to the Allowed auth providers and make changes to the associated fields.
  • Allow Admins to make changes to the SMTP configurations.
  • Allow Admins to reset server configurations to use the default values.
  • Dashboard should display a non dismissible banner with a timer of 30 seconds when the mutation for updation of server configs is invoked which causes the restart of the backend server.
  • Save state of all the changes made by the admin and fire mutations only after the admin has confirmed all the changes that is requested.
  • Admin Dashboard will now display the auth providers in the login page by using a new provider REST route instead of reading the env variable.

Screenshot

image

Note:

Admin Dashboard will now display the auth providers on the login page based on the newly added REST route instead of directly reading from the env variable.

Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/3628 **Author:** [@joeljstephen](https://github.com/joeljstephen) **Created:** 12/6/2023 **Status:** ✅ Merged **Merged:** 12/13/2023 **Merged by:** [@AndrewBastin](https://github.com/AndrewBastin) **Base:** `release/2023.12.0` ← **Head:** `feat/dashboard-server-config` --- ### 📝 Commits (10+) - [`89e7430`](https://github.com/hoppscotch/hoppscotch/commit/89e7430270a95f3cbc1a027c450cb57d3b47870b) chore: new i18n strings - [`dd9b6cf`](https://github.com/hoppscotch/hoppscotch/commit/dd9b6cf3ac83db1b603c7c8039cfbe30e4aa051a) refactor: using query to show allowed providers in login page - [`d398614`](https://github.com/hoppscotch/hoppscotch/commit/d3986140bee61fd6d2093479aec5fa031cb5b428) feat: introducing settings page with config tabs and auth provider component - [`79319be`](https://github.com/hoppscotch/hoppscotch/commit/79319bef505c9dea9c6b93e0bbfafaa069426481) feat: new graphql queries for obtaining server config info - [`d6c73e0`](https://github.com/hoppscotch/hoppscotch/commit/d6c73e052c3daa7a7cb31a0165862e18194c5adf) feat: new composable for queries using useClientHandle - [`30a0549`](https://github.com/hoppscotch/hoppscotch/commit/30a0549d227f4d2aa23e759aff5bc02886fd397d) feat: new component for mail configs - [`ecc14e9`](https://github.com/hoppscotch/hoppscotch/commit/ecc14e99aaef65ec250d2444c23209ca66d28967) feat: new composables to handle all config related code - [`9786579`](https://github.com/hoppscotch/hoppscotch/commit/978657931d14446a2c4121e265f21c1375f51237) feat: new reset component for handling backend server restart - [`ee96fdd`](https://github.com/hoppscotch/hoppscotch/commit/ee96fdda48e33be507c683fe297e9528fe0e775b) feat: new component to handle saving of updated configs - [`d41d529`](https://github.com/hoppscotch/hoppscotch/commit/d41d5291db85ae0371fedf6f83500accbd756643) feat: new auth provider composable ### 📊 Changes **22 files changed** (+1007 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-sh-admin/locales/en.json` (+37 -0) 📝 `packages/hoppscotch-sh-admin/package.json` (+1 -0) 📝 `packages/hoppscotch-sh-admin/src/components.d.ts` (+9 -1) 📝 `packages/hoppscotch-sh-admin/src/components/app/Login.vue` (+32 -21) 📝 `packages/hoppscotch-sh-admin/src/components/app/Sidebar.vue` (+7 -0) ➕ `packages/hoppscotch-sh-admin/src/components/settings/AuthProvider.vue` (+132 -0) ➕ `packages/hoppscotch-sh-admin/src/components/settings/Configurations.vue` (+22 -0) ➕ `packages/hoppscotch-sh-admin/src/components/settings/Reset.vue` (+45 -0) ➕ `packages/hoppscotch-sh-admin/src/components/settings/ServerRestart.vue` (+87 -0) ➕ `packages/hoppscotch-sh-admin/src/components/settings/SmtpConfiguration.vue` (+110 -0) ➕ `packages/hoppscotch-sh-admin/src/composables/useClientHandler.ts` (+49 -0) ➕ `packages/hoppscotch-sh-admin/src/composables/useConfigHandler.ts` (+345 -0) 📝 `packages/hoppscotch-sh-admin/src/helpers/auth.ts` (+5 -0) ➕ `packages/hoppscotch-sh-admin/src/helpers/backend/gql/mutations/EnableAndDisableSso.graphql` (+3 -0) ➕ `packages/hoppscotch-sh-admin/src/helpers/backend/gql/mutations/ResetInfraConfigs.graphql` (+3 -0) ➕ `packages/hoppscotch-sh-admin/src/helpers/backend/gql/mutations/UpdateInfraConfigs.graphql` (+6 -0) ➕ `packages/hoppscotch-sh-admin/src/helpers/backend/gql/queries/AllowedAuthProviders.graphql` (+3 -0) ➕ `packages/hoppscotch-sh-admin/src/helpers/backend/gql/queries/InfraConfigs.graphql` (+6 -0) 📝 `packages/hoppscotch-sh-admin/src/helpers/backend/rest/authQuery.ts` (+1 -0) 📝 `packages/hoppscotch-sh-admin/src/pages/settings.vue` (+79 -1) _...and 2 more files_ </details> ### 📄 Description ### Ticket - Closes HFE-332 - Depends on #3591 ### Description This PR introduces Server Configurations to the Admin Dashboard. Admins can now make changes to the server configurations directly from the Dashboard UI. A new settings page is added where admins can make changes to the configs. A backend server restart will be initiated in order to apply all the requested changes to the server configurations, which is facilitated by the Dashboard, by displaying a non dismissible modal with a timer of 30 seconds, on obtaining confirmation from the admin. ### List of Server Configurations that can be updated: #### Auth Providers - Enable or Disable SSO Auth Providers. - Update the Client ID and Client Secret of each individual auth provider. #### SMTP Configurations - Enable or Disable Email based Authentication. - Update the SMTP URL and Mailer From Address. ### Objectives - [x] Allow Admins to make changes to the Allowed auth providers and make changes to the associated fields. - [x] Allow Admins to make changes to the SMTP configurations. - [x] Allow Admins to reset server configurations to use the default values. - [x] Dashboard should display a non dismissible banner with a timer of 30 seconds when the mutation for updation of server configs is invoked which causes the restart of the backend server. - [x] Save state of all the changes made by the admin and fire mutations only after the admin has confirmed all the changes that is requested. - [x] Admin Dashboard will now display the auth providers in the login page by using a new provider REST route instead of reading the `env` variable. ### Screenshot ![image](https://github.com/hoppscotch/hoppscotch/assets/70131076/821216dc-6a64-4093-8763-b1933442e7ce) ### Note: Admin Dashboard will now display the auth providers on the login page based on the newly added REST route instead of directly reading from the `env` variable. ### Checks <!-- Make sure your pull request passes the CI checks and do check the following fields as needed - --> - [x] My pull request adheres to the code style of this project - [ ] My code requires changes to the documentation - [ ] I have updated the documentation as required - [x] All the tests have passed --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 01:59:35 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#4459
No description provided.