Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dima Krasner
Sharkey
Commits
4df409f7
Commit
4df409f7
authored
3 years ago
by
syuilo
Browse files
Options
Downloads
Patches
Plain Diff
improve dashboard
parent
0f122884
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/client/components/ui/container.vue
+7
-2
7 additions, 2 deletions
src/client/components/ui/container.vue
src/client/pages/admin/overview.vue
+57
-3
57 additions, 3 deletions
src/client/pages/admin/overview.vue
with
64 additions
and
5 deletions
src/client/components/ui/container.vue
+
7
−
2
View file @
4df409f7
<
template
>
<div
class=
"ukygtjoj _
block
"
:class=
"
{ naked, hideHeader: !showHeader, scrollable, closed: !showBody }" v-size="{ max: [380] }">
<div
class=
"ukygtjoj _
panel
"
:class=
"
{ naked,
thin,
hideHeader: !showHeader, scrollable, closed: !showBody }" v-size="{ max: [380] }">
<header
v-if=
"showHeader"
ref=
"header"
>
<div
class=
"title"
><slot
name=
"header"
></slot></div>
<div
class=
"sub"
>
...
...
@@ -36,6 +36,11 @@ export default defineComponent({
required
:
false
,
default
:
true
},
thin
:
{
type
:
Boolean
,
required
:
false
,
default
:
false
},
naked
:
{
type
:
Boolean
,
required
:
false
,
...
...
@@ -226,7 +231,7 @@ export default defineComponent({
}
}
&
.max-width_380px
{
&
.max-width_380px
,
&
.thin
{
>
header
{
>
.title
{
padding
:
8px
10px
;
...
...
This diff is collapsed.
Click to expand it.
src/client/pages/admin/overview.vue
+
57
−
3
View file @
4df409f7
...
...
@@ -2,7 +2,7 @@
<div>
<MkHeader
:info=
"header"
/>
<div
class=
"edbbcaef"
>
<div
class=
"edbbcaef"
v-size=
"
{ max: [880] }"
>
<div
v-if=
"stats"
class=
"cfcdecdf"
style=
"margin: var(--margin)"
>
<div
class=
"number _panel"
>
<div
class=
"label"
>
Users
</div>
...
...
@@ -26,7 +26,18 @@
<MkInstanceStats
:chart-limit=
"500"
:detailed=
"true"
/>
</div>
</MkContainer>
<div
class=
"queue"
>
<MkContainer
:foldable=
"true"
:thin=
"true"
class=
"deliver"
>
<
template
#header
>
Queue: deliver
</
template
>
<MkQueueChart
:connection=
"queueStatsConnection"
domain=
"deliver"
/>
</MkContainer>
<MkContainer
:foldable=
"true"
:thin=
"true"
class=
"inbox"
>
<
template
#header
>
Queue: inbox
</
template
>
<MkQueueChart
:connection=
"queueStatsConnection"
domain=
"inbox"
/>
</MkContainer>
</div>
<!--<XMetrics/>-->
<MkFolder
style=
"margin: var(--margin)"
>
...
...
@@ -59,7 +70,7 @@
</template>
<
script
lang=
"ts"
>
import
{
computed
,
defineComponent
,
version
as
vueVersion
}
from
'
vue
'
;
import
{
computed
,
defineComponent
,
markRaw
,
version
as
vueVersion
}
from
'
vue
'
;
import
FormKeyValueView
from
'
@client/components/debobigego/key-value-view.vue
'
;
import
MkInstanceStats
from
'
@client/components/instance-stats.vue
'
;
import
MkButton
from
'
@client/components/ui/button.vue
'
;
...
...
@@ -67,6 +78,7 @@ import MkSelect from '@client/components/form/select.vue';
import
MkNumberDiff
from
'
@client/components/number-diff.vue
'
;
import
MkContainer
from
'
@client/components/ui/container.vue
'
;
import
MkFolder
from
'
@client/components/ui/folder.vue
'
;
import
MkQueueChart
from
'
@client/components/queue-chart.vue
'
;
import
{
version
,
url
}
from
'
@client/config
'
;
import
bytes
from
'
@client/filters/bytes
'
;
import
number
from
'
@client/filters/number
'
;
...
...
@@ -82,6 +94,7 @@ export default defineComponent({
MkInstanceStats
,
MkContainer
,
MkFolder
,
MkQueueChart
,
XMetrics
,
},
...
...
@@ -108,6 +121,7 @@ export default defineComponent({
notesComparedToThePrevDay
:
null
,
fetchJobs
:
()
=>
os
.
api
(
'
admin/queue/deliver-delayed
'
,
{}),
fetchModLogs
:
()
=>
os
.
api
(
'
admin/show-moderation-logs
'
,
{}),
queueStatsConnection
:
markRaw
(
os
.
stream
.
useChannel
(
'
queueStats
'
)),
}
},
...
...
@@ -133,6 +147,17 @@ export default defineComponent({
os
.
api
(
'
admin/server-info
'
,
{}).
then
(
serverInfo
=>
{
this
.
serverInfo
=
serverInfo
;
});
this
.
$nextTick
(()
=>
{
this
.
queueStatsConnection
.
send
(
'
requestLog
'
,
{
id
:
Math
.
random
().
toString
().
substr
(
2
,
8
),
length
:
200
});
});
},
beforeUnmount
()
{
this
.
queueStatsConnection
.
dispose
();
},
methods
:
{
...
...
@@ -184,5 +209,34 @@ export default defineComponent({
>
.charts
{
margin
:
var
(
--
margin
);
}
>
.queue
{
margin
:
var
(
--
margin
);
display
:
flex
;
>
.deliver
,
>
.inbox
{
flex
:
1
;
width
:
50%
;
&
:not
(
:first-child
)
{
margin-left
:
var
(
--
margin
);
}
}
}
&
.max-width_800px
{
>
.queue
{
display
:
block
;
>
.deliver
,
>
.inbox
{
&
:not
(
:first-child
)
{
margin-top
:
var
(
--
margin
);
margin-left
:
0
;
}
}
}
}
}
</
style
>
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