Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
596fe67a
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
596fe67a
编写于
8月 29, 2017
作者:
M
Mike Greiling
提交者:
Phil Hughes
8月 29, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Resolve "Monitoring graph date formatting is wrong"
上级
f0d22bb6
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
27 addition
and
15 deletion
+27
-15
app/assets/javascripts/monitoring/components/monitoring_column.vue
...s/javascripts/monitoring/components/monitoring_column.vue
+2
-0
app/assets/javascripts/monitoring/components/monitoring_deployment.vue
...vascripts/monitoring/components/monitoring_deployment.vue
+3
-6
app/assets/javascripts/monitoring/components/monitoring_flag.vue
...ets/javascripts/monitoring/components/monitoring_flag.vue
+2
-5
app/assets/javascripts/monitoring/constants.js
app/assets/javascripts/monitoring/constants.js
+0
-4
app/assets/javascripts/monitoring/utils/date_time_formatters.js
...sets/javascripts/monitoring/utils/date_time_formatters.js
+15
-0
changelogs/unreleased/37104-fix-graph-date-format.yml
changelogs/unreleased/37104-fix-graph-date-format.yml
+5
-0
未找到文件。
app/assets/javascripts/monitoring/components/monitoring_column.vue
浏览文件 @
596fe67a
...
...
@@ -7,6 +7,7 @@
import
eventHub
from
'
../event_hub
'
;
import
measurements
from
'
../utils/measurements
'
;
import
{
formatRelevantDigits
}
from
'
../../lib/utils/number_utils
'
;
import
{
timeScaleFormat
}
from
'
../utils/date_time_formatters
'
;
import
bp
from
'
../../breakpoints
'
;
const
bisectDate
=
d3
.
bisector
(
d
=>
d
.
time
).
left
;
...
...
@@ -159,6 +160,7 @@
const
xAxis
=
d3
.
svg
.
axis
()
.
scale
(
axisXScale
)
.
ticks
(
measurements
.
xTicks
)
.
tickFormat
(
timeScaleFormat
)
.
orient
(
'
bottom
'
);
const
yAxis
=
d3
.
svg
.
axis
()
...
...
app/assets/javascripts/monitoring/components/monitoring_deployment.vue
浏览文件 @
596fe67a
<
script
>
import
{
dateFormat
,
timeFormat
,
}
from
'
../constants
'
;
import
{
dateFormat
,
timeFormat
}
from
'
../utils/date_time_formatters
'
;
export
default
{
props
:
{
...
...
@@ -58,7 +55,7 @@
class=
"deploy-info"
v-if=
"showDeployInfo"
>
<g
v-for=
"(deployment, index) in deploymentData"
v-for=
"(deployment, index) in deploymentData"
:key=
"index"
:class=
"nameDeploymentClass(deployment)"
:transform=
"transformDeploymentGroup(deployment)"
>
...
...
@@ -92,7 +89,7 @@
width=
"90"
height=
"58"
>
</rect>
<g
<g
transform=
"translate(5, 2)"
>
<text
class=
"deploy-info-text text-metric-bold"
>
...
...
app/assets/javascripts/monitoring/components/monitoring_flag.vue
浏览文件 @
596fe67a
<
script
>
import
{
dateFormat
,
timeFormat
,
}
from
'
../constants
'
;
import
{
dateFormat
,
timeFormat
}
from
'
../utils/date_time_formatters
'
;
export
default
{
props
:
{
...
...
@@ -72,7 +69,7 @@
r=
"5"
transform=
"translate(-5, 20)"
>
</circle>
<svg
<svg
class=
"rect-text-metric"
:x=
"currentFlagPosition"
y=
"0"
>
...
...
app/assets/javascripts/monitoring/constants.js
已删除
100644 → 0
浏览文件 @
f0d22bb6
import
d3
from
'
d3
'
;
export
const
dateFormat
=
d3
.
time
.
format
(
'
%b %d, %Y
'
);
export
const
timeFormat
=
d3
.
time
.
format
(
'
%H:%M%p
'
);
app/assets/javascripts/monitoring/utils/date_time_formatters.js
0 → 100644
浏览文件 @
596fe67a
import
d3
from
'
d3
'
;
export
const
dateFormat
=
d3
.
time
.
format
(
'
%b %-d, %Y
'
);
export
const
timeFormat
=
d3
.
time
.
format
(
'
%-I:%M%p
'
);
export
const
timeScaleFormat
=
d3
.
time
.
format
.
multi
([
[
'
.%L
'
,
d
=>
d
.
getMilliseconds
()],
[
'
:%S
'
,
d
=>
d
.
getSeconds
()],
[
'
%-I:%M
'
,
d
=>
d
.
getMinutes
()],
[
'
%-I %p
'
,
d
=>
d
.
getHours
()],
[
'
%a %-d
'
,
d
=>
d
.
getDay
()
&&
d
.
getDate
()
!==
1
],
[
'
%b %-d
'
,
d
=>
d
.
getDate
()
!==
1
],
[
'
%B
'
,
d
=>
d
.
getMonth
()],
[
'
%Y
'
,
()
=>
true
],
]);
changelogs/unreleased/37104-fix-graph-date-format.yml
0 → 100644
浏览文件 @
596fe67a
---
title
:
Fix incorrect date/time formatting on prometheus graphs
merge_request
:
13865
author
:
type
:
fixed
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录