Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Release Engineering
Public
distrobuild
Commits
0939fc27
Commit
0939fc27
authored
Feb 15, 2021
by
Mustafa Gezen
🏗
Browse files
add direct links to koji and gitlab
parent
0418dbad
Changes
6
Hide whitespace changes
Inline
Side-by-side
change_history.sh
0 → 100755
View file @
0939fc27
#!/bin/sh
git filter-branch
--env-filter
'
OLD_EMAIL="mustafa@bycrates.com"
CORRECT_NAME="Mustafa Gezen"
CORRECT_EMAIL="mustafa@rockylinux.org"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
fi
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_AUTHOR_NAME="$CORRECT_NAME"
export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
fi
'
--tag-name-filter
cat
--
--branches
--tags
distrobuild/app.py
View file @
0939fc27
...
...
@@ -12,7 +12,7 @@ from distrobuild import settings
from
distrobuild.routes
import
register_routes
# init sessions
import
distrobuild
.
session
from
distrobuild
import
session
app
=
FastAPI
()
app
.
mount
(
"/static/files"
,
StaticFiles
(
directory
=
"ui/dist/files"
),
name
=
"static"
)
...
...
@@ -22,7 +22,11 @@ templates = Jinja2Templates(directory="ui/dist/templates")
@
app
.
get
(
"/{full_path:path}"
,
response_class
=
HTMLResponse
,
include_in_schema
=
False
)
async
def
serve_frontend
(
request
:
Request
):
return
templates
.
TemplateResponse
(
"index.html"
,
{
"request"
:
request
})
return
templates
.
TemplateResponse
(
"index.html"
,
{
"request"
:
request
,
"koji_weburl"
:
session
.
koji_config
.
get
(
"weburl"
),
"gitlab_url"
:
f
"https://
{
settings
.
settings
.
gitlab_host
}{
settings
.
settings
.
repo_prefix
}
"
})
register_tortoise
(
app
,
...
...
ui/public/index.html
View file @
0939fc27
...
...
@@ -6,5 +6,9 @@
</head>
<body>
<div
id=
"root"
></div>
<script>
window
.
SETTINGS
=
{
'
kojiWeburl
'
:
'
{{ koji_weburl}}
'
,
'
gitlabUrl
'
:
'
{{ gitlab_url }}
'
};
</script>
</body>
</html>
\ No newline at end of file
ui/src/api.ts
View file @
0939fc27
...
...
@@ -24,6 +24,7 @@ export interface IImport {
id
:
string
;
created_at
:
string
;
status
:
string
;
commit
:
string
;
_package
:
IPackage
;
}
...
...
ui/src/components/Dashboard.tsx
View file @
0939fc27
...
...
@@ -78,7 +78,14 @@ export const Dashboard = () => {
{
new
Date
(
item
.
created_at
).
toLocaleString
()
}
</
TableCell
>
<
TableCell
>
{
item
.
package
.
name
}
</
TableCell
>
<
TableCell
>
{
item
.
koji_id
}
</
TableCell
>
<
TableCell
>
<
Link
target
=
"_blank"
href
=
{
`
${
window
.
SETTINGS
.
kojiWeburl
}
/taskinfo?taskID=
${
item
.
koji_id
}
`
}
>
{
item
.
koji_id
}
</
Link
>
</
TableCell
>
<
TableCell
>
{
statusToTag
(
item
.
status
)
}
</
TableCell
>
</
TableRow
>
))
}
...
...
@@ -113,9 +120,18 @@ export const Dashboard = () => {
<
TableCell
>
{
item
.
_package
.
name
}
</
TableCell
>
<
TableCell
>
{
statusToTag
(
item
.
status
)
}
</
TableCell
>
<
TableCell
>
<
Link
href
=
{
`/api/build/imports/
${
item
.
id
}
/logs`
}
>
<
Link
style
=
{
{
marginRight
:
'
10px
'
}
}
href
=
{
`/api/build/imports/
${
item
.
id
}
/logs`
}
>
Logs
</
Link
>
<
Link
target
=
"_blank"
href
=
{
`
${
window
.
SETTINGS
.
gitlabUrl
}
/rpms/
${
item
.
_package
.
name
}
/-/commit/
${
item
.
commit
}
`
}
>
GitLab commit
</
Link
>
</
TableCell
>
</
TableRow
>
))
}
...
...
ui/src/index.d.ts
0 → 100644
View file @
0939fc27
export
{};
declare
global
{
interface
Window
{
SETTINGS
:
any
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment