Skip to content

Commit

Permalink
8.0 meshrelation (#54)
Browse files Browse the repository at this point in the history
* [IMP] module_dependencies_view: The ID is conditional.

In order to allow this method be reused in other
visualization methods.

* Other options of diagrams.

* [IMP] module_dependencies_view: Smart color setted to graph.

One Level view working
  • Loading branch information
nhomar committed Jun 13, 2016
1 parent 24fe1fe commit ef5f605
Show file tree
Hide file tree
Showing 7 changed files with 674 additions and 56 deletions.
40 changes: 38 additions & 2 deletions module_dependencies_view/controllers.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
# -*- coding: utf-8 -*-
from datetime import datetime
from datetime import timedelta
from openerp import http
from pprint import pprint


class ModuleDependenciesView(http.Controller):

@http.route('/module/one/<model("ir.module.module"):module>/',
auth='user')
def module_level(self, module):
start = datetime.now()
depends = module.with_context({'one_level': True}).depends()
end = datetime.now()
computed = end - start
return http.request.render('module_dependencies_view.module', {
'object': module,
'tree': depends,
'start': start,
'end': end,
'computed': computed,
})

@http.route('/module/<model("ir.module.module"):module>/',
auth='user')
def module(self, module):
Expand All @@ -20,3 +34,25 @@ def module(self, module):
'end': end,
'computed': computed,
})

@http.route('/module/dendrogram/<model("ir.module.module"):module>/',
auth='user')
def cluster_dendgram(self, module):
depends = module.with_context({'with_id': True}).depends()
return depends

@http.route('/module/mesh/<model("ir.module.module"):module>/',
auth='user')
def module_mesh(self, module):
start = datetime.now()
depends = module.depends()
end = datetime.now()
computed = end - start
return http.request.render(
'module_dependencies_view.cluster_dendrogram', {
'object': module,
'tree': depends,
'start': start,
'end': end,
'computed': computed,
})
Loading

0 comments on commit ef5f605

Please sign in to comment.