Rename things to future naming scheme

This commit is contained in:
Vincent Fiduccia 2019-09-19 16:33:28 -07:00
parent d690ecfcb4
commit bd5bea8884
No known key found for this signature in database
GPG Key ID: 2B29AD6BB2BB2582
8 changed files with 28 additions and 36 deletions

View File

@ -21,7 +21,7 @@ export default {
return {
obj,
value
value: value.data
};
}
};

View File

@ -27,7 +27,7 @@ export default {
return {
obj,
value
value: value.data
};
}
};

View File

@ -32,10 +32,10 @@ export const FRIENDLY = {
plural: 'Public Domains',
type: RIO.PUBLIC_DOMAIN
},
riofiles: {
singular: 'Riofile',
plural: 'Riofiles',
type: RIO.RIOFILE
cd: {
singular: 'Continuous Deployment',
plural: 'Continuous Deployments',
type: RIO.CONTINUOUS_DEPLOYMENT
},
routers: {
singular: 'Router',

View File

@ -22,7 +22,7 @@ export default {
return {
obj,
value
value: value.data
};
}
};

View File

@ -56,7 +56,7 @@ export default {
<template>
<div>
<header>
<h1>Apps &amp; Versions</h1>
<h1>Workloads</h1>
<div class="actions">
<nuxt-link to="create" append tag="button" type="button" class="btn bg-primary">
Deploy
@ -86,7 +86,7 @@ export default {
<template #sub-row="scope">
<tr v-for="version in scope.row.spec.revisions" :key="version.serviceName">
<td colspan="2"></td>
<td><BadgeState val="" :col="scope.col" :row="scope.row" /></td>
<td><BadgeState val="ignored" :col="scope.col" :row="scope.row" /></td>
<td>{{ version.serviceName }}</td>
<td align="center">
{{ get(scope.row.weights, version.Version) || 0 }}%

View File

@ -347,7 +347,7 @@ export default {
download() {
return async() => {
const value = await this.followLink('view', { headers: { accept: 'application/yaml' } });
const value = await this.followLink('view', { headers: { accept: 'application/yaml' } }).data;
downloadFile(`${ this.nameDisplay }.yaml`, value, 'application/yaml');
};

View File

@ -42,16 +42,16 @@ export function rioPackage($router, counts, namespaces) {
},
{ divider: true },
{
name: 'rio-apps',
count: countFor(RIO.APP),
label: 'Apps & Versions',
route: linkFor('apps'),
name: 'rio-cd',
count: countFor(RIO.CONTINUOUS_DEPLOYMENT),
label: 'Continuous Deployments',
route: linkFor('cd'),
},
{
name: 'rio-riofiles',
count: countFor(RIO.RIOFILE),
label: 'Riofiles',
route: linkFor('riofiles'),
name: 'rio-workloads',
count: countFor(RIO.APP),
label: 'Workloads',
route: linkFor('workloads'),
},
{
name: 'rio-routers',
@ -153,7 +153,6 @@ function ensureGroup(level, name, route) {
route,
label: groupLabel(name),
children: [],
priority: groupPriority(name),
};
level[name] = group;
}
@ -190,6 +189,10 @@ export function mapGroup(obj) {
return 'api';
}
if ( group === 'cloud.rio.rancher.io' ) {
return 'cloud';
}
if ( group === 'rio.cattle.io' || group.endsWith('.rio.cattle.io') ) {
return 'rio';
}
@ -231,14 +234,3 @@ function groupLabel(group) {
return group.split(/\./).map(x => ucFirst(x)).join('.');
}
function groupPriority(group) {
if ( group === 'apps' ) {
return 1;
}
if ( group === 'core' ) {
return 2;
}
return 99;
}

View File

@ -11,12 +11,12 @@ export const RIO = {
FEATURE: 'admin.rio.cattle.io.v1.feature',
INFO: 'admin.rio.cattle.io.v1.rioinfo',
APP: 'rio.cattle.io.v1.app',
EXTERNAL_SERVICE: 'rio.cattle.io.v1.externalservice',
PUBLIC_DOMAIN: 'rio.cattle.io.v1.publicdomain',
RIOFILE: 'rio.cattle.io.v1.stack',
ROUTER: 'rio.cattle.io.v1.router',
VERSION: 'rio.cattle.io.v1.service',
APP: 'rio.cattle.io.v1.app',
EXTERNAL_SERVICE: 'rio.cattle.io.v1.externalservice',
PUBLIC_DOMAIN: 'rio.cattle.io.v1.publicdomain',
CONTINUOUS_DEPLOYMENT: 'rio.cattle.io.v1.stack',
ROUTER: 'rio.cattle.io.v1.router',
VERSION: 'rio.cattle.io.v1.service',
};
export const RANCHER = {