@ -86,9 +86,9 @@ class ControlPanel():
if inControlPanelNameStr in Orchestrator . GSettingsGet ( ) [ " ServerDict " ] [ " ControlPanelDict " ] :
if inControlPanelNameStr in Orchestrator . GSettingsGet ( ) [ " ServerDict " ] [ " ControlPanelDict " ] :
raise Exception ( f " Ошибка: Ранее уже была инициализирована панель управления с идентификатором: { inControlPanelNameStr } . Устраните ошибку и перезапустите оркестратор " )
raise Exception ( f " Ошибка: Ранее уже была инициализирована панель управления с идентификатором: { inControlPanelNameStr } . Устраните ошибку и перезапустите оркестратор " )
Orchestrator . GSettingsGet ( ) [ " ServerDict " ] [ " ControlPanelDict " ] [ inControlPanelNameStr ] = self
Orchestrator . GSettingsGet ( ) [ " ServerDict " ] [ " ControlPanelDict " ] [ inControlPanelNameStr ] = self
self . mControlPanelNameStr = inControlPanelNameStr # Set the name of the control panel
self . RefreshHTMLJinja2TemplatePathSet ( inJinja2TemplatePathStr = inRefreshHTMLJinja2TemplatePathStr )
self . RefreshHTMLJinja2TemplatePathSet ( inJinja2TemplatePathStr = inRefreshHTMLJinja2TemplatePathStr )
self . mJinja2TemplateRefreshBool = inJinja2TemplateRefreshBool
self . mJinja2TemplateRefreshBool = inJinja2TemplateRefreshBool
self . mControlPanelNameStr = inControlPanelNameStr # Set the name of the control panel
self . mRobotNameStr = inRobotNameStr # Set the robot name for robot it execute
self . mRobotNameStr = inRobotNameStr # Set the robot name for robot it execute
def Jinja2DataUpdateDictSet ( self , inJinja2DataUpdateDict ) :
def Jinja2DataUpdateDictSet ( self , inJinja2DataUpdateDict ) :
@ -116,7 +116,7 @@ class ControlPanel():
self . mRefreshHTMLJinja2Env = jinja2 . Environment ( loader = self . mRefreshHTMLJinja2Loader , trim_blocks = True )
self . mRefreshHTMLJinja2Env = jinja2 . Environment ( loader = self . mRefreshHTMLJinja2Loader , trim_blocks = True )
self . mRefreshHTMLJinja2Template = self . mRefreshHTMLJinja2Env . get_template ( lTemplateFileNameStr )
self . mRefreshHTMLJinja2Template = self . mRefreshHTMLJinja2Env . get_template ( lTemplateFileNameStr )
except Exception as e :
except Exception as e :
Orchestrator . OrchestratorLoggerGet ( ) . exception ( " Ошибка при инициализации Jinja2 " )
Orchestrator . OrchestratorLoggerGet ( ) . exception ( f " Ошибка при инициализации Jinja2 ({ inJinja2TemplatePathStr } ). Панель управления: { self . mControlPanelNameStr } " )
def RefreshHTMLJinja2StrGenerate ( self , inDataDict ) :
def RefreshHTMLJinja2StrGenerate ( self , inDataDict ) :
"""
"""
@ -145,7 +145,7 @@ class ControlPanel():
self . mInitJSJinja2Env = jinja2 . Environment ( loader = self . mInitJSJinja2Loader , trim_blocks = True )
self . mInitJSJinja2Env = jinja2 . Environment ( loader = self . mInitJSJinja2Loader , trim_blocks = True )
self . mInitJSJinja2Template = self . mInitJSJinja2Env . get_template ( lTemplateFileNameStr )
self . mInitJSJinja2Template = self . mInitJSJinja2Env . get_template ( lTemplateFileNameStr )
except Exception as e :
except Exception as e :
Orchestrator . OrchestratorLoggerGet ( ) . exception ( " Ошибка при инициализации Jinja2 " )
Orchestrator . OrchestratorLoggerGet ( ) . exception ( f " Ошибка при инициализации Jinja2 ({ inJinja2TemplatePathStr } ). Панель управления: { self . mControlPanelNameStr } " )
def InitJSJinja2StrGenerate ( self , inDataDict ) :
def InitJSJinja2StrGenerate ( self , inDataDict ) :
"""
"""