Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
galene
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
galene
Commits
bf142c41
Commit
bf142c41
authored
Sep 16, 2022
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix status generation for remote groups.
parent
4f83de33
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
+18
-4
group/group.go
group/group.go
+12
-2
static/mainpage.js
static/mainpage.js
+6
-2
No files found.
group/group.go
View file @
bf142c41
...
@@ -1185,8 +1185,9 @@ func (g *Group) GetPermission(creds ClientCredentials) (string, []string, error)
...
@@ -1185,8 +1185,9 @@ func (g *Group) GetPermission(creds ClientCredentials) (string, []string, error)
type
Status
struct
{
type
Status
struct
{
Name
string
`json:"name"`
Name
string
`json:"name"`
Location
string
`json:"location"`
Redirect
string
`json:"redirect,omitempty"`
Endpoint
string
`json:"endpoint"`
Location
string
`json:"location,omitempty"`
Endpoint
string
`json:"endpoint,omitempty"`
DisplayName
string
`json:"displayName,omitempty"`
DisplayName
string
`json:"displayName,omitempty"`
Description
string
`json:"description,omitempty"`
Description
string
`json:"description,omitempty"`
AuthServer
string
`json:"authServer,omitempty"`
AuthServer
string
`json:"authServer,omitempty"`
...
@@ -1201,6 +1202,15 @@ type Status struct {
...
@@ -1201,6 +1202,15 @@ type Status struct {
func
(
g
*
Group
)
Status
(
authentified
bool
,
base
string
)
Status
{
func
(
g
*
Group
)
Status
(
authentified
bool
,
base
string
)
Status
{
desc
:=
g
.
Description
()
desc
:=
g
.
Description
()
if
desc
.
Redirect
!=
""
{
return
Status
{
Name
:
g
.
name
,
Redirect
:
desc
.
Redirect
,
DisplayName
:
desc
.
DisplayName
,
Description
:
desc
.
Description
,
}
}
var
location
,
endpoint
string
var
location
,
endpoint
string
if
base
!=
""
{
if
base
!=
""
{
burl
,
err
:=
url
.
Parse
(
base
)
burl
,
err
:=
url
.
Parse
(
base
)
...
...
static/mainpage.js
View file @
bf142c41
...
@@ -119,8 +119,12 @@ async function listPublicGroups() {
...
@@ -119,8 +119,12 @@ async function listPublicGroups() {
td2
.
textContent
=
group
.
description
;
td2
.
textContent
=
group
.
description
;
tr
.
appendChild
(
td2
);
tr
.
appendChild
(
td2
);
let
td3
=
document
.
createElement
(
'
td
'
);
let
td3
=
document
.
createElement
(
'
td
'
);
let
locked
=
group
.
locked
?
'
, locked
'
:
''
;
if
(
!
group
.
redirect
)
{
td3
.
textContent
=
`(
${
group
.
clientCount
}
clients
${
locked
}
)`
;
let
locked
=
group
.
locked
?
'
, locked
'
:
''
;
td3
.
textContent
=
`(
${
group
.
clientCount
}
clients
${
locked
}
)`
;
}
else
{
td3
.
textContent
=
'
(remote)
'
;
}
tr
.
appendChild
(
td3
);
tr
.
appendChild
(
td3
);
table
.
appendChild
(
tr
);
table
.
appendChild
(
tr
);
}
}
...
...
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