Exemplo n.º 1
0
define(function(require, exports, module) {
    var _ = require('underscore');
    var Backbone = require('backbone');
    var MockDataSource = require('testfx/mockdatasource');

    var DATA = {"preview":false,"init_offset":0,"messages":[{"type":"DEBUG","text":"Successfully read lookup file"},{"type":"DEBUG","text":"search context:"}],"fields":["count"],"rows":[["4"]]};

    var SearchBarMockDataSource = MockDataSource.extend({
        mockData: function() {            
            return DATA;
        },        
    });

    return SearchBarMockDataSource;
});
Exemplo n.º 2
0
define(function(require, exports, module) {
    var _ = require('underscore');
    var Backbone = require('backbone');
    var MockDataSource = require('testfx/mockdatasource');

    
    var TimelineMockDataSource = MockDataSource.extend({
        mockData: function() {            
            return DATA;
        },        
    });

    var DATA = 
       {
   "cursor_time":1361834617,
   "buckets":[
      {
         "total_count":38,
         "available_count":38,
         "is_finalized":true,
         "duration":1,
         "earliest_strftime":"2013-02-25T15:24:08.000-08:00",
         "earliest_time":1361834648,
         "earliest_time_offset":-28800,
         "latest_time_offset":-28800
      },
      {
         "total_count":0,
         "available_count":0,
         "is_finalized":true,
         "duration":1,
         "earliest_strftime":"2013-02-25T15:24:09.000-08:00",
         "earliest_time":1361834649,
         "earliest_time_offset":-28800,
         "latest_time_offset":-28800
      },
      {
         "total_count":0,
         "available_count":0,
         "is_finalized":true,
         "duration":1,
         "earliest_strftime":"2013-02-25T15:24:10.000-08:00",
         "earliest_time":1361834650,
         "earliest_time_offset":-28800,
         "latest_time_offset":-28800
      },
      {
         "total_count":0,
         "available_count":0,
         "is_finalized":true,
         "duration":1,
         "earliest_strftime":"2013-02-25T15:24:11.000-08:00",
         "earliest_time":1361834651,
         "earliest_time_offset":-28800,
         "latest_time_offset":-28800
      },
      {
         "total_count":0,
         "available_count":0,
         "is_finalized":true,
         "duration":1,
         "earliest_strftime":"2013-02-25T15:24:12.000-08:00",
         "earliest_time":1361834652,
         "earliest_time_offset":-28800,
         "latest_time_offset":-28800
      },
      {
         "total_count":0,
         "available_count":0,
         "is_finalized":true,
         "duration":1,
         "earliest_strftime":"2013-02-25T15:24:13.000-08:00",
         "earliest_time":1361834653,
         "earliest_time_offset":-28800,
         "latest_time_offset":-28800
      },
      {
         "total_count":0,
         "available_count":0,
         "is_finalized":true,
         "duration":1,
         "earliest_strftime":"2013-02-25T15:24:14.000-08:00",
         "earliest_time":1361834654,
         "earliest_time_offset":-28800,
         "latest_time_offset":-28800
      },
      {
         "total_count":0,
         "available_count":0,
         "is_finalized":true,
         "duration":1,
         "earliest_strftime":"2013-02-25T15:24:15.000-08:00",
         "earliest_time":1361834655,
         "earliest_time_offset":-28800,
         "latest_time_offset":-28800
      },
      {
         "total_count":0,
         "available_count":0,
         "is_finalized":true,
         "duration":1,
         "earliest_strftime":"2013-02-25T15:24:16.000-08:00",
         "earliest_time":1361834656,
         "earliest_time_offset":-28800,
         "latest_time_offset":-28800
      },
      {
         "total_count":0,
         "available_count":0,
         "is_finalized":true,
         "duration":1,
         "earliest_strftime":"2013-02-25T15:24:17.000-08:00",
         "earliest_time":1361834657,
         "earliest_time_offset":-28800,
         "latest_time_offset":-28800
      },
      {
         "total_count":0,
         "available_count":0,
         "is_finalized":true,
         "duration":1,
         "earliest_strftime":"2013-02-25T15:24:18.000-08:00",
         "earliest_time":1361834658,
         "earliest_time_offset":-28800,
         "latest_time_offset":-28800
      },
      {
         "total_count":0,
         "available_count":0,
         "is_finalized":true,
         "duration":1,
         "earliest_strftime":"2013-02-25T15:24:19.000-08:00",
         "earliest_time":1361834659,
         "earliest_time_offset":-28800,
         "latest_time_offset":-28800
      },
      {
         "total_count":0,
         "available_count":0,
         "is_finalized":true,
         "duration":1,
         "earliest_strftime":"2013-02-25T15:24:20.000-08:00",
         "earliest_time":1361834660,
         "earliest_time_offset":-28800,
         "latest_time_offset":-28800
      },
      {
         "total_count":0,
         "available_count":0,
         "is_finalized":true,
         "duration":1,
         "earliest_strftime":"2013-02-25T15:24:21.000-08:00",
         "earliest_time":1361834661,
         "earliest_time_offset":-28800,
         "latest_time_offset":-28800
      },
      {
         "total_count":0,
         "available_count":0,
         "is_finalized":true,
         "duration":1,
         "earliest_strftime":"2013-02-25T15:24:22.000-08:00",
         "earliest_time":1361834662,
         "earliest_time_offset":-28800,
         "latest_time_offset":-28800
      },
      {
         "total_count":0,
         "available_count":0,
         "is_finalized":true,
         "duration":1,
         "earliest_strftime":"2013-02-25T15:24:23.000-08:00",
         "earliest_time":1361834663,
         "earliest_time_offset":-28800,
         "latest_time_offset":-28800
      },
      {
         "total_count":1,
         "available_count":1,
         "is_finalized":true,
         "duration":1,
         "earliest_strftime":"2013-02-25T15:24:24.000-08:00",
         "earliest_time":1361834664,
         "earliest_time_offset":-28800,
         "latest_time_offset":-28800
      },
      {
         "total_count":4,
         "available_count":4,
         "is_finalized":true,
         "duration":1,
         "earliest_strftime":"2013-02-25T15:24:25.000-08:00",
         "earliest_time":1361834665,
         "earliest_time_offset":-28800,
         "latest_time_offset":-28800
      },
      {
         "total_count":1,
         "available_count":1,
         "is_finalized":true,
         "duration":1,
         "earliest_strftime":"2013-02-25T15:24:26.000-08:00",
         "earliest_time":1361834666,
         "earliest_time_offset":-28800,
         "latest_time_offset":-28800
      },
      {
         "total_count":0,
         "available_count":0,
         "is_finalized":true,
         "duration":1,
         "earliest_strftime":"2013-02-25T15:24:27.000-08:00",
         "earliest_time":1361834667,
         "earliest_time_offset":-28800,
         "latest_time_offset":-28800
      },
      {
         "total_count":1,
         "available_count":1,
         "is_finalized":true,
         "duration":1,
         "earliest_strftime":"2013-02-25T15:24:28.000-08:00",
         "earliest_time":1361834668,
         "earliest_time_offset":-28800,
         "latest_time_offset":-28800
      },
      {
         "total_count":0,
         "available_count":0,
         "is_finalized":true,
         "duration":1,
         "earliest_strftime":"2013-02-25T15:24:29.000-08:00",
         "earliest_time":1361834669,
         "earliest_time_offset":-28800,
         "latest_time_offset":-28800
      },
      {
         "total_count":0,
         "available_count":0,
         "is_finalized":true,
         "duration":1,
         "earliest_strftime":"2013-02-25T15:24:30.000-08:00",
         "earliest_time":1361834670,
         "earliest_time_offset":-28800,
         "latest_time_offset":-28800
      },
      {
         "total_count":0,
         "available_count":0,
         "is_finalized":true,
         "duration":1,
         "earliest_strftime":"2013-02-25T15:24:31.000-08:00",
         "earliest_time":1361834671,
         "earliest_time_offset":-28800,
         "latest_time_offset":-28800
      },
      {
         "total_count":0,
         "available_count":0,
         "is_finalized":true,
         "duration":1,
         "earliest_strftime":"2013-02-25T15:24:32.000-08:00",
         "earliest_time":1361834672,
         "earliest_time_offset":-28800,
         "latest_time_offset":-28800
      },
      {
         "total_count":0,
         "available_count":0,
         "is_finalized":true,
         "duration":1,
         "earliest_strftime":"2013-02-25T15:24:33.000-08:00",
         "earliest_time":1361834673,
         "earliest_time_offset":-28800,
         "latest_time_offset":-28800
      },
      {
         "total_count":0,
         "available_count":0,
         "is_finalized":true,
         "duration":1,
         "earliest_strftime":"2013-02-25T15:24:34.000-08:00",
         "earliest_time":1361834674,
         "earliest_time_offset":-28800,
         "latest_time_offset":-28800
      },
      {
         "total_count":0,
         "available_count":0,
         "is_finalized":true,
         "duration":1,
         "earliest_strftime":"2013-02-25T15:24:35.000-08:00",
         "earliest_time":1361834675,
         "earliest_time_offset":-28800,
         "latest_time_offset":-28800
      },
      {
         "total_count":0,
         "available_count":0,
         "is_finalized":true,
         "duration":1,
         "earliest_strftime":"2013-02-25T15:24:36.000-08:00",
         "earliest_time":1361834676,
         "earliest_time_offset":-28800,
         "latest_time_offset":-28800
      },
      {
         "total_count":0,
         "available_count":0,
         "is_finalized":true,
         "duration":1,
         "earliest_strftime":"2013-02-25T15:24:37.000-08:00",
         "earliest_time":1361834677,
         "earliest_time_offset":-28800,
         "latest_time_offset":-28800
      },
      {
         "total_count":0,
         "available_count":0,
         "is_finalized":true,
         "duration":1,
         "earliest_strftime":"2013-02-25T15:24:38.000-08:00",
         "earliest_time":1361834678,
         "earliest_time_offset":-28800,
         "latest_time_offset":-28800
      },
      {
         "total_count":55,
         "available_count":55,
         "is_finalized":true,
         "duration":1,
         "earliest_strftime":"2013-02-25T15:24:39.000-08:00",
         "earliest_time":1361834679,
         "earliest_time_offset":-28800,
         "latest_time_offset":-28800
      }
   ],
   "event_count":100
};


    return TimelineMockDataSource;
});