Repository navigation
mica-ui: general settings page (/settings/general) #4608
Copy link
Copy link
Open
Labels
Description
Port the Angular admin page #/admin/general (mica-webapp/.../app/config/{config-controller.js, views/config-view.html, views/config-form.html}) to the mica-ui Quasar app, at /settings/general (the app is already served under an admin base path, so the settings pages live under /settings).
What the Angular page does
- Properties (read-only table +
/admin/general/editform): ~50 fields ofMicaConfigDtogrouped into Server identification, Data source, Content edition (languages, charset), Content access (open access, summary statistics policy, signup), Sections (enabled document types, concept-tagging taxonomies…), Sets/cart, Compare/export, Data analyses, Statistics summary. Saved withPUT /ws/config(whole DTO). - Encryption keys: create/import a key pair →
PUT /config/keystore/system/https(KeyForm); download certificate →GET /config/keystore/system/https. - Opal credentials: list
GET /config/opal-credentials; add (key pair create/import, username+password, token) and edit →POST /config/opal-credentials; deleteDELETE /config/opal-credential?id=<url>; certificateGET /config/opal-credential/certificate?id=<url>(the Angular URL form/opal-credential/{url}/certificateno longer matches the REST resource). - Roles: add (unique, no uppercase/whitespace/
~/!) / delete with confirm →PUT /configwith the updatedroles. - Permissions: two ACL tables backed by
SubjectAclResource: Opal views download (/config/document-sets/permissions, roleREADER) and crosstabs (/config/contingencies/permissions, roleANALYST), saved withconfig=true&file=false.
Decisions
- Routes:
/settings(hub, the current placeholderSettingsPage.vue) and/settings/general; drawer entry stays/settings. - Editing: no separate edit page. Each properties section is a card with its own edit dialog (opal-ui
GeneralConfigurationpattern). A dialog merges its fields into a copy of the current config andPUTs the whole DTO, as Angular does. - No window reload after save (Angular reloads when languages/sections/name change):
systemStore.init()+initPub()are re-run and everything readingsystemStore.configurationis reactive. - Reuse
FieldsListfor the read-only view,ConfirmDialog,AclTable/AclDialog,notifyError.
Steps (one PR each)
Step 1 — Settings hub, general settings view and section editors
router/routes.ts:settings→ hub page with links to the sections,settings/general→pages/SettingsGeneralPage.vue.stores/system.ts:save(config)→PUT /configtheninit()+initPub();loadLanguages(locale)(GET /config/languages?locale=);loadTaxonomiesSummary()(GET /taxonomies/_summary?vocabularies=false) for the concept-tagging taxonomy titles.components/settings/general/GeneralProperties.vue: the sections as cards in two columns, each with aFieldsListand an edit button opening the section dialog.- One dialog per section, built on a shared
ConfigSectionDialog.vue(title, working copy of the config, validation, save/cancel, saving state). Rules to port:isSingleNetworkEnableddisabled unlessisNetworkEnabled;isProjectsCountEnabled/isDataAccessRequestsCountEnabledcleared and disabled when the feature is off;cartTimeToLivedisabled unless a cart is enabled;signupGroupsas chips; languages multi-select with display names + warning when a language is added;opalViewsGroupinghelp text varies with the selection; option lists forsummaryStatisticsAccessPolicy/opalViewsGrouping; number fields with min/step and required. utils/config.ts(+ vitest): the pure bits — dependent-flag rules, role id validation (for step 2), signup groups split.- i18n en/fr:
settings_generaland aconfig.*block ported frommica-webapp/src/main/resources/i18n/{en,fr}.json.
Step 2 — Roles, encryption keys, Opal credentials
RolesPanel.vue: table +RoleDialog.vue+ delete confirm; saves throughsystemStore.save.KeyPairDialog.vue:mode: 'create' | 'import',withOpalUrlprop — shared by the keystore and the Opal credential. Create: subject fields + collapsible advanced (algo RSA / size 2048); import: private/public PEM textareas. Emits aKeyForm.EncryptionKeysPanel.vue: "Add key pair" dropdown (create / import) →PUT /config/keystore/system/https; "Download certificate".OpalCredentialsPanel.vue+OpalCredentialDialog.vue(username/password with confirmation, or token; edit mode keeps the URL read-only): table (URL, type, actions: delete, edit for USERNAME/TOKEN, certificate download for PUBLIC_KEY_CERTIFICATE).composables/useOpalCredentials.ts(+ vitest).
Step 3 — Configuration permissions
- Generalize
useAcl:rolebecomes a string,AclEndpointsgets optional fixed params ({ config: true, file: false }). AclDialog: optionalrolesprop ({value, label, help}[], defaulting to the document roles);AclTablerole label fallback soANALYSTrenders.components/permissions/ConfigAclPanel.vue: a single permissions table over an endpoint + roles; used twice in the general page (Opal views downloadREADER, crosstabsANALYST).
Page assembly (SettingsGeneralPage.vue)
Breadcrumbs home / settings / general, then Properties, then a row with Encryption keys + Opal credentials on the left and Roles + Permissions on the right, mirroring the Angular layout. Guarded by authStore.isAdministrator.
Reactions are currently unavailable
Activity
mica-ui: general settings roles, encryption keys and Opal credentials…
mica-ui: general settings configuration permissions (step 3) (#4608)
mica-ui: general settings review fixes (#4608)
mica-ui: general settings page (#4608) (#4609)
mica-ui: general settings page (#4608) (#4609)
mica-ui: general settings page (#4608) (#4609)
mica-ui: general settings page (#4608) (#4609)
mica-ui: general settings page (#4608) (#4609)
mica-ui: general settings page (#4608) (#4609)
mica-ui: general settings page (#4608) (#4609)
mica-ui: general settings page (#4608) (#4609)
mica-ui: general settings page (#4608) (#4609)
mica-ui: general settings page (#4608) (#4609)
mica-ui: general settings page (#4608) (#4609)
mica-ui: general settings page (#4608) (#4609)
mica-ui: general settings page (#4608) (#4609)
mica-ui: general settings page (#4608) (#4609)
mica-ui: general settings page (#4608) (#4609)
mica-ui: general settings page (#4608) (#4609)
mica-ui: general settings page (#4608) (#4609)
mica-ui: general settings page (#4608) (#4609)
mica-ui: general settings page (#4608) (#4609)
mica-ui: general settings page (#4608) (#4609)
mica-ui: general settings page (#4608) (#4609)
mica-ui: general settings page (#4608) (#4609)
mica-ui: general settings page (#4608) (#4609)
mica-ui: general settings page (#4608) (#4609)
mica-ui: general settings page (#4608) (#4609)
mica-ui: general settings page (#4608) (#4609)