PageSourceSearch

https://nextthere.com/assets/DeviceView-CSp7ijnq.js

js nextthere.com collected 2026-09-24 19:04:17 UTC 8,942 bytes, 1 lines download raw bytes

1var U=Object.defineProperty;var V=(c,t,e)=>t in c?U(c,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):c[t]=e;var y=(c,t,e)=>V(c,typeof t!="symbol"?t+"":t,e);import{U as L,an as P,x as T,d as I,a as o,e as s,b as m,F as B,l as R,g as r,s as E,w as d,n as w,t as u,k as x,v as g,h as $,o as a,r as f,i as F,p as q,m as z}from"./index-DbpIxVVg.js";import{D}from"./Device-DZVV7L7n.js";import{S as G,D as K}from"./SubscriberRule-TXsZFwtf.js";import{P as Q}from"./PageHeader-D-doL8ee.js";import{R as b}from"./RoundedBadge-zDfp8xRL.js";import{P as W}from"./PageContent-CaO1rUex.js";import{_ as X}from"./ErrorView.vue_vue_type_script_setup_true_lang-rTuR_K5N.js";import{_ as Y}from"./TabButton.vue_vue_type_script_setup_true_lang-DJ9AO_wF.js";import{D as Z}from"./DeviceNotificationService-Bp7AAmL5.js";import{A as j}from"./ActivityIndicator-CHNVpzvm.js";import{_ as ee}from"./ErrorContentInline.vue_vue_type_script_setup_true_lang-BO8DfpHc.js";import{r as te}from"./CheckIcon-Dnwzojqc.js";import{_ as ie}from"./FacetedBrowser.vue_vue_type_script_setup_true_lang-Cs4mlYX6.js";import{_ as se}from"./InfiniteScrollContainer.vue_vue_type_script_setup_true_lang-CnH9kMjl.js";import{r as ae}from"./ArrowDownTrayIcon-B8ldtCWP.js";import{A as oe}from"./ActivityIndicatorIcon-DNADDTWG.js";import{r as re}from"./UserCircleIcon-CrIC4GtU.js";import"./ErrorContent.vue_vue_type_script_setup_true_lang--XFDxIpt.js";import"./ArrowTopRightOnSquareIcon-Bwi8lzNJ.js";import"./ChevronRightIcon-CKGSa4-R.js";import"./disclosure-DbKVSJYz.js";import"./keyboard-C910qfwt.js";import"./NotificationItem-4HMpixlg.js";import"./PaginatedResultSet-gBeGRM8h.js";import"./Stop-8NKSpgr4.js";import"./FacetGroupResultSet-C1YPHhsR.js";import"./InlineXButton.vue_vue_type_script_setup_true_lang-CVY-HK_d.js";import"./XMarkIcon-CeSt-Lep.js";class M{constructor(){y(this,"device");y(this,"user");y(this,"application");y(this,"subscriber");y(this,"rules")}
1static fromJSON(t){const e=new M;return e.device=D.fromJSON(t.device),e.user=t.user&&L.fromJSON(t.user),e.application=t.application&&P.fromJSON(t.application),e.subscriber=t.subscriber,e.rules=t.rules instanceof Array?t.rules.map(n=>G.fromJSON(n)):void 0,e}}class ne{constructor(t=T().apiClient){y(this,"client");this.client=t}async findById(t){const e=await this.client.get(`/v1/device/${t}`);return M.fromJSON(e.data)}findDevicesForUser(t){return this.client.get(`/v1/user/${t.id}/devices`).then(e=>e.data.devices.map(i=>D.fromJSON(i)))}}const ce={class:"inline-block min-w-full py-2 align-middle"},le={class:"overflow-hidden shadow-sm ring-1 ring-black ring-opacity-5 sm:rounded-lg"},de={class:"min-w-full divide-y divide-gray-300-d"},ue={class:"bg-gray-50-d divide-y divide-gray-200 dark:divide-gray-800"},pe={class:"py-4 pl-4 pr-3 text-sm sm:pl-6 align-top"},me={class:"md:flex items-top"},fe={class:"-my-1 flex space-x-1"},ve={class:"whitespace-nowrap py-4 pl-4 pr-4 lg:pr-6 text-sm text-gray-700-d align-top"},ye={key:0},_e={key:1},ge={key:2,class:"text-gray-400-d"},xe={key:3,class:"text-red-800 dark:text-red-500"},he={key:0},be=I({__name:"DeviceViewNotificationTable",props:{items:{type:Array,required:!0}},setup(c){return(t,e)=>{const n=E("router-link");return a(),o("div",ce,[s("div",le,[s("table",de,[e[3]||(e[3]=s("thead",{class:"bg-gray-100-d"},[s("tr",null,[s("th",{scope:"col",class:"py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 dark:text-gray-100 sm:pl-6"}," Notification "),s("th",{scope:"col",class:"py-3.5 pl-4 pr-4 lg:pr-6 text-right text-sm font-semibold text-gray-900 dark:text-gray-100"}," Sent ")])],-1)),s("tbody",ue,[(a(!0),o(B,null,R(c.items,i=>(a(),o("tr",{key:i.deviceNotification.id},[s("td",pe,[r(n,{to:`/application/notification/item/${i.notificationItem.id}`},{default:d(()=>[s("div",me,[s("div",{class:w(["font-bold mr-2 flex-1",i.notificationItem.isArchived?"text-gray-700-d":"text-gray-900-d"])},u(i.notificationItem.title),3),s("div",fe,[r(b,{class:w([i.deviceNotification.statusCss,"py-0.5"])},{default:d(()=>[g(u(i.deviceNotification.statusName),1)]),_:2},1032,["class"]),i.deviceNotification.readTimestamp?(a(),x(b,{key:0,title:i.deviceNotification.readTimestamp.toFormat("ccc dd MMMM yyyy HH:mm:ss"),class:"bg-green-600 text-white flex py-0.5"},{default:d(()=>[r($(te),{class:"w-5 h-5 mr-1"}),e[0]||(e[0]=g(" Read ",-1))]),_:2,__:[0]},1032,["title"])):i.deviceNotification.notificationErrorId?(a(),x(b,{key:1,class:"bg-red-500-d text-white-d"},{default:d(()=>e[1]||(e[1]=[g(" Error ",-1)])),_:1,__:[1]})):m("",!0)])]),i.notificationItem.subtitle?(a(),o("div",{key:0,class:w(["mt-1",i.notificationItem.isArchived?"text-gray-500":"text-gray-700-d"])},u(i.notificationItem.subtitle),3)):m("",!0),i.notificationItem.body?(a(),o("div",{key:1,class:w(["mt-2",i.notificationItem.isArchived?"text-gray-400-d":"text-gray-600-d"])},u(i.notificationItem.body),3)):m("",!0)]),_:2},1032,["to"])]),s("td",ve,[i.deviceNotification.sentTimestamp?(a(),o("span",ye,u(i.deviceNotification.sentTimestamp.toFormat("ccc dd MMMM yyyy HH:mm:ss")),1)):i.deviceNotification.status===$(K).pending?(a(),o("span",_e,"Pending")):(a(),o("span",ge,u(i.notificationItem.createdDate.toFormat("ccc dd MMMM yyyy HH:mm:ss")),1)),i.deviceNotification.notificationError?(a(),o("span",xe," Error: "+u(i.deviceNotification.notificationError.displayName),1)):m("",!0)])]))),128)),c.items.length===0?(a(),o("tr",he,e[2]||(e[2]=[s("td",{colspan:"6",class:"px-3 py-8 text-gray-500 text-center text-sm"}," No notifications have been sent to this device. ",-1)]))):m("",!0)])])])])}}}),ke={class:"lg:grid lg:grid-cols-5 lg:gap-8"},Ne={class:"lg:block"},we={class:"lg:col-span-4"},$e={key:0},Se={class:"whitespace-pre font-mono text-sm mt-4"},Ie=I({__name:"DeviceViewNotificationList",props:{device:{type:D,required:!0},searchText:{type:String}},setup(c){const t=c,e=f(),n=f(),i=f(!1),p=f(),k=f(!0),S=new Z,N=z(),_=T();F(()=>h()),q(()=>t.searchText,()=>h());async function h(){await A(0)}async function H(v){await A(e.value.items.length),v()}async function A(v=0){try{p.value=null,i.value=!0;const l=await S.findByDevice(t.device,{searchText:t.searchText},v);v===0?e.value=l:e.value.items.push(...l.items),k.value=l.items.length===l.pagination.perPage}catch(l){p.value=l}finally{i.value=!1}}function J(v,l){N.replace({query:{searchText:l!=null&&l.length?l:void 0}})}function O(){const v=`${_.baseUrl}/v1/device/${t.device.id}/${t.device.guid}/notification/list?format=csv&limit=10000`;window.open(v,"_self")}return(v,l)=>(a(),o("div",ke,[s("div",Ne,[r(ie,{"result-set":n.value,"entity-display-name":"notifications",onUpdateFacets:J},null,8,["result-set"]),s("button",{class:"btn btn-light text-center flex space-x-3",onClick:O},[r($(ae),{class:"w-5 h-5"}),l[0]||(l[0]=s("span",null,"Export",-1))])]),s("main",we,[r(se,{"more-available":k.value,onLoadMore:H},{default:d(()=>{var C;return[(C=e.value)!=null&&C.items?(a(),o("div",$e,[r(be,{items:e.value.items},null,8,["items"])])):i.value?(a(),x(j,{key:1})):p.value?(a(),x(ee,{key:2,error:p.value,header:"Error retrieving notifications"},{default:d(()=>[s("div",Se,u(p.value.stack),1)]),_:1},8,["error"])):m("",!0)]}),_:1},8,["more-available"])])]))}}),De={class:"space-y-2"}
1,Me={key:0,class:"sm:flex justify-between space-y-4 sm:space-y-0"},Ae={class:"flex-1 space-y-3"},Ce={class:"flex items-center space-x-4"},Te={class:"text-2xl font-medium flex-1"},Be={key:0,class:"flex text-base"},Ee={class:"text-sm"},Fe={key:1},He={class:"flex space-x-4","aria-label":"Tabs"},pt=I({__name:"DeviceView",props:{deviceId:{type:String,required:!0},searchText:{type:String}},setup(c){const t=c,e=f(),n=f(),i=f(!1),p=f(),k=new ne;F(()=>S());async function S(){try{i.value=!0,p.value=null,n.value=await k.findById(t.deviceId),e.value=n.value.device}catch(N){p.value=N}finally{i.value=!1}}return(N,_)=>{const h=E("router-link");return a(),o(B,null,[r(Q,null,{default:d(()=>[s("div",De,[e.value?(a(),o("div",Me,[s("div",Ae,[s("div",Ce,[s("h2",Te,"Device #"+u(e.value.id),1),n.value.user?(a(),o("div",Be,[_[0]||(_[0]=s("div",{class:"text-gray-500"},"Logged in as",-1)),r(h,{to:n.value.user.viewUrl,class:"flex space-x-2 px-2 block text-sky-500-d"},{default:d(()=>[r($(re),{class:"w-5 h-5"}),s("div",null,u(n.value.user.displayName),1)]),_:1},8,["to"])])):m("",!0)]),s("div",Ee,[r(h,{to:n.value.application.viewUrl},{default:d(()=>[r(b,{class:"bg-gray-200 dark:bg-black px-3 py-2"},{default:d(()=>[g(u(n.value.application.title),1)]),_:1})]),_:1},8,["to"]),r(b,{class:"bg-gray-200 dark:bg-black px-3 py-2"},{default:d(()=>[g(u(e.value.type),1)]),_:1})])])])):m("",!0)])]),_:1}),r(W,null,{default:d(()=>[p.value?(a(),x(X,{key:0,error:p.value},null,8,["error"])):n.value?(a(),o("div",Fe,[s("nav",He,[r(Y,{selected:!0},{default:d(()=>_[1]||(_[1]=[g("Notification history",-1)])),_:1,__:[1]})]),r(Ie,{device:e.value,class:"mt-4","search-text":c.searchText},null,8,["device","search-text"])])):i.value?(a(),x(oe,{key:2,class:"w-5 h-5"})):m("",!0)]),_:1})],64)}}});export{pt 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.