Skip to content

Commit

Permalink
GpNetTools: mv computed title and descr to onconfig event
Browse files Browse the repository at this point in the history
  • Loading branch information
xbpcb committed Dec 19, 2024
1 parent 12c9c39 commit da90967
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions src/views/pages/globalping/network-tools.html
Original file line number Diff line number Diff line change
Expand Up @@ -223,22 +223,6 @@ <h1>{{displayingTestType}} from multiple locations in </h1>
const PROBE_STATUS_OFFLINE = _.getProbeStatusOfflineValue();

component.exports = {
computed: {
title () {
let { rawTestType, rawLocation } = this.getInitialRawDataFromUrl();
// create temp title, before any checks, required by GA
let title = this.createMetaTitle(rawTestType, rawLocation);

return title;
},
description () {
let { rawTestType, rawLocation } = this.getInitialRawDataFromUrl();
// create temp descr, before any checks, required by GA
let description = this.createMetaDescr(rawTestType, rawLocation);

return description;
},
},
data () {
return {
_,
Expand Down Expand Up @@ -296,6 +280,17 @@ <h1>{{displayingTestType}} from multiple locations in </h1>
allRequiredDataReady: false,
};
},
onconfig () {
if (!Ractive.isServer) {
let { rawTestType, rawLocation } = this.getInitialRawDataFromUrl();
// create temp title, descr before any checks, required by GA
let title = this.createMetaTitle(rawTestType, rawLocation);
let description = this.createMetaDescr(rawTestType, rawLocation);

this.set('title', title);
this.set('description', description);
}
},
oninit () {
if (!Ractive.isServer) {
this.getGlobalpingProbesData();
Expand Down

0 comments on commit da90967

Please sign in to comment.