Skip to content

Commit 3d1623c

Browse files
committed
bug fix: prevent dockerapps to be created by less ram
1 parent f07cfce commit 3d1623c

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

websiteFunctions/templates/websiteFunctions/ListDockersite.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ <h2 id="domainNamePage">{% trans "List Docker Site" %}
6464
<a href="http://{$ web.domain $}" target="_blank" title="Visit Site">
6565
<h2 style="display: inline; color: #414C59;" ng-bind="web.domain"></h2>
6666
</a>
67-
<a target="_self" href="/filemanager/{$ web.domain $}" title="Open File Manager"> --
68-
{% trans "File Manager" %}</a>
6967
</div>
7068
<div class="col-md-2 content-box-header" style="text-transform: none;">
7169
<a href="/docker/manage/{$ web.id $}/app" target="_self" title="Manage Website">

websiteFunctions/website.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6887,6 +6887,17 @@ def submitDockerSiteCreation(self, userID=None, data=None):
68876887
WPemal = data['WPemal']
68886888
WPpasswd = data['WPpasswd']
68896889

6890+
if int(MYsqlRam) < 256:
6891+
final_dic = {'status': 0, 'error_message': 'Minimum MySQL ram should be 512MB.'}
6892+
final_json = json.dumps(final_dic)
6893+
return HttpResponse(final_json)
6894+
6895+
if int(SiteRam) < 256:
6896+
final_dic = {'status': 0, 'error_message': 'Minimum site ram should be 512MB.'}
6897+
final_json = json.dumps(final_dic)
6898+
return HttpResponse(final_json)
6899+
6900+
68906901
pattern = r"^[a-z0-9][a-z0-9]*$"
68916902

68926903
if re.match(pattern, sitename):

0 commit comments

Comments
 (0)