Mobilefirst 8 Swagger button - ibm-mobilefirst

I am working on Mobilefirst platform 8 and i have a issue. Issue is that the swagger button is not visible on of my environmnent. I am a attaching two environment , one with swagger button (SIT) and another without swagger button (DEV).
With Swagger button - SIT Enironment
Without Swagger button - DEV Environment
Please check the images and help me making the swagger doc button visible.

In server.xml file in the Liberty server, Please check for and add the following lines
<application context-root="doc" id="swagger-ui" location="mfp-server-swagger-ui.war" name="swagger-ui" type="war"/>
<!-- JNDI for the swagger ui, so the admin console can present a link to open the adapter information in the swagger ui -->
<jndiEntry jndiName="mfpadmin/mfp.server.swagger.ui.url" value="/doc/?url=/<context>/api/adapterdoc/<adapterName>"/>
Then restart the server.

Related

How to enable Advanced Google Services via new Cloud Projects?

It seems that Google updated their projects console, and when you go to enable an advanced service in Apps Script it no longer directs you to the auto-generated project for your apps script project.
The docs say that a project will be automatically created for apps script projects.
Click Cloud Platform Project link here:
Which takes you to https://console.developers.google.com/cloud-resource-manager where it asks you to create a project.
There is no longer a selection or area to add APIs to the Apps Script project. If I follow that link with an existing Apps Script project that already has working advanced services, it errors out on the project Id.
How can Advanced Services be enabled on new Apps Script projects?
From the page you ended up on, click the "hamburger" icon/navigation menu, and then in the sidebar at the bottom, click "Google Cloud Platform." Then click the same navigation icon, and from the sidebar menu, choose "APIs and Services" That gets you to the page that should open by default.
Your account is automatically loading some other page by default. I could only guess why. We may never know why. The browser and Apps Script probably need to coordinate somehow to know what URL to load, but with the new changes, it looks like something went wrong.

Using Glimpse in asp.net core RTM web api

I am using ASP.NET Core Web API, and I have installed the beta2 version of Glimpse for profiling. I was able to do services.AddGlimpse and app.UseGlimpse in Startup.cs, but Glimpse HUD is not showing up in the Browser when I am firing the API end points.
Any suggestions on how to fix this issue?
The Glimpse HUB requires HTML into which to inject itself. Result: the HUB cannot inject itself into an API endpoint that returns plain text or JSON. Instead, we have to use the full Glimpse client. Here is how.
Go to http://localhost:5000 (or to any page that renders the HUB) and click on the "g" link.
That will open the full Glimpse Client in a new tab.
Now, return to your original tab and navigate to an API route (e.g. /api/products).
Return again to the full Glimpse Client to see the analysis of that request.
See: https://github.com/Glimpse/Glimpse.Prototype/issues/132

Launching specific page of worklight application

How to launch a specific page of hybrid worklight application on clicking a link in email?
I did not go through all the steps involved, but yes, you can do this.
Step 1
Create a Worklight application using, for example, jQuery Mobile to handle the multiple pages
Step 2
If the app is intended for Android, you will need to modify the AndroidManifest.xml file with an intent filter in order to associate the app with an action and a custom URL scheme
You can read more about this by googling for "opening android application using a custom URL scheme", for example
If the app is intended for iOS, you will need to modify the <app-name->info.plist file with a custom URL scheme
You can probably follow this guide: http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html
Step 3
Once you get the app to open from an external link, you need to handle the parameters. You'll want this since you want to open a specific page. This is also mentioned for iOS in the above link, and you'll need to further google this for Android
Step 4
Once you've obtained the parameter, you can use the Send Action to JavaScript from Native API for iOS and Andriod in Worklight in order to pass a command to JavaScript, telling the web code to do some changePage function that will load the specific page

How to add custom file upload button in CKEditor with Cross domain support

I am using CKEditor in one of my web application. I am enabling the FileUpload option in CKEditor by setting filebrowserImageUploadUrl property.
CKEDITOR.replace('editor1', {
filebrowserImageUploadUrl: 'http://MyServer.com/fileupload.ashx',
});
Now the problem is the location where image has to be uploaded is present on another server and my web application is hosted on another server.
So whenever I tried to upload the image using Upload button, It get successfully uploaded but CKEditor unable to display. When I see in console, it is giving the cross-domain policy error.
So is there a way to allow the cross-domain in CKEditor File Upload plugin.
I am also open to other alternatives for uploading the image to another server (if presents).
That's one of the features of the SimpleUploads plugin

How to reduce Worklight application url?

How to reduce below worklight application url to shorter form?
For ex: My application url is //hostname:ipaddress/projectName/apps/services/preview/projectNameApp/common/0/default/projectNameApp.html"
I want to set up a url which can be accessible easily over the internet. what are the settings required to get shorter url in worklight project
For ex
//hostname:portno/context path/appIndexPage.html
instead of
//hostname:ipaddress/projectName/apps/services/preview/projectNameApp/common/0/default/projectNameApp.html"
Thanks.
See the answers here and the getting started module here.
This is not the URL of your all. This is the URL of the app PREVIEW. Moreover, this is preview of common environment. If you're targeting mobile/desktop web environment - add it to your project and then use WL console to generate short link. - Anton
If you are aiming to use the Mobile Web environment, meaning you take the public URL of the app from Worklight Console and place it in your mobile web site for users to access, there is the option to use bit.ly to shorten the URL; you will first need to create an account at http://bit.ly. - Idan Adar