"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[9898],{22192(h,e,a){a.r(e),a.d(e,{default:()=>p});var n=a(74848),_=a(54148),l=a(92745),u=a(50201),D=a(68079),P=a(89640),M=a(66404),d=a(41654),E=a(8073),v=a(35942),f=a(33680),c=a(13791),O=a(62939),g=a(91555),x=a(79755);function p(){const t=(0,_.g)(),r=t.name??"",o=t["*"]??"",s=(0,f.c2)({name:r}),i=(0,f.$j)({name:r,path:o}),j=s.isError&&(0,O.E)(s.error);return(0,n.jsx)(c.Y,{navId:"provisioning",pageNav:{text:`History: ${o}`,subTitle:s.data?.spec?.title??"Repository"},children:(0,n.jsx)(c.Y.Contents,{isLoading:!1,children:j?(0,n.jsxs)(u.p,{message:"Repository not found",variant:"not-found",children:[(0,n.jsx)(M.E,{element:"p",children:(0,n.jsx)(l.x6,{i18nKey:"provisioning.file-history-page.repository-config-exists-configuration",children:"Make sure the repository config exists in the configuration file."})}),(0,n.jsx)(P.Y,{href:g.mL,children:(0,n.jsx)(l.x6,{i18nKey:"provisioning.file-history-page.back-to-repositories",children:"Back to repositories"})})]}):(0,n.jsx)("div",{children:i.data?(0,n.jsx)(m,{history:i.data,path:o,repo:r}):(0,n.jsx)(D.y,{})})})})}function m({history:t,path:r,repo:o}){return t.items?(0,n.jsx)(d.B,{direction:"column",children:t.items.map(s=>(0,n.jsxs)(E.Z,{href:`${g.mL}/${o}/file/${r}?ref=${s.ref}`,children:[(0,n.jsx)(E.Z.Heading,{children:s.message}),(0,n.jsx)(E.Z.Meta,{children:(0,n.jsx)("span",{children:(0,x.E)(s.createdAt)})}),(0,n.jsx)(E.Z.Description,{children:(0,n.jsx)(d.B,{children:s.authors.map(i=>(0,n.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[i.avatarURL&&(0,n.jsx)(v.n,{userView:{user:{name:i.name,avatarUrl:i.avatarURL},lastActiveAt:new Date().toISOString()},showTooltip:!1}),(0,n.jsx)("a",{href:`https://github.com/${i.username}`,children:i.name})]},i.username))})})]},s.ref))}):(0,n.jsx)(l.x6,{i18nKey:"provisioning.history-view.not-found",children:"Not found"})}},79755(h,e,a){a.d(e,{E:()=>n});function n(_){return _?new Date(_).toLocaleString():"N/A"}}}]);

//# sourceMappingURL=FileHistoryPage.844445cc07a35d86bc16.js.map