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
147d55d2
Commit
147d55d2
authored
Aug 30, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extract prometheus graph group elements into their own component
parent
4138c20c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
16 deletions
+34
-16
app/assets/javascripts/monitoring/components/dashboard.vue
app/assets/javascripts/monitoring/components/dashboard.vue
+13
-16
app/assets/javascripts/monitoring/components/graph_group.vue
app/assets/javascripts/monitoring/components/graph_group.vue
+21
-0
No files found.
app/assets/javascripts/monitoring/components/dashboard.vue
View file @
147d55d2
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
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
GraphGroup
from
'
./graph_group.vue
'
;
import
GraphRow
from
'
./graph_row.vue
'
;
import
GraphRow
from
'
./graph_row.vue
'
;
import
EmptyState
from
'
./empty_state.vue
'
;
import
EmptyState
from
'
./empty_state.vue
'
;
import
MonitoringStore
from
'
../stores/monitoring_store
'
;
import
MonitoringStore
from
'
../stores/monitoring_store
'
;
...
@@ -31,6 +32,7 @@
...
@@ -31,6 +32,7 @@
},
},
components
:
{
components
:
{
GraphGroup
,
GraphRow
,
GraphRow
,
EmptyState
,
EmptyState
,
},
},
...
@@ -120,15 +122,11 @@
...
@@ -120,15 +122,11 @@
<
template
>
<
template
>
<div
v-if=
"!showEmptyState"
class=
"prometheus-graphs"
>
<div
v-if=
"!showEmptyState"
class=
"prometheus-graphs"
>
<
div
<
graph-group
v-for=
"(groupData, index) in store.groups"
v-for=
"(groupData, index) in store.groups"
:key=
"index"
:key=
"index"
class=
"panel panel-default prometheus-panel
"
:name=
"groupData.group
"
>
>
<div
class=
"panel-heading"
>
<h4>
{{
groupData
.
group
}}
</h4>
</div>
<div
class=
"panel-body"
>
<graph-row
<graph-row
v-for=
"(row, index) in groupData.metrics"
v-for=
"(row, index) in groupData.metrics"
:key=
"index"
:key=
"index"
...
@@ -136,13 +134,12 @@
...
@@ -136,13 +134,12 @@
:update-aspect-ratio=
"updateAspectRatio"
:update-aspect-ratio=
"updateAspectRatio"
:deployment-data=
"store.deploymentData"
:deployment-data=
"store.deploymentData"
/>
/>
</div>
</graph-group>
</div>
</div>
</div>
<empty-state
<empty-state
v-else
:selected-state=
"state"
:selected-state=
"state"
:documentation-path=
"documentationPath"
:documentation-path=
"documentationPath"
:settings-path=
"settingsPath"
:settings-path=
"settingsPath"
v-else
/>
/>
</
template
>
</
template
>
app/assets/javascripts/monitoring/components/graph_group.vue
0 → 100644
View file @
147d55d2
<
script
>
export
default
{
props
:
{
name
:
{
type
:
String
,
required
:
true
,
},
},
};
</
script
>
<
template
>
<div
class=
"panel panel-default prometheus-panel"
>
<div
class=
"panel-heading"
>
<h4>
{{
name
}}
</h4>
</div>
<div
class=
"panel-body"
>
<slot
/>
</div>
</div>
</
template
>
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