Private GIT
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
wg-gen-web
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vlbox
wg-gen-web
Commits
dd99358f
Commit
dd99358f
authored
5 years ago
by
vx3r
Browse files
Options
Downloads
Patches
Plain Diff
issue #27 #38 clients list view and search
parent
125ddaef
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
auth/oauth2oidc/oauth2oidc.go
+0
-9
0 additions, 9 deletions
auth/oauth2oidc/oauth2oidc.go
ui/src/components/Clients.vue
+193
-123
193 additions, 123 deletions
ui/src/components/Clients.vue
with
193 additions
and
132 deletions
auth/oauth2oidc/oauth2oidc.go
+
0
−
9
View file @
dd99358f
...
...
@@ -74,15 +74,6 @@ func (o *Oauth2idc) UserInfo(oauth2Token *oauth2.Token) (*model.User, error) {
return
nil
,
err
}
type
UserInfo
struct
{
Subject
string
`json:"sub"`
Profile
string
`json:"profile"`
Email
string
`json:"email"`
EmailVerified
bool
`json:"email_verified"`
claims
[]
byte
}
// ID Token payload is just JSON
var
claims
map
[
string
]
interface
{}
if
err
:=
userInfo
.
Claims
(
&
claims
);
err
!=
nil
{
...
...
This diff is collapsed.
Click to expand it.
ui/src/components/Clients.vue
+
193
−
123
View file @
dd99358f
<
template
>
<v-container>
<v-card>
<v-card-title>
Clients
<v-switch
class=
"ml-3"
dark
:label=
"listView ? 'Switch to card view' : 'Switch to list view'"
v-model=
"listView"
/>
<v-spacer></v-spacer>
<v-text-field
v-if=
"listView"
v-model=
"search"
append-icon=
"mdi-magnify"
label=
"Search"
single-line
hide-details
></v-text-field>
</v-card-title>
<v-data-table
v-if=
"listView"
:headers=
"headers"
:items=
"clients"
:search=
"search"
>
<template
v-slot:item.address=
"
{ item }">
<v-chip
v-for=
"(ip, i) in item.address"
:key=
"i"
color=
"indigo"
text-color=
"white"
>
<v-icon
left
>
mdi-ip-network
</v-icon>
{{
ip
}}
</v-chip>
</
template
>
<
template
v-slot:item.created=
"{ item }"
>
<v-row>
<v-col
cols=
"12"
>
<v-card
dark
>
<v-list-item>
<v-list-item-content>
<v-list-item-title
class=
"headline"
>
Clients
</v-list-item-title>
</v-list-item-content>
<v-btn
color=
"success"
@
click=
"startCreate"
<p>
At
{{
item
.
created
|
formatDate
}}
by
{{
item
.
createdBy
}}
</p>
</v-row>
</
template
>
<
template
v-slot:item.updated=
"{ item }"
>
<v-row>
<p>
At
{{
item
.
updated
|
formatDate
}}
by
{{
item
.
updatedBy
}}
</p>
</v-row>
</
template
>
<
template
v-slot:item.action=
"{ item }"
>
<v-icon
class=
"pr-1 pl-1"
@
click.stop=
"startUpdate(item)"
>
Add new client
<v-icon
right
dark
>
mdi-account-multiple-plus-outline
</v-icon>
</v-btn>
</v-list-item>
mdi-square-edit-outline
</v-icon>
<v-icon
class=
"pr-1 pl-1"
@
click.stop=
"forceFileDownload(item)"
>
mdi-cloud-download-outline
</v-icon>
<v-icon
class=
"pr-1 pl-1"
@
click.stop=
"email(item)"
>
mdi-email-send-outline
</v-icon>
<v-icon
class=
"pr-1 pl-1"
@
click=
"remove(item)"
>
mdi-trash-can-outline
</v-icon>
</
template
>
</v-data-table>
<v-card-text
v-else
>
<v-row>
<v-col
v-for=
"(client, i) in clients"
...
...
@@ -128,9 +188,8 @@
</v-card>
</v-col>
</v-row>
</v-card-text>
</v-card>
</v-col>
</v-row>
<v-dialog
v-if=
"client"
v-model=
"dialogCreate"
...
...
@@ -332,10 +391,21 @@
name
:
'
Clients
'
,
data
:
()
=>
({
listView
:
false
,
dialogCreate
:
false
,
dialogUpdate
:
false
,
client
:
null
,
valid
:
false
,
search
:
''
,
headers
:
[
{
text
:
'
Name
'
,
value
:
'
name
'
,
},
{
text
:
'
Email
'
,
value
:
'
email
'
,
},
{
text
:
'
IP addresses
'
,
value
:
'
address
'
,
},
{
text
:
'
Created
'
,
value
:
'
created
'
,
sortable
:
false
,
},
{
text
:
'
Updated
'
,
value
:
'
updated
'
,
sortable
:
false
,
},
{
text
:
'
Actions
'
,
value
:
'
action
'
,
sortable
:
false
,
},
],
}),
computed
:{
...
...
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
register
or
sign in
to comment