Commit c29b99869fd5d96bffa5c0983717732a8abe309b
1 parent
1806386a
Exists in
master
and in
19 other branches
Changing templates to cookbook_file colab recipie
Files dashboard.py and profile Signed-off-by: Matheus Fernandes <matheus.souza.fernandes@gmail.com>
Showing
5 changed files
with
40 additions
and
40 deletions
Show diff stats
... | ... | @@ -0,0 +1,21 @@ |
1 | +from colab.widgets.widget_manager import WidgetManager | |
2 | + | |
3 | +from colab.super_archives.widgets.dashboard_latest_collaborations import \ | |
4 | + DashboardLatestCollaborationsWidget | |
5 | +from colab.super_archives.widgets.dashboard_most_relevant_threads import \ | |
6 | + DashboardMostRelevantThreadsWidget | |
7 | +from colab.super_archives.widgets.dashboard_latest_threads import \ | |
8 | + DashboardLatestThreadsWidget | |
9 | +from colab.super_archives.widgets.dashboard_collaboration_graph import \ | |
10 | + DashboardCollaborationGraphWidget | |
11 | + | |
12 | +# Dashboard Widgets | |
13 | +WidgetManager.register_widget('dashboard', | |
14 | + DashboardLatestCollaborationsWidget()) | |
15 | +WidgetManager.register_widget('dashboard', | |
16 | + DashboardCollaborationGraphWidget()) | |
17 | +WidgetManager.register_widget('dashboard', | |
18 | + DashboardMostRelevantThreadsWidget()) | |
19 | +WidgetManager.register_widget('dashboard', | |
20 | + DashboardLatestThreadsWidget()) | |
21 | + | ... | ... |
... | ... | @@ -0,0 +1,17 @@ |
1 | +from colab.widgets.widget_manager import WidgetManager | |
2 | +from colab.accounts.widgets.group import GroupWidget | |
3 | +from colab.accounts.widgets.group_membership import GroupMembershipWidget | |
4 | +from colab.accounts.widgets.latest_posted import LatestPostedWidget | |
5 | +from colab.accounts.widgets.latest_contributions import \ | |
6 | + LatestContributionsWidget | |
7 | + | |
8 | +from colab.accounts.widgets.collaboration_chart import CollaborationChart | |
9 | +from colab.accounts.widgets.participation_chart import ParticipationChart | |
10 | + | |
11 | +# Profile Widgets | |
12 | +WidgetManager.register_widget('group', GroupWidget()) | |
13 | +WidgetManager.register_widget('button', GroupMembershipWidget()) | |
14 | +WidgetManager.register_widget('list', LatestPostedWidget()) | |
15 | +WidgetManager.register_widget('list', LatestContributionsWidget()) | |
16 | +WidgetManager.register_widget('charts', CollaborationChart()) | |
17 | +WidgetManager.register_widget('charts', ParticipationChart()) | ... | ... |
cookbooks/colab/recipes/default.rb
... | ... | @@ -178,7 +178,7 @@ end |
178 | 178 | execute 'colab-admin migrate' |
179 | 179 | |
180 | 180 | # Adding widgets for colab |
181 | -template '/etc/colab/widgets.d/dashboard.py' do | |
181 | +cookbook_file '/etc/colab/widgets.d/dashboard.py' do | |
182 | 182 | owner 'root' |
183 | 183 | group 'colab' |
184 | 184 | mode 0640 |
... | ... | @@ -186,7 +186,7 @@ template '/etc/colab/widgets.d/dashboard.py' do |
186 | 186 | notifies :restart, 'service[colab]' |
187 | 187 | end |
188 | 188 | |
189 | -template '/etc/colab/widgets.d/profile.py' do | |
189 | +cookbook_file '/etc/colab/widgets.d/profile.py' do | |
190 | 190 | owner 'root' |
191 | 191 | group 'colab' |
192 | 192 | mode 0640 | ... | ... |
cookbooks/colab/templates/dashboard.py.erb
... | ... | @@ -1,21 +0,0 @@ |
1 | -from colab.widgets.widget_manager import WidgetManager | |
2 | - | |
3 | -from colab.super_archives.widgets.dashboard_latest_collaborations import \ | |
4 | - DashboardLatestCollaborationsWidget | |
5 | -from colab.super_archives.widgets.dashboard_most_relevant_threads import \ | |
6 | - DashboardMostRelevantThreadsWidget | |
7 | -from colab.super_archives.widgets.dashboard_latest_threads import \ | |
8 | - DashboardLatestThreadsWidget | |
9 | -from colab.super_archives.widgets.dashboard_collaboration_graph import \ | |
10 | - DashboardCollaborationGraphWidget | |
11 | - | |
12 | -# Dashboard Widgets | |
13 | -WidgetManager.register_widget('dashboard', | |
14 | - DashboardLatestCollaborationsWidget()) | |
15 | -WidgetManager.register_widget('dashboard', | |
16 | - DashboardCollaborationGraphWidget()) | |
17 | -WidgetManager.register_widget('dashboard', | |
18 | - DashboardMostRelevantThreadsWidget()) | |
19 | -WidgetManager.register_widget('dashboard', | |
20 | - DashboardLatestThreadsWidget()) | |
21 | - |
cookbooks/colab/templates/profile.py.erb
... | ... | @@ -1,17 +0,0 @@ |
1 | -from colab.widgets.widget_manager import WidgetManager | |
2 | -from colab.accounts.widgets.group import GroupWidget | |
3 | -from colab.accounts.widgets.group_membership import GroupMembershipWidget | |
4 | -from colab.accounts.widgets.latest_posted import LatestPostedWidget | |
5 | -from colab.accounts.widgets.latest_contributions import \ | |
6 | - LatestContributionsWidget | |
7 | - | |
8 | -from colab.accounts.widgets.collaboration_chart import CollaborationChart | |
9 | -from colab.accounts.widgets.participation_chart import ParticipationChart | |
10 | - | |
11 | -# Profile Widgets | |
12 | -WidgetManager.register_widget('group', GroupWidget()) | |
13 | -WidgetManager.register_widget('button', GroupMembershipWidget()) | |
14 | -WidgetManager.register_widget('list', LatestPostedWidget()) | |
15 | -WidgetManager.register_widget('list', LatestContributionsWidget()) | |
16 | -WidgetManager.register_widget('charts', CollaborationChart()) | |
17 | -WidgetManager.register_widget('charts', ParticipationChart()) |