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
ac0390fe
Unverified
Commit
ac0390fe
authored
6 years ago
by
syuilo
Browse files
Options
Downloads
Patches
Plain Diff
Improve doc
parent
97b99867
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/server/api/endpoints/charts/user/drive.ts
+3
-7
3 additions, 7 deletions
src/server/api/endpoints/charts/user/drive.ts
src/services/chart/per-user-drive.ts
+49
-28
49 additions, 28 deletions
src/services/chart/per-user-drive.ts
with
52 additions
and
35 deletions
src/server/api/endpoints/charts/user/drive.ts
+
3
−
7
View file @
ac0390fe
import
$
from
'
cafy
'
;
import
define
from
'
../../../define
'
;
import
perUserDriveChart
from
'
../../../../../services/chart/per-user-drive
'
;
import
perUserDriveChart
,
{
perUserDriveLogSchema
}
from
'
../../../../../services/chart/per-user-drive
'
;
import
ID
,
{
transform
}
from
'
../../../../../misc/cafy-id
'
;
import
{
convertLog
}
from
'
../../../../../services/chart
'
;
export
const
meta
=
{
stability
:
'
stable
'
,
...
...
@@ -38,12 +39,7 @@ export const meta = {
}
},
res
:
{
type
:
'
array
'
,
items
:
{
type
:
'
object
'
,
},
},
res
:
convertLog
(
perUserDriveLogSchema
),
};
export
default
define
(
meta
,
async
(
ps
)
=>
{
...
...
This diff is collapsed.
Click to expand it.
src/services/chart/per-user-drive.ts
+
49
−
28
View file @
ac0390fe
import
autobind
from
'
autobind-decorator
'
;
import
Chart
,
{
Obj
}
from
'
./
'
;
import
DriveFile
,
{
IDriveFile
}
from
'
../../models/drive-file
'
;
import
{
SchemaType
}
from
'
../../prelude/schema
'
;
/**
* ユーザーごとのドライブに関するチャート
*/
type
PerUserDriveLog
=
{
/**
* 集計期間時点での、全ドライブファイル数
*/
totalCount
:
number
;
export
const
perUserDriveLogSchema
=
{
type
:
'
object
'
as
'
object
'
,
properties
:
{
/**
* 集計期間時点での、全ドライブファイル数
*/
totalCount
:
{
type
:
'
number
'
as
'
number
'
,
description
:
'
集計期間時点での、全ドライブファイル数
'
},
/**
* 集計期間時点での、全ドライブファイルの合計サイズ
*/
totalSize
:
number
;
/**
* 集計期間時点での、全ドライブファイルの合計サイズ
*/
totalSize
:
{
type
:
'
number
'
as
'
number
'
,
description
:
'
集計期間時点での、全ドライブファイルの合計サイズ
'
},
/**
* 増加したドライブファイル数
*/
incCount
:
number
;
/**
* 増加したドライブファイル数
*/
incCount
:
{
type
:
'
number
'
as
'
number
'
,
description
:
'
増加したドライブファイル数
'
},
/**
* 増加したドライブ使用量
*/
incSize
:
number
;
/**
* 増加したドライブ使用量
*/
incSize
:
{
type
:
'
number
'
as
'
number
'
,
description
:
'
増加したドライブ使用量
'
},
/**
* 減少したドライブファイル数
*/
decCount
:
number
;
/**
* 減少したドライブファイル数
*/
decCount
:
{
type
:
'
number
'
as
'
number
'
,
description
:
'
減少したドライブファイル数
'
},
/**
* 減少したドライブ使用量
*/
decSize
:
number
;
/**
* 減少したドライブ使用量
*/
decSize
:
{
type
:
'
number
'
as
'
number
'
,
description
:
'
減少したドライブ使用量
'
},
}
};
type
PerUserDriveLog
=
SchemaType
<
typeof
perUserDriveLogSchema
>
;
class
PerUserDriveChart
extends
Chart
<
PerUserDriveLog
>
{
constructor
()
{
super
(
'
perUserDrive
'
,
true
);
...
...
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