Project

General

Profile

« Previous | Next » 

Revision 51032

A first for statistics collection and methods

View differences:

init_db.js
2 2

  
3 3
use openaire_admin
4 4

  
5
drop = false;
5
drop = true;
6 6
if(drop) {
7 7
	db.dropDatabase()
8 8
}
......
15 15
	db.createCollection("entity")
16 16
	db.createCollection("page")
17 17
	db.createCollection("pageHelpContent")
18
	db.createCollection("statistics")
18 19

  
19 20
	db.entity.save({"pid" : "publication", "name" : "Publication"})
20 21
	db.entity.save({"pid" : "dataset", "name" : "Research Data"})
......
171 172
	db.divId.save({ "name" : "link-result-form", "pages" : [link, directLink], "community" : openaireCommunity})
172 173
	db.divId.save({ "name" : "link-result-bulk", "pages" : [link], "community" : openaireCommunity})
173 174
	db.divId.save({ "name" : "link-metadata", "pages" : [link, directLink], "community" : openaireCommunity})
175

  
176
	var community_statistics = {}
177

  
178
    community_statistics["publicationsNumber"] = { "show" : true, "showInDashboard" : false };
179
    community_statistics["publicationsProjectNumber"] = { "show" : true, "showInDashboard" : false };
180
    community_statistics["publicationsOpenNumber"] = { "show" : true, "showInDashboard" : false };
181
    community_statistics["publicationsClosedNumber"] = { "show" : true, "showInDashboard" : false };
182
    community_statistics["publicationsEmbargoNumber"] = { "show" : true, "showInDashboard" : false };
183

  
184
    community_statistics["datasetsNumber"] = { "show" : true, "showInDashboard" : false };
185
    community_statistics["datasetsProjectNumber"] = { "show" : true, "showInDashboard" : false };
186
    community_statistics["datasetsOpenNumber"] = { "show" : true, "showInDashboard" : false };
187
    community_statistics["datasetsClosedNumber"] = { "show" : true, "showInDashboard" : false };
188
    community_statistics["datasetsEmbargoNumber"] = { "show" : true, "showInDashboard" : false };
189

  
190
    community_statistics["softwareNumber"] = { "show" : true, "showInDashboard" : false };
191
    community_statistics["softwareProjectNumber"] = { "show" : true, "showInDashboard" : false };
192
    community_statistics["softwareOpenNumber"] = { "show" : true, "showInDashboard" : false };
193
    community_statistics["softwareClosedNumber"] = { "show" : true, "showInDashboard" : false };
194
    community_statistics["softwareEmbargoNumber"] = { "show" : true, "showInDashboard" : false };
195

  
196
    community_statistics["publicationsTimeline"] = { "show" : true, "showInDashboard" : false };
197
    community_statistics["datasetsTimeline"] = { "show" : true, "showInDashboard" : false };
198
    community_statistics["softwareTimeline"] = { "show" : true, "showInDashboard" : false };
199

  
200
    community_statistics["publicationsProjectColumn"] = { "show" : true, "showInDashboard" : false };
201
    community_statistics["publicationsProjectPie"] = { "show" : true, "showInDashboard" : false };
202
    community_statistics["publicationsProjectTable"] = { "show" : true, "showInDashboard" : false };
203

  
204
    community_statistics["datasetsProjectColumn"] = { "show" : true, "showInDashboard" : false };
205
    community_statistics["datasetsProjectPie"] = { "show" : true, "showInDashboard" : false };
206
    community_statistics["datasetsProjectTable"] = { "show" : true, "showInDashboard" : false };
207

  
208
    community_statistics["softwareProjectColumn"] = { "show" : true, "showInDashboard" : false };
209
    community_statistics["softwareProjectPie"] = { "show" : true, "showInDashboard" : false };
210
    community_statistics["softwareProjectTable"] = { "show" : true, "showInDashboard" : false };
211

  
212
    db.statistics.save({ "pid" : "openaire", "statistics" : community_statistics})
174 213
}

Also available in: Unified diff