Skip to content

Commit 138512f

Browse files
aherlihydurran
authored andcommitted
COMPASS-550 - Better error checking for RTSS charts (#696)
1 parent 25d68ce commit 138512f

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

src/internal-packages/server-stats/lib/store/globallock-store.jsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,7 @@ const GlobalLockStore = Reflux.createStore({
4343
},
4444

4545
globalLock: function(error, doc, isPaused) {
46-
if (!doc.globalLock) {
47-
error = new Error('no global lock information returned from the serverstatus command');
48-
}
49-
if (!error && doc) {
46+
if (!error && doc && 'localTime' in doc && 'globalLock' in doc) {
5047
if (this.starting) {
5148
this.starting = false;
5249
return;

src/internal-packages/server-stats/lib/store/mem-store.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const MemStore = Reflux.createStore({
4242
},
4343

4444
mem: function(error, doc, isPaused) {
45-
if (!error && doc) {
45+
if (!error && doc && 'localTime' in doc && 'mem' in doc) {
4646
if (this.starting) {
4747
this.starting = false;
4848
return;

src/internal-packages/server-stats/lib/store/network-store.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const NetworkStore = Reflux.createStore({
5050
},
5151

5252
network: function(error, doc, isPaused) {
53-
if (!error && doc) {
53+
if (!error && doc && 'localTime' in doc && 'network' in doc) {
5454
let key;
5555
let val;
5656
let count;

src/internal-packages/server-stats/lib/store/opcounters-store.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const OpCounterStore = Reflux.createStore({
4848
},
4949

5050
opCounter: function(error, doc, isPaused) {
51-
if (!error && doc) {
51+
if (!error && doc && 'localTime' in doc && 'opcounters' in doc) {
5252
let key;
5353
let val;
5454
let count;

0 commit comments

Comments
 (0)