diff --git a/README_zh.md b/README_zh.md index bded8ccfe9aab30136e3e4a29fd4c74f7c1e9b74..72eaefe627bcf98ab462ea8eedadd7436987bb81 100644 --- a/README_zh.md +++ b/README_zh.md @@ -33,29 +33,29 @@ PC端以Smartperf-Host网站的形式进行发布,内部分为Trace Streamer ``` ## 功能介绍 ### 网页加载trace -使用Smartperf-Host加载保存在本地的trace文件(htrace、ftrace等)并显示数据到泳道图中,trace数据分析详见《[网页加载trace说明](./host/doc/quickstart_systemtrace.md)》。 +使用Smartperf-Host加载保存在本地的trace文件(htrace、ftrace等)并显示数据到泳道图中,trace数据分析详见《[网页加载trace说明](./host/ide/src/doc/md/quickstart_systemtrace.md)》。 ### 网页抓取trace -使用Smartperf-Host在线抓取trace,可以自定义抓取内容、抓取时长、trace保存路径,详见《[网页抓取trace说明](./host/doc/quickstart_web_record.md)》。 +使用Smartperf-Host在线抓取trace,可以自定义抓取内容、抓取时长、trace保存路径,详见《[网页抓取trace说明](./host/ide/src/doc/md/quickstart_web_record.md)》。 ### 设备抓取trace -在设备端抓取trace,可以自定义抓取内容、抓取时长、trace保存路径,详见《[设备端抓取trace说明](./host/doc/quickstart_device_record.md)》。 +在设备端抓取trace,可以自定义抓取内容、抓取时长、trace保存路径,详见《[设备端抓取trace说明](./host/ide/src/doc/md/quickstart_device_record.md)》。 ### Ability Monitor抓取 -使用Smartperf-Host抓取应用的CPU、内存、磁盘IO和网络的使用情况,详见《[Ability Monitor抓取和展示说明](./host/doc/quickstart_ability_monitor.md)》。 +使用Smartperf-Host抓取应用的CPU、内存、磁盘IO和网络的使用情况,详见《[Ability Monitor抓取和展示说明](./host/ide/src/doc/md/quickstart_ability_monitor.md)》。 ### Native Memory抓取 -使用Smartperf-Host抓取应用的Native Memory(C和C++部分)的分配和释放情况,详见《[Native Memory抓取和展示说明](./host/doc/quickstart_native_memory.md)》。 +使用Smartperf-Host抓取应用的Native Memory(C和C++部分)的分配和释放情况,详见《[Native Memory抓取和展示说明](./host/ide/src/doc/md/quickstart_native_memory.md)》。 ### Hiperf抓取 -使用Smartperf-Host抓取应用的cpu使用量、方法的调用栈等,详见《[HiPerf的抓取和展示说明](./host/doc/quickstart_hiperf.md)》。 +使用Smartperf-Host抓取应用的cpu使用量、方法的调用栈等,详见《[HiPerf的抓取和展示说明](./host/ide/src/doc/md/quickstart_hiperf.md)》。 ### HiSystemEvent抓取 -使用Smartperf-Host抓取应用的各个子类别功耗占比(CPU、网络、定位等)、应用的资源申请使用记录(WorkScheduler、Runninglock、Alarm、Location Request)、应用功耗异常事件显示、功耗关联系统状态显示(电池电量、屏幕状态),详见《[HiSystemEvent的抓取和展示说明](./host/doc/quickstart_hisystemevent.md)》。 +使用Smartperf-Host抓取应用的各个子类别功耗占比(CPU、网络、定位等)、应用的资源申请使用记录(WorkScheduler、Runninglock、Alarm、Location Request)、应用功耗异常事件显示、功耗关联系统状态显示(电池电量、屏幕状态),详见《[HiSystemEvent的抓取和展示说明](./host/ide/src/doc/md/quickstart_hisystemevent.md)》。 ### FileSystem抓取 -使用Smartperf-Host抓取所有文件系统系统调用信息、读写调用次数等,详见《[FileSystem的抓取和展示说明](./host/doc/quickstart_filesystem.md)》。 +使用Smartperf-Host抓取所有文件系统系统调用信息、读写调用次数等,详见《[FileSystem的抓取和展示说明](./host/ide/src/doc/md/quickstart_filesystem.md)》。 ### 页内存抓取 -使用Smartperf-Host抓取页内存相关事件的开始时间、持续时间、触发进程、触发线程、事件类型、内存地址、内存大小等,详见《[页内存的抓取和展示说明](./host/doc/quickstart_page_fault.md)》。 +使用Smartperf-Host抓取页内存相关事件的开始时间、持续时间、触发进程、触发线程、事件类型、内存地址、内存大小等,详见《[页内存的抓取和展示说明](./host/ide/src/doc/md/quickstart_page_fault.md)》。 ### Bio抓取 -使用Smartperf-Host抓取每次IO访问的起始时间、总延迟、进程、每4k数据的平均延迟、线程、操作(写数据、页面换入、Metadata)、访问量、路径等、Block number、优先级、Backtrace调用栈,详见《[Bio的抓取和展示说明](./host/doc/quickstart_bio.md)》。 +使用Smartperf-Host抓取每次IO访问的起始时间、总延迟、进程、每4k数据的平均延迟、线程、操作(写数据、页面换入、Metadata)、访问量、路径等、Block number、优先级、Backtrace调用栈,详见《[Bio的抓取和展示说明](./host/ide/src/doc/md/quickstart_bio.md)》。 ### 进程Smaps抓取 -使用Smartperf-Host抓取单个进程的smaps数据(类别、Pss、Rss、Vss等),数据源为/proc/$pid/smaps,详见《[进程smaps的抓取和展示说明](./host/doc/quickstart_smaps.md)》。 +使用Smartperf-Host抓取单个进程的smaps数据(类别、Pss、Rss、Vss等),数据源为/proc/$pid/smaps,详见《[进程smaps的抓取和展示说明](./host/ide/src/doc/md/quickstart_smaps.md)》。 ### Sql分析和Metrics说明 -Smartperf-Host网站trace解析完成后在线数据库使用说明,详见《[Sql分析和Metrics说明](./host/doc/quickstart_sql_metrics.md)》。 +Smartperf-Host网站trace解析完成后在线数据库使用说明,详见《[Sql分析和Metrics说明](./host/ide/src/doc/md/quickstart_sql_metrics.md)》。 ## 编译指南 项目编译主要包括两部分,Trace Streamer编译和Smartperf-Host编译部署。 ### 构建约束 diff --git a/host/doc/quickstart_smartperflinux_compile_guide.md b/host/doc/quickstart_smartperflinux_compile_guide.md deleted file mode 100644 index 3ac718c8f2ae239c7e9e312e3df38dbcb2a23b75..0000000000000000000000000000000000000000 --- a/host/doc/quickstart_smartperflinux_compile_guide.md +++ /dev/null @@ -1,121 +0,0 @@ -# SmartPerf 编译部署指导文档 - - -## 编译环境搭建 -注意:在linux编译环境安装时以root或者其他 sudo 用户身份运行下面的命令。 -### node 环境安装 -##### 下载Node js安装包(windows推荐, linux跳过此步骤) -从网站下载node js安装包 https://nodejs.org/en/download/current/。 -##### 安装nodejs -- ubuntu 20.04 与Debian 11系统中,直接用apt-get安装,先切换到 root用户下,命令如下(node 版本 >= 16.15.1 npm 版本 >= 8.13.2) -``` - sudo su - apt-get update - apt-get install nodejs npm -``` -![](../figures/deploy/install_node.png) - - -- centos 系统中使用yum安装,先切换到root用户下,命令如下: -``` - sudo su - sudo yum -y install nodejs npm -``` -![](../figures/deploy/yum_install_node.png) - -- windows系统中, 用安装包一路next即可 - - -- 安装完成后运行检查是否安装成功 -``` - node -v - npm -v -``` -![](../figures/deploy/check_version.png) - - 出现版本号就代表安装成功了。 - -##### 更换npm源 -``` - npm config set registry http://registry.npmmirror.com -``` - -##### 安装tsc typeScript 编译器 -直接使用npm 安装运行命令。 -``` - npm install -g typescript - tsc -v -``` - - 验证安装完成: -![](../figures/deploy/install_tsc.png) - -### go 编译环境安装 -- ubuntu 环境下直接使用apt安装,以root用户执行(go 版本 >= 1.13.8 ) -``` - apt-get install golang-go -``` -![](../figures/deploy/install_golang.png) - -- centos系统中使用yum安装,先切换到root用户下,命令如下: - -``` - sudo su - sudo yum -y install go -``` -![](../figures/deploy/yum_install_go.png) - -- windows 系统下 从 https://golang.google.cn/dl/ 下载安装包, 一路next 完成 安装即可 - -- 安装完成后 命令行运行验证是否安装成功 - -``` - go version -``` -## 项目编译 -#### 先下载sql.js的二进制包 -从如下 https://github.com/sql-js/sql.js/releases/download/v1.6.2/sqljs-all.zip 获取到sql.js的二进制包。 -将压缩包解压后, 将文件放置到项目third-party 目录下。 - - -![](../figures/deploy/third_party.png) - -#### 先编译获取trace_streamer 的二进制包 -参照:smartperf/trace_streamer/compile_trace_streamer.md 编译出wasm、linux、Windows版本的二进制文件。 -将获取到二进制文件放入到项目bin目录下,如果项目目录中无bin目录 先创建bin目录。 -然后将trace_streamer的二进制文件放入bin目录中。 - -![](../figures/deploy/put_bin.png) -![](../figures/deploy/bin_files.png) - - -#### 代码编译(依赖于上面node环境 和 go环境) -在项目目录安装项目依赖: -``` - npm install -``` -在项目目录下运行命令: -``` - npm run compile -``` -![](../figures/deploy/compile.png) - 编译成功后会有main 可执行文件生成。 - -## 项目部署 -linux版本部署需要给trace_stream程序赋予执行权限,cd dist/bin 目录下,执行如下命令: -``` - chmod +x trace_streamer_* -``` -![](../figures/deploy/chomd+x.png) - -直接运行 ./main 可执行程序,完成项目的部署。 -![](../figures/deploy/run_main.png) - ## 访问项目 -在浏览器上打开 https://[部署机器ip地址]:9000/application/ -!!! 注意一定是https。 - -![](../figures/deploy/visit_website.png) - - 备注:如果未出现如图所示网页.而是显示 无法访问此网站。 -可以在window cmd 里执行telnet [部署机器ip地址] 9000。 -如果显示端口连接失败 可能是防火墙未对9000 端口放开即可。 \ No newline at end of file diff --git a/host/figures/HiSystemEvent/hisystemeventemexcutecommand.jpg b/host/figures/HiSystemEvent/hisystemeventemexcutecommand.jpg deleted file mode 100644 index ecbb7e70783c4d22be242e45bfb881ac45b75dba..0000000000000000000000000000000000000000 Binary files a/host/figures/HiSystemEvent/hisystemeventemexcutecommand.jpg and /dev/null differ diff --git a/host/figures/NativeMemory/nativememorysetting.jpg b/host/figures/NativeMemory/nativememorysetting.jpg deleted file mode 100644 index c07e36588bfc9fa7bbd2f3feda72715116747a3e..0000000000000000000000000000000000000000 Binary files a/host/figures/NativeMemory/nativememorysetting.jpg and /dev/null differ diff --git a/host/figures/deploy/bin_files.png b/host/figures/deploy/bin_files.png deleted file mode 100644 index 6657337dce8d72b262e1c02473098f5be59aa33c..0000000000000000000000000000000000000000 Binary files a/host/figures/deploy/bin_files.png and /dev/null differ diff --git a/host/figures/deploy/check_version.png b/host/figures/deploy/check_version.png deleted file mode 100644 index b76b41ed4fb9ba9bc6d1538b245ccc7ff5e98d06..0000000000000000000000000000000000000000 Binary files a/host/figures/deploy/check_version.png and /dev/null differ diff --git a/host/figures/deploy/chomd+x.png b/host/figures/deploy/chomd+x.png deleted file mode 100644 index e2781fc8e4fe005376d85b18ca220a5c6ef8a5e5..0000000000000000000000000000000000000000 Binary files a/host/figures/deploy/chomd+x.png and /dev/null differ diff --git a/host/figures/deploy/compile.png b/host/figures/deploy/compile.png deleted file mode 100644 index 1221e25c0b69e87feaeddf767334620716fe4726..0000000000000000000000000000000000000000 Binary files a/host/figures/deploy/compile.png and /dev/null differ diff --git a/host/figures/deploy/install_golang.png b/host/figures/deploy/install_golang.png deleted file mode 100644 index a4a58e9fa7e5f4ede6d96b6a2727f1385292c28c..0000000000000000000000000000000000000000 Binary files a/host/figures/deploy/install_golang.png and /dev/null differ diff --git a/host/figures/deploy/install_node.png b/host/figures/deploy/install_node.png deleted file mode 100644 index 14f15af1343948d39098f2f75c7cd64dd2c0b412..0000000000000000000000000000000000000000 Binary files a/host/figures/deploy/install_node.png and /dev/null differ diff --git a/host/figures/deploy/install_tsc.png b/host/figures/deploy/install_tsc.png deleted file mode 100644 index 5ea36c6a86b8459d0ca34ddc4c20bbd651828a3a..0000000000000000000000000000000000000000 Binary files a/host/figures/deploy/install_tsc.png and /dev/null differ diff --git a/host/figures/deploy/put_bin.png b/host/figures/deploy/put_bin.png deleted file mode 100644 index 7945c95d265437d89924d8d19072f643f7b19b62..0000000000000000000000000000000000000000 Binary files a/host/figures/deploy/put_bin.png and /dev/null differ diff --git a/host/figures/deploy/run_main.png b/host/figures/deploy/run_main.png deleted file mode 100644 index eae89d97cabcad187d37f126a24ef69095c328bf..0000000000000000000000000000000000000000 Binary files a/host/figures/deploy/run_main.png and /dev/null differ diff --git a/host/figures/deploy/third_party.png b/host/figures/deploy/third_party.png deleted file mode 100644 index 77ff8ca912ee369c1f8407ce511e4e17de16c579..0000000000000000000000000000000000000000 Binary files a/host/figures/deploy/third_party.png and /dev/null differ diff --git a/host/figures/deploy/visit_website.png b/host/figures/deploy/visit_website.png deleted file mode 100644 index c0aa1867ba290b6768968e14dbd35941b64f9f09..0000000000000000000000000000000000000000 Binary files a/host/figures/deploy/visit_website.png and /dev/null differ diff --git a/host/figures/deploy/yum_install_go.png b/host/figures/deploy/yum_install_go.png deleted file mode 100644 index 4eae4fabc664f521db101288c8491e10b4013870..0000000000000000000000000000000000000000 Binary files a/host/figures/deploy/yum_install_go.png and /dev/null differ diff --git a/host/figures/deploy/yum_install_node.png b/host/figures/deploy/yum_install_node.png deleted file mode 100644 index b05160f060bec9bd90d951626af88ba6b3fda63b..0000000000000000000000000000000000000000 Binary files a/host/figures/deploy/yum_install_node.png and /dev/null differ diff --git a/host/figures/hdc/Device.jpg b/host/figures/hdc/Device.jpg deleted file mode 100644 index e8174d7d6ff5e50b7d6623c091ccade8bc85c8b2..0000000000000000000000000000000000000000 Binary files a/host/figures/hdc/Device.jpg and /dev/null differ diff --git a/host/figures/hdc/Schedulingdetails.jpg b/host/figures/hdc/Schedulingdetails.jpg deleted file mode 100644 index 27d3dc9354922634b3dea53a956bf141b202f652..0000000000000000000000000000000000000000 Binary files a/host/figures/hdc/Schedulingdetails.jpg and /dev/null differ diff --git a/host/figures/hdc/bytacedescription.jpg b/host/figures/hdc/bytacedescription.jpg deleted file mode 100644 index 3fa24ba1a434f70254294685e6b600e6518e4773..0000000000000000000000000000000000000000 Binary files a/host/figures/hdc/bytacedescription.jpg and /dev/null differ diff --git a/host/figures/hdc/examplerecord.jpg b/host/figures/hdc/examplerecord.jpg deleted file mode 100644 index ccfb6b35eba8903e4c25b1b562919f481e34cc6e..0000000000000000000000000000000000000000 Binary files a/host/figures/hdc/examplerecord.jpg and /dev/null differ diff --git a/host/figures/hdc/hdc.jpg b/host/figures/hdc/hdc.jpg deleted file mode 100644 index bf8c0e8bfd2ac208214203dd972f3b3821b06d5d..0000000000000000000000000000000000000000 Binary files a/host/figures/hdc/hdc.jpg and /dev/null differ diff --git a/host/figures/hdc/hdcfile.jpg b/host/figures/hdc/hdcfile.jpg deleted file mode 100644 index d5d56f9abdab6f8ce697daaf82a8c0449f909c82..0000000000000000000000000000000000000000 Binary files a/host/figures/hdc/hdcfile.jpg and /dev/null differ diff --git a/host/figures/hdc/hdctracing.jpg b/host/figures/hdc/hdctracing.jpg deleted file mode 100644 index 7f6ab5e716a714c470e2babaa63d715eba78253c..0000000000000000000000000000000000000000 Binary files a/host/figures/hdc/hdctracing.jpg and /dev/null differ diff --git a/host/figures/hdc/record.jpg b/host/figures/hdc/record.jpg deleted file mode 100644 index 2dcd197597c774d522c1c0a8987c201791e4ac6d..0000000000000000000000000000000000000000 Binary files a/host/figures/hdc/record.jpg and /dev/null differ diff --git a/host/figures/hiprofilercmd/Scheduling.jpg b/host/figures/hiprofilercmd/Scheduling.jpg deleted file mode 100644 index 725d7f6588e32949847d5def5a1e24dbe874ee2b..0000000000000000000000000000000000000000 Binary files a/host/figures/hiprofilercmd/Scheduling.jpg and /dev/null differ diff --git a/host/figures/hiprofilercmd/command.jpg b/host/figures/hiprofilercmd/command.jpg deleted file mode 100644 index 1f46dbfce09bf8d0ea5e77bb29798f5de4785951..0000000000000000000000000000000000000000 Binary files a/host/figures/hiprofilercmd/command.jpg and /dev/null differ diff --git a/host/figures/hiprofilercmd/commandend.jpg b/host/figures/hiprofilercmd/commandend.jpg deleted file mode 100644 index 54996a8d125d988cce045a5411f716aec23a986e..0000000000000000000000000000000000000000 Binary files a/host/figures/hiprofilercmd/commandend.jpg and /dev/null differ diff --git a/host/figures/hiprofilercmd/excutecommand.jpg b/host/figures/hiprofilercmd/excutecommand.jpg deleted file mode 100644 index 800db358d13c7144419e4620ae1a3a5e60f8d7e3..0000000000000000000000000000000000000000 Binary files a/host/figures/hiprofilercmd/excutecommand.jpg and /dev/null differ diff --git a/host/figures/hiprofilercmd/hiprofiler_plggins.jpg b/host/figures/hiprofilercmd/hiprofiler_plggins.jpg deleted file mode 100644 index 026e2e665ef7f385bb89997381f714fa5400a698..0000000000000000000000000000000000000000 Binary files a/host/figures/hiprofilercmd/hiprofiler_plggins.jpg and /dev/null differ diff --git a/host/figures/hiprofilercmd/hiprofilerd.jpg b/host/figures/hiprofilercmd/hiprofilerd.jpg deleted file mode 100644 index d67f1a118dc151533f1b7047f821aa270508f5dc..0000000000000000000000000000000000000000 Binary files a/host/figures/hiprofilercmd/hiprofilerd.jpg and /dev/null differ diff --git a/host/figures/hiprofilercmd/htrace.jpg b/host/figures/hiprofilercmd/htrace.jpg deleted file mode 100644 index ed4d99923ec33d120db0e96b27bc4b772097eafe..0000000000000000000000000000000000000000 Binary files a/host/figures/hiprofilercmd/htrace.jpg and /dev/null differ diff --git a/host/figures/hiprofilercmd/systraceconfig.jpg b/host/figures/hiprofilercmd/systraceconfig.jpg deleted file mode 100644 index 3d3fabe97909c1f9895c0c021c24e1a6ed16b303..0000000000000000000000000000000000000000 Binary files a/host/figures/hiprofilercmd/systraceconfig.jpg and /dev/null differ diff --git a/host/figures/hiprofilercmd/tracesetting.jpg b/host/figures/hiprofilercmd/tracesetting.jpg deleted file mode 100644 index e490d6a13a5c7ad743717924312b2c0c9b3fd86a..0000000000000000000000000000000000000000 Binary files a/host/figures/hiprofilercmd/tracesetting.jpg and /dev/null differ diff --git a/host/figures/perf/Options.jpg b/host/figures/perf/Options.jpg deleted file mode 100644 index 465b4cf6a06057fbe7e116c8bc72e967b94b59ec..0000000000000000000000000000000000000000 Binary files a/host/figures/perf/Options.jpg and /dev/null differ diff --git a/host/figures/perf/PerfProfile.jpg b/host/figures/perf/PerfProfile.jpg deleted file mode 100644 index 2732b9541a582b0fcd91836cf34a7ada08e336cd..0000000000000000000000000000000000000000 Binary files a/host/figures/perf/PerfProfile.jpg and /dev/null differ diff --git a/host/figures/perf/Samplelist.jpg b/host/figures/perf/Samplelist.jpg deleted file mode 100644 index f161a6c5a40405149ae296df339b43c154c2f81d..0000000000000000000000000000000000000000 Binary files a/host/figures/perf/Samplelist.jpg and /dev/null differ diff --git a/host/figures/perf/callstack.jpg b/host/figures/perf/callstack.jpg deleted file mode 100644 index fbcc33cf142a373fc381be32a1636b80096f7878..0000000000000000000000000000000000000000 Binary files a/host/figures/perf/callstack.jpg and /dev/null differ diff --git a/host/figures/perf/chart.jpg b/host/figures/perf/chart.jpg deleted file mode 100644 index c17758ab78a2fd465bed0c13eeb84ad9e95fe588..0000000000000000000000000000000000000000 Binary files a/host/figures/perf/chart.jpg and /dev/null differ diff --git a/host/figures/perf/datamining.jpg b/host/figures/perf/datamining.jpg deleted file mode 100644 index bcc45679dba8ad79e227314b853a54d76f8ab3e2..0000000000000000000000000000000000000000 Binary files a/host/figures/perf/datamining.jpg and /dev/null differ diff --git a/host/figures/perf/flame.jpg b/host/figures/perf/flame.jpg deleted file mode 100644 index a188dcef2e8d44d2819f25e7c3599298900d7080..0000000000000000000000000000000000000000 Binary files a/host/figures/perf/flame.jpg and /dev/null differ diff --git a/host/figures/perf/flamelevel2.jpg b/host/figures/perf/flamelevel2.jpg deleted file mode 100644 index 93b379960a2f0f01da97eef1e2aeeb2f7e1cd60c..0000000000000000000000000000000000000000 Binary files a/host/figures/perf/flamelevel2.jpg and /dev/null differ diff --git a/host/figures/perf/flameshow.jpg b/host/figures/perf/flameshow.jpg deleted file mode 100644 index 618a552a8a43811c92979d512c647ffc9915f331..0000000000000000000000000000000000000000 Binary files a/host/figures/perf/flameshow.jpg and /dev/null differ diff --git a/host/figures/perf/heaviesttrace1.jpg b/host/figures/perf/heaviesttrace1.jpg deleted file mode 100644 index de01d6767b988bc99b02d92869d2e9e66b0d6d30..0000000000000000000000000000000000000000 Binary files a/host/figures/perf/heaviesttrace1.jpg and /dev/null differ diff --git a/host/figures/perf/inputfilter.jpg b/host/figures/perf/inputfilter.jpg deleted file mode 100644 index 0beea5695a229a7527812634aaefdd2316074331..0000000000000000000000000000000000000000 Binary files a/host/figures/perf/inputfilter.jpg and /dev/null differ diff --git a/host/figures/perf/perfcommand.jpg b/host/figures/perf/perfcommand.jpg deleted file mode 100644 index 51ea2d696b88ce260b6ff0e0f16b12c6dbc00c73..0000000000000000000000000000000000000000 Binary files a/host/figures/perf/perfcommand.jpg and /dev/null differ diff --git a/host/figures/perf/perfexcutecommand.jpg b/host/figures/perf/perfexcutecommand.jpg deleted file mode 100644 index 43c0361a2e363c8e645671cf525e005cc32d9f18..0000000000000000000000000000000000000000 Binary files a/host/figures/perf/perfexcutecommand.jpg and /dev/null differ diff --git a/host/figures/perf/perffile.jpg b/host/figures/perf/perffile.jpg deleted file mode 100644 index 1e4b200913b1d0cad24ec5aab6b9535099686f66..0000000000000000000000000000000000000000 Binary files a/host/figures/perf/perffile.jpg and /dev/null differ diff --git a/host/figures/perf/perfset.jpg b/host/figures/perf/perfset.jpg deleted file mode 100644 index 3032dac77c2d5a53ccab6c8634fdf4933fa82efe..0000000000000000000000000000000000000000 Binary files a/host/figures/perf/perfset.jpg and /dev/null differ diff --git a/host/figures/perf/perfsetting.jpg b/host/figures/perf/perfsetting.jpg deleted file mode 100644 index 35de22f253d8143b2e9285a8dec4f245feb95fe9..0000000000000000000000000000000000000000 Binary files a/host/figures/perf/perfsetting.jpg and /dev/null differ diff --git a/host/figures/perf/samplecounter.jpg b/host/figures/perf/samplecounter.jpg deleted file mode 100644 index b7e92468b8b1ce414a831dd8134f3d6c5baa163e..0000000000000000000000000000000000000000 Binary files a/host/figures/perf/samplecounter.jpg and /dev/null differ diff --git a/host/figures/perf/summary.jpg b/host/figures/perf/summary.jpg deleted file mode 100644 index a8c01ad4ffec6b75b5efcae534084b53ce7370de..0000000000000000000000000000000000000000 Binary files a/host/figures/perf/summary.jpg and /dev/null differ diff --git a/host/figures/perf/trace2.jpg b/host/figures/perf/trace2.jpg deleted file mode 100644 index 6e324c54473450441105300db941db200b3da778..0000000000000000000000000000000000000000 Binary files a/host/figures/perf/trace2.jpg and /dev/null differ diff --git a/host/figures/sdk/sdk.jpg b/host/figures/sdk/sdk.jpg deleted file mode 100644 index d834d135a70a9ec080850d45f7b4e8e80237ab36..0000000000000000000000000000000000000000 Binary files a/host/figures/sdk/sdk.jpg and /dev/null differ diff --git a/host/figures/smaps/smapschart.jpg b/host/figures/smaps/smapschart.jpg deleted file mode 100644 index 032d543261f85121367fa3f7e260e688b018d815..0000000000000000000000000000000000000000 Binary files a/host/figures/smaps/smapschart.jpg and /dev/null differ diff --git a/host/figures/smaps/smapsexcuting.jpg b/host/figures/smaps/smapsexcuting.jpg deleted file mode 100644 index 53f86e1472c53801d7d3637ffadae6d493233921..0000000000000000000000000000000000000000 Binary files a/host/figures/smaps/smapsexcuting.jpg and /dev/null differ diff --git a/host/figures/smaps/smapslist.jpg b/host/figures/smaps/smapslist.jpg deleted file mode 100644 index 598f6a1289980ead2857757d8d7ff513d5a022d9..0000000000000000000000000000000000000000 Binary files a/host/figures/smaps/smapslist.jpg and /dev/null differ diff --git a/host/figures/smaps/smapsrecord.jpg b/host/figures/smaps/smapsrecord.jpg deleted file mode 100644 index 9380722264bf06e22a1b1231e97eca0f06a0db1f..0000000000000000000000000000000000000000 Binary files a/host/figures/smaps/smapsrecord.jpg and /dev/null differ diff --git a/host/figures/smaps/smapssetting.jpg b/host/figures/smaps/smapssetting.jpg deleted file mode 100644 index c79f7f9d047c0ca2e4d4b90ab15a58f81e279f81..0000000000000000000000000000000000000000 Binary files a/host/figures/smaps/smapssetting.jpg and /dev/null differ diff --git a/host/figures/smaps/smapsstatistics.jpg b/host/figures/smaps/smapsstatistics.jpg deleted file mode 100644 index 4af1ef5ad619eeb8a0ed024286c868421118c428..0000000000000000000000000000000000000000 Binary files a/host/figures/smaps/smapsstatistics.jpg and /dev/null differ diff --git a/host/figures/smaps/smapssummary.jpg b/host/figures/smaps/smapssummary.jpg deleted file mode 100644 index df74018bc3bdfd6bec26d540415e2125e929530a..0000000000000000000000000000000000000000 Binary files a/host/figures/smaps/smapssummary.jpg and /dev/null differ diff --git a/host/figures/smartperf_framework.png b/host/figures/smartperf_framework.png deleted file mode 100644 index 62c1bc6cd61e07ba3014141f70941e6134d75681..0000000000000000000000000000000000000000 Binary files a/host/figures/smartperf_framework.png and /dev/null differ diff --git a/host/ide/README_zh.md b/host/ide/README_zh.md index 3ac718c8f2ae239c7e9e312e3df38dbcb2a23b75..2c73b0ac620af594982288d8a28269e89cc6200c 100644 --- a/host/ide/README_zh.md +++ b/host/ide/README_zh.md @@ -13,7 +13,7 @@ apt-get update apt-get install nodejs npm ``` -![](../figures/deploy/install_node.png) +![](./src/figures/deploy/install_node.png) - centos 系统中使用yum安装,先切换到root用户下,命令如下: @@ -21,7 +21,7 @@ sudo su sudo yum -y install nodejs npm ``` -![](../figures/deploy/yum_install_node.png) +![](./src/figures/deploy/yum_install_node.png) - windows系统中, 用安装包一路next即可 @@ -31,7 +31,7 @@ node -v npm -v ``` -![](../figures/deploy/check_version.png) +![](./src/figures/deploy/check_version.png) 出现版本号就代表安装成功了。 @@ -48,14 +48,14 @@ ``` 验证安装完成: -![](../figures/deploy/install_tsc.png) +![](./src/figures/deploy/install_tsc.png) ### go 编译环境安装 - ubuntu 环境下直接使用apt安装,以root用户执行(go 版本 >= 1.13.8 ) ``` apt-get install golang-go ``` -![](../figures/deploy/install_golang.png) +![](./src/figures/deploy/install_golang.png) - centos系统中使用yum安装,先切换到root用户下,命令如下: @@ -63,7 +63,7 @@ sudo su sudo yum -y install go ``` -![](../figures/deploy/yum_install_go.png) +![](./src/figures/deploy/yum_install_go.png) - windows 系统下 从 https://golang.google.cn/dl/ 下载安装包, 一路next 完成 安装即可 @@ -78,15 +78,15 @@ 将压缩包解压后, 将文件放置到项目third-party 目录下。 -![](../figures/deploy/third_party.png) +![](./src/figures/deploy/third_party.png) #### 先编译获取trace_streamer 的二进制包 参照:smartperf/trace_streamer/compile_trace_streamer.md 编译出wasm、linux、Windows版本的二进制文件。 将获取到二进制文件放入到项目bin目录下,如果项目目录中无bin目录 先创建bin目录。 然后将trace_streamer的二进制文件放入bin目录中。 -![](../figures/deploy/put_bin.png) -![](../figures/deploy/bin_files.png) +![](./src/figures/deploy/put_bin.png) +![](./src/figures/deploy/bin_files.png) #### 代码编译(依赖于上面node环境 和 go环境) @@ -98,7 +98,7 @@ ``` npm run compile ``` -![](../figures/deploy/compile.png) +![](./src/figures/deploy/compile.png) 编译成功后会有main 可执行文件生成。 ## 项目部署 @@ -106,15 +106,15 @@ linux版本部署需要给trace_stream程序赋予执行权限,cd dist/bin 目 ``` chmod +x trace_streamer_* ``` -![](../figures/deploy/chomd+x.png) +![](./src/figures/deploy/chomd+x.png) 直接运行 ./main 可执行程序,完成项目的部署。 -![](../figures/deploy/run_main.png) +![](./src/figures/deploy/run_main.png) ## 访问项目 在浏览器上打开 https://[部署机器ip地址]:9000/application/ !!! 注意一定是https。 -![](../figures/deploy/visit_website.png) +![](./src/figures/deploy/visit_website.png) 备注:如果未出现如图所示网页.而是显示 无法访问此网站。 可以在window cmd 里执行telnet [部署机器ip地址] 9000。 diff --git a/host/ide/src/base-ui/button/LitButton.ts b/host/ide/src/base-ui/button/LitButton.ts index 21228ccfc70fceb9abc76f934fa32189cb4d305e..5046ef46b334686364556a8f5c1db32fa54f3b39 100644 --- a/host/ide/src/base-ui/button/LitButton.ts +++ b/host/ide/src/base-ui/button/LitButton.ts @@ -177,7 +177,7 @@ export class LitButton extends BaseElement {
`; diff --git a/host/ide/src/base-ui/chart/column/LitChartColumn.ts b/host/ide/src/base-ui/chart/column/LitChartColumn.ts index 00c3356f1a87953802a402a80e4bf5a431f1eab2..639fef22631a824db312e16f1bfe26beb1e5abe8 100644 --- a/host/ide/src/base-ui/chart/column/LitChartColumn.ts +++ b/host/ide/src/base-ui/chart/column/LitChartColumn.ts @@ -72,7 +72,6 @@ export class LitChartColumn extends BaseElement { this.data.forEach((it) => (it.hover = false)); this.render(); }; - this.canvas!.onmouseover = (e) => {}; this.canvas!.onmousemove = (ev) => { let rect = this.getBoundingClientRect(); let x = ev.pageX - rect.left; @@ -80,6 +79,7 @@ export class LitChartColumn extends BaseElement { this.data.forEach((it) => { if (contains(it.bgFrame!, x, y)) { it.hover = true; + this.cfg?.hoverHandler?.(it.obj.no); } else { it.hover = false; } @@ -136,6 +136,50 @@ export class LitChartColumn extends BaseElement { this.render(); } + showHoverColumn(index: number) { + this.data.forEach((it) => { + if (it.obj.no === index) { + it.hover = true; + } else { + it.hover = false; + } + }); + let pillars = this.data.filter((it) => it.hover); + if (this.cfg?.seriesField) { + if (pillars.length > 0) { + let hoverData = pillars[0]; + let title = ``; + let msg = pillars + .map((it) => ``) + .join(''); + let sum = ``; + let innerHtml = `
${title}${msg}${sum}
`; + this.showTip( + this.clientWidth/2, + this.clientHeight/2, + this.cfg!.tip ? this.cfg!.tip(pillars) : innerHtml + ); + } + } else { + if (pillars.length > 0) { + let hoverData = pillars[0]; + let title = ``; + let innerHtml = `
${title}
`; + this.showTip( + this.clientWidth/2, + this.clientHeight/2, + this.cfg!.tip ? this.cfg!.tip(pillars) : innerHtml + ); + } + } + + if (this.data.filter((it) => it.process).length == 0) { + this.render(); + } + } + initElements(): void { new ResizeObserver((entries, observer) => { entries.forEach((it) => { diff --git a/host/ide/src/base-ui/chart/column/LitChartColumnConfig.ts b/host/ide/src/base-ui/chart/column/LitChartColumnConfig.ts index 4002187327d4bd8b8d6c421ae7ed5a870dc82d06..1c245ead16548b9abe1c15008f3a8888ce14c520 100644 --- a/host/ide/src/base-ui/chart/column/LitChartColumnConfig.ts +++ b/host/ide/src/base-ui/chart/column/LitChartColumnConfig.ts @@ -21,6 +21,7 @@ export interface LitChartColumnConfig { seriesField: string; color: (a: any) => string; tip: ((a: any) => string) | undefined; + hoverHandler?: (no: number) => void; label: | { offset: number; diff --git a/host/ide/src/base-ui/chart/pagenation/PageNation.ts b/host/ide/src/base-ui/chart/pagenation/PageNation.ts new file mode 100644 index 0000000000000000000000000000000000000000..118702d4016489351961d8ca395ee722163803eb --- /dev/null +++ b/host/ide/src/base-ui/chart/pagenation/PageNation.ts @@ -0,0 +1,485 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export class PageNation { + element: any; + pageInfo: any; + first: any; + prev: any; + next: any; + last: any; + inputBox: any; + btn: any; + list: any; + origin: HTMLElement | undefined; + static BtnBackColor = '#6c9bfa'; + static BtnColor = '#fff'; + constructor(selector: any, options = {}) { + //最大容器 + this.element = selector; + // 默认值 + this.pageInfo = { + current: 1, + total: 100, + pageSize: 15, + }; + //等待创建的元素 + this.first = null; + this.prev = null; + this.next = null; + this.last = null; + // 输入框 + this.inputBox = null; + // 跳转按钮 + this.btn = null; + // 中间的按钮组 + this.list = null; + this.setPageOptions(options); + this.setItemStyles(); + this.createPageElement(); + this.bindPageHtml(); + this.bindPageEvent(); + } + + setPageOptions(options: any) { + // 当前页 + this.pageInfo.current = options.current || 1; + // 一页显示多少条 + this.pageInfo.pageSize = options.pageSize || 15; + if (options.totalpage) { + //用户传递了多少页 + this.pageInfo.totalpage = options.totalpage; + } else { + //没有传递多少页 + if (options.total) { + // 如果传递了总条数 + this.pageInfo.totalpage = Math.ceil( + options.total / this.pageInfo.pageSize + ); + } else { + // 如果没有传递总条数 + this.pageInfo.totalpage = 9; + } + } + this.pageInfo.first = options.first || 'Home'; + this.pageInfo.change = options.change || function () {}; + } + + setElementStyles(ele: any, styles: any) { + for (let key in styles) { + ele.style[key] = styles[key]; + } + } + + setItemStyles() { + this.setElementStyles(this.element, { + margin: '50px auto', + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + }); + } + + // 创建元素 首页 上一页 按钮组 下一页 尾页 输入框 按钮 + createPageElement() { + //首页 + this.origin = document.createElement('p'); + this.setElementStyles(this.origin, { + 'border-radius': '5px', + padding: '5px', + border: '1px solid #333', + cursor: 'pointer', + margin: '0 10px', + }); + + this.first = this.origin.cloneNode(true); + this.first.innerText = this.pageInfo.first; + this.first.name = 'first'; + this.element.appendChild(this.first); + + this.prev = this.origin.cloneNode(true); + this.prev.innerText = 'Previous'; + this.prev.name = 'prev'; + this.element.appendChild(this.prev); + + // 创建ul + this.list = document.createElement('ul'); + this.setElementStyles(this.list, { + display: 'flex', + padding: '0', + }); + this.element.appendChild(this.list); + this.next = this.origin.cloneNode(true); + this.next.innerText = 'Next'; + this.next.name = 'next'; + this.element.appendChild(this.next); + this.last = this.origin.cloneNode(true); + this.last.innerText = 'Last'; + this.last.name = 'last'; + this.element.appendChild(this.last); + // 创建输入框 + this.inputBox = document.createElement('input'); + this.inputBox.value = this.pageInfo.current; + this.setElementStyles(this.inputBox, { + width: '50px', + height: '30px', + textAlign: 'center', + outline: 'none', + margin: '0 10px', + 'border-radius': '5px', + }); + this.element.appendChild(this.inputBox); + // 创建按钮 + this.btn = document.createElement('button'); + this.btn.innerText = 'Jump'; + this.btn.name = 'goto'; + this.setElementStyles(this.btn, { + height: '34px', + width: '50px', + cursor: 'pointer', + 'border-radius': '5px', + }); + this.element.appendChild(this.btn); + } + + // 判断首页 上一页 下一页 尾页 是否可以点击 + bindPageHtml() { + const { current, totalpage } = this.pageInfo; + const disable = { backgroundColor: '#ccc', cursor: 'not-allowed' }; + const enable = { + backgroundColor: PageNation.BtnColor, + cursor: 'pointer', + }; + // 判断当前页是否是第一页 如果是第一页 那么首页和上一页就不能点击 + if (current <= 1) { + this.setElementStyles(this.first, disable); + this.setElementStyles(this.prev, disable); + } else { + this.setElementStyles(this.first, enable); + this.setElementStyles(this.prev, enable); + } + // 判断当前页是否是最后一页 如果是最后一页 那么下一页和尾页就不能点击 + if (current >= totalpage) { + this.setElementStyles(this.next, disable); + this.setElementStyles(this.last, disable); + } else { + this.setElementStyles(this.next, enable); + this.setElementStyles(this.last, enable); + } + this.inputBox.value = current; + //渲染的时候判断ul列表的显示情况 + this.bindPageList(); + this.pageInfo.change(this.pageInfo.current); + } + + bindPageList() { + // clear ul里面的内容 + this.list.innerHTML = ''; + //每次加载之前先清空ul里面的内容 + const { pageSize, current, totalpage } = this.pageInfo; + const origin = document.createElement('li'); + origin.dataset.name = 'item'; + this.setElementStyles(origin, { + listStyle: 'none', + 'border-radius': '5px', + border: '1px solid #333', + padding: '5px 10px', + margin: '0 5px', + cursor: 'pointer', + }); + if (totalpage <= 9) { + for (let i = 0; i < totalpage; i++) { + const li = origin.cloneNode(true); + // @ts-ignore + li.innerText = i + 1; + if (i + 1 === current) { + this.setElementStyles(li, { + backgroundColor: PageNation.BtnBackColor, + color: PageNation.BtnColor, + }); + } + this.list.appendChild(li); + } + return; + } + // 左边5个 中间 ... 右边2个 + if (this.bindLeftList(current, totalpage, origin)) { + return; + } + // 当前页面 大于5页 小于倒数第5页 + for (let i = 0; i < 2; i++) { + const li = origin.cloneNode(true); + // @ts-ignore + li.innerText = i + 1; + if (i + 1 === current) { + this.setElementStyles(li, { + backgroundColor: PageNation.BtnBackColor, + color: PageNation.BtnColor, + }); + } + this.list.appendChild(li); + } + var span = document.createElement('span'); + span.innerText = '...'; + this.list.appendChild(span); + for (let i = current - 3; i < current + 2; i++) { + const li = origin.cloneNode(true); + // @ts-ignore + li.innerText = i + 1; + if (i + 1 === current) { + this.setElementStyles(li, { + backgroundColor: PageNation.BtnBackColor, + color: PageNation.BtnColor, + }); + } + this.list.appendChild(li); + } + var span = document.createElement('span'); + span.innerText = '...'; + this.list.appendChild(span); + for (let i = totalpage - 2; i < totalpage; i++) { + const li = origin.cloneNode(true); + // @ts-ignore + li.innerText = i + 1; + if (i + 1 === current) { + this.setElementStyles(li, { + backgroundColor: PageNation.BtnBackColor, + color: PageNation.BtnColor, + }); + } + this.list.appendChild(li); + } + } + + bindLeftList( + current: number, + totalpage: number, + origin: HTMLElement + ): boolean { + if (current < 5) { + // 左边5个 中间 ... 右边2个 + for (let i = 0; i < 5; i++) { + const li = origin.cloneNode(true); + // @ts-ignore + li.innerText = i + 1; + if (i + 1 === current) { + this.setElementStyles(li, { + backgroundColor: PageNation.BtnBackColor, + color: PageNation.BtnColor, + }); + } + this.list.appendChild(li); + } + var span = document.createElement('span'); + span.innerText = '...'; + this.list.appendChild(span); + for (let i = totalpage - 2; i < totalpage; i++) { + const li = origin.cloneNode(true); + // @ts-ignore + li.innerText = i + 1; + if (i + 1 === current) { + this.setElementStyles(li, { + backgroundColor: PageNation.BtnBackColor, + color: PageNation.BtnColor, + }); + } + this.list.appendChild(li); + } + return true; + } + if (current == 5) { + // 左边5个 中间 ... 右边2个 + for (let i = 0; i < 7; i++) { + const li = origin.cloneNode(true); + // @ts-ignore + li.innerText = i + 1; + if (i + 1 === current) { + this.setElementStyles(li, { + backgroundColor: PageNation.BtnBackColor, + color: PageNation.BtnColor, + }); + } + this.list.appendChild(li); + } + var span = document.createElement('span'); + span.innerText = '...'; + this.list.appendChild(span); + + for (let i = totalpage - 2; i < totalpage; i++) { + const li = origin.cloneNode(true); + // @ts-ignore + li.innerText = i + 1; + if (i + 1 === current) { + this.setElementStyles(li, { + backgroundColor: PageNation.BtnBackColor, + color: PageNation.BtnColor, + }); + } + this.list.appendChild(li); + } + return true; + } + // 当前页面 大于倒数第5页 + if (current > totalpage - 4) { + // 左边5个 中间 ... 右边2个 + for (let i = 0; i < 2; i++) { + const li = origin.cloneNode(true); + // @ts-ignore + li.innerText = i + 1; + if (i + 1 === current) { + this.setElementStyles(li, { + backgroundColor: PageNation.BtnBackColor, + color: PageNation.BtnColor, + }); + } + this.list.appendChild(li); + } + var span = document.createElement('span'); + span.innerText = '...'; + this.list.appendChild(span); + for (let i = totalpage - 5; i < totalpage; i++) { + const li = origin.cloneNode(true); + // @ts-ignore + li.innerText = i + 1; + if (i + 1 === current) { + this.setElementStyles(li, { + backgroundColor: PageNation.BtnBackColor, + color: PageNation.BtnColor, + }); + } + this.list.appendChild(li); + } + return true; + } + if (current == totalpage - 4) { + // 左边5个 中间 ... 右边2个 + for (let i = 0; i < 2; i++) { + const li = origin.cloneNode(true); + // @ts-ignore + li.innerText = i + 1; + if (i + 1 === current) { + this.setElementStyles(li, { + backgroundColor: PageNation.BtnBackColor, + color: PageNation.BtnColor, + }); + } + this.list.appendChild(li); + } + var span = document.createElement('span'); + span.innerText = '...'; + this.list.appendChild(span); + for (let i = totalpage - 7; i < totalpage; i++) { + const li = origin.cloneNode(true); + // @ts-ignore + li.innerText = i + 1; + if (i + 1 === current) { + this.setElementStyles(li, { + backgroundColor: PageNation.BtnBackColor, + color: PageNation.BtnColor, + }); + } + this.list.appendChild(li); + } + return true; + } + if (current == totalpage - 4) { + // 左边5个 中间 ... 右边2个 + for (let i = 0; i < 2; i++) { + const li = origin.cloneNode(true); + // @ts-ignore + li.innerText = i + 1; + if (i + 1 === current) { + this.setElementStyles(li, { + backgroundColor: PageNation.BtnBackColor, + color: PageNation.BtnColor, + }); + } + this.list.appendChild(li); + } + var span = document.createElement('span'); + span.innerText = '...'; + this.list.appendChild(span); + for (let i = totalpage - 7; i < totalpage; i++) { + const li = origin.cloneNode(true); + // @ts-ignore + li.innerText = i + 1; + if (i + 1 === current) { + this.setElementStyles(li, { + backgroundColor: PageNation.BtnBackColor, + color: PageNation.BtnColor, + }); + } + this.list.appendChild(li); + } + return true; + } + return false; + } + + bindPageEvent() { + this.element.addEventListener( + 'click', + (event: { + target: { + name: string; + dataset: { name: string }; + innerText: number; + }; + }) => { + if (event.target.name === 'first') { + if (this.pageInfo.current === 1) return; + this.pageInfo.current = 1; + this.bindPageHtml(); + } + if (event.target.name === 'prev') { + if (this.pageInfo.current === 1) return; + this.pageInfo.current--; + this.bindPageHtml(); + } + if (event.target.name === 'next') { + if (this.pageInfo.current === this.pageInfo.totalpage) + return; + this.pageInfo.current++; + this.bindPageHtml(); + } + if (event.target.name === 'last') { + if (this.pageInfo.current === this.pageInfo.totalpage) + return; + this.pageInfo.current = this.pageInfo.totalpage; + this.bindPageHtml(); + } + if (event.target.name === 'goto') { + // 拿到你文本的内容 + let page = this.inputBox.value - 0; + if (isNaN(page)) { + page = 1; + } + if (page <= 1) { + page = 1; + } + if (page >= this.pageInfo.totalpage) { + page = this.pageInfo.totalpage; + } + this.pageInfo.current = page; + this.bindPageHtml(); + } + if (event.target.dataset.name === 'item') { + this.pageInfo.current = event.target.innerText - 0; + this.bindPageHtml(); + } + } + ); + } +} diff --git a/host/ide/src/base-ui/chart/pagenation/pagination-box.ts b/host/ide/src/base-ui/chart/pagenation/pagination-box.ts new file mode 100644 index 0000000000000000000000000000000000000000..c1f9a76870e3f9a129037b0a001afb6d49bd38d0 --- /dev/null +++ b/host/ide/src/base-ui/chart/pagenation/pagination-box.ts @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { BaseElement, element } from '../../BaseElement.js'; + +@element('pagination-box') +export class PaginationBox extends BaseElement { + private page: any; + + static get observedAttributes() { + return ['text', 'height', 'width']; + } + + get text() { + return this.getAttribute('text') || ''; + } + + set text(text: string) { + this.setAttribute('text', text); + } + + get height() { + return this.getAttribute('height') || ''; + } + + set height(height: string) { + this.setAttribute('height', height); + } + + initHtml(): string { + return ` + + + `; + } + + initElements(): void { + this.page = this.shadowRoot?.querySelector('#box'); + } + + attributeChangedCallback(name: string, oldValue: string, value: string) { + switch (name) { + } + } +} diff --git a/host/ide/src/base-ui/chart/pie/LitChartPie.ts b/host/ide/src/base-ui/chart/pie/LitChartPie.ts index e09ddbc702143b158168c3e525cb6262fcc082e7..ada9723122ace283f70a491225eba64c64812bdb 100644 --- a/host/ide/src/base-ui/chart/pie/LitChartPie.ts +++ b/host/ide/src/base-ui/chart/pie/LitChartPie.ts @@ -80,6 +80,30 @@ export class LitChartPie extends BaseElement { } } + showHover() { + let hasHover = false; + this.data.forEach((it) => { + it.hover = it.obj.isHover; + if (it.hover) { + hasHover = true; + } + this.updateHoverItemStatus(it); + if (it.hover) { + this.showTip( + this.centerX || 0, + this.centerY || 0, + this.cfg!.tip + ? this.cfg!.tip(it) + : `${it.key}: ${it.value}` + ); + } + }); + if (!hasHover) { + this.hideTip(); + } + this.render(); + } + measure() { if (!this.cfg) return; this.data = []; @@ -188,7 +212,9 @@ export class LitChartPie extends BaseElement { it.hover = degree >= it.startDegree! && degree <= it.endDegree!; this.updateHoverItemStatus(it); + it.obj.isHover = it.hover; if (it.hover) { + this.cfg!.hoverHandler?.(it.obj); this.showTip( ev.pageX - rect.left + 10, ev.pageY - this.offsetTop - 10, @@ -202,8 +228,10 @@ export class LitChartPie extends BaseElement { this.hideTip(); this.data.forEach((it) => { it.hover = false; + it.obj.isHover = false; this.updateHoverItemStatus(it); }); + this.cfg!.hoverHandler?.(undefined); } this.render(); }; @@ -535,7 +563,7 @@ export class LitChartPie extends BaseElement { .bg_nodata{ background-repeat:no-repeat; background-position:center; - background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJQAAADPCAYAAAFkcsh2AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAlKADAAQAAAABAAAAzwAAAAD2dHVdAAAtN0lEQVR4Ae2dCbgeRZnvk5OTjQDZyAJkXwmEfd+SIyCKwx1GEDdGRxnkOl5QGRHuPPK4IG6go1x90EEcGWfGZQZ15jrKeBU8OWEJhCWBsATIHkJIICEhC9nI/f37dDX11df7199ykq7neb+qeuutt97699vV1dXV/fXqlRCeffbZv4a2Qv+eINqrd5jA4sWL1+/du/eQsDLDO+KII6rqVjGwYK+pkBS3tbV9dNq0aXcauQplWRQFCnr3vmf69OnnKd9mmHkUqS5wnGt0eMqEkWHkiY0hnrI4sHv37t2V1AAyz0jGw8xoTqqUVN5GF69IEqLlBUaG9LMm7cbq5i0uMyT/huEByREm7cZtFP7WZdL6fJuHzGl2PipdLGZRrfj8lQnlQXF7e/tUzzUCTnViXDUrnDNlypQXPGVhJ214lSrufT7nMcWBZX369Lm0SjSZcZZEMOZExe6J/nt456sgbbB7VaHMKEhzRuA+cxktZpk6ikOVGYEwpRy1UYC9zsiUcfEItOdV2Sek4gx4ZhgfRHoXdBukI78H2ghdBGnsvxyqGnXghYajQ7kRzFg/Ux1G4nmMZ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oe1LzvFT3z8VEn4Lk8IOhd0B/A+kFxxchvQr+VUhOeCmkTxTqg2X6LqT+HUmj4GRoNfRNSC8X2B/wv4G85B6CksJtCMjuWZDsORO6CtLrT0Znkr2IVgW9hqWR6ChI3+38IHQepE9Xd0GboSmQTrapkI7VcdD/8vMPE8uuYyFhq3r6up5O0K9ARtdY0pdB74PmQjuhfSoIPH2F9qPQzdDt0PchgaNwGiSeLo920AEVfzgkh1JaANtBDnWFzSCtt48lO9TnC2g5iZwwTZDsXziCctgbfV4ae53qvQbCkE0dTsF0ny8nsIOcRPar/Hroe5AJnyBxjck4sfo4HtIopvb0Hc26hva6aq9Uri+tvAr9FHrQJyIv6CB/BHoRksMpvNIdBb86QxUErglrTMKKXd59lMnx5MA/hDSi/QjaBqUNWxzB3eTbfF4We40ajSgKLv6G313aq9d7SXRA/wQt9mkBsetwsIIwidT/hu6FuiBhKvvfAdU9GFDq3hAN/BaaDV0HqdP6luYwSCPIhZAAWwHdA+mDFLrkaTSSjUdDcoTfQK6jwUoMdyAxGfoqNB96GFI4AvospDM/b8hj73oa+z2kS6UuvTpZZN/7ITscSkZYPAvtgt4OabSUvHFGnRijoJGQsDoM0iVeL5aug6ZA10IK/bujfetXQKjT+vCpOuuelbC8YMCZRm6Qz6sl0rCvuYU9wknfu6G4M14yaUJee0egfBLUN6aRcZSZkVBiOhl1CTRBmB5sMn6sk1GOZgfjdDav0LQLbqHKW0TZx7BDI5GGfTnUTsgEHYSt0B7DKOMSgRKBEoESgRKBEoESgRQI/H+jqTosKu/LwQAAAABJRU5ErkJggg==); + background-image: url("img/pie_chart_no_data.png"); } .bg_hasdata{ background-repeat:no-repeat; diff --git a/host/ide/src/base-ui/chart/pie/LitChartPieConfig.ts b/host/ide/src/base-ui/chart/pie/LitChartPieConfig.ts index 2a6786cad17d6d59e37555091177220a4f5d316d..8f5bf80183ce896f16045129e91734ba683ea8ce 100644 --- a/host/ide/src/base-ui/chart/pie/LitChartPieConfig.ts +++ b/host/ide/src/base-ui/chart/pie/LitChartPieConfig.ts @@ -30,6 +30,7 @@ export interface LitChartPieConfig { textAlign: string; }; }; + hoverHandler?: (data: any) => void; showChartLine?: boolean; tip: ((a: any) => string) | undefined; interactions: { diff --git a/host/ide/src/base-ui/checkbox/LitCheckBox.ts b/host/ide/src/base-ui/checkbox/LitCheckBox.ts index 8f5501daa77e591c863437f5e9471d117a30dfb9..73a788b522bbda547dfd83785fe5a909d2a8547e 100644 --- a/host/ide/src/base-ui/checkbox/LitCheckBox.ts +++ b/host/ide/src/base-ui/checkbox/LitCheckBox.ts @@ -122,15 +122,15 @@ export class LitCheckBox extends BaseElement { transform:scale(1); } .icon{ - width: 90%; - height: 55%; + width: 100%; + height: 94%; transform: scale(0); }