The system was upgraded and everything is back online. If you experience any issues, please send an email to atlas_admin@aei.mpg.de - thanks a lot for your patience!

Unverified Commit 504a2bb4 authored by Vitalii Koshura's avatar Vitalii Koshura

Merge branch 'dpa_gui_rpc_js' into upstream_master

Signed-off-by: default avatarVitalii Koshura <lestat.de.lionkur@gmail.com>
parents 957fae15 1858d1ed
......@@ -1803,8 +1803,14 @@ GUI_RPC gui_rpcs[] = {
static int handle_rpc_aux(GUI_RPC_CONN& grc) {
int retval = 0;
grc.mfin.init_buf_read(grc.request_msg);
if (grc.xp.get_tag()) return ERR_XML_PARSE; // parse <boinc_gui_rpc_request>
if (grc.xp.get_tag()) return ERR_XML_PARSE; // parse the request tag
if (grc.xp.get_tag()) { // parse <boinc_gui_rpc_request>
grc.mfout.printf("<error>missing boing_gui_rpc_request tag</error>\n");
return 0;
}
if (grc.xp.get_tag()) { // parse the request tag
grc.mfout.printf("<error>missing request</error>\n");
return 0;
}
for (unsigned int i=0; i<sizeof(gui_rpcs)/sizeof(GUI_RPC); i++) {
GUI_RPC& gr = gui_rpcs[i];
if (!grc.xp.match_tag(gr.req_tag) && !grc.xp.match_tag(gr.alt_req_tag)) {
......
This is the beginning of an electron-based BOINC GUI.
Currently to use this you need to:
1) clone the electron "simple-samples" repo
2) copy these files to the "activity-monitor" directory
(overwrite the files that are there)
3) copy your BOINC client's gui_rpc_auth.cfg file to that directory
4) from a command prompt in that directory, do
npm install
nmp start
It should open a window with your host name, lists of projects and tasks,
and a "suspend" button.
Many things to do:
1) eliminate the need for the simple-samples repo
2) factor out the GUI RPC code into a separate file, in lib/
3) finish the GUI
......@@ -40,10 +40,11 @@ function read_password() {
//
function gui_rpc(request) {
return new Promise(function(resolve, reject) {
request = "<boinc_gui_rpc_request>"+request+"</boinc_gui_rpc_request>"
http.onreadystatechange = function() {
if (http.readyState != 4) return;
if (http.status == 200) {
//console.log('got response: ' + http.responseText);
console.log('got response: ' + http.responseText);
resolve(http.responseText);
} else {
reject(http);
......@@ -86,8 +87,8 @@ function authorize() {
x = new DOMParser().parseFromString(reply, "text/xml");
auth_id = x.getElementsByTagName("auth_id")[0].childNodes[0].nodeValue;
auth_salt = x.getElementsByTagName("auth_salt")[0].childNodes[0].nodeValue;
//console.log("auth_id: "+auth_id);
//console.log("auth_salt: "+auth_salt);
console.log("auth_id: "+auth_id);
console.log("auth_salt: "+auth_salt);
});
}
......@@ -134,6 +135,7 @@ function show_state() {
$(() => { // shorthand for document ready
// get authorization ID
//
console.log('starting');
authorize().then(function() {
// then get state and show it
//
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment