"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[886],{83673(K,x,t){t.d(x,{A:()=>ie});var e=t(74848),s=t(22803),c=t(96540),i=t(92745),p=t(63142),v=t(34999),a=t(41654),E=t(33680),B=t(94726),d=t(66404),m=t(31286),f=t(45861),I=t(6773),O=t(30703);const M=({icon:n,color:r})=>{const o=(0,p.of)(L,r);return(0,e.jsx)("div",{className:o.iconCircle,children:(0,e.jsx)(O.I,{name:n,size:"xl"})})};function L(n,r){const o=n.visualization.getColorByName(r);return{iconCircle:(0,s.css)({borderRadius:n.shape.radius.circle,padding:n.spacing(1),color:o,backgroundColor:I.MV.alpha(o,.2)})}}const P=({hasPublicAccess:n,hasImageRenderer:r,onSetupPublicAccess:o})=>{const l=(0,p.of)(R);return(0,e.jsxs)(a.B,{direction:"column",gap:5,children:[(0,e.jsxs)(a.B,{direction:"column",children:[(0,e.jsx)(d.E,{variant:"h4",children:(0,e.jsx)(i.x6,{i18nKey:"provisioning.enhanced-features.header",children:"Enhance your GitHub experience"})}),(0,e.jsx)(d.E,{color:"secondary",children:(0,e.jsx)(i.x6,{i18nKey:"provisioning.enhanced-features.description",children:"Get the most out of your GitHub integration with these optional add-ons"})})]}),(0,e.jsxs)(a.B,{gap:2,direction:"row",height:"100%",children:[(0,e.jsxs)(m.a,{width:"40%",height:"100%",display:"flex",direction:"column",gap:2,alignItems:"flex-start",children:[(0,e.jsxs)(a.B,{gap:2,children:[(0,e.jsx)(M,{icon:"sync",color:"blue"}),(0,e.jsx)(M,{icon:"code-branch",color:"purple"})]}),(0,e.jsx)(i.x6,{i18nKey:"provisioning.enhanced-features.title-instant-updates-requests-webhooks",children:"Instant updates and pull requests with webhooks."}),(0,e.jsx)(m.a,{display:"flex",flex:"1",minHeight:"50px",children:(0,e.jsx)(d.E,{variant:"body",color:"secondary",children:(0,e.jsx)(i.x6,{i18nKey:"provisioning.enhanced-features.description-instant-updates",children:"Get instant updates in Grafana as soon as changes are committed. Review and approve changes using pull requests before they go live."})})}),(0,e.jsx)(f.z9,{fill:"outline",variant:"secondary",onClick:o,disabled:n,icon:n?"check":void 0,children:(0,e.jsx)(i.x6,{i18nKey:"provisioning.enhanced-features.set-up-public-webhooks",children:"Set up public webhooks"})})]}),(0,e.jsx)("div",{className:l.separator}),(0,e.jsxs)(m.a,{width:"40%",height:"100%",paddingLeft:2,display:"flex",direction:"column",gap:2,alignItems:"flex-start",children:[(0,e.jsx)(M,{icon:"camera",color:"orange"}),(0,e.jsx)(i.x6,{i18nKey:"provisioning.enhanced-features.title-visual-previews-in-pull-requests",children:"Visual previews in pull requests with image rendering"}),(0,e.jsx)(m.a,{display:"flex",flex:"1",minHeight:"50px",children:(0,e.jsx)(d.E,{variant:"body",color:"secondary",children:(0,e.jsx)(i.x6,{i18nKey:"provisioning.enhanced-features.description-visual-previews-dashboard-updates-directly-requests",children:"See visual previews of dashboard updates directly in pull requests"})})}),(0,e.jsx)(f.z9,{fill:"outline",variant:"secondary",href:"https://grafana.com/grafana/plugins/grafana-image-renderer/",icon:r?"check":"external-link-alt",disabled:r,children:(0,e.jsx)(i.x6,{i18nKey:"provisioning.enhanced-features.set-up-image-rendering",children:"Set up image rendering"})})]})]})]})};function R(n){return{separator:(0,s.css)({borderRight:`2px solid ${n.colors.border.weak}`})}}var A=t(3064);const U=({repos:n,hasRequiredFeatures:r,onSetupFeatures:o})=>{const l=(0,p.of)(G);return(0,e.jsxs)(a.B,{direction:"column",gap:3,children:[(0,e.jsx)(d.E,{variant:"h2",children:(0,e.jsx)(i.x6,{i18nKey:"provisioning.features-list.manage-your-dashboards-with-remote-provisioning",children:"Get started with GitSync"})}),(0,e.jsxs)("ul",{className:l.featuresList,children:[(0,e.jsx)("li",{children:(0,e.jsx)(i.x6,{i18nKey:"provisioning.features-list.manage-dashboards-provision-updates-automatically",children:"Manage dashboards as code in GitHub and provision updates automatically"})}),(0,e.jsx)("li",{children:(0,e.jsx)(i.x6,{i18nKey:"provisioning.features-list.store-dashboards-in-version-controlled-storage",children:"Store dashboards in version-controlled storage for better organization and history tracking"})})]}),r?(0,e.jsx)(a.B,{direction:"row",alignItems:"center",gap:2,children:(0,e.jsx)(A.N,{items:n})}):(0,e.jsx)(m.a,{children:(0,e.jsx)(f.z9,{fill:"outline",onClick:o,children:(0,e.jsx)(i.x6,{i18nKey:"provisioning.features-list.actions.set-up-required-feature-toggles",children:"Set up required feature toggles"})})})]})},G=n=>({featuresList:(0,s.css)({listStyleType:"none",paddingLeft:0,marginLeft:n.spacing(-1),"& li":{position:"relative",paddingLeft:n.spacing(4),marginBottom:n.spacing(1),"&:before":{content:'"\u2713"',position:"absolute",left:n.spacing(1),top:"0",color:n.colors.text.secondary,fontWeight:n.typography.fontWeightBold}}})});var W=t(22787),F=t(32881),N=t(47931),k=t(50992);const w=({code:n,copyCode:r=!0})=>{const o=n.split(`
`).length,l=o*24<=42,u=(0,p.of)($);return(0,e.jsxs)("div",{className:u.container,children:[r&&(0,e.jsx)(N.b,{className:u.copyButton,variant:"secondary",size:"sm",icon:"copy",getText:()=>n}),(0,e.jsx)(k.B,{value:n,language:"ini",showLineNumbers:!1,showMiniMap:!1,height:l?"42px":`${Math.min(o*24,300)}px`,readOnly:!0,monacoOptions:{scrollBeyondLastLine:!1,scrollbar:{vertical:l?"hidden":"auto",horizontal:"auto"}}})]})},$=n=>({container:(0,s.css)({position:"relative",margin:`${n.spacing(2)} 0`,border:`1px solid ${n.colors.border.medium}`}),copyButton:(0,s.css)({position:"absolute",top:n.spacing(1),right:n.spacing(1),zIndex:1})}),z=({step:n})=>(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(d.E,{element:"h3",variant:"h4",children:n?.title}),n.description&&(0,e.jsx)(F.mc,{margin:"sm",children:(0,e.jsx)(d.E,{element:"p",children:n.description})}),n.code&&(0,e.jsx)(w,{code:n.code,copyCode:n.copyCode})]});var H=t(8073),Y=t(76319);const V=({step:n,index:r,currentStep:o,onStepClick:l,styles:u})=>{const h=r<o,g=r===o,j=r>o,C=()=>h?{icon:"check-circle",color:"success",label:(0,i.t)("provisioning.sidebar-item.label-completed-step","Completed step")}:g?{icon:"circle",color:"primary",label:(0,i.t)("provisioning.sidebar-item.label-current-step","Current step")}:{icon:"circle",color:"secondary",label:(0,i.t)("provisioning.sidebar-item.label-pending-step","Pending step")},{icon:y,color:b,label:S}=C(),D=()=>l(r),T=oe=>{oe.stopPropagation(),l(r)};return(0,e.jsx)(H.Z,{className:`${u.stepItem} ${g?u.activeStep:""} ${u.plainCard}`,onClick:D,children:(0,e.jsxs)(a.B,{direction:"row",alignItems:"center",gap:2,children:[(0,e.jsx)(Y.K,{name:y,size:"sm",variant:j?"secondary":"primary",color:b,"aria-label":S,onClick:T}),(0,e.jsx)(d.E,{color:g?"primary":"secondary",weight:g?"medium":"regular",children:n})]})})},X=n=>({stepItem:(0,s.css)({padding:n.spacing(1),cursor:"pointer","&:hover":{background:n.colors.action.hover}}),activeStep:(0,s.css)({color:n.colors.primary.text}),plainCard:(0,s.css)({background:"transparent",border:"none",boxShadow:"none"})}),Z=({steps:n,currentStep:r,onStepClick:o})=>{if(n.length===0||n.length===1)return null;const l=(0,p.of)(X);return(0,e.jsx)(m.a,{width:"260px",padding:1,children:(0,e.jsx)(a.B,{direction:"column",gap:1,children:n.map((u,h)=>(0,e.jsx)(V,{step:u,index:h,currentStep:r,onStepClick:o,styles:l},h))})})},J=({title:n,description:r,steps:o,isOpen:l,onDismiss:u})=>{const h=(0,p.of)(Q),[g,j]=(0,c.useState)(0),C=g===0,y=g===o.length-1,b=o.map(T=>T.title),S=()=>!y&&j(g+1),D=()=>!C&&j(g-1);return(0,e.jsxs)(W.a,{isOpen:l,title:n,onDismiss:u,className:h.modal,children:[(0,e.jsxs)(a.B,{direction:"column",gap:4,children:[(0,e.jsx)(d.E,{variant:"body",color:"secondary",children:r}),(0,e.jsxs)(a.B,{direction:"row",height:"100%",children:[(0,e.jsx)(Z,{steps:b,currentStep:g,onStepClick:j}),(0,e.jsx)("div",{className:h.contentWrapper,children:(0,e.jsx)(z,{step:o[g]})})]})]}),(0,e.jsx)(W.a.ButtonRow,{children:(0,e.jsxs)(a.B,{direction:"row",justifyContent:"flex-end",gap:2,children:[(0,e.jsx)(f.$n,{variant:"secondary",onClick:D,disabled:C,children:(0,e.jsx)(i.x6,{i18nKey:"provisioning.setup-modal.previous",children:"Previous"})}),y?(0,e.jsx)(f.$n,{variant:"primary",onClick:u,icon:"check-circle",children:(0,e.jsx)(i.x6,{i18nKey:"provisioning.setup-modal.done",children:"Done"})}):(0,e.jsx)(f.$n,{variant:"primary",onClick:S,children:(0,e.jsx)(i.x6,{i18nKey:"provisioning.setup-modal.next",children:"Next"})})]})})]})},Q=n=>({modal:(0,s.css)({width:"1100px",maxWidth:"95%"}),description:(0,s.css)({marginBottom:n.spacing(3),padding:n.spacing(0,1)}),contentWrapper:(0,s.css)({flex:1,overflowY:"auto",minWidth:0,padding:n.spacing(2),borderLeft:`1px solid ${n.colors.border.weak}`}),footer:(0,s.css)({padding:n.spacing(2),borderTop:`1px solid ${n.colors.border.weak}`,marginTop:n.spacing(2)})});var _=t(53247);const q=`# In your custom.ini file

[feature_toggles]
provisioning = true
kubernetesDashboards = true ; use k8s from browser
`,ee=`ngrok http 3000

Help shape K8s Bindings https://ngrok.com/new-features-update?ref=k8s

Session Status                online
Account                       Roberto Jim\xE9nez S\xE1nchez (Plan: Free)
Version                       3.18.4
Region                        Europe (eu)
Latency                       44ms
Web Interface                 http://127.0.0.1:4040
Forwarding                    https://d60d-83-33-235-27.ngrok-free.app -> http://localhost:3000
Connections                   ttl     opn     rt1     rt5     p50     p90
                              50      2       0.00    0.00    83.03   90.56

HTTP Requests
-------------

09:18:46.147 CET             GET  /favicon.ico                   302 Found
09:18:46.402 CET             GET  /login`,ne=`[server]
root_url = https://d60d-83-33-235-27.ngrok-free.app`,te=n=>{switch(n){case"public-access":return{title:(0,i.t)("provisioning.getting-started.modal-title-set-up-public-access","Set up public access"),description:(0,i.t)("provisioning.getting-started.modal-description-public-access","Set up public access to your Grafana instance to enable GitHub integration"),steps:[{title:(0,i.t)("provisioning.getting-started.step-title-start-ngrok","Start ngrok for temporary public access"),description:(0,i.t)("provisioning.getting-started.step-description-start-ngrok","Run this command to create a secure tunnel to your local Grafana:"),code:"ngrok http 3000"},{title:(0,i.t)("provisioning.getting-started.step-title-copy-url","Copy your public URL"),description:(0,i.t)("provisioning.getting-started.step-description-copy-url","From the ngrok output, copy the https:// forwarding URL that looks like this:"),code:ee,copyCode:!1},{title:(0,i.t)("provisioning.getting-started.step-title-update-grafana-config","Update your Grafana configuration"),description:(0,i.t)("provisioning.getting-started.step-description-update-grafana-config","Add this to your custom.ini file, replacing the URL with your actual ngrok URL:"),code:ne}]};case"required-features":return{title:(0,i.t)("provisioning.getting-started.modal-title-set-up-required-features","Set up required features"),description:(0,i.t)("provisioning.getting-started.modal-description-required-features","Enable required Grafana features for provisioning"),steps:[{title:(0,i.t)("provisioning.getting-started.step-title-enable-feature-toggles","Enable Required Feature Toggles"),description:(0,i.t)("provisioning.getting-started.step-description-enable-feature-toggles","Add these settings to your custom.ini file to enable necessary features:"),code:q}]};default:return{title:"",description:"",steps:[]}}};function ie({items:n}){const r=(0,p.of)(se),o=(0,E.F9)(void 0,{refetchOnMountOrArgChange:!0}),l=o.data?.legacyStorage,u=!!o.data?.items?.length,{hasPublicAccess:h,hasImageRenderer:g,hasRequiredFeatures:j}=(0,_.NY)(),[C,y]=(0,c.useState)(!1),[b,S]=(0,c.useState)(null);return(0,e.jsxs)(e.Fragment,{children:[l&&(0,e.jsx)(v.F,{severity:"info",title:(0,i.t)("provisioning.getting-started.title-setting-connection-could-cause-temporary-outage","Setting up this connection could cause a temporary outage"),children:(0,e.jsx)(i.x6,{i18nKey:"provisioning.getting-started.alert-temporary-outage",children:"When you connect your whole instance, dashboards will be unavailable while running the migration. We recommend warning your users before starting the process."})}),(0,e.jsxs)(a.B,{direction:"column",gap:6,wrap:"wrap",children:[(0,e.jsxs)(a.B,{gap:10,alignItems:"center",children:[(0,e.jsx)(U,{repos:n,hasRequiredFeatures:j,onSetupFeatures:()=>{S("required-features"),y(!0)}}),(0,e.jsx)("div",{className:r.imageContainer,children:(0,e.jsx)("img",{src:B,className:r.image,alt:"Grafana provisioning"})})]}),(!h||!g)&&u&&(0,e.jsx)(P,{hasPublicAccess:h,hasImageRenderer:g,onSetupPublicAccess:()=>{S("public-access"),y(!0)}})]}),C&&b&&(0,e.jsx)(J,{...te(b),isOpen:C,onDismiss:()=>y(!1)})]})}function se(n){return{imageContainer:(0,s.css)({height:350,display:"flex",alignItems:"center",justifyContent:"center"}),image:(0,s.css)({borderRadius:n.shape.radius.default,width:"100%",height:"100%"})}}},90886(K,x,t){t.r(x),t.d(x,{default:()=>E});var e=t(74848),s=t(92745),c=t(89640),i=t(66404),p=t(31286),v=t(13791),a=t(83673);function E({items:d}){return(0,e.jsx)(v.Y,{navId:"provisioning",pageNav:{text:(0,s.t)("provisioning.getting-started-page.header","Provisioning"),subTitle:(0,s.t)("provisioning.getting-started-page.subtitle-provisioning-feature","View and manage your provisioning connections")},children:(0,e.jsxs)(v.Y.Contents,{children:[(0,e.jsx)(B,{}),(0,e.jsx)(a.A,{items:d})]})})}function B(){return(0,e.jsx)(p.a,{display:"flex",backgroundColor:"info",borderRadius:"default",paddingY:2,paddingX:2,marginBottom:3,alignItems:"stretch",children:(0,e.jsx)(i.E,{children:(0,e.jsxs)(s.x6,{i18nKey:"provisioning.banner.message",children:["This feature is currently under active development. For the best experience and latest improvements, we recommend using the"," ",(0,e.jsx)(c.Y,{href:"https://grafana.com/grafana/download/nightly",external:!0,children:"nightly build"})," ","of Grafana."]})})})}},3064(K,x,t){t.d(x,{N:()=>O});var e=t(74848),s=t(54148),c=t(92745),i=t(30703),p=t(34999),v=t(87063),a=t(45861),E=t(41654),B=t(88559),d=t(91555),m=t(93838);const f=`${d.pd}/github`,I=`${d.pd}/local`;function O({items:M,showDropdown:L=!1}){const P=(0,m.X)(M),R=(0,s.Zp)();return P.instanceConnected?null:P.maxReposReached?(0,e.jsx)(p.F,{title:"",severity:"info",children:(0,e.jsx)(c.x6,{i18nKey:"provisioning.connect-repository-button.repository-limit-info-alert",values:{count:P.repoCount},defaults:"Repository limit reached ({{count}})"})}):L?(0,e.jsx)(B.m,{overlay:(0,e.jsxs)(v.W,{children:[(0,e.jsx)(v.W.Item,{icon:"code-branch",label:(0,c.t)("provisioning.connect-repository-button.configure-git-sync","Configure Git Sync"),onClick:()=>{R(f)}}),(0,e.jsx)(v.W.Item,{icon:"file-alt",label:(0,c.t)("provisioning.connect-repository-button.configure-file","Configure file provisioning"),onClick:()=>{R(I)}})]}),children:(0,e.jsx)(a.$n,{variant:"primary",children:(0,e.jsxs)(E.B,{alignItems:"center",children:[(0,e.jsx)(c.x6,{i18nKey:"provisioning.connect-repository-button.configure",children:"Configure"}),(0,e.jsx)(i.I,{name:"angle-down"})]})})}):(0,e.jsxs)(E.B,{gap:3,children:[(0,e.jsx)(a.z9,{href:f,variant:"primary",children:(0,e.jsx)(c.x6,{i18nKey:"provisioning.connect-repository-button.configure-git-sync",children:"Configure Git Sync"})}),(0,e.jsx)(a.z9,{href:I,variant:"secondary",children:(0,e.jsx)(c.x6,{i18nKey:"provisioning.connect-repository-button.configure-file",children:"Configure file provisioning"})})]})}},93838(K,x,t){t.d(x,{X:()=>e});function e(s){return s?.length?{instanceConnected:s.some(c=>c.spec?.sync.target==="instance"),folderConnected:s.some(c=>c.spec?.sync.target==="folder"),maxReposReached:(s??[]).length>=10,repoCount:s.length}:{instanceConnected:!1,folderConnected:!1,repoCount:0,maxReposReached:!1}}}}]);

//# sourceMappingURL=886.6f9e8a7f3c2eb2be1b9c.js.map