Commit 0df34884 by kevalbhatt

ATLAS-3831: UI: Add entity icon for spark

parent 985264e1
...@@ -73,10 +73,10 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums', ...@@ -73,10 +73,10 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums',
}); });
return uuid; return uuid;
}; };
Utils.getBaseUrl = function(url) { Utils.getBaseUrl = function(url, noPop) {
var path = url.replace(/\/[\w-]+.(jsp|html)|\/+$/ig, ''), var path = url.replace(/\/[\w-]+.(jsp|html)|\/+$/ig, ''),
splitPath = path.split("/"); splitPath = path.split("/");
if (splitPath && splitPath[splitPath.length - 1] === "n") { if (noPop !== true && splitPath && splitPath[splitPath.length - 1] === "n") {
splitPath.pop(); splitPath.pop();
return splitPath.join("/"); return splitPath.join("/");
} }
...@@ -87,7 +87,7 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums', ...@@ -87,7 +87,7 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums',
serviceType, serviceType,
status, status,
typeName, typeName,
iconBasePath = Utils.getBaseUrl(window.location.pathname) + Globals.entityImgPath; iconBasePath = Utils.getBaseUrl(window.location.pathname, true) + Globals.entityImgPath;
if (entityData) { if (entityData) {
typeName = entityData.typeName; typeName = entityData.typeName;
serviceType = entityData && entityData.serviceType; serviceType = entityData && entityData.serviceType;
...@@ -283,7 +283,7 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums', ...@@ -283,7 +283,7 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums',
var existingError = $(".ui-pnotify-container.alert-danger .ui-pnotify-text").text(); var existingError = $(".ui-pnotify-container.alert-danger .ui-pnotify-text").text();
if (existingError !== message) { if (existingError !== message) {
Utils.notifyError({ Utils.notifyError({
html:isHtml, html: isHtml,
content: message content: message
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment