{"size": 1523, "ext": "js", "max_stars_repo_path": "venv/Lib/site-packages/visualdl/server/dist/_dist_/pages/histogram.js", "max_stars_repo_name": "dlfming/dd_catl_demo", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "venv/Lib/site-packages/visualdl/server/dist/_dist_/pages/histogram.js", "max_issues_repo_name": "dlfming/dd_catl_demo", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "venv/Lib/site-packages/visualdl/server/dist/_dist_/pages/histogram.js", "max_forks_repo_name": "dlfming/dd_catl_demo", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 761.5, "max_line_length": 1522, "alphanum_fraction": 0.7340774787}
import f from"../components/ChartPage.js";import j,{Loader as E}from"../components/HistogramPage/HistogramChart.js";import{Modes as R,modes as C}from"../resource/histogram/index.js";import e,{useCallback as T,useMemo as F,useState as l}from"../../web_modules/react.js";import{AsideSection as b}from"../components/Aside.js";import A from"../components/Content.js";import H from"../components/Error.js";import k from"../components/Field.js";import x from"../components/RadioButton.js";import M from"../components/RadioGroup.js";import P from"../components/RunAside.js";import S from"../components/Title.js";import w from"../hooks/useTagFilter.js";import{useTranslation as B}from"../../web_modules/react-i18next.js";const G=()=>{const{t:n}=B(["histogram","common"]),[o,c]=l(!0),{runs:s,tagsWithSingleRun:u,selectedRuns:a,onChangeRuns:i,loading:r}=w("histogram",o),[m,d]=l(R.Offset),g=F(()=>e.createElement(P,{runs:s,selectedRuns:a,onChangeRuns:i,running:o,onToggleRunning:c,loading:r},e.createElement(b,null,e.createElement(k,{label:n("histogram:mode")},e.createElement(M,{value:m,onChange:d},C.map(t=>e.createElement(x,{key:t,value:t},n(`histogram:mode-value.${t}`))))))),[r,m,i,o,s,a,n]),p=T(({label:t,run:h})=>e.createElement(j,{run:h,tag:t,mode:m,running:o}),[o,m]);return e.createElement(e.Fragment,null,e.createElement(S,null,n("common:histogram")),e.createElement(A,{aside:g},!r&&!s.length?e.createElement(H,null):e.createElement(f,{items:u,renderChart:p,loader:e.createElement(E,null),loading:r})))};export default G;
