"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[3675,7641],{94797:(e,s,t)=>{t.r(s),t.d(s,{ServerStats:()=>M});var n=t(36636),a=t(68404),i=t(90923),r=t(69783),l=t(58170),o=t(61959),c=t(56008),d=t(43215),h=t(45916);const x=()=>{var e;const s=p((0,r.useTheme2)()),[t,n]=(0,a.useState)(!1),[l,o]=(0,a.useState)({mode:"thumbs",theme:i.config.theme2.isLight?"light":"dark"}),c=()=>n(!1);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(r.Modal,{title:"Start crawler",isOpen:t,onDismiss:c,children:[(0,h.jsx)("div",{className:s.wrap,children:(0,h.jsx)(r.CodeEditor,{height:200,value:null!==(e=JSON.stringify(l,null,2))&&void 0!==e?e:"",showLineNumbers:!1,readOnly:!1,language:"json",showMiniMap:!1,onBlur:e=>{o(JSON.parse(e))}})}),(0,h.jsxs)(r.Modal.ButtonRow,{children:[(0,h.jsx)(r.Button,{type:"submit",onClick:()=>{(0,i.getBackendSrv)().post("/api/admin/crawler/start",l).then((e=>{console.log("GOT",e),c()}))},children:"Start"}),(0,h.jsx)(r.Button,{variant:"secondary",onClick:c,children:"Cancel"})]})]}),(0,h.jsx)(r.Button,{onClick:()=>n(!0),variant:"primary",children:"Start"})]})},p=e=>({wrap:n.css`
      border: 2px solid #111;
    `});var u,g,j;const m=()=>{const e=v((0,r.useTheme2)()),[s,t]=(0,a.useState)();return(0,a.useEffect)((()=>{const e=(0,i.getGrafanaLiveSrv)().getStream({scope:d.LiveChannelScope.Grafana,namespace:"broadcast",path:"crawler"}).subscribe({next:e=>{((0,d.isLiveChannelMessageEvent)(e)||(0,d.isLiveChannelStatusEvent)(e))&&t(e.message)}});return()=>{e.unsubscribe()}}),[]),s?(0,h.jsxs)("div",{className:e.wrap,children:[(0,h.jsx)("pre",{children:JSON.stringify(s,null,2)}),"running"!==s.state&&(j||(j=(0,h.jsx)(x,{}))),"stopped"!==s.state&&(0,h.jsx)(r.Button,{variant:"secondary",onClick:()=>{(0,i.getBackendSrv)().post("/api/admin/crawler/stop")},children:"Stop"})]}):(0,h.jsxs)("div",{className:e.wrap,children:["No status (never run)",u||(u=(0,h.jsx)("br",{})),g||(g=(0,h.jsx)(x,{}))]})},v=e=>({wrap:n.css`
      border: 4px solid red;
    `,running:n.css`
      border: 4px solid green;
    `}),f=()=>{var e;const s=b((0,r.useTheme2)()),[t,n]=(0,a.useState)(!1),[l,o]=(0,a.useState)({format:"git",git:{}}),c=()=>n(!1);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(r.Modal,{title:"Export grafana instance",isOpen:t,onDismiss:c,children:[(0,h.jsx)("div",{className:s.wrap,children:(0,h.jsx)(r.CodeEditor,{height:200,value:null!==(e=JSON.stringify(l,null,2))&&void 0!==e?e:"",showLineNumbers:!1,readOnly:!1,language:"json",showMiniMap:!1,onBlur:e=>{o(JSON.parse(e))}})}),(0,h.jsxs)(r.Modal.ButtonRow,{children:[(0,h.jsx)(r.Button,{onClick:()=>{(0,i.getBackendSrv)().post("/api/admin/export",l).then((e=>{console.log("GOT",e),c()}))},children:"Start"}),(0,h.jsx)(r.Button,{variant:"secondary",onClick:c,children:"Cancel"})]})]}),(0,h.jsx)(r.Button,{onClick:()=>n(!0),variant:"primary",children:"Export"})]})},b=e=>({wrap:n.css`
      border: 2px solid #111;
    `});var y,S;const w=()=>{const e=N((0,r.useTheme2)()),[s,t]=(0,a.useState)();return(0,a.useEffect)((()=>{const e=(0,i.getGrafanaLiveSrv)().getStream({scope:d.LiveChannelScope.Grafana,namespace:"broadcast",path:"export"}).subscribe({next:e=>{((0,d.isLiveChannelMessageEvent)(e)||(0,d.isLiveChannelStatusEvent)(e))&&t(e.message)}});return()=>{e.unsubscribe()}}),[]),s?(0,h.jsxs)("div",{className:e.wrap,children:[(0,h.jsx)("pre",{children:JSON.stringify(s,null,2)}),Boolean(!s.running)&&(S||(S=(0,h.jsx)(f,{}))),Boolean(s.running)&&(0,h.jsx)(r.Button,{variant:"secondary",onClick:()=>{(0,i.getBackendSrv)().post("/api/admin/export/stop")},children:"Stop"})]}):(0,h.jsx)("div",{className:e.wrap,children:y||(y=(0,h.jsx)(f,{}))})},N=e=>({wrap:n.css`
      border: 4px solid red;
    `,running:n.css`
      border: 4px solid green;
    `});var k,A,B,C,L,E,G;const M=()=>{const[e,s]=(0,a.useState)(null),[t,n]=(0,a.useState)(!1),d=(0,r.useStyles2)(D),x=o.Vt.hasAccess(l.bW.DataSourcesRead,o.Vt.isGrafanaAdmin),p=o.Vt.hasAccess(l.bW.UsersRead,o.Vt.isGrafanaAdmin);return(0,a.useEffect)((()=>{o.Vt.hasAccess(l.bW.ActionServerStatsRead,o.Vt.isGrafanaAdmin)&&(n(!0),(async()=>(0,i.getBackendSrv)().get("api/admin/stats").catch((e=>(console.error(e),null))))().then((e=>{s(e),n(!1)})))}),[]),o.Vt.hasAccess(l.bW.ActionServerStatsRead,o.Vt.isGrafanaAdmin)?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("h2",{className:d.title,children:"Instance statistics"}),t?(0,h.jsx)("div",{className:d.loader,children:k||(k=(0,h.jsx)(c.a,{text:"Loading instance stats..."}))}):e?(0,h.jsxs)("div",{className:d.row,children:[(0,h.jsx)(O,{content:[{name:"Dashboards (starred)",value:`${e.dashboards} (${e.stars})`},{name:"Tags",value:e.tags},{name:"Playlists",value:e.playlists},{name:"Snapshots",value:e.snapshots}],footer:A||(A=(0,h.jsx)(r.LinkButton,{href:"/dashboards",variant:"secondary",children:"Manage dashboards"}))}),(0,h.jsxs)("div",{className:d.doubleRow,children:[(0,h.jsx)(O,{content:[{name:"Data sources",value:e.datasources}],footer:x&&(B||(B=(0,h.jsx)(r.LinkButton,{href:"/datasources",variant:"secondary",children:"Manage data sources"})))}),(0,h.jsx)(O,{content:[{name:"Alerts",value:e.alerts}],footer:C||(C=(0,h.jsx)(r.LinkButton,{href:"/alerting/list",variant:"secondary",children:"Alerts"}))})]}),(0,h.jsx)(O,{content:[{name:"Organisations",value:e.orgs},{name:"Users total",value:e.users},{name:"Active users in last 30 days",value:e.activeUsers},{name:"Active sessions",value:e.activeSessions}],footer:p&&(L||(L=(0,h.jsx)(r.LinkButton,{href:"/admin/users",variant:"secondary",children:"Manage users"})))})]}):(0,h.jsx)("p",{className:d.notFound,children:"No stats found."}),i.config.featureToggles.dashboardPreviews&&i.config.featureToggles.dashboardPreviewsAdmin&&(E||(E=(0,h.jsx)(m,{}))),i.config.featureToggles.export&&(G||(G=(0,h.jsx)(w,{})))]}):null},D=e=>({title:n.css`
      margin-bottom: ${e.spacing(4)};
    `,row:n.css`
      display: flex;
      justify-content: space-between;
      width: 100%;

      & > div:not(:last-of-type) {
        margin-right: ${e.spacing(2)};
      }

      & > div {
        width: 33.3%;
      }
    `,doubleRow:n.css`
      display: flex;
      flex-direction: column;

      & > div:first-of-type {
        margin-bottom: ${e.spacing(2)};
      }
    `,loader:n.css`
      height: 290px;
    `,notFound:n.css`
      font-size: ${e.typography.h6.fontSize};
      text-align: center;
      height: 290px;
    `}),O=e=>{let{content:s,footer:t}=e;const n=(0,r.useStyles2)(T);return(0,h.jsx)(r.CardContainer,{className:n.container,disableHover:!0,children:(0,h.jsxs)("div",{className:n.inner,children:[(0,h.jsx)("div",{className:n.content,children:s.map((e=>(0,h.jsxs)("div",{className:n.row,children:[(0,h.jsx)("span",{children:e.name}),(0,h.jsx)("span",{children:e.value})]},e.name)))}),t&&(0,h.jsx)("div",{children:t})]})})},T=e=>({container:n.css`
      padding: ${e.spacing(2)};
    `,inner:n.css`
      display: flex;
      flex-direction: column;
      width: 100%;
    `,content:n.css`
      flex: 1 0 auto;
    `,row:n.css`
      display: flex;
      justify-content: space-between;
      width: 100%;
      margin-bottom: ${e.spacing(2)};
      align-items: center;
    `})},23675:(e,s,t)=>{t.r(s),t.d(s,{UpgradeInfo:()=>E,UpgradePage:()=>C,default:()=>F});var n=t(36636),a=(t(68404),t(18745)),i=t(69783),r=t(33801),l=t(8674),o=t(45916);const c={fontWeight:500,fontSize:"26px",lineHeight:"123%"},d=(0,i.stylesFactory)((e=>{const s=e.isDark?"public/img/licensing/header_dark.svg":"public/img/licensing/header_light.svg",t=e.isDark?e.palette.dark9:e.palette.gray6;return{container:n.css`
      padding: 36px 79px;
      background: ${e.colors.panelBg};
    `,footer:n.css`
      text-align: center;
      padding: 16px;
      background: ${t};
    `,header:n.css`
      height: 137px;
      padding: 40px 0 0 79px;
      position: relative;
      background: url('${s}') right;
    `}}));function h(e){let{header:s,editionNotice:t,subheader:n,children:a}=e;const r=(0,i.useTheme)(),l=d(r);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:l.header,children:[(0,o.jsx)("h2",{style:c,children:s}),n&&(0,o.jsx)("h3",{children:n}),(0,o.jsx)(x,{size:"128px",style:{boxShadow:"0px 0px 24px rgba(24, 58, 110, 0.45)",background:"#0A1C36",position:"absolute",top:"19px",left:"71%"},children:(0,o.jsx)("img",{src:"public/img/grafana_icon.svg",alt:"Grafana",width:"80px",style:{position:"absolute",left:"23px",top:"20px"}})})]}),(0,o.jsx)("div",{className:l.container,children:a}),t&&(0,o.jsx)("div",{className:l.footer,children:t})]})}const x=e=>{let{size:s,style:t,children:n}=e;return(0,o.jsx)("div",{style:Object.assign({width:s,height:s,position:"absolute",bottom:0,right:0,borderRadius:"50%"},t),children:n})};var p,u,g,j,m,v,f,b,y,S,w,N,k,A,B=t(94797);function C(e){let{navModel:s}=e;return(0,o.jsx)(r.Z,{navModel:s,children:p||(p=(0,o.jsxs)(r.Z.Contents,{children:[(0,o.jsx)(B.ServerStats,{}),(0,o.jsx)(E,{editionNotice:"You are running the open-source version of Grafana. You have to install the Enterprise edition in order enable Enterprise features."})]}))})}const L={fontWeight:500,fontSize:"26px",lineHeight:"123%"},E=e=>{let{editionNotice:s}=e;const t=(0,i.useStyles2)(G);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("h2",{className:t.title,children:"Enterprise license"}),(0,o.jsx)(h,{header:"Grafana Enterprise",subheader:"Get your free trial",editionNotice:s,children:(0,o.jsxs)("div",{className:t.column,children:[u||(u=(0,o.jsx)(T,{})),g||(g=(0,o.jsx)(O,{}))]})})]})},G=e=>({column:n.css`
      display: grid;
      grid-template-columns: 100%;
      column-gap: 20px;
      row-gap: 40px;

      @media (min-width: 1050px) {
        grid-template-columns: 50% 50%;
      }
    `,title:n.css`
      margin: ${e.spacing(4)} 0;
    `}),M=()=>(0,o.jsxs)("div",{style:{marginTop:"40px",marginBottom:"30px"},children:[j||(j=(0,o.jsx)("h2",{style:L,children:"Get Grafana Enterprise"})),m||(m=(0,o.jsx)(D,{})),(0,o.jsx)("p",{style:{paddingTop:"12px"},children:"You can use the trial version for free for 30 days. We will remind you about it five days before the trial period ends."})]}),D=()=>v||(v=(0,o.jsx)(i.LinkButton,{variant:"primary",size:"lg",href:"https://grafana.com/contact?about=grafana-enterprise&utm_source=grafana-upgrade-page",children:"Contact us and get a free trial"})),O=()=>(0,o.jsxs)("div",{children:[f||(f=(0,o.jsx)("h4",{children:"At your service"})),b||(b=(0,o.jsxs)(P,{children:[(0,o.jsx)(R,{title:"Enterprise Plugins",image:"public/img/licensing/plugin_enterprise.svg"}),(0,o.jsx)(R,{title:"Critical SLA: 2 hours",image:"public/img/licensing/sla.svg"}),(0,o.jsxs)(R,{title:"Unlimited Expert Support",image:"public/img/licensing/customer_support.svg",children:["24 x 7 x 365 support via",(0,o.jsxs)(P,{nested:!0,children:[(0,o.jsx)(R,{title:"Email"}),(0,o.jsx)(R,{title:"Private Slack channel"}),(0,o.jsx)(R,{title:"Phone"})]})]}),(0,o.jsx)(R,{title:"Hand-in-hand support",image:"public/img/licensing/handinhand_support.svg",children:"in the upgrade process"})]})),(0,o.jsxs)("div",{style:{marginTop:"20px"},children:[y||(y=(0,o.jsx)("strong",{children:"Also included:"})),S||(S=(0,o.jsx)("br",{})),"Indemnification, working with Grafana Labs on future prioritization, and training from the core Grafana team."]}),w||(w=(0,o.jsx)(M,{}))]}),T=()=>(0,o.jsxs)("div",{style:{paddingRight:"11px"},children:[N||(N=(0,o.jsx)("h4",{children:"Enhanced functionality"})),k||(k=(0,o.jsx)($,{}))]}),$=()=>A||(A=(0,o.jsxs)(P,{children:[(0,o.jsx)(R,{title:"Data source permissions"}),(0,o.jsx)(R,{title:"Reporting"}),(0,o.jsx)(R,{title:"SAML authentication"}),(0,o.jsx)(R,{title:"Enhanced LDAP integration"}),(0,o.jsx)(R,{title:"Team Sync",children:"LDAP, GitHub OAuth, Auth Proxy, Okta"}),(0,o.jsx)(R,{title:"White labeling"}),(0,o.jsx)(R,{title:"Auditing"}),(0,o.jsx)(R,{title:"Settings updates at runtime"}),(0,o.jsx)(R,{title:"Grafana usage insights",children:(0,o.jsxs)(P,{nested:!0,children:[(0,o.jsx)(R,{title:"Sort dashboards by popularity in search"}),(0,o.jsx)(R,{title:"Find unused dashboards"}),(0,o.jsx)(R,{title:"Dashboard usage stats drawer"}),(0,o.jsx)(R,{title:"Dashboard presence indicators"})]})}),(0,o.jsx)(R,{title:"Enterprise plugins",children:(0,o.jsxs)(P,{nested:!0,children:[(0,o.jsx)(R,{title:"Oracle"}),(0,o.jsx)(R,{title:"Splunk"}),(0,o.jsx)(R,{title:"Service Now"}),(0,o.jsx)(R,{title:"Dynatrace"}),(0,o.jsx)(R,{title:"New Relic"}),(0,o.jsx)(R,{title:"DataDog"}),(0,o.jsx)(R,{title:"AppDynamics"}),(0,o.jsx)(R,{title:"SAP HANA®"}),(0,o.jsx)(R,{title:"Gitlab"}),(0,o.jsx)(R,{title:"Honeycomb"}),(0,o.jsx)(R,{title:"Jira"}),(0,o.jsx)(R,{title:"MongoDB"}),(0,o.jsx)(R,{title:"Salesforce"}),(0,o.jsx)(R,{title:"Snowflake"}),(0,o.jsx)(R,{title:"Wavefront"})]})})]})),P=e=>{let{children:s,nested:t}=e;const a=n.css`
    display: flex;
    flex-direction: column;
    padding-top: 8px;

    > div {
      margin-bottom: ${t?0:8}px;
    }
  `;return(0,o.jsx)("div",{className:a,children:s})},R=e=>{let{children:s,title:t,image:a}=e;const i=a||"public/img/licensing/checkmark.svg",r=n.css`
    display: flex;

    > img {
      display: block;
      height: 22px;
      flex-grow: 0;
      padding-right: 12px;
    }
  `,l=n.css`
    font-weight: 500;
    line-height: 1.7;
  `;return(0,o.jsxs)("div",{className:r,children:[(0,o.jsx)("img",{src:i,alt:""}),(0,o.jsxs)("div",{children:[(0,o.jsx)("div",{className:l,children:t}),s]})]})},F=(0,a.connect)((e=>({navModel:(0,l.h)(e.navIndex,"upgrading")})))(C)},56008:(e,s,t)=>{t.d(s,{a:()=>i});t(68404);var n=t(69783),a=t(45916);const i=e=>{let{text:s="Loading..."}=e;return(0,a.jsx)("div",{className:"page-loader-wrapper",children:(0,a.jsx)(n.LoadingPlaceholder,{text:s})})}}}]);
//# sourceMappingURL=3675.1959d2db84bc84d3348c.js.map