YARN-8628. [UI2] Few duplicated or inconsistent information displayed in UI2. Contributed by Akhil PB.

(cherry picked from commit a2752779ac)
This commit is contained in:
Sunil G 2018-09-21 15:47:10 +05:30
parent e9315f6688
commit 6699b9658e
10 changed files with 15 additions and 17 deletions

View File

@ -41,7 +41,7 @@ export default Ember.Controller.extend({
getCellContent: function(row) {
return {
displayText: row.get('name'),
href: `#/yarn-component-instances/${row.get('name')}/info?service=${service}&&appid=${appId}`
href: `#/yarn-component-instances/${row.get('name')}/info?service=${service}&appid=${appId}`
};
}
}, {

View File

@ -19,7 +19,8 @@
import Ember from 'ember';
export default Ember.Controller.extend({
queryParams: ["appid", "service"],
queryParams: ["appid", "service", "containerid"],
appid: undefined,
service: undefined
service: undefined,
containerid: undefined
});

View File

@ -42,9 +42,10 @@ export default Ember.Controller.extend({
getCellContent: function(row) {
var component = row.get('component');
var instance = row.get('instanceName');
var containerId = row.get('containerId');
return {
text: instance,
href: `#/yarn-component-instance/${component}/instances/${instance}/info?appid=${appId}&&service=${serviceName}`
href: `#/yarn-component-instance/${component}/instances/${instance}/info?appid=${appId}&service=${serviceName}&containerid=${containerId}`
};
}
}, {

View File

@ -29,8 +29,8 @@ export default AbstractRoute.extend({
componentName: params.component_name,
instanceName: instanceName,
container: this.store.query('yarn-component-instance', {appId: params.appid}).then(function(instances) {
if (instances && instances.findBy('instanceName', instanceName)) {
return instances.findBy('instanceName', instanceName);
if (instances && instances.findBy('containerId', params.containerid)) {
return instances.findBy('containerId', params.containerid);
}
return null;
}, function() {

View File

@ -34,7 +34,6 @@ export default DS.JSONAPISerializer.extend({
startedTimestamp: info.LAUNCH_TIME,
host: info.HOSTNAME,
node: info.BARE_HOST,
hostUrl: 'N/A',
ipAddr: info.IP,
exitStatusCode: info.EXIT_STATUS_CODE
}

View File

@ -34,7 +34,7 @@ export default DS.JSONAPISerializer.extend({
finishedTime: Converter.timeStampToDate(payload.finishedTime),
elapsedTime: payload.elapsedTime,
logUrl: payload.logUrl,
containerExitStatus: payload.containerExitStatus,
containerExitStatus: payload.containerExitStatus + '',
containerState: payload.containerState,
nodeId : payload.nodeId,
nodeHttpAddress: payload.nodeHttpAddress

View File

@ -52,7 +52,7 @@ export default DS.JSONAPISerializer.extend({
vcores: info.RESOURCE_CPU,
memory: info.RESOURCE_MEMORY,
priority: 'N/A',
instances: 'N/A',
instances: '0',
createdTimestamp: payload.createdtime,
configs: newConfigs,
metrics: newMetrics

View File

@ -34,7 +34,7 @@ export default DS.JSONAPISerializer.extend({
startedTime: Converter.timeStampToDate(payload.createdtime),
finishedTime: Converter.timeStampToDate(payload.info.YARN_CONTAINER_FINISHED_TIME),
nodeHttpAddress: payload.info.YARN_CONTAINER_ALLOCATED_HOST_HTTP_ADDRESS,
containerExitStatus: payload.info.YARN_CONTAINER_EXIT_STATUS,
containerExitStatus: payload.info.YARN_CONTAINER_EXIT_STATUS + '',
containerState: payload.info.YARN_CONTAINER_STATE,
nodeId: payload.info.YARN_CONTAINER_ALLOCATED_HOST + ':' + payload.info.YARN_CONTAINER_ALLOCATED_PORT,
diagnosticsInfo: payload.info.YARN_CONTAINER_DIAGNOSTICS_INFO

View File

@ -16,10 +16,11 @@
* limitations under the License.
}}
<div class="col-md-12">
{{metrics-table metrics=model.metrics type="Service"}}
<div class="col-md-12" style="margin-bottom: 15px;">
<div class="col-md-12">
{{metrics-table metrics=model.metrics type="Service"}}
</div>
</div>
{{#if model.configs}}
<div class="col-md-12">
<div class="panel panel-default">

View File

@ -49,10 +49,6 @@
<td>Host</td>
<td>{{check-availability model.container.host}}</td>
</tr>
<tr>
<td>Host URL</td>
<td>{{check-availability model.container.hostUrl}}</td>
</tr>
<tr>
<td>Node</td>
<td>{{check-availability model.container.node}}</td>