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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
b4573bd8
Commit
b4573bd8
authored
Feb 21, 2018
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
integrate prometheus graphs into cluster page (rough pass)
parent
6d7be79b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
3 deletions
+33
-3
app/assets/javascripts/pages/projects/clusters/show/cluster_health.js
...avascripts/pages/projects/clusters/show/cluster_health.js
+14
-0
app/assets/javascripts/pages/projects/clusters/show/index.js
app/assets/javascripts/pages/projects/clusters/show/index.js
+2
-0
app/views/projects/clusters/_health.html.haml
app/views/projects/clusters/_health.html.haml
+17
-3
No files found.
app/assets/javascripts/pages/projects/clusters/show/cluster_health.js
0 → 100644
View file @
b4573bd8
import
Vue
from
'
vue
'
;
import
Dashboard
from
'
~/monitoring/components/dashboard.vue
'
;
export
default
()
=>
{
const
el
=
document
.
querySelector
(
'
#prometheus-graphs
'
);
if
(
el
)
{
// eslint-disable-next-line no-new
new
Vue
({
el
,
render
:
createElement
=>
createElement
(
Dashboard
),
});
}
};
app/assets/javascripts/pages/projects/clusters/show/index.js
View file @
b4573bd8
import
ClustersBundle
from
'
~/clusters/clusters_bundle
'
;
import
initClusterHealth
from
'
./cluster_health
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
new
ClustersBundle
();
// eslint-disable-line no-new
initClusterHealth
();
});
app/views/projects/clusters/_health.html.haml
View file @
b4573bd8
...
...
@@ -3,6 +3,20 @@
%h4
=
s_
(
'ClusterIntegration|Kubernetes cluster health'
)
.settings-content
-
if
@cluster
&
.
application_prometheus
&
.
installed?
#prometheus-graphs
{
data:
{
"settings-path"
:
edit_project_service_path
(
@project
,
'prometheus'
),
"clusters-path"
:
project_clusters_path
(
@project
),
"documentation-path"
:
help_page_path
(
'administration/monitoring/prometheus/index.md'
),
"empty-getting-started-svg-path"
:
image_path
(
'illustrations/monitoring/getting_started.svg'
),
"empty-loading-svg-path"
:
image_path
(
'illustrations/monitoring/loading.svg'
),
"empty-unable-to-connect-svg-path"
:
image_path
(
'illustrations/monitoring/unable_to_connect.svg'
),
"additional-metrics"
:
metrics_namespace_project_cluster_path
(
format: :json
),
"project-path"
:
project_path
(
@project
),
"tags-path"
:
project_tags_path
(
@project
),
"has-metrics"
:
"true"
,
"deployment-endpoint"
:
nil
}
}
-
else
%p
=
s_
(
"ClusterIntegration|In order to show the health of the cluster, we'll need to provision your cluster with Prometheus to collect the required data."
)
%a
.btn
{
href:
'#cluster-applications'
}
...
...
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