Skip to content

Commit

Permalink
Added Jobs Resource to Linkerd Dashboard along with grafana. (#2439)
Browse files Browse the repository at this point in the history
Signed-off-by: Tarun Pothulapati <[email protected]>
  • Loading branch information
Pothulapati authored and siggy committed Mar 7, 2019
1 parent a454662 commit 8f6c63d
Show file tree
Hide file tree
Showing 8 changed files with 2,255 additions and 1 deletion.
2,241 changes: 2,241 additions & 0 deletions grafana/dashboards/job.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions web/app/js/components/Namespace.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ class Namespaces extends React.Component {
{this.renderResourceSection("pod", metrics.pod)}
{this.renderResourceSection("replicationcontroller", metrics.replicationcontroller)}
{this.renderResourceSection("statefulset", metrics.statefulset)}
{this.renderResourceSection("job", metrics.job)}
{this.renderResourceSection("authority", metrics.authority)}
</div>
)}
Expand Down
1 change: 1 addition & 0 deletions web/app/js/components/NamespaceLanding.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ class NamespaceLanding extends React.Component {
{this.renderResourceSection("pod", metrics.pod)}
{this.renderResourceSection("replicationcontroller", metrics.replicationcontroller)}
{this.renderResourceSection("statefulset", metrics.statefulset)}
{this.renderResourceSection("job", metrics.job)}
{this.renderResourceSection("authority", metrics.authority)}
</Grid>
);
Expand Down
1 change: 1 addition & 0 deletions web/app/js/components/NavigationResources.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class NavigationResourcesBase extends React.Component {
<NavigationResource type="authorities" />
<NavigationResource type="deployments" metrics={allMetrics.deployment} />
<NavigationResource type="daemonsets" metrics={allMetrics.daemonset} />
<NavigationResource type="jobs" metrics={allMetrics.job} />
<NavigationResource type="namespaces" metrics={nsMetrics.namespace} />
<NavigationResource type="pods" metrics={allMetrics.pod} />
<NavigationResource type="replicationcontrollers" metrics={allMetrics.replicationcontroller} />
Expand Down
3 changes: 2 additions & 1 deletion web/app/js/components/util/TapUtils.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ export const tapResourceTypes = [
"daemonset",
"pod",
"replicationcontroller",
"statefulset"
"statefulset",
"job"
];

// use a generator to get this object, to prevent it from being overwritten
Expand Down
1 change: 1 addition & 0 deletions web/app/js/components/util/Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ export const shortNameLookup = {
"replicaset": "rs",
"service": "svc",
"statefulset": "sts",
"job": "job",
"authority": "au"
};

Expand Down
6 changes: 6 additions & 0 deletions web/app/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ let applicationHtml = (
<Route
path={`${pathPrefix}/namespaces/:namespace/statefulsets/:statefulset`}
render={props => <Navigation {...props} ChildComponent={ResourceDetail} />} />
<Route
path={`${pathPrefix}/namespaces/:namespace/jobs/:job`}
render={props => <Navigation {...props} ChildComponent={ResourceDetail} />} />
<Route
path={`${pathPrefix}/namespaces/:namespace/deployments/:deployment`}
render={props => <Navigation {...props} ChildComponent={ResourceDetail} />} />
Expand Down Expand Up @@ -96,6 +99,9 @@ let applicationHtml = (
<Route
path={`${pathPrefix}/statefulsets`}
render={props => <Navigation {...props} ChildComponent={ResourceList} resource="statefulset" />} />
<Route
path={`${pathPrefix}/jobs`}
render={props => <Navigation {...props} ChildComponent={ResourceList} resource="job" />} />
<Route
path={`${pathPrefix}/replicationcontrollers`}
render={props => <Navigation {...props} ChildComponent={ResourceList} resource="replicationcontroller" />} />
Expand Down
2 changes: 2 additions & 0 deletions web/srv/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ func NewServer(
server.router.GET("/namespaces/:namespace", handler.handleIndex)
server.router.GET("/daemonsets", handler.handleIndex)
server.router.GET("/statefulsets", handler.handleIndex)
server.router.GET("/jobs", handler.handleIndex)
server.router.GET("/deployments", handler.handleIndex)
server.router.GET("/replicationcontrollers", handler.handleIndex)
server.router.GET("/pods", handler.handleIndex)
Expand All @@ -105,6 +106,7 @@ func NewServer(
server.router.GET("/namespaces/:namespace/daemonsets/:daemonset", handler.handleIndex)
server.router.GET("/namespaces/:namespace/statefulsets/:statefulset", handler.handleIndex)
server.router.GET("/namespaces/:namespace/deployments/:deployment", handler.handleIndex)
server.router.GET("/namespaces/:namespace/jobs/:job", handler.handleIndex)
server.router.GET("/namespaces/:namespace/replicationcontrollers/:replicationcontroller", handler.handleIndex)
server.router.GET("/tap", handler.handleIndex)
server.router.GET("/top", handler.handleIndex)
Expand Down

0 comments on commit 8f6c63d

Please sign in to comment.