| OLD | NEW |
| 1 # Milo - The interface into luci. | 1 # Milo - The interface into luci. |
| 2 | 2 |
| 3 # Layout | 3 # Layout |
| 4 * frontend/ | 4 * frontend/ |
| 5 * milo.go - Main router and entry point into app. | 5 * milo.go - Main router and entry point into app. |
| 6 * static/ - CSS and JS assets. All assets go under a named subfolder. | 6 * static/ - CSS and JS assets. All assets go under a named subfolder. |
| 7 * templates/ - HTML assets for use with go templates. | 7 * templates/ - HTML assets for use with go templates. |
| 8 * resp/ - Response structs supported by Milo. | 8 * resp/ - Response structs supported by Milo. |
| 9 * swarming/ - Files related to scraping pages from swarming. | 9 * swarming/ - Files related to scraping pages from swarming. |
| 10 * testdata/ - Fake data for debug and testing goes here. | |
| 11 | 10 |
| 12 # Subdirectory layout | 11 # Subdirectory layout |
| 13 To retain convention, each data source (e.g. swarming, DM) should have the follo
wing files: | 12 To retain convention, each data source (e.g. swarming, DM) should have the follo
wing files: |
| 14 * html.go - All routable HTML endpoints of type handler. | 13 * html.go - All routable HTML endpoints of type handler. |
| 15 | 14 |
| 16 # Themes and Templates | 15 # Themes and Templates |
| 17 Milo supports the switching of themes (template bundles) based on user | 16 Milo supports the switching of themes (template bundles) based on user |
| 18 preference. Themes must follow these layouts: | 17 preference. Themes must follow these layouts: |
| 19 * Go Templates go under /frontend/templates/[[Theme Name]] | 18 * Go Templates go under /frontend/templates/[[Theme Name]] |
| 20 ** Base templates go under /frontend/templates/[[Theme Name]]/includes | 19 ** Base templates go under /frontend/templates/[[Theme Name]]/includes |
| 21 ** Actual templates go under /frontend/templates/[[Theme Name]]/pages | 20 ** Actual templates go under /frontend/templates/[[Theme Name]]/pages |
| 22 * Static resources (css, javascript, images, etc) go under | 21 * Static resources (css, javascript, images, etc) go under |
| 23 /frontend/static/[[Theme Name]]. This boundry isn't enforced, this is just by | 22 /frontend/static/[[Theme Name]]. This boundry isn't enforced, this is just by |
| 24 convention, so one theme is allowed to use resources in other themes (but it | 23 convention, so one theme is allowed to use resources in other themes (but it |
| 25 is not recommended) | 24 is not recommended) |
| 26 * Add the Theme Name into the map in /settings/theme.go:THEMES | 25 * Add the Theme Name into the map in /settings/theme.go:THEMES |
| 27 | 26 |
| 28 # Seeding data for local development | 27 # Seeding data for local development |
| 29 * After starting the dev_appserver, run go run cmd/backfill/main.go buildbot | 28 * After starting the dev_appserver, run go run cmd/backfill/main.go buildbot |
| 30 -master="chromium.win" -remote-url="localhost:8080" -dryrun=false | 29 -master="chromium.win" -remote-url="localhost:8080" -dryrun=false |
| 31 -buildbot-fallback=true (replace the port number with your dev_appserver port | 30 -buildbot-fallback=true (replace the port number with your dev_appserver port |
| 32 number) | 31 number) |
| OLD | NEW |