mirror of https://github.com/rancher/dashboard.git
move default service types list to types
This commit is contained in:
parent
d881603d95
commit
435c4204c1
|
|
@ -1,6 +1,5 @@
|
|||
<script>
|
||||
import { isEmpty } from 'lodash';
|
||||
// import { escapeHtml } from '@/utils/string';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
|
|
|
|||
|
|
@ -1,26 +1,5 @@
|
|||
<script>
|
||||
export const DEFAULT_SERVICE_TYPES = [
|
||||
{
|
||||
id: 'ClusterIP',
|
||||
translationLabel: 'serviceTypes.clusterip'
|
||||
},
|
||||
{
|
||||
id: 'ExternalName',
|
||||
translationLabel: 'serviceTypes.externalname'
|
||||
},
|
||||
{
|
||||
id: 'Headless',
|
||||
translationLabel: 'serviceTypes.headless'
|
||||
},
|
||||
{
|
||||
id: 'LoadBalancer',
|
||||
translationLabel: 'serviceTypes.loadbalancer'
|
||||
},
|
||||
{
|
||||
id: 'NodePort',
|
||||
translationLabel: 'serviceTypes.nodeport'
|
||||
},
|
||||
];
|
||||
import { DEFAULT_SERVICE_TYPES } from '@/config/types';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
|
|
@ -34,7 +13,7 @@ export default {
|
|||
const { translationLabel } = match;
|
||||
let translated;
|
||||
|
||||
if (translationLabel) {
|
||||
if (translationLabel && this.$store.getters['i18n/exists'](translationLabel)) {
|
||||
translated = this.$store.getters['i18n/t'](translationLabel);
|
||||
} else {
|
||||
translated = this.value;
|
||||
|
|
|
|||
|
|
@ -133,3 +133,26 @@ global:
|
|||
};
|
||||
|
||||
export const SYSTEM_PROJECT_LABEL = 'authz.management.cattle.io/system-project';
|
||||
|
||||
export const DEFAULT_SERVICE_TYPES = [
|
||||
{
|
||||
id: 'ClusterIP',
|
||||
translationLabel: 'serviceTypes.clusterip'
|
||||
},
|
||||
{
|
||||
id: 'ExternalName',
|
||||
translationLabel: 'serviceTypes.externalname'
|
||||
},
|
||||
{
|
||||
id: 'Headless',
|
||||
translationLabel: 'serviceTypes.headless'
|
||||
},
|
||||
{
|
||||
id: 'LoadBalancer',
|
||||
translationLabel: 'serviceTypes.loadbalancer'
|
||||
},
|
||||
{
|
||||
id: 'NodePort',
|
||||
translationLabel: 'serviceTypes.nodeport'
|
||||
},
|
||||
];
|
||||
|
|
|
|||
Loading…
Reference in New Issue