Commit graph

1911 commits

Author SHA1 Message Date
James Polley
a45e44a1f6 Merge branch 'notification_help' into 'master'
Correct list of tags available in notification templates.

See merge request LCA2018/symposion_app!25
2017-09-16 12:25:01 +00:00
James Polley
f4d6fd1db4 Merge branch 'tabindex-for-hack' into 'master'
Don't tab stop on Hack links in proposal creation

See merge request LCA2018/symposion_app!13
2017-09-16 12:23:14 +00:00
James Polley
6e17b6d13d Remove jquery.history.js reference
* This reference was added in the very distant past
* But jquery.history.js itself has never been in the repo
* pyconau-2017 team resolved the dilemma but dropping
  jquery.history.js into the repo
* But as near as I can tell, this does nothing except in obsolete
  older browsers. The fact that it's been broken ever since it was
  "added" is highly suggestive of it never having ever been used or
  needed
* So, trim the fat. It's possible that this might break an older
  browser that needs the functionality jquery.history.js provides -
  except that such a browser would *already* be broken because
  jquery.history.js has never actually been around to be used.
* If we ever do need this functionality, we can revert this
  change.. and then we'd have to drop in jquery.history.js. In that
  circumstance,
  https://github.com/pyconau2017/symposion/commit/34bc7c0 may be of interest.
2017-09-16 21:21:12 +10:00
James Polley
5a84a57420 Fix review buttons by removing stale compiled JS; also some styling
Essentially cognate with 0673e35 from the pyconau-2017 fork.
2017-09-16 20:55:10 +10:00
Sachi King
aec594c2f2 dj-gapc-storage fix for num_retries went upstream
Fix for an attribute error in this module has been merged upstream and
been released as 0.4.1

https://github.com/eldarion/django-gapc-storage/pull/17
2017-09-15 10:06:49 +10:00
James Polley
8962a1f66d Correct list of tags available in notification templates. 2017-09-14 20:50:54 +10:00
James Polley
7a4ddcee6d Merge branch 'restore_extra_script' into 'master'
restore extra_script

See merge request !24
2017-09-13 13:37:14 +00:00
James Polley
d0755eadf6 restore extra_script
This fell out of the template at some point, but is needed for some
javascripty things to work.
2017-09-13 23:10:30 +10:00
Sachi King
3c2c2543fd Revert "Don't populate inventory"
This reverts commit 0d06fc08eb.
2017-09-13 17:11:56 +10:00
James Polley
008c33a221 Merge branch 'dev_dockerfile' into 'master'
Add support for developers

See merge request !18
2017-09-03 07:51:25 +00:00
James Polley
37fb435e18 Add devmode_settings.py for local dev
* Adds an env variable to .env to turn on dev mode
* Uses the inbuilt django auth rather than saml when in dev mode
* For laziness, re-uses the admin login form for the non-admin login

make_dev_container now comes up ready to be logged into by any
user. No non-admin users are preconfigured; but you can add one at
http://localhost:28000/admin/auth/user/add/, log out, and then hit
http://localhost:28000/ to log in as the new user.
2017-08-28 17:12:05 +10:00
James Polley
0d06fc08eb Don't populate inventory 2017-08-28 17:12:03 +10:00
James Polley
fe8da10c22 make_dev_container
Expand on support for devs by scripting the process of creating,
starting, and initialising a dev container.

Take container name as an optional parameter
2017-08-28 17:11:10 +10:00
James Polley
fb5d0b8941 Create a dev docker container for makemigrations
* Adds a laptop-mode-env file which docker can read env variables from
* Adds a Dockerfile.makemigrations; mostly identical to the main
  Dockerfile. Important difference: instead of the source being copied
  into the docker image at build time, it's mounted from the local
  machine at run time.
* Adds a makemigrations shell script which builds an imagine using the
  Dockefile.makemigrations and then uses it to run makemigrations
* Because the source is mounted from the local machine, any new
  migrations created are dumped in the developer's git checkout ready
  for adding to git.

Rename .env -> docker/laptop-mode-env
2017-08-28 16:54:34 +10:00
Sachi King
855c71eaca Update testing fixtures to add admin users
This allows testing deployments to have accounts that can log in as
admin.
2017-08-16 14:51:29 +10:00
Sachi King
71a612baa4 Build dev container for ticket testing 2017-08-16 13:44:23 +10:00
James Polley
c93fa5d812 Merge branch 'transactify' into 'master'
Make review changes atomic

See merge request !22
2017-08-09 03:59:33 +00:00
James Polley
5114076afa Make review changes atomic
This follows from investigations in
https://rt.lca2018.org/Ticket/Display.html?id=283&results=eac0bd3c49f782d054f87d6b160ca36b;
in short, it seems that because this very long and complex method
creates several different objects at differnt times, the DB has been
getting out of sync; there are more votes recorded then there are
reviews, becuase the table that stores the vote count is updated
before the table that stores the vote and review information

This change is intended to make this operation (and the other
operations that the revew_detail handler performs) atomic, to prevent
things getting further out of step. It does *not* fix the existing
incosistency.

review_delete has been atomicified as well as it likely needs the same
treatment, but this has not been examined in detail.
2017-08-09 12:27:41 +10:00
James Polley
89cafa8aa1 Merge branch 'admin_reviews' into 'master'
Add reviews to admin interface

See merge request !21
2017-08-09 00:54:07 +00:00
James Polley
e63f7b7a7e Add reviews to admin interface 2017-08-09 10:35:16 +10:00
James Polley
7fe5a09bfb Return an integer for the slice index.
Resolves:

    File "/app/symposion_app/vendor/symposion/reviews/views.py", line 230, in review_random_proposal
    proposals = proposals[:(len(proposals) + 1) / 2]
    TypeError: slice indices must be integers or None or have an __index__ method
2017-08-08 23:00:36 +00:00
Sachi King
7b58bfafa6 Fix container name reference for deploy command
In the pod, the container is not called frontend
2017-08-08 18:36:47 +10:00
Sachi King
5a97c93861 Merge branch 'two-small-fixes' into 'master'
Two small fixes

See merge request !20
2017-08-08 06:51:11 +00:00
Steve Kowalik
dede5dec18 Correct some spelling in README
README had some typos, correct them.
2017-08-08 16:41:10 +10:00
Steve Kowalik
866217bf35 Switch score calculation to pure Python
Rip out the score expression madness, and calculate the score in Python,
since I hear that Python is better at math than SQL is.
2017-08-08 16:41:02 +10:00
Sachi King
084c78e2cd Fix score calculation hack
I have no idea why we do this in the database as some magic after we
call save().  I also have no idea why MySQL is seeming to think we want
type BIGINT UNSIGNED at the end of the
((2 * '+2' + '+1') - ( '-1' + 2 * '-2')) but it does.

Setting it to 2.0 or float(2) doesn't get the ORM to get this right, but
we are going to Decimal and making the 2 multiplier be of type Decimal
manages to make the ORM pull it's shit together and use something that
seems like we're okay with.

+1, -2 = 1 / 2 = -0.5 Score == True
Looks like it works.

UPDATE `symposion_reviews_proposalresult` SET `score` = CASE WHEN `symposion_reviews_proposalresult`.`vote_count` = 0 THEN '0' ELSE ((((2 * `symposion_reviews_proposalresult`.`plus_two`) + `symposion_reviews_proposalresult`.`plus_one`) - (`symposion_reviews_proposalresult`.`minus_one` + (2 * `symposion_reviews_proposalresult`.`minus_two`))) / (`symposion_reviews_proposalresult`.`vote_count` * 1)) END WHERE `symposion_reviews_proposalresult`.`id` = 1
2017-08-08 15:37:33 +10:00
Sachi King
e1ce26eb62 Cleanup more user exploitable input with bleach
My eyes hurt.  More user exploitable XSS on inputs.
2017-08-07 20:13:10 +10:00
Sachi King
ade44d6a1b Merge branch 'fix_speaker_Addittion_Template' into 'master'
{{ dashboard_url ]} fixup

See merge request !19
2017-08-07 01:53:24 +00:00
Sachi King
c32dbb2a07 Build an ephemeral dev container for rego testing
Create a ephemeral dev container to facilitate testing of
populate_inventory.  It can be created, tweeked in the admin interface,
files updated in admin's populate_inventory, then redeployed to deal
with those changes.

A branch based one will need to be created to so we can do this work
without polluting the master branch.
2017-08-07 11:50:03 +10:00
Sachi King
db1f3f9792 Improve image update workflow
This improves the administrative workflow of deploying updated images to
the k8s cluster.  Still tag latest however, as that's important to
old-workflow.

Would be good to block this and have it fail on a db migration so it
doesn't happen accidently, and make the deployer deal with it.
2017-08-07 11:30:11 +10:00
Sachi King
75c82aad37 Fix miniconf editing - No attribute issue
Editing a miniconf, on save, the code looks in settings for
ADMIN_USERNAMES, and as it does not exist, we stack-trace and 502 to the
user.

Add the attribute to settings.py
2017-08-04 15:19:32 +10:00
James Polley
473bc8efed {{ dashboard_url ]} fixup 2017-08-04 14:17:44 +10:00
Sachi King
5cc9f81d37 Merge branch 'fix_hobart' into 'master'
Travel assistance to sydney please

See merge request !17
2017-08-01 10:25:42 +00:00
James Polley
bba5649360 Travel assistance to sydney please
* Tweaks help_text to indicate that travel assistance is to Sydney
* Includes the required migration

This migration doesn't change the DB so it's safe to apply with the system live.
2017-07-31 22:48:49 +10:00
Bruce Crawley
56dc089d59 Merge branch 'review-order' into 'master'
Order by ID rather than at last update time

See merge request !16
2017-07-16 00:43:39 +00:00
Sachi King
5b4e1ec01d Revert "Removes speaker assistance options from the profile form."
This reverts commit 2aa0074bdc.
2017-07-16 00:21:10 +10:00
Sachi King
89e74a6f11 Order by ID rather than at last update time
The current ordering is based on what appears to be a random ordering
that happens to correlate to the last time the paper was submitted or
updated.  Oldest to most recent.

This changes it to submission order so ordering doesn't change and ID is
a static, making it easier to move through a list of papers.  "I last
looked at 24, so 25 is assured to be the next one I want to look at.

There's the thought of updated papers being looked at and voted on, but
it does not seem to me that this is supported or possible.  In general
one would look at their un-reviewed list, and go off it, which puts
updates out the window.

We can certainly order on other fields if desired, but this one makes
the most since to me.
2017-07-14 21:19:28 +10:00
Sachi King
565a90f618 Add a note to get the permission required for papers review
So not obvious...
2017-07-08 14:37:38 +10:00
Sachi King
31375f9e91 Remove default name from create_review_permssions
This was removed somewhere in 1.8, which means this results in a
failure.  If I understand correctly, this "name" is now derived from the
model name's __str__ or something like that.
2017-07-07 00:16:08 +10:00
Sachi King
e668bf03c2 Merge branch 'addfavicon' into 'master'
Change favicon to an LCA-appropriate favicon.

See merge request !14
2017-07-04 09:13:37 +00:00
Sachi King
38b231c5d9 Merge branch 'monospace-wrap' into 'master'
Fix word-wrap of monospace text

See merge request !15
2017-07-03 12:04:08 +00:00
Joel Addison
82450bfb42 Fix word-wrap of monospace text 2017-07-03 21:48:46 +10:00
Sachi King
7e5fbc27ea Syntax: How'd that get there 2017-07-03 21:29:16 +10:00
Sachi King
b85ab46ed4 Configure a production email server 2017-07-03 21:18:57 +10:00
James Polley
f990dfd212 Rename directory to match the calendar 2017-07-03 17:39:28 +10:00
James Polley
db328d9354 Change favicon to an LCA-appropriate favicon.
This isn't the same one we're using for the static site - but honestly I think this one is probably better.
2017-07-03 17:36:39 +10:00
Jamie Lennox
df78fec26a Don't tab stop on Hack links in proposal creation
It's really annoying when you are adding a proposal and you hit tab and
end up on the link to the Hack website. There's no need for this and at
least on newer browsers we can pretty easily skip the links for tab.

Unfortunately because this is model text it generates migrations. As we
know these migrations don't actually do anything, so they are annoying
but not actually harmful.
2017-07-02 22:52:53 +10:00
James Polley
13bed8999c Merge branch 'other-migrations' into 'master'
Other suggested django migrations

See merge request !12
2017-07-02 12:43:38 +00:00
James Polley
7710f334bd Merge branch 'miniconf-release' into 'master'
Add release materials check boxes to miniconf proposal

See merge request !11
2017-07-02 12:43:06 +00:00
Jamie Lennox
59207eb0c9 Other suggested django migrations
So django keeps strict synchronization between its code and migrations
so that it can help generating new migrations. These are the additional
suggested migrations. A lot of these are a null effect, some are things
like transforming an unsigned integer to a signed integer. So not super
urgent on a small scale, but worth doing to keep django happy.
2017-07-02 22:38:38 +10:00