Skip to content

Commit

Permalink
[main] allow hidden plugins
Browse files Browse the repository at this point in the history
[ui] fixes
  • Loading branch information
Eugeny committed Feb 15, 2014
1 parent b7ab788 commit adccabe
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 10 deletions.
2 changes: 1 addition & 1 deletion ajenti/plugins/main/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
@p('order', default=99, doc='Sorting weight, light plugins end up higher')
@p('category', default='Other', doc='Section category name')
@p('active', default=False)
@p('plain', default=False)
@p('clsname', default='')
@p('hidden', default=False, type=bool, doc='Hide this section in sidebar')
@track
@interface
class SectionPlugin (BasePlugin, UIElement):
Expand Down
1 change: 0 additions & 1 deletion ajenti/plugins/main/content/css/controls.index.i.less
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@
&>.sidebar {
float: left;
width: 150px;
padding: 10px 0 0;
line-height: @fontSize + 10px;
font-weight: bold;

Expand Down
2 changes: 1 addition & 1 deletion ajenti/plugins/main/content/css/jquery.ui.i.less
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ span.ui-spinner {
.ui-tabs-panel {
display: block;
border-width: 0;
padding: 1em 1.4em;
padding: 1em 0;
background: none;
}
}
Expand Down
2 changes: 1 addition & 1 deletion ajenti/plugins/main/content/js/controls.containers.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ class window.Controls.tabs extends window.Control
setupDom: (dom) ->
super(dom)
@active = @properties.active
@headers = $(@dom).find('ul')
@headers = $(@dom).find('>ul')
for child in @children
do (child) =>
header = $$("""<li data-index="#{child.tabIndex}"><a href="#uid-#{child.uid}">#{child.properties.title}</a></li>""")
Expand Down
3 changes: 2 additions & 1 deletion ajenti/plugins/main/content/js/controls.index.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ class window.Controls.main__sections_root extends window.Control
@event('switch', uid:child.uid)
e.preventDefault()

@categories[child.properties.category].append(tab)
if not child.properties.hidden
@categories[child.properties.category].append(tab)



Expand Down
21 changes: 16 additions & 5 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,35 @@
"users": {
"root": {
"configs": {
"ajenti.plugins.ajenti_org.main.AjentiOrgReporter": "{\"key\": null}",
"ajenti.plugins.notepad.notepad.Notepad": "{\"bookmarks\": [], \"root\": \"/\"}",
"ajenti.plugins.terminal.main.Terminals": "{\"shell\": \"sh -c $SHELL || sh\"}",
"ajenti.plugins.elements.ipmap.ElementsIPMapper": "{\"users\": {}}",
"ajenti.plugins.munin.client.MuninClient": "{\"username\": \"username\", \"prefix\": \"http://localhost:8080/munin\", \"password\": \"123\"}",
"ajenti.plugins.elements.projects.main.ElementsProjectManager": "{\"projects\": \"(lp1\\n.\"}",
"ajenti.plugins.dashboard.dash.Dash": "{\"widgets\": [{\"index\": 0, \"config\": null, \"container\": \"1\", \"class\": \"ajenti.plugins.sensors.memory.MemoryWidget\"}, {\"index\": 1, \"config\": null, \"container\": \"1\", \"class\": \"ajenti.plugins.sensors.memory.SwapWidget\"}, {\"index\": 2, \"config\": null, \"container\": \"1\", \"class\": \"ajenti.plugins.dashboard.welcome.WelcomeWidget\"}, {\"index\": 0, \"config\": null, \"container\": \"0\", \"class\": \"ajenti.plugins.sensors.uptime.UptimeWidget\"}, {\"index\": 1, \"config\": null, \"container\": \"0\", \"class\": \"ajenti.plugins.power.power.PowerWidget\"}, {\"index\": 2, \"config\": null, \"container\": \"0\", \"class\": \"ajenti.plugins.sensors.cpu.CPUWidget\"}]}"
"ajenti.plugins.dashboard.dash.Dash": "{\"widgets\": [{\"index\": 0, \"config\": null, \"container\": \"1\", \"class\": \"ajenti.plugins.sensors.memory.MemoryWidget\"}, {\"index\": 1, \"config\": null, \"container\": \"1\", \"class\": \"ajenti.plugins.sensors.memory.SwapWidget\"}, {\"index\": 2, \"config\": null, \"container\": \"1\", \"class\": \"ajenti.plugins.dashboard.welcome.WelcomeWidget\"}, {\"index\": 0, \"config\": null, \"container\": \"0\", \"class\": \"ajenti.plugins.sensors.uptime.UptimeWidget\"}, {\"index\": 1, \"config\": null, \"container\": \"0\", \"class\": \"ajenti.plugins.power.power.PowerWidget\"}, {\"index\": 2, \"config\": null, \"container\": \"0\", \"class\": \"ajenti.plugins.sensors.cpu.CPUWidget\"}]}",
"ajenti.plugins.elements.shaper.main.Shaper": "{\"rules\": []}",
"ajenti.plugins.ajenti_org.main.AjentiOrgReporter": "{\"key\": null}",
"ajenti.users.UserManager": "{\"sync-provider\": \"\"}",
"ajenti.plugins.mysql.api.MySQLDB": "{\"password\": \"\", \"user\": \"root\", \"hostname\": \"localhost\"}",
"ajenti.plugins.fm.fm.FileManager": "{\"root\": \"/\"}",
"ajenti.plugins.tasks.manager.TaskManager": "{\"task_definitions\": []}",
"ajenti.usersync.adsync.ActiveDirectorySyncProvider": "{\"domain\": \"DOMAIN\", \"password\": \"\", \"user\": \"Administrator\", \"base\": \"cn=Users,dc=DOMAIN\", \"address\": \"localhost\"}",
"ajenti.plugins.elements.usermgr.ElementsUserManager": "{\"groups\": []}",
"ajenti.plugins.elements.projects.main.ElementsProjectManager": "{\"projects\": \"(lp1\\n.\"}"
},
"password": "sha512|$6$rounds=40000$nIVrqqz638rB8wOo$VbMv8y2lStgcsYxEuu7JfHiEd06eeiSoIbg7Hvivj9K1vPayaCbAiAqtpyOoIkNfIXFmMD0jK6Dd4WFnvywkY1",
"permissions": []
}
},
"language": "",
"bind": {
"host": "0.0.0.0",
"port": 8000
},
"authentication": false,
"enable_feedback": true,
"ssl": {
"enable": false,
"certificate_path": ""
},
"enable_feedback": true,
"authentication": false,
"installation_id": 12354
}

0 comments on commit adccabe

Please sign in to comment.