Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugeny committed May 21, 2015
1 parent 25cff40 commit 57323ce
Show file tree
Hide file tree
Showing 46 changed files with 75 additions and 60 deletions.
2 changes: 1 addition & 1 deletion ajenti-core/aj/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# imported by installer, no 3rd party imports here!

__version__ = '2.0.43'
__version__ = '2.0.46'

# Global state

Expand Down
1 change: 1 addition & 0 deletions ajenti-core/aj/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def ensure_structure(self):
self.data.setdefault('max_sessions', 99)
self.data.setdefault('auth', {})
self.data['auth'].setdefault('emails', {})
self.data['auth'].setdefault('provider', 'os')
self.data.setdefault('ssl', {})
self.data['ssl'].setdefault('enable', False)
self.data['ssl'].setdefault('certificate', None)
Expand Down
3 changes: 2 additions & 1 deletion ajenti-core/aj/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def dispatch(self, env, start_response):

http_context.run_response()
gevent.sleep(0)
print http_context.path, repr(content)[:1000]
return content


Expand Down Expand Up @@ -266,7 +267,7 @@ def redirect(self, location):
self.respond('302 Found')
return ''

def gzip(self, content, compression=9):
def gzip(self, content, compression=6):
"""
Returns a GZip compressed response with given ``content`` and correct headers
Expand Down
2 changes: 1 addition & 1 deletion ajenti-core/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ psutil>=2.2.1
pyOpenSSL<0.14 # 0.14 breaks WantWrite retries
python-daemon<2.0
pyyaml
requests>=0.12.0
requests>=2
setproctitle
termcolor
pip>=6
Expand Down
5 changes: 2 additions & 3 deletions ajenti-panel/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
auth:
allow_sudo: true
emails:
john.pankov@gmail.com: root
emails: {}
provider: os
users:
root:
Expand All @@ -11,7 +10,7 @@ bind:
host: 0.0.0.0
mode: tcp
port: 8000
color: deeporange
color: red
max_sessions: 9
name: Test Box
ssl:
Expand Down
2 changes: 1 addition & 1 deletion plugins/ace/.last-upload
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1430766912.22
1432240981.24
2 changes: 1 addition & 1 deletion plugins/augeas/.last-upload
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1430766928.65
1432241023.4
3 changes: 2 additions & 1 deletion plugins/augeas/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ def setd(self, path, value, default=None):
"""
Sets `path` to `value`, or removes `path` if `value == default`
"""
self.set(path, value)
if value is not None:
self.set(path, value)
if value == default:
self.remove(path)

Expand Down
2 changes: 1 addition & 1 deletion plugins/augeas/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: augeas
author: Ajenti project
email: e@ajenti.org
url: http://ajenti.org
version: '0.6'
version: '0.7'
title: 'Augeas API'
icon: cog
dependencies:
Expand Down
2 changes: 1 addition & 1 deletion plugins/auth_users/.last-upload
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1430766877.48
1432240898.74
2 changes: 1 addition & 1 deletion plugins/core/.last-upload
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1430766922.69
1432241020.39
1 change: 1 addition & 0 deletions plugins/core/content/pages/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="theme-color" content="{{themeColorValue}}">
<meta name="viewport" content="initial-scale=1, user-scalable=no, width=device-width, height=device-height, minimal-ui" />

<link rel="stylesheet" href="%(prefix)s/resources/all.css" type="text/css">
Expand Down
2 changes: 1 addition & 1 deletion plugins/core/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: core
author: Ajenti project
email: e@ajenti.org
url: http://ajenti.org
version: '0.31'
version: '0.35'
title: Core
icon: link
dependencies: []
Expand Down
25 changes: 9 additions & 16 deletions plugins/core/resources/css/app.less
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,14 @@ body {
line-height: 28px;
text-align: center;
font-size: 20px;
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.25) inset;
border: none;
color: white;
text-shadow: 0 0 1px rgba(0,0,0,.5);
background-image: url('./core/resources/images/profile-normal.png');
background-size: cover;
border: 1px solid @brand-info;
color: @brand-info;
background: transparent;
position: relative;

&.superuser {
background-image: url('./core/resources/images/profile-root.png');
}

&[aria-expanded=true] {
box-shadow: 0 0 5px @brand-primary;
color: @brand-warning;
border: 1px solid @brand-warning;
}

.rank {
Expand All @@ -87,14 +81,13 @@ body {
right: 0;
width: 15px;
height: 15px;
font-size: 14px;
font-size: 13px;
line-height: 13px;

text-align: center;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.25) inset, 0 0 1px rgba(0,0,0,.25);
color: white;
text-shadow: 0 0 1px rgba(0,0,0,.5);
background: #333;
border: 1px solid #555;
color: #555;
background: white;
border-radius: 50%;
}
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/core/resources/css/bootstrap/bootstrap.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@import "../../vendor/bootstrap/less/scaffolding.less";
@import "../../vendor/bootstrap/less/type.less";
@import "../../vendor/bootstrap/less/code.less";
@import "../../vendor/bootstrap/less/grid.less";
@import "../../vendor/bootstrap/less/grid.less";
@import "../../vendor/bootstrap/less/tables.less";
@import "../../vendor/bootstrap/less/forms.less";
@import "../../vendor/bootstrap/less/buttons.less";
Expand Down
2 changes: 1 addition & 1 deletion plugins/core/resources/css/bootstrap/variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
@body-bg: #ddd;
@text-color: #666;

@font-family-sans-serif: "PT Sans", sans-serif;
@font-family-sans-serif: "PT Sans", pt_sans, sans-serif;
@font-family-base: @font-family-sans-serif;

@btn-default-border: #eee;
Expand Down
11 changes: 11 additions & 0 deletions plugins/core/resources/css/responsive.less
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,15 @@
display: block;
.button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);
}

#toast-container {
left: 0;
top: 0;
width: 100%;

&>.toast {
width: 100%;
border-radius: 0;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ angular.module('core').controller 'CoreRootController', ($scope, $rootScope, $lo
console.log('Plugins', ajentiPlugins)
console.groupEnd()

$scope.navigationPresent = $location.path().indexOf('/view/login') != 0
$scope.navigationPresent = $location.path().indexOf('/view/login') == -1

feedback.init()

Expand Down
2 changes: 1 addition & 1 deletion plugins/core/resources/js/core/module.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ angular.module('core').config ($httpProvider, $animateProvider, $compileProvider


angular.module('core').run () ->
FastClick.attach(document.body)
FastClick.attach(document.body)


Array.prototype.remove = (args...) ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ angular.module('core').service 'favicon', ($rootScope, identity, customization)
}

@set = (color) =>
$rootScope.themeColorValue = @colors[color]

canvas = document.createElement 'canvas'
canvas.width = 16
canvas.height = 16
Expand Down
2 changes: 1 addition & 1 deletion plugins/core/resources/partial/sidebarItem.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ <h5 ng:show="item.isTopLevel">
<i ng:if="item.expanded" class="fa fa-fw fa-caret-down"></i>
<i ng:if="!item.expanded" class="fa fa-fw fa-caret-right"></i>
</a>
<a ng:href="{{item.url[0] == '/' ? (urlPrefix + item.url) : item.url}}" ng:click="feedback.emit('sidebar', {id: item.id})" class="link">
<a ng:href="{{item.url[0] == '/' ? (urlPrefix + item.url) : item.url}}" ng:mouseup="feedback.emit('sidebar', {id: item.id})" class="link">
<i class="fa fa-fw fa-{{item.icon}}"></i> {{item.name}}
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion plugins/dashboard/.last-upload
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1430766868.81
1432240888.61
2 changes: 1 addition & 1 deletion plugins/datetime/.last-upload
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1430766884.57
1432240907.49
2 changes: 1 addition & 1 deletion plugins/filemanager/.last-upload
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1430766883.08
1432240905.75
2 changes: 1 addition & 1 deletion plugins/filemanager/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: filemanager
author: Ajenti project
email: e@ajenti.org
url: http://ajenti.org
version: '0.12'
version: '0.13'
title: 'File Manager'
icon: folder-o
dependencies:
Expand Down
2 changes: 1 addition & 1 deletion plugins/filesystem/.last-upload
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1430766930.93
1432241025.77
2 changes: 1 addition & 1 deletion plugins/network/.last-upload
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1430766875.95
1432240897.07
2 changes: 1 addition & 1 deletion plugins/notepad/.last-upload
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1430766870.26
1432240890.29
2 changes: 1 addition & 1 deletion plugins/notepad/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: notepad
author: Ajenti project
email: e@ajenti.org
url: http://ajenti.org
version: '0.11'
version: '0.12'
title: 'Notepad'
icon: pencil
dependencies:
Expand Down
2 changes: 1 addition & 1 deletion plugins/packages/.last-upload
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1430766880.04
1432240902.16
2 changes: 1 addition & 1 deletion plugins/passwd/.last-upload
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1430766871.69
1432240891.83
2 changes: 1 addition & 1 deletion plugins/plugins/.last-upload
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1430766881.56
1432240903.86
2 changes: 1 addition & 1 deletion plugins/plugins/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: plugins
author: Ajenti project
email: e@ajenti.org
url: http://ajenti.org
version: '0.29'
version: '0.30'
title: 'Plugins'
icon: th-large
dependencies:
Expand Down
2 changes: 0 additions & 2 deletions plugins/plugins/tasks.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import os
import subprocess
import shutil

from aj.plugins.core.api.tasks import Task

Expand Down
4 changes: 4 additions & 0 deletions plugins/plugins/views.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import os
import requests
import shutil
import subprocess

import aj
Expand Down Expand Up @@ -89,6 +91,8 @@ def handle_api_pypi_uninstall(self, http_context, name=None):
@url(r'/api/plugins/repo/list')
@endpoint(api=True)
def handle_api_repo_list(self, http_context):
if os.path.exists('/root/.cache/pip'):
shutil.rmtree('/root/.cache/pip')
try:
return requests.get('http://ajenti.org/plugins/list').json()
except Exception as e:
Expand Down
2 changes: 1 addition & 1 deletion plugins/power/.last-upload
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1430766927.17
1432241021.87
2 changes: 1 addition & 1 deletion plugins/services/.last-upload
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1430766878.81
1432240900.4
2 changes: 1 addition & 1 deletion plugins/services/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: services
author: Ajenti project
email: e@ajenti.org
url: http://ajenti.org
version: '0.15'
version: '0.17'
title: 'Services'
icon: cogs
dependencies:
Expand Down
8 changes: 6 additions & 2 deletions plugins/services/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@ def __init__(self, context):
Widget.__init__(self, context)

def get_value(self, config):
manager_id = config.get('manager_id', None)
service_id = config.get('service_id', None)
if not manager_id or not service_id:
return None
for mgr in ServiceManager.all(self.context):
if mgr.id == config.get('manager_id', None):
svc = mgr.get(config.get('service_id', None))
if mgr.id == manager_id:
svc = mgr.get_service(service_id)
return {
'id': svc.id,
'name': svc.name,
Expand Down
2 changes: 1 addition & 1 deletion plugins/settings/.last-upload
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1430766873.16
1432240893.48
2 changes: 1 addition & 1 deletion plugins/settings/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: settings
author: Ajenti project
email: e@ajenti.org
url: http://ajenti.org
version: '0.14'
version: '0.15'
title: 'Settings'
icon: wrench
dependencies:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ angular.module('ajenti.settings').controller 'SettingsIndexController', ($scope,
.catch () ->
notify.error 'Could not load config'

$scope.$watch 'config.color', () ->
$scope.$watch 'config.data.color', () ->
if config.data
identity.color = config.data.color

Expand Down
2 changes: 1 addition & 1 deletion plugins/supervisor/.last-upload
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1430766874.49
1432240895.21
2 changes: 1 addition & 1 deletion plugins/terminal/.last-upload
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1430766886.25
1432240909.55

0 comments on commit 57323ce

Please sign in to comment.