-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: UI crash when the plugin doesn't build. #737
Conversation
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #737 +/- ##
==========================================
- Coverage 60.52% 60.31% -0.21%
==========================================
Files 99 99
Lines 18020 18019 -1
==========================================
- Hits 10906 10868 -38
- Misses 5773 5806 +33
- Partials 1341 1345 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 11 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
@@ -0,0 +1,2 @@ | |||
define(["@velaux/data","react","@velaux/ui"],((e,n,t)=>(()=>{"use strict";var r={112:n=>{n.exports=e},928:e=>{e.exports=t},650:e=>{e.exports=n}},o={};function a(e){var n=o[e];if(void 0!==n)return n.exports;var t=o[e]={exports:{}};return r[e](t,t.exports,a),t.exports}a.d=(e,n)=>{for(var t in n)a.o(n,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},a.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return(()=>{a.r(l),a.d(l,{plugin:()=>d});var e=a(112),n=a(650);class t extends n.PureComponent{render(){return n.createElement("div",{className:"page-container"},"Hello KubeVela Plugin Words!")}}var r=a(928);function o(e,n,t,r,o,a,l){try{var i=e[a](l),u=i.value}catch(e){return void t(e)}i.done?n(u):Promise.resolve(u).then(r,o)}const i=(u=function*(e,n){try{window.location.reload()}catch(e){console.error("Error while updating the plugin",e)}},c=function(){var e=this,n=arguments;return new Promise((function(t,r){var a=u.apply(e,n);function l(e){o(a,t,r,l,i,"next",e)}function i(e){o(a,t,r,l,i,"throw",e)}l(void 0)}))},function(e,n){return c.apply(this,arguments)});var u,c;const d=(new e.AppPagePlugin).setRootPage(t).addConfigPage({title:"Configuration",icon:"cog",body:({plugin:e})=>{const{enabled:t,jsonData:o}=e.meta;return n.createElement("div",{className:"gf-form-group"},n.createElement("div",null,n.createElement("div",null,"Enable / Disable"),!t&&n.createElement(n.Fragment,null,n.createElement("div",null,"The plugin is currently not enabled."),n.createElement(r.Button,{type:"primary",onClick:()=>i(e.meta.id,{enabled:!0,jsonData:o})},"Enable plugin")),t&&n.createElement(n.Fragment,null,n.createElement("div",null,"The plugin is currently enabled."),n.createElement(r.Button,{type:"secondary",onClick:()=>i(e.meta.id,{enabled:!1,jsonData:o})},"Disable plugin"))))},id:"configuration"})})(),l})())); |
Check warning
Code scanning / CodeQL
Variable not declared before use
@@ -0,0 +1,2 @@ | |||
define(["@velaux/data","react","@velaux/ui"],((e,n,t)=>(()=>{"use strict";var r={112:n=>{n.exports=e},928:e=>{e.exports=t},650:e=>{e.exports=n}},o={};function a(e){var n=o[e];if(void 0!==n)return n.exports;var t=o[e]={exports:{}};return r[e](t,t.exports,a),t.exports}a.d=(e,n)=>{for(var t in n)a.o(n,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},a.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return(()=>{a.r(l),a.d(l,{plugin:()=>d});var e=a(112),n=a(650);class t extends n.PureComponent{render(){return n.createElement("div",{className:"page-container"},"Hello KubeVela Plugin Words!")}}var r=a(928);function o(e,n,t,r,o,a,l){try{var i=e[a](l),u=i.value}catch(e){return void t(e)}i.done?n(u):Promise.resolve(u).then(r,o)}const i=(u=function*(e,n){try{window.location.reload()}catch(e){console.error("Error while updating the plugin",e)}},c=function(){var e=this,n=arguments;return new Promise((function(t,r){var a=u.apply(e,n);function l(e){o(a,t,r,l,i,"next",e)}function i(e){o(a,t,r,l,i,"throw",e)}l(void 0)}))},function(e,n){return c.apply(this,arguments)});var u,c;const d=(new e.AppPagePlugin).setRootPage(t).addConfigPage({title:"Configuration",icon:"cog",body:({plugin:e})=>{const{enabled:t,jsonData:o}=e.meta;return n.createElement("div",{className:"gf-form-group"},n.createElement("div",null,n.createElement("div",null,"Enable / Disable"),!t&&n.createElement(n.Fragment,null,n.createElement("div",null,"The plugin is currently not enabled."),n.createElement(r.Button,{type:"primary",onClick:()=>i(e.meta.id,{enabled:!0,jsonData:o})},"Enable plugin")),t&&n.createElement(n.Fragment,null,n.createElement("div",null,"The plugin is currently enabled."),n.createElement(r.Button,{type:"secondary",onClick:()=>i(e.meta.id,{enabled:!1,jsonData:o})},"Disable plugin"))))},id:"configuration"})})(),l})())); |
Check warning
Code scanning / CodeQL
Variable not declared before use
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
Description of your changes
I have:
yarn lint
to ensure the frontend changes are ready for review.make reviewable
to ensure the server changes are ready for review.backport release-x.y
labels to auto-backport this PR if necessary.Special notes for your reviewer