js/documentation.js
//Read metadata and make checklist for indicator availability in markdown format
Read metadata and make checklist for indicator availability in markdown format
Read metadata and make checklist for indicator availability in markdown format
function makeConfigurationChecklist(basePath, metaData) {
	var deferred = Q.defer();
	var content = utils.htmlHead("Configuration checklist");
	content += utils.htmlHeader("Configuration checklist", 1);
	var tableData;
	if (metaData.indicators && metaData.indicators.length > 0) {
		tableData = [];
		tableData.push(["Name", "Configured"]);
		var ind;
		for (var i = 0; i < metaData.indicators.length; i++) {
			ind = metaData.indicators[i];
			tableData.push([ind.name, "▢"]);
		}
		utils.htmlHeader("Indicators", 2);
		content += utils.htmlTableFromArray(tableData, true, [85, 15], ["left", "center"]);
	}
	if (metaData.categoryOptionGroups && metaData.categoryOptionGroups.length > 0) {
		tableData = [];
		tableData.push(["Name", "Configured"]);
		var cog;
		for (var i = 0; i < metaData.categoryOptionGroups.length; i++) {
			cog = metaData.categoryOptionGroups[i];
			tableData.push([cog.name, "▢"]);
		}
		utils.htmlHeader("Category Option Groups, 2");
		content += utils.htmlTableFromArray(tableData, true, [85, 15], ["left", "center"]);
	}
	content += utils.htmlTail();
	content = pretty(content);
	fs.writeFile(basePath + "/configuration.html", content, function (err) {
		if (err) {
			console.log(err);
			deferred.resolve(false);
		}
		console.log("✔ Configuration checklist saved");
		deferred.resolve(true);
	});
	return deferred.promise;
}
function makeConfigurationChecklist ( basePath , metaData ) { var deferred = Q . defer ( ) ; var content = utils . htmlHead ( "Configuration checklist" ) ; content += utils . htmlHeader ( "Configuration checklist" , 1 ) ; var tableData ; if ( metaData . indicators && metaData . indicators . length > 0 ) { tableData = [ ] ; tableData . push ( [ "Name" , "Configured" ] ) ; var ind ; for ( var i = 0 ; i < metaData . indicators . length ; i ++ ) { ind = metaData . indicators [ i ] ; tableData . push ( [ ind . name , "▢"]) ; } utils . htmlHeader ( "Indicators" , 2 ) ; content += utils . htmlTableFromArray ( tableData , true , [ 85 , 15 ] , [ "left" , "center" ] ) ; } if ( metaData . categoryOptionGroups && metaData . categoryOptionGroups . length > 0 ) { tableData = [ ] ; tableData . push ( [ "Name" , "Configured" ] ) ; var cog ; for ( var i = 0 ; i < metaData . categoryOptionGroups . length ; i ++ ) { cog = metaData . categoryOptionGroups [ i ] ; tableData . push ( [ cog . name , "▢"]) ; } utils . htmlHeader ( "Category Option Groups, 2" ) ; content += utils . htmlTableFromArray ( tableData , true , [ 85 , 15 ] , [ "left" , "center" ] ) ; } content += utils . htmlTail ( ) ; content = pretty ( content ) ; fs . writeFile ( basePath + "/configuration.html" , content , function ( err ) { if ( err ) { console . log ( err ) ; deferred . resolve ( false ) ; } console . log ( "✔ Configuration checklist saved"); deferred . resolve ( true ) ; } ) ; return deferred . promise ; }
Read metadata and make checklist for indicator availability in markdown format
Read metadata and make checklist for indicator availability in markdown format
//indicators //category option group sets