@@ -5,7 +5,6 @@ export default {
55 state : ( ) => {
66 return {
77 resourcesCount : 0 ,
8- toolsCount : 0 ,
98 communitiesCount : 0 ,
109 projectsCount : 0 ,
1110 } ;
@@ -30,26 +29,12 @@ export default {
3029 const response = await this . $observatory . $get ( '/stats/tools/count_total' ) ;
3130 commit ( 'setResourcesCount' , response [ 0 ] ) ;
3231 } ,
33- async getToolsCount ( { commit } ) {
34- const response = await this . $axios . head ( '/aggregate' , {
35- params : {
36- limit : 1 ,
37- } ,
38- } ) ;
39- commit ( 'setToolsCount' , response ) ;
40- } ,
4132 } ,
4233
4334 mutations : {
4435 setResourcesCount ( state , payload ) {
4536 state . resourcesCount = payload . data ;
4637 } ,
47- setToolsCount ( state , payload ) {
48- const matches = payload . headers [ 'content-range' ] . match (
49- / ( \d + ) - ( \d + | \* ) \/ ( \d + | \* ) /
50- ) ;
51- state . toolsCount = parseInt ( matches [ 3 ] ) ;
52- } ,
5338 setCommunitiesCount ( state , payload ) {
5439 const communities = payload . getCommunities . map ( ( community ) => {
5540 community . _metadata = JSON . parse ( community . _metadata ) ;
@@ -80,7 +65,6 @@ export default {
8065
8166 getters : {
8267 resourcesCount : ( state ) => state . resourcesCount ,
83- toolsCount : ( state ) => state . toolsCount ,
8468 communitiesCount : ( state ) => state . communitiesCount ,
8569 projectsCount : ( state ) => state . projectsCount ,
8670 } ,
0 commit comments