PageSourceSearch

https://app.brandefense.io/assets/index-D00ESkfw.js

js brandefense.io collected 2026-09-24 09:39:07 UTC 9,099 bytes, 2 lines download raw bytes

1import{d as Q,g as j,ai as X,I as ee,j as y,X as te,h as D,i as B,o as h,w as A,e as g,c as $,x as M,t as R,f as e,a as l,a1 as ae,a0 as V,n as K,F as N,k as O,aO as se,a8 as oe,p as Y,$ as ne,aF as G,ab as re,Q as ie,M as le,aM as F,C as de,al as ce,E as q,eg as ue,bx as pe}from"./index-CwvcCfb3.js";import{_ as me}from"./DataTable.vue_vue_type_script_setup_true_lang-CZ5PonkG.js";import{_ as be}from"./PageHeaderActions.vue_vue_type_script_setup_true_lang-BT2D8jGt.js";import{_ as _e}from"./DashboardsTemplateCard.vue_vue_type_style_index_0_lang-BTsln0Q2.js";import{_ as fe}from"./Select.vue_vue_type_script_setup_true_lang-CAWoAsie.js";import{d as he,a as ye,b as ve,c as ge}from"./dashboards-BPhI9z6i.js";import{d as xe}from"./templates-B59W54EI.js";import{A as we}from"./ApprovalModal-BY8qQisu.js";import"./table-layout-DaYIC2wo.js";import"./Pagination.vue_vue_type_script_setup_true_lang-0cGhC6or.js";import"./BasicTable-DoUXt2RU.js";import"./ScrollView.vue_vue_type_style_index_0_lang-CAuO6fej.js";import"./StateMessage.vue_vue_type_script_setup_true_lang-CFY6eCuD.js";import"./ApiSelect.vue_vue_type_script_setup_true_lang-C4O0-7Nj.js";import"./_baseUniq-DDAbgQfJ.js";import"./Failed-C-2HWabf.js";import"./Tags.vue_vue_type_script_setup_true_lang-Ck0l80I1.js";import"./vuedraggable.umd-C2jJLot7.js";import"./table-DPi13tyj.js";import"./useDownload-DVDdB1kQ.js";import"./Alert.vue_vue_type_script_setup_true_lang-Cu7Jhth2.js";import"./Grid.vue_vue_type_script_setup_true_lang-DXvZpjcH.js";import"./GridItem-C_T1Vc8G.js";import"./slice-8jJvaJPr.js";import"./math-LlAWZZZn.js";import"./SplitButton.vue_vue_type_script_setup_true_lang-C_fc1ITo.js";import"./FilterBar-BJPF4R18.js";import"./Field-Dc9FAI0K.js";import"./BasicForm-CPRRjXuT.js";import"./Textarea.vue_vue_type_script_setup_true_lang-DR2xqwOO.js";import"./CodeSnippet.vue_vue_type_script_setup_true_lang-C9v3LOLB.js";import"./CollapseLinks-DfdWfhFr.js";import"./MediaBrowser.vue_vue_type_script_setup_true_lang-Bp5AMRap.js";import"./some-CdktUWRe.js";import"./useImagePopupViewer-Du7RJBl5.js";import"./media-dyqRh1Oc.js";import"./RadioOptionGroup.vue_vue_type_script_setup_true_lang-CoqcKNgL.js";import"./DatePicker.vue_vue_type_script_setup_true_lang-DS-OekfE.js";import"./isNumber-mbfSic21.js";import"./pickBy-BqttQPUA.js";import"./dashboardEnum-DFqzuUDB.js";try{let u=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new u.Error().stack;t&&(u._sentryDebugIds=u._sentryDebugIds||{},u._sentryDebugIds[t]="01095e97-4279-4925-ab13-1a818695c6e2",u._sentryDebugIdIdentifier="sentry-dbid-01095e97-4279-4925-ab13-1a818695c6e2")}catch{}const Ce={class:"flex flex-col gap-4 max-h-[70vh]"},ke={class:"text-slate-500 dark:text-slate-400 text-xs m-0"},De={class:"sticky top-0 z-10"},$e={class:"templates-grid overflow-y-auto pb-4 pt-1 px-1 -mx-1"},Ae={key:0,class:"templates-grid"},Te={key:1,class:"flex flex-col items-center gap-2 py-10 text-slate-500 text-xs"},Pe=Q({__name:"DashboardsCreateDashboardModal",props:{open:{type:Boolean}},emits:["close","created"],setup(u,{emit:t}){const T=u,v=t,{t:p}=j(),x=G(),P=X(),{isAnyMsspUser:z}=ee(),m=y([]),w=y(!1),c=y(!1),_=y("");async function I(){var s;w.value=!0;try{const o={is_published:"True"},i=((s=P.selectedOrganization)==null?void 0:s.is_mssp)??z.value;o.target_audience__in=i?"mssp,all":"organization,all";const d=await xe(o);m.value=d.results||[]}catch{m.value=[]}finally{w.value=!1}}te(()=>T.open,s=>{s&&I()});const b=D(()=>{const s=_.value.toLowerCase().trim();return s?m.value.filter(o=>{var i;return o.name.toLowerCase().includes(s)||o.description.toLowerCase().includes(s)||((i=o.category_display)==null?void 0:i.toLowerCase().includes(s))}):m.value});async function f(s){var o;if(!c.value){c.value=!0;try{const i={name:s?s.name:p("dashboards.new-dashboard"),description:(s==null?void 0:s.description)||"",template_id:s==null?void 0:s.id},d=await he(i);x.success(p("dashboards.created-success")),v("created",d.id),v("close")}catch(i){const d=(o=i==null?void 0:i.response)==null?void 0:o.status;(!d||d>=500)&&x.error(p("notify.error-message"))}finally{c.value=!1}}}return(s,o)=>{const i=fe,d=_e,C=oe,S=se,a=Y,n=ne;return h(),B(n,{open:T.open,title:e(p)("dashboards.create-dashboard"),size:"lg",onClose:o[3]||(o[3]=r=>v("close"))},{content:A(()=>[g("div",Ce,[g("p",ke,R(e(p)("dashboards.choose-template")),1),g("div",De,[l(i,{modelValue:e(_),"onUpdate:modelValue":o[0]||(o[0]=r=>ae(_)?_.value=r:null),placeholder:e(p)("dashboards.filter-templates"),"icon-left":"search",class:"w-full"},null,8,["modelValue","placeholder"])]),g("div",$e,[l(d,{"is-blank":"",class:K({"opacity-50 pointer-events-none":e(c)}),role:"button",tabindex:"0",onClick:o[1]||(o[1]=r=>f()),onKeydown:o[2]||(o[2]=V(r=>f(),["enter"]))},null,8,["class"]),(h(!0),$(N,null,O(e(b),r=>(h(),B(d,{key:r.id,template:r,class:K({"opacity-50 pointer-events-none":e(c)}),role:"button",tabindex:"0",onClick:L=>f(r),onKeydown:V(L=>f(r),["enter"])},null,8,["template","class","onClick","onKeydown"]))),128))]),e(w)?(h(),$("div",Ae,[(h(),$(N,null,O(3,r=>l(S,{key:r,class:"template-card"},{default:A(()=>[l(C,{type:"block",class:"h-10 mb-3"}),l(C,{type:"line",class:"mb-2"}),l(C,{type:"line",class:"w-2/3"})]),_:1})),64))])):M("",!0),!e(w)&&e(b).length===0&&e(_)?(h(),$("div",Te,[l(a,{name:"search",size:"lg",color:"slate"}),g("span",null,R(e(p)("dashboards.no-templates-match",{query:e(_)})),1)])):M("",!0)])]),_:1},8,["open","title"])}}}),ze={class:"flex items-center gap-2"},E="all",U="my-dashboards",H="pinned",Ie="dashboards",vt=Q({__name:"index",setup(u){const{t}=j(),T=re(),v=ie(),{organizationId:p}=le(X()),x=y(!1);function P(a){v.push({name:"DashboardsDashboardsId",params:{id:a}})}const z=D(()=>[{label:t("common.all"),value:E},{label:t("dashboards.my-dashboards"),value:U},{label:t("common.pinned"),value:H}]),m=D(()=>T.query.tab||E);function w(a){v.replace({query:{tab:a}})}const c=G();async function _(a){const n=!a.is_pinned;a.is_pinned=n;try{await ge(a.id,{is_pinned:n}),c.success(t(n?"dashboards.pinned-success":"dashboards.unpinned-success"))}catch{a.is_pinned=!n,c.error(t("notify.error-message"))}}function I(a){v.push({name:"DashboardsDashboardsId",params:{id:a.id}})}const b=y(null),f=y(!1),s=y(0);async function o(){if(!(!b.value||f.value)){f.value=!0;try{await ve(b.value.id),c.success(t("dashboards.deleted-success","Dashboard deleted")),b.value=null,s.value+=1}catch{c.error(t("notify.error-message"))}finally{f.value=!1}}}const i={is_pinned:{label:"",sortable:!1,fixed:!0,width:"48px",align:"center",cellClass:"!w-12 !min-w-[48px] !max-w-[48px]",renderRow:a=>pe(Y,{name:a.is_pinned?"bookmark-filled":"bookmark",size:"sm",class:["cursor-pointer transition-colors",a.is_pinned?"text-primary":"text-slate-300 hover:text-slate-500"],onClick:n=>{n.stopPropagation(),_(a)}})},name:{label:t("common.name"),sortable:!0,fixed:!0,width:400,truncate:!0,renderer:"tableCombineRow",rendererProps:{comb
1inedRows:["name","description"]}},action:{label:"",fixed:!0,width:190},widget_count:{label:t("dashboards.widgets"),sortable:!1,align:"center"},created_by:{key:"created_by.name",label:t("common.created-by"),sortable:!1},updated_by:{key:"updated_by.name",label:t("common.updated-by"),sortable:!1},created_at:{label:t("common.created-at"),sortable:!0,formatter:"date",align:"right"}},d=D(()=>{const a={};return m.value===H?a.is_pinned=!0:m.value===U&&(a.is_mine=!0),a}),C=[{field:"created_by__email__in",label:t("common.created-by"),component:"ApiSelect",isPreset:!0,componentProps:{api:F,hasSearch:!0,isPartial:!0,multiSelect:!0,valueField:"email"}},{field:"updated_by__email__in",label:t("common.updated-by"),component:"ApiSelect",isPreset:!0,componentProps:{api:F,hasSearch:!0,isPartial:!0,multiSelect:!0,valueField:"email"}}],S=D(()=>({tableKey:Ie,columns:i,filterOptions:C,rowActions:!1,layoutSize:"full-width",api:{get:a=>ye({...a,...d.value})}}));return(a,n)=>{const r=de,L=be,J=me,W=ue;return h(),$("div",null,[l(L,null,{default:A(()=>[l(r,{color:"tertiary",icon:"create-add-plus",text:e(t)("common.new-thing",{thing:"Dashboard"}),onClick:n[0]||(n[0]=k=>x.value=!0)},null,8,["text"])]),_:1}),g("div",null,[l(W,{type:"pill",selected:e(m),tabs:e(z),"onUpdate:selected":w},{tab:A(()=>[(h(),B(J,ce({key:`${e(m)}-${e(p)}-${e(s)}`},e(S),{class:"mt-4"}),{"table-cell-action":A(({row:k})=>[g("div",ze,[l(r,{text:e(t)("action.view"),size:"xs",color:"slate",variant:"outlined",onClick:q(Z=>I(k),["stop"])},null,8,["text","onClick"]),l(r,{text:e(t)("action.delete"),size:"xs",color:"danger",variant:"outlined",onClick:q(Z=>b.value=k,["stop"])},null,8,["text","onClick"])])]),_:1},16))]),_:1},8,["selected","tabs"])]),l(Pe,{open:e(x),onClose:n[1]||(n[1]=k=>x.value=!1),onCreated:P},null,8,["open"]),l(we,{open:!!e(b),title:e(t)("dashboards.delete-dashboard","Delete Dashboard"),subtitle:e(t)("dashboards.delete-dashboard-confirm","Are you sure you want to delete this dashboard? This action cannot be undone."),onConfirm:o,onClose:n[2]||(n[2]=k=>b.value=null)},null,8,["open","title","subtitle"])])}}});export{vt as default};
2//# sourceMappingURL=index-D00ESkfw.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.