Open-AudIT
https://www.open-audit.org/phpBB3/

Export to Inkscape and Dia
https://www.open-audit.org/phpBB3/viewtopic.php?f=5&t=3466
Page 1 of 1

Author:  A_Hull [ Fri Dec 11, 2009 10:09 pm ]
Post subject:  Export to Inkscape and Dia

I was thinking of tidying up the Export code, but before I spend any time on it, I was wondering.

Who actually uses the Dia export?
Who actually uses the Inkscape export?

If nobody uses either of them I will not spend any time on it.
If nobody uses Dia, then I will drop it and concentrate on Inkscape only, as Dia seems to have fewer features, fewer releases, fewer users and therefore may be a waste of effort.

Does anybody have any suggestions for improving the exported diagrams?

Author:  edurfee [ Thu Dec 31, 2009 1:50 am ]
Post subject:  Re: Export to Inkscape and Dia

I haven't used Inkscape before, mainly because it is not really designed for technical drawings and diagrams. I use Dia exports when drawing diagrams quickly and more easily and to convert to Visio.

Author:  rsaavedra [ Fri May 28, 2010 4:59 am ]
Post subject:  Re: Export to Inkscape and Dia

I tried the Create Dia Network Diagram option at the bottom of the full list of systems audited (71 systems in my case.) The browser allows me to save the file to disk, all of its 3 KB. (??) Dia opens this file, but the file has nothing in it. So it seems the export is not really working. Are there any known bugs in the Dia export?

Author:  A_Hull [ Fri May 28, 2010 8:08 pm ]
Post subject:  Re: Export to Inkscape and Dia

You do need to set the correct paths in include_inkscake_config.php and include_dia_config.php to point to a copy of the images. This is one of the things I was thinking of improving.

Author:  ii Candor ii [ Thu Jun 24, 2010 12:48 am ]
Post subject:  Re: Export to Inkscape and Dia

I prefer using Inkscape

Author:  rsaavedra [ Fri Aug 20, 2010 6:49 am ]
Post subject:  Re: Export to Inkscape and Dia

A_Hull wrote:
You do need to set the correct paths in include_inkscake_config.php and include_dia_config.php to point to a copy of the images. This is one of the things I was thinking of improving.

Hello A_Hull, had postponed trying that until now because I've been doing some other things. I think I might need some more help because that didn't work for me.

First I modified the include_dia_config.php file on the OA server with the following line:

$dia_image_folder='\\home\\[myusernamehere]\\openaudit\\images\\';

I'm running Ubuntu on my workstation. Created the folder openaudit/images under my ~ folder in my workstation, then I copied all of the images in /var/www/openaudit/images of the OA server into that folder, as indicated by the include_dia_config.php file. That was supposed to be it, at least from what the php file says.

Then I tried creating the Dia diagram from the All systems audited report page (tried with both Chrome and Firefox), and I saved the dia file onto my local openaudit/images folder. I still get exactly the same result: the report shows almost 100 systems, but I'm getting an empty diagram.

In case it might help, the dia file I download from the browser(s) is just 2172 bytes long, and cat-ing it yields the following:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
  <dia:diagramdata>
    <dia:attribute name="Background">
      <dia:color val="#FFFFFF"/>
    </dia:attribute>
    <dia:attribute name="pagebreak">
      <dia:color val="#000099"/>
    </dia:attribute>
    <dia:attribute name="paper">
      <dia:composite type="paper">
        <dia:attribute name="name">
          <dia:string>#A4#</dia:string>
        </dia:attribute>
        <dia:attribute name="tmargin">
          <dia:real val="2.8"/>
        </dia:attribute>
        <dia:attribute name="bmargin">
          <dia:real val="2.8"/>
        </dia:attribute>
        <dia:attribute name="lmargin">
          <dia:real val="2.8"/>
        </dia:attribute>
        <dia:attribute name="rmargin">
          <dia:real val="2.8"/>
        </dia:attribute>
        <dia:attribute name="is_portrait">
          <dia:boolean val="false"/>
        </dia:attribute>
        <dia:attribute name="scaling">
          <dia:real val="1"/>
        </dia:attribute>
        <dia:attribute name="fitto">
          <dia:boolean val="false"/>
        </dia:attribute>
      </dia:composite>
    </dia:attribute>
    <dia:attribute name="grid">
      <dia:composite type="grid">
        <dia:attribute name="width_x">
          <dia:real val="1"/>
        </dia:attribute>
        <dia:attribute name="width_y">
          <dia:real val="1"/>
        </dia:attribute>
        <dia:attribute name="visible_x">
          <dia:int val="1"/>
        </dia:attribute>
        <dia:attribute name="visible_y">
          <dia:int val="1"/>
        </dia:attribute>
        <dia:composite type="color"/>
      </dia:composite>
    </dia:attribute>
    <dia:attribute name="color">
      <dia:color val="#D8E5E5"/>
    </dia:attribute>
    <dia:attribute name="guides">
      <dia:composite type="guides">
        <dia:attribute name="hguides"/>
        <dia:attribute name="vguides"/>
      </dia:composite>
    </dia:attribute>
  </dia:diagramdata>
  <dia:layer name="Background" visible="true">
    </dia:layer>
</dia:diagram>


Anything else I might need to modify on the server to get the dia diagram created properly? (By the way, I can perfectly export the report to .CSV)

Author:  rsaavedra [ Mon Aug 23, 2010 11:13 pm ]
Post subject:  Re: Export to Inkscape and Dia

Any hint is appreciated.

Author:  jpa [ Tue Aug 24, 2010 2:14 am ]
Post subject:  Re: Export to Inkscape and Dia

rsaavedra wrote:
Any hint is appreciated.
You're looking in the wrong place. It looks like you've got a valid DIA file that has no entries. So rather than looking at the display side you should look at the generation side and figure out why it's not filling the DIA file with systems.

To start try this:
Get a view with a couple systems in it. Obviously the view should have "Create DIA Network Diagram From List" at the bottom of the page.
View Page source.
Find the first instance of "form_export_dia"
Just after this is a hidden sql form input field with a MySQL select statement.
Copy this SQL and reverse the URL encoding
Try this SQL statement against your database and see if it returns anything.
If it does return something we need to look elsewhere. If not, then why not?

By the way passing the SQL in like this is a huge security problem and is a reminder that OpenAudit is not a secure system and should be treated as such.

Author:  rsaavedra [ Wed Aug 25, 2010 12:54 am ]
Post subject:  Re: Export to Inkscape and Dia

jpa wrote:
You're looking in the wrong place. It looks like you've got a valid DIA file that has no entries. So rather than looking at the display side you should look at the generation side and figure out why it's not filling the DIA file with systems.

Thanks much jpa! I really knew there had to be a diagram generation problem, but I was showing the problem just as I confronted it as an end user (because I really still am just an OpenAudit end user; don't know enough OA yet.) Will look into your suggestions and will post any findings afterwards.

Author:  valerie [ Wed Sep 22, 2010 9:35 pm ]
Post subject:  Re: Export to Inkscape and Dia

I also prefer using inkscape

Page 1 of 1 All times are UTC + 10 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/