plugin dev, how to create a tab page engaged to a InputFile on sonarqube 5.6, SONAR-6016 End of support of Ruby source viewer extensions

33 views
Skip to first unread message

Guangrun Lin

unread,
Jun 6, 2017, 10:49:55 AM6/6/17
to SonarQube
Hello,

I created a page with RESOURCE_TAB. As the support of Ruby source viewer extensions was ended since version 5.1, this page can not longer be displayed on sonarqube 5.6 . 

Mr Simon Brandhof suggested 
" Hi, you should have a look at the section "Webapp pages" in documentation : https://docs.sonarqube.org/display/DEV/Extending+Web+Application "

I read the following guide/

The new way to create web page with JS is very convenient. Unfortunately, it seems that the new way to create page is only avaiable since sonarqube 6.3. 

Thank you in advance for help 


Simon Brandhof

unread,
Jun 8, 2017, 2:50:49 AM6/8/17
to Guangrun Lin, SonarQube
Hi,

The page you mentioned has a link in its header on a Ruby example supported in 5.6.

Regards 

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/e53a2b6f-08c8-4f1c-8de6-fdcc3f57b9a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Simon Brandhof | SonarSource

Co-Founder & Tech Lead

@SimonBrandhof

http://sonarsource.com

Lin Guangrun

unread,
Jun 8, 2017, 6:39:11 AM6/8/17
to Simon Brandhof, SonarQube
Hi Simon, 

Thank you for your reply. I got the examples you indicated. They are very helpful for me to understand UI extensions.But I do not find out a solution to add my page into the list of "More Actions" of source code file.

In fact, the page aims to showing source codes of a source file in a graphic way (as a image),

It had been created based on sonarqube version 4.4, and worked well on 4.4. 



@NavigationSection({NavigationSection.RESOURCE_TAB})
public class DisplayTab extends AbstractRubyTemplate implements RubyRailsPage {

@Override
public String getId() {
return "displayTab";
}

@Override
public String getTitle() {
return "Display";
}

@Override
protected String getTemplatePath() {
return "/org/sonar/displaytab.html.erb";
}

I find that for NavigationSection.RESOURCE_TAB "Support removed in 5.1. See https://jira.sonarsource.com/browse/SONAR-6016" in the documentation.

Do we have any alternative to NavigationSection.RESOURCE_TAB?

Thank you.


Simon Brandhof

unread,
Jun 15, 2017, 9:14:06 AM6/15/17
to Lin Guangrun, SonarQube
Sorry but there are no alternatives. 

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Lin Guangrun

unread,
Jun 15, 2017, 9:15:21 AM6/15/17
to Simon Brandhof, SonarQube
Thank you very much, Simon. 

Lin Guangrun

unread,
Jul 26, 2017, 5:25:57 AM7/26/17
to Simon Brandhof, SonarQube
Hi Simon,
Thank you for the reply.
I save images into source files encoded as BASE64, as  

<img src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAUA
AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO
    9TXL0Y4OHwAAAABJRU5ErkJggg==" alt="Red dot" />
However, source codes are previously escaped, the <img> tag is shown as a text in stead of an image. 
As more and more programming languages are created in a visual way, is it interesting for sonarqube to enable to show images and  or to show source codes as graphes? 
Our company is very interested  in it and is honored to have some contribution to it.
Best regards
LIN Guangrun




2017-06-15 15:13 GMT+02:00 Simon Brandhof <simon.b...@sonarsource.com>:
Sorry but there are no alternatives. 

On Thu, 8 Jun 2017 at 12:39 Lin Guangrun <guangr...@gmail.com> wrote:
Hi Simon, 

Thank you for your reply. I got the examples you indicated. They are very helpful for me to understand UI extensions.But I do not find out a solution to add my page into the list of "More Actions" of source code file.

In fact, the page aims to showing source codes of a source file in a graphic way (as a image),

It had been created based on sonarqube version 4.4, and worked well on 4.4. 



@NavigationSection({NavigationSection.RESOURCE_TAB})
public class DisplayTab extends AbstractRubyTemplate implements RubyRailsPage {

@Override
public String getId() {
return "displayTab";
}

@Override
public String getTitle() {
return "Display";
}

@Override
protected String getTemplatePath() {
return "/org/sonar/displaytab.html.erb";
}

I find that for NavigationSection.RESOURCE_TAB "Support removed in 5.1. See https://jira.sonarsource.com/browse/SONAR-6016" in the documentation.

Do we have any alternative to NavigationSection.RESOURCE_TAB?

Thank you.


--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+unsubscribe@googlegroups.com.
--

Simon Brandhof | SonarSource

Co-Founder & Tech Lead

@SimonBrandhof

http://sonarsource.com



--
LIN Guangrun
Mobile 06 99 50 60 51
Reply all
Reply to author
Forward
0 new messages