Skip to content

Commit

Permalink
Addition of sfDoctrineGraphvizPlugin to webadmin code to visualize th…
Browse files Browse the repository at this point in the history
…e config model
  • Loading branch information
ljackson committed Feb 16, 2011
1 parent 49afe45 commit 0a713b8
Show file tree
Hide file tree
Showing 28 changed files with 1,410 additions and 0 deletions.
2 changes: 2 additions & 0 deletions webadmin/README
Expand Up @@ -8,6 +8,8 @@ outside view and then create an "application" called backend then you would acce

with php 5.2.12 or better (developed with 5.3) you should be able to

mkdir cache

php ./symfony cc
mysqladmin create surrogate_webadmin
mysql surrogate_webadmin < surrogate_webadmin.sql
Expand Down
1 change: 1 addition & 0 deletions webadmin/config/ProjectConfiguration.class.php
Expand Up @@ -9,6 +9,7 @@ public function setup()
{
$this->enablePlugins('sfDoctrinePlugin');
$this->enablePlugins('sfDoctrineGuardPlugin');
$this->enablePlugins('sfDoctrineGraphvizPlugin');

date_default_timezone_set('America/New_York');
}
Expand Down
Binary file added webadmin/doc/graph/mcd/mcd.circo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added webadmin/doc/graph/mcd/mcd.dot.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added webadmin/doc/graph/mcd/mcd.fdp.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added webadmin/doc/graph/mcd/mcd.neato.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
190 changes: 190 additions & 0 deletions webadmin/doc/graph/mcd/mcd.schema.dot
@@ -0,0 +1,190 @@
graph G {
edge [ len=2 labeldistance=2 ];
overlap=false;
splines=true;

nodeListnerConfig [
label="{<table>ListnerConfig|<cols>enable_gzip (boolean)\lfilter_headers (string)\lfwd_proxy_auth (enum)\llb_pool (string)\llb_proxy_host (string)\llb_backend_port (int)}",
shape=record ];
nodeStreamFilter [
label="{<table>StreamFilter|<cols>name (string)\lmodule_value (string)\lhas_forward_mode (boolean)\lhas_reverse_mode (boolean)}",
shape=record ];
nodesfGuardForgotPassword [
label="{<table>sfGuardForgotPassword|<cols>unique_key (string)\lexpires_at (timestamp)\lcreated_at (timestamp)\lupdated_at (timestamp)}",
shape=record ];
nodesfGuardUserPermission [
label="{<table>sfGuardUserPermission|<cols>created_at (timestamp)\lupdated_at (timestamp)}",
shape=record ];
nodesfGuardPermission [
label="{<table>sfGuardPermission|<cols>name (string)\ldescription (string)\lcreated_at (timestamp)\lupdated_at (timestamp)}",
shape=record ];
nodesfGuardGroupPermission [
label="{<table>sfGuardGroupPermission|<cols>created_at (timestamp)\lupdated_at (timestamp)}",
shape=record ];
nodesfGuardRememberKey [
label="{<table>sfGuardRememberKey|<cols>remember_key (string)\lip_address (string)\lcreated_at (timestamp)\lupdated_at (timestamp)}",
shape=record ];
nodesfGuardUser [
label="{<table>sfGuardUser|<cols>first_name (string)\llast_name (string)\lemail_address (string)\lusername (string)\lalgorithm (string)\lsalt (string)\lpassword (string)\lis_active (boolean)\lis_super_admin (boolean)\llast_login (timestamp)\lcreated_at (timestamp)\lupdated_at (timestamp)}",
shape=record ];
nodesfGuardGroup [
label="{<table>sfGuardGroup|<cols>name (string)\ldescription (string)\lcreated_at (timestamp)\lupdated_at (timestamp)}",
shape=record ];
nodesfGuardUserGroup [
label="{<table>sfGuardUserGroup|<cols>created_at (timestamp)\lupdated_at (timestamp)}",
shape=record ];
nodeListner [
label="{<table>Listner|<cols>listner_type (enum)\lip_address (string)\lport (int)}",
shape=record ];
nodeVirtualService [
label="{<table>VirtualService|<cols>name (string)\lenabled_status (boolean)}",
shape=record ];

nodesfGuardGroupPermission [
label="{<table>sfGuardGroupPermission|<cols>created_at (timestamp)\lupdated_at (timestamp)}",
shape=Mrecord ];
nodesfGuardUserPermission [
label="{<table>sfGuardUserPermission|<cols>created_at (timestamp)\lupdated_at (timestamp)}",
shape=Mrecord ];
nodesfGuardUserGroup [
label="{<table>sfGuardUserGroup|<cols>created_at (timestamp)\lupdated_at (timestamp)}",
shape=Mrecord ];
nodeVirtualServiceListner [
label="{<table>VirtualServiceListner|<cols>}",
shape=Mrecord ];
nodeVirtualServiceListners [
label="{<table>VirtualServiceListners|<cols>}",
shape=Mrecord ];
nodeListnerConfigStreamFilters [
label="{<table>ListnerConfigStreamFilters|<cols>}",
shape=Mrecord ];
nodeListnerConfig [
label="{<table>ListnerConfig|<cols>}",
shape=Mrecord ];
nodeStreamFilter [
label="{<table>StreamFilter|<cols>}",
shape=Mrecord ];
nodesfGuardPermission [
label="{<table>sfGuardPermission|<cols>}",
shape=Mrecord ];
nodesfGuardUser [
label="{<table>sfGuardUser|<cols>}",
shape=Mrecord ];
nodesfGuardGroup [
label="{<table>sfGuardGroup|<cols>}",
shape=Mrecord ];
nodeListnerListnerConfig [
label="{<table>ListnerListnerConfig|<cols>}",
shape=Mrecord ];
nodeListner [
label="{<table>Listner|<cols>}",
shape=Mrecord ];
nodeVirtualService [
label="{<table>VirtualService|<cols>}",
shape=Mrecord ];

nodesfGuardGroupPermission -- nodesfGuardGroup [
headlabel="0,n",
label="(Group)",
labeldistance=3 ];
nodesfGuardGroupPermission -- nodesfGuardPermission [
headlabel="0,n",
label="(Permission)",
labeldistance=3 ];
nodesfGuardUserPermission -- nodesfGuardUser [
headlabel="0,n",
label="(User)",
labeldistance=3 ];
nodesfGuardUserPermission -- nodesfGuardPermission [
headlabel="0,n",
label="(Permission)",
labeldistance=3 ];
nodesfGuardUserGroup -- nodesfGuardUser [
headlabel="0,n",
label="(User)",
labeldistance=3 ];
nodesfGuardUserGroup -- nodesfGuardGroup [
headlabel="0,n",
label="(Group)",
labeldistance=3 ];
nodeVirtualServiceListners -- nodeVirtualService [
headlabel="0,n",
label="",
labeldistance=3 ];
nodeVirtualServiceListners -- nodeListner [
headlabel="0,n",
label="",
labeldistance=3 ];
nodeListnerConfigStreamFilters -- nodeListnerConfig [
headlabel="0,n",
label="",
labeldistance=3 ];
nodeListnerConfigStreamFilters -- nodeStreamFilter [
headlabel="0,n",
label="",
labeldistance=3 ];
nodeListnerConfig -- nodeListner [
headlabel="0,1",
label="",
labeldistance=3 ];
nodeListnerConfig -- nodeListnerConfigStreamFilters [
headlabel="0,1",
label="",
labeldistance=3 ];
nodeStreamFilter -- nodeListnerConfigStreamFilters [
headlabel="0,1",
label="",
labeldistance=3 ];
nodesfGuardPermission -- nodesfGuardGroupPermission [
headlabel="0,1",
label="",
labeldistance=3 ];
nodesfGuardPermission -- nodesfGuardUserPermission [
headlabel="0,1",
label="",
labeldistance=3 ];
nodesfGuardUser -- nodesfGuardUserPermission [
headlabel="0,1",
label="",
labeldistance=3 ];
nodesfGuardUser -- nodesfGuardUserGroup [
headlabel="0,1",
label="",
labeldistance=3 ];
nodesfGuardGroup -- nodesfGuardGroupPermission [
headlabel="0,1",
label="",
labeldistance=3 ];
nodesfGuardGroup -- nodesfGuardUserGroup [
headlabel="0,1",
label="",
labeldistance=3 ];
nodeListnerListnerConfig -- nodeListnerConfig [
headlabel="0,n",
label="",
labeldistance=3 ];
nodeListner -- nodeVirtualServiceListners [
headlabel="0,1",
label="",
labeldistance=3 ];
nodeVirtualService -- nodeVirtualServiceListners [
headlabel="0,1",
label="",
labeldistance=3 ];

nodesfGuardUser -- nodesfGuardRememberKey [
arrowhead=normal ];
nodesfGuardUser -- nodesfGuardForgotPassword [
arrowhead=normal ];
nodesfGuardForgotPassword -- nodeBasesfGuardForgotPassword [
arrowhead=normal ];
nodesfGuardPermission -- nodeBasesfGuardPermission [
arrowhead=normal ];
nodesfGuardRememberKey -- nodeBasesfGuardRememberKey [
arrowhead=normal ];
nodesfGuardUser -- nodeBasesfGuardUser [
arrowhead=normal ];
nodesfGuardGroup -- nodeBasesfGuardGroup [
arrowhead=normal ];

}
Binary file added webadmin/doc/graph/mcd/mcd.twopi.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added webadmin/doc/graph/mld/mld.circo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added webadmin/doc/graph/mld/mld.dot.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added webadmin/doc/graph/mld/mld.fdp.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added webadmin/doc/graph/mld/mld.neato.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
78 changes: 78 additions & 0 deletions webadmin/doc/graph/mld/mld.schema.dot
@@ -0,0 +1,78 @@
digraph G {
edge [ len=2 labeldistance=2 ];
overlap=false;
splines=true;

nodevirtual_service_listner [
label="{<table>virtual_service_listner|<cols>virtual_service_id (bigint) [PK]\llistner_id (bigint) [PK]\l}",
shape=record ];
nodelistner_config [
label="{<table>listner_config|<cols>id (integer) [PK]\lenable_gzip (boolean)\lfilter_headers (string)\lfwd_proxy_auth (enum)\llb_pool (string)\llb_proxy_host (string)\llb_backend_port (int)\l}",
shape=record ];
nodestream_filter [
label="{<table>stream_filter|<cols>id (integer) [PK]\lname (string)\lmodule_value (string)\lhas_forward_mode (boolean)\lhas_reverse_mode (boolean)\l}",
shape=record ];
nodevirtual_service_listners [
label="{<table>virtual_service_listners|<cols>virtual_service_id (bigint) [PK]\llistner_id (bigint) [PK]\l}",
shape=record ];
nodelistner_config_stream_filters [
label="{<table>listner_config_stream_filters|<cols>listner_config_id (bigint) [PK]\lstream_filter_id (bigint) [PK]\l}",
shape=record ];
nodesf_guard_forgot_password [
label="{<table>sf_guard_forgot_password|<cols>id (integer) [PK]\luser_id (integer)\lunique_key (string)\lexpires_at (timestamp)\lcreated_at (timestamp)\lupdated_at (timestamp)\l}",
shape=record ];
nodesf_guard_user_permission [
label="{<table>sf_guard_user_permission|<cols>user_id (integer) [PK]\lpermission_id (integer) [PK]\lcreated_at (timestamp)\lupdated_at (timestamp)\l}",
shape=record ];
nodesf_guard_permission [
label="{<table>sf_guard_permission|<cols>id (integer) [PK]\lname (string)\ldescription (string)\lcreated_at (timestamp)\lupdated_at (timestamp)\l}",
shape=record ];
nodesf_guard_group_permission [
label="{<table>sf_guard_group_permission|<cols>group_id (integer) [PK]\lpermission_id (integer) [PK]\lcreated_at (timestamp)\lupdated_at (timestamp)\l}",
shape=record ];
nodesf_guard_remember_key [
label="{<table>sf_guard_remember_key|<cols>id (integer) [PK]\luser_id (integer)\lremember_key (string)\lip_address (string)\lcreated_at (timestamp)\lupdated_at (timestamp)\l}",
shape=record ];
nodesf_guard_user [
label="{<table>sf_guard_user|<cols>id (integer) [PK]\lfirst_name (string)\llast_name (string)\lemail_address (string)\lusername (string)\lalgorithm (string)\lsalt (string)\lpassword (string)\lis_active (boolean)\lis_super_admin (boolean)\llast_login (timestamp)\lcreated_at (timestamp)\lupdated_at (timestamp)\l}",
shape=record ];
nodesf_guard_group [
label="{<table>sf_guard_group|<cols>id (integer) [PK]\lname (string)\ldescription (string)\lcreated_at (timestamp)\lupdated_at (timestamp)\l}",
shape=record ];
nodesf_guard_user_group [
label="{<table>sf_guard_user_group|<cols>user_id (integer) [PK]\lgroup_id (integer) [PK]\lcreated_at (timestamp)\lupdated_at (timestamp)\l}",
shape=record ];
nodelistner [
label="{<table>listner|<cols>id (integer) [PK]\llistner_type (enum)\lip_address (string)\lport (int)\lconfig_id (bigint)\l}",
shape=record ];
nodevirtual_service [
label="{<table>virtual_service|<cols>id (integer) [PK]\lname (string)\lenabled_status (boolean)\l}",
shape=record ];

nodevirtual_service_listners:cols -> nodevirtual_service:table [
label="virtual_service_id=id"];
nodevirtual_service_listners:cols -> nodelistner:table [
label="listner_id=id"];
nodelistner_config_stream_filters:cols -> nodelistner_config:table [
label="listner_config_id=id"];
nodelistner_config_stream_filters:cols -> nodestream_filter:table [
label="stream_filter_id=id"];
nodesf_guard_forgot_password:cols -> nodesf_guard_user:table [
label="user_id=id"];
nodesf_guard_user_permission:cols -> nodesf_guard_user:table [
label="user_id=id"];
nodesf_guard_user_permission:cols -> nodesf_guard_permission:table [
label="permission_id=id"];
nodesf_guard_group_permission:cols -> nodesf_guard_group:table [
label="group_id=id"];
nodesf_guard_group_permission:cols -> nodesf_guard_permission:table [
label="permission_id=id"];
nodesf_guard_remember_key:cols -> nodesf_guard_user:table [
label="user_id=id"];
nodesf_guard_user_group:cols -> nodesf_guard_user:table [
label="user_id=id"];
nodesf_guard_user_group:cols -> nodesf_guard_group:table [
label="group_id=id"];
nodelistner:cols -> nodelistner_config:table [
label="config_id=id"];
}
Binary file added webadmin/doc/graph/mld/mld.twopi.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions webadmin/plugins/sfDoctrineGraphvizPlugin/LICENSE
@@ -0,0 +1,7 @@
Copyright (c) 2009-2010 David PHAM-VAN, Dejan Spasic, Tomasz Ducin

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
53 changes: 53 additions & 0 deletions webadmin/plugins/sfDoctrineGraphvizPlugin/README
@@ -0,0 +1,53 @@
sfDoctrineGraphvizPlugin
========================

Provides you with a task that output database MCD and MLD doctrine schema
using the graphviz tool.

Installation
============

Install the plugin via the subversion repository by executing the following
command from the project root directory (branch 1.4 of the plugin works for
both 1.3 and 1.4 symfony versions):

$ svn co http://svn.symfony-project.com/plugins/sfDoctrineGraphvizPlugin/branches/1.4 plugins/sfDoctrineGraphvizPlugin

or by using the default symfony plugin install command:

$ ./symfony plugin:install sfDoctrineGraphvizPlugin

Usage
=====

Simply type the following command:

$ ./symfony doctrine:graphviz

Files are created in two directories: _doc/graph/mcd_ and _doc/graph/mld_. The
former one stores following files:

* __mcd.schema.dot__ : source of _"Modèle conceptuel des données"_
* __mcd.dot.png__ : _dot_ image of _"Modèle conceptuel des données"_
* __mcd.neato.png__ : _neato_ image of _"Modèle conceptuel des données"_
* __mcd.twopi.png__ : _twopi_ image of _"Modèle conceptuel des données"_
* __mcd.circo.png__ : _circo_ image of _"Modèle conceptuel des données"_
* __mcd.fdp.png__ : _fdp_ image of _"Modèle conceptuel des données"_

while the latter one stores:

* __mld.schema.dot__ : source of _"Modèle logique des données"_
* __mld.dot.png__ : dot image of _"Modèle logique des données"_
* __mld.neato.png__ : neato image of _"Modèle logique des données"_
* __mld.twopi.png__ : twopi image of _"Modèle logique des données"_
* __mld.circo.png__ : circo image of _"Modèle logique des données"_
* __mld.fdp.png__ : fdp image of _"Modèle logique des données"_

You can simply choose between many different images to choose the one that is
the most readabe for you.

Notes
=====

You must have [GraphViz](http://www.graphviz.org/Documentation.php) installed
on your system.

0 comments on commit 0a713b8

Please sign in to comment.