mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-03-01 01:40:44 +01:00
bug fix: login check
This commit is contained in:
@@ -2929,3 +2929,19 @@ class CloudManager:
|
||||
final_dic = {'status': 0, 'fetchStatus': 0, 'error_message': str(msg)}
|
||||
final_json = json.dumps(final_dic)
|
||||
return HttpResponse(final_json)
|
||||
|
||||
def DebugCluster(self):
|
||||
try:
|
||||
|
||||
type = self.data['type']
|
||||
|
||||
execPath = "/usr/local/CyberCP/bin/python /usr/local/CyberCP/plogical/ClusterManager.py --function %s --type %s" % ('DebugCluster', type)
|
||||
ProcessUtilities.executioner(execPath)
|
||||
|
||||
final_json = json.dumps({'status': 1})
|
||||
return HttpResponse(final_json)
|
||||
|
||||
except BaseException as msg:
|
||||
final_dic = {'status': 0, 'fetchStatus': 0, 'error_message': str(msg)}
|
||||
final_json = json.dumps(final_dic)
|
||||
return HttpResponse(final_json)
|
||||
|
||||
@@ -48,6 +48,8 @@ def router(request):
|
||||
return cm.RunServerLevelEmailChecks()
|
||||
elif controller == 'DetachCluster':
|
||||
return cm.DetachCluster()
|
||||
elif controller == 'DebugCluster':
|
||||
return cm.DebugCluster()
|
||||
elif controller == 'FetchMasterBootStrapStatus':
|
||||
return cm.FetchMasterBootStrapStatus()
|
||||
elif controller == 'FetchChildBootStrapStatus':
|
||||
|
||||
Reference in New Issue
Block a user