Commit 846f48aa authored by Joon Ahn's avatar Joon Ahn Committed by Commit Bot

Diagnostics: Add realtime-cpu-chart component

Skeleton component for cpu chart
https://screenshot.googleplex.com/C7PPFcPZ95FZXJ8

Bug: 1125150
Test: browser_tests --gtest_Filter=DiagnosticsApp*
Change-Id: Ic2ae0209fb71f894df8a4b3a4e61547975ff0f11
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2438882
Commit-Queue: Joon Ahn <joonbug@chromium.org>
Reviewed-by: default avatarZentaro Kavanagh <zentaro@chromium.org>
Cr-Commit-Position: refs/heads/master@{#812125}
parent cd9c0f48
...@@ -24,6 +24,7 @@ js_type_check("closure_compile_module") { ...@@ -24,6 +24,7 @@ js_type_check("closure_compile_module") {
":mojo_interface_provider", ":mojo_interface_provider",
":overview_card", ":overview_card",
":percent_bar_chart", ":percent_bar_chart",
":realtime_cpu_chart",
] ]
} }
...@@ -112,6 +113,12 @@ js_library("percent_bar_chart") { ...@@ -112,6 +113,12 @@ js_library("percent_bar_chart") {
] ]
} }
js_library("realtime_cpu_chart") {
deps = [
"//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
]
}
html_to_js("web_components") { html_to_js("web_components") {
js_files = [ js_files = [
"battery_status_card.js", "battery_status_card.js",
...@@ -124,5 +131,6 @@ html_to_js("web_components") { ...@@ -124,5 +131,6 @@ html_to_js("web_components") {
"memory_card.js", "memory_card.js",
"overview_card.js", "overview_card.js",
"percent_bar_chart.js", "percent_bar_chart.js",
"realtime_cpu_chart.js",
] ]
} }
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
<include name="IDR_DIAGNOSTICS_MOJO_INTERFACE_PROVIDER_JS" file="mojo_interface_provider.js" type="BINDATA"/> <include name="IDR_DIAGNOSTICS_MOJO_INTERFACE_PROVIDER_JS" file="mojo_interface_provider.js" type="BINDATA"/>
<include name="IDR_DIAGNOSTICS_OVERVIEW_CARD_JS" file="${root_gen_dir}/chromeos/components/diagnostics_ui/resources/overview_card.js" use_base_dir="false" type="BINDATA"/> <include name="IDR_DIAGNOSTICS_OVERVIEW_CARD_JS" file="${root_gen_dir}/chromeos/components/diagnostics_ui/resources/overview_card.js" use_base_dir="false" type="BINDATA"/>
<include name="IDR_DIAGNOSTICS_PERCENT_BAR_CHART_JS" file="${root_gen_dir}/chromeos/components/diagnostics_ui/resources/percent_bar_chart.js" use_base_dir="false" type="BINDATA"/> <include name="IDR_DIAGNOSTICS_PERCENT_BAR_CHART_JS" file="${root_gen_dir}/chromeos/components/diagnostics_ui/resources/percent_bar_chart.js" use_base_dir="false" type="BINDATA"/>
<include name="IDR_DIAGNOSTICS_REALTIME_CPU_CHART_JS" file="${root_gen_dir}/chromeos/components/diagnostics_ui/resources/realtime_cpu_chart.js" use_base_dir="false" type="BINDATA"/>
<include name="IDR_DIAGNOSTICS_SHARED_CSS_JS" file="${root_gen_dir}/chromeos/components/diagnostics_ui/resources/diagnostics_shared_css.js" use_base_dir="false" type="BINDDATA"/> <include name="IDR_DIAGNOSTICS_SHARED_CSS_JS" file="${root_gen_dir}/chromeos/components/diagnostics_ui/resources/diagnostics_shared_css.js" use_base_dir="false" type="BINDDATA"/>
<include name="IDR_DIAGNOSTICS_TYPES_JS" file="diagnostics_types.js" type="BINDATA"/> <include name="IDR_DIAGNOSTICS_TYPES_JS" file="diagnostics_types.js" type="BINDATA"/>
</includes> </includes>
......
<style include="diagnostics-shared diagnostics-fonts">
</style>
<div id="chart-wrapper">
<div>[[user]]</div>
<div>[[system]]</div>
</div>
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import './diagnostics_fonts_css.js';
import './diagnostics_shared_css.js';
import {html, Polymer} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
/**
* @fileoverview
* 'realtime-cpu-chart' is a moving line graph component used to display a
* realtime cpu usage information.
*/
Polymer({
is: 'realtime-cpu-chart',
_template: html`{__html_template__}`,
properties: {
user: {
type: Number,
value: 0,
},
system: {
type: Number,
value: 0,
},
},
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment