var funcs = [
	{
		_id:'TuxQueParser',
		value: function(host) {
			return function(data,next) {
				//data = JSON.parse(data)
				var arr = data.data.split(";")
				var obj = {}
				for(var i=0; i<arr.length; ++i) {
					var item = arr[i].split("=");
					if (item.length == 2) {
						obj[item[0]] = item[1];
					}
				}

				//printjson(obj)

				obj.host = host
				data.data = obj
				data.date = obj.time

				next();
			}
		}
	},
	{
		_id: "TuxQueLoader",
		value: function(data, host) {
			var engine = new LaEngine()
			engine.add(TuxQueParser(host)) //解析字串
			      .add(engine.save("YYYYMMDD"))    //按天保存
				  .add(engine.showError())//显示错误
				  .run(data,"TuxQue");
		}
	}
]

funcs.forEach(function(item){
	db.system.js.save(item);
})

@@ -270,24 +270,131 @@
 gth == 2) %7B%0A
+%09%09%09%09%09%09if (~%5B'serve', 'queued'%5D.indexOf(item%5B0%5D)) %7B%0A%09%09%09%09%09%09%09obj%5Bitem%5B0%5D%5D = parseInt(item%5B1%5D); %0A%09%09%09%09%09%09%7Delse%7B%0A%09
 %09%09%09%09%09%09obj%5Bit
@@ -411,16 +411,24 @@
 tem%5B1%5D;%0A
+%09%09%09%09%09%09%7D%0A
 %09%09%09%09%09%7D%0A%09
@@ -676,16 +676,16 @@
  //%E8%A7%A3%E6%9E%90%E5%AD%97%E4%B8%B2%0A
-
 %09%09%09     
@@ -725,16 +725,550 @@
  //%E6%8C%89%E5%A4%A9%E4%BF%9D%E5%AD%98%0A
+%09%09%09%09  .add(engine.sum(%22List%22, function()%7Breturn 1;%7D, %7B%0A%09%09%09%09 %09%09%09%22exp%22 : function(data) %7B%0A%09%09%09%09%09%09%09%09%09%09var obj=%7B%7D;obj.name=data.name;obj.queue=data.queue;obj.host=data.host;%0A%09%09%09%09%09%09%09%09%09%09if (data.queued%3C5) %7B%0A%09%09%09%09%09%09%09%09%09%09%09obj.type=%22lt_5%22;%0A%09%09%09%09%09%09%09%09%09%09%7Delse if (data.queued%3E=5&&data.queued%3C10)%7B%0A%09%09%09%09%09%09%09%09%09%09%09obj.type=%22m5-10%22;%0A%09%09%09%09%09%09%09%09%09%09%7Delse if (data.queued%3E=10&&data.queued%3C20) %7B%0A%09%09%09%09%09%09%09%09%09%09%09obj.type=%22m10-20%22;%0A%09%09%09%09%09%09%09%09%09%09%7Delse if (data.queued%3E=20) %7B%0A%09%09%09%09%09%09%09%09%09%09%09obj.type=%22ge20%22;%0A%09%09%09%09%09%09%09%09%09%09%7D%0A%09%09%09%09%09%09%09%09%09%09return obj;%0A%09%09%09%09%09%09%09%09%09%7D%0A%09%09%09%09  %7D, %22day%22)) //%E6%8C%89%E5%B9%B3%E5%9D%87%E6%97%B6%E9%97%B4%E7%BB%9F%E8%AE%A1%0A
 %09%09%09%09  .a

add queue stat