PATRIC3 / patric3_website

Legacy PATRIC Website (JBoss Portal Version)
MIT License
5 stars 2 forks source link

remove old url dependency #1621

Closed hyoo closed 7 years ago

hyoo commented 7 years ago

i come across some hard-coded urls that contain old PATRIC urls.

We need to replace with new url pattern.

$ grep -r "/portal/portal/patric" *
app/p3app.js:           xhr.post("/portal/portal/patric/GenomicFeature/GenomicFeatureWindow?action=b&cacheability=PAGE", {
app/p3app.js:               document.location = "/portal/portal/patric/GlobalSearch?cType=taxon&cId=131567&dm=&pk=" + results;
widget/WorkspaceBrowser.js:             xhr.post("/portal/portal/patric/FIGfam/FIGfamWindow?action=b&cacheability=PAGE", {
widget/WorkspaceBrowser.js:                 Topic.publish("/navigate", {href: "/portal/portal/patric/MSA?cType=&cId=&pk=" + results});
widget/WorkspaceBrowser.js:             xhr.post("/portal/portal/patric/IDMapping/IDMappingWindow?action=b&cacheability=PAGE", {
widget/WorkspaceBrowser.js:                 Topic.publish("/navigate", {href: "/portal/portal/patric/IDMapping?cType=taxon&cId=131567&dm=result&pk=" + results});
widget/WorkspaceBrowser.js:             xhr.post("/portal/portal/patric/TranscriptomicsEnrichment/TranscriptomicsEnrichmentWindow?action=b&cacheability=PAGE", {
widget/WorkspaceBrowser.js:                 Topic.publish("/navigate", {href: "/portal/portal/patric/TranscriptomicsEnrichment?cType=taxon&cId=131567&pk=" + results});
dawenx commented 7 years ago

harry, i don't have knowledge on what should be used to replace those hard-coded urls, can you give me an example or more details? i know this might take you longer time than fixing it directly, but i wanted to learn and go through the files if you don't mind. thanks.

hyoo commented 7 years ago

each url is mapped to a tab or service

before we mechanically change this, I suggest to track down where we are using these, and if we don't use it, i would like to remove them.

@dawenx would you track down this ?

dawenx commented 7 years ago

I will look into it.

dawenx commented 7 years ago

harry, i made change in app/p3app.js and pushed my change to my fork.

i have hard time understanding what xhr.post() was doing in WorkspaceBrowser.js, i also don't have much testing data in my workspace to even see MSA, Pathway Summary and IDMapping action icons, can you take over fixing WorkspaceBrowser.js? thanks!