Only show related changes from latest patch set
This is to keep with the UI model that only the file list area should change according to which patch set is selected. Additionally fixed an issue where a thenable function was being passed to then(), which accepts a success and failure function and not a Promise. Bug: Issue 4477 Change-Id: Id83db0ad77c4ec6ba2840fa27d13291f2c927797
This commit is contained in:
@@ -256,7 +256,7 @@ limitations under the License.
|
||||
<div class="relatedChanges">
|
||||
<gr-related-changes-list id="relatedChanges"
|
||||
change="[[_change]]"
|
||||
patch-num="[[_patchRange.patchNum]]"></gr-related-changes-list>
|
||||
patch-num="[[_computeLatestPatchNum(_allPatchSets)]]"></gr-related-changes-list>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -74,59 +74,61 @@ limitations under the License.
|
||||
}
|
||||
</style>
|
||||
<div hidden$="[[!_loading]]">Loading...</div>
|
||||
<section class="relatedChanges" hidden$="[[!_relatedResponse.changes.length]]" hidden>
|
||||
<h4>Relation chain</h4>
|
||||
<template
|
||||
is="dom-repeat"
|
||||
items="[[_relatedResponse.changes]]"
|
||||
as="related">
|
||||
<div class$="[[_computeChangeContainerClass(change, related)]]">
|
||||
<a href$="[[_computeChangeURL(related._change_number, related._revision_number)]]"
|
||||
class$="[[_computeLinkClass(related)]]">
|
||||
[[related.commit.subject]]
|
||||
<div hidden$="[[_loading]]">
|
||||
<section class="relatedChanges" hidden$="[[!_relatedResponse.changes.length]]" hidden>
|
||||
<h4>Relation chain</h4>
|
||||
<template
|
||||
is="dom-repeat"
|
||||
items="[[_relatedResponse.changes]]"
|
||||
as="related">
|
||||
<div class$="[[_computeChangeContainerClass(change, related)]]">
|
||||
<a href$="[[_computeChangeURL(related._change_number, related._revision_number)]]"
|
||||
class$="[[_computeLinkClass(related)]]">
|
||||
[[related.commit.subject]]
|
||||
</a>
|
||||
<span class$="[[_computeChangeStatusClass(related)]]">
|
||||
([[_computeChangeStatus(related)]])
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
</section>
|
||||
<section hidden$="[[!_submittedTogether.length]]" hidden>
|
||||
<h4>Submitted together</h4>
|
||||
<template is="dom-repeat" items="[[_submittedTogether]]" as="change">
|
||||
<a href$="[[_computeChangeURL(change._number)]]"
|
||||
class$="[[_computeLinkClass(change)]]">
|
||||
[[change.project]]: [[change.branch]]: [[change.subject]]
|
||||
</a>
|
||||
<span class$="[[_computeChangeStatusClass(related)]]">
|
||||
([[_computeChangeStatus(related)]])
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
</section>
|
||||
<section hidden$="[[!_submittedTogether.length]]" hidden>
|
||||
<h4>Submitted together</h4>
|
||||
<template is="dom-repeat" items="[[_submittedTogether]]" as="change">
|
||||
<a href$="[[_computeChangeURL(change._number)]]"
|
||||
class$="[[_computeLinkClass(change)]]">
|
||||
[[change.project]]: [[change.branch]]: [[change.subject]]
|
||||
</a>
|
||||
</template>
|
||||
</section>
|
||||
<section hidden$="[[!_sameTopic.length]]" hidden>
|
||||
<h4>Same topic</h4>
|
||||
<template is="dom-repeat" items="[[_sameTopic]]" as="change">
|
||||
<a href$="[[_computeChangeURL(change._number)]]"
|
||||
class$="[[_computeLinkClass(change)]]">
|
||||
[[change.project]]: [[change.branch]]: [[change.subject]]
|
||||
</a>
|
||||
</template>
|
||||
</section>
|
||||
<section hidden$="[[!_conflicts.length]]" hidden>
|
||||
<h4>Merge conflicts</h4>
|
||||
<template is="dom-repeat" items="[[_conflicts]]" as="change">
|
||||
<a href$="[[_computeChangeURL(change._number)]]"
|
||||
class$="[[_computeLinkClass(change)]]">
|
||||
[[change.subject]]
|
||||
</a>
|
||||
</template>
|
||||
</section>
|
||||
<section hidden$="[[!_cherryPicks.length]]" hidden>
|
||||
<h4>Cherry picks</h4>
|
||||
<template is="dom-repeat" items="[[_cherryPicks]]" as="change">
|
||||
<a href$="[[_computeChangeURL(change._number)]]"
|
||||
class$="[[_computeLinkClass(change)]]">
|
||||
[[change.subject]]
|
||||
</a>
|
||||
</template>
|
||||
</section>
|
||||
</template>
|
||||
</section>
|
||||
<section hidden$="[[!_sameTopic.length]]" hidden>
|
||||
<h4>Same topic</h4>
|
||||
<template is="dom-repeat" items="[[_sameTopic]]" as="change">
|
||||
<a href$="[[_computeChangeURL(change._number)]]"
|
||||
class$="[[_computeLinkClass(change)]]">
|
||||
[[change.project]]: [[change.branch]]: [[change.subject]]
|
||||
</a>
|
||||
</template>
|
||||
</section>
|
||||
<section hidden$="[[!_conflicts.length]]" hidden>
|
||||
<h4>Merge conflicts</h4>
|
||||
<template is="dom-repeat" items="[[_conflicts]]" as="change">
|
||||
<a href$="[[_computeChangeURL(change._number)]]"
|
||||
class$="[[_computeLinkClass(change)]]">
|
||||
[[change.subject]]
|
||||
</a>
|
||||
</template>
|
||||
</section>
|
||||
<section hidden$="[[!_cherryPicks.length]]" hidden>
|
||||
<h4>Cherry picks</h4>
|
||||
<template is="dom-repeat" items="[[_cherryPicks]]" as="change">
|
||||
<a href$="[[_computeChangeURL(change._number)]]"
|
||||
class$="[[_computeLinkClass(change)]]">
|
||||
[[change.subject]]
|
||||
</a>
|
||||
</template>
|
||||
</section>
|
||||
</div>
|
||||
<gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
|
||||
</template>
|
||||
<script src="gr-related-changes-list.js"></script>
|
||||
|
@@ -68,7 +68,7 @@
|
||||
}.bind(this)),
|
||||
];
|
||||
|
||||
return this._getServerConfig().then(function(config) {
|
||||
promises.push(this._getServerConfig().then(function(config) {
|
||||
if (this.change.topic && !config.change.submit_whole_topic) {
|
||||
return this._getChangesWithSameTopic().then(function(response) {
|
||||
this._sameTopic = response;
|
||||
@@ -77,7 +77,9 @@
|
||||
this._sameTopic = [];
|
||||
}
|
||||
return this._sameTopic;
|
||||
}.bind(this)).then(Promise.all(promises)).then(function() {
|
||||
}.bind(this)));
|
||||
|
||||
return Promise.all(promises).then(function() {
|
||||
this._loading = false;
|
||||
}.bind(this));
|
||||
},
|
||||
|
Reference in New Issue
Block a user