Added seafile incon andn fixed random bugs
This commit is contained in:
parent
a6734ea1d1
commit
882c03a416
31
orchestra/apps/saas/services/seafile.py
Normal file
31
orchestra/apps/saas/services/seafile.py
Normal file
|
@ -0,0 +1,31 @@
|
|||
from django import forms
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from rest_framework import serializers
|
||||
|
||||
from .. import settings
|
||||
from .options import SoftwareService, SoftwareServiceForm
|
||||
|
||||
|
||||
# TODO monitor quota since out of sync?
|
||||
|
||||
class SeaFileForm(SoftwareServiceForm):
|
||||
email = forms.EmailField(label=_("Email"), widget=forms.TextInput(attrs={'size':'40'}))
|
||||
quota = forms.IntegerField(label=_("Quota"), initial=settings.SAAS_SEAFILE_DEFAULT_QUOTA,
|
||||
help_text=_("Disk quota in MB."))
|
||||
|
||||
|
||||
class SeaFileDataSerializer(serializers.Serializer):
|
||||
email = serializers.EmailField(label=_("Email"))
|
||||
quota = serializers.IntegerField(label=_("Quota"), default=settings.SAAS_SEAFILE_DEFAULT_QUOTA,
|
||||
help_text=_("Disk quota in MB."))
|
||||
|
||||
|
||||
class SeaFileService(SoftwareService):
|
||||
name = 'seafile'
|
||||
verbose_name = "SeaFile"
|
||||
form = SeaFileForm
|
||||
serializer = SeaFileDataSerializer
|
||||
icon = 'orchestra/icons/apps/seafile.png'
|
||||
site_domain = settings.SAAS_SEAFILE_DOMAIN
|
||||
change_readonly_fileds = ('email',)
|
BIN
orchestra/static/orchestra/icons/apps/seafile.png
Normal file
BIN
orchestra/static/orchestra/icons/apps/seafile.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
68
orchestra/static/orchestra/icons/apps/seafile.svg
Normal file
68
orchestra/static/orchestra/icons/apps/seafile.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 35 KiB |
Loading…
Reference in a new issue