Commit graph

277 commits

Author SHA1 Message Date
Martin W. Kirst
14177635b6
Update swagger API specification (#1782)
# Summary

This PR drops the outdated former swagger.yaml/json and introduced
automatic API document generation from Go code.
The generated code is also used to generate documentation/markdown for
the community page,
as well as enable the Woodpecker server to serve a Swagger Web UI for
manual tinkering.

I did opt-in for gin-swagger, a middleware for the Gin framework, to
ease implementation and have a sophisticated output.
This middleware only produces Swagger v2 specs. AFAIK the newer OpenApi
3x tooling is not yet that mature,
so I guess that's fine for now.

## Implemenation notes

- former swagger.json files removed
- former // swagger godocs removed
- introduced new dependency gin-swagger, which uses godoc annotations on
top of Gin Handler functions.
- reworked Makefile to automatically generate Go code for the server
- introduce new dependency go-swagger, to generate Markdown for
documentation purposes
- add a Swagger Web UI, incl. capabilities for manual API exploration
- consider relative root paths in the implementation
- write documentation for all exposed API endpoints
- incl. API docs in the community website (auto-generated)
- provide developer documentation, for the Woodpecker authors
- no other existing logic/code was intentionally changed

---------

close #292

---------

Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
Co-authored-by: 6543 <6543@obermui.de>
2023-06-03 21:38:36 +02:00
Weblate
71d7a467f9 Translated using Weblate (German)
Currently translated at 100.0% (310 of 310 strings)

Co-authored-by: admin <owners@woodpecker-ci.org>
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/de/
Translation: Woodpecker CI/UI
2023-06-01 14:58:12 +00:00
Anbraten
c464f857ae
Remove unused file system api (#1791)
Co-authored-by: 6543 <6543@obermui.de>
2023-05-31 18:03:03 +02:00
6543
f5a85d21be
Drop ".drone.yml" as default pipeline config (#1795)
it did make sense to have it still supported within v0.15.0,

but as we move future away and with the release of v1.0.0
we should not give the appearance of still support the original drone
v0.8 config
2023-05-31 16:02:20 +02:00
Weblate
9b3929b7fa Translated using Weblate (French)
Currently translated at 100.0% (310 of 310 strings)

Co-authored-by: Michael <misc+weblatewoodp@zarb.org>
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/fr/
Translation: Woodpecker CI/UI
2023-05-28 16:58:09 +00:00
runephilosof-karnovgroup
ca32517624
PipelineLog.vue: Make it possible to link to a log line (#1775)
Set id attribute of lines to make it possible to link to a pipeline
line, like it was in version 0.9. For instance
https://woodpecker.example.com/org/repo/1#L7
2023-05-28 11:38:27 +03:00
Weblate
5a8e8e2891 Translated using Weblate (Italian)
Currently translated at 29.3% (91 of 310 strings)

Co-authored-by: Andrea Zucchelli <zukka77@gmail.com>
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/it/
Translation: Woodpecker CI/UI
2023-05-26 22:58:13 +00:00
Weblate
dd644da3cc Translated using Weblate (Polish)
Currently translated at 100.0% (310 of 310 strings)

Co-authored-by: Marcin Puc <tranzystorek.io@protonmail.com>
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/pl/
Translation: Woodpecker CI/UI
2023-05-23 14:58:08 +00:00
Anbraten
cfb53cb995
Redirect to new pipeline (#1761)
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2023-05-17 19:33:28 +02:00
Weblate
4504677233 Translated using Weblate (Russian)
Currently translated at 100.0% (310 of 310 strings)

Translated using Weblate (Indonesian)

Currently translated at 100.0% (310 of 310 strings)

Co-authored-by: Leonid Maslakov <root@lcomrade.su>
Co-authored-by: Linerly <linerly@protonmail.com>
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/id/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/ru/
Translation: Woodpecker CI/UI
2023-05-16 13:18:22 +00:00
qwerty287
02913fa7b6
Add reset token button (#1755)
Closes #696
2023-05-14 18:48:33 +02:00
Weblate
3b07054731 Translated using Weblate (Portuguese)
Currently translated at 21.3% (66 of 309 strings)

Co-authored-by: Marco De Araujo <marco.araujo.junior@gmail.com>
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/pt/
Translation: Woodpecker CI/UI
2023-05-07 15:18:19 +00:00
Weblate
21a2fcbc38 Translated using Weblate (Polish)
Currently translated at 100.0% (309 of 309 strings)

Translated using Weblate (French)

Currently translated at 100.0% (309 of 309 strings)

Translated using Weblate (Latvian)

Currently translated at 100.0% (309 of 309 strings)

Co-authored-by: Michael <misc+weblatewoodp@zarb.org>
Co-authored-by: mondstern <mondstern@monocles.de>
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/fr/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/lv/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/pl/
Translation: Woodpecker CI/UI
2023-05-04 18:18:22 +00:00
Weblate
ad2acdc0e5 Translated using Weblate (Indonesian)
Currently translated at 100.0% (309 of 309 strings)

Co-authored-by: Linerly <linerly@protonmail.com>
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/id/
Translation: Woodpecker CI/UI
2023-05-04 03:13:14 +00:00
Weblate
5874da73d3 Translated using Weblate (Russian)
Currently translated at 100.0% (309 of 309 strings)

Co-authored-by: Leonid Maslakov <root@lcomrade.su>
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/ru/
Translation: Woodpecker CI/UI
2023-04-30 16:18:19 +00:00
6543
f3074ddaf9
Some small code refactorings (#1727)
Refactorings taken from pull requests #1722 and #1725
2023-04-30 17:02:47 +02:00
qwerty287
0f9188597e
Initiate Pagination Implementation for API and Infinite Scroll in UI (#1651)
- Add pagination support to the API endpoints that return lists of items
- Adjust UI to enable infinite scrolling via pagination
2023-04-30 03:40:13 +02:00
qwerty287
b90e7904a5
Support path prefix (#1714)
closes #1636 
closes #1429
supersedes #1586

Uses a different approach: just take the index.html compiled by vite and
replace the paths to js and other files using regex. This is not
compatible with the dev proxy which is also the reason why we can't use
go templates for this.
2023-04-29 17:51:50 +02:00
Weblate
4384344c22 Translated using Weblate (German)
Currently translated at 100.0% (309 of 309 strings)

Co-authored-by: Michael <misc+weblatewoodp@zarb.org>
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/de/
Translation: Woodpecker CI/UI
2023-04-29 13:30:33 +00:00
Weblate
8b66f982ae Translated using Weblate (German)
Currently translated at 100.0% (309 of 309 strings)

Co-authored-by: 6543 <6543@obermui.de>
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/de/
Translation: Woodpecker CI/UI
2023-04-29 13:28:42 +00:00
qwerty287
cfdb32ae45
Fully support .yaml (#1713)
Follow-up to https://github.com/woodpecker-ci/woodpecker/pull/1388
Closes https://github.com/woodpecker-ci/woodpecker/issues/1073

---------

Co-authored-by: 6543 <6543@obermui.de>
2023-04-29 10:12:36 +02:00
Weblate
5833236b84 Translated using Weblate (Ukrainian)
Currently translated at 70.5% (218 of 309 strings)

Co-authored-by: mondstern <mondstern@monocles.de>
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/uk/
Translation: Woodpecker CI/UI
2023-04-23 21:07:41 +00:00
Weblate
f7df4506ab Translated using Weblate (Chinese (Simplified))
Currently translated at 59.8% (185 of 309 strings)

Co-authored-by: lzw-723 <lzw-723@qq.com>
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/zh_Hans/
Translation: Woodpecker CI/UI
2023-04-18 15:08:24 +00:00
Weblate
0fb978fa98 Translated using Weblate (Portuguese)
Currently translated at 11.9% (37 of 309 strings)

Co-authored-by: Adjamilton Junior <jr@handzon.dev>
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/pt/
Translation: Woodpecker CI/UI
2023-04-04 11:08:24 +00:00
Weblate
49e5f77631 Added translation using Weblate (Portuguese)
Co-authored-by: Adjamilton Junior <jr@handzon.dev>
2023-04-03 10:33:08 +00:00
Lauris BH
6bf72cbeaf
Update pnpm lock file version (#1688)
Fixes CI fronted failure
https://ci.woodpecker-ci.org/woodpecker-ci/woodpecker/pipeline/5309/7

Also update frontend dependecies
2023-04-02 13:03:23 +02:00
Weblate
e408c1ba27 Translated using Weblate (Russian)
Currently translated at 100.0% (309 of 309 strings)

Translated using Weblate (Indonesian)

Currently translated at 100.0% (309 of 309 strings)

Co-authored-by: Leonid Maslakov <root@lcomrade.su>
Co-authored-by: Linerly <linerly@protonmail.com>
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/id/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/ru/
Translation: Woodpecker CI/UI
2023-03-26 07:08:16 +00:00
Weblate
e7ca28026b Translated using Weblate (French)
Currently translated at 100.0% (309 of 309 strings)

Translated using Weblate (German)

Currently translated at 100.0% (309 of 309 strings)

Translated using Weblate (Latvian)

Currently translated at 100.0% (309 of 309 strings)

Translated using Weblate (Russian)

Currently translated at 100.0% (308 of 308 strings)

Translated using Weblate (Indonesian)

Currently translated at 100.0% (308 of 308 strings)

Translated using Weblate (Latvian)

Currently translated at 100.0% (308 of 308 strings)

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Leonid Maslakov <root@lcomrade.su>
Co-authored-by: Linerly <linerly@protonmail.com>
Co-authored-by: Michael <misc+weblatewoodp@zarb.org>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: qwerty287 <ndev@web.de>
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/de/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/fr/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/id/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/lv/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/ru/
Translation: Woodpecker CI/UI
2023-03-24 18:22:14 +00:00
Jany
3a5e912a6e
Use i18n-t instead of v-html directive (#1676)
Use i18n-t component to avoid v-html directive
and to make localization easier
2023-03-24 09:13:46 +01:00
qwerty287
0970f35df5
Do not store inactive repos (#1658)
Do not sync repos with forge if the repo is not necessary in DB.

In the DB, only repos that were active once or repos that are currently
active are stored. When trying to enable new repos, the repos list is
fetched from the forge instead and displayed directly. In addition to
this, the forge func `Perm` was removed and is now merged with `Repo`.

Solves a TODO on RepoBatch.

---------

Co-authored-by: Anbraten <anton@ju60.de>
2023-03-21 23:01:59 +01:00
Weblate
7c56d7246d Translated using Weblate (Russian)
Currently translated at 100.0% (302 of 302 strings)

Translated using Weblate (German)

Currently translated at 100.0% (302 of 302 strings)

Co-authored-by: Leonid Maslakov <root@lcomrade.su>
Co-authored-by: qwerty287 <ndev@web.de>
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/de/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/ru/
Translation: Woodpecker CI/UI
2023-03-21 16:31:32 +00:00
qwerty287
88d2486ab2
Various UI improvements (#1663)
https://github.com/woodpecker-ci/woodpecker/issues/1314#issuecomment-1475128683

https://github.com/woodpecker-ci/woodpecker/issues/1314#issuecomment-1477858832
(2.)

and the last two tasks from
https://github.com/woodpecker-ci/woodpecker/issues/1314#issue-1418804461

---------

Co-authored-by: Anbraten <anton@ju60.de>
2023-03-21 17:31:24 +01:00
Anbraten
f13ffc2c8f
Save agent-id for tasks and add endpoint to get agent tasks (#1631)
Save which agent is running a task. This is now visible in the admin UI
in the queue and in the agent details screen.

# changes
- [x] save id of agent executing a task
- [x] add endpoint to get tasks of an agent for #999 
- [x] show assigned agent-id in queue
- [x] (offtopic) use same colors for queue stats and icons (similar to
the ones used by pipelines)
- [x] (offtopic) use badges for queue labels & dependencies


![image](https://user-images.githubusercontent.com/6918444/226541271-23f3b7b2-7a08-45c2-a2e6-1c7fc31b6f1d.png)
2023-03-21 15:10:43 +02:00
Weblate
60733c5cb9 Translated using Weblate (Russian)
Currently translated at 100.0% (295 of 295 strings)

Translated using Weblate (German)

Currently translated at 100.0% (295 of 295 strings)

Translated using Weblate (Indonesian)

Currently translated at 100.0% (285 of 285 strings)

Translated using Weblate (Latvian)

Currently translated at 100.0% (285 of 285 strings)

Translated using Weblate (German)

Currently translated at 100.0% (285 of 285 strings)

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Leonid Maslakov <root@lcomrade.su>
Co-authored-by: Linerly <linerly@protonmail.com>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: qwerty287 <ndev@web.de>
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/de/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/id/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/lv/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/ru/
Translation: Woodpecker CI/UI
2023-03-20 20:17:56 +00:00
6543
e28b43ab19
Only inject netrc to trusted clone plugins (#1352)
Co-authored-by: qwerty287 <ndev@web.de>
Co-authored-by: 6543 <6543@obermui.de>
2023-03-20 21:17:49 +01:00
Lauris BH
7870c29f5f
Implement visual display of queue statistics (#1657)
Light mode:

![attels](https://user-images.githubusercontent.com/165205/226354030-5769ddce-3727-441a-8ecb-c6cc3cf70529.png)

Dark mode:

![attels](https://user-images.githubusercontent.com/165205/226353854-51b2da0a-b35a-4f61-bf28-e21179164a05.png)
2023-03-20 18:08:53 +01:00
Anbraten
2337f1854a
Add queue details UI for admins (#1632)
# Changes
- Adds an admin view to see the whole work-queue of the server. 
- The admin can also pause / resume the queue. 
- The view is reloading data every 5 seconds automatically.
- The task model from queue got removed in favor of the one from models.
2023-03-20 04:50:56 +01:00
Lauris BH
4d5c59556e
Update frontend dependencies (#1655)
Also fixes bug that wrong message is displayed when updating user
2023-03-20 00:07:18 +01:00
Weblate
e74c256571 Translated using Weblate (Russian)
Currently translated at 100.0% (282 of 282 strings)

Translated using Weblate (Indonesian)

Currently translated at 100.0% (282 of 282 strings)

Translated using Weblate (German)

Currently translated at 100.0% (282 of 282 strings)

Co-authored-by: Leonid Maslakov <root@lcomrade.su>
Co-authored-by: Linerly <linerly@protonmail.com>
Co-authored-by: qwerty287 <ndev@web.de>
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/de/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/id/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/ru/
Translation: Woodpecker CI/UI
2023-03-19 12:53:04 +00:00
qwerty287
ade8e6d010
Various fixes and improvements (#1643)
- allow repo names to be case-insensitive
- improve backend error handling on DB get errors (record not found ->
404, else -> 500)
- replace magic numbers of http response codes
- unify the look and feel of cancel / save buttons on forms and view
them in one line

---------

Co-authored-by: Lauris BH <lauris@nix.lv>
2023-03-19 13:52:58 +01:00
qwerty287
42a115e19e
Add PR pipeline list (#1641)
Instead of viewing PR pipelines in the branches lists, add a separate
list for them. The API endpoint for PRs supports pagination (thus I
added a lot of pagination-related stuff), the UI doesn't yet though.


![wp](https://user-images.githubusercontent.com/80460567/226099133-bb4935d6-c357-4d73-8465-9157e25c0d82.png)

Closes #1619 

Extends this part of #1640

---------

Co-authored-by: Anbraten <anton@ju60.de>
2023-03-19 10:43:57 +01:00
Weblate
51168db9fd Translated using Weblate (Russian)
Currently translated at 100.0% (264 of 264 strings)

Translated using Weblate (Indonesian)

Currently translated at 100.0% (264 of 264 strings)

Translated using Weblate (French)

Currently translated at 100.0% (264 of 264 strings)

Translated using Weblate (German)

Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Leonid Maslakov <root@lcomrade.su>
Co-authored-by: Linerly <linerly@protonmail.com>
Co-authored-by: Michael <misc+weblatewoodp@zarb.org>
Co-authored-by: qwerty287 <ndev@web.de>
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/de/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/fr/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/id/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/ru/
Translation: Woodpecker CI/UI
2023-03-18 20:49:18 +00:00
Anbraten
25e2c8055c
UI improvements (#1640) 2023-03-18 21:49:12 +01:00
Anbraten
277a839157
Add users UI for admins (#1634)
Co-authored-by: Lauris BH <lauris@nix.lv>
2023-03-18 21:21:20 +01:00
qwerty287
af2ef30205
Fix button margin if button doesn't have text (#1642) 2023-03-18 12:00:49 +01:00
Anbraten
e98601df91
Correct pipeline loading (#1639)
closes #1583
2023-03-18 06:04:53 +01:00
6543
7e3bf2202c
Return 404 if pipeline not exist and handle 404 errors in WebUI (#1627) 2023-03-17 02:10:51 +01:00
Anbraten
1947408eba
Fix panel height (#1629) 2023-03-16 13:00:41 +01:00
Weblate
97605cfb46 Translated using Weblate (Finnish)
Currently translated at 4.5% (12 of 263 strings)

Translated using Weblate (Russian)

Currently translated at 100.0% (263 of 263 strings)

Translated using Weblate (Indonesian)

Currently translated at 100.0% (263 of 263 strings)

Translated using Weblate (French)

Currently translated at 100.0% (263 of 263 strings)

Translated using Weblate (Spanish)

Currently translated at 23.5% (62 of 263 strings)

Translated using Weblate (German)

Currently translated at 82.1% (216 of 263 strings)

Co-authored-by: Leonid Maslakov <root@lcomrade.su>
Co-authored-by: Linerly <linerly@protonmail.com>
Co-authored-by: Michael <misc+weblatewoodp@zarb.org>
Co-authored-by: Skyler Mäntysaari <sm+woodpecker-ci@skym.fi>
Co-authored-by: Yoel nunez <y.nunez@floms.com>
Co-authored-by: qwerty287 <ndev@web.de>
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/de/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/es/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/fi/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/fr/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/id/
Translate-URL: http://translate.woodpecker-ci.org/projects/woodpecker-ci/ui/ru/
Translation: Woodpecker CI/UI
2023-03-08 06:30:13 +00:00
Weblate
2697663180 Added translation using Weblate (Finnish)
Co-authored-by: Skyler Mäntysaari <sm+woodpecker-ci@skym.fi>
2023-03-06 08:01:25 +00:00