Update rollbar payload

This commit is contained in:
Rick Carlino 2018-03-19 11:03:00 -05:00
parent bcbbda2245
commit 5fb465ee79
3 changed files with 2 additions and 4 deletions

View file

@ -16,6 +16,7 @@ class DashboardController < ApplicationController
[:main_app, :front_page, :verify, :password_reset].map do |actn|
define_method(actn) do
@rev = LONG_REVISION
@fbos_version = current_user&.device&.fbos_version || "0.0.0"
begin
response.headers["Cache-Control"] = "no-cache, no-store"
response.headers["Pragma"] = "no-cache"

View file

@ -14,6 +14,7 @@ try {
captureUnhandledRejections: true,
payload: {
person: user,
fbos: <%= raw (@fbos_version || "0.0.0").to_json %>,
environment: window.location.host,
client: {
javascript: {

View file

@ -107,10 +107,6 @@ export function shouldDisplay(
const target = override || current;
if (isString(target)) {
const min = (lookupData || {})[feature] || MinVersionOverride.NEVER;
console.log("CHANGING ROLLBAR FBOS VERSION TO " + (target || "NONE"));
window.Rollbar && window
.Rollbar
.global({ payload: { client: { javascript: { fbos_version: target } } } });
switch (semverCompare(target, min)) {
case SemverResult.LEFT_IS_GREATER:
case SemverResult.EQUAL: