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

57 lines
1.2 KiB
Vue
Raw Normal View History

2019-03-02 22:35:43 +05:30
<script>
import PodBox from './pod_box.vue';
import Url from './url.vue';
export default {
components: {
PodBox,
Url,
},
props: {
func: {
type: Object,
required: true,
},
},
computed: {
name() {
return this.func.name;
},
description() {
2019-05-30 16:15:17 +05:30
return this.func.description;
2019-03-02 22:35:43 +05:30
},
funcUrl() {
return this.func.url;
},
podCount() {
2019-05-30 16:15:17 +05:30
return this.func.podcount || 0;
2019-03-02 22:35:43 +05:30
},
},
};
</script>
<template>
<section id="serverless-function-details">
2019-05-30 16:15:17 +05:30
<h3>{{ name }}</h3>
<div class="append-bottom-default">
2019-03-02 22:35:43 +05:30
<div v-for="(line, index) in description.split('\n')" :key="index">{{ line }}</div>
</div>
<url :uri="funcUrl" />
<h4>{{ s__('ServerlessDetails|Kubernetes Pods') }}</h4>
<div v-if="podCount > 0">
<p>
<b v-if="podCount == 1">{{ podCount }} {{ s__('ServerlessDetails|pod in use') }}</b>
<b v-else>{{ podCount }} {{ s__('ServerlessDetails|pods in use') }}</b>
</p>
<pod-box :count="podCount" />
<p>
{{
s__('ServerlessDetails|Number of Kubernetes pods in use over time based on necessity.')
}}
</p>
</div>
<div v-else><p>No pods loaded at this time.</p></div>
</section>
</template>