Skip to main content
Homepage
Explore
Search or go to…
/
Sign in
Explore
Primary navigation
Project
D
Documentation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Collapse sidebar
Snippets
Groups
Projects
Show more breadcrumbs
RWTHjupyter
Documentation
Commits
c39f2ae6
This project is archived. Its data is
read-only
.
Commit
c39f2ae6
authored
Nov 5, 2020
by
Steffen Vogel
Browse files
Options
Downloads
Patches
Plain Diff
fix accesses to profile service
parent
afa15018
No related branches found
No related tags found
No related merge requests found
Pipeline
#379400
passed
Dec 18, 2020
Status:
Stage: prepare
Status:
Stage: deploy
Changes
2
Pipelines
49
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
script.js
+23
-16
23 additions, 16 deletions
script.js
style.css
+1
-1
1 addition, 1 deletion
style.css
with
24 additions
and
17 deletions
script.js
+
23
−
16
View file @
c39f2ae6
...
...
@@ -76,18 +76,25 @@ function updateDirectLink(profileSlug, path) {
}
function
loadBuildStatus
()
{
window
.
fetch
(
serviceUrl
+
'
/profile/all
'
)
.
then
(
response
=>
response
.
json
())
.
then
(
json
=>
{
this
.
console
.
log
(
json
);
for
(
const
i
in
json
.
jobs
)
{
let
job
=
json
.
jobs
[
i
];
elm
=
this
.
document
.
getElementById
(
'
build-
'
+
job
.
name
);
getProfiles
().
then
(
profiles
=>
{
for
(
const
i
in
profiles
)
{
let
profile
=
profiles
[
i
];
let
elm
=
document
.
getElementById
(
'
build-
'
+
profile
.
slug
);
if
(
elm
)
{
elm
.
classList
.
add
(
job
.
status
);
elm
.
innerText
=
job
.
status
;
elm
.
insertAdjacentHTML
(
'
afterend
'
,
'
<span class="build-log">(open <a href="
'
+
job
.
web_url
+
'
">build log</a> #
'
+
job
.
id
+
'
from
'
+
new
Date
(
job
.
created_at
).
toLocaleString
()
+
'
)</span>
'
);
let
build
=
profile
.
last_build
;
if
(
build
)
{
elm
.
classList
.
add
(
build
.
status
);
elm
.
innerText
=
build
.
status
;
let
date
=
new
Date
(
build
.
started_at
).
toLocaleString
();
let
text
=
'
<a href="
'
+
build
.
web_url
+
'
">#
'
+
build
.
id
+
'
</a> from
'
+
date
+
'
ran for
'
+
build
.
duration
+
'
secs, triggered by <a href="
'
+
build
.
user
.
web_url
+
'
">
'
+
build
.
user
.
name
+
'
</a>
'
;
elm
.
insertAdjacentHTML
(
'
afterend
'
,
'
<span title="
'
+
build
.
commit
.
message
+
'
" class="build-details">
'
+
text
+
'
</span>
'
);
}
else
{
elm
.
classList
.
add
(
'
unknown
'
);
elm
.
innerText
=
'
unknown
'
;
}
}
}
});
...
...
@@ -130,9 +137,9 @@ function insertVersionCollapsibles() {
coll
.
insertAdjacentElement
(
'
beforebegin
'
,
btn
)
btn
.
addEventListener
(
'
click
'
,
()
=>
{
window
.
fetch
(
apiBaseUrl
+
'
/versions
/
'
+
slug
+
'
/
'
+
repo
)
.
then
(
(
response
)
=>
response
.
json
())
.
then
(
(
pkgs
)
=>
{
fetch
(
serviceUrl
+
'
/profile/api
/
'
+
slug
+
'
/
versions/
'
+
repo
)
.
then
(
response
=>
response
.
json
())
.
then
(
pkgs
=>
{
tbl
=
document
.
createElement
(
'
table
'
);
tbl
.
classList
.
add
(
'
versions
'
)
tbl
.
insertAdjacentHTML
(
'
afterbegin
'
,
'
<th>Name</th><th>Version</th>
'
);
...
...
...
...
This diff is collapsed.
Click to expand it.
style.css
+
1
−
1
View file @
c39f2ae6
...
...
@@ -8,7 +8,7 @@ span.build-badge {
padding
:
0px
6px
;
}
span
.build-
log
{
span
.build-
details
{
padding-left
:
10px
;
}
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment