PageSourceSearch

https://sase.jimber.io/assets/Services-eoDmOOPr.js

js jimber.io collected 2026-10-10 02:05:40 UTC 3,418 bytes, 1 lines download raw bytes

1import{d as C,bx as T,aa as R,aR as M,aH as V,f as z,an as B,by as E,ab as O,E as u}from"./index-CPXi7tQh.js";import{_ as P}from"./DocumentationLink.vue_vue_type_script_setup_true_lang-BTVIfYVs.js";import{_ as j}from"./CompanyLayout.vue_vue_type_script_setup_true_lang-DJH8IfCZ.js";import{u as p}from"./service.service-CY8wRheo.js";import{d as D,r as c,e as S,o as H,u as v,x as s,v as f,K as I,A as i,T as o,l as K,S as L,k as y}from"./@chart-BXmWMIfR.js";import"./@ace-BEIQESsW.js";import"./@libsodium-BNugX1YT.js";import"./@moment-BLMuvzoS.js";import"./@formkit-pro-gPB7B6Jc.js";import"./@jimber-shared-components-BR90iqQf.js";import"./multiple-logo-bg-C312Ls0j.js";const A={class:"ml-2 flex items-center justify-end space-x-5"},ae=D({__name:"Services",setup(q){const k=C(),_=c([]),l=c(!1),n=c(""),g=c(),m=c(),h=S(()=>[{key:"name",displayName:"Name",enableSorting:!0}]),N=c({enableSearch:!0,options:["all"],whitelistedOptions:["name"]}),$=S(()=>({displayName:"Service",displayKey:"name",actions:{}})),w={getEntities:async({pagination:t,filters:a,orderBy:r})=>{const{getServices:e}=p();try{const d=await e({skip:t?.skip,take:t?.take,search:a?.searchString,orderBy:r,companyName:n.value});return{size:d.size,entities:d.services}}catch{u({type:"error",text:"Couldn't fetch services"})}return{size:0,entities:[]}}},x=async()=>{const{getServices:t}=p();_.value=(await t({companyName:n.value})).services};H(async()=>{try{n.value=k.params.companyName||"",await x(),l.value=!0}catch(t){console.log(t)}});const b=async t=>{if(!m.value)return;if(await m.value.showDialog({type:"Service",name:t.name}))try{const{deleteService:r}=p(),e=await r({companyName:n.value,id:t.id});u({text:`Service ${e.name} successfully deleted`,type:"success"}),g.value?.doReload()}catch(r){const e=r.message;u({text:e?e.toString():"If this issue persists, please contact your administrator.",type:"error"})}};return(t,a)=>{const r=K("RouterLink");return f(),v(j,null,{sectionTitle:s(()=>[...a[1]||(a[1]=[y("Security",-1)])]),pageTitle:s(()=>[a[2]||(a[2]=y(" Services ",-1)),i(o(O),{class:"ml-1"},{content:s(()=>[i(P,{page:"services"})]),_:1})]),default:s(()=>[l.value&&_.value.length<1?(f(),v(o(T),{key:0,subject:"Service",onCreate:a[0]||(a[0]=e=>t.$router.push({name:"newService",params:{companyName:n.value}}))})):l.value?(f(),v(o(R),{key:1,ref_key:"crudTable",ref:g,"entity-options":$.value,"search-options":N.value,"show-reload-button":!0,headers:h.value,"entity-provider":w,"empty-message":"No services found","backend-pagination-sorting":"",pagination:{itemsPerPage:50},"show-get-started-component-if-empty":!1},{"create-button":s(()=>[L("div",A,[i(r,{to:{name:"newService",params:{companyName:n.value}}},{default:s(()=>[i(o(z),{class:"hidden md:inline-flex","data-testid":"create-service"},{default:s(()=>[i(o(B),{class:"mr-1.5 h-5 w-5 text-white","aria-hidden":"true"}),a[3]||(a[3]=y(" Create new ",-1))]),_:1})]),_:1},8,["to"])])]),actions:s(({row:e})=>[i(r,{class:"inline-flex items-center",to:{name:"updateService",params:{companyName:n.value,serviceId:e.id}}},{default:s(()=>[i(o(M),{"data-testid":`edit-service-${e.id}`,"allow-propagation":""},null,8,["data-testid"])]),_:2},1032,["to"]),i(o(V),{"data-testid":`delete-service-${e.id}`,onClick:d=>b(e)},null,8,["data-testid","onClick"])]),_:1},8,["entity-options","search-options","headers"])):I("",!0),i(o(E),{ref_key:"removeModal",ref:m},null,512)]),_:1})}}});
1export{ae as default};

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.