Skip to content

Latest commit

 

History

History
 
 

README.md

KHEOPS user interface

Docker environment variables

KHEOPS_OIDC_PROVIDER

The full URL of the OIDC/OAuth2 provider.

KHEOPS_UI_CLIENTID

The client application's identifier as registered with the OIDC/OAuth2 provider.

KHEOPS_ROOT_URL

User interface URL. Use the following example to avoid any problem. https://demo.kheops.online

KHEOPS_UI_VIEWER_URL

Viewer URL by default. (optional, default is https://ohif.kheops.online/viewer)

KHEOPS_UI_VIEWER_SM_URL

Viewer URL for SM modalities (optional)

KHEOPS_UI_DISABLE_UPLOAD

Set this variable to true, to disable uploading from the UI (optional, default is false)

KHEOPS_UI_USER_MANAGEMENT_URL

User management URL. (optional, default is false)

KHEOPS_UI_DISABLE_AUTOCOMPLET

Set this variable to true, to disable the user autocomplete from the UI (optional, default is false)

KHEOPS_UI_SHOW_DELETE_CONTACT

Set this variable to true, to enable showing the email address set in the next variable (optional, default is false). Use together with the next variable, KHEOPS_UI_DELETE_CONTACT.

KHEOPS_UI_DELETE_CONTACT

If you set this variable to an email address: when a user is deleting a study, he will be notified to contact this email address if he wants to permanently delete it. Only set this when the previous variable KHEOPS_UI_SHOW_DELETE_CONTACT, is set to true.

API

There are two ways to define the API URL. One must be used.

The first is to define a path relative to the KHEOPS_ROOT_URL.

KHEOPS_API_PATH

The API pathname. Start with / to avoid any problems.

The second is to define the absolute URL to the KHEOPS backend API.

KHEOPS_API_URL

The URL API. Use the following example to avoid any problem. https://demo.kheops.online/api

The API can be defined in an other domain. To not violates the Content Security Policy, the following variable must be set.

KHEOPS_ROOT_API_URL

API root URL. Use the following example to avoid any problem. https://demo.kheops.online (optional)

Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Lints and fixes files

npm run lint

Customize configuration

See Configuration Reference.

I18n

If you want to add a new language in the KHEOPS UI, please follow the explanations below.

KHEOPS use by default the english. If no translation is present, KHEOPS will use the English translation. The translation file for KHEOPS can be found in the directory below: KheopsUI/src/lang

KHEOPS UI use the internationalization plugin Vue I18n. Some features used of Vue I18n will be explain bellow, but if you want more details you can read the documentation of Vue I18n.

Named formatting

In a translation, the format {named} used a named given by the UI. Named formatting

Pluralization

In a translation, the pipe | defines a separator and is used to define plurals. Pluralization

For example: study: no studies | one study | many studies

Add new language in KHEOPS

Text length: The translations for many languages frequently exceed the length of the corresponding English source. It could be a problem for the layout of graphical components (e.g. buttons).

Files needed to add a new language

Copy and past the following code into your created JS file and replace the es by your language created.

import es from './es.json';

const messages = es;

export default messages;

Now you can begin your translation for KHEOPS. To see all translations used in the UI, you can copy and past the contents of the KheopsUI/src/lang/example.json in your JSON file to be sure to don't forget any translation.

Display your language in the UI

In the file KheopsUI/src/lang/availablelanguage.js add the new language in the availableLanguage const. The new language will be loaded when it is selected. For example on adding es in availableLanguage, the file es.js will be loaded when the language spanish selected.

const availableLanguage = [
  'en',
  'fr',
  'es',
];