Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orion-dev] How to properly set {OrionHome} (WAR file issue)

Perhaps the logic in fileClientPlugin.js is also assuming a "/" context path? For the "Orion File Client Plugin" if you open the services UI what values do you see for "top" and "pattern"?

-Simon

Inactive hide details for Javier H Pedemonte ---01/31/2013 11:03:29 PM---Thanks, Simon.  Now Orion is somewhat usable.  Some isJavier H Pedemonte ---01/31/2013 11:03:29 PM---Thanks, Simon.  Now Orion is somewhat usable.  Some issues remain: 1) In the Navigator page, I see t


    From:

Javier H Pedemonte <pedemont@xxxxxxxxxx>

    To:

Orion developer discussions <orion-dev@xxxxxxxxxxx>,

    Date:

01/31/2013 11:03 PM

    Subject:

Re: [orion-dev] How to properly set {OrionHome} (WAR file issue)

    Sent by:

orion-dev-bounces@xxxxxxxxxxx




Thanks, Simon.  Now Orion is somewhat usable.  Some issues remain: 


1) In the Navigator page, I see the "Favorites" section on the left hand side, but not "Create New Content".
 


2) When clicking on a top level folder (i.e. "project1") shows the breadcrumbs as
 

       Orion Content / undefined / A
 

(I expected "Orion Content / project1").  I did notice that the link for the "project1" folder is
 

       
http://localhost:8080/maqetta/navigate/table.html#/maqetta/file/A/?depth=1 

-- notice the "/maqetta" in front of "/file/A/...".  I'm guessing that other areas of the code don't expect the servlet context (i.e. "/maqetta").  May also be the cause of (1).
 


Any suggestions on where to look?
 


Javier Pedemonte





From:        
Simon Kaegi <Simon_Kaegi@xxxxxxxxxx> 
To:        
Orion developer discussions <orion-dev@xxxxxxxxxxx> 
Cc:        
orion-dev-bounces@xxxxxxxxxxx 
Date:        
01/31/2013 12:37 PM 
Subject:        
Re: [orion-dev] How to properly set {OrionHome} (WAR file issue) 
Sent by:        
orion-dev-bounces@xxxxxxxxxxx 




The calculation in the client still needs to be fixed and I've retargeted
https://bugs.eclipse.org/bugs/show_bug.cgi?id=373450 to RC1 but the code should be something along the lines of...

var temp = document.createElement("a");
temp.href = ""> var orionhome = temp.href;

or better still if you are using the W3C WebApps URL-shim (e.g.
require(["orion/URL-shim"], function(){})) or if your browser natively supports it...)

var orionhome = new URL(require.toUrl("."), window.location).href;

-Simon



Inactive hide details for Javier H Pedemonte ---01/30/2013 12:16:58 PM---I've been trying to get Maqetta/Orion working when runJavier H Pedemonte ---01/30/2013 12:16:58 PM---I've been trying to get Maqetta/Orion working when running from a WAR file  [1].  We've fixed most o

    From:
     

    Javier H Pedemonte <pedemont@xxxxxxxxxx>
     

    To:
     

    orion-dev@xxxxxxxxxxx,

    Date:
     

    01/30/2013 12:16 PM
     

    Subject:
     

    [orion-dev] How to properly set {OrionHome} (WAR file issue)
     

    Sent by:
     

    orion-dev-bounces@xxxxxxxxxxx





I've been trying to get Maqetta/Orion working when running from a WAR file [1].  We've fixed most of the Maqetta issues and identified some Orion ones.
 

Now, I'm running into an issue where the Orion client doesn't work, due to the "OrionHome" variable.  As part of
https://bugs.eclipse.org/bugs/show_bug.cgi?id=373450, it was set to the hostname of the loaded URL.  The problem is that when running from a WAR file, all URLs contain a base "context", corresponding to the name of the WAR file.  In our case, with a release named "maqetta.war", all URLs look like http(s)://[hostname]/maqetta/... -- but Orion fails because "OrionHome" is missing the "/maqetta" bit. 

I think I should be good to go if I can just properly set OrionHome in the 3 or 4 places it is set; most of Orion client seems to make direct use of this variable.  The question is how to set OrionHome correctly?  Does Orion already have some core code that could be useful in this case?  Is there an easy way to determine from which base URL Orion is running?
 

I already have some code (a bit of a hack, really) on the server that can tell if Maqetta/Orion is running from a WAR.  But what's the best way to get that information from the server to the client code?  If someone could point me to the correct Orion classes, I could get this working...
 


[1] Eclipse bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=377823 
 Maqetta bug:
https://github.com/maqetta/maqetta/issues/19 


Javier Pedemonte
_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx

https://dev.eclipse.org/mailman/listinfo/orion-dev

_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx

https://dev.eclipse.org/mailman/listinfo/orion-dev
_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/orion-dev


GIF image

GIF image


Back to the top