I have seen this question and response, but it still does not work for us:
Embedding Apps with API key
We are having a problem with the Rally API. Our intent is to make a stand-alone page (outside of Rally) that shows the portfolio Kanban.
I have attached the test page. It was created with the rally-app-builder. We created an API key. When we try to load the page, passing the API key, we get a json exception about cross-site violations. The documentation says that we will see this error if we don't pass the key. But even when we do pass it, the error persists.
We have tried it through an apache server, so the issue about being a standalone file is not our problem. Does anyone have any other ideas?
The html page is below.
<!DOCTYPE html>
<html>
<head>
<title>helloworld</title>
<script type="text/javascript" src="https://rally1.rallydev.com/apps/2.0rc3/sdk.js"></script>
<script type="text/javascript">
Rally.onReady(function () {
Ext.define("CustomApp",{extend:"Rally.app.App",componentCls:"app",items:{html:'App SDK 2.0rc3 Docs'},launch:function(){this.add({xtype:"rallycardboard",types:["Portfolio Item/Feature"],attribute:"State",storeConfig:{context:{project:"/project/14292239482",projectScopeUp:!1,projectScopeDown:!0}},context:this.getContext(),readOnly:!0})}});
Rally.launchApp('CustomApp', {
name:"helloworld",
parentRepos:""
});
});
</script>
<style type="text/css">
</style>
</head>
<body>
</body>
</html>
The api key we generated is of type alm-wsapi-read-only. When page is loaded, even with apikey parameter provided, we get the JSON x-site error.
We are wondering if there is a config to change on Rally subscription side or perhaps there is an error in the documentation or something else simple.
I submitted a defect. It works up to the point when I load an App-debug.html using rally-app-builder run command:
rab run
and append apiKey to the app's URL as a query parameter. It loads fine using the apiKey:
The problem starts when I choose a different server to load an embedded app, for example:
a)start a simple http python or node server in another directory
b)copy App-external.html from deploy folder to the directory from which the server is running
c)create a new file, App-embedded.html in this directory :
<html>
<header>
<title>Embedded app test: revs</title>
</header>
<body>
<iframe src="http://localhost:9000/App-external.html?apiKey=_Ib4u6d7"></iframe>
</body>
</html>
d)load App-embedded.html
These steps results in cross-origin error.
If you check in Chrome's Network tab, or Safari debugger it shows that artifact (hierarchicalrequirement or defect) requests fails. Interestingly, the preceding subscription, user and schema requests complete successfully. Screenshot from Safari:
It turns out that the underlying issues were related to the CORS configuration on the Rally servers, not anything specific with App SDK 2.0rc3. As of 11/24/14 this issue should be resolved.
Related
I am working with external tracking service. They sent my index.html file, which looks like this:
<html>
<head>
<!-- tag -->
<script type="text/javascript" src="//path.js"></script>
</head>
<body>
</body>
</html>
They want us to upload this file to shopify and sent them the url to it. The url should look like this https://myshopifyshop/index.html. I couldn't find any article how to upload or create new blank html page with .html extension. Is this somehow possible?
You can't create an html page that will follow the root url of your site.
But you can upload a html page as an asset and link that asset as a page.
Example url will be:
https://cdn.shopify.com/s/files/1/*****/*****/t/4/assets/index.html
But I don't think that this will do you any good, since tracking services requires you to track the current site and not a dummy file that no one will ever open.
It's highly possible that the only important part is the script and everything else is not needed.
So you actually may need to add the script in your layout/theme.liquid file and ignore the rest.
Please contact the the tracking service and let them know that you are not using a static HTML site, but a Shopify one and what steps should you follow.
I am trying to update my inventory levels using the Shopify API. I am trying to get it to work using Postman.
I am getting this as a response
<html>
<body>
<noscript>
Continue
</noscript>
<script type="text/javascript">
window.location = "REDACTED";
</script>
</body>
</html>
Your API call is running into issues at API Authentication step. This problem arise, when you are sending cookies with POST request.
From the Shopify documentation,
Shopify prevents HTTP Basic Auth POST requests that have cookies,
which can cause POST calls to fail. If your POST call fails, then you
should try clearing your cookies.
To clear the cookies, use the Cookie manager in Postman app that can be accessed using Cookies button located below the Send and Save buttons.
I have an ASP.Net MVC5 based web app. I am using Bootstrap for the UI.
On my machine everything is perfect. After login, the following page is shown.
Analytics page as on localhost
After I deploy to the web server, I get the following page post login.
Analytics page from the server
You can see that the page from server is all messed up. It is almost like all divs are showing up with their borders. I am not sure what is going wrong here. Any inputs are most welcome.
Update:
I have another application "TalkApp" that has the same login page as this Analytics App. "TalkApp" UI has no issues.
So I checked the page source for the login page. The TalkApp has these links:
<link href="/TADATalk/Content/bootstrap.css" rel="stylesheet"/>
<link href="/TADATalk/Content/site.css" rel="stylesheet"/>
<script src="/TADATalk/Scripts/modernizr-2.8.3.js"></script>
<script src="/TADATalk/Scripts/jquery-3.1.1.js"></script>
<script src="/TADATalk/Scripts/jquery.unobtrusive-ajax.js"></script>
<script src="/TADATalk/Scripts/jquery-ui-1.12.1.js"></script>
<script src="/TADATalk/Scripts/bootstrap.js"></script>
Whereas, the AnalyticsApp did not have these. Instead it had ..v="e34hgd5677.." type of entries. I removed use of bundles from AnalyticsApp and directly added the link refs. Now the UI loads properly.
So the question still stands: why did bundles not work with one app but work with another app (which is also deployed on the server).
The only thing I can think of as to why your bundles aren't loading but hardcoding css links does, is if you're not including them in your _Layout.cshtml. Here is an example from my application.
BundleConfig.cs (RegisterBundles method)
.... other bundles ...
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/bootstrap.css",
"~/Content/site.css"));
... other bundles ...
_Layout.cshtml*
... other head stuff ...
#Styles.Render("~/Content/css") <--- this name is the "virtual path" to that bundle of styles
... other head stuff ...
You define the bundles in BundleConfig.cs, which gets called from your Global.asax.cs.ApplicationStart() method:
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
ViewEngineConfig.RegisterEngines(ViewEngines.Engines);
}
This should all be setup in the older template startup project.
I deployed a web application on WebLogic 12c (12.1.3) and when I hitting the login page, I get a HTTP-200 response for the login.html but the js and css files which are included in the login.html, not getting loaded and throwing HTTP-404 error.
Like below js is included in html
<script language="JavaScript" type="text/javascript" src="/resources/js/validation.js"/>
For validation.js getting http 404 error.
The resources folder is already under the application home directory.
I am new to weblogic.
Let me know if any configurations are required to set to get these js-files loaded whenever required for an application.
I am able to get the static contents after adding dot (.) in the src attribute like below
script language="JavaScript" type="text/javascript" src="./resources/js/validation.js" />
I'm trying to use neo4j's REST API from an Apache Flex front-end. When my Flex app connects to the base URL (http://localhost:7474/db/data/) to discover other service URLs, it gets replies back in HTML rather than JSON format (just like if I enter the base URL into my browser).
In the Flex HTTP request, I've set the Content-Type and Accept headers both to "application/json" but it hasn't made a difference. I've also tried both GET and POST request methods.
I've verified neo4j is capable of sending JSON responses through a simple telnet window, so it must be "intelligently" formatting the reply based on something in the HTTP request. I'd thought the Content-Type and Accept headers would take care of it, though.
I realize the problem isn't technically in neo4j, but rather somewhere inside Flex's HTTPService (and supporting) classes, but I've been unsuccessful in working around the apparent bug/limitation.
Is there a way to simply force all such responses from neo4j to just be in JSON format?
Thanks,
Chris
* EDIT *
As requested below, here is the exact reply I'm getting in my Flex app:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><title>Root</title><meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<link href='http://resthtml.neo4j.org/style/rest.css' rel='stylesheet' type='text/css'>
<script type='text/javascript' src='/webadmin/htmlbrowse.js'></script>
</head>
<body onload='javascript:neo4jHtmlBrowse.start();' id='root'>
<div id='content'><div id='header'><h1><a title='Neo4j REST interface' href='/'><span>Neo4j REST interface</span></a></h1></div>
<div id='page-body'>
<table class="root"><caption>Root</caption>
<tr class='odd'><th>relationship_index</th><td>http://localhost:7474/db/data/index/relationship</td></tr>
<tr><th>node_index</th><td>http://localhost:7474/db/data/index/node</td></tr>
</table>
<div class='break'> </div></div></div></body></html>
This is the same result I get if I just put the base URL in my web browser manually and retrieve it that way.
I figured it out. When I compiled and ran my Flex app as a browser-based app, it used the browser's native capability to request the URL, blowing away my customized Content-Type and Accept headers.
When I compiled and ran as an Adobe Air desktop app, it worked fine and I received the proper JSON response.
Likely this is a bug in Flash Player, as the documentation for the Flex HTTPService class doesn't give any limitation on changing Content-Type or other headers when running in a browser vs. Air.
-Chris