From 465e24e78f0940d07a04c3cfa0c93d4cb75a7220 Mon Sep 17 00:00:00 2001 From: Michael Ruoss Date: Fri, 3 Nov 2023 22:52:58 +0100 Subject: [PATCH] Use kinos to render results --- dev.livemd | 52 +++++++++++++++++++----------- lib/assets/apply_cell/main.js | 3 +- lib/assets/connection_cell/main.js | 3 +- lib/assets/get_cell/main.js | 3 +- lib/assets/kino_terminal/main.js | 1 - lib/assets/terminal_cell/main.js | 3 +- lib/kino_k8s.ex | 6 ++-- lib/kino_k8s/apply_cell.ex | 6 +++- lib/kino_k8s/connection_cell.ex | 7 ++-- lib/kino_k8s/get_cell.ex | 8 +++-- 10 files changed, 58 insertions(+), 34 deletions(-) diff --git a/dev.livemd b/dev.livemd index 58cd8f2..f1bf488 100644 --- a/dev.livemd +++ b/dev.livemd @@ -2,45 +2,61 @@ ```elixir # Mix.install([{:kino_k8s, github: "mruoss/kino_k8s"}]) -Mix.install([{:kino_k8s, path: "~/src/community/kino_k8s"}]) +Mix.install([{:kino_k8s, path: "~/src/community/kino_k8s"}], force: true) ``` ## Section - + ```elixir {:ok, conn} = K8s.Conn.from_file("~/.kube/config", - context: "rancher-desktop", + context: "kind-kino-k8s", insecure_skip_tls_verify: true ) -``` - -```elixir +conn ``` - + ```elixir ``` - + ```elixir +{:ok, result} = + K8s.Client.watch("v1", "configmaps", namespace: "default") + |> K8s.Client.put_conn(conn) + |> K8s.Client.stream() +Kino.Tree.new(result) ``` - - -```elixir - -``` - - - -```elixir - + + +````elixir +import YamlElixir.Sigil + +{:ok, applied_resource} = + ~y""" + kind: ConfigMap + apiVersion: v1 + metadata: + name: kino-k8s-cm + namespace: default + data: + key: default + """ + |> K8s.Client.create() + |> K8s.Client.put_conn(conn) + |> K8s.Client.run() + +Kino.Markdown.new("```yaml +#{Ymlr.document!(applied_resource)} ``` +") +```` diff --git a/lib/assets/apply_cell/main.js b/lib/assets/apply_cell/main.js index 0a9b442..21f61ed 100644 --- a/lib/assets/apply_cell/main.js +++ b/lib/assets/apply_cell/main.js @@ -1,4 +1,4 @@ -var C=Object.create;var f=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var T=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty;var w=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var P=(e,r,t,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of S(r))!j.call(e,o)&&o!==t&&f(e,o,{get:()=>r[o],enumerable:!(s=N(r,o))||s.enumerable});return e};var b=(e,r,t)=>(t=e!=null?C(T(e)):{},P(r||!e||!e.__esModule?f(t,"default",{value:e,enumerable:!0}):t,e));var m=w((J,l)=>{(function(){"use strict";var e={}.hasOwnProperty,r="[native code]";function t(){for(var s=[],o=0;oReact.createElement(React.Fragment,null,React.createElement("div",{className:"flex rounded-md border border-dashed border-red-700 bg-red-100 p-2"},React.createElement("svg",{className:"h-6 w-6 flex-none text-red-700",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},React.createElement("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})),React.createElement("div",{className:"font-inter px-2 text-sm font-medium text-red-700"},e))),v=z;var g=async e=>{await e.importJS("https://cdnjs.cloudflare.com/ajax/libs/react/18.2.0/umd/react.development.js"),await e.importJS("https://cdnjs.cloudflare.com/ajax/libs/react-dom/18.2.0/umd/react-dom.development.js")};var R=(e,r)=>{let[t,s]=React.useState(r),o=n=>a=>{s(i=>({...i,[n]:a})),console.log("Pushing ${attrName} to server",a),e.pushEvent(`update_${n}`,a)};return React.useEffect(()=>{e.handleEvent("update",n=>{console.log("Attribute update from server",n),s(a=>({...Object.assign(a,n)}))})},[]),[t,o]},h=R;var k=()=>React.createElement("div",{className:"mb-5 rounded-md bg-gray-100 p-4 font-inter text-sm font-medium text-gray-500"},React.createElement("p",null,"To make requests to the Kubernetes cluster, you need at least one connection to a cluster."),React.createElement("p",{className:"pt-1"},"To create a cluster connection, you can add the"," ",React.createElement("span",{className:"text-gray-600"},"Cluster Connection")," smart cell.")),x=k;var p=b(m()),K=({name:e,label:r,defaultValue:t,onChange:s,orientation:o="vert"})=>React.createElement("div",{className:(0,p.default)({"flex flex-row items-baseline":o=="horiz"})},React.createElement("label",{htmlFor:e,className:(0,p.default)({block:o=="vert","pr-1 uppercase":o=="horiz"},"mb-1 text-sm font-medium")},r),React.createElement("input",{type:"text",value:t,name:e,onChange:n=>s(n.target.value),className:(0,p.default)({"block w-full":o=="vert"},"rounded-lg border border-gray-300 bg-gray-50 p-1.5 text-sm focus:border-blue-500 focus:ring-blue-500")})),y=K;var d=b(m()),E=({name:e,label:r,options:t,selectedOption:s,onChange:o,className:n="",orientation:a="vert"})=>React.createElement("div",{className:(0,d.default)({"flex flex-row items-baseline":a=="horiz"},n)},React.createElement("label",{htmlFor:e,className:(0,d.default)({block:a=="vert","pr-1 uppercase":a=="horiz"},"mb-1 text-sm font-medium")},r),React.createElement("select",{id:e,value:s||void 0,onChange:i=>o(i.target.value),className:(0,d.default)({"block w-full":a=="vert"}," bg-caret-down appearance-none rounded-lg border border-gray-300 bg-gray-50 bg-[length:10px] bg-[center_right_10px] bg-no-repeat p-2 pr-5 text-sm focus:border-blue-500 focus:ring-blue-500")},t.map(i=>React.createElement("option",{key:i.value,value:i.value},i.label)))),u=E;var O=({initialAttrs:e,ctx:r})=>{let[t,s]=h(r,e);return React.createElement(React.Fragment,null,!t.connection&&React.createElement(x,null),React.createElement("div",{className:"rounded-md border-t border-solid border-gray-300 font-inter font-medium text-gray-600"},React.createElement("div",{className:"border-b-solid flex gap-x-5 gap-y-3 border-b border-b-gray-300 bg-blue-100 p-3"},React.createElement(u,{name:"connection",label:"Connection",options:t.connections.map(o=>({label:o.variable,value:o.variable})),selectedOption:t.connection?.variable?.toString(),onChange:s("connection"),orientation:"horiz"}),React.createElement(u,{name:"method",label:"Method",options:t.methods.map(o=>({label:o.toUpperCase(),value:o})),selectedOption:t.method,onChange:s("method"),orientation:"horiz"}),React.createElement(y,{label:"Assign To",name:"assign_to",defaultValue:t.result_variable,onChange:s("result_variable"),orientation:"horiz"}))))},A=O;var X=async(e,r)=>{await g(e,r),e.root.innerHTML="loading...",e.importCSS("main.css"),e.importCSS("https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap");let t=ReactDOM.createRoot(e.root);if(r.error)return t.render(React.createElement(v,{message:r.error}));t.render(React.createElement(A,{initialAttrs:r,ctx:e}))};export{X as init}; +var C=Object.create;var f=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var T=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty;var w=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var P=(e,r,t,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of S(r))!j.call(e,o)&&o!==t&&f(e,o,{get:()=>r[o],enumerable:!(s=N(r,o))||s.enumerable});return e};var b=(e,r,t)=>(t=e!=null?C(T(e)):{},P(r||!e||!e.__esModule?f(t,"default",{value:e,enumerable:!0}):t,e));var m=w((J,l)=>{(function(){"use strict";var e={}.hasOwnProperty,r="[native code]";function t(){for(var s=[],o=0;oReact.createElement(React.Fragment,null,React.createElement("div",{className:"flex rounded-md border border-dashed border-red-700 bg-red-100 p-2"},React.createElement("svg",{className:"h-6 w-6 flex-none text-red-700",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},React.createElement("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})),React.createElement("div",{className:"font-inter px-2 text-sm font-medium text-red-700"},e))),v=z;var g=async e=>{await e.importJS("https://cdnjs.cloudflare.com/ajax/libs/react/18.2.0/umd/react.production.min.js"),await e.importJS("https://cdnjs.cloudflare.com/ajax/libs/react-dom/18.2.0/umd/react-dom.production.min.js")};var R=(e,r)=>{let[t,s]=React.useState(r),o=n=>a=>{s(i=>({...i,[n]:a})),console.log("Pushing ${attrName} to server",a),e.pushEvent(`update_${n}`,a)};return React.useEffect(()=>{e.handleEvent("update",n=>{console.log("Attribute update from server",n),s(a=>({...Object.assign(a,n)}))})},[]),[t,o]},h=R;var k=()=>React.createElement("div",{className:"mb-5 rounded-md bg-gray-100 p-4 font-inter text-sm font-medium text-gray-500"},React.createElement("p",null,"To make requests to the Kubernetes cluster, you need at least one connection to a cluster."),React.createElement("p",{className:"pt-1"},"To create a cluster connection, you can add the"," ",React.createElement("span",{className:"text-gray-600"},"Cluster Connection")," smart cell.")),x=k;var p=b(m()),K=({name:e,label:r,defaultValue:t,onChange:s,orientation:o="vert"})=>React.createElement("div",{className:(0,p.default)({"flex flex-row items-baseline":o=="horiz"})},React.createElement("label",{htmlFor:e,className:(0,p.default)({block:o=="vert","pr-1 uppercase":o=="horiz"},"mb-1 text-sm font-medium")},r),React.createElement("input",{type:"text",value:t,name:e,onChange:n=>s(n.target.value),className:(0,p.default)({"block w-full":o=="vert"},"rounded-lg border border-gray-300 bg-gray-50 p-1.5 text-sm focus:border-blue-500 focus:ring-blue-500")})),y=K;var d=b(m()),E=({name:e,label:r,options:t,selectedOption:s,onChange:o,className:n="",orientation:a="vert"})=>React.createElement("div",{className:(0,d.default)({"flex flex-row items-baseline":a=="horiz"},n)},React.createElement("label",{htmlFor:e,className:(0,d.default)({block:a=="vert","pr-1 uppercase":a=="horiz"},"mb-1 text-sm font-medium")},r),React.createElement("select",{id:e,value:s||void 0,onChange:i=>o(i.target.value),className:(0,d.default)({"block w-full":a=="vert"}," bg-caret-down appearance-none rounded-lg border border-gray-300 bg-gray-50 bg-[length:10px] bg-[center_right_10px] bg-no-repeat p-2 pr-5 text-sm focus:border-blue-500 focus:ring-blue-500")},t.map(i=>React.createElement("option",{key:i.value,value:i.value},i.label)))),u=E;var O=({initialAttrs:e,ctx:r})=>{let[t,s]=h(r,e);return React.createElement(React.Fragment,null,!t.connection&&React.createElement(x,null),React.createElement("div",{className:"rounded-md border-t border-solid border-gray-300 font-inter font-medium text-gray-600"},React.createElement("div",{className:"border-b-solid flex gap-x-5 gap-y-3 border-b border-b-gray-300 bg-blue-100 p-3"},React.createElement(u,{name:"connection",label:"Connection",options:t.connections.map(o=>({label:o.variable,value:o.variable})),selectedOption:t.connection?.variable?.toString(),onChange:s("connection"),orientation:"horiz"}),React.createElement(u,{name:"method",label:"Method",options:t.methods.map(o=>({label:o.toUpperCase(),value:o})),selectedOption:t.method,onChange:s("method"),orientation:"horiz"}),React.createElement(y,{label:"Assign To",name:"assign_to",defaultValue:t.result_variable,onChange:s("result_variable"),orientation:"horiz"}))))},A=O;var X=async(e,r)=>{await g(e,r),e.root.innerHTML="loading...",e.importCSS("main.css"),e.importCSS("https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap");let t=ReactDOM.createRoot(e.root);if(r.error)return t.render(React.createElement(v,{message:r.error}));t.render(React.createElement(A,{initialAttrs:r,ctx:e}))};export{X as init}; /*! Bundled license information: classnames/index.js: @@ -8,4 +8,3 @@ classnames/index.js: http://jedwatson.github.io/classnames *) */ -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vbm9kZV9tb2R1bGVzL2NsYXNzbmFtZXMvaW5kZXguanMiLCAiLi4vLi4vLi4vYXNzZXRzL3NoYXJlZC9lcnJvci50c3giLCAiLi4vLi4vLi4vYXNzZXRzL3NoYXJlZC91dGlscy50cyIsICIuLi8uLi8uLi9hc3NldHMvc2hhcmVkL2F0dHJfc3RhdGUudHN4IiwgIi4uLy4uLy4uL2Fzc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nB1dCIsICJuYW1lIiwgImxhYmVsIiwgImRlZmF1bHRWYWx1ZSIsICJvbkNoYW5nZSIsICJvcmllbnRhdGlvbiIsICJjbGFzc05hbWVzIiwgImUiLCAiaW5wdXRfZGVmYXVsdCIsICJpbXBvcnRfY2xhc3NuYW1lcyIsICJTZWxlY3QiLCAibmFtZSIsICJsYWJlbCIsICJvcHRpb25zIiwgInNlbGVjdGVkT3B0aW9uIiwgIm9uQ2hhbmdlIiwgImNsYXNzTmFtZSIsICJvcmllbnRhdGlvbiIsICJjbGFzc05hbWVzIiwgImUiLCAib3B0aW9uIiwgInNlbGVjdF9kZWZhdWx0IiwgIkFwcCIsICJpbml0aWFsQXR0cnMiLCAiY3R4IiwgImF0dHJzIiwgInVwZGF0ZUF0dHIiLCAiYXR0cl9zdGF0ZV9kZWZhdWx0IiwgImNvbm5fbm90aWNlX2RlZmF1bHQiLCAic2VsZWN0X2RlZmF1bHQiLCAiY29ubmVjdGlvbiIsICJtZXRob2QiLCAiaW5wdXRfZGVmYXVsdCIsICJhcHBfZGVmYXVsdCIsICJpbml0IiwgImN0eCIsICJhdHRycyIsICJsb2FkUmVhY3QiLCAicm9vdCIsICJlcnJvcl9kZWZhdWx0IiwgImFwcF9kZWZhdWx0Il0KfQo= diff --git a/lib/assets/connection_cell/main.js b/lib/assets/connection_cell/main.js index 6240fa8..6216b49 100644 --- a/lib/assets/connection_cell/main.js +++ b/lib/assets/connection_cell/main.js @@ -1,4 +1,4 @@ -var A=Object.create;var v=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var _=Object.getPrototypeOf,T=Object.prototype.hasOwnProperty;var w=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var N=(e,r,t,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of S(r))!T.call(e,n)&&n!==t&&v(e,n,{get:()=>r[n],enumerable:!(s=C(r,n))||s.enumerable});return e};var b=(e,r,t)=>(t=e!=null?A(_(e)):{},N(r||!e||!e.__esModule?v(t,"default",{value:e,enumerable:!0}):t,e));var m=w((I,l)=>{(function(){"use strict";var e={}.hasOwnProperty,r="[native code]";function t(){for(var s=[],n=0;nReact.createElement(React.Fragment,null,React.createElement("div",{className:"flex rounded-md border border-dashed border-red-700 bg-red-100 p-2"},React.createElement("svg",{className:"h-6 w-6 flex-none text-red-700",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},React.createElement("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})),React.createElement("div",{className:"font-inter px-2 text-sm font-medium text-red-700"},e))),g=j;var x=async e=>{await e.importJS("https://cdnjs.cloudflare.com/ajax/libs/react/18.2.0/umd/react.development.js"),await e.importJS("https://cdnjs.cloudflare.com/ajax/libs/react-dom/18.2.0/umd/react-dom.development.js")};var k=(e,r)=>{let[t,s]=React.useState(r),n=o=>a=>{s(i=>({...i,[o]:a})),console.log("Pushing ${attrName} to server",a),e.pushEvent(`update_${o}`,a)};return React.useEffect(()=>{e.handleEvent("update",o=>{console.log("Attribute update from server",o),s(a=>({...Object.assign(a,o)}))})},[]),[t,n]},y=k;var p=b(m()),P=({name:e,label:r,defaultValue:t,onChange:s,orientation:n="vert"})=>React.createElement("div",{className:(0,p.default)({"flex flex-row items-baseline":n=="horiz"})},React.createElement("label",{htmlFor:e,className:(0,p.default)({block:n=="vert","pr-1 uppercase":n=="horiz"},"mb-1 text-sm font-medium")},r),React.createElement("input",{type:"text",value:t,name:e,onChange:o=>s(o.target.value),className:(0,p.default)({"block w-full":n=="vert"},"rounded-lg border border-gray-300 bg-gray-50 p-1.5 text-sm focus:border-blue-500 focus:ring-blue-500")})),c=P;var u=b(m()),z=({name:e,label:r,options:t,selectedOption:s,onChange:n,className:o="",orientation:a="vert"})=>React.createElement("div",{className:(0,u.default)({"flex flex-row items-baseline":a=="horiz"},o)},React.createElement("label",{htmlFor:e,className:(0,u.default)({block:a=="vert","pr-1 uppercase":a=="horiz"},"mb-1 text-sm font-medium")},r),React.createElement("select",{id:e,value:s||void 0,onChange:i=>n(i.target.value),className:(0,u.default)({"block w-full":a=="vert"}," bg-caret-down appearance-none rounded-lg border border-gray-300 bg-gray-50 bg-[length:10px] bg-[center_right_10px] bg-no-repeat p-2 pr-5 text-sm focus:border-blue-500 focus:ring-blue-500")},t.map(i=>React.createElement("option",{key:i.value,value:i.value},i.label)))),f=z;var E=({initialAttrs:e,ctx:r})=>{let[t,s]=y(r,e),n=[{label:"File",value:"file"},{label:"Environment Variable",value:"env"}];return n.push({label:"K8s Service Account",value:"k8s"}),React.createElement("div",{className:"rounded-md border border-solid border-gray-300 font-inter font-medium text-gray-600"},React.createElement("div",{className:"border-b-solid flex flex-wrap gap-x-5 gap-y-3 border-b border-b-gray-300 bg-blue-100 p-3"},React.createElement(f,{name:"source_type",label:"Source Type",options:n,selectedOption:t.source_type,onChange:s("source_type"),orientation:"horiz"}),React.createElement(c,{label:"Assign To",name:"assign_to",defaultValue:t.result_variable,onChange:s("result_variable"),orientation:"horiz"})),React.createElement("div",{className:"flex flex-wrap gap-x-5 p-3"},t.source_type!="k8s"&&React.createElement(c,{label:t.source_type=="file"?"File Path":"Env Var",name:"source",defaultValue:t.source,onChange:s("source"),orientation:"vert"}),t.source_type!="k8s"&&React.createElement(c,{label:"Context",name:"context",defaultValue:t.opts.context||"",onChange:o=>s("opts")({...t.opts,context:o})}),React.createElement(f,{name:"insecure_skip_tls_verify",label:"Insecure Skip TLS Verify",options:[{label:"Yes",value:"true"},{label:"No",value:"false"}],selectedOption:t.opts.insecure_skip_tls_verify.toString(),onChange:o=>s("opts")({...t.opts,insecure_skip_tls_verify:JSON.parse(o)})})))},h=E;var G=async(e,r)=>{await x(e,r),e.root.innerHTML="loading...",e.importCSS("main.css"),e.importCSS("https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap");let t=ReactDOM.createRoot(e.root);if(r.error)return t.render(React.createElement(g,{message:r.error}));t.render(React.createElement(h,{initialAttrs:r,ctx:e}))};export{G as init}; +var A=Object.create;var v=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var _=Object.getPrototypeOf,T=Object.prototype.hasOwnProperty;var w=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var N=(e,r,t,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of S(r))!T.call(e,n)&&n!==t&&v(e,n,{get:()=>r[n],enumerable:!(s=C(r,n))||s.enumerable});return e};var b=(e,r,t)=>(t=e!=null?A(_(e)):{},N(r||!e||!e.__esModule?v(t,"default",{value:e,enumerable:!0}):t,e));var m=w((I,l)=>{(function(){"use strict";var e={}.hasOwnProperty,r="[native code]";function t(){for(var s=[],n=0;nReact.createElement(React.Fragment,null,React.createElement("div",{className:"flex rounded-md border border-dashed border-red-700 bg-red-100 p-2"},React.createElement("svg",{className:"h-6 w-6 flex-none text-red-700",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},React.createElement("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})),React.createElement("div",{className:"font-inter px-2 text-sm font-medium text-red-700"},e))),g=j;var x=async e=>{await e.importJS("https://cdnjs.cloudflare.com/ajax/libs/react/18.2.0/umd/react.production.min.js"),await e.importJS("https://cdnjs.cloudflare.com/ajax/libs/react-dom/18.2.0/umd/react-dom.production.min.js")};var k=(e,r)=>{let[t,s]=React.useState(r),n=o=>a=>{s(i=>({...i,[o]:a})),console.log("Pushing ${attrName} to server",a),e.pushEvent(`update_${o}`,a)};return React.useEffect(()=>{e.handleEvent("update",o=>{console.log("Attribute update from server",o),s(a=>({...Object.assign(a,o)}))})},[]),[t,n]},y=k;var p=b(m()),P=({name:e,label:r,defaultValue:t,onChange:s,orientation:n="vert"})=>React.createElement("div",{className:(0,p.default)({"flex flex-row items-baseline":n=="horiz"})},React.createElement("label",{htmlFor:e,className:(0,p.default)({block:n=="vert","pr-1 uppercase":n=="horiz"},"mb-1 text-sm font-medium")},r),React.createElement("input",{type:"text",value:t,name:e,onChange:o=>s(o.target.value),className:(0,p.default)({"block w-full":n=="vert"},"rounded-lg border border-gray-300 bg-gray-50 p-1.5 text-sm focus:border-blue-500 focus:ring-blue-500")})),c=P;var u=b(m()),z=({name:e,label:r,options:t,selectedOption:s,onChange:n,className:o="",orientation:a="vert"})=>React.createElement("div",{className:(0,u.default)({"flex flex-row items-baseline":a=="horiz"},o)},React.createElement("label",{htmlFor:e,className:(0,u.default)({block:a=="vert","pr-1 uppercase":a=="horiz"},"mb-1 text-sm font-medium")},r),React.createElement("select",{id:e,value:s||void 0,onChange:i=>n(i.target.value),className:(0,u.default)({"block w-full":a=="vert"}," bg-caret-down appearance-none rounded-lg border border-gray-300 bg-gray-50 bg-[length:10px] bg-[center_right_10px] bg-no-repeat p-2 pr-5 text-sm focus:border-blue-500 focus:ring-blue-500")},t.map(i=>React.createElement("option",{key:i.value,value:i.value},i.label)))),f=z;var E=({initialAttrs:e,ctx:r})=>{let[t,s]=y(r,e),n=[{label:"File",value:"file"},{label:"Environment Variable",value:"env"}];return n.push({label:"K8s Service Account",value:"k8s"}),React.createElement("div",{className:"rounded-md border border-solid border-gray-300 font-inter font-medium text-gray-600"},React.createElement("div",{className:"border-b-solid flex flex-wrap gap-x-5 gap-y-3 border-b border-b-gray-300 bg-blue-100 p-3"},React.createElement(f,{name:"source_type",label:"Source Type",options:n,selectedOption:t.source_type,onChange:s("source_type"),orientation:"horiz"}),React.createElement(c,{label:"Assign To",name:"assign_to",defaultValue:t.result_variable,onChange:s("result_variable"),orientation:"horiz"})),React.createElement("div",{className:"flex flex-wrap gap-x-5 p-3"},t.source_type!="k8s"&&React.createElement(c,{label:t.source_type=="file"?"File Path":"Env Var",name:"source",defaultValue:t.source,onChange:s("source"),orientation:"vert"}),t.source_type!="k8s"&&React.createElement(c,{label:"Context",name:"context",defaultValue:t.opts.context||"",onChange:o=>s("opts")({...t.opts,context:o})}),React.createElement(f,{name:"insecure_skip_tls_verify",label:"Insecure Skip TLS Verify",options:[{label:"Yes",value:"true"},{label:"No",value:"false"}],selectedOption:t.opts.insecure_skip_tls_verify.toString(),onChange:o=>s("opts")({...t.opts,insecure_skip_tls_verify:JSON.parse(o)})})))},h=E;var G=async(e,r)=>{await x(e,r),e.root.innerHTML="loading...",e.importCSS("main.css"),e.importCSS("https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap");let t=ReactDOM.createRoot(e.root);if(r.error)return t.render(React.createElement(g,{message:r.error}));t.render(React.createElement(h,{initialAttrs:r,ctx:e}))};export{G as init}; /*! Bundled license information: classnames/index.js: @@ -8,4 +8,3 @@ classnames/index.js: http://jedwatson.github.io/classnames *) */ -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vbm9kZV9tb2R1bGVzL2NsYXNzbmFtZXMvaW5kZXguanMiLCAiLi4vLi4vLi4vYXNzZXRzL3NoYXJlZC9lcnJvci50c3giLCAiLi4vLi4vLi4vYXNzZXRzL3NoYXJlZC91dGlscy50cyIsICIuLi8uLi8uLi9hc3NldHMvc2hhcmVkL2F0dHJfc3RhdGUudHN4IiwgIi4uLy4uLy4uL2Fzc2V0cy9zaGFyZWQvZm9ybS9pbnB1dC50c3giLCAiLi4vLi4vLi4vYXNzZXRzL3NoYXJlZC9mb3JtL3NlbGVjdC50c3giLCAiLi4vLi4vLi4vYXNzZXRzL2Nvbm5lY3Rpb25fY2VsbC9hcHAudHN4IiwgIi4uLy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ZVwiXG4gICAgICAgICAgb3B0aW9ucz17c291cmNlX3R5cGVfb3B0aW9uc31cbiAgICAgICAgICBzZWxlY3RlZE9wdGlvbj17YXR0cnNbJ3NvdXJjZV90eXBlJ119XG4gICAgICAgICAgb25DaGFuZ2U9e3VwZGF0ZUF0dHIoJ3NvdXJjZV90eXBlJyl9XG4gICAgICAgICAgb3JpZW50YXRpb249XCJob3JpelwiXG4gICAgICAgIC8+XG4gICAgICAgIDxJbnB1dFxuICAgICAgICAgIGxhYmVsPVwiQXNzaWduIFRvXCJcbiAgICAgICAgICBuYW1lPVwiYXNzaWduX3RvXCJcbiAgICAgICAgICBkZWZhdWx0VmFsdWU9e2F0dHJzWydyZXN1bHRfdmFyaWFibGUnXX1cbiAgICAgICAgICBvbkNoYW5nZT17dXBkYXRlQXR0cigncmVzdWx0X3ZhcmlhYmxlJyl9XG4gICAgICAgICAgb3JpZW50YXRpb249XCJob3JpelwiXG4gICAgICAgIC8+XG4gICAgICA8L2Rpdj5cbiAgICAgIDxkaXYgY2xhc3NOYW1lPVwiZmxleCBmbGV4LXdyYXAgZ2FwLXgtNSBwLTNcIj5cbiAgICAgICAge2F0dHJzWydzb3VyY2VfdHlwZSddICE9ICdrOHMnICYmIChcbiAgICAgICAgICA8SW5wdXRcbiAgICAgICAgICAgIGxhYmVsPXthdHRyc1snc291cmNlX3R5cGUnXSA9PSAnZmlsZScgPyAnRmlsZSBQYXRoJyA6ICdFbnYgVmFyJ31cbiAgICAgICAgICAgIG5hbWU9XCJzb3VyY2VcIlxuICAgICAgICAgICAgZGVmYXVsdFZhbHVlPXthdHRyc1snc291cmNlJ119XG4gICAgICAgICAgICBvbkNoYW5nZT17dXBkYXRlQXR0cignc291cmNlJyl9XG4gICAgICAgICAgICBvcmllbnRhdGlvbj1cInZlcnRcIlxuICAgICAgICAgIC8+XG4gICAgICAgICl9XG4gICAgICAgIHthdHRyc1snc291cmNlX3R5cGUnXSAhPSAnazhzJyAmJiAoXG4gICAgICAgICAgPElucHV0XG4gICAgICAgICAgICBsYWJlbD1cIkNvbnRleHRcIlxuICAgICAgICAgICAgbmFtZT1cImNvbnRleHRcIlxuICAgICAgICAgICAgZGVmYXVsdFZhbHVlPXthdHRycy5vcHRzLmNvbnRleHQgfHwgJyd9XG4gICAgICAgICAgICBvbkNoYW5nZT17KHZhbHVlKSA9PlxuICAgICAgICAgICAgICB1cGRhdGVBdHRyKCdvcHRzJykoeyAuLi5hdHRycy5vcHRzLCBjb250ZXh0OiB2YWx1ZSB9KVxuICAgICAgICAgICAgfVxuICAgICAgICAgIC8+XG4gICAgICAgICl9XG4gICAgICAgIDxTZWxlY3RcbiAgICAgICAgICBuYW1lPVwiaW5zZWN1cmVfc2tpcF90bHNfdmVyaWZ5XCJcbiAgICAgICAgICBsYWJlbD1cIkluc2VjdXJlIFNraXAgVExTIFZlcmlmeVwiXG4gICAgICAgICAgb3B0aW9ucz17W1xuICAgICAgICAgICAgeyBsYWJlbDogJ1llcycsIHZhbHVlOiAndHJ1ZScgfSxcbiAgICAgICAgICAgIHsgbGFiZWw6ICdObycsIHZhbHVlOiAnZmFsc2UnIH0sXG4gICAgICAgICAgXX1cbiAgICAgICAgICBzZWxlY3RlZE9wdGlvbj17YXR0cnMub3B0cy5pbnNlY3VyZV9za2lwX3Rsc192ZXJpZnkudG9TdHJpbmcoKX1cbiAgICAgICAgICBvbkNoYW5nZT17KHZhbHVlKSA9PlxuICAgICAgICAgICAgdXBkYXRlQXR0cignb3B0cycpKHtcbiAgICAgICAgICAgICAgLi4uYXR0cnMub3B0cyxcbiAgICAgICAgICAgICAgaW5zZWN1cmVfc2tpcF90bHNfdmVyaWZ5OiBKU09OLnBhcnNlKHZhbHVlKSxcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgfVxuICAgICAgICAvPlxuICAgICAgPC9kaXY+XG4gICAgPC9kaXY+XG4gIClcbn1cblxuZXhwb3J0IGRlZmF1bHQgQXBwXG4iLCAiaW1wb3J0IHsgS2lub0NvbnRleHQgf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QiLCAiY3R4IiwgImF0dHJzIiwgImxvYWRSZWFjdCIsICJyb290IiwgImVycm9yX2RlZmF1bHQiLCAiYXBwX2RlZmF1bHQiXQp9Cg== diff --git a/lib/assets/get_cell/main.js b/lib/assets/get_cell/main.js index b76b9e4..fad155e 100644 --- a/lib/assets/get_cell/main.js +++ b/lib/assets/get_cell/main.js @@ -1,4 +1,4 @@ -var R=Object.create;var f=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,K=Object.prototype.hasOwnProperty;var _=(t,o)=>()=>(o||t((o={exports:{}}).exports,o),o.exports);var L=(t,o,e,s)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of P(o))!K.call(t,a)&&a!==e&&f(t,a,{get:()=>o[a],enumerable:!(s=I(o,a))||s.enumerable});return t};var b=(t,o,e)=>(e=t!=null?R(j(t)):{},L(o||!t||!t.__esModule?f(e,"default",{value:t,enumerable:!0}):e,t));var m=_((X,c)=>{(function(){"use strict";var t={}.hasOwnProperty,o="[native code]";function e(){for(var s=[],a=0;aReact.createElement(React.Fragment,null,React.createElement("div",{className:"flex rounded-md border border-dashed border-red-700 bg-red-100 p-2"},React.createElement("svg",{className:"h-6 w-6 flex-none text-red-700",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},React.createElement("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})),React.createElement("div",{className:"font-inter px-2 text-sm font-medium text-red-700"},t))),v=z;var g=(t,o)=>{let e;return(...s)=>{clearTimeout(e),e=setTimeout(()=>{t(...s)},o)}},h=async t=>{await t.importJS("https://cdnjs.cloudflare.com/ajax/libs/react/18.2.0/umd/react.development.js"),await t.importJS("https://cdnjs.cloudflare.com/ajax/libs/react-dom/18.2.0/umd/react-dom.development.js")};var O=(t,o)=>{let[e,s]=React.useState(o),a=r=>n=>{s(l=>({...l,[r]:n})),console.log("Pushing ${attrName} to server",n),t.pushEvent(`update_${r}`,n)};return React.useEffect(()=>{t.handleEvent("update",r=>{console.log("Attribute update from server",r),s(n=>({...Object.assign(n,r)}))})},[]),[e,a]},y=O;var E=()=>React.createElement("div",{className:"mb-5 rounded-md bg-gray-100 p-4 font-inter text-sm font-medium text-gray-500"},React.createElement("p",null,"To make requests to the Kubernetes cluster, you need at least one connection to a cluster."),React.createElement("p",{className:"pt-1"},"To create a cluster connection, you can add the"," ",React.createElement("span",{className:"text-gray-600"},"Cluster Connection")," smart cell.")),x=E;var d=b(m()),F=({name:t,label:o,defaultValue:e,onChange:s,orientation:a="vert"})=>React.createElement("div",{className:(0,d.default)({"flex flex-row items-baseline":a=="horiz"})},React.createElement("label",{htmlFor:t,className:(0,d.default)({block:a=="vert","pr-1 uppercase":a=="horiz"},"mb-1 text-sm font-medium")},o),React.createElement("input",{type:"text",value:e,name:t,onChange:r=>s(r.target.value),className:(0,d.default)({"block w-full":a=="vert"},"rounded-lg border border-gray-300 bg-gray-50 p-1.5 text-sm focus:border-blue-500 focus:ring-blue-500")})),S=F;var C=b(m());var G=({name:t,selectedValue:o,searchTerm:e,onSearch:s,placeholder:a})=>{let r=g(i=>{s(i.toLowerCase())},300),[n,l]=React.useState(e??"");return React.useEffect(()=>{o&&l(o)},[o]),React.createElement(React.Fragment,null,React.createElement("div",{className:"relative"},React.createElement("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",strokeWidth:1.5,stroke:"currentColor",className:(0,C.default)("h-5 w-5",{"bg-green-200":o,"text-green-800":o,"border-green-800":o,"rounded-lg":o})},o?React.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75L11.25 15 15 9.75M21 12c0 1.268-.63 2.39-1.593 3.068a3.745 3.745 0 01-1.043 3.296 3.745 3.745 0 01-3.296 1.043A3.745 3.745 0 0112 21c-1.268 0-2.39-.63-3.068-1.593a3.746 3.746 0 01-3.296-1.043 3.745 3.745 0 01-1.043-3.296A3.745 3.745 0 013 12c0-1.268.63-2.39 1.593-3.068a3.745 3.745 0 011.043-3.296 3.746 3.746 0 013.296-1.043A3.746 3.746 0 0112 3c1.268 0 2.39.63 3.068 1.593a3.746 3.746 0 013.296 1.043 3.746 3.746 0 011.043 3.296A3.745 3.745 0 0121 12z"}):React.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"}))),React.createElement("input",{type:"text",value:n,name:t,autoComplete:"off",placeholder:a,onInput:i=>{l(i.target.value),r(i.target.value)},className:"block w-full rounded-lg border border-gray-300 bg-gray-50 p-2 pl-9 text-sm focus:border-blue-500 focus:ring-blue-500"})))},M=({resultItems:t,itemRenderer:o,onSelect:e,resultItemsKeyField:s})=>React.createElement("div",{className:"max-h-36 overflow-auto rounded-b-lg border-b border-l border-r border-gray-300"},React.createElement("div",{className:"w-max min-w-full"},t.map(a=>React.createElement("div",{key:a[s],onClick:()=>e(a),className:"border-b-solid last:border-b-none cursor-pointer border-b border-b-gray-300 bg-gray-50 px-2 py-0.5 hover:bg-blue-600 hover:text-white"},o(a))))),q=({name:t,label:o,searchTerm:e,onSearch:s,resultItems:a,resultItemsKeyField:r,itemRenderer:n,className:l,onSelect:i,selectedValue:w,placeholder:k})=>React.createElement("div",{className:l},React.createElement("label",{htmlFor:t,className:"mb-1 block text-sm font-medium"},o),React.createElement(G,{name:t,onSearch:s,searchTerm:e,selectedValue:w,placeholder:k}),(a&&a.length)>0&&React.createElement(M,{resultItems:a,itemRenderer:n,onSelect:i,resultItemsKeyField:r})),T=q;var u=b(m()),U=({name:t,label:o,options:e,selectedOption:s,onChange:a,className:r="",orientation:n="vert"})=>React.createElement("div",{className:(0,u.default)({"flex flex-row items-baseline":n=="horiz"},r)},React.createElement("label",{htmlFor:t,className:(0,u.default)({block:n=="vert","pr-1 uppercase":n=="horiz"},"mb-1 text-sm font-medium")},o),React.createElement("select",{id:t,value:s||void 0,onChange:l=>a(l.target.value),className:(0,u.default)({"block w-full":n=="vert"}," bg-caret-down appearance-none rounded-lg border border-gray-300 bg-gray-50 bg-[length:10px] bg-[center_right_10px] bg-no-repeat p-2 pr-5 text-sm focus:border-blue-500 focus:ring-blue-500")},e.map(l=>React.createElement("option",{key:l.value,value:l.value},l.label)))),p=U;var J=({gvk:t})=>React.createElement(React.Fragment,null,React.createElement("div",{className:"text-xs text-gray-400"},t.api_version),React.createElement("div",{className:"text-sm"},t.kind)),N=J;var V=({initialAttrs:t,ctx:o})=>{let[e,s]=y(o,t),a=e.result_types[e.request_type];return React.createElement(React.Fragment,null,!e.connection&&React.createElement(x,null),React.createElement("div",{className:"rounded-md border border-solid border-gray-300 font-inter font-medium text-gray-600"},React.createElement("div",{className:"border-b-solid flex gap-x-5 gap-y-3 border-b border-b-gray-300 bg-blue-100 p-3"},React.createElement(p,{name:"connection",label:"Connection",options:e.connections.map(r=>({label:r.variable,value:r.variable})),selectedOption:e.connection?.variable?.toString(),onChange:s("connection"),orientation:"horiz"}),React.createElement(p,{name:"request_type",label:"Request Type",options:e.request_types.map(r=>({label:r.toUpperCase(),value:r})),selectedOption:e.request_type,onChange:s("request_type"),orientation:"horiz"}),a&&React.createElement(p,{name:"result_type",label:"Result Type",options:a.map(r=>({label:r.toUpperCase(),value:r})),selectedOption:e.result_type,onChange:s("result_type"),orientation:"horiz"}),React.createElement(S,{label:"Assign To",name:"assign_to",defaultValue:e.result_variable,onChange:s("result_variable"),orientation:"horiz"})),React.createElement("div",{className:"flex gap-x-5 p-3"},e.connection&&React.createElement(T,{className:"max-w-full",name:"gvk",label:"Resource Kind",onSearch:s("search_term"),searchTerm:e.search_term,resultItemsKeyField:"index",resultItems:e.search_result_items,onSelect:s("gvk"),itemRenderer:r=>React.createElement(N,{gvk:r}),selectedValue:e.gvk?.kind,placeholder:"apps/v1 Deployment"}),e.namespaces&&React.createElement(p,{name:"namespace",label:"Namespace",options:e.namespaces.map(r=>({label:r,value:r})),selectedOption:e.namespace,onChange:s("namespace")}),e.resources&&React.createElement(p,{name:"resource",label:"Resource Name",options:e.resources.map(r=>({label:r,value:r})),selectedOption:e.resource,onChange:s("resource")}))))},A=V;var de=async(t,o)=>{await h(t,o),t.root.innerHTML="loading...",t.importCSS("main.css"),t.importCSS("https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap");let e=ReactDOM.createRoot(t.root);if(o.error)return e.render(React.createElement(v,{message:o.error}));e.render(React.createElement(A,{initialAttrs:o,ctx:t}))};export{de as init}; +var R=Object.create;var f=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,K=Object.prototype.hasOwnProperty;var _=(t,o)=>()=>(o||t((o={exports:{}}).exports,o),o.exports);var L=(t,o,e,s)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of P(o))!K.call(t,a)&&a!==e&&f(t,a,{get:()=>o[a],enumerable:!(s=I(o,a))||s.enumerable});return t};var b=(t,o,e)=>(e=t!=null?R(j(t)):{},L(o||!t||!t.__esModule?f(e,"default",{value:t,enumerable:!0}):e,t));var m=_((X,c)=>{(function(){"use strict";var t={}.hasOwnProperty,o="[native code]";function e(){for(var s=[],a=0;aReact.createElement(React.Fragment,null,React.createElement("div",{className:"flex rounded-md border border-dashed border-red-700 bg-red-100 p-2"},React.createElement("svg",{className:"h-6 w-6 flex-none text-red-700",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},React.createElement("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})),React.createElement("div",{className:"font-inter px-2 text-sm font-medium text-red-700"},t))),v=z;var g=(t,o)=>{let e;return(...s)=>{clearTimeout(e),e=setTimeout(()=>{t(...s)},o)}},h=async t=>{await t.importJS("https://cdnjs.cloudflare.com/ajax/libs/react/18.2.0/umd/react.production.min.js"),await t.importJS("https://cdnjs.cloudflare.com/ajax/libs/react-dom/18.2.0/umd/react-dom.production.min.js")};var O=(t,o)=>{let[e,s]=React.useState(o),a=r=>n=>{s(l=>({...l,[r]:n})),console.log("Pushing ${attrName} to server",n),t.pushEvent(`update_${r}`,n)};return React.useEffect(()=>{t.handleEvent("update",r=>{console.log("Attribute update from server",r),s(n=>({...Object.assign(n,r)}))})},[]),[e,a]},y=O;var E=()=>React.createElement("div",{className:"mb-5 rounded-md bg-gray-100 p-4 font-inter text-sm font-medium text-gray-500"},React.createElement("p",null,"To make requests to the Kubernetes cluster, you need at least one connection to a cluster."),React.createElement("p",{className:"pt-1"},"To create a cluster connection, you can add the"," ",React.createElement("span",{className:"text-gray-600"},"Cluster Connection")," smart cell.")),x=E;var d=b(m()),F=({name:t,label:o,defaultValue:e,onChange:s,orientation:a="vert"})=>React.createElement("div",{className:(0,d.default)({"flex flex-row items-baseline":a=="horiz"})},React.createElement("label",{htmlFor:t,className:(0,d.default)({block:a=="vert","pr-1 uppercase":a=="horiz"},"mb-1 text-sm font-medium")},o),React.createElement("input",{type:"text",value:e,name:t,onChange:r=>s(r.target.value),className:(0,d.default)({"block w-full":a=="vert"},"rounded-lg border border-gray-300 bg-gray-50 p-1.5 text-sm focus:border-blue-500 focus:ring-blue-500")})),S=F;var C=b(m());var G=({name:t,selectedValue:o,searchTerm:e,onSearch:s,placeholder:a})=>{let r=g(i=>{s(i.toLowerCase())},300),[n,l]=React.useState(e??"");return React.useEffect(()=>{o&&l(o)},[o]),React.createElement(React.Fragment,null,React.createElement("div",{className:"relative"},React.createElement("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",strokeWidth:1.5,stroke:"currentColor",className:(0,C.default)("h-5 w-5",{"bg-green-200":o,"text-green-800":o,"border-green-800":o,"rounded-lg":o})},o?React.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75L11.25 15 15 9.75M21 12c0 1.268-.63 2.39-1.593 3.068a3.745 3.745 0 01-1.043 3.296 3.745 3.745 0 01-3.296 1.043A3.745 3.745 0 0112 21c-1.268 0-2.39-.63-3.068-1.593a3.746 3.746 0 01-3.296-1.043 3.745 3.745 0 01-1.043-3.296A3.745 3.745 0 013 12c0-1.268.63-2.39 1.593-3.068a3.745 3.745 0 011.043-3.296 3.746 3.746 0 013.296-1.043A3.746 3.746 0 0112 3c1.268 0 2.39.63 3.068 1.593a3.746 3.746 0 013.296 1.043 3.746 3.746 0 011.043 3.296A3.745 3.745 0 0121 12z"}):React.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"}))),React.createElement("input",{type:"text",value:n,name:t,autoComplete:"off",placeholder:a,onInput:i=>{l(i.target.value),r(i.target.value)},className:"block w-full rounded-lg border border-gray-300 bg-gray-50 p-2 pl-9 text-sm focus:border-blue-500 focus:ring-blue-500"})))},M=({resultItems:t,itemRenderer:o,onSelect:e,resultItemsKeyField:s})=>React.createElement("div",{className:"max-h-36 overflow-auto rounded-b-lg border-b border-l border-r border-gray-300"},React.createElement("div",{className:"w-max min-w-full"},t.map(a=>React.createElement("div",{key:a[s],onClick:()=>e(a),className:"border-b-solid last:border-b-none cursor-pointer border-b border-b-gray-300 bg-gray-50 px-2 py-0.5 hover:bg-blue-600 hover:text-white"},o(a))))),q=({name:t,label:o,searchTerm:e,onSearch:s,resultItems:a,resultItemsKeyField:r,itemRenderer:n,className:l,onSelect:i,selectedValue:w,placeholder:k})=>React.createElement("div",{className:l},React.createElement("label",{htmlFor:t,className:"mb-1 block text-sm font-medium"},o),React.createElement(G,{name:t,onSearch:s,searchTerm:e,selectedValue:w,placeholder:k}),(a&&a.length)>0&&React.createElement(M,{resultItems:a,itemRenderer:n,onSelect:i,resultItemsKeyField:r})),T=q;var u=b(m()),U=({name:t,label:o,options:e,selectedOption:s,onChange:a,className:r="",orientation:n="vert"})=>React.createElement("div",{className:(0,u.default)({"flex flex-row items-baseline":n=="horiz"},r)},React.createElement("label",{htmlFor:t,className:(0,u.default)({block:n=="vert","pr-1 uppercase":n=="horiz"},"mb-1 text-sm font-medium")},o),React.createElement("select",{id:t,value:s||void 0,onChange:l=>a(l.target.value),className:(0,u.default)({"block w-full":n=="vert"}," bg-caret-down appearance-none rounded-lg border border-gray-300 bg-gray-50 bg-[length:10px] bg-[center_right_10px] bg-no-repeat p-2 pr-5 text-sm focus:border-blue-500 focus:ring-blue-500")},e.map(l=>React.createElement("option",{key:l.value,value:l.value},l.label)))),p=U;var J=({gvk:t})=>React.createElement(React.Fragment,null,React.createElement("div",{className:"text-xs text-gray-400"},t.api_version),React.createElement("div",{className:"text-sm"},t.kind)),N=J;var V=({initialAttrs:t,ctx:o})=>{let[e,s]=y(o,t),a=e.result_types[e.request_type];return React.createElement(React.Fragment,null,!e.connection&&React.createElement(x,null),React.createElement("div",{className:"rounded-md border border-solid border-gray-300 font-inter font-medium text-gray-600"},React.createElement("div",{className:"border-b-solid flex gap-x-5 gap-y-3 border-b border-b-gray-300 bg-blue-100 p-3"},React.createElement(p,{name:"connection",label:"Connection",options:e.connections.map(r=>({label:r.variable,value:r.variable})),selectedOption:e.connection?.variable?.toString(),onChange:s("connection"),orientation:"horiz"}),React.createElement(p,{name:"request_type",label:"Request Type",options:e.request_types.map(r=>({label:r.toUpperCase(),value:r})),selectedOption:e.request_type,onChange:s("request_type"),orientation:"horiz"}),a&&React.createElement(p,{name:"result_type",label:"Result Type",options:a.map(r=>({label:r.toUpperCase(),value:r})),selectedOption:e.result_type,onChange:s("result_type"),orientation:"horiz"}),React.createElement(S,{label:"Assign To",name:"assign_to",defaultValue:e.result_variable,onChange:s("result_variable"),orientation:"horiz"})),React.createElement("div",{className:"flex gap-x-5 p-3"},e.connection&&React.createElement(T,{className:"max-w-full",name:"gvk",label:"Resource Kind",onSearch:s("search_term"),searchTerm:e.search_term,resultItemsKeyField:"index",resultItems:e.search_result_items,onSelect:s("gvk"),itemRenderer:r=>React.createElement(N,{gvk:r}),selectedValue:e.gvk?.kind,placeholder:"apps/v1 Deployment"}),e.namespaces&&React.createElement(p,{name:"namespace",label:"Namespace",options:e.namespaces.map(r=>({label:r,value:r})),selectedOption:e.namespace,onChange:s("namespace")}),e.resources&&React.createElement(p,{name:"resource",label:"Resource Name",options:e.resources.map(r=>({label:r,value:r})),selectedOption:e.resource,onChange:s("resource")}))))},A=V;var de=async(t,o)=>{await h(t,o),t.root.innerHTML="loading...",t.importCSS("main.css"),t.importCSS("https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap");let e=ReactDOM.createRoot(t.root);if(o.error)return e.render(React.createElement(v,{message:o.error}));e.render(React.createElement(A,{initialAttrs:o,ctx:t}))};export{de as init}; /*! Bundled license information: classnames/index.js: @@ -8,4 +8,3 @@ classnames/index.js: http://jedwatson.github.io/classnames *) */ -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vbm9kZV9tb2R1bGVzL2NsYXNzbmFtZXMvaW5kZXguanMiLCAiLi4vLi4vLi4vYXNzZXRzL3NoYXJlZC9lcnJvci50c3giLCAiLi4vLi4vLi4vYXNzZXRzL3NoYXJlZC91dGlscy50cyIsICIuLi8uLi8uLi9hc3NldHMvc2hhcmVkL2F0dHJfc3RhdGUudHN4IiwgIi4uLy4uLy4uL2Fzc2V0cy9zaGFyZW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bHRfdHlwZVwiXG4gICAgICAgICAgICAgIGxhYmVsPVwiUmVzdWx0IFR5cGVcIlxuICAgICAgICAgICAgICBvcHRpb25zPXtyZXN1bHRfdHlwZXMubWFwKChyZXN1bHRfdHlwZSkgPT4gKHtcbiAgICAgICAgICAgICAgICBsYWJlbDogcmVzdWx0X3R5cGUudG9VcHBlckNhc2UoKSxcbiAgICAgICAgICAgICAgICB2YWx1ZTogcmVzdWx0X3R5cGUsXG4gICAgICAgICAgICAgIH0pKX1cbiAgICAgICAgICAgICAgc2VsZWN0ZWRPcHRpb249e2F0dHJzLnJlc3VsdF90eXBlfVxuICAgICAgICAgICAgICBvbkNoYW5nZT17dXBkYXRlQXR0cigncmVzdWx0X3R5cGUnKX1cbiAgICAgICAgICAgICAgb3JpZW50YXRpb249XCJob3JpelwiXG4gICAgICAgICAgICAvPlxuICAgICAgICAgICl9XG4gICAgICAgICAgPElucHV0XG4gICAgICAgICAgICBsYWJlbD1cIkFzc2lnbiBUb1wiXG4gICAgICAgICAgICBuYW1lPVwiYXNzaWduX3RvXCJcbiAgICAgICAgICAgIGRlZmF1bHRWYWx1ZT17YXR0cnMucmVzdWx0X3ZhcmlhYmxlfVxuICAgICAgICAgICAgb25DaGFuZ2U9e3VwZGF0ZUF0dHIoJ3Jlc3VsdF92YXJpYWJsZScpfVxuICAgICAgICAgICAgb3JpZW50YXRpb249XCJob3JpelwiXG4gICAgICAgICAgLz5cbiAgICAgICAgPC9kaXY+XG4gICAgICAgIDxkaXYgY2xhc3NOYW1lPVwiZmxleCBnYXAteC01IHAtM1wiPlxuICAgICAgICAgIHthdHRycy5jb25uZWN0aW9uICYmIChcbiAgICAgICAgICAgIDxTZWFyY2hTZWxlY3Q8R1ZLPlxuICAgICAgICAgICAgICBjbGFzc05hbWU9XCJtYXgtdy1mdWxsXCJcbiAgICAgICAgICAgICAgbmFtZT1cImd2a1wiXG4gICAgICAgICAgICAgIGxhYmVsPVwiUmVzb3VyY2UgS2luZFwiXG4gICAgICAgICAgICAgIG9uU2VhcmNoPXt1cGRhdGVBdHRyKCdzZWFyY2hfdGVybScpfVxuICAgICAgICAgICAgICBzZWFyY2hUZXJtPXthdHRycy5zZWFyY2hfdGVybX1cbiAgICAgICAgICAgICAgcmVzdWx0SXRlbXNLZXlGaWVsZD17J2luZGV4J31cbiAgICAgICAgICAgICAgcmVzdWx0SXRlbXM9e2F0dHJzLnNlYXJjaF9yZXN1bHRfaXRlbXN9XG4gICAgICAgICAgICAgIG9uU2VsZWN0PXt1cGRhdGVBdHRyKCdndmsnKX1cbiAgICAgICAgICAgICAgaXRlbVJlbmRlcmVyPXsoaXRlbTogR1ZLKSA9PiA8R1ZLT3B0aW9uIGd2az17aXRlbX0gLz59XG4gICAgICAgICAgICAgIHNlbGVjdGVkVmFsdWU9e2F0dHJzLmd2az8ua2luZH1cbiAgICAgICAgICAgICAgcGxhY2Vob2xkZXI9XCJhcHBzL3YxIERlcGxveW1lbnRcIlxuICAgICAgICAgICAgLz5cbiAgICAgICAgICApfVxuICAgICAgICAgIHthdHRycy5uYW1lc3BhY2VzICYmIChcbiAgICAgICAgICAgIDxTZWxlY3RcbiAgICAgICAgICAgICAgbmFtZT1cIm5hbWVzcGFjZVwiXG4gICAgICAgICAgICAgIGxhYmVsPVwiTmFtZXNwYWNlXCJcbiAgICAgICAgICAgICAgb3B0aW9ucz17YXR0cnMubmFtZXNwYWNlcy5tYXAoKG5zKSA9PiAoe1xuICAgICAgICAgICAgICAgIGxhYmVsOiBucyxcbiAgICAgICAgICAgICAgICB2YWx1ZTogbnMsXG4gICAgICAgICAgICAgIH0pKX1cbiAgICAgICAgICAgICAgc2VsZWN0ZWRPcHRpb249e2F0dHJzLm5hbWVzcGFjZX1cbiAgICAgICAgICAgICAgb25DaGFuZ2U9e3VwZGF0ZUF0dHIoJ25hbWVzcGFjZScpfVxuICAgICAgICAgICAgLz5cbiAgICAgICAgICApfVxuICAgICAgICAgIHthdHRycy5yZXNvdXJjZXMgJiYgKFxuICAgICA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iLCAic2VsZWN0X2RlZmF1bHQiLCAiY29ubmVjdGlvbiIsICJyZXF1ZXN0X3R5cGUiLCAicmVzdWx0X3R5cGUiLCAiaW5wdXRfZGVmYXVsdCIsICJzZWFyY2hfc2VsZWN0X2RlZmF1bHQiLCAiaXRlbSIsICJndmtfb3B0aW9uX2RlZmF1bHQiLCAibnMiLCAiYXBwX2RlZmF1bHQiLCAiaW5pdCIsICJjdHgiLCAiYXR0cnMiLCAibG9hZFJlYWN0IiwgInJvb3QiLCAiZXJyb3JfZGVmYXVsdCIsICJhcHBfZGVmYXVsdCJdCn0K diff --git a/lib/assets/kino_terminal/main.js b/lib/assets/kino_terminal/main.js index 5eca2bf..a2d3a89 100644 --- a/lib/assets/kino_terminal/main.js +++ b/lib/assets/kino_terminal/main.js @@ -3,4 +3,3 @@ async function o(n,r){await n.importCSS("https://cdn.jsdelivr.net/npm/xterm@5.0.
`;let i=n.root.querySelector(".k8s-xtermjs-container");if(i){let t=new Terminal({convertEol:!0});t.onKey(({key:e})=>n.pushEvent("key",e)),t.open(i),n.handleEvent("print-terminal",e=>t.write(e)),n.handleEvent("dispose-terminal",()=>t.dispose()),t.write(r.buffer)}}export{o as init}; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vYXNzZXRzL2tpbm9fdGVybWluYWwvbWFpbi50cyJdLAogICJzb3VyY2VzQ29udGVudCI6IFsiaW1wb3J0IHsgS2lub0NvbnRleHQgfSBmcm9tICcuLi9raW5vJ1xuaW1wb3J0IHsgS2lub1Rlcm1pbmFsQXR0cnMgfSBmcm9tICcuL3R5cGVzJ1xuXG5leHBvcnQgYXN5bmMgZnVuY3Rpb24gaW5pdChjdHg6IEtpbm9Db250ZXh0LCBhdHRyczogS2lub1Rlcm1pbmFsQXR0cnMpIHtcbiAgYXdhaXQgY3R4LmltcG9ydENTUyhcbiAgICAnaHR0cHM6Ly9jZG4uanNkZWxpdnIubmV0L25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NBLE1BQU1BLEVBQUksU0FDUiwyREFDRixFQUVBQSxFQUFJLEtBQUssVUFBWTtBQUFBO0FBQUE7QUFBQTtBQUFBLE1BTXJCLElBQU1FLEVBQWdCRixFQUFJLEtBQUssY0FDN0Isd0JBQ0YsRUFFQSxHQUFJRSxFQUFlLENBQ2pCLElBQU1DLEVBQVksSUFBSSxTQUFTLENBQUUsV0FBWSxFQUFLLENBQUMsRUFDbkRBLEVBQVUsTUFBTSxDQUFDLENBQUUsSUFBQUMsQ0FBSSxJQUFNSixFQUFJLFVBQVUsTUFBT0ksQ0FBRyxDQUFDLEVBQ3RERCxFQUFVLEtBQUtELENBQWEsRUFDNUJGLEVBQUksWUFBWSxpQkFBbUJLLEdBQWlCRixFQUFVLE1BQU1FLENBQUksQ0FBQyxFQUN6RUwsRUFBSSxZQUFZLG1CQUFvQixJQUFNRyxFQUFVLFFBQVEsQ0FBQyxFQUM3REEsRUFBVSxNQUFNRixFQUFNLE1BQU0sQ0FDOUIsQ0FDRiIsCiAgIm5hbWVzIjogWyJpbml0IiwgImN0eCIsICJhdHRycyIsICJyb290Q29udGFpbmVyIiwgIms4c194dGVybSIsICJrZXkiLCAiZGF0YSJdCn0K diff --git a/lib/assets/terminal_cell/main.js b/lib/assets/terminal_cell/main.js index 27d927f..b4784ea 100644 --- a/lib/assets/terminal_cell/main.js +++ b/lib/assets/terminal_cell/main.js @@ -1,4 +1,4 @@ -var x=Object.create;var m=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var C=Object.getPrototypeOf,T=Object.prototype.hasOwnProperty;var S=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var N=(e,r,t,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of A(r))!T.call(e,o)&&o!==t&&m(e,o,{get:()=>r[o],enumerable:!(a=y(r,o))||a.enumerable});return e};var j=(e,r,t)=>(t=e!=null?x(C(e)):{},N(r||!e||!e.__esModule?m(t,"default",{value:e,enumerable:!0}):t,e));var g=S((J,c)=>{(function(){"use strict";var e={}.hasOwnProperty,r="[native code]";function t(){for(var a=[],o=0;oReact.createElement(React.Fragment,null,React.createElement("div",{className:"flex rounded-md border border-dashed border-red-700 bg-red-100 p-2"},React.createElement("svg",{className:"h-6 w-6 flex-none text-red-700",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},React.createElement("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})),React.createElement("div",{className:"font-inter px-2 text-sm font-medium text-red-700"},e))),u=w;var f=async e=>{await e.importJS("https://cdnjs.cloudflare.com/ajax/libs/react/18.2.0/umd/react.development.js"),await e.importJS("https://cdnjs.cloudflare.com/ajax/libs/react-dom/18.2.0/umd/react-dom.development.js")};var P=(e,r)=>{let[t,a]=React.useState(r),o=n=>s=>{a(i=>({...i,[n]:s})),console.log("Pushing ${attrName} to server",s),e.pushEvent(`update_${n}`,s)};return React.useEffect(()=>{e.handleEvent("update",n=>{console.log("Attribute update from server",n),a(s=>({...Object.assign(s,n)}))})},[]),[t,o]},b=P;var O=()=>React.createElement("div",{className:"mb-5 rounded-md bg-gray-100 p-4 font-inter text-sm font-medium text-gray-500"},React.createElement("p",null,"To make requests to the Kubernetes cluster, you need at least one connection to a cluster."),React.createElement("p",{className:"pt-1"},"To create a cluster connection, you can add the"," ",React.createElement("span",{className:"text-gray-600"},"Cluster Connection")," smart cell.")),v=O;var p=j(g()),K=({name:e,label:r,options:t,selectedOption:a,onChange:o,className:n="",orientation:s="vert"})=>React.createElement("div",{className:(0,p.default)({"flex flex-row items-baseline":s=="horiz"},n)},React.createElement("label",{htmlFor:e,className:(0,p.default)({block:s=="vert","pr-1 uppercase":s=="horiz"},"mb-1 text-sm font-medium")},r),React.createElement("select",{id:e,value:a||void 0,onChange:i=>o(i.target.value),className:(0,p.default)({"block w-full":s=="vert"}," bg-caret-down appearance-none rounded-lg border border-gray-300 bg-gray-50 bg-[length:10px] bg-[center_right_10px] bg-no-repeat p-2 pr-5 text-sm focus:border-blue-500 focus:ring-blue-500")},t.map(i=>React.createElement("option",{key:i.value,value:i.value},i.label)))),l=K;var E=({initialAttrs:e,ctx:r})=>{let[t,a]=b(r,e);return React.createElement(React.Fragment,null,!t.connection&&React.createElement(v,null),React.createElement("div",{className:"rounded-md border border-solid border-gray-300 font-inter font-medium text-gray-600"},React.createElement("div",{className:"border-b-solid flex gap-x-5 gap-y-3 border-b border-b-gray-300 bg-blue-100 p-3"},React.createElement(l,{name:"connection",label:"Connection",options:t.connections.map(o=>({label:o.variable,value:o.variable})),selectedOption:t.connection?.variable?.toString(),onChange:a("connection"),orientation:"horiz"}),React.createElement(l,{name:"connect_to",label:"connect_to",options:t.connect_tos.map(o=>({label:o,value:o})),selectedOption:t.connect_to?.toString(),onChange:a("connect_to"),orientation:"horiz"})),React.createElement("div",{className:"flex gap-x-5 p-3"},t.namespaces&&React.createElement(l,{name:"namespace",label:"Namespace",options:t.namespaces.map(o=>({label:o,value:o})),selectedOption:t.namespace,onChange:a("namespace")}),t.pods&&React.createElement(l,{name:"pod",label:"Pod Name",options:t.pods.map(o=>({label:o,value:o})),selectedOption:t.pod,onChange:a("pod")}),t.containers&&React.createElement(l,{name:"container",label:"Container Name",options:t.containers.map(o=>({label:o,value:o})),selectedOption:t.container,onChange:a("container")}))))},h=E;var G=async(e,r)=>{await f(e,r),e.root.innerHTML="loading...",e.importCSS("main.css"),e.importCSS("https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap");let t=ReactDOM.createRoot(e.root);if(r.error)return t.render(React.createElement(u,{message:r.error}));t.render(React.createElement(h,{initialAttrs:r,ctx:e}))};export{G as init}; +var x=Object.create;var m=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var C=Object.getPrototypeOf,T=Object.prototype.hasOwnProperty;var S=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var N=(e,r,t,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of A(r))!T.call(e,o)&&o!==t&&m(e,o,{get:()=>r[o],enumerable:!(a=y(r,o))||a.enumerable});return e};var j=(e,r,t)=>(t=e!=null?x(C(e)):{},N(r||!e||!e.__esModule?m(t,"default",{value:e,enumerable:!0}):t,e));var g=S((J,c)=>{(function(){"use strict";var e={}.hasOwnProperty,r="[native code]";function t(){for(var a=[],o=0;oReact.createElement(React.Fragment,null,React.createElement("div",{className:"flex rounded-md border border-dashed border-red-700 bg-red-100 p-2"},React.createElement("svg",{className:"h-6 w-6 flex-none text-red-700",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},React.createElement("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})),React.createElement("div",{className:"font-inter px-2 text-sm font-medium text-red-700"},e))),u=w;var f=async e=>{await e.importJS("https://cdnjs.cloudflare.com/ajax/libs/react/18.2.0/umd/react.production.min.js"),await e.importJS("https://cdnjs.cloudflare.com/ajax/libs/react-dom/18.2.0/umd/react-dom.production.min.js")};var P=(e,r)=>{let[t,a]=React.useState(r),o=n=>s=>{a(i=>({...i,[n]:s})),console.log("Pushing ${attrName} to server",s),e.pushEvent(`update_${n}`,s)};return React.useEffect(()=>{e.handleEvent("update",n=>{console.log("Attribute update from server",n),a(s=>({...Object.assign(s,n)}))})},[]),[t,o]},b=P;var O=()=>React.createElement("div",{className:"mb-5 rounded-md bg-gray-100 p-4 font-inter text-sm font-medium text-gray-500"},React.createElement("p",null,"To make requests to the Kubernetes cluster, you need at least one connection to a cluster."),React.createElement("p",{className:"pt-1"},"To create a cluster connection, you can add the"," ",React.createElement("span",{className:"text-gray-600"},"Cluster Connection")," smart cell.")),v=O;var p=j(g()),K=({name:e,label:r,options:t,selectedOption:a,onChange:o,className:n="",orientation:s="vert"})=>React.createElement("div",{className:(0,p.default)({"flex flex-row items-baseline":s=="horiz"},n)},React.createElement("label",{htmlFor:e,className:(0,p.default)({block:s=="vert","pr-1 uppercase":s=="horiz"},"mb-1 text-sm font-medium")},r),React.createElement("select",{id:e,value:a||void 0,onChange:i=>o(i.target.value),className:(0,p.default)({"block w-full":s=="vert"}," bg-caret-down appearance-none rounded-lg border border-gray-300 bg-gray-50 bg-[length:10px] bg-[center_right_10px] bg-no-repeat p-2 pr-5 text-sm focus:border-blue-500 focus:ring-blue-500")},t.map(i=>React.createElement("option",{key:i.value,value:i.value},i.label)))),l=K;var E=({initialAttrs:e,ctx:r})=>{let[t,a]=b(r,e);return React.createElement(React.Fragment,null,!t.connection&&React.createElement(v,null),React.createElement("div",{className:"rounded-md border border-solid border-gray-300 font-inter font-medium text-gray-600"},React.createElement("div",{className:"border-b-solid flex gap-x-5 gap-y-3 border-b border-b-gray-300 bg-blue-100 p-3"},React.createElement(l,{name:"connection",label:"Connection",options:t.connections.map(o=>({label:o.variable,value:o.variable})),selectedOption:t.connection?.variable?.toString(),onChange:a("connection"),orientation:"horiz"}),React.createElement(l,{name:"connect_to",label:"connect_to",options:t.connect_tos.map(o=>({label:o,value:o})),selectedOption:t.connect_to?.toString(),onChange:a("connect_to"),orientation:"horiz"})),React.createElement("div",{className:"flex gap-x-5 p-3"},t.namespaces&&React.createElement(l,{name:"namespace",label:"Namespace",options:t.namespaces.map(o=>({label:o,value:o})),selectedOption:t.namespace,onChange:a("namespace")}),t.pods&&React.createElement(l,{name:"pod",label:"Pod Name",options:t.pods.map(o=>({label:o,value:o})),selectedOption:t.pod,onChange:a("pod")}),t.containers&&React.createElement(l,{name:"container",label:"Container Name",options:t.containers.map(o=>({label:o,value:o})),selectedOption:t.container,onChange:a("container")}))))},h=E;var G=async(e,r)=>{await f(e,r),e.root.innerHTML="loading...",e.importCSS("main.css"),e.importCSS("https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap");let t=ReactDOM.createRoot(e.root);if(r.error)return t.render(React.createElement(u,{message:r.error}));t.render(React.createElement(h,{initialAttrs:r,ctx:e}))};export{G as init}; /*! Bundled license information: classnames/index.js: @@ -8,4 +8,3 @@ classnames/index.js: http://jedwatson.github.io/classnames *) */ -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vbm9kZV9tb2R1bGVzL2NsYXNzbmFtZXMvaW5kZXguanMiLCAiLi4vLi4vLi4vYXNzZXRzL3NoYXJlZC9lcnJvci50c3giLCAiLi4vLi4vLi4vYXNzZXRzL3NoYXJlZC91dGlscy50cyIsICIuLi8uLi8uLi9hc3NldHMvc2hhcmVkL2F0dHJfc3RhdGUudHN4IiwgIi4uLy4uLy4uL2Fzc2V0cy9zaGFyZWQvY29ubl9ub3RpY2UudHN4IiwgIi4uLy4uLy4uL2Fzc2V0cy9zaGFyZWQvZm9ybS9zZWxlY3QudHN4IiwgIi4uLy4uLy4uL2Fzc2V0cy90ZXJtaW5hbF9jZWxsL2FwcC50c3giLCAiLi4vLi4vLi4vYXNzZXRzL3Rlcm1pbmFsX2NlbGwvbWFpbi50c3giXSwKICAic291cmNlc0NvbnRlbnQiOiBbIi8qIVxuXHRDb3B5cmlnaHQgKGMpIDIwMTggSmVkIFdhdHNvbi5cblx0TGljZW5zZWQgdW5kZXIgdGhlIE1JVCBMaWNlbnNlIChNSVQpLCBzZWVcblx0aHR0cDovL2plZHdhdHNvbi5naXRodWIuaW8vY2xhc3NuYW1lc1xuKi9cbi8qIGdsb2JhbCBkZWZpbmUgKi9cblxuKGZ1bmN0aW9uICgpIHtcblx0J3VzZSBzdHJpY3QnO1xuXG5cdHZhciBoYXNP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ZW50YXRpb249XCJob3JpelwiXG4gICAgICAgICAgLz5cbiAgICAgICAgICA8U2VsZWN0XG4gICAgICAgICAgICBuYW1lPVwiY29ubmVjdF90b1wiXG4gICAgICAgICAgICBsYWJlbD1cImNvbm5lY3RfdG9cIlxuICAgICAgICAgICAgb3B0aW9ucz17YXR0cnMuY29ubmVjdF90b3MubWFwKChjb25uZWN0X3RvKSA9PiAoe1xuICAgICAgICAgICAgICBsYWJlbDogY29ubmVjdF90byxcbiAgICAgICAgICAgICAgdmFsdWU6IGNvbm5lY3RfdG8sXG4gICAgICAgICAgICB9KSl9XG4gICAgICAgICAgICBzZWxlY3RlZE9wdGlvbj17YXR0cnMuY29ubmVjdF90bz8udG9TdHJpbmcoKX1cbiAgICAgICAgICAgIG9uQ2hhbmdlPXt1cGRhdGVBdHRyKCdjb25uZWN0X3RvJyl9XG4gICAgICAgICAgICBvcmllbnRhdGlvbj1cImhvcml6XCJcbiAgICAgICAgICAvPlxuICAgICAgICA8L2Rpdj5cbiAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJmbGV4IGdhcC14LTUgcC0zXCI+XG4gICAgICAgICAge2F0dHJzWyduYW1lc3BhY2VzJ10gJiYgKFxuICAgICAgICAgICAgPFNlbGVjdFxuICAgICAgICAgICAgICBuYW1lPVwibmFtZXNwYWNlXCJcbiAgICAgICAgICAgICAgbGFiZWw9XCJOYW1lc3BhY2VcIlxuICAgICAgICAgICAgICBvcHRpb25zPXthdHRycy5uYW1lc3BhY2VzLm1hcCgobnMpID0+ICh7XG4gICAgICAgICAgICAgICAgbGFiZWw6IG5zLFxuICAgICAgICAgICAgICAgIHZhbHVlOiBucyxcbiAgICAgICAgICAgICAgfSkpfVxuICAgICAgICAgICAgICBzZWxlY3RlZE9wdGlvbj17YXR0cnNbJ25hbWVzcGFjZSddfVxuICAgICAgICAgICAgICBvbkNoYW5nZT17dXBkYXRlQXR0cignbmFtZXNwYWNlJyl9XG4gICAgICAgICAgICAvPlxuICAgICAgICAgICl9XG4gICAgICAgICAge2F0dHJzLnBvZHMgJiYgKFxuICAgICAgICAgICAgPFNlbGVjdFxuICAgICAgICAgICAgICBuYW1lPVwicG9kXCJcbiAgICAgICAgICAgICAgbGFiZWw9XCJQb2QgTmFtZVwiXG4gICAgICAgICAgICAgIG9wdGlvbnM9e2F0dHJzLnBvZHMubWFwKChucykgPT4gKHtcbiAgICAgICAgICAgICAgICBsYWJlbDogbnMsXG4gICAgICAgICAgICAgICAgdmFsdWU6IG5zLFxuICAgICAgICAgICAgICB9KSl9XG4gICAgICAgICAgICAgIHNlbGVjdGVkT3B0aW9uPXthdHRyc1sncG9kJ119XG4gICAgICAgICAgICAgIG9uQ2hhbmdlPXt1cGRhdGVBdHRyKCdwb2QnKX1cbiAgICAgICAgICAgIC8+XG4gICAgICAgICAgKX1cbiAgICAgICAgICB7YXR0cnMuY29udGFpbmVycyAmJiAoXG4gICAgICAgICAgICA8U2VsZWN0XG4gICAgICAgICAgICAgIG5hbWU9XCJjb250YWluZXJcIlxuICAgICAgICAgICAgICBsYWJlbD1cIkNvbnRhaW5lciBOYW1lXCJcbiAgICAgICAgICAgICAgb3B0aW9ucz17YXR0cnMuY29udGFpbmVycy5tYXAoKG5zKSA9PiAoe1xuICAgICAgICAgICAgICAgIGxhYmVsOiBucyxcbiAgICAgICAgICAgICAgICB2YWx1ZTogbnMsXG4gICAgICAgICAgICAgIH0pKX1cbiAgICAgICAgICAgICAgc2VsZWN0ZWRPcHRpb249e2F0dHJzWydjb250YWluZXInXX1cbiAgICAgICAgICAgICAgb25DaGFuZ2U9e3VwZGF0ZUF0dHIoJ2NvbnRhaW5lcicpfVxuICAgICAgICAgICAgLz5cbiAgICAgICAgICApfVxuICAgICAgICA8L2Rpdj5cbiAgICAgIDwvZGl2PlxuICAgIDwvPlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IEFwcFxuIiwgImltcG9ydCB7IEtpbm9Db250ZXh0IH0gZnJvbSAnLi4va2lubydcbmltcG9ydCBFcn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RyTmFtZSIsICJhdHRyVmFsdWUiLCAidXBkYXRlcyIsICJhdHRyX3N0YXRlX2RlZmF1bHQiLCAiQ29ubk5vdGljZSIsICJjb25uX25vdGljZV9kZWZhdWx0IiwgImltcG9ydF9jbGFzc25hbWVzIiwgIlNlbGVjdCIsICJuYW1lIiwgImxhYmVsIiwgIm9wdGlvbnMiLCAic2VsZWN0ZWRPcHRpb24iLCAib25DaGFuZ2UiLCAiY2xhc3NOYW1lIiwgIm9yaWVudGF0aW9uIiwgImNsYXNzTmFtZXMiLCAiZSIsICJvcHRpb24iLCAic2VsZWN0X2RlZmF1bHQiLCAiQXBwIiwgImluaXRpYWxBdHRycyIsICJjdHgiLCAiYXR0cnMiLCAidXBkYXRlQXR0ciIsICJhdHRyX3N0YXRlX2RlZmF1bHQiLCAiY29ubl9ub3RpY2VfZGVmYXVsdCIsICJzZWxlY3RfZGVmYXVsdCIsICJjb25uZWN0aW9uIiwgImNvbm5lY3RfdG8iLCAibnMiLCAiYXBwX2RlZmF1bHQiLCAiaW5pdCIsICJjdHgiLCAiYXR0cnMiLCAibG9hZFJlYWN0IiwgInJvb3QiLCAiZXJyb3JfZGVmYXVsdCIsICJhcHBfZGVmYXVsdCJdCn0K diff --git a/lib/kino_k8s.ex b/lib/kino_k8s.ex index 7f3d72d..df9c2db 100644 --- a/lib/kino_k8s.ex +++ b/lib/kino_k8s.ex @@ -1,3 +1,5 @@ -defmodule KinoK8s do - @moduledoc false +defimpl Kino.Render, for: K8s.Conn do + def to_livebook(conn) do + conn |> Kino.Tree.new() |> Kino.Render.to_livebook() + end end diff --git a/lib/kino_k8s/apply_cell.ex b/lib/kino_k8s/apply_cell.ex index 7e984ea..9f97512 100644 --- a/lib/kino_k8s/apply_cell.ex +++ b/lib/kino_k8s/apply_cell.ex @@ -126,7 +126,11 @@ defmodule KinoK8s.ApplyCell do |> K8s.Client.put_conn(unquote(quoted_var(connection.variable))) |> K8s.Client.run() - unquote(quoted_var(result_variable)) |> Ymlr.document!() |> IO.puts() + Kino.Markdown.new(""" + ```yaml + #{Ymlr.document!(unquote(quoted_var(result_variable)))} + ``` + """) end |> Kino.SmartCell.quoted_to_string() else diff --git a/lib/kino_k8s/connection_cell.ex b/lib/kino_k8s/connection_cell.ex index fc9e83e..36eacfd 100644 --- a/lib/kino_k8s/connection_cell.ex +++ b/lib/kino_k8s/connection_cell.ex @@ -57,7 +57,10 @@ defmodule KinoK8s.ConnectionCell do end Kino.SmartCell.quoted_to_string( - quote do: {:ok, unquote(quoted_var(result_variable))} = unquote(expr) + quote do + {:ok, unquote(quoted_var(result_variable))} = unquote(expr) + unquote(quoted_var(result_variable)) + end ) else "" @@ -67,7 +70,7 @@ defmodule KinoK8s.ConnectionCell do @impl true def scan_eval_result(_server, nil), do: :ok - def scan_eval_result(_server, {:ok, {:ok, conn}}) do + def scan_eval_result(_server, {:ok, conn}) do ResourceGVKCache.init_cache(conn) end diff --git a/lib/kino_k8s/get_cell.ex b/lib/kino_k8s/get_cell.ex index 1fad25f..7e4af16 100644 --- a/lib/kino_k8s/get_cell.ex +++ b/lib/kino_k8s/get_cell.ex @@ -184,7 +184,11 @@ defmodule KinoK8s.GetCell do |> K8s.Client.put_conn(unquote(quoted_var(connection.variable))) |> K8s.Client.run() - unquote(quoted_var(result_variable)) |> Ymlr.document!() |> IO.puts() + Kino.Markdown.new(""" + ```yaml + #{Ymlr.document!(unquote(quoted_var(result_variable)))} + ``` + """) end |> Kino.SmartCell.quoted_to_string() else @@ -240,7 +244,7 @@ defmodule KinoK8s.GetCell do |> K8s.Client.put_conn(unquote(quoted_var(connection.variable))) |> K8s.Client.unquote(run_method)() - unquote(quoted_var(result_variable)) + Kino.Tree.new(unquote(quoted_var(result_variable))) end |> Kino.SmartCell.quoted_to_string() else