Skip to content

Commit

Permalink
feat(layer-selector-ui): display service end point url in metadata panel
Browse files Browse the repository at this point in the history
display service end point url in metadata panel. Modify filtermanager and filter_wms_meta_template
to include the html fragment for service end point.

Closes: PBI 7727
  • Loading branch information
JackW committed May 15, 2015
1 parent ca799e9 commit 1cc62f5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/js/RAMP/Modules/filterManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,8 @@ define([
wmsmeta = tmpl("wms_meta_main",
{
legendUrl: layerConfig.legend.imageUrl,
getCapabilitiesUrl: layerConfig.url + "&request=GetCapabilities"
getCapabilitiesUrl: layerConfig.url + "&request=GetCapabilities",
serviceEndPointUrl: layerConfig.url
}
);

Expand All @@ -605,7 +606,7 @@ define([
});
} else {
topic.publish(EventManager.GUI.SUBPANEL_OPEN, {
content: "<p>" + i18n.t('filterManager.metadataNotFound') + "</p>",
content: "<p>" + i18n.t('filterManager.metadataNotFound') + "</p><b>Service End Point URL</b><br><a href='" + layerConfig.url + "' tagget='_blank'>" + layerConfig.url + "</a>",
origin: "filterManager",
update: true,
guid: id
Expand All @@ -616,7 +617,7 @@ define([
// metadataUrl =String.format("http://intranet.ecdmp-dev.cmc.ec.gc.ca/geonetwork/srv/eng/csw?service=CSW&version=2.0.2&request=GetRecordById&outputSchema=csw:IsoRecord&id={0}", guid);
var metadataError = function () {
topic.publish(EventManager.GUI.SUBPANEL_OPEN, {
content: "<p>" + i18n.t('filterManager.metadataNotFound') + "</p>",
content: "<p>" + i18n.t('filterManager.metadataNotFound') + "</p><h5>" + i18n.t('filterManager.serviceEndPointLabel') + "</h5><p><a href='" + layerConfig.url + "' tagget='_blank'>" + layerConfig.url + "</a></p>",
origin: "filterManager",
update: true,
guid: id
Expand All @@ -641,7 +642,7 @@ define([
metadataError();
} else {
topic.publish(EventManager.GUI.SUBPANEL_OPEN, {
content: $(data),
content: $(data).append("<h5>" + i18n.t('filterManager.serviceEndPointLabel') + "</h5><p><a href='" + layerConfig.url + "' tagget='_blank'>" + layerConfig.url + "</a></p>"),
origin: "filterManager",
update: true,
guid: id
Expand Down
2 changes: 2 additions & 0 deletions src/js/RAMP/Modules/templates/filter_wms_meta_Template.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@
<img src='{%=o.legendUrl %}' alt='{%=o.legendUrl %}'><br>
<b>{%= i18n.t('filterManager.linkToCap') %}</b><br>
<a href='{%=o.getCapabilitiesUrl %}' target='_blank'>{%=o.getCapabilitiesUrl %}</a>
<b>{%= i18n.t('filterManager.serviceEndPointLabel') %}</b><br>
<a href='{%=o.serviceEndPointUrl %}' tagget='_blank'>{%=o.serviceEndPointUrl %}</a>
</div>"
}
1 change: 1 addition & 0 deletions src/locales/en-CA/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@
"update": "Updating",
"user": "User-added Dataset"
},
"serviceEndPointLabel": "Service End Point",
"settings": "Settings",
"settingsLayerSettings": "Layer Settings",
"settingsOpacity": "Opacity",
Expand Down
1 change: 1 addition & 0 deletions src/locales/fr-CA/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@
"update": "Mise à jour",
"user": "Ensemble de données ajoutées par l’utilisateur"
},
"serviceEndPointLabel": "[fr] Service End Point",
"settings": "Paramètres",
"settingsLayerSettings": "Paramètres de la couche",
"settingsOpacity": "Opacité",
Expand Down

0 comments on commit 1cc62f5

Please sign in to comment.