aboutsummaryrefslogtreecommitdiffstats
path: root/dashboard/app/handler.go
Commit message (Collapse)AuthorAgeFilesLines
* dashboard/app: add support for AI workflowsDmitry Vyukov2026-01-051-2/+6
| | | | | | | | Support for: - polling for AI jobs - handling completion of AI jobs - submitting job trajectory logs - basic visualization for AI jobs
* all: use any instead of interface{}Dmitry Vyukov2025-12-221-1/+1
| | | | Any is the preferred over interface{} now in Go.
* dashboard/app: allow to set spanner context only from testsTaras Madan2025-05-051-6/+1
| | | | getSpannerClient returns prod client as a default.
* dashboard/app: pre-gzip all responsesTaras Madan2025-02-051-26/+97
|
* dashboard/app: test coverage /file linkTaras Madan2025-01-271-0/+3
| | | | | | | | 1. Init coveragedb client once and propagate it through context to enable mocking. 2. Always init coverage handlers. It simplifies testing. 3. Read webGit and coveragedb client from ctx to make it mockable. 4. Use int for file line number and int64 for merged coverage. 5. Add tests.
* dashboard/api: log trace id and return it to the clientTaras Madan2024-11-041-5/+7
| | | | It allows to later get all the associated records in logs explorer.
* dashboard/app: introduce authorized PublicAccessTaras Madan2024-10-241-1/+2
|
* dashboard/app: don't limit requests for the authenticated usersTaras Madan2024-10-091-3/+5
|
* dashboard/app/api.go: handleAPI can return less 5xx errorsTaras Madan2024-07-241-10/+15
|
* dashboard/app: make coverage menu and page optionalTaras Madan2024-07-041-0/+2
|
* all: fix up context import after go fixDmitry Vyukov2024-04-261-1/+1
|
* all: go fix everythingDmitry Vyukov2024-04-261-1/+1
|
* dashboard/app/handler.go: explain throttling rules on 429Taras Madan2024-04-241-1/+2
|
* dashboard/app: backpressure robotsTaras Madan2024-04-221-0/+30
| | | | | | Single threaded curl and wget are Ok to use. Current logic returns 429 client err requiring users to rate limit requests. Let's add backpressure to guarantee acceptable request rate.
* dashboard: don't print error on high memcache contentionAleksandr Nogikh2023-11-221-1/+4
| | | | | At peak load times, it can be expected that CAS will require too many iterations. There's no reason to report it as an error.
* dashboard: throttle incoming requestsAleksandr Nogikh2023-11-031-0/+39
| | | | | To ensure service stability, let's rate limit incoming requests to our web endpoints.
* dashboard: remove too granular config helpersAleksandr Nogikh2023-10-121-2/+2
| | | | | Now that we mock the config as a whole and not parts of it, these functions have boiled down to 1-liners. We don't need them anymore.
* dashboard: introduce a getNsConfig() helperAleksandr Nogikh2023-10-121-1/+1
| | | | | In many cases we want to just access the namespaces's config. Introduce a special helper function to keep code shorter and more conscise.
* dashboard: access config through contextAleksandr Nogikh2023-10-121-6/+6
| | | | | | | | | | | | | | | | | | | | | We used to have a single global `config` variable and access it throughout the whole dashboard application. However, this approach has been more and more complicated test writing -- sometimes we want the config to be only slightly different, so that it's not worth it adding new namespaces, sometimes we have to test how dashboard handles config changes over time. This has already led to a number of hacky contextWithXXX methods that mocked various parts of the global variable. The rest of the code had to sometimes still use `config` directly and sometimes invoke getXXX(c) methods. This is very inconsistent and prone to errors. With more and more situations where we need to patch the config appearing (see #4118), let's refactor the application to always access config via the getConfig(c) method. This allows us to uniformly patch the config and be sure that the non-patched copy is not accessible from anywhere else.
* dashboard: display backport listsAleksandr Nogikh2023-08-231-0/+2
| | | | | | | Add a per-namespace page that contains: 1) The list of commits to backport from the trees fuzzed in that namespace. 2) The list of commits to backport into the namespace.
* all: use errors.As instead of .(type)Taras Madan2023-07-241-2/+3
|
* dashboard: fix the Config.Decommissioned raceAleksandr Nogikh2023-07-181-1/+1
| | | | | | | | | | Race detector reports a race between dashboard/app/reporting_test.go:1102 and dashboard/app/handler.go:183 Fix this by storing decommission updates in the context rather than by directly modifying the global config variable.
* dashboard: let users see decommissioned namespacesAleksandr Nogikh2023-04-201-3/+3
| | | | | Still don't show them in the header, but at least serve all direct links to the bugs of a decommissioned namespace.
* dashboard: use refrence as the current URL keyAleksandr Nogikh2023-02-241-3/+3
| | | | It's more common to do so that to pass a string.
* dashboard: add a feedback buttonAleksandr Nogikh2023-02-211-0/+2
|
* dashboard: display the subsystem listAleksandr Nogikh2023-02-171-0/+2
| | | | Take the counts from the cache, include links to the filtered bug views.
* dashboard: cache per-subsystem statsAleksandr Nogikh2023-02-171-2/+2
| | | | For each subsystem, collect the number of open, fixed and invalid bugs.
* dashboard: display subsystems in bug listsAleksandr Nogikh2023-01-271-0/+11
| | | | | To generate filtering URLs, use the ability of context.Context to carry on variable values.
* dashboard/app: return 4xx instead of 5xx for user requestsTaras Madan2022-05-131-3/+21
| | | | | | | | * dashboard/app: return 4xx instead of 5xx for user requests 5xx category signals the Internal Server Errors and require server developers attention. 4xx category means client side problem and doesn't require server developers attention. Added tests.
* dashboard/app: fix reported error depth (#3138)Taras Madan2022-05-131-1/+2
| | | Lets report templates.ExecuteTemplate() issue too.
* dashboard/app: update to go116 (#2959)Taras Madan2022-01-051-3/+3
| | | | | | 1. Updated the "include"s. 2. No logs read API in the AppEngine anymore. Replaced by the GCP logging API. 3. Use "GO111MODULE=off gcloud beta app deploy ./dashboard/app/app.yaml --no-promote" to test new deployment. 4. Updated the documentation.
* dashboard/app: hide decommissioned items (#2902)Taras Madan2021-12-011-0/+3
| | | | Currently we show the decommissioned namespaces. Lets hide this information to let users focus on more actionable things.
* dashboard/app: cache per-namespace bug statsDmitry Vyukov2020-07-091-0/+6
| | | | | | | We used to show number of fixed bugs at the top of the main page. However, now with the button nagivation, "fixed" is shown on every page. Fetching and processing all bugs on every page would be unwise. Cache these stats in memcache. It will be useful to show more stats in future.
* dashboard/app: add navigation buttonsDmitry Vyukov2020-07-091-0/+2
| | | | | | Currently we have only "fixed" link at the top of the page. "invalid" is missing and this is not scalable. Add natigation buttons (tabs) for main pages.
* dashboard/app: fix linter warningsDmitry Vyukov2020-04-291-5/+0
|
* dashboard/app: remove old namespace redirectsDmitry Vyukov2020-04-291-25/+0
| | | | | | We kept redirects from old URLs for more than a year. It's time to remove them. Old links, if they still exist, need to be updated sooner or later.
* dashboard: update to go111 runtimeAndrew Donnellan2020-01-291-1/+1
| | | | | | | | | The old go 1.9 App Engine runtime is now deprecated. Update to the go 1.11 runtime, which still allows us to use the old App Engine library (removed in the 1.12 runtime). Closes: #1461 ("dashboard: port app to go111/go112 runtime") Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
* dashboard/app: don't log errors that can be caused by bad user requestsDmitry Vyukov2019-10-251-2/+6
|
* dashboard/app: fix error wrappingDmitry Vyukov2019-09-191-3/+3
| | | | | | The current code does not do what it's supposed to do. Converting error to error is always true. Properly wrap errors.
* dashboard/app: fix cookie caching and redirectsDmitry Vyukov2019-04-121-3/+5
| | | | | | | | Set expiration date for the cookie, otherwise it should be dropped on browser restart. Use http.StatusFound(302) instead of http.StatusMovedPermanently(301) for redirects. Browsers can cache 301 redirects, which we don't want.
* dashboard/app: fix login redirectsDmitry Vyukov2019-04-101-12/+17
| | | | | | | Login redirects broke because we failed to generate common header. This wasn't noticed because we use client redirects and there is no easy way to test them. Fix redirects and use server redirect and test this behavior.
* dashboard/app: split dashboard per-namespaceDmitry Vyukov2019-04-081-5/+137
| | | | | | | We now have too many namespaces and bugs. Main page takes infinity to load. Also almost nobody is interested in more than 1 namespace. So split main page per-namespaces.
* dashboard/app: add admin pageDmitry Vyukov2019-04-051-0/+2
| | | | | | Add /admin page and move logs, jobs, manager onto it. The main page is too overloaded and takes too long to load. We need to start splitting it. This is a first step.
* syz-manager: modernize web UIDmitry Vyukov2018-11-221-85/+2
| | | | | | | | | | | | 1. Use dashboard style. 2. Allow sorting of tables. 3. Show old crashes in grey. 4. Use tables instead of text output for more pages. 5. Show corpus inputs on a separate page to allow copy-pasting. 6. Use standard JS sorting instead of custom bubble sort (much faster). 7. Fix off-by one in table sorting. Fixes #694
* dashboard/app: tidy up UIDmitry Vyukov2018-09-201-0/+9
| | | | | | | Don't show maintainers for crashes if we don't have them (only linux has). Show short git hashes for kernel/syzkaller, 40 chars looks excessive (full hash is in hint). Show current build kernel/syzkaller git hash in managers table. Remove fuzzing time from managers table (does not seem too useful).
* dashboard/app: use CCYY/MM/DD hh:mm formatDmitry Vyukov2018-07-021-1/+1
| | | | | | | | | | Since dateSort does not take years into account, Time field of long-standing bugs is not sorted correctly. Also, it will become more useful to include year of closed date after we operate the dashboard for some years. Thus, this patch changes the format of formatTime method, and use textSort for sorting. Based on patch by Tetsuo Handa.
* dashboard/app: use links instead of attachments in emailsDmitry Vyukov2018-03-251-35/+0
| | | | | As per discussion at: https://groups.google.com/d/msg/syzkaller/zYlQ-b-QPHQ/AJzpeObcBAAJ
* dashboard/app: reduce noise is error logDmitry Vyukov2018-03-221-1/+5
|
* dashboard/app: add support for Google AnalyticsDmitry Vyukov2018-03-211-10/+16
|
* dashboard/app: don't log un-signed-in users as errorsDmitry Vyukov2018-03-201-3/+2
| | | | | | Un-signed-in users are redirected to login page. And maybe they have access after sign-in. Otherwise the error will be logged aftger sign-in.