diff --git a/orchestra/contrib/domains/admin.py b/orchestra/contrib/domains/admin.py
index 75b7857d..7f7e0573 100644
--- a/orchestra/contrib/domains/admin.py
+++ b/orchestra/contrib/domains/admin.py
@@ -1,6 +1,7 @@
from django import forms
from django.contrib import admin
from django.db.models.functions import Concat, Coalesce
+from django.templatetags.static import static
from django.utils.translation import ugettext_lazy as _
from orchestra.admin import ExtendedModelAdmin
@@ -79,12 +80,19 @@ class DomainAdmin(AccountAdminMixin, ExtendedModelAdmin):
def display_websites(self, domain):
if apps.isinstalled('orchestra.contrib.websites'):
- webs = domain.websites.all()
- if webs:
+ websites = domain.websites.all()
+ if websites:
links = []
- for web in webs:
- url = change_url(web)
- links.append('%s' % (url, web.name))
+ for website in websites:
+ context = {
+ 'title': _("View on site"),
+ 'url': website.get_absolute_url(),
+ 'image': '' % static('orchestra/images/view-on-site.png'),
+ }
+ site_link = '%(image)s' % context
+ admin_url = change_url(website)
+ link = '%s %s' % (admin_url, website.name, site_link)
+ links.append(link)
return '
'.join(links)
return _("No website")
display_websites.admin_order_field = 'websites__name'
diff --git a/orchestra/contrib/systemusers/settings.py b/orchestra/contrib/systemusers/settings.py
index f0138d23..33efff1c 100644
--- a/orchestra/contrib/systemusers/settings.py
+++ b/orchestra/contrib/systemusers/settings.py
@@ -11,7 +11,6 @@ SYSTEMUSERS_SHELLS = Setting('SYSTEMUSERS_SHELLS',
(
('/dev/null', _("No shell, FTP only")),
('/bin/rssh', _("No shell, SFTP/RSYNC only")),
- ('/usr/bin/git-shell', _("No shell, GIT only")),
('/bin/bash', "/bin/bash"),
('/bin/sh', "/bin/sh"),
),
@@ -29,7 +28,6 @@ SYSTEMUSERS_DISABLED_SHELLS = Setting('SYSTEMUSERS_DISABLED_SHELLS',
default=(
'/dev/null',
'/bin/rssh',
- '/usr/bin/git-shell',
),
)
diff --git a/orchestra/contrib/webapps/admin.py b/orchestra/contrib/webapps/admin.py
index 527a7cc4..663798cc 100644
--- a/orchestra/contrib/webapps/admin.py
+++ b/orchestra/contrib/webapps/admin.py
@@ -1,6 +1,7 @@
from django import forms
from django.contrib import admin
from django.core.urlresolvers import reverse
+from django.templatetags.static import static
from django.utils.encoding import force_text
from django.utils.translation import ugettext, ugettext_lazy as _
@@ -64,10 +65,17 @@ class WebAppAdmin(SelectPluginAdminMixin, AccountAdminMixin, ExtendedModelAdmin)
def display_websites(self, webapp):
websites = []
for content in webapp.content_set.all():
+ context = {
+ 'title': _("View on site"),
+ 'url': content.get_absolute_url(),
+ 'image': '' % static('orchestra/images/view-on-site.png'),
+ }
+ site_link = '%(image)s' % context
website = content.website
- url = change_url(website)
+ admin_url = change_url(website)
name = "%s on %s" % (website.name, content.path)
- websites.append('%s' % (url, name))
+ link = '%s %s' % (admin_url, name, site_link)
+ websites.append(link)
if not websites:
add_url = reverse('admin:websites_website_add')
add_url += '?account=%s' % webapp.account_id
diff --git a/orchestra/contrib/websites/backends/wordpress.py b/orchestra/contrib/websites/backends/wordpress.py
index 1a98d86b..f2668145 100644
--- a/orchestra/contrib/websites/backends/wordpress.py
+++ b/orchestra/contrib/websites/backends/wordpress.py
@@ -1,8 +1,5 @@
-import os
import textwrap
-from django.utils.translation import ugettext_lazy as _
-
from orchestra.contrib.orchestration import ServiceController
@@ -10,7 +7,7 @@ class WordPressURLBackend(ServiceController):
"""
Configures WordPress site URL with associated website domain.
"""
- verbose_name = _("WordPress URL")
+ verbose_name = "WordPress URL"
model = 'websites.Content'
default_route_match = "content.webapp.type == 'wordpress-php'"
diff --git a/orchestra/static/orchestra/images/view-on-site.png b/orchestra/static/orchestra/images/view-on-site.png
new file mode 100644
index 00000000..108af0df
Binary files /dev/null and b/orchestra/static/orchestra/images/view-on-site.png differ
diff --git a/orchestra/static/orchestra/images/view-on-site.svg b/orchestra/static/orchestra/images/view-on-site.svg
new file mode 100644
index 00000000..8bebaa34
--- /dev/null
+++ b/orchestra/static/orchestra/images/view-on-site.svg
@@ -0,0 +1,116 @@
+
+
diff --git a/scripts/container/create.sh b/scripts/container/create.sh
index ab366b0e..2b780112 100755
--- a/scripts/container/create.sh
+++ b/scripts/container/create.sh
@@ -40,10 +40,14 @@ sed -i "s/\tlocalhost$/\tlocalhost $NAME/" $CONTAINER/etc/hosts
sed -i "s/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/" $CONTAINER/etc/locale.gen
chroot $CONTAINER locale-gen
+echo -e "#!/bin/sh\nexit 101\n" > $CONTAINER/usr/sbin/policy-rc.d
+chmod 755 $CONTAINER/usr/sbin/policy-rc.d
+
chroot $CONTAINER apt-get update
chroot $CONTAINER apt-get install -y --force-yes \
nano git screen sudo iputils-ping python3 python3-pip wget curl dnsutils rsyslog
+rm $CONTAINER/usr/sbin/policy-rc.d
chroot $CONTAINER apt-get clean