Vue-i18n: app/assets/javascripts/serverless directory
i18n linting for .vue files under the app/assets/javascripts/serverless directory
This commit is contained in:
parent
1c3576b51e
commit
e9588108a4
4 changed files with 65 additions and 19 deletions
|
@ -4,6 +4,7 @@ import { debounceByAnimationFrame } from '~/lib/utils/common_utils';
|
|||
import dateFormat from 'dateformat';
|
||||
import { X_INTERVAL } from '../constants';
|
||||
import { validateGraphData } from '../utils';
|
||||
import { __ } from '~/locale';
|
||||
|
||||
let debouncedResize;
|
||||
|
||||
|
@ -42,7 +43,7 @@ export default {
|
|||
},
|
||||
generateSeries() {
|
||||
return {
|
||||
name: 'Invocations',
|
||||
name: __('Invocations'),
|
||||
type: 'line',
|
||||
data: this.chartData.requests.map(data => [data.time, data.value]),
|
||||
symbolSize: 0,
|
||||
|
@ -124,7 +125,9 @@ export default {
|
|||
<div class="prometheus-graph">
|
||||
<div class="prometheus-graph-header">
|
||||
<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>
|
||||
<gl-area-chart
|
||||
ref="areaChart"
|
||||
|
@ -135,12 +138,8 @@ export default {
|
|||
:width="width"
|
||||
:include-legend-avg-max="false"
|
||||
>
|
||||
<template slot="tooltipTitle">
|
||||
{{ tooltipPopoverTitle }}
|
||||
</template>
|
||||
<template slot="tooltipContent">
|
||||
{{ tooltipPopoverContent }}
|
||||
</template>
|
||||
<template slot="tooltipTitle">{{ tooltipPopoverTitle }}</template>
|
||||
<template slot="tooltipContent">{{ tooltipPopoverContent }}</template>
|
||||
</gl-area-chart>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -89,7 +89,9 @@ export default {
|
|||
}}
|
||||
</p>
|
||||
</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" />
|
||||
<missing-prometheus
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<script>
|
||||
import { sprintf, s__ } from '~/locale';
|
||||
import { mapState, mapActions, mapGetters } from 'vuex';
|
||||
import { GlLoadingIcon } from '@gitlab/ui';
|
||||
import FunctionRow from './function_row.vue';
|
||||
|
@ -37,6 +38,28 @@ export default {
|
|||
isInstalled() {
|
||||
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() {
|
||||
this.fetchFunctions({
|
||||
|
@ -82,25 +105,29 @@ export default {
|
|||
<h4 class="state-title text-center">{{ s__('Serverless|No functions available') }}</h4>
|
||||
<p class="state-description">
|
||||
{{
|
||||
s__(`Serverless|There is currently no function data available from Knative.
|
||||
This could be for a variety of reasons including:`)
|
||||
s__(
|
||||
'Serverless|There is currently no function data available from Knative. This could be for a variety of reasons including:',
|
||||
)
|
||||
}}
|
||||
</p>
|
||||
<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>
|
||||
The functions listed in the <code>serverless.yml</code> file don't match the namespace
|
||||
of your cluster.
|
||||
{{ noServerlessConfigFile }}
|
||||
</li>
|
||||
<li>The deploy job has not finished.</li>
|
||||
<li>
|
||||
{{ noGitlabYamlConfigured }}
|
||||
</li>
|
||||
<li>
|
||||
{{ mismatchedServerlessFunctions }}
|
||||
</li>
|
||||
<li>{{ s__('Serverless|The deploy job has not finished.') }}</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
{{
|
||||
s__(`Serverless|If you believe none of these apply, please check
|
||||
back later as the function data may be in the process of becoming
|
||||
available.`)
|
||||
s__(
|
||||
'Serverless|If you believe none of these apply, please check back later as the function data may be in the process of becoming available.',
|
||||
)
|
||||
}}
|
||||
</p>
|
||||
<div class="text-center">
|
||||
|
|
|
@ -5559,6 +5559,9 @@ msgstr ""
|
|||
msgid "Invite member"
|
||||
msgstr ""
|
||||
|
||||
msgid "Invocations"
|
||||
msgstr ""
|
||||
|
||||
msgid "Invoke Count"
|
||||
msgstr ""
|
||||
|
||||
|
@ -9198,6 +9201,9 @@ msgstr ""
|
|||
msgid "ServerlessDetails|More information"
|
||||
msgstr ""
|
||||
|
||||
msgid "ServerlessDetails|No pods loaded at this time."
|
||||
msgstr ""
|
||||
|
||||
msgid "ServerlessDetails|Number of Kubernetes pods in use over time based on necessity."
|
||||
msgstr ""
|
||||
|
||||
|
@ -9228,9 +9234,21 @@ msgstr ""
|
|||
msgid "Serverless|No functions available"
|
||||
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:"
|
||||
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"
|
||||
msgstr ""
|
||||
|
||||
|
|
Loading…
Reference in a new issue