Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
daf15c3c
Commit
daf15c3c
authored
Aug 29, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename and organize vue components
parent
4809ded8
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
31 additions
and
32 deletions
+31
-32
app/assets/javascripts/monitoring/components/dashboard.vue
app/assets/javascripts/monitoring/components/dashboard.vue
+6
-7
app/assets/javascripts/monitoring/components/empty_state.vue
app/assets/javascripts/monitoring/components/empty_state.vue
+0
-0
app/assets/javascripts/monitoring/components/graph.vue
app/assets/javascripts/monitoring/components/graph.vue
+13
-13
app/assets/javascripts/monitoring/components/graph/deployment.vue
...ts/javascripts/monitoring/components/graph/deployment.vue
+1
-1
app/assets/javascripts/monitoring/components/graph/flag.vue
app/assets/javascripts/monitoring/components/graph/flag.vue
+1
-1
app/assets/javascripts/monitoring/components/graph/legend.vue
...assets/javascripts/monitoring/components/graph/legend.vue
+2
-2
app/assets/javascripts/monitoring/components/graph_row.vue
app/assets/javascripts/monitoring/components/graph_row.vue
+5
-5
app/assets/javascripts/monitoring/monitoring_bundle.js
app/assets/javascripts/monitoring/monitoring_bundle.js
+3
-3
No files found.
app/assets/javascripts/monitoring/components/
monitoring
.vue
→
app/assets/javascripts/monitoring/components/
dashboard
.vue
View file @
daf15c3c
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
import
_
from
'
underscore
'
;
import
_
from
'
underscore
'
;
import
statusCodes
from
'
../../lib/utils/http_status
'
;
import
statusCodes
from
'
../../lib/utils/http_status
'
;
import
MonitoringService
from
'
../services/monitoring_service
'
;
import
MonitoringService
from
'
../services/monitoring_service
'
;
import
monitoringRow
from
'
./monitoring
_row.vue
'
;
import
GraphRow
from
'
./graph
_row.vue
'
;
import
monitoringState
from
'
./monitoring
_state.vue
'
;
import
EmptyState
from
'
./empty
_state.vue
'
;
import
MonitoringStore
from
'
../stores/monitoring_store
'
;
import
MonitoringStore
from
'
../stores/monitoring_store
'
;
import
eventHub
from
'
../event_hub
'
;
import
eventHub
from
'
../event_hub
'
;
...
@@ -31,8 +31,8 @@
...
@@ -31,8 +31,8 @@
},
},
components
:
{
components
:
{
monitoring
Row
,
Graph
Row
,
monitoring
State
,
Empty
State
,
},
},
methods
:
{
methods
:
{
...
@@ -94,7 +94,6 @@
...
@@ -94,7 +94,6 @@
this
.
updatedAspectRatios
=
0
;
this
.
updatedAspectRatios
=
0
;
}
}
},
},
},
},
created
()
{
created
()
{
...
@@ -132,7 +131,7 @@
...
@@ -132,7 +131,7 @@
<h4>
{{
groupData
.
group
}}
</h4>
<h4>
{{
groupData
.
group
}}
</h4>
</div>
</div>
<div
class=
"panel-body"
>
<div
class=
"panel-body"
>
<
monitoring
-row
<
graph
-row
v-for=
"(row, index) in groupData.metrics"
v-for=
"(row, index) in groupData.metrics"
:key=
"index"
:key=
"index"
:row-data=
"row"
:row-data=
"row"
...
@@ -144,7 +143,7 @@
...
@@ -144,7 +143,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
<
monitoring
-state
<
empty
-state
:selected-state=
"state"
:selected-state=
"state"
:documentation-path=
"documentationPath"
:documentation-path=
"documentationPath"
:settings-path=
"settingsPath"
:settings-path=
"settingsPath"
...
...
app/assets/javascripts/monitoring/components/
monitoring
_state.vue
→
app/assets/javascripts/monitoring/components/
empty
_state.vue
View file @
daf15c3c
File moved
app/assets/javascripts/monitoring/components/
monitoring_column
.vue
→
app/assets/javascripts/monitoring/components/
graph
.vue
View file @
daf15c3c
<
script
>
<
script
>
import
d3
from
'
d3
'
;
import
d3
from
'
d3
'
;
import
monitoringLegends
from
'
./monitoring_legends
.vue
'
;
import
GraphLegend
from
'
./graph/legend
.vue
'
;
import
monitoringFlag
from
'
./monitoring_
flag.vue
'
;
import
GraphFlag
from
'
./graph/
flag.vue
'
;
import
monitoringDeployment
from
'
./monitoring_
deployment.vue
'
;
import
GraphDeployment
from
'
./graph/
deployment.vue
'
;
import
MonitoringMixin
from
'
../mixins/monitoring_mixins
'
;
import
MonitoringMixin
from
'
../mixins/monitoring_mixins
'
;
import
eventHub
from
'
../event_hub
'
;
import
eventHub
from
'
../event_hub
'
;
import
measurements
from
'
../utils/measurements
'
;
import
measurements
from
'
../utils/measurements
'
;
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
export
default
{
export
default
{
props
:
{
props
:
{
column
Data
:
{
graph
Data
:
{
type
:
Object
,
type
:
Object
,
required
:
true
,
required
:
true
,
},
},
...
@@ -66,9 +66,9 @@
...
@@ -66,9 +66,9 @@
},
},
components
:
{
components
:
{
monitoringLegends
,
GraphLegend
,
monitoring
Flag
,
Graph
Flag
,
monitoring
Deployment
,
Graph
Deployment
,
},
},
computed
:
{
computed
:
{
...
@@ -97,7 +97,7 @@
...
@@ -97,7 +97,7 @@
methods
:
{
methods
:
{
draw
()
{
draw
()
{
const
breakpointSize
=
bp
.
getBreakpointSize
();
const
breakpointSize
=
bp
.
getBreakpointSize
();
const
query
=
this
.
column
Data
.
queries
[
0
];
const
query
=
this
.
graph
Data
.
queries
[
0
];
this
.
margin
=
measurements
.
large
.
margin
;
this
.
margin
=
measurements
.
large
.
margin
;
if
(
breakpointSize
===
'
xs
'
||
breakpointSize
===
'
sm
'
)
{
if
(
breakpointSize
===
'
xs
'
||
breakpointSize
===
'
sm
'
)
{
this
.
graphHeight
=
300
;
this
.
graphHeight
=
300
;
...
@@ -106,7 +106,7 @@
...
@@ -106,7 +106,7 @@
}
}
this
.
data
=
query
.
result
[
0
].
values
;
this
.
data
=
query
.
result
[
0
].
values
;
this
.
unitOfDisplay
=
query
.
unit
||
''
;
this
.
unitOfDisplay
=
query
.
unit
||
''
;
this
.
yAxisLabel
=
this
.
column
Data
.
y_label
||
'
Values
'
;
this
.
yAxisLabel
=
this
.
graph
Data
.
y_label
||
'
Values
'
;
this
.
legendTitle
=
query
.
label
||
'
Average
'
;
this
.
legendTitle
=
query
.
label
||
'
Average
'
;
this
.
graphWidth
=
this
.
$refs
.
baseSvg
.
clientWidth
-
this
.
graphWidth
=
this
.
$refs
.
baseSvg
.
clientWidth
-
this
.
margin
.
left
-
this
.
margin
.
right
;
this
.
margin
.
left
-
this
.
margin
.
right
;
...
@@ -224,7 +224,7 @@
...
@@ -224,7 +224,7 @@
:class=
"classType"
>
:class=
"classType"
>
<h5
<h5
class=
"text-center graph-title"
>
class=
"text-center graph-title"
>
{{
column
Data
.
title
}}
{{
graph
Data
.
title
}}
</h5>
</h5>
<div
<div
class=
"prometheus-svg-container"
class=
"prometheus-svg-container"
...
@@ -240,7 +240,7 @@
...
@@ -240,7 +240,7 @@
class=
"y-axis"
class=
"y-axis"
transform=
"translate(70, 20)"
>
transform=
"translate(70, 20)"
>
</g>
</g>
<
monitoring-legends
<
graph-legend
:graph-width=
"graphWidth"
:graph-width=
"graphWidth"
:graph-height=
"graphHeight"
:graph-height=
"graphHeight"
:margin=
"margin"
:margin=
"margin"
...
@@ -268,13 +268,13 @@
...
@@ -268,13 +268,13 @@
stroke-width=
"2"
stroke-width=
"2"
transform=
"translate(-5, 20)"
>
transform=
"translate(-5, 20)"
>
</path>
</path>
<
monitoring
-deployment
<
graph
-deployment
:show-deploy-info=
"showDeployInfo"
:show-deploy-info=
"showDeployInfo"
:deployment-data=
"reducedDeploymentData"
:deployment-data=
"reducedDeploymentData"
:graph-height=
"graphHeight"
:graph-height=
"graphHeight"
:graph-height-offset=
"graphHeightOffset"
:graph-height-offset=
"graphHeightOffset"
/>
/>
<
monitoring
-flag
<
graph
-flag
v-if=
"showFlag"
v-if=
"showFlag"
:current-x-coordinate=
"currentXCoordinate"
:current-x-coordinate=
"currentXCoordinate"
:current-y-coordinate=
"currentYCoordinate"
:current-y-coordinate=
"currentYCoordinate"
...
...
app/assets/javascripts/monitoring/components/
monitoring_
deployment.vue
→
app/assets/javascripts/monitoring/components/
graph/
deployment.vue
View file @
daf15c3c
<
script
>
<
script
>
import
{
dateFormat
,
timeFormat
}
from
'
../utils/date_time_formatters
'
;
import
{
dateFormat
,
timeFormat
}
from
'
../
../
utils/date_time_formatters
'
;
export
default
{
export
default
{
props
:
{
props
:
{
...
...
app/assets/javascripts/monitoring/components/
monitoring_
flag.vue
→
app/assets/javascripts/monitoring/components/
graph/
flag.vue
View file @
daf15c3c
<
script
>
<
script
>
import
{
dateFormat
,
timeFormat
}
from
'
../utils/date_time_formatters
'
;
import
{
dateFormat
,
timeFormat
}
from
'
../
../
utils/date_time_formatters
'
;
export
default
{
export
default
{
props
:
{
props
:
{
...
...
app/assets/javascripts/monitoring/components/
monitoring_legends
.vue
→
app/assets/javascripts/monitoring/components/
graph/legend
.vue
View file @
daf15c3c
app/assets/javascripts/monitoring/components/
monitoring
_row.vue
→
app/assets/javascripts/monitoring/components/
graph
_row.vue
View file @
daf15c3c
<
script
>
<
script
>
import
monitoringColumn
from
'
./monitoring_column
.vue
'
;
import
Graph
from
'
./graph
.vue
'
;
export
default
{
export
default
{
props
:
{
props
:
{
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
},
},
},
},
components
:
{
components
:
{
monitoringColumn
,
Graph
,
},
},
computed
:
{
computed
:
{
bootstrapClass
()
{
bootstrapClass
()
{
...
@@ -29,9 +29,9 @@
...
@@ -29,9 +29,9 @@
<
template
>
<
template
>
<div
class=
"prometheus-row row"
>
<div
class=
"prometheus-row row"
>
<
monitoring-column
<
graph
v-for=
"(
column
, index) in rowData"
v-for=
"(
graphData
, index) in rowData"
:
column-data=
"column
"
:
graph-data=
"graphData
"
:class-type=
"bootstrapClass"
:class-type=
"bootstrapClass"
:key=
"index"
:key=
"index"
:update-aspect-ratio=
"updateAspectRatio"
:update-aspect-ratio=
"updateAspectRatio"
...
...
app/assets/javascripts/monitoring/monitoring_bundle.js
View file @
daf15c3c
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
Monitoring
from
'
./components/monitoring
.vue
'
;
import
Dashboard
from
'
./components/dashboard
.vue
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
new
Vue
({
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
new
Vue
({
el
:
'
#prometheus-graphs
'
,
el
:
'
#prometheus-graphs
'
,
components
:
{
components
:
{
'
monitoring-dashboard
'
:
Monitoring
,
Dashboard
,
},
},
render
:
createElement
=>
createElement
(
'
monitoring-
dashboard
'
),
render
:
createElement
=>
createElement
(
'
dashboard
'
),
}));
}));
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