Commit a2ace6f7 by Johannes Edmeier

Prevent accidental heap dump download.

Add a page with extra button to trigger a heap dump. closes #734
parent 86e21786
......@@ -234,9 +234,9 @@
"dev": true
},
"@vue/test-utils": {
"version": "1.0.0-beta.16",
"resolved": "https://registry.npmjs.org/@vue/test-utils/-/test-utils-1.0.0-beta.16.tgz",
"integrity": "sha512-TF9ae3zhs8qBN98Bix2Bh3IrwkhscEV3HRthPgtzJPNG0YHUyNTlZNXH36vbP0nuSAs9Om8XjVd8/MDj8ehpEA==",
"version": "1.0.0-beta.18",
"resolved": "https://registry.npmjs.org/@vue/test-utils/-/test-utils-1.0.0-beta.18.tgz",
"integrity": "sha1-U8IsS5AhGpjb8nCMC3F8GK2qmTw=",
"dev": true,
"requires": {
"lodash": "^4.17.4"
......@@ -604,13 +604,13 @@
"dev": true
},
"autoprefixer": {
"version": "8.6.1",
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-8.6.1.tgz",
"integrity": "sha512-DqvyCbff+kvfrZgoDHIRK28svWSSFE/Y86FXUd9zflJ+aU7rr+6JCSuhNf1evSPzh+42GdI39BuIjixN5W/EPQ==",
"version": "8.6.2",
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-8.6.2.tgz",
"integrity": "sha512-cv9v1mYYBcAnZq4MHseJ9AIdjQmNahnpCpPO46oTkQJS2GggsBp2azHjNpAuQ95Epvsg+AIsyjYhfI9YwFxGSA==",
"dev": true,
"requires": {
"browserslist": "^3.2.8",
"caniuse-lite": "^1.0.30000850",
"caniuse-lite": "^1.0.30000851",
"normalize-range": "^0.1.2",
"num2fraction": "^1.2.2",
"postcss": "^6.0.22",
......
......@@ -39,8 +39,8 @@
"yamljs": "^0.3.0"
},
"devDependencies": {
"@vue/test-utils": "^1.0.0-beta.16",
"autoprefixer": "^8.6.1",
"@vue/test-utils": "^1.0.0-beta.18",
"autoprefixer": "^8.6.2",
"babel-core": "^6.26.3",
"babel-eslint": "^8.2.3",
"babel-jest": "^23.0.1",
......
......@@ -28,7 +28,7 @@
</div>
<div v-if="isOldAuditevents" class="message is-warning">
<div class="message-body">
<p>Audit Log is not supported for Spring Boot 1.x applications.</p>
Audit Log is not supported for Spring Boot 1.x applications.
</div>
</div>
<auditevents-list v-if="events" :instance="instance" :events="events"/>
......
<!--
- Copyright 2014-2018 the original author or authors.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-->
<template>
<section class="section heapdump">
<div>
<div class="message is-warning">
<div class="message-body">
A heap dump may contain <strong>sensitive data</strong>.<br>Please handle with care.
</div>
</div>
<div class="message is-warning">
<div class="message-body">
Dumping the heap may be expensive in terms of cpu and disk space.
</div>
</div>
<a class="button is-primary" :href="`instances/${instance.id}/actuator/heapdump`" target="_blank">
<font-awesome-icon icon="download"/>&nbsp;Download Heap Dump
</a>
</div>
</section>
</template>
<script>
import Instance from '@/services/instance';
export default {
props: {
instance: {
type: Instance,
required: true
}
}
}
</script>
<style lang="scss">
.heapdump {
display: flex;
justify-content: space-around;
& > div {
display: flex;
flex-direction: column;
}
}
</style>
......@@ -18,6 +18,7 @@ import sbaInstancesAuditevents from './auditevents';
import sbaInstancesDetails from './details';
import sbaInstancesEnv from './env';
import sbaInstancesFlyway from './flyway';
import sbaInstancesHeapdump from './heapdump';
import sbaInstancesTrace from './httptrace';
import sbaInstancesJolokia from './jolokia';
import sbaInstancesLiquibase from './liquibase';
......@@ -54,6 +55,8 @@ export default [{
path: 'flyway', component: sbaInstancesFlyway, props: true, name: 'instance/flyway'
}, {
path: 'threaddump', component: sbaInstancesThreaddump, props: true, name: 'instance/threaddump'
}, {
path: 'heapdump', component: sbaInstancesHeapdump, props: true, name: 'instance/heapdump'
}]
}, {
name: 'instance/details',
......@@ -106,8 +109,7 @@ export default [{
isActive: ({instance}) => instance.hasEndpoint('sessions')
}, {
name: 'instance/heapdump',
href: params => `instances/${params.instanceId}/actuator/heapdump`,
handle: 'Heapdump',
handle: 'Heap Dump',
order: 800,
isActive: ({instance}) => instance.hasEndpoint('heapdump')
}, {
......
......@@ -32,7 +32,7 @@
<sba-icon-button :disabled="atBottom" @click="scrollToBottom" icon="step-forward" size="lg"
icon-class="rotated"/>
</div>
<a class="button" v-if="instance" :href="`instances/${instance.id}/logfile`" target="_blank">
<a class="button" :href="`instances/${instance.id}/logfile`" target="_blank">
<font-awesome-icon icon="download"/>&nbsp;Download
</a>
</div>
......
......@@ -28,7 +28,7 @@
</div>
<div v-if="isOldMetrics" class="message is-warning">
<div class="message-body">
<p>Metrics are not supported for Spring Boot 1.x applications.</p>
Metrics are not supported for Spring Boot 1.x applications.
</div>
</div>
<form @submit.prevent="handleSubmit" class="field" v-else-if="availableMetrics.length > 0">
......
......@@ -15,7 +15,7 @@
-->
<template>
<div>
<div class="instances">
<sba-instance-header :instance="instance" :application="application" :class="headerClass"/>
<sba-instance-tabs :views="instanceViews" :instance="instance" :application="application" :class="headerClass"/>
<router-view v-if="instance" :instance="instance"/>
......@@ -76,3 +76,11 @@
}
}
</script>
<style lang="scss">
.instances {
flex-grow: 1;
display: flex;
flex-direction: column;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment