2019-07-07 11:18:12 +05:30
|
|
|
<script>
|
2020-04-22 19:07:51 +05:30
|
|
|
import { GlDeprecatedButton, GlLink } from '@gitlab/ui';
|
2019-07-07 11:18:12 +05:30
|
|
|
import { s__ } from '../../locale';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
2020-04-22 19:07:51 +05:30
|
|
|
GlDeprecatedButton,
|
2019-07-07 11:18:12 +05:30
|
|
|
GlLink,
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
clustersPath: {
|
|
|
|
type: String,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
helpPath: {
|
|
|
|
type: String,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
missingData: {
|
|
|
|
type: Boolean,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
missingStateClass() {
|
|
|
|
return this.missingData ? 'missing-prometheus-state' : 'empty-prometheus-state';
|
|
|
|
},
|
|
|
|
prometheusHelpPath() {
|
|
|
|
return `${this.helpPath}#prometheus-support`;
|
|
|
|
},
|
|
|
|
description() {
|
|
|
|
return this.missingData
|
|
|
|
? s__(`ServerlessDetails|Invocation metrics loading or not available at this time.`)
|
|
|
|
: s__(
|
|
|
|
`ServerlessDetails|Function invocation metrics require Prometheus to be installed first.`,
|
|
|
|
);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<div class="row" :class="missingStateClass">
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="text-content">
|
|
|
|
<h4 class="state-title text-left">{{ s__(`ServerlessDetails|Invocations`) }}</h4>
|
|
|
|
<p class="state-description">
|
|
|
|
{{ description }}
|
|
|
|
<gl-link :href="prometheusHelpPath">{{
|
|
|
|
s__(`ServerlessDetails|More information`)
|
|
|
|
}}</gl-link
|
|
|
|
>.
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<div v-if="!missingData" class="text-left">
|
2020-04-22 19:07:51 +05:30
|
|
|
<gl-deprecated-button :href="clustersPath" variant="success">
|
2019-07-07 11:18:12 +05:30
|
|
|
{{ s__('ServerlessDetails|Install Prometheus') }}
|
2020-04-22 19:07:51 +05:30
|
|
|
</gl-deprecated-button>
|
2019-07-07 11:18:12 +05:30
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|