#
#		ITSV GmbH
#	CCDB - Command and Control Database
#
#	FILE:			dquerymfile_SWQAGENDaTrend.txt
#	DESCRIPTION:	DQUERY definitions for DQUERY SWQAGENDaTrend
#
@querytitle 			Daten aus SWQAFBUCKETS
@attributenames			colcount:integer:{{colcountoptions}}
@colcountoptions		{"labeltext":"Anzahl Spalten","typedesc":"Gibt an, wie viele Datenspalten im Chart angezeigt werden sollen","is_optional":"true"}
@group					SWQA
@querytype				dbselect
@sql_full					select * from SWQAFBUCKETS
@sql					select * from SWQAFBUCKETS where MOD(No,10)=0
@pre_query
	if (!that.query.hasOwnProperty("colcount")) that.query.colcount = 10;
@post_query
	let dcols = new Array();
	let cmd;
	for (let i=0; i<that.result.metaData.length; i++) {
		cc = that.result.metaData[i];
		if (cc.name!="Sec" && cc.name!="No" && (dcols.length<that.query.colcount)) dcols.push(cc.name);
	}
	that.result.groups = new Array();
	that.result.groups.push(dcols);
	that.result.need_columns = ['No'];
# @format					JSON
# @disposition			view
