Граф коммитов

60 Коммитов

Автор SHA1 Сообщение Дата
Daniel Smith a8f4155068
Add origin trials API key variable to server settings (#3213)
* Add OT API key variable to settings

* fix type hint

* Update settings.py

Co-authored-by: James C Scott III <jcscottiii@users.noreply.github.com>

* fix quotes

* Move api key function to secrets file

* Add key generation command and doc explanation

* remove OT_API_KEY from settings

* update global var

* Save API key in var to remove need to re-obtain

* logging change

---------

Co-authored-by: James C Scott III <jcscottiii@users.noreply.github.com>
2023-07-31 15:14:14 -07:00
Yann Dago f45f68ab52
Use chromedash-login-required-page for all components that require signin (#3070)
* Use chromedash-login-required-page for all components that require signin
2023-06-09 15:13:12 -04:00
Yann Dago ae90f406c5
Create new flow for creating enterprise features (#2775)
Remove the enterprise feature choice when creating a new feature.

Make enterprise feature creation accessible via url only.

Ensure only the enterprise fields are shown on the feature, edit and edit all pages for enterprise features.
2023-03-01 11:12:45 -05:00
Daniel Smith 26defeb307
Dev API unit tests (#2486)
* dev API unit tests

* code cleanup
2022-11-17 16:06:12 -08:00
Daniel Smith bdf12e24d9
Add dev API to write and delete test data (#2475)
* Write and delete data for dev environments

* Add 2nd feature entry

* write old Feature entities as well

* More thorough commenting

* Make sure endpoints can only be used locally

* update return statements

* devtrial_instructions is a link

* changes suggested by @jrobbins

* comment change
2022-11-16 22:48:38 -08:00
Daniel Smith 49fb21595d
Run mypy in Github continuous integration checks (#2324)
* run mypy in CI

* more type hint fixing

* Update requirements.txt

* google.cloud import workaround

https://github.com/python/mypy/issues/10360

* Revert "google.cloud import workaround"

This reverts commit e03dbc7bbeb67acc81f57b9c5d905b9141952dbc.

* mypy google.cloud workaround

https://github.com/python/mypy/issues/12985

* fix regular tests

* remove --install-types flag

* last mypy fix

* type fixes for address_reasons

* move email lists creation

* update for newly merged changes

* Fix regular tests

* Changes suggested by @jrobbins

* Catch invalid requests

* small type hint

* Change methods to properly override

* revert to previous implementation

* revert test

* add back original validate request type method

* remove unused import and rearrange methods

* remove comment string casting; add test back

* add ndb ignore

* Update test_html_rendering.html

* mypy fix

* remove merge addition
2022-10-24 06:40:21 -07:00
James C Scott III ad9ee9ae31
Remove all references to django (#2358)
* Remove all references to django

Replace any functionality with flask

* more cleanup

* fix template test after removing empty comment

* remove unused test_app
2022-10-19 13:51:39 -04:00
James C Scott III 969d016bd9
Remove inline_file. Use external links for js/css (#2348)
* Remove inline_file. Use external links for js/css

Refer to #2326 fo reasoning

Changes in this commit:

- Remove inline_file function
- For js: use script src=""
  - Due to this change, there were some minor tweaks:
    - change from VIEWS to global window.VIEWS in feature-page.js and features.html. This is so the external loaded feature-page.js can access the data loaded via templates. Before it was all inlined.
- For css: use link rel="stylesheet" href=""
- Add helper function "get_static_path" to get the path to the static folder

Part 1 of 2 to fix #2326

* Create helper function to avoid using global window

Create loadFeatureLegendViews to avoid having to change window.VIEWS

* Add version query parameter

* remove redundant get_static_path

* revert this change.

will fix this in the bigger testing PR when I will move the get_template_path function to the testing config.
It is not needed for the actual app. only needed for the unit tests
2022-10-17 16:09:18 -04:00
James C Scott III 9e35ea1353
Replace django templates for email with jinja2 templates (#2276)
* Replace django templates for email with jinja2 templates

This commit converts the email templates from django templates to jinja2
templates.

It also creates a new helper function: flask_compat_get_template_path

This function uses the existing configuration for django templates and
uses it to return a string used to locate the templates for jinja2.

Fixes #2030

* Add rendered test templates for email notifications

* ignore testdata folder for gcloud
2022-09-28 12:44:32 -04:00
Jason Robbins c6982a460f
Omit cookies for metrics data requests because of Vary: Cookie (#2268)
* Omit cookies for metrics data requests because of Vary: Cookie

* Also omit cookies for timeline data.
2022-09-26 14:25:20 -07:00
Jason Robbins 689483c0f3
Refactor user-related models into a separate file. (#2141) 2022-08-17 18:14:19 -07:00
Daniel Smith 8625cf3c61
Send reminders to verify accuracy of data before important milestones (#2078)
* accuracy notifications cron job

* send emails in staging environment

* Update templates/accuracy_notice_email.html

Co-authored-by: Joe Medley <jmedley@google.com>

* changes suggested by @jrobbins

* remove unnecessary type conversion

* typo fix

Co-authored-by: Joe Medley <jmedley@google.com>
2022-08-08 11:33:18 -04:00
Daniel Smith 8e42e5ca0c
Create scheduled DataStore backups. (#2021)
* create cron job to back up data

* use settings.py for referencing bucket names
2022-07-14 17:04:45 -07:00
Daniel LaLiberte 104ad2943d
Define and use chromedash-textarea. Use sl-input. (#1921)
* Define and use chromedash-textarea.  Use sl-input.

* Fix problems. Use setCustomValidity() as intended.

* Add tests of valid and invalid input.

* Add missing newline and remove extra space.
2022-06-12 15:47:13 -04:00
Jason Robbins 7ab852cb80
Implement posting review comments to blink-dev mailing list. (#1611)
* Implement posting review comments to blink-dev mailing list.

* Update internals/notifier.py

Co-authored-by: Kyle Ju <kyleju@google.com>

Co-authored-by: Kyle Ju <kyleju@google.com>
2021-11-22 14:41:00 -08:00
Jason Robbins a17119f915
Send smaller log lines (#1575)
* progress

* progress
2021-10-07 12:48:50 -07:00
Kyle Ju 9353bc4356
Set up GCL for python3 (#1573)
* Set up gcl

* move gcl to py3 only

* Update main.py
2021-10-05 15:15:47 -07:00
Jason Robbins a450fd02a0
Get inbound email and route it to py3 code for processing (#1561)
* wrote code

* Simplify and add tests

* Revert unneeded file

* Revert unneeded file

* Addressed review comments

* Made code more robust during unit testing

* Mock the needed response code
2021-09-28 14:57:37 -07:00
Jason Robbins ced88a5574
20210923 fix dev mode detection (#1558)
* Fix detection of DEV_MODE when running on local server.

* removed debugging import

* Avoid undefined GAE_ENV when running unit tests

* Check both py2 and py3 indications
2021-09-24 11:29:47 -07:00
Jason Robbins 527c49abed
Move routing configuration to main.py. (#1552)
* Move routing configuration to main.py.

* inline_file works so we dont need this directive

* rebased

* Removed __future__s
2021-09-23 13:01:43 -07:00
Kyle Ju b6bb10195a
Run 2to3 to detect py2 to py3 changes (#1551)
* Run 2to3 -w -n .

* Update internals/fetchmetrics.py

* Update internals/models.py

* Update internals/notifier.py

* Update pages/blink_handler.py

* Update internals/fetchmetrics.py
2021-09-22 18:23:14 -07:00
Jason Robbins 180b65d66f
Outline code for /myfeatures page. (#1481)
* Outline code for /myfeatures page.

* Update templates/myfeatures.html

Co-authored-by: Kyle Ju <kyleju@google.com>

Co-authored-by: Kyle Ju <kyleju@google.com>
2021-08-27 18:19:00 -07:00
Jason Robbins 62184a5643
Adjust logging level for py3. (#1449)
* Adjust logging level for py3.

* Only set log level when running on GAE

* Only set log level when not running unit tests
2021-08-09 18:29:19 -07:00
Jason Robbins e5abf1f21d
Remove banner for Google Sign-In. (#1314) 2021-05-11 11:27:12 -07:00
Jason Robbins 10058da34c
Add separate prod client_id and registered release candidate URLs. (#1313) 2021-05-07 14:03:08 -07:00
Jason Robbins 248c2c13fd
Fix tests as suggested by shivamag00. (#1309) 2021-05-06 17:29:03 -07:00
Jason Robbins acc908ab1d
Fix month for site banner (#1305)
* Implement site banner.  Set banner for Google Sign-In.

* Addressed review comments

* corrected month number
2021-05-05 13:16:34 -07:00
Jason Robbins ca1d31b0ea
Implement site banner. Set banner for Google Sign-In. (#1304)
* Implement site banner.  Set banner for Google Sign-In.

* Addressed review comments
2021-05-04 11:33:29 -07:00
Jason Robbins 0489cb959c
Remove some code left over from push notifications. (#1223) 2021-03-19 11:19:57 -07:00
Nikhil Saini 4eb610799f
Replaced app identity lib with env vars (#1207)
* Removed app identity lib for env vars

* Implemented requested changes

* changes with the use of UNIT_TEST_MODE

* Reverted chromedash-metadata.js
2021-03-18 10:58:32 -07:00
Jason Robbins 0c924bb9b1
Remove some unused files. (#1200) 2021-03-12 08:06:00 -08:00
Jason Robbins 28840790b5 Remove unneeded firebase environment variables 2021-02-24 16:31:01 -05:00
Jason Robbins 9cbc5345de Make metrics fetch more robust and debuggable. 2021-01-20 19:21:14 -05:00
Jason Robbins c610e44e99
Upgrade from GAE taskqueue to Google Cloud Tasks (#1141)
* Upgrade from GAE taskqueue to Google Cloud Tasks.

* added unit tests

* Add link to Monorail file that I referenced.

* Add grpcio to travis build

* Try installing grpcio locally first

* Try installing grpcio via sudo

* Try a smaller set of deps for travis.

* Debug travis config

* Avoided missing imports while running unit tests on travis

* Removed travis debugging lines
2021-01-15 15:50:36 -08:00
Jason Robbins be42854b03 Remove unneeded MEMCACHE_KEY_PREFIX and simplify other names. 2021-01-07 16:00:54 -05:00
Jason Robbins 80e526d72e Upgrade blink_handler.py and schedule.py to use flask. 2020-12-23 13:46:40 -05:00
Jason Robbins 6b1297d68a
Replace memcache with a RAM-based cache. (#1106)
* Replace memcache with a RAM-based cache.

* Addressed review comments
2020-12-10 17:04:48 -08:00
Jason Robbins cb9d596f43 [py3] Add import __future__ lines to all files and update print statements. 2020-12-01 14:18:14 -05:00
Jason Robbins 7284be9cfd
Implement unlisted features (#838)
* Implemented unlisted feature entries.

* added tests

* Reduce HTTP caching of JSON feeds.

* Use one space after period.

Co-authored-by: Jason Robbins <jrobbins@chromium.org>
2020-06-03 14:48:41 -07:00
Jason Robbins 5f030fb826
Implement settings page. (#796)
* Implement settings page.

* refactored and added tests

* Fix import ordering for tests

Co-authored-by: Jason Robbins <jrobbins@chromium.org>
2020-03-30 11:12:00 -07:00
Jason Robbins 7bbef314b2 Escalate bounces to an admin mailing list. 2020-03-13 17:16:07 -04:00
Jason Robbins c43054f228
Set up staging server, and send staging email to archive. (#765)
This is progress on issue #756.
2020-02-24 09:22:24 -08:00
Johnny Stenback c79240c32a Update django to 1.11 (LTS). #668
This updates django to the latest LTS version (1.11), and bumps the gulp
version while we're at it.
2019-08-14 11:59:14 -07:00
Eric Bidelman b23132f1fc Dep updates 2019-01-10 08:25:31 -08:00
Eric Bidelman f7dacf4b9c HTML emails to feature owners 2017-08-06 19:24:18 -07:00
Eric Bidelman 46f72420c7 Push notifications: sent to subscribers when feature is updated 2017-08-06 10:35:40 -07:00
Eric Bidelman 68bf99683f Make schedule public 2017-06-30 16:04:31 -07:00
Eric Bidelman 096fafa668 Email sent to owners for feature additions and updates 2017-06-30 16:04:31 -07:00
Eric Bidelman 5a7d0522e9 Perf: Cache django templates 2016-09-01 13:49:49 -07:00
Eric Bidelman 93acd5cf9d Cache json endpoints (#348)
* Faster first render

* Cache json endpoint requests. Fixes #298

* feedback
2016-07-19 14:53:25 -07:00