Compare commits

..

6 Commits

Author SHA1 Message Date
cf0c465248 Merge remote-tracking branch 'origin/master' into PostMockAndCorrections
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 1m23s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 32s
2024-04-22 13:31:31 +02:00
47eb98da57 Merge pull request 'Cleaning backend' (#181) from e into master
All checks were successful
Build and test backend / Build-backend (push) Successful in 1m22s
deploy to production / deploy-frontend (push) Successful in 33s
deploy to production / deploy-backend (push) Successful in 50s
Build and test FrontEnd / Build-frontend (push) Successful in 30s
Reviewed-on: #181
2024-04-22 13:08:35 +02:00
eafcf6b265 Cleaning backend
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 1m20s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 31s
2024-04-22 13:06:33 +02:00
85c1282f48 Merge pull request 'master' (#180) from Maxime/Clyde:master into master
All checks were successful
Build and test backend / Build-backend (push) Successful in 1m24s
deploy to production / deploy-frontend (push) Successful in 35s
deploy to production / deploy-backend (push) Successful in 1m7s
Build and test FrontEnd / Build-frontend (push) Successful in 31s
Reviewed-on: #180
2024-04-22 11:31:25 +02:00
4d6387ca8b fixed the search input
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 1m26s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 31s
2024-04-22 11:29:58 +02:00
fa2deca1b9 fix once again the stats and translations 2024-04-22 10:02:45 +02:00
8 changed files with 29 additions and 32 deletions

View File

@ -15,33 +15,33 @@ import java.util.Map;
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')")
Iterable<Map<String ,Integer>> viewsByMonths();
@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(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')")
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")
Iterable<Map<String ,Integer>> viewsByTopics();
@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(long researcherId);
@Query("select new map(r.domain as label, count(distinct r.language) as y) from Research r group by r.domain")
Iterable<Map<String ,Integer>> languageByTopics();
@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(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')")
Iterable<Map<String ,Integer>> languageByYears();
@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(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')")
Iterable<Map<String ,Integer>> languageByMonths();
@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(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')")
Iterable<Map<String ,Integer>> researchesByYears();
@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(long researcherId);
@Query("select new map(r.domain as label, count(distinct r) as y) from Research r group by r.domain")
Iterable<Map<String ,Integer>> researchesByTopics();
@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(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')")
Iterable<Map<String ,Integer>> researchesByMonth();
@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(long researcherId);
}

View File

@ -34,17 +34,17 @@ public class StatisticsService {
ArrayList<Iterable<Map<String,Integer>>> toReturn = new ArrayList<>();
toReturn.add(statsRepo.viewsByYears());
toReturn.add(statsRepo.viewsByMonths());
toReturn.add(statsRepo.viewsByTopics());
toReturn.add(statsRepo.viewsByYears(researcher.getId()));
toReturn.add(statsRepo.viewsByMonths(researcher.getId()));
toReturn.add(statsRepo.viewsByTopics(researcher.getId()));
toReturn.add(statsRepo.researchesByYears());
toReturn.add(statsRepo.researchesByMonth());
toReturn.add(statsRepo.researchesByTopics());
toReturn.add(statsRepo.researchesByYears(researcher.getId()));
toReturn.add(statsRepo.researchesByMonth(researcher.getId()));
toReturn.add(statsRepo.researchesByTopics(researcher.getId()));
toReturn.add(statsRepo.languageByYears());
toReturn.add(statsRepo.languageByMonths());
toReturn.add(statsRepo.languageByTopics());
toReturn.add(statsRepo.languageByYears(researcher.getId()));
toReturn.add(statsRepo.languageByMonths(researcher.getId()));
toReturn.add(statsRepo.languageByTopics(researcher.getId()));
return toReturn;
}
}

View File

@ -2,8 +2,6 @@ package ovh.herisson.Clyde.Tables.Inscription;
import jakarta.persistence.*;
import org.hibernate.annotations.OnDelete;
import org.hibernate.annotations.OnDeleteAction;
import ovh.herisson.Clyde.Tables.Course;
import ovh.herisson.Clyde.Tables.RequestState;
import ovh.herisson.Clyde.Tables.User;

View File

@ -7,7 +7,6 @@ import ovh.herisson.Clyde.Tables.RequestState;
import ovh.herisson.Clyde.Tables.User;
import java.util.Date;
import java.util.Map;
@Entity
public class ScholarshipRequest {

View File

@ -3,7 +3,6 @@ package ovh.herisson.Clyde.Tables.Inscription;
import jakarta.persistence.*;
import ovh.herisson.Clyde.Tables.Curriculum;
import ovh.herisson.Clyde.Tables.RequestState;
import ovh.herisson.Clyde.Tables.User;
import java.util.Date;

View File

@ -136,6 +136,7 @@ const emit = defineEmits(["modified"]);
<style scoped>
#researches{
padding-top: 15px;
width: 100%;
height: 100%;
overflow: scroll;

View File

@ -103,7 +103,7 @@ async function articleClicked(){
</ul>
<div id="downloads" v-if="article.pdfLocation !== null && !manage">
<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 v-if="manage" id="manage">
<div>

View File

@ -111,7 +111,7 @@ function update(){
<CanvasJSChart :options="options" id=chart @chart-ref="c => chart = c "/>
</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>
</template>