You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
318 lines
9.9 KiB
318 lines
9.9 KiB
6 years ago
|
<!DOCTYPE html>
|
||
|
<html lang="en" >
|
||
|
<head>
|
||
|
<meta charset="utf-8">
|
||
|
<title>OpenRPA</title>
|
||
|
<link rel="stylesheet" type="text/css" href="3rdParty/Semantic-UI-CSS-master/semantic.min.css">
|
||
|
<script
|
||
|
src="3rdParty/jQuery/jquery-3.1.1.min.js"
|
||
|
crossorigin="anonymous"></script>
|
||
|
<script src="3rdParty/Semantic-UI-CSS-master/semantic.min.js"></script>
|
||
6 years ago
|
<script src="3rdParty/Handlebars/handlebars-v4.1.2.js"></script>
|
||
6 years ago
|
<script>
|
||
|
var mGlobal={}
|
||
|
$(document)
|
||
|
.ready(function() {
|
||
|
// fix main menu to page on passing
|
||
|
$('.main.menu').visibility({
|
||
|
type: 'fixed'
|
||
|
});
|
||
|
$('.overlay').visibility({
|
||
|
type: 'fixed',
|
||
|
offset: 80
|
||
|
});
|
||
|
|
||
|
// lazy load images
|
||
|
$('.image').visibility({
|
||
|
type: 'image',
|
||
|
transition: 'vertical flip in',
|
||
|
duration: 500
|
||
|
});
|
||
|
|
||
|
// show dropdown on hover
|
||
|
$('.main.menu .ui.dropdown').dropdown({
|
||
|
on: 'hover'
|
||
|
});
|
||
6 years ago
|
String.prototype.replaceAll = function(search, replace){
|
||
|
return this.split(search).join(replace);
|
||
|
}
|
||
6 years ago
|
mGlobal.GeneralGenerateHTMLCodeHandlebars=function(inInnerTemplateSelector,inData) {
|
||
|
lHTMLTemplate=$(inInnerTemplateSelector)[0].innerHTML
|
||
|
console.log(lHTMLTemplate)
|
||
|
//Компиляция
|
||
|
var template = Handlebars.compile(lHTMLTemplate);
|
||
|
//Вставка данных
|
||
|
var lHTMLResult = template(inData);
|
||
|
return lHTMLResult
|
||
|
}
|
||
6 years ago
|
mGlobal.GeneralGenerateHTMLCode=function(inTemplateHTMLSelector,inItemDictionary,inKeywordPrefix="::",inKeywordPostfix="::") {
|
||
|
///Получить заготовку
|
||
|
lTemplateHTMLCode=$(inTemplateHTMLSelector)[0].outerHTML
|
||
|
///Определить ключь экранирования специальных ключевых слов
|
||
|
///Выполнить циклические замены, если там есть пожходящие ключи
|
||
|
lResultHTMLCode=lTemplateHTMLCode
|
||
|
for(var lKey in inItemDictionary) {
|
||
|
lHTMLKey=inKeywordPrefix+lKey+inKeywordPostfix;
|
||
|
lResultHTMLCode=lResultHTMLCode.replaceAll(lHTMLKey,inItemDictionary[lKey])
|
||
|
}
|
||
|
///Вернуть результат
|
||
|
return lResultHTMLCode
|
||
|
}
|
||
6 years ago
|
|
||
6 years ago
|
mGlobal.Monitor={};
|
||
|
mGlobal.Monitor.ScreenshotModal={};
|
||
|
mGlobal.Monitor.GenerateUniqueID=function(inPrefix="tempUID=") {
|
||
|
return inPrefix+Math.round(Math.random()*1000)+"-"+Math.round(Math.random()*10000)+"-"+Math.round(Math.random()*1000)
|
||
|
}
|
||
6 years ago
|
//inHostURI: http://localhost:8081
|
||
|
mGlobal.Monitor.ScreenshotModal.Show=function(inHostURI) {
|
||
6 years ago
|
$('.ui.modal.daemon-screenshot').modal('show');
|
||
|
|
||
|
//Функция обновления картинки
|
||
|
lScreenshotUpdate=function() {
|
||
6 years ago
|
lScreenshotSrc=inHostURI+"/GetScreenshot?"+mGlobal.Monitor.GenerateUniqueID()
|
||
6 years ago
|
$(".daemon-screenshot img").attr('src', lScreenshotSrc);
|
||
|
}
|
||
|
|
||
|
mGlobal.Monitor.ScreenshotModal.timerId=setInterval(lScreenshotUpdate,1500)
|
||
|
|
||
|
}
|
||
|
mGlobal.Monitor.ScreenshotModal.Close=function() {
|
||
|
clearInterval(mGlobal.Monitor.ScreenshotModal.timerId);
|
||
|
}
|
||
6 years ago
|
///Monitor
|
||
|
mGlobal.Monitor.DaemonList={}
|
||
|
mGlobal.Monitor.DaemonList.fRefreshTable=function() {
|
||
|
///Загрузка данных
|
||
|
$.ajax({
|
||
|
type: "GET",
|
||
|
url: 'Monitor/JSONDaemonListGet',
|
||
|
data: '',
|
||
|
success:
|
||
|
function(lData,l2,l3)
|
||
|
{
|
||
|
var lResponseJSON=JSON.parse(lData)
|
||
|
///Сформировать HTML код новой таблицы
|
||
|
lHTMLCode=mGlobal.GeneralGenerateHTMLCodeHandlebars(".openrpa-hidden-monitor-table-general",lResponseJSON)
|
||
|
///Очистить дерево
|
||
|
//mGlobal.ElementTree.fClear();
|
||
|
///Прогрузить новую таблицу
|
||
|
$(".openrpa-monitor").html(lHTMLCode)
|
||
|
},
|
||
|
dataType: "text"
|
||
|
});
|
||
|
}
|
||
6 years ago
|
})
|
||
|
;
|
||
|
</script>
|
||
|
|
||
|
<style type="text/css">
|
||
|
|
||
|
body {
|
||
|
background-color: #FFFFFF;
|
||
|
}
|
||
|
.main.container {
|
||
|
margin-top: 2em;
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
.overlay {
|
||
|
float: left;
|
||
|
margin: 0em 3em 1em 0em;
|
||
|
}
|
||
|
.overlay .menu {
|
||
|
position: relative;
|
||
|
left: 0;
|
||
|
transition: left 0.5s ease;
|
||
|
}
|
||
|
|
||
|
.main.menu.fixed {
|
||
|
background-color: #FFFFFF;
|
||
|
border: 1px solid #DDD;
|
||
|
box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.2);
|
||
|
}
|
||
|
.overlay.fixed .menu {
|
||
|
left: 800px;
|
||
|
}
|
||
|
|
||
|
.text.container .left.floated.image {
|
||
|
margin: 2em 2em 2em -4em;
|
||
|
}
|
||
|
.text.container .right.floated.image {
|
||
|
margin: 2em -4em 2em 2em;
|
||
|
}
|
||
|
|
||
|
.ui.footer.segment {
|
||
|
margin: 5em 0em 0em;
|
||
|
padding: 5em 0em;
|
||
|
}
|
||
|
</style>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div class="ui internally celled grid">
|
||
|
<div class="row black">
|
||
|
<div class="two wide column">
|
||
|
<h1 class="ui header inverted">OpenRPA</h1>
|
||
|
</div>
|
||
|
<div class="twelve wide column">
|
||
|
<h1 class="ui header inverted">Daemon GUI</h1>
|
||
|
</div>
|
||
|
<div class="two wide column">
|
||
|
<h5>by UnicodeLabs</h5>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
<div class="row">
|
||
|
<div class="six wide column rpa-object-tree" >
|
||
|
|
||
|
</div>
|
||
|
<div class="six wide column rpa-hierarchy" >
|
||
|
<p>This example shows how to use lazy loaded images, a sticky menu, and a simple text container</p>
|
||
|
</div>
|
||
|
<div class="four wide column rpa-property-list" >
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="row black">
|
||
|
<div class="two wide column">
|
||
6 years ago
|
<h2 class="ui header inverted">Monitor</h2>
|
||
6 years ago
|
</div>
|
||
|
<div class="two wide column">
|
||
6 years ago
|
|
||
6 years ago
|
</div>
|
||
|
<div class="two wide column">
|
||
6 years ago
|
|
||
6 years ago
|
</div>
|
||
|
<div class="ten wide column">
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
6 years ago
|
<script class="openrpa-hidden-monitor-table-general" style="display:none" type="text/x-handlebars-template">
|
||
|
<table class="ui celled table">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th>Machine name</th>
|
||
|
<th>Machihe host</th>
|
||
|
<th>Status</th>
|
||
|
<th>Actions,length: {{childs.length}}</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
{{#webServerMonitorList}}
|
||
|
<tr><td>{{daemonName}}</td><td>{{daemonURI}}</td><td class="negative">None</td></tr>
|
||
|
{{/webServerMonitorList}}
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</script>
|
||
|
<div class="row openrpa-monitor">
|
||
6 years ago
|
|
||
6 years ago
|
<a onclick="mGlobal.Monitor.ScreenshotModal.Show();" class="item" target="_blank">GetScreenshot</a>
|
||
6 years ago
|
</div>
|
||
|
<div class="row black">
|
||
|
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="ui inverted vertical footer segment">
|
||
|
<div class="ui center aligned container">
|
||
|
<div class="ui stackable inverted divided grid">
|
||
|
<div class="three wide column">
|
||
|
<h4 class="ui inverted header">Pywinauto</h4>
|
||
|
<div class="ui inverted link list">
|
||
|
<a href="https://pywinauto.readthedocs.io/en/latest/code/pywinauto.findwindows.html" class="item" target="_blank">Specification manual</a>
|
||
|
<a href="https://pywinauto.readthedocs.io/en/latest/code/code.html#main-user-modules" class="item" target="_blank">Classes manual</a>
|
||
|
<a href="https://pywinauto.readthedocs.io/en/latest/code/code.html#main-user-modules" class="item" target="_blank">How to use manual</a>
|
||
|
<a href="https://pywinauto.readthedocs.io/en/latest/code/pywinauto.base_wrapper.html" class="item" target="_blank">Base wrapper manual</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="three wide column">
|
||
|
<h4 class="ui inverted header">Semantic UI</h4>
|
||
|
<div class="ui inverted link list">
|
||
|
<a href="https://semantic-ui.com/usage/theming.html" class="item" target="_blank">Color manual</a>
|
||
|
<a href="https://semantic-ui.com/elements/input.html" class="item" target="_blank">Input manual</a>
|
||
|
<a href="https://semantic-ui.com/elements/icon.html" class="item" target="_blank">Icon list</a>
|
||
|
<a href="https://semantic-ui.com/elements/button.html" class="item" target="_blank">Button manual</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="three wide column">
|
||
|
<h4 class="ui inverted header">GitLab</h4>
|
||
|
<div class="ui inverted link list">
|
||
|
<a href="https://gitlab.com/UnicodeLabs/OpenRPA" class="item" target="_blank">OpenRPA repository</a>
|
||
|
<a href="https://gitlab.com/UnicodeLabs" class="item" target="_blank">UnicodeLabs</a>
|
||
|
<a href="#" class="item">Link -</a>
|
||
|
<a href="#" class="item">Link -</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="seven wide column">
|
||
|
<h4 class="ui inverted header">OpenRPA</h4>
|
||
|
<p>Open source Robotic Process Automation software by the Unicode Labs (Created by Ivan Maslov). Under the MIT license.</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="ui inverted section divider"></div>
|
||
|
<div class="ui horizontal inverted small divided link list">
|
||
|
<a class="item" href="#">Site Map</a>
|
||
|
<a class="item" href="#">Contact Us</a>
|
||
|
<a class="item" href="#">Terms and Conditions</a>
|
||
|
<a class="item" href="#">Privacy Policy</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="ui basic modal">
|
||
|
<div class="ui icon header">
|
||
|
</div>
|
||
|
<div class="content">
|
||
|
<p>Here is the message text!</p>
|
||
|
</div>
|
||
|
<div class="actions">
|
||
|
<div class="ui red basic cancel inverted button">
|
||
|
<i class="remove icon"></i>
|
||
|
No
|
||
|
</div>
|
||
|
<div class="ui green ok inverted button">
|
||
|
<i class="checkmark icon"></i>
|
||
|
Yes
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
6 years ago
|
<div class="ui daemon-screenshot modal">
|
||
|
<div class="ui icon header">
|
||
|
</div>
|
||
|
<div class="content">
|
||
|
<img src="GetScreenshot" class="ui fluid image">
|
||
|
|
||
|
</div>
|
||
|
<div class="actions">
|
||
|
<div class="ui green ok inverted button" onclick="mGlobal.Monitor.ScreenshotModal.Close()">
|
||
|
<i class="checkmark icon"></i>
|
||
|
Close
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
6 years ago
|
|
||
|
<div class="ui modal openrpa-code-list-gui-import-modal">
|
||
|
<i class="close icon"></i>
|
||
|
<div class="header">
|
||
|
Code list import
|
||
|
</div>
|
||
|
<div class="content">
|
||
|
<div class="description">
|
||
|
<div class="ui header">Insert your JSON specification here.</div>
|
||
|
<p><textarea style="width:100%" rows="6" cols="60"></textarea></p>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="actions">
|
||
|
<div class="ui black deny button">
|
||
|
Cancel
|
||
|
</div>
|
||
|
<div class="ui positive right labeled icon button" onclick="mGlobal.CodeList.fActionSpecificationImportFromJSON();">
|
||
|
Parse
|
||
|
<i class="checkmark icon"></i>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|
||
|
|