Compare commits
	
		
			3 Commits
		
	
	
		
			490bf403f0
			...
			85c1282f48
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 85c1282f48 | |||
| 4d6387ca8b | |||
| fa2deca1b9 | 
| @ -15,33 +15,33 @@ import java.util.Map; | |||||||
|  |  | ||||||
| public interface StatsRepository extends CrudRepository<Research,Long> { | public interface StatsRepository extends CrudRepository<Research,Long> { | ||||||
|  |  | ||||||
|     @Query("select new map(to_char(r.releaseDate, 'month') as label, sum(r.views) as y) from Research r group by to_char(r.releaseDate, 'month')") |     @Query("select new map(to_char(r.releaseDate, 'month') as label, sum(r.views) as y) from Research r where r.author.id = ?1 group by to_char(r.releaseDate, 'month')") | ||||||
|     Iterable<Map<String ,Integer>> viewsByMonths(); |     Iterable<Map<String ,Integer>> viewsByMonths(long researcherId); | ||||||
|  |  | ||||||
|     @Query("select new map(to_char(r.releaseDate,'YYYY') as label, sum  (r.views) as y) from Research r group by to_char(r.releaseDate,'YYYY')") |     @Query("select new map(to_char(r.releaseDate,'YYYY') as label, sum  (r.views) as y) from Research r group by to_char(r.releaseDate,'YYYY')") | ||||||
|     Iterable<Map<String ,Integer>> viewsByYears(); |     Iterable<Map<String ,Integer>> viewsByYears(long researcherId); | ||||||
|  |  | ||||||
|  |  | ||||||
|     @Query("select new map(r.domain as label, sum(r.views) as y) from Research r group by r.domain") |     @Query("select new map(r.domain as label, sum(r.views) as y) from Research r where r.author.id = ?1 group by r.domain") | ||||||
|     Iterable<Map<String ,Integer>> viewsByTopics(); |     Iterable<Map<String ,Integer>> viewsByTopics(long researcherId); | ||||||
|  |  | ||||||
|  |  | ||||||
|     @Query("select new map(r.domain as label, count(distinct r.language) as y) from Research r group by r.domain") |     @Query("select new map(r.domain as label, count(distinct r.language) as y) from Research r where r.author.id = ?1 group by r.domain") | ||||||
|     Iterable<Map<String ,Integer>> languageByTopics(); |     Iterable<Map<String ,Integer>> languageByTopics(long researcherId); | ||||||
|  |  | ||||||
|     @Query("select new map(to_char(r.releaseDate,'YYYY') as label,  count(distinct r.language) as y) from Research r group by to_char(r.releaseDate,'YYYY')") |     @Query("select new map(to_char(r.releaseDate,'YYYY') as label,  count(distinct r.language) as y) from Research r where r.author.id = ?1 group by to_char(r.releaseDate,'YYYY')") | ||||||
|     Iterable<Map<String ,Integer>> languageByYears(); |     Iterable<Map<String ,Integer>> languageByYears(long researcherId); | ||||||
|  |  | ||||||
|     @Query("select new map(to_char(r.releaseDate, 'month') as label, count(distinct r.language) as y) from Research r group by to_char(r.releaseDate, 'month')") |     @Query("select new map(to_char(r.releaseDate, 'month') as label, count(distinct r.language) as y) from Research r where r.author.id = ?1 group by to_char(r.releaseDate, 'month')") | ||||||
|     Iterable<Map<String ,Integer>> languageByMonths(); |     Iterable<Map<String ,Integer>> languageByMonths(long researcherId); | ||||||
|  |  | ||||||
|     @Query("select new map(to_char(r.releaseDate,'YYYY') as label, count(distinct r) as y) from Research r group by to_char(r.releaseDate,'YYYY')") |     @Query("select new map(to_char(r.releaseDate,'YYYY') as label, count(distinct r) as y) from Research r where r.author.id = ?1 group by to_char(r.releaseDate,'YYYY')") | ||||||
|     Iterable<Map<String ,Integer>> researchesByYears(); |     Iterable<Map<String ,Integer>> researchesByYears(long researcherId); | ||||||
|  |  | ||||||
|     @Query("select new map(r.domain as label, count(distinct r) as y) from Research r group by r.domain") |     @Query("select new map(r.domain as label, count(distinct r) as y) from Research r where r.author.id = ?1 group by r.domain") | ||||||
|     Iterable<Map<String ,Integer>> researchesByTopics(); |     Iterable<Map<String ,Integer>> researchesByTopics(long researcherId); | ||||||
|  |  | ||||||
|     @Query("select new map(to_char(r.releaseDate, 'month') as label, count(distinct r) as y) from Research r group by to_char(r.releaseDate, 'month')") |     @Query("select new map(to_char(r.releaseDate, 'month') as label, count(distinct r) as y) from Research r where r.author.id = ?1 group by to_char(r.releaseDate, 'month')") | ||||||
|     Iterable<Map<String ,Integer>> researchesByMonth(); |     Iterable<Map<String ,Integer>> researchesByMonth(long researcherId); | ||||||
|  |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -34,17 +34,17 @@ public class StatisticsService { | |||||||
|  |  | ||||||
|         ArrayList<Iterable<Map<String,Integer>>> toReturn = new ArrayList<>(); |         ArrayList<Iterable<Map<String,Integer>>> toReturn = new ArrayList<>(); | ||||||
|  |  | ||||||
|         toReturn.add(statsRepo.viewsByYears()); |         toReturn.add(statsRepo.viewsByYears(researcher.getId())); | ||||||
|         toReturn.add(statsRepo.viewsByMonths()); |         toReturn.add(statsRepo.viewsByMonths(researcher.getId())); | ||||||
|         toReturn.add(statsRepo.viewsByTopics()); |         toReturn.add(statsRepo.viewsByTopics(researcher.getId())); | ||||||
|  |  | ||||||
|         toReturn.add(statsRepo.researchesByYears()); |         toReturn.add(statsRepo.researchesByYears(researcher.getId())); | ||||||
|         toReturn.add(statsRepo.researchesByMonth()); |         toReturn.add(statsRepo.researchesByMonth(researcher.getId())); | ||||||
|         toReturn.add(statsRepo.researchesByTopics()); |         toReturn.add(statsRepo.researchesByTopics(researcher.getId())); | ||||||
|  |  | ||||||
|         toReturn.add(statsRepo.languageByYears()); |         toReturn.add(statsRepo.languageByYears(researcher.getId())); | ||||||
|         toReturn.add(statsRepo.languageByMonths()); |         toReturn.add(statsRepo.languageByMonths(researcher.getId())); | ||||||
|         toReturn.add(statsRepo.languageByTopics()); |         toReturn.add(statsRepo.languageByTopics(researcher.getId())); | ||||||
|         return toReturn; |         return toReturn; | ||||||
|     } |     } | ||||||
| } | } | ||||||
| @ -136,6 +136,7 @@ const emit = defineEmits(["modified"]); | |||||||
| <style scoped> | <style scoped> | ||||||
|  |  | ||||||
| #researches{ | #researches{ | ||||||
|  |   padding-top: 15px; | ||||||
|   width: 100%; |   width: 100%; | ||||||
|   height: 100%; |   height: 100%; | ||||||
|   overflow: scroll; |   overflow: scroll; | ||||||
|  | |||||||
| @ -103,7 +103,7 @@ async function articleClicked(){ | |||||||
|         </ul> |         </ul> | ||||||
|           <div id="downloads" v-if="article.pdfLocation !== null && !manage"> |           <div id="downloads" v-if="article.pdfLocation !== null && !manage"> | ||||||
|             <a :href=downloadPdf() @click.stop="articleClicked" target="_blank">{{i18n("See.Research")}}</a> |             <a :href=downloadPdf() @click.stop="articleClicked" target="_blank">{{i18n("See.Research")}}</a> | ||||||
|             <a v-if="article.bibTexLocation !== null" :href=downloadBibTex() @click.stop="emit('modal-close')"  target="_blank">{{i18n("See.BibTex")}}</a> </div> |             <a v-if="article.bibTexLocation !== null" :href=downloadBibTex() @click.stop="emit('modal-close')"  target="_blank">{{i18n("SeeBibTex")}}</a> </div> | ||||||
|         </div> |         </div> | ||||||
|         <div v-if="manage" id="manage"> |         <div v-if="manage" id="manage"> | ||||||
|           <div> |           <div> | ||||||
|  | |||||||
| @ -111,7 +111,7 @@ function update(){ | |||||||
| 		  <CanvasJSChart :options="options" id=chart @chart-ref="c => chart = c "/> | 		  <CanvasJSChart :options="options" id=chart @chart-ref="c => chart = c "/> | ||||||
|       </div> |       </div> | ||||||
|     </div> |     </div> | ||||||
|     <div id="researches"><list-researches :researchList="researchList"></list-researches></div> |     <div id="researches" style="margin-top: -15px"><list-researches :researchList="researchList"></list-researches></div> | ||||||
|   </div> |   </div> | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user