1import{u as S,d as y,l as b,i as p,F as h,z as x,b as t,t as o,a as s,r as v,e as $,n as j,w as T,c as g,q}from"./_plugin-vue_export-helper-mLiuOBAR.js";import{D as C}from"./DataTable-BKxaIT8i.js";import{d as E}from"./vue-router-CoXrHkof.js";import{i as F}from"./axios-CHUUuE3h.js";import{u as O}from"./index-rSPSZu9R.js";import"./TablePagination.vue_vue_type_script_setup_true_lang-6TG7uyAH.js";import"./MoonLoader-C9z0uOD1.js";import"./TimeAgo.vue_vue_type_script_setup_true_lang-CyWB-mqq.js";import"./popper.esm-NgBuVqE_.js";import"./datetime--aNGSa2U.js";import"./en-US-B3j93Mbl.js";const B=E("syncHistoryEntries",()=>{const n=O(),{t:r}=S();return{loadSyncEntries:async(d,i,l,a,f)=>new Promise((w,m)=>{F.get(`/animals/${d}/sync_history_entries`,{params:{search:i,page:l,sort:a,direction:f},headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(_=>{w(_.data)}).catch(_=>{n.error(r("general.error")),m(_)})})}}),P={class:"mx-2"},z=y({__name:"InitialSync",props:{entry:{type:Object,required:!0}},setup(n){const r=n,e=b(()=>r.entry.meta);return(d,i)=>(s(!0),p(h,null,x(e.value,(l,a)=>(s(),p("div",{key:a,class:""},[t("strong",null,o(a)+":Â ",1),t("span",P,o(l[0]||"â"),1),i[0]||(i[0]=t("i",{class:"ti ti-arrow-right"},null,-1)),t("span",null,o(l[1]||"â"),1)]))),128))}}),H=y({__name:"LocationUpdated",props:{entry:{type:Object,required:!0}},setup(n){return(r,e)=>(s(),p("div",null,[e[0]||(e[0]=t("strong",null,"latitude:Â ",-1)),t("span",null,o(n.entry.meta.latitude||"â"),1),e[1]||(e[1]=t("br",null,null,-1)),e[2]||(e[2]=t("strong",null,"longitude:Â ",-1)),t("span",null,o(n.entry.meta.longitude||"â"),1),e[3]||(e[3]=t("br",null,null,-1)),e[4]||(e[4]=t("strong",null,"timestamp:Â ",-1)),t("span",null,o(n.entry.meta.timestamp||"â"),1),e[5]||(e[5]=t("br",null,null,-1))]))}}),N=y({__name:"TrackUpdated",props:{entry:{type:Object,required:!0}},setup(n){return(r,e)=>(s(),p("div",null,[e[0]||(e[0]=t("strong",null,"track type:Â ",-1)),t("span",null,o(n.entry.meta.track_type||"â"),1),e[1]||(e[1]=t("br",null,null,-1)),e[2]||(e[2]=t("strong",null,"locations count:Â ",-1)),t("span",null,o(n.entry.meta.locations_count||"â"),1)]))}}),U=y({__name:"TrackDeleted",props:{entry:{type:Object,required:!0}},setup(n){return(r,e)=>(s(),p("div",null,[e[0]||(e[0]=t("strong",null,"track type:Â ",-1)),t("span",null,o(n.entry.meta.track_type||"â"),1)]))}}),V={class:"mx-2"},A=y({__name:"AttributesUpdated",props:{entry:{type:Object,required:!0}},setup(n){const r=n,e=b(()=>r.entry.meta);return(d,i)=>(s(!0),p(h,null,x(e.value,(l,a)=>(s(),p("div",{key:a,class:""},[t("strong",null,o(a)+":Â ",1),t("span",V,o(l[0]||"â"),1),i[0]||(i[0]=t("i",{class:"ti ti-arrow-right"},null,-1)),t("span",null,o(l[1]||"â"),1)]))),128))}}),I={class:"container-fluid"},L={class:"row custom-page-header"},M={class:"col-12 mb-md-0 mb-2"},G={class:"page-title"},J={class:"row"},K={class:"col-lg-12"},Q={class:"text-muted"},lt=y({__name:"DeploymentSynchronizationHistory",props:{deployment:{type:Object,required:!0}},setup(n){const{t:r}=S(),{loadSyncEntries:e}=B(),d=n,i=v(1),l=v("desc"),a=v("created_at"),f=v(void 0),w=b(()=>({page:f.value,selectionMode:"none",identifierField:"id",sortDirection:l.value,sortedField:a.value,columns:[{field:"created_at",title:r("models.sync_history_entry.created_at"),useDateTimeFormatter:!0},{field:"sync_type",title:r("models.sync_history_entry.sync_type"),formatter:c=>r(`enums.sync_type.${c.sync_type}`)},{field:"meta",title:r("models.sync_history_entry.meta"),template:"metaTemplate"}]}));function m(){e(d.deployment.id,"",i.value,a.value,l.value).then(c=>{f.value=c})}m();function _(c){i.value=c,m()}function D(c,k){l.value=k,a.value=c,m()}return(c,k)=>(s(),p("div",I,[t("div",L,[t("div",M,[t("h1",G,o($(r)("deployments.navigation.synchronization_history")),1)])]),t("div",J,[t("div",K,[j(C,{"data-source":w.value,onPageChanged:_,onSortingChanged:D},{metaTemplate:T(u=>[t("div",Q,[u.row.sync_type==="initial_sync"?(s(),g(z,{key:0,entry:u.row},null,8,["entry"])):u.row.sync_type==="attributes_updated"?(s(),g(A,{key:1,entry:u.row},null,8,["entry"])):u.row.sync_type==="track_deleted"?(s(),g(U,{key:2,entry:u.row},null,8,["entry"])):u.row.sync_type==="track_updated"?(s(),g(N,{key:3,entry:u.row},null,8,["entry"])):u.row.sync_type==="location_updated"?(s(),g(H,{key:4,entry:u.row},null,8,["entry"])):q("",!0)])]),_:1},8,["data-source"])])])]))}});
1export{lt 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.