dev-fastapi
parent
90577582af
commit
7af278e208
@ -0,0 +1,29 @@
|
||||
$('.ui.dropdown')
|
||||
.dropdown('clear')
|
||||
;
|
||||
|
||||
|
||||
|
||||
var content = [
|
||||
];
|
||||
|
||||
let i = 1
|
||||
document.getElementById("buyNumber").innerHTML = i
|
||||
|
||||
|
||||
$('.ui.search')
|
||||
.search({
|
||||
source: content
|
||||
})
|
||||
;
|
||||
|
||||
function buy_confirm() {
|
||||
j = String(i)
|
||||
content.push({ title: j })
|
||||
$('.ui.search').search({source: content})
|
||||
i=i+1;
|
||||
document.getElementById("buyNumber").innerHTML = i;
|
||||
$('.ui.dropdown').dropdown('clear')
|
||||
}
|
||||
|
||||
|
@ -1,52 +0,0 @@
|
||||
# Role model - if len of keys in dict is 0 - all access. If at least len is 1 - only this access
|
||||
# "Orchestrator":{
|
||||
# "Controls": {
|
||||
# "RestartOrchestrator": {}, # Feature to restart orchestrator on virtual machine
|
||||
# "LookMachineScreenshots": {} # Feature to look machina screenshots
|
||||
# },
|
||||
# "RDPActive": { # Robot RDP active module
|
||||
# "ListRead": {} # Access to read RDP session list
|
||||
# "RestartPC": {} # Restart PC
|
||||
# "GITRestartOrchestrator": {} # Update GIT + restart orchestrator
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
|
||||
# USAGE in .py
|
||||
# inRequest.
|
||||
# inRequest.OpenRPA["DefUserRoleAccessAsk"](["Orchestrator","RDPActive","Controls"]) - return True or False
|
||||
# inRequest.OpenRPA["DefUserRoleHierarchyGet"]() - Return dict of the role hierarchy or {}
|
||||
|
||||
# Init Section
|
||||
gUserNameStr = "Login" # User name without domain name
|
||||
gDomainNameStr = "" # DOMAIN or EMPTY str if no domain
|
||||
gDomainIsDefaultBool = True # If domain is exist and is default (default = you can type login without domain name)
|
||||
|
||||
def SettingsUpdate(inDict):
|
||||
lRuleDomainUserDict = {
|
||||
"MethodMatchURLBeforeList": [
|
||||
{
|
||||
"Method":"GET",
|
||||
"MatchType":"Beginwith",
|
||||
"URL":"/",
|
||||
#"FlagAccessDefRequestGlobalAuthenticate": TestDef
|
||||
"FlagAccess": True
|
||||
},
|
||||
{
|
||||
"Method":"POST",
|
||||
"MatchType":"Beginwith",
|
||||
"URL":"/",
|
||||
#"FlagAccessDefRequestGlobalAuthenticate": TestDef
|
||||
"FlagAccess": True
|
||||
}
|
||||
],
|
||||
"ControlPanelKeyAllowedList": ["TestControlPanel", "RobotRDPActive","RobotScreenActive", "ControlPanel_Template"], # If empty - all is allowed
|
||||
"RoleHierarchyAllowedDict": {"Key1":"Test"}
|
||||
}
|
||||
# Case add domain + user
|
||||
inDict["Server"]["AccessUsers"]["RuleDomainUserDict"].update({(gDomainNameStr.upper(),gUserNameStr.upper()):lRuleDomainUserDict})
|
||||
if gDomainIsDefaultBool:
|
||||
# Case add default domain + user
|
||||
inDict["Server"]["AccessUsers"]["RuleDomainUserDict"].update({("",gUserNameStr.upper()):lRuleDomainUserDict})
|
||||
#Return current dict
|
||||
return inDict
|
@ -1,24 +0,0 @@
|
||||
chcp 65001
|
||||
@echo off
|
||||
echo Формат использования init-python-env.cmd [имя запускаемого процесса.exe] [имя убиваемого процесса.exe]
|
||||
echo Пример использования init-python-env.cmd orpa-rbt.exe orpa-rbt.exe
|
||||
|
||||
if [%1]==[] goto :python-env
|
||||
goto create-exe
|
||||
:create-exe
|
||||
copy /Y "%~dp0..\Resources\WPy64-3720\python-3.7.2.amd64\python.exe" "%~dp0..\Resources\WPy64-3720\python-3.7.2.amd64\%1"
|
||||
if [%2]==[] goto :python-env
|
||||
goto taskkill
|
||||
:taskkill
|
||||
taskkill /im "%2" /F /fi "username eq %username%"
|
||||
goto :python-env
|
||||
:python-env
|
||||
set CD_PREV=%cd%
|
||||
cd /d "%~dp0..\Resources\WPy64-3720\python-3.7.2.amd64"
|
||||
set PATH=%cd%;%cd%\Scripts;%PATH%
|
||||
cd /d "%~dp0..\Sources"
|
||||
set PYTHONPATH=%cd%;%PYTHONPATH%
|
||||
cd %CD_PREV%
|
||||
:eof
|
||||
echo Инициализация Python окружения прошла успешно!
|
||||
@echo on
|
@ -1,4 +0,0 @@
|
||||
chcp 65001
|
||||
cd /d "%~dp0"
|
||||
call init-python-env.cmd orpa-rbt.exe orpa-rbt.exe
|
||||
cmd
|
@ -1,5 +1,4 @@
|
||||
chcp 65001
|
||||
cd /d "%~dp0"
|
||||
call init-python-env.cmd orpa-orc.exe orpa-orc.exe
|
||||
call .\..\Scripts\PythonWinInit.cmd script orpa-orc.exe orpa-orc.exe
|
||||
orpa-orc.exe "config.py"
|
||||
pause>nul
|
@ -0,0 +1,24 @@
|
||||
@echo off
|
||||
chcp 65001
|
||||
echo Формат использования PythonWinInit.cmd [console,script] [имя запускаемого процесса.exe] [имя убиваемого процесса.exe]
|
||||
echo Пример использования PythonWinInit.cmd script orpa-rbt.exe orpa-rbt.exe
|
||||
|
||||
if [%2]==[] goto :python-env
|
||||
goto create-exe
|
||||
:create-exe
|
||||
copy /Y "%~dp0..\Resources\WPy64-3720\python-3.7.2.amd64\python.exe" "%~dp0..\Resources\WPy64-3720\python-3.7.2.amd64\%2"
|
||||
if [%3]==[] goto :python-env
|
||||
goto taskkill
|
||||
:taskkill
|
||||
taskkill /im "%3" /F /fi "username eq %username%"
|
||||
goto :python-env
|
||||
:python-env
|
||||
call "%~dp0PythonWinConfigure.cmd"
|
||||
echo Инициализация Python окружения прошла успешно!
|
||||
if [%1]==[] goto :console
|
||||
if [%1]==[console] goto :console
|
||||
goto :eof
|
||||
:console
|
||||
cmd
|
||||
:eof
|
||||
@echo on
|
Loading…
Reference in new issue