Commit Graph

3862 Commits

Author SHA1 Message Date
David Anderson b59f0da617 web: if web stopped, get_logged_in_user() should return null (not show error page).
Otherwise e.g. the home page will be a single line.
Must at least show message of the day.
2017-02-08 11:54:40 -08:00
David Anderson 51f73ebce8 web: fix typo 2017-02-03 21:56:53 -08:00
David Anderson 96eb775f06 web: make recaptcha work with IE11
On IE11, pages using recaptcha (like profile edit)
weren't showing the recaptcha.
On reloading, it would appear.
Mysterious.
Anyway, removing the
'<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" >
fixed the problem.
2017-02-03 21:42:20 -08:00
David Anderson 1b81fecfb3 web: fix recaptcha problem 2017-02-01 22:25:00 -08:00
David Anderson c2350c7f57 web: try to get Recaptcha working on IE 2017-02-01 22:13:21 -08:00
David Anderson dfeeee23da Web: support pages in a subdirectory of html/user/.
... such as SETI@home's Nebula pages.
Prepend URL_BASE to URLs for login/logout/signup.
I may have missed some.
2017-02-01 11:54:10 -08:00
David Anderson a68c2b3842 web: add form_attr(); add key/val pair to form 2017-01-31 21:51:17 -08:00
Christian Beer 624595267c Locale: Update localization files [skip ci] 2017-01-31 17:45:12 +01:00
David Anderson a484b7dd6b Merge pull request #1562 from BOINC/cpu_infos_aarch64
Client: improve CPU and OS detection on Linux
2017-01-31 01:12:55 -08:00
David Anderson bdd259660b remote job submission: fix typo 2017-01-30 16:51:31 -08:00
David Anderson f124bd33f2 remote job submission tweaks
- query_batches(): don't return retired batches
- get_output: for error conditions, return a file containing "ERROR: msg"
2017-01-30 16:31:33 -08:00
David Anderson 863ae7331a remote file management: fix typos found by Scrutinizer 2017-01-29 12:37:17 -08:00
David Anderson 0b6cb9e0d5 input file management: standardize creation of .md5 files
Files in the download dir can have accompanying ".md5" files
containing their MD5 and size.
This eliminates the need to calculate these when creating a job using the file.

The .md5 files were being created by stage_file (local staging)
but not by remote file management.
In fact, the latter wasn't checking for file immutability violations.

I changed remote file management to add this check,
and to create the .md5 file.
The latter is done in a new function shared with stage_file.
2017-01-29 11:54:18 -08:00
David Anderson 030069c36a remove job submission: don't require the presence of an input template file
If jobs specify their own input templates, shouldn't have to have one
2017-01-28 01:25:12 -08:00
David Anderson 23a43c7c5d remove file management: fixes; add python interface to query_files 2017-01-27 14:21:03 -08:00
David Anderson e2d09f3de7 remote job submission: bug fix 2017-01-27 12:35:35 -08:00
David Anderson e93e436b5a remote job submission: don't error out if no templates specified 2017-01-27 11:43:52 -08:00
David Anderson 27018ca2a8 remove file management: fix typos 2017-01-25 17:39:31 -08:00
David Anderson 01533dc9e4 remote file management: bug fixes
- The RPC handler was expecting the "BOINC names" to be the file MD5.
  This is no longer true; the BOINC name can be anything as long as it's unique.
- To reflect this, use <phys_name> instead of <md5> in request messages.
  This means that you'll need to update both RPC client and server software.
- BoincJobFile::insert() needed to return the insert ID
2017-01-25 16:17:42 -08:00
marius 91d6701cb3 fixed PHP warnings when submitting forum preferences 2017-01-24 14:02:51 +01:00
David Anderson b3995e20c0 web: add bootstrap checkbox function 2017-01-23 21:37:30 -08:00
David Anderson e95214371e remote job submission: typo fix 2017-01-21 12:32:02 -08:00
David Anderson 381e0caf14 Remote job submission: add support for per-job templates in submit requests
This supports the TACC use case,
in the jobs in a batch can use different Docker images
and different input and output file signatures,
none of which are known in advance.

Python API binding:
    - A JOB_DESC object can optionally contain wu_template and result_template
        elements, which are the templates (the actual XML) to use for that job.
        Add these to the XML request message if present.
    - Added the same capability to the PHP binding, but not C++.
    - Added and debugged test cases for both languages.

    Also, submit_batch() can take either a batch name (in which case
    the batch is created) or a batch ID
    (in which the batch was created prior to remotely staging files).

RPC handler:
    - in submit_batch(), check for jobs with templates specified
        and store them in files.
        For input templates (which are deleted after creating jobs)
        we put them in /tmp,
        and use a map so that if two templates are the same we use 1 file.
        For output templates (which have to last until all jobs are done)
        we put them in templates/tmp, with content-based filenames
        to economize.
    - When creating jobs, or generating SQL strings for multiple jobs,
        use these names as --wu_template_filename
        and --result_template_filename args to create_work
        (either cmdline args or stdin args)
    - Delete WU templates when done

create_work.cpp:
    handle per-job --wu_template and --result_template args in stdin job lines
    (the names of per-job WU and result templates).
    Maintain a map mapping WU template name to contents,
    to avoid repeatedly reading them.

    For jobs that don't specify templates, use the ones specified
    at the batch level, or the defaults.
2017-01-21 00:24:11 -08:00
David Anderson 58f437592d web: fixed URL of BOINCstats in 3 places 2017-01-14 21:47:45 -08:00
David Anderson 06be40e8f0 Web and web RPCs: add 5-second delay if password error
Slow down hackers trying to guess passwords
2017-01-12 13:19:01 -08:00
David Anderson 96ebcbff94 PHP binding of web RPCs: use Curl instead of file_get_contents()
That latter doesn't support HTTPS in my version of PHP
2017-01-12 13:17:55 -08:00
David Anderson 79fa97cfe3 web: if mkdir fails, show the path in error msg 2017-01-09 11:46:51 -08:00
Christian Beer 93cbda67fd Merge branch 'master' into cpu_infos_aarch64
Retained changes from a788dba8.

Conflicts:
	lib/str_util.cpp
2017-01-06 14:56:16 +01: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
David Anderson 6733529d29 Merge branch 'master' into cpu_infos_aarch64 2017-01-05 13:40:50 -08:00
David Anderson 5e858aca97 web: if project down for maintenance, say so and quit 2017-01-05 13:25:52 -08:00
Christian Beer 6d63f9cae5 Locale: Update localization files [skip ci]
Reverts some translation related changes made in 2435538, 3de9867 and f2c3963.
2017-01-03 12:12:31 +01:00
David Anderson 958c89c1e7 client: account per-project CPU and GPU usage; report to account managers
Also report per-project #jobs success/failure
2016-12-27 23:48:37 -08:00
David Anderson f3928622a8 web: fix bug in all-projects certificate: if only 1 project, error 2016-12-24 14:50:01 -08:00
David Anderson 0dda2fffa3 some PHP stuff for project X 2016-12-21 22:12:57 -08:00
David Anderson 6fa6af44d0 web: show message and PM previews in a panel 2016-12-19 17:16:49 -08:00
David Anderson ce213120de web: fix bug in project prefs; appearance tweaks
- editing resource shared wasn't working
- change sizes of controls to "input-sm"
- show errors correctly in project prefs
- move selection of project prefs from project_specific_prefs.inc
  to project.inc.
  This means that (unless you've added your own project prefs)
  you can update project_specific_prefs.inc from master, with no changes.

NOTE: projects will need to move their project prefs selections, e.g.
    define('COLOR_PREFS', false);
from project_specific_prefs.inc to project.inc.
Then copy project.sample/project_specific_prefs.inc to your project/
2016-12-19 15:47:52 -08:00
David Anderson cb5668a0d8 web: various appearance tweaks
policy change: when showing lists of name/value pairs in a table,
don't show the names with a different background color or font.
This is what Edward Tufte would call "noise".
Keep the visuals as simple as possible.
2016-12-19 01:15:48 -08:00
David Anderson d0b3a79a2c Merge branch 'master' of github.com:BOINC/boinc 2016-12-16 12:13:05 -08:00
David Anderson 91025d6b7a web: add utility functions for Bootstrap forms
Bootstrap forms require a bunch of <div>s and other stuff.
I wrapped these in functions like
form_start()
form_end()
form_submit()
form_select_multiple()
form_input_text()

General idea going forward:
put HTML (especially Bootstrap-specified) in utility functions,
e.g. in util.inc or bootstrap.inc.
This will make the higher-level code easier to read,
and will facilitate moving to CSS frameworks other than Bootstrap.
2016-12-16 12:05:30 -08:00
Christian Beer 539caba937 Web: fix string to be completely translatable 2016-12-15 14:38:43 +01:00
David Anderson b916f7bab2 BOINC web site: make it work on phones
The front page was displaying as 2 columns even on phones.
I couldn't figure out the problem, but I switched to the standard
page_head() (moving the top part to project_banner()) and that fixed it.
2016-12-11 00:11:45 -08:00
David Anderson 530160fe13 web: various tweaks
- reduce default button size to sm
- change color of blockquote bar
- put order select on same line as Sort button
2016-12-09 15:50:40 -08:00
David Anderson b327ec3789 web: bug fixes and improvements
- The table structure for message-board posts was messed up.  Simplify it.
- make buttons x-small
- make button text white
2016-12-09 00:44:26 -08:00
David Anderson 330a8aa95b web: fix column widths in several places 2016-12-07 18:46:11 -08:00
David Anderson 3641a319fc web: improve message display
In messages (forum or PM) a [pre] section with a long line
would stretch the table cell,
causing that message and others to run off the edge of the window.

The solution, as Juha pointed out, is to use table-layout:fixed
for those tables, and to explicitly set the width of the other columns.
This causes the long lines to be put in boxes with a horizontal scrollbar,
and nothing overflows.
2016-12-07 18:17:57 -08:00
David Anderson 5136e65719 web: language names (international and native) from language_names.inc
... rather than from the .po files.
2016-12-07 16:36:17 -08:00
David Anderson ea0b081239 web: fix PHP warning and scrutinizer warning 2016-12-07 12:59:52 -08:00
David Anderson c054358a6e web: tweaks to fix Scrutinizer complaints; few visible effects 2016-12-07 11:32:25 -08:00
David Anderson 391fcbe203 web: tweaks 2016-12-06 19:18:34 -08:00