Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
6f0004b
Updates the Bazel version for Travis CI.
helfrichmichael Dec 20, 2018
869f1bd
Removing pagination and adding button to show more results on both sh…
adrianotressino Dec 21, 2018
80d4895
Fixes an issue where a BigQuery stream attempt would throw an excepti…
waltermeyer Jan 4, 2019
439a81c
Disables analytics on DEV and QA tracks. PROD is now the only channel…
helfrichmichael Jan 7, 2019
00474c0
Disables autocomplete on input fields for device identifiers.
helfrichmichael Jan 7, 2019
d112723
*Adjusts the capitalization in "Mark as Repaired" to "Mark as repaired".
helfrichmichael Jan 7, 2019
ac9ecce
*Removed assigned/unassigned device chips since these are redundant.
helfrichmichael Jan 7, 2019
8be8b9c
Fixes the markAsDamaged method on the frontend service to prevent dup…
helfrichmichael Jan 7, 2019
51459ef
*Adds the long format to the date pipe for the shelf details.
helfrichmichael Jan 7, 2019
0b48d32
Adds a list() method to the model and API to fetch all tags and adds …
aftrant Jan 7, 2019
5373a11
*Introduces a debug view for the Chrome App.
helfrichmichael Jan 8, 2019
3236eab
Fix properties initializing on webapp.
adrianotressino Jan 9, 2019
fe09f57
Cleaning up device model tests to remove unused attribute and small r…
aftrant Jan 10, 2019
7252c39
*Adds a debug button to the Chrome App's Troubleshoot page.
helfrichmichael Jan 10, 2019
20db3c4
Strips white-space out of asset tag and serial number identifiers on …
aftrant Jan 10, 2019
585628c
Adjusts the reindex and clear of search index to be placed in a queue…
Sasho11 Jan 10, 2019
c762fa2
*Disables the capacity check for audits on the frontend.
helfrichmichael Jan 11, 2019
48550f9
Internal change
helfrichmichael Jan 11, 2019
95091e0
*Adjusts the hover behavior for mat-row's on shelf_list_table and dev…
helfrichmichael Jan 11, 2019
4df6e92
*Adds logic to the toApiMessage to check for if a shelf is defined or…
helfrichmichael Jan 14, 2019
cc52ad3
Adds a Tag model to represent Tags, a service to interact between the…
Runn3rsHigh Jan 14, 2019
81a465f
Adds a task for sending emails using taskqueue. Currently some of the…
Sasho11 Jan 15, 2019
b03d29e
*Fixed our usage of width on the OU diagram.
helfrichmichael Jan 16, 2019
90c2f3b
Internal refactor
a-googler Jan 18, 2019
35c1ef6
Internal refactor
a-googler Jan 26, 2019
571007c
Internal refactor
a-googler Jan 26, 2019
be7840c
Internal refactor
a-googler Jan 26, 2019
29c1aaa
Fixes an issue where the filters to list devices on device_list_table…
Sasho11 Jan 28, 2019
2809c14
Modifies the config model to open the yaml file only when needed and …
Sasho11 Jan 31, 2019
e2912b7
Updates the tag model create and update methods to raise exceptions i…
waltermeyer Feb 1, 2019
d7c77a8
Adds a check for protected tags to ensure that they are not deleted v…
waltermeyer Feb 1, 2019
1b1ea77
Internal refactor
a-googler Feb 1, 2019
bbcac89
Adds destroy method for deleting tags. Updates create method's parame…
Runn3rsHigh Feb 4, 2019
966eee7
Internal change.
helfrichmichael Feb 26, 2019
763e38f
Rollback to be re-submitted under original author.
aftrant Mar 4, 2019
3438dac
Adds update functionality to the bootstrap library.
waltermeyer Mar 4, 2019
4b20040
Moving calculate_return_dates logic into the device model.
aftrant Mar 4, 2019
fc8563e
Internal change.
helfrichmichael Mar 4, 2019
6985a94
Adds an offset parameter into the list method on the Tag API and the …
aftrant Mar 5, 2019
e787b35
Modifying the TagData object to include the tag entity instead of the…
aftrant Mar 5, 2019
12c2bd0
Increasing decimal places limit of lat/long/alt fields from 1 to 9.
adrianotressino Mar 7, 2019
8160e35
internal cleanup
a-googler Mar 11, 2019
d73786f
Configure the application to serve static maintenance page to regular…
Sasho11 Mar 11, 2019
829b459
Modifies the bootstrap endpoints APIs to support application updates.
waltermeyer Mar 12, 2019
5732795
Updates the frontend bootstrap UI to distinguish between an update an…
waltermeyer Mar 12, 2019
4de9730
Replace default_python_version with python_version.
a-googler Mar 13, 2019
6540e85
Adds associate and disassociate tag methods to the device model.
aftrant Mar 18, 2019
f6138e0
Adds a check to the root api on initialization for maintenance mode. …
Sasho11 Mar 20, 2019
cacb232
*Fixes the OSS tests.
helfrichmichael Mar 27, 2019
a20741c
Fixes link in README
cupajoe24 Apr 10, 2019
a63b4c3
Update Bazel version on Travis
cupajoe24 Apr 10, 2019
776a486
Fixes mistyped unit tests, spelling issues, and updates device and se…
sstenchever Jun 17, 2019
3407dc9
-Fixes TypeScript typo
cupajoe24 Jun 17, 2019
b0b3259
explicitly pass type argument to function accepting generic
a-googler Aug 2, 2019
cef7ecb
Revert prior commit. The publishing pipeline broke and combined
Sep 25, 2019
33b0903
Raises device_audit event and if it encounters an error it raises Dev…
jomeiny Aug 5, 2019
09d6aea
Fleet model to support multiple organization deployments.
a-googler Aug 8, 2019
0ba092a
Added verbose description for why shelf auditing is enabled/disabled
mikepellegreenbeans Aug 13, 2019
8843e26
Internal change.
waltermeyer Aug 15, 2019
f52701c
Moves web_app's frontend from webpack configs to bazel
cdavidnt Aug 17, 2019
789a80b
Remove unnecessary dependency.
a-googler Aug 22, 2019
83e87a6
Create a return dialog for when the return button is pressed on the w…
helfrichmichael Aug 27, 2019
fd78758
Fixes an issue with template compilation with missing Injectable deco…
waltermeyer Sep 2, 2019
706fcd6
Update deprecated Python test method aliases.
a-googler Sep 4, 2019
e376314
Moved Optional Customizations out into their own article. Updated ins…
sarahlinnl Sep 5, 2019
2e59e1a
Internal refactor
a-googler Sep 17, 2019
e6217d7
Internal refactor
a-googler Sep 17, 2019
e781dad
This change remediates an issue in the configuration template where w…
helfrichmichael Sep 18, 2019
3db07ec
Added get_device_info which returns historical data of a loaner device.
a-googler Sep 27, 2019
3e13317
Internal refactor
a-googler Sep 30, 2019
88f61bc
Internal change.
helfrichmichael Sep 30, 2019
f6a3f28
Moves web_app's frontend from webpack configs to bazel
helfrichmichael Oct 2, 2019
9ed6de9
*Updates NPM dependencies to latest stable version.
helfrichmichael Oct 4, 2019
843c8b4
Changes the default heartbeat logic to check the loaner's current idl…
helfrichmichael Oct 4, 2019
ab5e35d
Internal change.
helfrichmichael Oct 7, 2019
227b519
Internal change.
helfrichmichael Oct 7, 2019
07e5e1a
Provide Chrome idle API access. This is required for the heartbeat al…
helfrichmichael Oct 8, 2019
d031a47
Internal refactor
a-googler Oct 15, 2019
228db4b
Add the device_audit core event back to the bootstrap.yaml file to en…
helfrichmichael Oct 16, 2019
9cdccf9
Internal refactor
a-googler Oct 18, 2019
d4a224f
Internal cleanup
sstenchever Oct 18, 2019
702d2a6
Internal refactor
a-googler Oct 26, 2019
3c68fb3
Communicate Loan Health
a-googler Oct 28, 2019
d89d770
Streams the Chrome App version for all loans to Google Analytics for …
helfrichmichael Oct 29, 2019
faf22f7
CHANGE: Introduce release track based analytics.
helfrichmichael Oct 30, 2019
168cbff
Introduce new API to complete onboarding flow.
adrianotressino Nov 4, 2019
d6b0885
Converted `gng_impl` from PY2 to PY3
a-googler Nov 5, 2019
f55d49b
default due date will not suggest weekends
aalanis-prof Nov 6, 2019
565e0f5
Internal cleanup.
adrianotressino Nov 6, 2019
a0672f4
Updates to BigQuery version 1.21
cupajoe24 Nov 6, 2019
372e475
Introduce new API to complete onboarding flow.
adrianotressino Nov 19, 2019
d33f18c
CHANGE: Implement a permission check on the shelf buttons for adding …
helfrichmichael Nov 19, 2019
b468c52
Updates Bazel WORKSPACE to pull correct version of Bigquery.
cupajoe24 Nov 19, 2019
5f898ff
CHANGE: Fix the OSS build of the Frontend/Chrome App.
helfrichmichael Nov 20, 2019
1b61f5f
Updates the Travis Bazel sha
cupajoe24 Nov 22, 2019
16df9a5
Web app base model was adapted to Python 3.
a-googler Feb 28, 2020
e843978
Internal change
a-googler Mar 6, 2020
a67c890
Disables the plant image in the Chrome App temporarily due to it over…
helfrichmichael Mar 8, 2020
3e106fb
Rollback Fleet Model Changes
aalanis-prof Mar 9, 2020
9eebbc0
Internal change
a-googler Mar 14, 2020
d609471
Use better assertion methods.
a-googler Mar 20, 2020
5b81c3a
Fix bug on extend loaner view where datepicker was displaying one day…
adrianotressino Mar 23, 2020
318e9ba
Internal change
a-googler Mar 23, 2020
d978b4b
CHANGE: Fix the health status icon for the Web App externally.
helfrichmichael Mar 24, 2020
c612e9d
CHANGE: Deprecate placeholder app and adjust guidance for new Chrome …
helfrichmichael Mar 27, 2020
5860a7e
CHANGE: Change the guidance to use master for new deployments for now.
helfrichmichael Mar 27, 2020
f3585bf
This change is designed to optimize passing arguments to format dates…
a-googler Mar 31, 2020
24f9a9e
CHANGE: Set Travis CI to update apt before installing packages. This …
helfrichmichael Apr 1, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ dist: trusty
addons:
chrome: stable
apt:
update: true
sources:
- google-chrome
packages:
Expand All @@ -16,10 +17,10 @@ matrix:
- "2.7"
before_install:
# Install bazel.
- wget https://github.com/bazelbuild/bazel/releases/download/0.11.1/bazel_0.11.1-linux-x86_64.deb
- echo f3df344b16a40d4233a7606cce38869d4df3bb35296ac2f4e18838566ae3cb48 bazel_0.11.1-linux-x86_64.deb | sha256sum -c
- sudo dpkg -i bazel_0.11.1-linux-x86_64.deb
- rm bazel_0.11.1-linux-x86_64.deb
- wget https://github.com/bazelbuild/bazel/releases/download/0.26.1/bazel_0.26.1-linux-x86_64.deb
- echo c0b2b676ca7cc071a98f969aefb4a9d4b7db1858b7340d9db6f8076179e776cd bazel_0.26.1-linux-x86_64.deb | sha256sum -c
- sudo dpkg -i bazel_0.26.1-linux-x86_64.deb
- rm bazel_0.26.1-linux-x86_64.deb
script:
- ./backend_tests.sh $GROUP $TOTAL_GROUPS
env:
Expand Down
49 changes: 40 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,52 @@ The program is comprised of three parts:
* A Google App Engine (GAE) application
* A Chrome App that runs on each Chrome OS device

## Important notice about Chrome Apps!
**Note:** [Chrome Apps are being phased out in favor of extensions and progressive web apps](https://blog.chromium.org/2020/01/moving-forward-from-chrome-apps.html)

**If you haven't yet deployed Grab and Go to the Chrome Web Store**

Enterprise/EDU customers can continue to deploy Chrome Apps to the Chrome
Web Store using the guidance we've provided (specifically unlisted/private
hosting in the Chrome Web Store) in the documentation for the forseeable future.

**If you have deployed Grab and Go to the Chrome Web Store**

You should be in good shape for now! Existing Enterprise/EDU Chrome Apps (Grab
and Go included) are not in-scope until June 2022 according to the announcement
linked above.

## Current release: [Alpha (v0.7.1a)](https://github.com/google/loaner/tree/Alpha-(0.7.1))

**Note: If you are doing a new deployment please deploy from master as we work
on cutting a new release. For current deployments, please hold off on upgrading
until we can test the next numbered release.**

Please note that the current release of this application is in ALPHA.
We will be actively contributing to the project. Please keep an eye out for
future updates and features!

To clone this release run the following command:

**Note:** To build this project you must install Bazel 0.26. Currently
Bazel 0.27 or later is unsupported.

To use the **latest code (also known as master)**, run the following
command:

```
git clone -b Alpha-\(0.7\) https://github.com/google/loaner.git
git clone https://github.com/google/loaner.git
cd loaner
```

* To discuss this project send an email to [email protected].
To use release number **0.7.1**, run the following command:

```
git clone -b Alpha-\(0.7.1\) https://github.com/google/loaner.git
cd loaner
```

* To discuss this project send an email to [email protected]. Please note
that this group is public (anyone can view/post).
* Read more about releases in our [release notes](docs/release_notes.md).
* Please file bugs using the GitHub issue tracker.

Expand Down Expand Up @@ -66,12 +98,11 @@ cd loaner
To deploy and configure the Grab n Go (GnG) Loaner project, follow the steps
below.

1. [Setup the Web
Application](docs/setup_guide.md)
1. [Deploy the Grab n Go Chrome
App](docs/deploy_chrome_app.md)
1. [Configure your G Suite
Environment](docs/gsuite_config.md)
+ [Part 1: Create necessary accounts and computer environments](docs/gngsetup_part1.md)
+ [Part 2: Set up the GnG web app](docs/gngsetup_part2.md)
+ [Part 3: Deploy the Grab n Go Chrome app](docs/gngsetup_part3.md)
+ [Part 4: Configure the G Suite Environment](docs/gngsetup_part4.md)


#### Reference Documentation

Expand Down
85 changes: 57 additions & 28 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -154,25 +154,57 @@ http_archive(
],
)

http_archive(
name = "futures_archive",
build_file = "//third_party:futures.BUILD",
sha256 = "9ec02aa7d674acb8618afb127e27fde7fc68994c0437ad759fa094a574adb265",
strip_prefix = "futures-3.2.0",
urls = [
"https://files.pythonhosted.org/packages/1f/9e/7b2ff7e965fc654592269f2906ade1c7d705f1bf25b7d469fa153f7d19eb/futures-3.2.0.tar.gz",
],
)

bind(
name = "futures",
actual = "@futures_archive//:futures",
)

# NOTE: workaround for pkg_resources import issue with gcloud_bigquery.
http_archive(
name = "setup_tools_archive",
build_file = "//third_party:setup_tools.BUILD",
sha256 = "47881d54ede4da9c15273bac65f9340f8929d4f0213193fa7894be384f2dcfa6",
strip_prefix = "setuptools-40.2.0",
urls = [
"http://mirror.bazel.build/pypi.python.org/packages/source/s/six/setuptools-40.2.0.zip",
"https://pypi.python.org/packages/source/s/setuptools/setuptools-40.2.0.zip",
],
)

http_archive(
name = "gcloud_bigquery_archive",
build_file = "//third_party:gcloud_bigquery.BUILD",
sha256 = "6e8cc6914701bbfd8845cc0e0b19c5e2123649fc6ddc49aa945d83629499f4ec",
strip_prefix = "google-cloud-bigquery-0.25.0",
sha256 = "aed2b1d4db1e21d891522d6d6bb14476e6ba58c681cbb68eeb42c168a4e3fda9",
strip_prefix = "google-cloud-bigquery-1.1.0",
urls = [
"https://mirror.bazel.build/pypi.python.org/packages/4a/f1/05631b0a29b1f763794404195d161edb24d7463029c987e0a32fc521e2a6/google-cloud-bigquery-0.25.0.tar.gz",
"https://pypi.python.org/packages/4a/f1/05631b0a29b1f763794404195d161edb24d7463029c987e0a32fc521e2a6/google-cloud-bigquery-0.25.0.tar.gz",
"https://mirror.bazel.build/files.pythonhosted.org/packages/24/f8/54a929bc544d4744ef02cee1c9b97c9498d835445608bf2d099268ed8f1c/google-cloud-bigquery-1.1.0.tar.gz",
"https://files.pythonhosted.org/packages/24/f8/54a929bc544d4744ef02cee1c9b97c9498d835445608bf2d099268ed8f1c/google-cloud-bigquery-1.1.0.tar.gz",
],
)

bind(
name = "gcloud_bigquery",
actual = "@gcloud_bigquery_archive//:gcloud_bigquery",
)

http_archive(
name = "gcloud_core_archive",
build_file = "//third_party:gcloud_core.BUILD",
sha256 = "1249ee44c445f820eaf99d37904b37961347019dcd3637dbad1f3173260245f2",
strip_prefix = "google-cloud-core-0.25.0",
sha256 = "89e8140a288acec20c5e56159461d3afa4073570c9758c05d4e6cb7f2f8cc440",
strip_prefix = "google-cloud-core-0.28.1",
urls = [
"https://mirror.bazel.build/pypi.python.org/packages/58/d0/c3a30eca2a0073d5ac00254a1a9d259929a899deee6e3dfe4e45264f5187/google-cloud-core-0.25.0.tar.gz",
"https://pypi.python.org/packages/58/d0/c3a30eca2a0073d5ac00254a1a9d259929a899deee6e3dfe4e45264f5187/google-cloud-core-0.25.0.tar.gz",
"https://mirror.bazel.build/files.pythonhosted.org/packages/22/f0/a062f4d877420e765f451af99045326e44f9b026088d621ca40011f14c66/google-cloud-core-0.28.1.tar.gz",
"https://files.pythonhosted.org/packages/22/f0/a062f4d877420e765f451af99045326e44f9b026088d621ca40011f14c66/google-cloud-core-0.28.1.tar.gz",
],
)

Expand Down Expand Up @@ -278,23 +310,30 @@ http_archive(

http_archive(
name = "io_bazel_rules_appengine",
sha256 = "3cc3963d883c06d953181c28ce8c32ad4720779fca22a36891fc54ffb41c32d0",
strip_prefix = "rules_appengine-edee76dd6892c1af75ad4166c1d3f709d240daf5",
url = "https://github.com/bazelbuild/rules_appengine/archive/edee76dd6892c1af75ad4166c1d3f709d240daf5.tar.gz",
sha256 = "b5b3c964e7dba92ab2a80857519ef3a8c599c4fc3e84094ea112ec34cfe4b2e2",
url = "https://github.com/bazelbuild/rules_appengine/archive/0.0.9.tar.gz",
strip_prefix = "rules_appengine-0.0.9",
)

load(
"@io_bazel_rules_appengine//appengine:sdk.bzl",
"appengine_repositories",
)

appengine_repositories()


load(
"@io_bazel_rules_appengine//appengine:py_appengine.bzl",
"py_appengine_repositories"
)

py_appengine_repositories()

http_archive(
name = "io_bazel_rules_python",
sha256 = "8b32d2dbb0b0dca02e0410da81499eef8ff051dad167d6931a92579e3b2a1d48",
strip_prefix = "rules_python-8b5d0683a7d878b28fffe464779c8a53659fc645",
url = "https://github.com/bazelbuild/rules_python/archive/8b5d0683a7d878b28fffe464779c8a53659fc645.tar.gz",
sha256 = "9a3d71e348da504a9c4c5e8abd4cb822f7afb32c613dc6ee8b8535333a81a938",
strip_prefix = "rules_python-fdbb17a4118a1728d19e638a5291b4c4266ea5b8",
url = "https://github.com/bazelbuild/rules_python/archive/fdbb17a4118a1728d19e638a5291b4c4266ea5b8.tar.gz",
)

load("@io_bazel_rules_python//python:pip.bzl", "pip_repositories", "pip_import")
Expand Down Expand Up @@ -469,23 +508,13 @@ http_archive(
],
)

http_archive(
name = "setup_tools_archive",
build_file = "//third_party:setup_tools.BUILD",
sha256 = "6501fc32f505ec5b3ed36ec65ba48f1b975f52cf2ea101c7b73a08583fd12f75",
strip_prefix = "setuptools-38.4.0",
urls = [
"https://pypi.python.org/packages/41/5f/6da80400340fd48ba4ae1c673be4dc3821ac06cd9821ea60f9c7d32a009f/setuptools-38.4.0.zip",
],
)

http_archive(
name = "six_archive",
build_file = "//third_party:six.BUILD",
sha256 = "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9",
strip_prefix = "six-1.11.0",
sha256 = "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a",
strip_prefix = "six-1.14.0",
urls = [
"https://pypi.python.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz",
"https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz",
],
)

Expand Down
13 changes: 5 additions & 8 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
# Grab n Go Loaners


To deploy and configure the Grab n Go (GnG) Loaner project, follow the steps
below.
To deploy and configure the Grab n Go (GnG) Loaner project:

1. [Setup the Web
Application](setup_guide.md)
1. [Deploy the Grab n Go Chrome
App](deploy_chrome_app.md)
1. [Configure your G Suite
Environment](gsuite_config.md)
+ [Part 1: Create necessary accounts and computer environments](gngsetup_part1.md)
+ [Part 2: Set up the GnG web app](gngsetup_part2.md)
+ [Part 3: Deploy the Grab n Go Chrome app](gngsetup_part3.md)
+ [Part 4: Configure the G Suite Environment](gngsetup_part4.md)

#### Reference Documentation

Expand Down
140 changes: 140 additions & 0 deletions docs/customizations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
### (Optional) Customize GnG Settings

*Default Configurations* are those options you can configure when GnG is
running. The default values for these options are defined in
`loaner/web_app/config_defaults.yaml`. After first launch, GnG stores these
values in [Cloud Datastore](https://cloud.google.com/datastore/). You can change
settings without deploying a new version of GnG:

+ **allow_guest_mode**: Allow users to use guest mode on loaner devices.
+ **loan_duration**: The number of days to assign a device.
+ **maximum_loan_duration**: The maximum number of days a loaner can be
loaned.
+ **loan_duration_email**: Send a duration email to the user.
+ **reminder_email_throttling**: Do not send emails to a user when a reminder
appears in the loaner's Chrome app.
+ **reminder_delay**: Number of hours after which GnG will send a reminder
email for a device identified as needing a reminder.
+ **shelf_audit**: Enable shelf audit.
+ **shelf_audit_email**: Whether email should be sent for audits.
+ **shelf_audit_email_to**: List of email addresses to receive a notification.
+ **shelf_audit_interval**: The number of hours to allow a shelf to remain
unaudited. Can be overwritten via the audit_interval_override property for a
shelf.
+ **responsible_for_audit**: Group that is responsible for performing an audit
on a shelf.
+ **support_contact**: The name of the support contact.
+ **org_unit_prefix**: The organizational unit to be the root for the GnG
child organizational units.
+ **audit_interval**: The shelf audit threshold in hours.
+ **sync_roles_query_size**: The number of users for whom to query and
synchronize roles.
+ **anonymous_surveys**: Record surveys anonymously (or not).
+ **use_asset_tags**: To require asset tags when enrolling new devices, set as
True. Otherwise, set as False to only require serial numbers.
+ **img_banner_**: The banner is a custom image used in the reminder emails
sent to users. Use the URL of an image you have stored in your GCP Storage.
+ **img_button_**: The button images is a custom image used for reminder
emails sent to users. Use the URL of an image you have stored in your GCP
Storage.
+ **timeout_guest_mode**: Specify that a deferred task should be created to
time out guest mode.
+ **guest_mode_timeout_in_hours**: The number of hours to allow guest mode to
be in use.
+ **unenroll_ou**: The organizational unit into which to move devices as they
leave the GnG program. This value defaults to the root organizational unit.
+ **return_grace_period**: The grace period (in minutes) between a user
marking a device as pending return and when we reopen the existing loan.

### (Optional) Customize Images for Button and Banner in Emails

You can upload custom banner and button images to
[Google Cloud Storage](https://cloud.google.com/storage/) to use in the emails
sent by the GnG.

To do this, upload your custom images to Google Cloud Storage via the console by
following
[these instructions](https://cloud.google.com/storage/docs/cloud-console).

Name your bucket and object something descriptive, e.g.
`https://storage.cloud.google.com/[BUCKET_NAME]/[OBJECT_NAME]`.

The recommended banner image size is 1280 x 460 and the recommended button size
is 840 x 140. Make sure the `Public Link` checkbox is checked for both of the
images you upload to Cloud Storage.

Next, click on the image names in the console to open the images and copy their
URLs. Take these URLs and populate them as values for the variables
`img_banner_primary` and `img_button_manage` in the `config_defaults.yaml` file.

### (Optional) Customize Events and Email Templates in the GnG Datastore

This YAML file contains the event settings and email templates that the
bootstrap process imports into Cloud Datastore after first launch:

`loaner/web_app/backend/lib/bootstrap.yaml`

#### Core Events

Core events (in the `core_events` section) are events that GnG raises at runtime
when a particular event occurs. For example, the assignment of a new device or
the enrollment of a new shelf. The calls to raise events are hard-coded and the
event names in the configuration YAML file must correspond to actions defined in
the `loaner/web_app/backend/actions` directory.

Specifically, each event can be configured in the datastore to call zero or more
actions and these actions are defined by the modules contained in the
`loaner/web_app/backend/actions` directory. Each of these actions will be run as
an
[App Engine Task](https://cloud.google.com/appengine/docs/standard/python/taskqueue/),
which allows them to run asynchronously and not block the processing of GnG.

While GnG contains several pre-coded actions, you can also add your own. For
example, you can add an action as a module in the
`loaner/web_app/backend/actions` directory to interact with your organization's
ticketing or inventory system. If you do this, please be sure to add or remove
the actions in the applicable events section in the YAML file.

When bootstrapping is complete, this YAML will have been imported and converted
into Cloud Datastore entities — you'll need to make further changes to those
entities.

#### Custom Events

Custom events (in the `custom_events` section) are events that GnG raises as
part of a regular cron job. These events define criteria on the Device and Shelf
entities in the Cloud Datastore. GnG queries the Datastore using the defined
criteria and raises Action tasks, just as it does for Core events.

The difference is that GnG uses the query to determine which entities require
these events. For example, you can specify that Shelf entities with an audit
date of more than three days ago should trigger an email to a management team
and run the corresponding actions that are defined for that event.

The custom events system can access the same set of actions as core events.

#### Reminder Events

Reminder events (in the `reminder_events` section) define criteria for device
entities that trigger reminders for a user. For example, that their device is
due tomorrow or is overdue. These events are numbered starting with 0. You can
customize the events as need be.

**Note**: If you customize any event, be sure to change the neighboring events,
too. Reminder events must not overlap with each other. If so, reminders may
provide conflicting information to borrowers.

The reminder events system can access the same set of actions as core and custom
events.

#### Shelf Audit Event

Shelf audit events (in the `shelf_audit_events` section) are events that are
triggered by the shelf audit cron job. GnG runs a single Shelf audit event by
default, but you can add custom events as well.

#### Email Templates

The `templates` section contains a base email template for reminders, and
higher-level templates that extend that base template for specific reminders.
You can customize the templates.
Loading