module.exports= {
	views: [{
		"name": "Raw Match Data",
		"view": "matches"
	}],
	
	matches: function (mongoCollection, callback) {
		mongoCollection
			.find()
			.sort({"_id": -1})
			.toArray(function (err, matches) {
				callback([
					{
							name: "Matches",
							headers: [
								{
									text: "Team", 
									value: "team"	
								},
								{
									text: "Comments", 
									value: "comments"	
								},
								{
									text: "Device", 
									value: "sender"	
								}
							],
							data: matches
					}
				]);

				db.close();
			});
	}
};
module.exports= {
	views: [{
		"name": "Raw Match Data",
		"view": "matches"
	}],
	
	matches: function (mongoCollection, callback) {
		mongoCollection
			.find()
			.sort({"_id": -1})
			.toArray(function (err, matches) {
				callback([
					{
							name: "Matches",
							headers: [
								{
									text: "Team", 
									value: "team"	
								},
								{
									text: "Crossed Baseline", 
									value: "baseline"	
								},
                                {
                                    text: "Auto. Low Goal kPa",
                                    value: "auto-low-kPa"
                                },
                                {
                                    text: "Auto. High Goal kPa",
                                    value: "auto-high-kPa"
                                },
                                {
                                    text: "Auto. Gears Placed",
                                    value: "auto-gears"
                                },,
                                {
                                    text: "Teleop. Low Goal kPa",
                                    value: "teleop-low-kPa"
                                },
                                {
                                    text: "Teleop. High Goal kPa",
                                    value: "teleop-high-kPa"
                                },
                                {
                                    text: "Teleop. Gears Placed",
                                    value: "teleop-gears"
                                },
                                {
                                    text: "Pressed Touchpad",
                                    value: "touchpad"
                                },
								{
									text: "Comments", 
									value: "comments"	
								},
								{
									text: "Do Not Pick", 
									value: "do-not-pick"	
								},
                                
                                // AUTOGENERATED DATA
								{
									text: "Device", 
									value: "sender"	
								}
							],
							data: matches
					}
				]);

				db.close();
			});
	}
};


Add Support for More Raw Data Fields
Add Support for More Raw Data Fields
