WSO2 IS 5.10.0 - Add new language in User Portal Overview - configuration

When I log in "user-portal" of WSO2 Identity Server (the url is "https://localhost:9443/user-portal/overview"), I can see four options to change the language (english, portuguese, sinhalese or tamil).
I need to add more options in this section. How can I do this? I can't see a "Resource.properties" inside the folder "/repository/deployment/server/webapps/user-portal" to do something like in the following link https://is.docs.wso2.com/en/latest/develop/localization-support-in-identity-server/#localization-support-in-identity-server.
Thanks in advance.
Gonzalo.

WSO2IS UserPortal is a React-based application and in there what is done is to combine all the configurations in i118 to react config mappings if you want to change anything you need to do it at the code level.
https://github.com/wso2/identity-apps/blob/v1.0.72/apps/user-portal/src/configs/i18n.ts
you can map all the configs to your preferred language and map them to the configurations used in UserPortal by building the package.

Related

Detailed description of all SCC's in OpenShift

Is there any documentation page, source code, config file that has the details of all SCC's and not just the Restricted (which is used as example in every bit of documentation)?
And I don't have a running OpenShift instance to inquire this from the commandline.
Here's what i mean by detailed:
https://docs.okd.io/latest/admin_guide/manage_scc.html#examining-a-security-context-constraints-object
Here is the design proposal of security-context-constraints

Rename Taxonomy label in editor bolt-cms

I would like to rename the default tab value of Taxonomy in the backend page editor. I didn't find anything in the twig or yml files that would address this. Any ideas?
I checked with bolt developers and there is no way currently to do this. One potential option was to use the messages file but it was not recommended.
As you can imagine, since this isn't supported via the public configs, this will need a bit more advanced plugging together.
Here is a way to add an additional resource to the stack of translations.
https://gist.github.com/rossriley/c74fdee4fec3eaffb12f
This is a technique to add your own messages onto the translation stack without touching the underlying core files.
After creating this, you'll need to add your new service provider to the app, which you normally will bootstrap either in your index.php or a custom bootstrap file.

How to enable API button for CKAN data set?

I have successfully added a data set for the CKAN site. It enables to preview the data set as well.
Below is the URL for the data set
testckan.com:5000/dataset/my-data1/resource/4c2647ca-a4ab-4d20-8119-5c3da9d4ae14
By adding api/rest/ to the URL as below enables to expose data sets as a JSON service.
testckan.com:5000/api/rest/dataset/my-data1/resource/4c2647ca-a4ab-4d20-8119-5c3da9d4ae14
All I want to do is add an button so that user can view the data set as a JSON rather than typing it in the URL which is not user friendly.
I have seen similar button in the
http://data.gov.uk/dataset/bona-vacantia-estates-advertisements
under API & APPS. Please see the image below.
How to enable API button for CKAN data set like above?
You will have to modify the front-end templating for the package (aka dataset) view. You can either add this change to your own copy of CKAN source code, or like Hendrik mentioned and data.gov.uk people have done, create a CKAN extension to modify the templates.
Your example of the feature is implemented for the data.gov.uk site which is open source and available in GitHub. The specific part is in the read_common.html:
<b>API: </b><a href="${h.url_for(controller='api', register='package', action='show', id=c.pkg.name, ver='2')}">
${h.url_for(controller='api', register='package', action='show', id=c.pkg.name, ver='2')}
</a>
The url_for function is from the ckan.lib.helpers module which "is available for templates as 'h'" according to the CKAN docs, so you should be able to use it directly in the template as in the code above.
AFAIK that's no feature of CKAN itself, thus it can not be enabled. You can, however, easily add it yourself in an extension.

How to get all configuration settings from Azure Config file?

I need to get all configuration settings (current role or all roles not matter) from Azure cscfg file. I want to do this because i dont want to get all values one by one via RoleEnvironment.GetConfigurationSettingValue(key) method.
Is there any way to do this?
Regards
The short answer is 'no' the RoleEnvironment does not support getting all the configuration setting values.
A slightly longer answer is that getting configuration settings from the role environment in the current implementation is done through a call to native code. The separation of Windows Azure Application from Windows Azure Configuration and the ability to swap settings on a running application is at the root of this somehow. This is done inside of msshrtmi.dll (which should mean something like Microsoft Shared Runtime Managed Interop). This is the only reference Microsoft.WindowsAzure.ServiceRuntime.dll has apart from standard references to .NET.
Here is the method call to native code (I have not gone further than this):
[MethodImpl(MethodImplOptions.Unmanaged, MethodCodeType=MethodCodeType.Native), SuppressUnmanagedCodeSecurity, DllImport("", EntryPoint="", CallingConvention=CallingConvention.StdCall, SetLastError=true)]
internal static extern unsafe int modopt(IsLong) modopt(CallConvStdcall) RdGetApplicationConfigurationSetting(ushort modopt(IsConst), ushort*);
It might seem like a slightly round-about way of doing it, but if you want to get the configurations for all the roles in a deployment you can use the management api.
Kudu has an API for this.
You get to Kudu like via App Services > Advanced Details > Go
https://{app-service-name}.scm.azurewebsites.net/
or
https://{app-service-name}-{slot-name}.scm.azurewebsites.net/
The Url for the settings API is:
https://{app-service-name}.azurewebsites.net/api/settings or https://{app-service-name}-{slot-name}.scm.azurewebsites.net/

Create a Spring Insight template

I am just listing here the basic steps to create a Spring Insight web application using Spring tcServer developer edition. I haven't found much doco regarding this, so it could help some people.
1 - Download Spring Tool Suite here
Download STS
Extract the archive somewhere on your machine, open a terminal and go to ~/tc-server-developer-[VERSION]/
2 - Run the following commands
./tcruntime-instance.sh create -t insight myInstance
This one creates a new tcServer instance based on the template insight. (full list of templates can be found in ~/tc-server-developer-[VERSION]/templates/)
Go to ~/tc-server-developer-[VERSION]/myInstance/bin/ and run the following
./tcruntime-ctl.sh start
This will start your tcServer instance based on the Spring Insight template. Check it is working by pointing your favourite browser to the URL http://localhost:8080/insight. That should display the Spring Insight index page.
Now you just have to drop your web app in the ~/tc-server-developer-[VERSION]/myInstance/webapps/ folder and Bob's your uncle !
Also wanted to mention how to set this up from the IDE without having to do any command line work
Assuming you have a spring mvc project open already in STS. This took a while to find so thank you for posting.
Add a new server from the servers window. Select the VFabric tcServer
Create new instance
When you get to the part where it asks you to select a template pick the insight template.
Add you app to the server you just created
Start the server
You will be prompted if youwant to activate insight, click yes.
Navigate to localhost:8080/insight or whatever port it is running on.
You can find more details here: http://pubs.vmware.com/vfabric5/index.jsp?topic=/com.vmware.vfabric.tc-server.2.6/devedition/install.html&path=2_3_1_0