forked from 0k/0k-charms
Browse Source
new: [monujo] prioritize between explicit and implicit options and check for mandatory option
new: [monujo] prioritize between explicit and implicit options and check for mandatory option
- enforce specifying lokapi-db in a way or another - explicit options have priority - add documentation on the topic and examples Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>new-monujo-options
Valentin Lab
3 years ago
2 changed files with 177 additions and 12 deletions
@ -0,0 +1,146 @@ |
|||
# -*- ispell-local-dictionary: "english" -*- |
|||
|
|||
#+TITLE: Monujo charm |
|||
|
|||
* Usage |
|||
|
|||
=monujo= service needs to know how to reach it's administrative backend. |
|||
So either you specify one by yourself: |
|||
|
|||
#+begin_src yaml |
|||
monujo: |
|||
options: |
|||
lokapi-host: http://admin.mycur.org |
|||
#lokapi-db: odoo ## Default: 'odoo' |
|||
|
|||
#+end_src |
|||
|
|||
Either you can provide in sibling services an =odoo-server= providing |
|||
service. It'll then discover it and use it by default as administrative |
|||
backend. |
|||
|
|||
#+begin_src yaml |
|||
monujo: |
|||
|
|||
odoo: |
|||
#+end_src |
|||
|
|||
Note that =monujo= charm is describing a subordinate service, meaning |
|||
that it'll run in an existing service providing =publish-dir= relation |
|||
(creating one if not available). |
|||
|
|||
By default, =lokapi-db= if not set will be infered from option =dbname= |
|||
in the relation =odoo-server=, or default database from =odoo-server=. |
|||
|
|||
So all these are equivalent: |
|||
|
|||
#+begin_src yaml |
|||
monujo: |
|||
options: |
|||
lokapi-db: foo |
|||
|
|||
odoo: |
|||
#+end_src |
|||
|
|||
#+begin_src yaml |
|||
monujo: |
|||
relations: |
|||
odoo-server: |
|||
odoo: |
|||
dbname: foo |
|||
|
|||
odoo: |
|||
#+end_src |
|||
|
|||
|
|||
#+begin_src yaml |
|||
monujo: |
|||
|
|||
odoo: |
|||
relations: |
|||
postgres-database: |
|||
postgres: |
|||
dbname: foo |
|||
#+end_src |
|||
|
|||
|
|||
** Map |
|||
|
|||
=monujo= optionaly can add a link to a map. If you want to do so, either |
|||
add it explicitly, or add it automatically. This is the explicit way: |
|||
|
|||
#+begin_src yaml |
|||
monujo: |
|||
options: |
|||
map-url: http://map.mycur.org |
|||
|
|||
#+end_src |
|||
|
|||
The map will be added automatically if a =map-server= provider is |
|||
found (=gogocarto= charm creates services that provides =map-server= |
|||
relations). |
|||
|
|||
#+begin_src yaml |
|||
monujo: |
|||
|
|||
gogocarto: |
|||
|
|||
#+end_src |
|||
|
|||
|
|||
** Theming |
|||
|
|||
This charm allows to write all the =config.json= values supported by |
|||
monujo, including the =theme= option, here's the default fully valued |
|||
options of =theme= as of version =1.0.0-rc.3= of =monujo=: |
|||
|
|||
#+begin_src yaml |
|||
monujo: |
|||
options: |
|||
lokapi-host: example.org |
|||
lokapi-db: odoo |
|||
map-url: https://carte.example.org |
|||
help-url: https://help.com |
|||
cgu-url: https://cgu.com |
|||
local-password-retention-time: 900 |
|||
logo-url: https://example.com/img/logo.png |
|||
login-logo-url: https://example.com/img/logo-2.png |
|||
theme: |
|||
color-1: "#e4f2f1" |
|||
color-2: "#009688" |
|||
top-menu-background-color: "#fefefe" |
|||
top-menu-link-color: "#4a4a4a" |
|||
top-menu-link-background-color: white |
|||
top-menu-link-background-color-bg: white |
|||
top-menu-link-hover-color: "#777777" |
|||
top-menu-link-hover-color-bg: "#848484" |
|||
top-menu-link-hover-background-color: whitesmoke |
|||
top-menu-dropdown-divider-color: whitesmoke |
|||
btn-payer-text-color: "#ffffff" |
|||
btn-payer-border-color: $color-2 |
|||
btn-payer-background-color: $color-2 |
|||
btn-recevoir-text-color: "#ffffff" |
|||
btn-recevoir-border-color: $color-2 |
|||
btn-recevoir-background-color: $color-2 |
|||
btn-recharger-text-color: $color-2 |
|||
btn-recharger-border-color: $color-2 |
|||
btn-recharger-background-color: "#ffffff" |
|||
btn-login-text-color: "#ffffff" |
|||
btn-login-border-color: $color-2 |
|||
btn-login-background-color: $color-2 |
|||
inner-card-background-color: "#f0faf9" |
|||
inner-card-border-color: "#f0faf9" |
|||
inner-card-text-color: "#4a4a4a" |
|||
inner-card-text-color-backend: "#242424" |
|||
inner-card-label-background-color: transparent |
|||
inner-card-label-text-color: "#4a4a4a" |
|||
inner-card-alt-text-color: "#009688" |
|||
body-size: 14px |
|||
tabs-border-bottom-color: white |
|||
tabs-border-bottom-width: 4px |
|||
tabs-link-hover-border-bottom-color: $color-2 |
|||
tabs-link-active-color: rgba(0 0 0 0.8) |
|||
tabs-link-active-border-bottom-color: $color-2 |
|||
tabs-link-color: rgba(0 0 0 0.6) |
|||
navbar-fixed-z: 50 |
|||
#+end_src |
Write
Preview
Loading…
Cancel
Save
Reference in new issue