Commit Graph

301 Commits

Author SHA1 Message Date
Vitalii Koshura 8ef9bb3b51
[Manager] Add HTML TOU support to Wizard
Moved part xml_unescape to gui_rpc_client_ops.cpp closer to its parsing

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2018-06-05 01:26:42 +03:00
Juha Sointusalo 450f89ec39 lib, mgr: use per-thread locales on Linux
On Linux, Manager sometimes prints timestamps in C locale instead of the
locale user has chosen. This happens when Manager is formatting a
timestamp and at the same time a GUI RPC is in progress. GUI RPCs
temporarily set the global locale to C locale with SET_LOCALE.

Use SET_LOCALE's per-thread locale version and set thread locale in
Manager's RPC thread to fix this.

Also clean up #ifdef mazes in SET_LOCALE and Manager's RPC thread now
that there are HAVE_* macros available. Remove OS X < 10.4 code because
that old OS X versions are not supported any more.

Fixes #2399.
2018-03-28 16:20:15 +03:00
David Anderson 1f6520c7f2 Add boinccmd commands to do acct mgr RPC, and to show acct mgr info
New commands:
--acct_mgr info: show name and URL of current AM
--acct_mgr synch: do RPC

also (for uniformity) new names for existing commands:
--acct_mgr attach URL email password
--acct_mgr detach

Tempted to remove old names, but didn't.
2018-01-13 00:41:49 -08:00
Gianfranco Costamagna 4f11a3edd7 Update xlocale definitions also for gui_rpc_client.h 2017-09-08 09:59:41 +02:00
David Anderson d15d0b95de client: parse keyword file and export keywords in get_state() GUI RPC
- This adds overhead to the get_state() call,
  but this happens only once per minute with the Manager.
- rename things so that "keyword_ids" refers to lists of keyword IDs
  and "keywords" refers to full KEYWORD objects
- have boinccmd include keywords in workunit properties
2017-07-30 13:12:16 -07:00
David Anderson 5b6f648570 client/lib: add GUI RPCs for reading and writing app_config.xml files.
These will allow GUIs (e.g. BoincTasks) to provide dialogs for editing app config info.
2017-05-11 20:16:35 -07:00
David Anderson 3b60641a07 client: small code shuffle; no behavior change 2017-05-10 01:38:12 -07:00
David Anderson 13a5b9bf3e change multiple-inclusion guard names to BOINC_FILENAME_H 2017-04-07 23:54:49 -07:00
David Anderson cfc850b919 Merge branch 'master' of https://github.com/JuhaSointusalo/boinc into JuhaSointusalo-master
Conflicts:
	clientgui/MainDocument.cpp
2017-03-28 01:30:03 -07:00
David Anderson 31a95ba10f client: add option to use SOCKS5 for DNS
Added <socks5_remote_dns> option to cc_config.xml.
Tells Curl to use the SOCKS proxy for domain name resolution.
2017-01-05 21:34:34 -08:00
Juha Sointusalo dde9573d64 lib: fix parsing RESULT from GUI RPC reply
fixes managing older clients
2016-03-24 22:47:11 +02:00
Rom Walton 9542bc9b1b client & MGR: Unify the language around the setup cookie feature. 2016-02-19 10:40:49 -05:00
Rom Walton 4d2e6a041f MGR: Fix for converting std::string to wxString for Mac and Linux.
MGR: Add missing commit from previous merge for the cookieless install scenario.
2016-02-10 10:46:48 -05:00
Rom Walton 6beafff693 WCG: New feature 'cookieless installs'
See: http://boinc.berkeley.edu/trac/wiki/SimpleAttach#CookielessInstalls

Signed-off-by: Rom Walton <romw@romwnet.org>
2016-02-08 15:51:33 -05:00
David Anderson f09166e5c4 client/Manager: show correct app version in multi-platform case
The GUI RPC element for a result didn't include the platform name.
So in cases where there were app versions with the same
version # and plan class (but different platforms)
the Manager would just show the first one
(e.g. the "executable file" item in Task Properties),
which was not necessarily correct.
2015-12-01 14:00:03 -08:00
David Anderson 67673ae2d6 Manager: show executable filename in task properties 2015-07-23 17:34:12 -07:00
David Anderson 53a550fef5 client, GUI RPC: maintain and report progress rate
"Progress rate" is that average increase in fraction done
per second of elapsed time.

Also remove unnecessary destructors in GUI RPC code
2015-06-22 00:09:15 -07:00
David Anderson aeac6c01f5 client/manager: fix WCG attach
When I added LDAP support I assumed that an email_addr without
a "@" is an LDAP name.
I forgot that WCG uses user names rather than email addrs.  D'oh!
2014-11-18 21:58:38 -08:00
David Anderson d0fb0184e8 client/manager/server: finish LDAP support
- get_project_config.php: if project supports LDAP,
  advertise this to the client.
- Manager: if project supports LDAP, say "Email address or LDAP ID"
  in Attach Project wizard,
  and don't do email address validation.
- lookup_account GUI RPC (client side): if passing an LDAP ID,
  don't lowercase it, and don't hash passwd
- lookup_account GUI RPC (server side): if passing an LDAP ID,
  pass appropriate URL args to Web RPC
- lookup_account Web RPC: in LDAP case, pass "ldap_auth" arg,
  and pass "ldap_uid" and "passwd".
  Handle these appropriately.
2014-10-18 23:53:27 -07:00
David Anderson 7dd986a430 client, GUI RPC: maintain per-project elapsed time and export via GUI RPC 2014-09-12 13:53:21 -07:00
David Anderson 9f1625a0a7 scheduler and client: fix mechanism for exposing user CPID to GUI
A month or two ago I added code to put user CPID in the project info
exported via GUI RPC, so that GUIs (like BoincTasks) could link
to user pages on stats sites.

However, I completely forgot that the CPID known to the client
(PROJECT::cross_project_id) is the "internal CPID",
while what gets exported to stats is the "external CPID",
which is MD5(internal CPID, email addr).

Solution: include the external CPID in scheduler replies,
store it in the client state file,
and export it in GUI RPCs as PROJECT::external_cpid.

This will eventually work for BoincTasks,
but only after projects update their server software,
and volunteers update their client software.
2014-08-08 12:58:08 -07:00
David Anderson 9f2cdee695 GUI RPC: add cross_project_id to PROJECT, for BoincTasks
This was already in the XML written by the client; no client change needed.
2014-07-13 17:44:38 -07:00
David Anderson b49cda7508 client: maintain # of success and failed jobs per project; report in GUI RPC 2014-06-03 23:37:14 -07:00
David Anderson 1e2fcb4b68 client/lib: change CONFIG to CC_CONFIG, config to cc_config.
Eliminates ambiguity of "config" global var, which is used in server code.
This confuses IDEs that are looking at all the code at once.
2014-05-08 00:51:18 -07:00
David Anderson 16ac049357 boinccmd: add --get_project_urls command to list project URLs, one per line
A script that wants to do some operation - say, update - on all projects
can call this, parse the result, then do the operation on each project.
2014-04-30 16:53:01 -07:00
David Anderson f8ee2e51fe client: keep track of a job's network usage, if it reports it.
If a job reports its network usage (via boinc_network_usage()),
keep track of this across episodes of the job, and report it to the server
(some projects may want to give credit for network usage).
2014-04-30 00:21:29 -07:00
David Anderson e22ffeb377 GUI RPC: add support for RPCs over Unix domain sockets (for Android)
- If run with --gui_rpc_unix_domain, the client will listen on
  a Unix-domain socket (named "boinc_socket") rather than on a TCP port.
- Add RPC_CLIENT::init_unix_domain() function to C++ GUI RPC interface
  (Note: we'll need to add a corresponding function to the Java interface)
- boinccmd: add --unix_domain option
2014-01-30 22:57:44 -08:00
David Anderson c4f4421ff0 client/manager/server: use HTTPS for web RPCs if possible
The web RPCs done by the client during project attach
(lookup_account, create_account)
have an email address and password hash in their request.
Network sniffers could potentially see these,
so we should use HTTPS for these RPCs if possible.
However, not all BOINC projects have SSL-enabled web servers.
So I did the following:

- Change get_project_config.php to return an additional
  <web_rpc_url_base> element.
  This is SECURE_URL_BASE (if specified in the project's
  project.inc config file) or, if not, the master URL.
- This new element is parsed into the PROJECT_CONFIG structure.
- In calls to create_account and lookup_account,
  the Manager uses PROJECT_CONFIG::web_rpc_url_base
  if it's available, else the master URL.

So, the new Manager/client uses HTTPS for RPCs to projects
that have updated their get_project_config.php,
and specify a SECURE_URL_BASE with https:// prefix.

Android note: I added code to parse the new config element,
but didn't change the higher-level code;
Joachim will need to do this.
2014-01-28 13:25:59 -08:00
David Anderson 8f7e94ec5d Client and Manager: make notices translatable
- Add a GUI RPC ("set_language") that lets the Manager communicate
  the user's selected language code to the client at startup.
- The client stores the language code in the client state file
- The client appends a "lang=X" GET argument to the URLs from
  which notices are fetched.
- The next steps (not done) are 1) to change the get_notices.php
  script to parse the argument and do translation, and
  2) extend our Pootle system to allow volunteer translation
  of notices by all projects.
2013-12-03 10:47:56 -08:00
David Anderson f3ffbf67f4 GUI RPC: add cpu_time (as well as elapsed_time) to OLD_RESULT 2013-10-18 00:46:48 -07:00
David Anderson d6398b0834 Client and boinccmd: fixes for get_old_results GUI RPC
- Add binding for get_old_results GUI RPC
- Add --get_old_tasks option to boinccmd
- Compile fixes for gcc (can't have a var named "or")
2013-09-08 12:11:09 -07:00
David Anderson 1a6a7128a1 client: get product name in Android
We want to track the product name (e.g. "HTC One X") of Android devices.
On Android, the API to get this is Java,
so we need to do it in the GUI rather than the client.
- Add product_name field to HOST_INFO
- Add a GUI RPC for passing this info from the GUI to the client.
- Store it in client_state.xml, so that the client knows it initially.

The product name is included in scheduler RPC requests, as part of <host_info>.
TODO: add server-side support for parsing it and storing in DB.

Also: move DEVICE_STATUS out of HOST_INFO; it didn't belong there.
2013-05-21 13:20:56 -07:00
Charlie Fenton 93aad6826c client & MGR: add support for <max_event_log_lines>N</max_event_log_lines> in cc_config.xml
Default is 2000
0 means unlimited
2013-05-18 03:25:44 -07:00
David Anderson 61913b181f client (Android): GUI reports battery and wifi status to client
Previously the client had (C++) code to
- check whether on AC or USB power
- get battery status and temperature
- check whether on wifi
These functions looked in various places under /sys.
Problem: the paths are system-dependent,
so whatever we do won't work on all devices.

The Android APIs for getting this info are in Java,
so we can't call them from the client.

Solution: have the GUI periodically get this info
and report it to the client via a GUI RPC.
The GUI must make this RPC periodically:
if the client doesn't get one within some period of time
(currently 30 sec) it suspends computing and network.

Also: if suspending jobs because of battery charge level
or temperature, leave them in memory.
2013-05-14 12:28:09 -07:00
David Anderson aa07305eeb - GUI RPC: add "project_dir" field to PROJECT struct.
GUIs can look for image files (stat_icon etc.) in this directory.
2013-04-18 12:43:17 -07:00
Charlie Fenton af10fb6cdd MGR: Limit event log to 2000 messages, deleting oldest if necessary 2013-03-05 16:42:45 +01:00
David Anderson 994f4d6b4c - Manager: fix case where the client has only an Intel GPU,
and the manager was acting as if it had no GPUs.
2013-03-05 13:39:42 +01:00
David Anderson 10f8baca5b - lib: function name tweak 2013-03-05 13:33:27 +01:00
Charlie Fenton b37c720661 Mgr: Display "Fetching notices..." instead of "There are no notices" while getting notices. Display "There are no notices" only if we have actually determined there are no notices 2013-03-04 17:19:40 +01:00
Rom Walton 2dd82881de - client/server: fix build breaks I introduced last night with a variable
rename.
2013-03-04 15:30:03 +01:00
Charlie Fenton ce87ec9848 OpenCL: First pass at adding support for Intel Ivy Bridge GPUs 2013-03-04 15:23:39 +01:00
David Anderson 5b740acee0 - client/manager: move the conditional define of MAXPATHLEN
from boinc_win.h to filesys.h,
	so that the client will hopefully build on Hurd,
	which doesn't define MAXPATHLEN.
2013-03-01 16:17:19 +01:00
David Anderson 9cf10b400a - GUI RPC: expose TIME_STATS info (e.g. on_frac) in
the binding of the get_state() RPC
- client: move client_start_time and previous_uptime
    from CLIENT_STATE to TIME_STATS,
    so that these are also visible in GUI RPC
- scheduler RPC: move uptime and previous_uptime
    into <time_stats>
- client: condition an RR simulation message on <rrsim_detail>
- boinccmd: show TIME_STATS info in --get_state
2013-03-01 16:08:52 +01:00
David Anderson 1db61a208c - Client/manager: if a GPU app is suspended because a GPU-exclusive
app is running, show an appropriate message.


svn path=/trunk/boinc/; revision=26128
2012-09-20 06:09:02 +00:00
David Anderson 32a08d27d9 - C++ code: use MAXPATHLEN for char arrays that hold paths
svn path=/trunk/boinc/; revision=25659
2012-05-09 16:11:50 +00:00
David Anderson d5bf5c46e3 - Manager: in Project Properties page,
show if a GPU type is excluded by configuration
- client: don't fetch work for a resource type if all instances
    of that type are excluded
- web: don't use filter_var(, FILTER_SANITIZE_STRING)
    to strip HTML tags from a string.
    This escapes singles quotes also.
    Use strip_tags() instead.


svn path=/trunk/boinc/; revision=25375
2012-03-04 04:58:41 +00:00
David Anderson 7c3bc68a05 - API, client, and Manager: add an optional "reason" argument to
boinc_temporary_exit(),
        explaining why the app is exiting.
        Convey this to the client, and then to the Manager,
        and display it there and in the log.

    clientgui/
        MainDocument.cpp
    lib/
        gui_rpc_client_ops.cpp
        gui_rpc_client.h
    api/
        boinc_api.cpp,h
    client/
        client_types.cpp,h
        app.h
        app_control.cpp

svn path=/trunk/boinc/; revision=25315
2012-02-22 22:56:05 +00:00
David Anderson 721493bf29 - Manager/Client: fix bugs in GUI RPC that prevented
updates to proxy info from being saved by client


svn path=/trunk/boinc/; revision=25297
2012-02-20 21:32:26 +00:00
David Anderson 7e48057f44 - client/Manager/GUI RPC: clean up RPC stuff involving
resource-specific backoff and exclusion

    Old: client writes
            <rsc_backoff_time>
            <rsc_backoff_interval>
            <no_rsc_ams>
            <no_rsc_apps>
            <no_rsc_pref>
        in GUI RPC entries for projects.
        Manager (GUI RPC client): PROJECT struct has
            cpu_backoff_time
            cpu_backoff_interval
            ... cuda, ati
            no_cpu_pref
            ... cuda, ati
        and it parses tags of these names.
        In other words, no information is being conveyed
        from client to Manager.

    New:
        manager parses both forms


svn path=/trunk/boinc/; revision=25217
2012-02-08 01:39:01 +00:00
David Anderson d281e43d6a - update_versions: for gzipped files,
send the size of the compressed file as well.
- client: parse and write the compressed size (FILE_INFO::gzipped_nbytes).
    For get_transfer GUI RPCs, if it's a compressed download send
    the compressed size.
    That way the manager will show the fraction done correctly.


svn path=/trunk/boinc/; revision=25152
2012-01-26 08:39:51 +00:00