Skip to content

Commit

Permalink
Merge pull request #414 from yetanalytics/sql-250
Browse files Browse the repository at this point in the history
[SQL-250] UI no longer cares about HTML
  • Loading branch information
cliffcaseyyet authored Jun 18, 2024
2 parents d967da8 + 23af8f2 commit ef85f52
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Version of LRS Admin UI to use

LRS_ADMIN_UI_VERSION ?= v0.1.20
LRS_ADMIN_UI_VERSION ?= v0.1.21
LRS_ADMIN_UI_LOCATION ?= https://github.com/yetanalytics/lrs-admin-ui/releases/download/${LRS_ADMIN_UI_VERSION}/lrs-admin-ui.zip
LRS_ADMIN_ZIPFILE ?= lrs-admin-ui-${LRS_ADMIN_UI_VERSION}.zip

Expand Down
2 changes: 1 addition & 1 deletion doc/endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The response body contains a newly generated JSON Web Token (JWT) on success. A

#### Misc Admin Routes

- `GET http://example.org/admin/env`: Get select environment variables about the configuration which may aid in client-side operations. Currently returns a map containing the configuration variables `urlPrefix` and `enableStmtHtml`.
- `GET http://example.org/admin/env`: Get select environment variables about the configuration which may aid in client-side operations.
- `DELETE http://example.org/admin/agents`: Runs a *hard delete* of all records of an actor, and associated records (statements, attachments, etc). Intended for privacy purposes like GDPR. Body should be a JSON object of form `{"actor-ifi":<actor-ifi>}`. Disabled unless the configuration variable enableAdminDeleteActor to be set to `true`.

### Reaction Management Routes
Expand Down
2 changes: 1 addition & 1 deletion doc/env_vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ These config vars enable and configure browser security response headers from th
| `LRSQL_ENABLE_ADMIN_DELETE_ACTOR` | `enableAdminDeleteActor` | Whether or not to enable the route and UI for deleting actors and related documents | `false` |
| `LRSQL_ENABLE_ADMIN_UI` | `enableAdminUi` | Whether or not to serve the administrative UI at `/admin` | `true` |
| `LRSQL_ENABLE_ADMIN_STATUS` | `enableAdminStatus` | Whether or not to serve admin system status data that queries the database. | `true` |
| `LRSQL_ENABLE_STMT_HTML` | `enableStmtHtml` | Whether or not HTML data is returned in the LRS HTTP response. If `false` disables HTML rendering even if `LRSQL_ENABLE_ADMIN_UI` is `true`. In that case the UI will not display the Statement Browser feature. | `true` |
| `LRSQL_ENABLE_STMT_HTML` | `enableStmtHtml` | Whether or not HTML data is returned in the LRS HTTP response if the Accept type is specified as text/html. If `false` disables HTML rendering regardless of Accept type. | `true` |
| `LRSQL_ADMIN_LANGUAGE` | `adminLanguage` | Allows override of default RFC5646 language code (`en-US`). May require that you add new language map entries to `resources/lrsql/localization/language.json` to add a new language. | `en-US` |

[<- Back to Index](index.md)
2 changes: 0 additions & 2 deletions src/main/lrsql/admin/interceptors/ui.clj
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
:enter
(fn get-env [ctx]
(let [{url-prefix ::i/path-prefix
enable-stmt-html ::i/statement-html?
oidc-env ::oidc-i/admin-env} ctx]
(assoc ctx
:response
Expand All @@ -42,7 +41,6 @@
(merge
(cond-> {:url-prefix url-prefix
:proxy-path proxy-path
:enable-stmt-html (some? enable-stmt-html)
:enable-admin-delete-actor enable-admin-delete-actor
:enable-admin-status enable-admin-status
:enable-reactions enable-reactions
Expand Down
3 changes: 1 addition & 2 deletions src/test/lrsql/admin/route_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,7 @@
(let [{:keys [status body]} (get-env content-type)
edn-body (u/parse-json body)]
(is (= 200 status))
(is (= (get edn-body "url-prefix") "/xapi"))
(is (= (get edn-body "enable-stmt-html") true))))
(is (= (get edn-body "url-prefix") "/xapi"))))
(testing "create account with username `myname` and password `swordfish`"
(let [{:keys [status
body]} (create-account headers req-body)
Expand Down

0 comments on commit ef85f52

Please sign in to comment.