Hi,
we do use the verify status plugin (it builds and loads on 2.16 nicely),
--
Björn
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Tue, Dec 4, 2018 at 10:36 PM 'Björn Pedersen' via Repo and Gerrit Discussion <repo-d...@googlegroups.com> wrote:Hi,
we do use the verify status plugin (it builds and loads on 2.16 nicely),Unrelated to your problem but note that this plugin has a quite outdated master branch, i.e. there are a lot of commits on its stable-2.14 branch that have not been merged up through stable-2.15 to master. I started working on it but didn't have time to solve all the conflicts.
but in polyui I get a js error as the gwt js is loaded in polyui context as well:
verifystatus-0.js:1085 Tue Dec 04 14:25:36 GMT+100 2018 Class$134
SEVERE: TypeError: $wnd.Gerrit.get_raw is not a function
Class$S38: TypeError: $wnd.Gerrit.get_raw is not a function
at Unknown.Wc(verifystatus-0.js)
at Unknown.Tc(verifystatus-0.js)
at Unknown._b(verifystatus-0.js)
at Unknown.At(verifystatus-0.js)
at Unknown.g(verifystatus-0.js)
at Unknown.Wd(verifystatus-0.js)
at Unknown.Zd(verifystatus-0.js)
at Unknown.eval(verifystatus-0.js)
at Unknown.rt(verifystatus-0.js)
at Unknown.eval(verifystatus-0.js)
at Unknown.anonymous(<anonymous>)
at Unknown.m(http://opc-158.office.frm2:8085/plugins/verify-status/static/verifystatus/verifystatus.nocache.js)
at Unknown.anonymous(http://opc-158.office.frm2:8085/plugins/verify-status/static/verifystatus/verifystatus.nocache.js)
at Unknown.l(http://opc-158.office.frm2:8085/plugins/verify-status/static/verifystatus/verifystatus.nocache.js)
at Unknown.A.verifystatus.onScriptDownloaded(http://opc-158.office.frm2:8085/plugins/verify-status/static/verifystatus/verifystatus.nocache.js)
at Unknown.anonymous(http://opc-158.office.frm2:8085/plugins/verify-status/static/verifystatus/8162A4E5098D95249A3B8192E56C872B.cache.js)
Any tips where look how to either suppress loading completly in polyui or supply a polyui-compatible interface?You might be able to suppress it in the same way that the delete-project plugin does, i.e. by enclosing everything in a conditional that is only executed when it's not loaded in polygerrit:
Hi,
I'll got now a littel bit further, but am still stuck at 2 problems now:
1) The GWT-generated js is still unconditonally loaded in PolyUI context as well and do not really see where to hook to change this. The exclusion is easier for JSPlugins in GWT-context, where the mentioned trick can get implemented.
This is not too critical, as it produces js-exception client side, but no further harm.
2) The bigger problem: How to access the GWT-Style rest endpoints from a polyUi js plugin or add new-style endpoints? The plugin.restAPI calls use new-style (http://<url>/c/<projects>/+ ...), but the plugin currently only provides the old-style endpoints (<url>/changes/...)
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<dom-module id="gr-verify-status">
<script>
if (window.Polymer) {
Gerrit.install(function(plugin) {
plugin.registerCustomComponent(
'change-view-integration', 'gr-verify-status-panel');
});
}
</script>
</dom-module>
<dom-module id="gr-verify-status-panel">
<template>
<style include="gr-form-styles"></style>
<gr-verifiy-status-panel>
<div id="verify-status">Content here 2 [[fetched]] </div>
</gr-verifiy-status-panel>
</template>
<script >
//(function() {
// 'use strict';
Polymer({
is: 'gr-verify-status-panel',
properties: {
fetched: { type: String,
computed: '_fetchData(revision)',
},
},
attached() {
this.plugin.attributeHelper(this).bind(
'revision', this._onRevisionChanged.bind(this));
},
_fetchData(what) {
const endpoint = '/projects/';
const errFn = response => {
this.fire('page-error', {response});
};
return this.plugin.restApi().get(
endpoint, errFn)
.then(r => {
console.log("XXX");
});
},
_onRevisionChanged(value) {
console.log(`(attributeHelper.bind) revision number: ${value._number}`);
},
}
);
//})();
</script>
</dom-module>