Hitachi Vantara Pentaho Community Forums
Results 1 to 10 of 10

Thread: Static content as solution

  1. #1

    Question Static content as solution

    Hi all,

    I want to put some “static” content as solutions on user console (like PDF files).
    I’ve seen somewhere (but I can’t remember where) that is possible to show files other than “xaction” on user console. How can I do this?
    I have added “,pdf” in <acl-files> tag on pentaho.xml. The files with pdf extensions are loaded into repository tables after a refresh, but they are not showed in user interface.
    Any tip?

    Regards,
    Mauro
    Last edited by mschramm; 03-16-2010 at 10:21 AM. Reason: "added" intead of "addes"

  2. #2
    Join Date
    Jun 2007
    Posts
    260

    Default

    See the CDF examples.

  3. #3
    Join Date
    Feb 2010
    Posts
    28

    Default Same issue

    Hello,

    I am also interested in this topic as I have the same issue to display Excel files in the user console.

    Could you be more precise on what we should look for in the CDF examples, please ?

    Thanks,
    - emmanuel

  4. #4
    Join Date
    Jun 2007
    Posts
    260

    Default

    emmanuel

    It seems like you didn't even bother looking at the CDF samples. because if you did, you would have seen that the documentation there are static content.

    Look at the tutorial articles pointed to in my signature to find out more as well.

  5. #5
    Join Date
    Feb 2010
    Posts
    28

    Default

    Hello,

    OK, I was looking in the biserver-ce/pentaho-solutions/cdf folder straight on my filesystem and I missed you meant to have a look in the "BI Developer Examples->CDF->Documentation" folder in the user console.

    As I understand it, you offer a workaround using xcdf files that point to unsupported file types (correct me if I am wrong). xcdf files are displayed in the user console file tree so we "see" the file with an unsupported file type.

    Then, I guess there is no use modifying the <acl-files> tags since the ACL applies to the xcdf file and not to the real content file.

    What bothers me at first glance, it is that clicking on a xcdf file opens a new dashboard window in which my file is embedded. What I had in mind was a simple call to an external application to open correctly the content file. Exactly like what happens when opening a file from the workspace.
    But right now I do not know much about xcdf file and I still have to investigate to see if it can achieve what I need.

    Anyway, should I understand that there is no direct way to display a file in the user console and use ACL on it if its type is none of the predefined xaction, url, prpt, xdash and xcdf ?
    (What is the use of the <acl-files> tag, then ?)

    Thanks,
    - emmanuel

  6. #6
    Join Date
    Feb 2010
    Posts
    28

    Default Partly solved.

    Hello All,

    I investigated a bit more the "how to make a non-supported extension file appear in the user console and apply ACLs on it" issue and I solved most of it.

    To answer my previous question, yes there is a use to the <acl-files> tag since it is possible to show unsupported file types in the user console. Let's forget xcdf files to do that. We can make our own file-types appear :

    I noticed CDF is using a plugin.xml file ( .../biserver-ce/pentaho-solutions/system/pentaho-cdf/plugin.xml ) to define its own file type that appears in the user console. So I copy/pasted the file in a new directory ( .../biserver-ce/pentaho-solutions/system/mydir/plugin.xml ) and I edited it to make a few changes :
    - I changed the <content-type> tag so that it points to Excel files
    <content-type type="xls" mime-type="application/vnd.ms-excel">
    - I changed the <icon-url> to point to a 16x16px Excel icon.
    <icon-url>http://biserver:8080/pentaho-solutions/system/IDM/icon_excel.png</icon-url>
    Well, there is a dirty trick here : as I could not find easily how to get a file using an URL that could correctly be interpreted by the pentaho webapp, I created a symbolic link in tomcat's webapps folder that leads to the pentaho-solutions folder. (Anyone to tell us the clean way to do this ?)
    - I changed the commands so that they open the Excel file (basically, a URL that leads straight to the file, the Internet browser takes care of calling the right application to open it )
    <command>http://biserver/pentaho-solutions/{solution}/{path}/{name}</command>
    Notice that I use {variable} as I saw it in the original plugin.xml in order to get the correct path to the file.

    The resulting file is now :
    <?xml version="1.0" encoding="UTF-8"?>
    <plugin title="Displaying Excel files in the user console">
    <content-types>
    <content-type type="xls" mime-type="application/vnd.ms-excel">
    <title>Excel</title>
    <description>Excel File</description>
    <icon-url>http://biserver:8080/pentaho-solutions/system/IDM/icon_excel.png</icon-url>
    <operations>
    <operation>
    <id>NEWWINDOW</id>
    <command>http://biserver/pentaho-solutions/{solution}/{path}/{name}</command>
    </operation>
    <operation>
    <id>RUN</id>
    <command>http://biserver:8080/pentaho-solutions/{solution}/{path}/{name}</command>
    </operation>
    </operations>
    </content-type>
    </content-types>
    </plugin>

    There is one remaining problem, though.
    Right clic on the file, "share" and "Properties..." lead to a "Could not get file properties" error. I'll investigate this point today and I'll let you know. Anyone already know the solution ?

    - Emmanuel
    Last edited by nanu; 03-26-2010 at 05:54 AM.

  7. #7
    Join Date
    Feb 2010
    Posts
    28

    Default And solved.

    Hello,

    Final step to complete my previous posts : how to get file properties.

    The file properties are manged by plugin classes, that are defined in the <content-generator> tag. Re-using the settings of the reporting plugin works well enough to have the ACL support.
    So I just added the following to the previous plugin.xml file I posted and now ACLs on the Excel files work :

    <content-generator id="excelByReporting" type="xls">
    <classname> org.pentaho.reporting.platform.plugin.ReportContentGenerator </classname>
    <fileinfo-classname> org.pentaho.reporting.platform.plugin.ReportFileMetaDataProvider </fileinfo-classname>
    <title>Xls by Reporting Plugin</title>
    </content-generator>

    - emmanuel

  8. #8

    Exclamation

    Emmanuel

    You elaborated a sophisticated workaround for this issue!

    But I’m afraid about the use of symbolic links in Tomcat. After some googling, I discovered:

    1-Tomcat documentation recommends not using it in Windows (or any other OS which does not have a case sensitive file system). http://tomcat.apache.org/tomcat-5.5-...g/context.html

    2-It seems like Tomcat 5.5 deletes the files under symbolic links at undeploying the application. So, I think you can lose your entire pentaho-solutions directory on undeploying Pentaho from your Tomcat. Be carefull! See http://www.mail-archive.com/users@to.../msg71274.html


    []s

  9. #9
    Join Date
    Nov 2011
    Posts
    1

    Default Pdf

    Hi Emmanuel,

    I am trying to make PDFs show on PUC and I followed your example without success.

    <?xml version="1.0" encoding="UTF-8"?>
    <plugin title="pentaho-pdf">
    <content-types>
    <content-type type="pdf" mime-type="application/pdf">
    <title>PDF</title>
    <description>PDF File</description>
    <icon-url>content/pentaho-pdf/resources/pdf.png</icon-url>
    <operations>
    <operation>
    <id>NEWWINDOW</id>
    <command>http://server/pentaho-solutions/{solution}/{path}/{name}</command></command>
    </operation>
    <operation>
    <id>RUN</id>
    <command>http://server:8080/pentaho-solutions/{solution}/{path}/{name}</command>
    </operation>
    </operations>
    </content-type>
    </content-types>

    <content-generator id="pefByReporting" type="pdf">
    <classname> org.pentaho.reporting.platform.plugin.ReportContentGenerator </classname>
    <fileinfo-classname> org.pentaho.reporting.platform.plugin.ReportFileMetaDataProvider </fileinfo-classname>
    <title>PDF by Reporting Plugin</title>
    </content-generator>
    </plugin>




    That is my xml, do you have any advice?


    Quote Originally Posted by nanu View Post
    Hello,

    Final step to complete my previous posts : how to get file properties.

    The file properties are manged by plugin classes, that are defined in the <content-generator> tag. Re-using the settings of the reporting plugin works well enough to have the ACL support.
    So I just added the following to the previous plugin.xml file I posted and now ACLs on the Excel files work :

    <content-generator id="excelByReporting" type="xls">
    <classname> org.pentaho.reporting.platform.plugin.ReportContentGenerator </classname>
    <fileinfo-classname> org.pentaho.reporting.platform.plugin.ReportFileMetaDataProvider </fileinfo-classname>
    <title>Xls by Reporting Plugin</title>
    </content-generator>

    - emmanuel

  10. #10
    Join Date
    Oct 2007
    Posts
    26

    Default

    I use this solution to make Excel files available to the user via the Pentaho User Console.
    One problem was the example with the content-generator contains spaces at the beginning and end of the tags classname and fileinfo-classname.

    This worked for me:
    <?xml version="1.0" encoding="UTF-8"?>
    <plugin title="show_file_types">
    <content-types>
    <content-type type="xls" mime-type="application/vnd.ms-excel">
    <title>Excel</title>
    <description>Excel File</description>
    <icon-url>content/reporting/reportviewer/images/excel_icon.png</icon-url>
    <operations>
    <operation>
    <id>NEWWINDOW</id>
    <command>http://localhost:8080/pentaho-solutions/{solution}/{name}</command>
    </operation>
    <operation>
    <id>RUN</id>
    <command>http://localhost:8080/pentaho-solutions/{solution}/{name}</command>
    </operation>
    </operations>
    </content-type>
    </content-types>
    <content-generator id="excelByReporting" type="xls">
    <classname>org.pentaho.reporting.platform.plugin.ReportContentGenerator</classname>
    <fileinfo-classname>org.pentaho.reporting.platform.plugin.ReportFileMetaDataProvider</fileinfo-classname>
    <title>Xls by Reporting Plugin</title>
    </content-generator>
    </plugin>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.