Commit d3cc7b19 authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch 'vue-i18n-js-serverless-directory' into 'master'

Vue-i18n: autofix for app/assets/javascripts/serverless directory

See merge request gitlab-org/gitlab-ce!30016
parents 1c3576b5 e9588108
...@@ -4,6 +4,7 @@ import { debounceByAnimationFrame } from '~/lib/utils/common_utils'; ...@@ -4,6 +4,7 @@ import { debounceByAnimationFrame } from '~/lib/utils/common_utils';
import dateFormat from 'dateformat'; import dateFormat from 'dateformat';
import { X_INTERVAL } from '../constants'; import { X_INTERVAL } from '../constants';
import { validateGraphData } from '../utils'; import { validateGraphData } from '../utils';
import { __ } from '~/locale';
let debouncedResize; let debouncedResize;
...@@ -42,7 +43,7 @@ export default { ...@@ -42,7 +43,7 @@ export default {
}, },
generateSeries() { generateSeries() {
return { return {
name: 'Invocations', name: __('Invocations'),
type: 'line', type: 'line',
data: this.chartData.requests.map(data => [data.time, data.value]), data: this.chartData.requests.map(data => [data.time, data.value]),
symbolSize: 0, symbolSize: 0,
...@@ -124,7 +125,9 @@ export default { ...@@ -124,7 +125,9 @@ export default {
<div class="prometheus-graph"> <div class="prometheus-graph">
<div class="prometheus-graph-header"> <div class="prometheus-graph-header">
<h5 ref="graphTitle" class="prometheus-graph-title">{{ graphData.title }}</h5> <h5 ref="graphTitle" class="prometheus-graph-title">{{ graphData.title }}</h5>
<div ref="graphWidgets" class="prometheus-graph-widgets"><slot></slot></div> <div ref="graphWidgets" class="prometheus-graph-widgets">
<slot></slot>
</div>
</div> </div>
<gl-area-chart <gl-area-chart
ref="areaChart" ref="areaChart"
...@@ -135,12 +138,8 @@ export default { ...@@ -135,12 +138,8 @@ export default {
:width="width" :width="width"
:include-legend-avg-max="false" :include-legend-avg-max="false"
> >
<template slot="tooltipTitle"> <template slot="tooltipTitle">{{ tooltipPopoverTitle }}</template>
{{ tooltipPopoverTitle }} <template slot="tooltipContent">{{ tooltipPopoverContent }}</template>
</template>
<template slot="tooltipContent">
{{ tooltipPopoverContent }}
</template>
</gl-area-chart> </gl-area-chart>
</div> </div>
</template> </template>
...@@ -89,7 +89,9 @@ export default { ...@@ -89,7 +89,9 @@ export default {
}} }}
</p> </p>
</div> </div>
<div v-else><p>No pods loaded at this time.</p></div> <div v-else>
<p>{{ s__('ServerlessDetails|No pods loaded at this time.') }}</p>
</div>
<area-chart v-if="hasPrometheusData" :graph-data="graphData" :container-width="elWidth" /> <area-chart v-if="hasPrometheusData" :graph-data="graphData" :container-width="elWidth" />
<missing-prometheus <missing-prometheus
......
<script> <script>
import { sprintf, s__ } from '~/locale';
import { mapState, mapActions, mapGetters } from 'vuex'; import { mapState, mapActions, mapGetters } from 'vuex';
import { GlLoadingIcon } from '@gitlab/ui'; import { GlLoadingIcon } from '@gitlab/ui';
import FunctionRow from './function_row.vue'; import FunctionRow from './function_row.vue';
...@@ -37,6 +38,28 @@ export default { ...@@ -37,6 +38,28 @@ export default {
isInstalled() { isInstalled() {
return this.installed === true; return this.installed === true;
}, },
noServerlessConfigFile() {
return sprintf(
s__(
'Serverless|Your repository does not have a corresponding %{startTag}serverless.yml%{endTag} file.',
),
{ startTag: '<code>', endTag: '</code>' },
);
},
noGitlabYamlConfigured() {
return sprintf(
s__('Serverless|Your %{startTag}.gitlab-ci.yml%{endTag} file is not properly configured.'),
{ startTag: '<code>', endTag: '</code>' },
);
},
mismatchedServerlessFunctions() {
return sprintf(
s__(
"Serverless|The functions listed in the %{startTag}serverless.yml%{endTag} file don't match the namespace of your cluster.",
),
{ startTag: '<code>', endTag: '</code>' },
);
},
}, },
created() { created() {
this.fetchFunctions({ this.fetchFunctions({
...@@ -82,25 +105,29 @@ export default { ...@@ -82,25 +105,29 @@ export default {
<h4 class="state-title text-center">{{ s__('Serverless|No functions available') }}</h4> <h4 class="state-title text-center">{{ s__('Serverless|No functions available') }}</h4>
<p class="state-description"> <p class="state-description">
{{ {{
s__(`Serverless|There is currently no function data available from Knative. s__(
This could be for a variety of reasons including:`) 'Serverless|There is currently no function data available from Knative. This could be for a variety of reasons including:',
)
}} }}
</p> </p>
<ul> <ul>
<li>Your repository does not have a corresponding <code>serverless.yml</code> file.</li>
<li>Your <code>.gitlab-ci.yml</code> file is not properly configured.</li>
<li> <li>
The functions listed in the <code>serverless.yml</code> file don't match the namespace {{ noServerlessConfigFile }}
of your cluster. </li>
<li>
{{ noGitlabYamlConfigured }}
</li>
<li>
{{ mismatchedServerlessFunctions }}
</li> </li>
<li>The deploy job has not finished.</li> <li>{{ s__('Serverless|The deploy job has not finished.') }}</li>
</ul> </ul>
<p> <p>
{{ {{
s__(`Serverless|If you believe none of these apply, please check s__(
back later as the function data may be in the process of becoming 'Serverless|If you believe none of these apply, please check back later as the function data may be in the process of becoming available.',
available.`) )
}} }}
</p> </p>
<div class="text-center"> <div class="text-center">
......
...@@ -5559,6 +5559,9 @@ msgstr "" ...@@ -5559,6 +5559,9 @@ msgstr ""
msgid "Invite member" msgid "Invite member"
msgstr "" msgstr ""
msgid "Invocations"
msgstr ""
msgid "Invoke Count" msgid "Invoke Count"
msgstr "" msgstr ""
...@@ -9198,6 +9201,9 @@ msgstr "" ...@@ -9198,6 +9201,9 @@ msgstr ""
msgid "ServerlessDetails|More information" msgid "ServerlessDetails|More information"
msgstr "" msgstr ""
msgid "ServerlessDetails|No pods loaded at this time."
msgstr ""
msgid "ServerlessDetails|Number of Kubernetes pods in use over time based on necessity." msgid "ServerlessDetails|Number of Kubernetes pods in use over time based on necessity."
msgstr "" msgstr ""
...@@ -9228,9 +9234,21 @@ msgstr "" ...@@ -9228,9 +9234,21 @@ msgstr ""
msgid "Serverless|No functions available" msgid "Serverless|No functions available"
msgstr "" msgstr ""
msgid "Serverless|The deploy job has not finished."
msgstr ""
msgid "Serverless|The functions listed in the %{startTag}serverless.yml%{endTag} file don't match the namespace of your cluster."
msgstr ""
msgid "Serverless|There is currently no function data available from Knative. This could be for a variety of reasons including:" msgid "Serverless|There is currently no function data available from Knative. This could be for a variety of reasons including:"
msgstr "" msgstr ""
msgid "Serverless|Your %{startTag}.gitlab-ci.yml%{endTag} file is not properly configured."
msgstr ""
msgid "Serverless|Your repository does not have a corresponding %{startTag}serverless.yml%{endTag} file."
msgstr ""
msgid "Service" msgid "Service"
msgstr "" msgstr ""
......
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