PageSourceSearch

https://hub.avibox.ru/assets/ServiceLevel-DlIGn5Fc.js

js avibox.ru collected 2026-09-24 15:13:28 UTC 9,889 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ServiceLevelTrendPopup-BefgYuRh.js","assets/charts-B-02dpr1.js","assets/vendor-DUoYKxKf.js","assets/vendor-CJjU_8H4.css","assets/index-BcPf-nBI.js","assets/vue-core-BW8FD41h.js","assets/index-B_0Nq1Z-.css","assets/SegmentedControl-Ca0HZE_7.js","assets/UnreadBadge-DVxpEG74.js","assets/UnreadBadge-rKhzYtCa.css","assets/SegmentedControl-CfQ1gFcj.css","assets/ServiceLevelTrendPopup-DpxNIEnl.css"])))=>i.map(i=>d[i]);
2import{ab as ve,T as fe,_ as he,g as ke,d as ye}from"./index-BcPf-nBI.js";import{dI as ge,ed as m,dw as f,eE as I,e3 as Ce,ei as be,e7 as a,dB as l,aL as w,ef as N,eH as _,eI as xe,dy as o,em as c,dA as A,eJ as D,dF as n,er as d,$ as z,Z as L,dz as h,eG as u,dE as k,aO as Ie,dH as we,dY as Ae}from"./vendor-DUoYKxKf.js";import{u as De}from"./vue-core-BW8FD41h.js";import{T as Le}from"./Table-BWHKNJiS.js";import{S as K}from"./StatusPill-BD38qi8e.js";import{T as q}from"./Tooltip-C2AfkjJp.js";import{N as Pe}from"./NoDataMessage-DJLo0zyQ.js";import{L as Se}from"./LoadErrorState-CkL7iwp_.js";import{C as Te}from"./ConfirmPopup-hxhE88wv.js";import{O as We}from"./OpenInAdsPowerButton-BpN0mnzD.js";import{u as Oe,A as Re}from"./useAdspower-B86JrdTI.js";import{u as $e,D as M}from"./useMonitoringDismiss-Ca60EY0n.js";import"./CopyButton.vue_vue_type_script_setup_true_lang-DUqHItUu.js";import"./clipboard-Dw6gfW3R.js";import"./ProfileAvatar-B9TVcWCe.js";import"./avatar-placeholder-MmQ9fg6u.js";import"./usePersistentSetting-CkvRMRs-.js";import"./adspower-Bxg70lAO.js";import"./useToast-DR0vBTf1.js";const Ee={key:0,class:"profile-cards"},Ne=["onClick","onKeydown"],ze={class:"profile-card__header"},Me={class:"profile-card__avatar-block"},Be=["src","alt"],Ve={key:1,class:"profile-card__avatar profile-card__avatar--placeholder"},He={class:"profile-card__identity"},Ue={key:0,class:"profile-card__title"},Fe={class:"profile-card__name profile-card__name--link"},Ke={class:"profile-card__id"},qe=["onClick"],Ge={class:"profile-card__footer"},Xe={class:"reco"},Je={key:1,class:"action-select"},Ye=["onClick"],Ze={class:"custom-header"},je={class:"custom-header"},Qe={class:"reco"},et={key:1,class:"action-select"},G=900,tt=ge({__name:"ServiceLevel",emits:["update:displayCount","update:displayLabel","update:activeProfileIds","closeImmediately","ready"],setup(it,{emit:X}){const{refreshActiveProfiles:J}=Oe(),Y=we(()=>he(()=>import("./ServiceLevelTrendPopup-BefgYuRh.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]))),y=m(null),P=t=>{y.value=Number(t.id)},{isMobile:Z,isTablet:j,isDesktopXl:Q,isDesktopL:ee}
2=ve(),te=f(()=>Z.value||j.value),B=De(),ie=m(B.query.profile_id?Number(B.query.profile_id):null),{isDismissed:S,activeIds:se,setAllIds:ae,dismiss:le,dismissAll:oe,undismiss:re,pendingUndoProfileId:g,ready:ne}=$e("service_level"),C=m(!1),T={header:"#",key:"row_num",width:"36px",minWidth:"36px",maxWidth:"36px",textAlign:"center"},W={header:"Уровень сервиса",key:"overall_score",minWidth:"160px",maxWidth:"160px",textAlign:"center"},O={header:"Рекомендация",key:"recommendation",minWidth:"320px"},de={header:"",key:"adspower",width:"48px",minWidth:"48px",maxWidth:"48px",textAlign:"center"},ce=f(()=>p.value.some(t=>!!t.adspower_profile_id)),ue=f(()=>{const t=ce.value?[de]:[];return Q.value?[T,{header:"Профиль Авито",key:"name",minWidth:"300px",maxWidth:"420px"},W,O,...t,M]:ee.value?[T,{header:"Профиль Авито",key:"name",minWidth:"260px",maxWidth:"380px"},W,O,...t,M]:[T,{header:"Профиль",key:"name",minWidth:"200px",maxWidth:"320px"},W,O,...t,M]}),V=t=>t==="red"?"danger":t==="yellow"||t==="orange"?"warning":t==="green"?"success":"neutral",H=t=>{const e=(t.description_text??"").trim();return{content:e?e.length>G?`${e.slice(0,G)}…`:e:"Авито не даёт расшифровку по этому критерию — откройте раздел «Уровень сервиса» в кабинете Авито",width:460}},p=m([]),b=f(()=>p.value.filter(t=>!S(t.id))),pe=f(()=>p.value.filter(t=>S(t.id)).length);I(p,t=>{ae(t.map(e=>e.id))},{immediate:!0}),I(se,t=>{v("update:activeProfileIds",[...t])},{immediate:!0}),I(p,t=>{const e=t.map(s=>s.adspower_profile_id).filter(s=>!!s);e.length&&J(e)},{once:!0});const x=m(!1),R=m(null),$=m(0),E=m(!1),v=X;I([()=>$.value,()=>pe.value],([t,e])=>{const s=t-e;v("update:displayCount",s>0?s:null),v("update:displayLabel",["профиль","профиля","профилей"])},{immediate:!0});const U=async()=>{x.value=!0,E.value=!1;try{const{data:t}=await ke.get("/monitoring/service-level"),e=t.profiles??[];p.value=e.map(s=>({id:s.profile_id,name:s.name??"—",title:s.title??null,profile_url:s.url??null,profile_info_loaded:!0,avatar_url:s.avatar_url??null,adspower_profile_id:s.adspower_profile_id??null,overall_score:s.overall_score??0,color:s.color??"neutral",weak_criteria:s.weak_criteria??[]})),$.value=t.total??p.value.length}catch{E.value=!0,p.value=[],$.value=0}finally{x.value=!1,Ae(()=>v("ready"))}},F=t=>le(t),me=()=>{g.value!==null&&re(g.value)},_e=async()=>{const t=p.value.map(e=>e.id).filter(e=>!S(e));C.value=!1,R.value&&(R.value.style.opacity="0"),v("closeImmediately"),oe(t)};return Ce(async()=>{await ne,await U()}),(t,e)=>{const s=be("tooltip");return a(),l("div",{ref_key:"containerRef",ref:R,class:"service-level-container"},[b.value.length&&!x.value?(a(),l(w,{key:0},[te.value?(a(),l("div",Ee,[(a(!0),l(w,null,N(b.value,i=>_((a(),l("div",{key:i.id,class:"profile-card profile-card--clickable",role:"button",tabindex:"0",onClick:r=>P(i),onKeydown:xe(r=>P(i),["enter"])},[o("div",ze,[o("div",Me,[i.avatar_url?(a(),l("img",{key:0,src:i.avatar_url,alt:i.name,class:"profile-card__avatar"},null,8,Be)):(a(),l("div",Ve,c((i.name||"?")[0]),1)),o("div",He,[i.title?(a(),l("span",Ue,c(i.title),1)):A("",!0),o("span",Fe,c(i.name),1),o("span",Ke,"ID: "+c(i.id),1)])]),_((a(),l("button",{class:"dismiss-btn",onClick:D(r=>F(i.id),["stop"])},[n(d(z),{size:18})],8,qe)),[[s,"Отметить проверенным"]]),n(K,{tone:V(i.color),label:`${i.overall_score}%`},null,8,["tone","label"])]),o("div",Ge,[o("div",Xe,[i.weak_criteria.length?(a(!0),l(w,{key:0},N(i.weak_criteria,r=>_((a(),l("div",{key:r.criterion_key,class:"reco__line"},[n(d(L),{size:12,class:"advice-icon"}),o("strong",null,"«"+c(r.criterion_title)+"» — "+c(r.score)+"%",1)])),[[s,H(r)]])),128)):(a(),l("div",Je,[n(d(L),{size:12,class:"advice-icon"}),e[4]||(e[4]=o("span",null,"Уровень сервиса ниже 40% — улучшите показатели профиля",-1))]))])])],40,Ne)),[[s,"Подробные показатели уровня сервиса"]])),128))])):(a(),h(Le,{key:1,"aria-label":"Уровень сервиса профилей",class:"check-table check-table--clickable",columns:ue.value,data:b.value,highlightRowId:ie.value,autoHeight:"",onRowClick:P},{"header-dismiss":u(()=>
2[_((a(),l("button",{class:"dismiss-all-btn",onClick:e[0]||(e[0]=D(i=>C.value=!0,["stop"]))},[n(d(z),{size:16})])),[[s,"Скрыть все"]])]),dismiss:u(({row:i})=>[_((a(),l("button",{class:"dismiss-btn",onClick:D(r=>F(i.id),["stop"])},[n(d(z),{size:18})],8,Ye)),[[s,"Отметить проверенным"]])]),"header-overall_score":u(({header:i})=>[o("span",Ze,[k(c(i)+" ",1),n(q,{direction:"bottom",width:260},{default:u(()=>e[5]||(e[5]=[k(" Балл уровня сервиса Авито (0–100%). Ниже 40% — красная зона: снижает показы объявлений в поиске. ")])),_:1})])]),overall_score:u(({row:i})=>[n(K,{tone:V(i.color),label:`${i.overall_score}%`},null,8,["tone","label"])]),"header-recommendation":u(({header:i})=>[o("span",je,[k(c(i)+" ",1),n(q,{direction:"bottom",width:280},{default:u(()=>e[6]||(e[6]=[k(" Что тянет уровень сервиса вниз — просевшие критерии Авито (ниже 40%) и как их поднять. ")])),_:1})])]),recommendation:u(({row:i})=>[o("div",Qe,[i.weak_criteria.length?(a(!0),l(w,{key:0},N(i.weak_criteria,r=>_((a(),l("div",{key:r.criterion_key,class:"reco__line"},[n(d(L),{size:12,class:"advice-icon"}),o("strong",null,"«"+c(r.criterion_title)+"» — "+c(r.score)+"%",1)])),[[s,H(r)]])),128)):(a(),l("div",et,[n(d(L),{size:12,class:"advice-icon"}),e[7]||(e[7]=o("span",null,"Уровень сервиса ниже 40% — улучшите показатели профиля",-1))]))])]),adspower:u(({row:i})=>[i.adspower_profile_id?(a(),h(We,{key:0,"adspower-profile-id":i.adspower_profile_id,url:d(Re).reputation(),tooltip:"Открыть репутацию в AdsPower"},null,8,["adspower-profile-id","url"])):A("",!0)]),_:1},8,["columns","data","highlightRowId"]))],64)):E.value?(a(),h(Se,{key:1,message:"Не удалось загрузить уровень сервиса",hint:"Проверьте подключение и попробуйте ещё раз",onRetry:U})):x.value?A("",!0):(a(),h(Pe,{key:2,icon:d(Ie),title:"Уровень сервиса в норме",description:"Профилей в красной зоне (ниже 40%) нет"},null,8,["icon"])),n(fe,{visible:d(g)!==null,duration:5e3,onClose:e[1]||(e[1]=i=>g.value=null)},{default:u(()=>[e[8]||(e[8]=k(" Профиль скрыт до конца дня ")),o("span",{class:"dismiss-undo",onClick:D(me,["stop"])},"Отменить")]),_:1},8,["visible"]),n(Te,{visible:C.value,severity:"warning",title:"Скрыть все профили?",message:`${b.value.length} профилей будут скрыты до конца дня`,confirmText:"Скрыть все",cancelText:"Отмена",onConfirm:_e,onCancel:e[2]||(e[2]=i=>C.value=!1)},null,8,["visible","message"]),y.value!==null?(a(),h(d(Y),{key:3,profileId:y.value,onClose:e[3]||(e[3]=i=>y.value=null)},null,8,["profileId"])):A("",!0)],512)}}}),bt=ye(tt,[["__scopeId","data-v-116aa7b4"]]);export{bt 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.