} else {
sonarRecentHistory.add('<%= @resource ? @resource.key : "" -%>',
'<%= @resource ? @resource.name(true) : "" -%>',
- '<%= @resource ? @resource.qualifier : "" -%>');
+ '<%= @resource ? Java::OrgSonarServerUi::JRubyFacade.getInstance().getResourceType(@resource.qualifier).getIconPath() : "" -%>');
}
</script>
\ No newline at end of file
localStorage.clear();
};
-Sonar.RecentHistory.prototype.add = function (resourceKey, resourceName, resourceQualifier) {
+Sonar.RecentHistory.prototype.add = function (resourceKey, resourceName, iconPath) {
var sonarHistory = this.getRecentHistory();
if (resourceKey != '') {
- var newEntry = {'key': resourceKey, 'name': resourceName, 'qualifier': resourceQualifier};
+ var newEntry = {'key': resourceKey, 'name': resourceName, 'iconPath': iconPath};
// removes the element of the array if it exists
for (i = 0; i < sonarHistory.length; i++) {
var item = sonarHistory[i];
recentHistory.forEach(function (resource) {
historyLinksList.append('<li><img width="16" height="16" src="'
+ sonarRecentHistory.appContext
- + '/images/q/'
- + resource['qualifier']
- + '.png"><a href="'
+ + resource['iconPath']
+ + '"><a href="'
+ sonarRecentHistory.appContext
+ '/dashboard/index/'
+ resource['key']