debian-mirror-gitlab/app/assets/javascripts/serverless/components/missing_prometheus.vue

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

58 lines
1.5 KiB
Vue
Raw Normal View History

2019-07-07 11:18:12 +05:30
<script>
2021-01-03 14:25:43 +05:30
import { GlButton, GlLink } from '@gitlab/ui';
2020-10-24 23:57:45 +05:30
import { mapState } from 'vuex';
2022-06-21 17:19:12 +05:30
import { s__ } from '~/locale';
2019-07-07 11:18:12 +05:30
export default {
components: {
2021-01-03 14:25:43 +05:30
GlButton,
2019-07-07 11:18:12 +05:30
GlLink,
},
props: {
missingData: {
type: Boolean,
required: true,
},
},
computed: {
2020-10-24 23:57:45 +05:30
...mapState(['clustersPath', 'helpPath']),
2019-07-07 11:18:12 +05:30
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__(
2021-09-04 01:27:46 +05:30
`ServerlessDetails|Function invocation metrics require the Prometheus cluster integration.`,
2019-07-07 11:18:12 +05:30
);
},
},
};
</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">
2021-01-03 14:25:43 +05:30
<gl-button :href="clustersPath" variant="success" category="primary">
2021-09-04 01:27:46 +05:30
{{ s__('ServerlessDetails|Configure cluster.') }}
2021-01-03 14:25:43 +05:30
</gl-button>
2019-07-07 11:18:12 +05:30
</div>
</div>
</div>
</div>
</template>