All of lore.kernel.org
 help / color / mirror / Atom feed
* [Powertop] [PATCH v3 06/31] report-html: summary list and navigation
@ 2013-11-18 20:26 Alexandra Yates
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandra Yates @ 2013-11-18 20:26 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 1656 bytes --]

Generates the html tags to add navigation and summary including css
attribute support.

Signed-off-by: Alexandra Yates <alexandra.yates(a)linux.intel.com>
---
 src/report/report-formatter-html.cpp |   18 ++++++++++++++++++
 src/report/report-formatter-html.h   |    2 ++
 2 files changed, 20 insertions(+)

diff --git a/src/report/report-formatter-html.cpp b/src/report/report-formatter-html.cpp
index 2e59725..93a4c48 100644
--- a/src/report/report-formatter-html.cpp
+++ b/src/report/report-formatter-html.cpp
@@ -516,3 +516,21 @@ report_formatter_html::add_title(struct tag_attr *title_att, const char *title)
 	addf_exact("<h2 class=\"%s\"> %s </h2>\n", title_att->css_class, title);
 }
 
+void
+report_formatter_html::add_navigation()
+{
+	add_exact("<br/><nav id=\"main_menu\"> </nav>\n");
+}
+
+void
+report_formatter_html::add_summary_list(std::string *list, int size)
+{
+	int i;
+	add_exact("<div><br/> <ul>\n");
+	for (i=0; i < size; i+=2){
+		addf_exact("<li class=\"summary_list\"> <b> %s </b> %s </li>",
+				list[i].c_str(), list[i+1].c_str());
+	}
+	add_exact("</ul> </div> <br />\n");
+}
+
diff --git a/src/report/report-formatter-html.h b/src/report/report-formatter-html.h
index 0f508d3..261e0dd 100644
--- a/src/report/report-formatter-html.h
+++ b/src/report/report-formatter-html.h
@@ -89,6 +89,8 @@ public:
 	void add_div(struct tag_attr *div_attr);
 	void end_div();
 	void add_title(struct tag_attr *title_att, const char *title);
+	void add_navigation();
+	void add_summary_list(std::string *list, int size);
 
 private:
 	/* Document structure related functions */
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Powertop] [PATCH v3 06/31] report-html: summary list and navigation
@ 2013-12-10 19:53 Sergey Senozhatsky
  0 siblings, 0 replies; 3+ messages in thread
From: Sergey Senozhatsky @ 2013-12-10 19:53 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 2031 bytes --]

On (11/18/13 12:26), Alexandra Yates wrote:
> Generates the html tags to add navigation and summary including css
> attribute support.
> 
> Signed-off-by: Alexandra Yates <alexandra.yates(a)linux.intel.com>
> ---
>  src/report/report-formatter-html.cpp |   18 ++++++++++++++++++
>  src/report/report-formatter-html.h   |    2 ++
>  2 files changed, 20 insertions(+)
> 
> diff --git a/src/report/report-formatter-html.cpp b/src/report/report-formatter-html.cpp
> index 2e59725..93a4c48 100644
> --- a/src/report/report-formatter-html.cpp
> +++ b/src/report/report-formatter-html.cpp
> @@ -516,3 +516,21 @@ report_formatter_html::add_title(struct tag_attr *title_att, const char *title)
>  	addf_exact("<h2 class=\"%s\"> %s </h2>\n", title_att->css_class, title);
>  }
>  
> +void
> +report_formatter_html::add_navigation()
> +{
> +	add_exact("<br/><nav id=\"main_menu\"> </nav>\n");
> +}
> +
> +void
> +report_formatter_html::add_summary_list(std::string *list, int size)
> +{
> +	int i;
> +	add_exact("<div><br/> <ul>\n");
> +	for (i=0; i < size; i+=2){


summary list is guaranteed to contain `2 * n' elements?

	-ss

> +		addf_exact("<li class=\"summary_list\"> <b> %s </b> %s </li>",
> +				list[i].c_str(), list[i+1].c_str());
> +	}
> +	add_exact("</ul> </div> <br />\n");
> +}
> +
> diff --git a/src/report/report-formatter-html.h b/src/report/report-formatter-html.h
> index 0f508d3..261e0dd 100644
> --- a/src/report/report-formatter-html.h
> +++ b/src/report/report-formatter-html.h
> @@ -89,6 +89,8 @@ public:
>  	void add_div(struct tag_attr *div_attr);
>  	void end_div();
>  	void add_title(struct tag_attr *title_att, const char *title);
> +	void add_navigation();
> +	void add_summary_list(std::string *list, int size);
>  
>  private:
>  	/* Document structure related functions */
> -- 
> 1.7.9.5
> 
> _______________________________________________
> PowerTop mailing list
> PowerTop(a)lists.01.org
> https://lists.01.org/mailman/listinfo/powertop
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Powertop] [PATCH v3 06/31] report-html: summary list and navigation
@ 2013-12-11  0:32 Alexandra Yates
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandra Yates @ 2013-12-11  0:32 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 2141 bytes --]


> On (11/18/13 12:26), Alexandra Yates wrote:
>> Generates the html tags to add navigation and summary including css
>> attribute support.
>>
>> Signed-off-by: Alexandra Yates <alexandra.yates(a)linux.intel.com>
>> ---
>>  src/report/report-formatter-html.cpp |   18 ++++++++++++++++++
>>  src/report/report-formatter-html.h   |    2 ++
>>  2 files changed, 20 insertions(+)
>>
>> diff --git a/src/report/report-formatter-html.cpp
>> b/src/report/report-formatter-html.cpp
>> index 2e59725..93a4c48 100644
>> --- a/src/report/report-formatter-html.cpp
>> +++ b/src/report/report-formatter-html.cpp
>> @@ -516,3 +516,21 @@ report_formatter_html::add_title(struct tag_attr
>> *title_att, const char *title)
>>  	addf_exact("<h2 class=\"%s\"> %s </h2>\n", title_att->css_class,
>> title);
>>  }
>>
>> +void
>> +report_formatter_html::add_navigation()
>> +{
>> +	add_exact("<br/><nav id=\"main_menu\"> </nav>\n");
>> +}
>> +
>> +void
>> +report_formatter_html::add_summary_list(std::string *list, int size)
>> +{
>> +	int i;
>> +	add_exact("<div><br/> <ul>\n");
>> +	for (i=0; i < size; i+=2){
>
>
> summary list is guaranteed to contain `2 * n' elements?
>
> 	-ss
>
>> +		addf_exact("<li class=\"summary_list\"> <b> %s </b> %s </li>",
>> +				list[i].c_str(), list[i+1].c_str());
>> +	}
>> +	add_exact("</ul> </div> <br />\n");
>> +}
>> +
>> diff --git a/src/report/report-formatter-html.h
>> b/src/report/report-formatter-html.h
>> index 0f508d3..261e0dd 100644
>> --- a/src/report/report-formatter-html.h
>> +++ b/src/report/report-formatter-html.h
>> @@ -89,6 +89,8 @@ public:
>>  	void add_div(struct tag_attr *div_attr);
>>  	void end_div();
>>  	void add_title(struct tag_attr *title_att, const char *title);
>> +	void add_navigation();
>> +	void add_summary_list(std::string *list, int size);
>>
>>  private:
>>  	/* Document structure related functions */
>> --
>> 1.7.9.5
>>
>> _______________________________________________
>> PowerTop mailing list
>> PowerTop(a)lists.01.org
>> https://lists.01.org/mailman/listinfo/powertop
>>
>
Yes.

Thank you,
Alexandra.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-12-11  0:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-10 19:53 [Powertop] [PATCH v3 06/31] report-html: summary list and navigation Sergey Senozhatsky
  -- strict thread matches above, loose matches on Subject: below --
2013-12-11  0:32 Alexandra Yates
2013-11-18 20:26 Alexandra Yates

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.