mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 05:45:59 +01:00
bug fix: prevent dockerapps to be created by less ram
This commit is contained in:
@@ -64,8 +64,6 @@
|
|||||||
<a href="http://{$ web.domain $}" target="_blank" title="Visit Site">
|
<a href="http://{$ web.domain $}" target="_blank" title="Visit Site">
|
||||||
<h2 style="display: inline; color: #414C59;" ng-bind="web.domain"></h2>
|
<h2 style="display: inline; color: #414C59;" ng-bind="web.domain"></h2>
|
||||||
</a>
|
</a>
|
||||||
<a target="_self" href="/filemanager/{$ web.domain $}" title="Open File Manager"> --
|
|
||||||
{% trans "File Manager" %}</a>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2 content-box-header" style="text-transform: none;">
|
<div class="col-md-2 content-box-header" style="text-transform: none;">
|
||||||
<a href="/docker/manage/{$ web.id $}/app" target="_self" title="Manage Website">
|
<a href="/docker/manage/{$ web.id $}/app" target="_self" title="Manage Website">
|
||||||
|
|||||||
@@ -6887,6 +6887,17 @@ StrictHostKeyChecking no
|
|||||||
WPemal = data['WPemal']
|
WPemal = data['WPemal']
|
||||||
WPpasswd = data['WPpasswd']
|
WPpasswd = data['WPpasswd']
|
||||||
|
|
||||||
|
if int(MYsqlRam) < 256:
|
||||||
|
final_dic = {'status': 0, 'error_message': 'Minimum MySQL ram should be 512MB.'}
|
||||||
|
final_json = json.dumps(final_dic)
|
||||||
|
return HttpResponse(final_json)
|
||||||
|
|
||||||
|
if int(SiteRam) < 256:
|
||||||
|
final_dic = {'status': 0, 'error_message': 'Minimum site ram should be 512MB.'}
|
||||||
|
final_json = json.dumps(final_dic)
|
||||||
|
return HttpResponse(final_json)
|
||||||
|
|
||||||
|
|
||||||
pattern = r"^[a-z0-9][a-z0-9]*$"
|
pattern = r"^[a-z0-9][a-z0-9]*$"
|
||||||
|
|
||||||
if re.match(pattern, sitename):
|
if re.match(pattern, sitename):
|
||||||
|
|||||||
Reference in New Issue
Block a user