Revision 49691
Added by Antonis Lempesis over 6 years ago
EnableMetricsWidget.java | ||
---|---|---|
10 | 10 |
import com.google.gwt.user.client.ui.IsWidget; |
11 | 11 |
import com.google.gwt.user.client.ui.Widget; |
12 | 12 |
import eu.dnetlib.domain.data.Repository; |
13 |
import eu.dnetlib.repo.manager.client.RepositoryManager; |
|
13 | 14 |
import eu.dnetlib.repo.manager.client.services.RepositoryService; |
14 | 15 |
import eu.dnetlib.repo.manager.client.services.RepositoryServiceAsync; |
15 | 16 |
import org.gwtbootstrap3.client.ui.*; |
... | ... | |
38 | 39 |
enableMetricsPanel.add(errorAlert); |
39 | 40 |
|
40 | 41 |
HTML enableMetricsText = new HTML("<h4>You don't have metrics enabled for this repository yet. Would you like to " + |
41 |
"enable them?</h4><p>Below you can read about what the OpenAIRE Usage Statistics does, how it works and also " + |
|
42 |
"the workflow that must be followed for your participation.</p>"); |
|
42 |
"enable them?</h4>" + |
|
43 |
"<p><img src=\"./img/metricsWorkflow.png\" style=\"display:block; margin: 0 auto;\" width=\"50%\"></p>" + |
|
44 |
"<p>Usage Statistics about items and content providers support the assessment of their popularity and use. " + |
|
45 |
"They are an important complement to other kinds of metrics.</p>" + |
|
46 |
"<p>OpenAIRE Usage Statistics aims to gather usage events (metadata views and downloads) of items from " + |
|
47 |
"participating content providers. By utilizing open standards and protocols reliable, consolidated and " + |
|
48 |
"comparable usage reports are generated that are conformant to the COUNTER Code of Practice.</p>" + |
|
49 |
"<p>To participate in this service Content Provider Managers need to install platform specific patches or " + |
|
50 |
"plugins that enable the tracking of usage events to the OpenAIRE Usage Statistics Service.</p>" + |
|
51 |
"<p>Usage statistics are presented in the Content Provider Dashboard, in the OpenAIRE portal and can be " + |
|
52 |
"retrieved by the OpenAIRE API.</p>" + |
|
53 |
"<p>For more details about the workflows and tools please consult the <a target=\"_blank\" " + |
|
54 |
"href=\"./pdf/OpenAIRE_usage_stats_Guidelinesv1.pdf\">“Guidelines for Collecting Usage Events and Provision " + |
|
55 |
"of Usage Statistics”</a>.</p>"); |
|
43 | 56 |
enableMetricsPanel.add(enableMetricsText); |
44 | 57 |
|
45 | 58 |
final Button enableMetricsButton = new Button(); |
... | ... | |
56 | 69 |
}); |
57 | 70 |
enableMetricsPanel.add(enableMetricsButton); |
58 | 71 |
|
59 |
UsageStatisticsGuidelinesWidget usageStatisticsGuidelinesWidget = new UsageStatisticsGuidelinesWidget(); |
|
60 |
enableMetricsPanel.add(usageStatisticsGuidelinesWidget.asWidget()); |
|
72 |
// UsageStatisticsGuidelinesWidget usageStatisticsGuidelinesWidget = new UsageStatisticsGuidelinesWidget();
|
|
73 |
// enableMetricsPanel.add(usageStatisticsGuidelinesWidget.asWidget());
|
|
61 | 74 |
} |
62 | 75 |
|
63 | 76 |
@Override |
... | ... | |
105 | 118 |
enableMetricsPanel.addStyleName("loading-big"); |
106 | 119 |
enableMetricsPanel.add(loadingWheel); |
107 | 120 |
|
108 |
repositoryService.enableMetricsForRepository(repository, new AsyncCallback<Void>() { |
|
121 |
repositoryService.enableMetricsForRepository(repository, RepositoryManager.currentUser, new AsyncCallback<Void>() {
|
|
109 | 122 |
|
110 | 123 |
@Override |
111 | 124 |
public void onFailure(Throwable caught) { |
Also available in: Unified diff
svn merge -r49522:HEAD https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-repository-manager-gui/trunk .