1Vue.component("spark-kiosk-blocked-urls",{props:["user"],data:()=>({blockedShortLinks:[],blockedShortLinksError:null,blockedShortLinksLoading:!1,blockedShortLinksDateRange:{startDate:null,endDate:null},blockedShortLinksPage:1,blockedShortLinksPerPage:50,blockedShortLinksLastPage:1,blockedShortLinksTotal:0}),computed:{blockedShortLinksRanges(){const t=moment(),e=moment("2018-01-01","YYYY-MM-DD");return{"Last 24 Hours":[t.clone().subtract(24,"hours").toDate(),t.toDate()],"Last 48 Hours":[t.clone().subtract(48,"hours").toDate(),t.toDate()],Today:[t.clone().startOf("day").toDate(),t.toDate()],Yesterday:[t.clone().subtract(1,"day").startOf("day").toDate(),t.clone().subtract(1,"day").endOf("day").toDate()],"Last 7 Days":[t.clone().subtract(7,"days").toDate(),t.toDate()],"Last 30 Days":[t.clone().subtract(30,"days").toDate(),t.toDate()],"This Month":[t.clone().startOf("month").toDate(),t.toDate()],"Last Month":[t.clone().subtract(1,"month").startOf("month").toDate(),t.clone().subtract(1,"month").endOf("month").toDate()],"This Year":[t.clone().startOf("year").toDate(),t.toDate()],"All Time":[e.toDate(),t.toDate()]}},blockedShortLinksPageLinks(){const t=Number(this.blockedShortLinksLastPage||1),e=Number(this.blockedShortLinksPage||1);if(t<=1)return[1];const o=new Set([1,t]);for(let n=e-2;n<=e+2;n++)n>=1&&n<=t&&o.add(n);const s=Array.from(o).sort((t,e)=>t-e),a=[];for(let n=0;n<s.length;n++){const t=s[n],e=s[n-1];n>0&&e&&t-e>1&&a.push("..."),a.push(t)}return a}},created(){Bus.$on("sparkHashChanged",t=>{"blocked-urls"===t&&(this.initBlockedShortLinksFilters(),this.blockedShortLinksPage=1,this.getBlockedShortLinks())})},methods:{initBlockedShortLinksFilters(){this.blockedShortLinksDateRange||(this.blockedShortLinksDateRange={startDate:null,endDate:null}),this.blockedShortLinksDateRange.endDate||(this.blockedShortLinksDateRange.endDate=moment().toDate()),this.blockedShortLinksDateRange.startDate||(this.blockedShortLinksDateRange.startDate=moment(this.blockedShortLinksDateRange.endDate).subtract(1,"day").toDate())},onBlockedShortLinksDateRangeUpdated(){this.blockedShortLinksPage=1,this.getBlockedShortLinks()},getBlockedShortLinks(){this.blockedShortLinksLoading=!0,this.blockedShortLinksError=null;var t={per_page:this.blockedShortLinksPerPage||50,page:this.blockedShortLinksPage||1},e=this.blockedShortLinksDateRange&&this.blockedShortLinksDateRange.startDate?moment(this.blockedShortLinksDateRange.startDate):null,o=this.blockedShortLinksDateRange&&this.blockedShortLinksDateRange.endDate?moment(this.blockedShortLinksDateRange.endDate):null;e&&e.isValid()&&(t.start=e.toISOString()),o&&o.isValid()&&(t.end=o.toISOString()),axios.get("/spark/kiosk/performance-indicators/blocked-short-links",{params:t}).then(t=>{this.blockedShortLinks=t.data.items||[],this.blockedShortLinksTotal=Number(t.data.total||0),this.blockedShortLinksLastPage=Number(t.data.last_page||1),this.blockedShortLinksPage=Number(t.data.page||this.blockedShortLinksPage||1),this.blockedShortLinksLoading=!1}).catch(t=>{var e="Failed to load blocked short links.";t&&t.response&&t.response.data&&t.response.data.message&&(e=t.response.data.message),this.blockedShortLinksError=e,this.blockedShortLinks=[],this.blockedShortLinksTotal=0,this.blockedShortLinksLastPage=1,this.blockedShortLinksLoading=!1})},goToBlockedShortLinksPage(t){const e=Number(t);Number.isFinite(e)&&(e<1||e>Number(this.blockedShortLinksLastPage||1)||e!==Number(this.blockedShortLinksPage||1)&&(this.blockedShortLinksPage=e,this.getBlockedShortLinks()))},statsUrl:t=>t?"/stats?url="+encodeURIComponent(t):"/stats",formatPickerDateTime:t=>t?moment(t).format("M/D/YY h:mm a"):"",scoreBadgeClass(t){if(null==t)return"badge-secondary";const e=Number(t);return!isFinite(e)||e<0?"badge-secondary":e<=20?"badge-success":e<=40?"badge-warning":"badge-danger"},scoreLabel(t){const e=Number(t);return!isFinite(e)||e<0?"N/A":String(Math.trunc(e))}}});
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.