D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
usr
/
share
/
grafana
/
public
/
build
/
Filename :
SupportBundles.ecac348362592b32e0ab.js
back
Copy
"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[9939],{76202:(B,E,e)=>{e.r(E),e.d(E,{default:()=>D});var t=e(27702),f=e(27173),r=e(60956),d=e(66670),l=e(62108),i=e(67437),p=e(44644),o=e(66574),_=e(18771),c=e(59575);const h=t.createElement("span",null,"Support bundles allow you to easily collect and share Grafana logs, configuration, and data with the Grafana Labs team."),n=t.createElement(d.Qj,{icon:"plus",href:"support-bundles/create",variant:"primary"},"New support bundle"),a=u=>({supportBundles:u.supportBundles.supportBundles,isLoading:u.supportBundles.isLoading}),m={loadBundles:c.Ch,removeBundle:c.od,checkBundles:c.ob},D=(0,f.connect)(a,m)(({supportBundles:u,isLoading:A,loadBundles:P,removeBundle:O,checkBundles:M})=>{const C=u.some(s=>s.state==="pending");(0,t.useEffect)(()=>{P()},[P]),(0,t.useEffect)(()=>{C&&M()});const v=o.Vt.hasAccess(_.AccessControlAction.ActionSupportBundlesCreate,o.Vt.isGrafanaAdmin),T=o.Vt.hasAccess(_.AccessControlAction.ActionSupportBundlesDelete,o.Vt.isGrafanaAdmin),g=v?n:void 0;return t.createElement(p.T,{navId:"support-bundles",subTitle:h,actions:g},t.createElement(p.T.Contents,{isLoading:A},t.createElement("table",{className:"filter-table form-inline"},t.createElement("thead",null,t.createElement("tr",null,t.createElement("th",null,"Created on"),t.createElement("th",null,"Requested by"),t.createElement("th",null,"Expires"),t.createElement("th",{style:{width:"32px"}}),t.createElement("th",{style:{width:"1%"}}),t.createElement("th",{style:{width:"1%"}}))),t.createElement("tbody",null,u?.map(s=>t.createElement("tr",{key:s.uid},t.createElement("th",null,(0,r.dq)(s.createdAt*1e3)),t.createElement("th",null,s.creator),t.createElement("th",null,(0,r.dq)(s.expiresAt*1e3)),t.createElement("th",null,s.state==="pending"&&t.createElement(l.$,null)),t.createElement("th",null,t.createElement(d.Qj,{fill:"outline",disabled:s.state!=="complete",target:"_self",href:`/api/support-bundles/${s.uid}`},"Download")),t.createElement("th",null,T&&t.createElement(i.h,{onClick:()=>O(s.uid),name:"trash-alt",variant:"destructive",tooltip:"Remove bundle"}))))))))})},59575:(B,E,e)=>{e.d(E,{Ch:()=>i,Jp:()=>h,ob:()=>o,od:()=>_,vc:()=>c});var t=e(89949),f=e.n(t),r=e(73289),d=e(26129),l=e(26271);function i(n=!1){return async a=>{try{n||a((0,l.Ii)());const m=await(0,r.i)().get("/api/support-bundles");a((0,l.rW)(m))}finally{a((0,l.ki)())}}}const p=(0,t.throttle)(async n=>{const a=await(0,r.i)().get("/api/support-bundles");n((0,l.rW)(a))},1e3);function o(){return async n=>{n(p)}}function _(n){return async a=>{await(0,r.i)().delete(`/api/support-bundles/${n}`),a(i(!0))}}function c(){return async n=>{try{n((0,l.ik)());const a=await(0,r.i)().get("/api/support-bundles/collectors");n((0,l.cD)(a))}catch{n((0,l.rI)("Error loading support bundles data collectors"))}finally{n((0,l.UW)())}}}function h(n){return async a=>{try{await(0,r.i)().post("/api/support-bundles",n),d.E1.push("/support-bundles")}catch{a((0,l.fT)("Error creating support bundle"))}}}}}]); //# sourceMappingURL=SupportBundles.ecac348362592b32e0ab.js.map