@@ -6,10 +6,11 @@ import { locObj } from "@/i18n"
66import { expandCqp } from "@/cqp_parser/cqp"
77import "./corpus-distribution-chart"
88import "./reduce-select"
9+ import "@/components/util/json_button"
910import { RootScope } from "@/root-scope.types"
1011import { JQueryExtended } from "@/jquery.types"
1112import { AbsRelSeq , Dataset , isTotalRow , Row , SearchParams } from "@/statistics/statistics.types"
12- import { CountParams } from "@/backend/types/count"
13+ import { CountParams , CountResponse } from "@/backend/types/count"
1314import { corpusListing , corpusSelection } from "@/corpora/corpus_listing"
1415import { AttributeOption } from "@/corpora/corpus-set"
1516import { getTimeData } from "@/backend/timedata"
@@ -36,6 +37,7 @@ type StatisticsController = IController & {
3637 error : boolean
3738 loading : boolean
3839 params : CountParams
40+ response : CountResponse
3941 rowCount : number
4042 searchParams : SearchParams
4143 warning ?: string
@@ -84,37 +86,16 @@ angular.module("korpApp").component("statistics", {
8486 </ div >
8587
8688 < div ng-show ="!$ctrl.warning && !$ctrl.aborted ">
87- < div class ="stats_header ">
89+ < div class ="flex my-2 gap-4 ">
8890 < button
89- class ="btn btn-sm btn-default show-graph-btn "
91+ class ="btn btn-sm btn-default "
9092 ng-click ="$ctrl.onGraphClick() "
9193 ng-disabled ="$ctrl.loading || !$ctrl.graphEnabled "
9294 uib-tooltip ="{{'material_warn' | loc:$root.lang}} "
9395 tooltip-placement ="right "
9496 tooltip-enable ="!$ctrl.graphEnabled "
9597 >
96- < span class ="graph_btn_icon ">
97- < svg
98- height ="24 "
99- version ="1.1 "
100- width ="33 "
101- xmlns ="http://www.w3.org/2000/svg "
102- style ="overflow: hidden; position: relative "
103- >
104- < desc style ="-webkit-tap-highlight-color: rgba(0, 0, 0, 0) ">
105- Created with Raphaël 2.1.0
106- </ desc >
107- < defs style ="-webkit-tap-highlight-color: rgba(0, 0, 0, 0) "> </ defs >
108- < path
109- fill ="#666666 "
110- stroke ="none "
111- d ="M3.625,25.062C3.086,24.947000000000003,2.74,24.416,2.855,23.875L2.855,23.875L6.51,6.584L8.777,15.843L10.7,10.655000000000001L14.280999999999999,14.396L18.163999999999998,1.293000000000001L21.098,13.027000000000001L23.058,11.518L28.329,23.258000000000003C28.555,23.762000000000004,28.329,24.353,27.824,24.579000000000004L27.824,24.579000000000004C27.319000000000003,24.806000000000004,26.728,24.579000000000004,26.502000000000002,24.075000000000003L26.502000000000002,24.075000000000003L22.272000000000002,14.647000000000002L19.898000000000003,16.473000000000003L18.002000000000002,8.877000000000002L15.219000000000003,18.270000000000003L11.465000000000003,14.346000000000004L8.386,22.66L6.654999999999999,15.577L4.811999999999999,24.288C4.710999999999999,24.76,4.297,25.082,3.8329999999999993,25.082L3.8329999999999993,25.082C3.765,25.083,3.695,25.076,3.625,25.062L3.625,25.062Z "
112- transform ="matrix(0.6,0,0,0.6,6.2499,5.275) "
113- stroke-width ="1.6666666666666667 "
114- style ="-webkit-tap-highlight-color: rgba(0, 0, 0, 0) "
115- > </ path >
116- </ svg >
117- </ span >
98+ < i class ="fa-solid fa-chart-line mr-1 "> </ i >
11899 {{'show_diagram' | loc:$root.lang}}
119100 </ button >
120101 < div
@@ -131,7 +112,9 @@ angular.module("korpApp").component("statistics", {
131112 tooltip-placement ="right "
132113 tooltip-enable ="!$ctrl.mapAttributes.length "
133114 >
134- {{'show_map' | loc:$root.lang}}< span class ="caret "> </ span >
115+ < i class ="fa-regular fa-map mr-1 "> </ i >
116+ {{'show_map' | loc:$root.lang}}
117+ < span class ="caret "> </ span >
135118 </ button >
136119 < div uib-dropdown-menu >
137120 < h3 class ="map-settings-title "> {{'select_attribute' | loc:$root.lang}}</ h3 >
@@ -173,7 +156,6 @@ angular.module("korpApp").component("statistics", {
173156 {{'no_row_selected_map' | loc:$root.lang}}
174157 </ span >
175158 </ div >
176- < div id ="showBarPlot "> </ div >
177159 </ div >
178160 < div ng-if ="!$ctrl.loading " style ="margin-bottom: 5px ">
179161 {{'total_rows' | loc:$root.lang}} {{$ctrl.data.length - 1 | prettyNumber:$root.lang}}
@@ -186,15 +168,17 @@ angular.module("korpApp").component("statistics", {
186168 </ span >
187169 </ div >
188170 < div id ="myGrid "> </ div >
189- < div id ="exportStatsSection ">
190- < br /> < br />
191- < select id ="kindOfFormat ">
192- < option value ="csv "> {{ 'statstable_exp_csv' | loc:$root.lang }}</ option >
193- < option value ="tsv "> {{ 'statstable_exp_tsv' | loc:$root.lang }}</ option >
194- </ select >
195- < a id ="generateExportButton " ng-click ="$ctrl.generateExport() ">
196- < button class ="btn btn-sm btn-default "> {{'statstable_gen_export' | loc:$root.lang}}</ button >
197- </ a >
171+ < div ng-show ="$ctrl.data && !$ctrl.loading && !$ctrl.warning " class ="mt-4 flex gap-4 justify-end ">
172+ < div class ="flex ">
173+ < select id ="kindOfFormat ">
174+ < option value ="csv "> {{ 'statstable_exp_csv' | loc:$root.lang }}</ option >
175+ < option value ="tsv "> {{ 'statstable_exp_tsv' | loc:$root.lang }}</ option >
176+ </ select >
177+ < a id ="generateExportButton " ng-click ="$ctrl.generateExport() ">
178+ < button class ="btn btn-sm btn-default "> {{'statstable_gen_export' | loc:$root.lang}}</ button >
179+ </ a >
180+ </ div >
181+ < json-button endpoint ="count " data ="$ctrl.response "> </ json-button >
198182 </ div >
199183 </ div >
200184 </ div >
@@ -206,6 +190,7 @@ angular.module("korpApp").component("statistics", {
206190 loading : "<" ,
207191 onUpdateSearch : "&" ,
208192 params : "<" ,
193+ response : "<" ,
209194 rowCount : "<" ,
210195 searchParams : "<" ,
211196 warning : "<" ,
0 commit comments