Custom error messages in OSLC Connector
You can create your own localizations by following the steps below.
Create a file
localization.json
:
{
"FAILED_TO_LOAD_LINK_TYPES": "Failed to load link types. Refresh the page to authenticate and try again",
"FAILED_TO_LOAD_LINKS":"Failed to load links for the selected artifact",
"UNDEFINED_COMPONENT_ID": "Component ID is undefined",
"UNDEFINED_ARTIFACT_ID": "Artifact ID is undefined"
}
Create a configmap with this file:
sudo kubectl create configmap genoslc-localization -n smartfacts --from-file=localization.json=./localization.json
The name of the configmap can be configured in the values.yaml under the key env.tool.localizations.configMapName. Please make sure to use the same name in the above command or the customizations will not appear in the UI.
Restart the genOSLC container.
You can verify that the file was actually created by checking the
volumes
section in the YAML output for your genOSLC container. It should look similar to this:volumes: │ ... - configMap: │ defaultMode: 420 │ items: │ - key: localization.json │ path: localization.json │ name: genoslc-localization │ optional: false ...
, multiple selections available,