amarnath reddy pappu created AMBARI-23733:
---------------------------------------------
Summary: Invalid component version shown in stacks tab under
"stack and version"
Key: AMBARI-23733
URL: https://issues.apache.org/jira/browse/AMBARI-23733
Project: Ambari
Issue Type: Bug
Components: ambari-server
Affects Versions: 2.6.0
Reporter: amarnath reddy pappu
1. If there are multiple versions of repositories with the same stack name then
UI does not show proper version information in stacks tab under "stacks and
version" page.
2. this can be reproduced If the below API call returns attached response.
{noformat}
http://apappu3.hdp.com:8080/api/v1/clusters/clustername/stack_versions?fields=repository_versions/RepositoryVersions/stack_services,ClusterStackVersions/stack,ClusterStackVersions/version&_=1525110087851
{noformat}
3. basically below method is not checking for currently mapped repo version -
rather it picks first stack version.
{noformat}
loadServiceVersionFromVersionDefinitionsSuccessCallback: function (jsonData) {
var rv = Em.getWithDefault(jsonData, 'items', []).filter(function(i) {
return Em.getWithDefault(i, 'ClusterStackVersions.stack', null) ===
App.get('currentStackName') &&
Em.getWithDefault(i, 'ClusterStackVersions.version', null) ===
App.get('currentStackVersionNumber');
})[0];
var map = this.get('serviceVersionsMap');
var stackServices = Em.getWithDefault(rv || {},
'repository_versions.0.RepositoryVersions.stack_services', false);
if (stackServices) {
stackServices.forEach(function (item) {
map[item.name] = item.versions[0];
});
}
},
{noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)