text: "use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[1034],{"./public/app/features/dashboard/containers/SoloPanelPage.tsx":(e,a,s)=>{s.r(a),s.d(a,{SoloPanelPage:()=>h,default:()=>c});var t,r=s("./node_modules/react/index.js"),d=s("./node_modules/react-redux/es/index.js"),n=s("./node_modules/react-virtualized-auto-sizer/dist/index.esm.js"),i=s("./public/app/features/dashboard/dashgrid/DashboardPanel.tsx"),o=s("./public/app/features/dashboard/state/initDashboard.ts"),l=s("./node_modules/react/jsx-runtime.js");const u={initDashboard:o.m},p=(0,d.connect)((e=>({dashboard:e.dashboard.getModel()})),u);class h extends r.Component{constructor(...e){var a,s,t;super(...e),t={panel:null,notFound:!1},(s="state")in(a=this)?Object.defineProperty(a,s,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[s]=t}componentDidMount(){const{match:e,route:a}=this.props;this.props.initDashboard({urlSlug:e.params.slug,urlUid:e.params.uid,urlType:e.params.type,routeName:a.routeName,fixUrl:!1})}getPanelId(){var e;return parseInt(null!==(e=this.props.queryParams.panelId)&&void 0!==e?e:"0",10)}componentDidUpdate(e){const{dashboard:a}=this.props;if(a&&(!e.dashboard||e.dashboard.uid!==a.uid)){const e=a.getPanelByUrlId(this.props.queryParams.panelId);if(!e)return void this.setState({notFound:!0});this.setState({panel:e})}}render(){const{dashboard:e}=this.props,{notFound:a,panel:s}=this.state;return a?(0,l.jsxs)("div",{className:"alert alert-error",children:["Panel with id ",this.getPanelId()," not found"]}):s&&e?(0,l.jsx)("div",{className:"panel-solo",children:(0,l.jsx)(n.Z,{children:({width:a,height:t})=>0===a?null:(0,l.jsx)(i.l,{width:a,height:t,dashboard:e,panel:s,isEditing:!1,isViewing:!1,isInView:!0})})}):t||(t=(0,l.jsx)("div",{children:"Loading & initializing dashboard"}))}}const c=p(h)}}]);
  //# sourceMappingURL=SoloPanelPage.8128b05ac04b15cbf98d.js.map