time-link / timelink-vscode

1 stars 0 forks source link

Getting the Kleio connection parameters from different sources, order of resolution #22

Open joaquimrcarvalho opened 1 year ago

joaquimrcarvalho commented 1 year ago

The extension needs the url of a running kleio server and a token. The values can be obtained in this order:

  1. From the extension setiings (DONE) - This would serve most possible scenarios, but requires manual configuration
  2. In the workspace base directory in file .kleio, with properties kleio_url=[URL] and kleio_token= [TOKEN].
    This is used when the extension is being run along with a kleio server but not the full MHK installation.
  3. From mhk-home/system/conf/mh_system.properties file in properties mhk.kleio.service=[URL] and mhk.kleio.service.token.admin=[TOKEN]. This is used when the workspace is part of an MHK instalation (normally in mhk-home/sources/SOMEDIR), and the extension uses MHK configuration to access the same kleio server used by MHK. The mhk-home base directory can be found by searching for the file .mhk in the parent directories of the workspace (including the workspace directory itself) (DONE).
  4. From mhk-home/system/conf/mh_system.properties file in properties mhk.kleio.service=[URL] and token from file mhk-home/system/conf/.mhk.kleio.service.token.admin. Directory mhk-homeis determined as in 3. Recente MHK instalations store the token in this file instead of in a property of mhk-home/system/conf/mh_system.properties.
joaquimrcarvalho commented 1 month ago

This is currently superseded by the attached document VSCode Extension for Timelink.pdf