stacks wip

This commit is contained in:
Vincent Fiduccia 2017-03-11 13:54:00 -07:00
parent 708edf75d0
commit 38254f930f
No known key found for this signature in database
GPG Key ID: 2B29AD6BB2BB2582
27 changed files with 162 additions and 494 deletions

View File

@ -8,7 +8,7 @@
<section class="instances">
{{#sortable-table
classNames="lacsso grid sortable-table"
classNames="grid sortable-table"
bulkActions=false
paging=false
fullRows=true

View File

@ -49,7 +49,7 @@
</div>
</div>
{{#sortable-table
classNames="lacsso grid sortable-table"
classNames="grid sortable-table"
bulkActions=false
paging=showPagination
perPage=prefs.tablePerPage
@ -79,7 +79,7 @@
<td data-title="{{t 'auditLogsPage.table.identity'}}:">{{identity-block identityNotParsed=log.authenticatedAsIdentityId}}</td>
<td data-title="{{t 'auditLogsPage.table.authIp'}}:" class="clip">{{auth-type log.authType}}<div>{{format-ip log.clientIp noIp='generic.emptyString'}}</div></td>
{{else if (eq kind "norows")}}
<td colspan="{{headers.length}}" class="text-center text-muted lacsso pt-20 pb-20">{{t 'processesPage.summary.noData'}}</td>
<td colspan="{{headers.length}}" class="text-center text-muted pt-20 pb-20">{{t 'processesPage.summary.noData'}}</td>
{{/if}}
{{/sortable-table}}
</div>

View File

@ -8,7 +8,7 @@
<section class="instances">
{{#sortable-table
classNames="lacsso grid sortable-table"
classNames="grid sortable-table"
bulkActions=false
paging=false
search=false
@ -25,7 +25,7 @@
<td>{{date-str member.heartbeat}}</td>
{{else if (eq kind "norows")}}
<tr>
<td colspan="{{headers.length}}" class="text-center text-muted lacsso pt-20 pb-20">{{t 'processesPage.summary.noData'}}</td>
<td colspan="{{headers.length}}" class="text-center text-muted pt-20 pb-20">{{t 'processesPage.summary.noData'}}</td>
</tr>
{{/if}}
{{/sortable-table}}

View File

@ -1,5 +1,5 @@
{{#sortable-table
classNames="lacsso grid sortable-table"
classNames="grid sortable-table"
bulkActions=false
prefix=true
paging=false
@ -15,9 +15,9 @@
<td data-title="{{dt.ready}}">{{row.ready}}</td>
<td data-title="{{dt.delay}}">{{row.delay}}</td>
{{else if (eq kind "nomatch")}}
<td colspan="{{headers.length}}" class="text-center text-muted lacsso pt-20 pb-20">{{t 'processesPage.summary.noMatch'}}</td>
<td colspan="{{headers.length}}" class="text-center text-muted pt-20 pb-20">{{t 'processesPage.summary.noMatch'}}</td>
{{else if (eq kind "norows")}}
<td colspan="{{headers.length}}" class="text-center text-muted lacsso pt-20 pb-20">{{t 'processesPage.summary.noData'}}</td>
<td colspan="{{headers.length}}" class="text-center text-muted pt-20 pb-20">{{t 'processesPage.summary.noData'}}</td>
{{else if (and model.summary.length (eq kind "prefix"))}}
<tr class="total">
<td data-title="{{dt.name}}">{{total.processName}}</td>

View File

@ -1,6 +1,6 @@
{{arranged.length}}
{{#sortable-table
classNames="lacsso grid sortable-table"
classNames="grid sortable-table"
prefix=true
bulkActions=false
paging=true
@ -63,8 +63,8 @@
{{action-menu model=row showPrimary=false}}
</td>
{{else if (eq kind "nomatch")}}
<td colspan="{{headers.length}}" class="text-center text-muted lacsso pt-20 pb-20">{{t 'processesPage.list.noMatch'}}</td>
<td colspan="{{headers.length}}" class="text-center text-muted pt-20 pb-20">{{t 'processesPage.list.noMatch'}}</td>
{{else if (eq kind "norows")}}
<td colspan="{{headers.length}}" class="text-center text-muted lacsso pt-20 pb-20">{{t 'processesPage.list.noData' which=which}}</td>
<td colspan="{{headers.length}}" class="text-center text-muted pt-20 pb-20">{{t 'processesPage.list.noData' which=which}}</td>
{{/if}}
{{/sortable-table}}

View File

@ -1,5 +1,5 @@
{{#sortable-table
classNames="lacsso grid sortable-table"
classNames="grid sortable-table"
bulkActions=false
paging=false
search=false
@ -33,11 +33,11 @@
</td>
{{else if (eq kind "nomatch")}}
<tr>
<td colspan="{{headers.length}}" class="text-center text-muted lacsso pt-20 pb-20">{{t 'processesPage.pools.noMatch'}}</td>
<td colspan="{{headers.length}}" class="text-center text-muted pt-20 pb-20">{{t 'processesPage.pools.noMatch'}}</td>
</tr>
{{else if (eq kind "norows")}}
<tr>
<td colspan="{{headers.length}}" class="text-center text-muted lacsso pt-20 pb-20">{{t 'processesPage.pools.noData'}}</td>
<td colspan="{{headers.length}}" class="text-center text-muted pt-20 pb-20">{{t 'processesPage.pools.noData'}}</td>
</tr>
{{/if}}
{{/sortable-table}}

View File

@ -1,15 +1,15 @@
<section class="header has-tabs clearfix">
<h1>{{t 'processesPage.header'}}</h1>
<ul class="lacsso tab-nav">
<li class="lacsso">{{#link-to 'admin-tab.processes.index' replace=true class="lacsso"}}{{t 'processesPage.tab.summary'}}{{/link-to}}</li>
<li class="lacsso hide">{{#link-to 'admin-tab.processes.pools' replace=true class="lacsso"}}{{t 'processesPage.tab.pools'}}{{/link-to}}</li>
<li class="lacsso">{{#link-to 'admin-tab.processes.list' (query-params which="running") replace=true class="lacsso"}}{{t 'processesPage.tab.running'}}{{/link-to}}</li>
<li class="lacsso">{{#link-to 'admin-tab.processes.list' (query-params which="ready") replace=true class="lacsso"}}{{t 'processesPage.tab.ready'}}{{/link-to}}</li>
<li class="lacsso">{{#link-to 'admin-tab.processes.list' (query-params which="delayed") replace=true class="lacsso"}}{{t 'processesPage.tab.delayed'}}{{/link-to}}</li>
<li class="lacsso">{{#link-to 'admin-tab.processes.list' (query-params which="completed") replace=true class="lacsso"}}{{t 'processesPage.tab.completed'}}{{/link-to}}</li>
<ul class="tab-nav">
<li>{{#link-to 'admin-tab.processes.index' replace=true}}{{t 'processesPage.tab.summary'}}{{/link-to}}</li>
<li class="hide">{{#link-to 'admin-tab.processes.pools' replace=true}}{{t 'processesPage.tab.pools'}}{{/link-to}}</li>
<li>{{#link-to 'admin-tab.processes.list' (query-params which="running") replace=true}}{{t 'processesPage.tab.running'}}{{/link-to}}</li>
<li>{{#link-to 'admin-tab.processes.list' (query-params which="ready") replace=true}}{{t 'processesPage.tab.ready'}}{{/link-to}}</li>
<li>{{#link-to 'admin-tab.processes.list' (query-params which="delayed") replace=true}}{{t 'processesPage.tab.delayed'}}{{/link-to}}</li>
<li>{{#link-to 'admin-tab.processes.list' (query-params which="completed") replace=true}}{{t 'processesPage.tab.completed'}}{{/link-to}}</li>
</ul>
</section>
<div class="lacsso tab-content">
<div class="tab-content">
{{outlet}}
</div>

View File

@ -1,114 +0,0 @@
import Ember from 'ember';
import ManageLabels from 'ui/mixins/manage-labels';
import C from 'ui/utils/constants';
export default Ember.Component.extend(ManageLabels, {
service: null,
show: false,
activeTab: '',
tagName: 'div',
classNames: ['service-addtl-info', 'collapse'],
actions: {
selectTab(tab) {
this.set('activeTab', tab);
},
dismiss() {
this.sendAction('dismiss');
},
},
didReceiveAttrs() {
this.serviceChanged();
},
stateBackground: function() {
return this.get('service.stateColor').replace("text-", "bg-");
}.property('service.stateColor'),
showChanged: function() {
if (this.get('show'))
{
$('.stacks-wrap').addClass('summary-shown');
this.$().show().animate({height: '260px'}, 250, 'easeOutBack');
}
else
{
this.$().animate({height: '0'}, 250, () => {
if ( this._state === 'inDOM' )
{
this.$().hide();
}
$('.stacks-wrap').removeClass('summary-shown');
});
this.setProperties({
primaryContainers: null,
sidekicks: null,
service: null,
});
}
}.observes('show'),
primaryContainers: null,
sidekicks: null,
serviceChanged: function() {
if ( !this.get('service') )
{
return;
}
this.initLabels(this.get('service.launchConfig.labels'));
this.set('activeTab','');
var primary = [];
var sidekicks = [];
var sidekickByName = {};
var slcs = (this.get('service.secondaryLaunchConfigs')||[]);
slcs.forEach((config) => {
var obj = {
name: config.name,
config: config,
instances: [],
};
sidekicks.push(obj);
sidekickByName[config.name] = obj;
});
(this.get('service.instances')||[]).forEach((instance) => {
var lc = instance.get('labels')[C.LABEL.LAUNCH_CONFIG];
if ( C.REMOVEDISH_STATES.includes(instance.state) )
{
return;
}
// Primary service
if ( lc === C.LABEL.LAUNCH_CONFIG_PRIMARY)
{
primary.push(instance);
}
else
{
// Sidekick services
var sidekick = sidekickByName[lc];
if ( sidekick )
{
sidekick.instances.push(instance);
}
}
});
this.setProperties({
primaryContainers: primary,
sidekicks: sidekicks,
});
}.observes('service.instances.@each.{state,labels}'),
});

View File

@ -1,43 +0,0 @@
<div class="row-same-height row-full-height tabs">
<ul class="tab-header">
<li class="{{if (eq activeTab '') 'active'}}">
<span class='close' {{action 'dismiss'}}><i class="icon icon-x"></i></span>
<a href="#" class="clip" {{action 'selectTab' ''}}>{{service.name}}</a>
</li>
{{#each sidekicks as |sidekick|}}
<li class="{{if (eq activeTab sidekick.name) 'active'}}">
<a href="#" class="clip" {{action 'selectTab' sidekick.name}}>{{sidekick.name}}</a>
</li>
{{/each}}
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="{{unless (eq activeTab '') 'hide'}}">
<div class="inner">
{{#if (eq service.type 'loadBalancerService')}}
{{lb-addtl-info service=service containers=primaryContainers}}
{{else}}
{{#if (eq service.type 'dnsService')}}
{{partial 'alias-service-addtl-info'}}
{{else}}
{{#if (eq service.type 'externalService')}}
{{partial 'ext-service-addtl-info'}}
{{else}}
{{partial 'service-addtl-info'}}
{{/if}}
{{/if}}
{{/if}}
</div>
</div>
{{#each sidekicks as |sidekick|}}
<div class="{{unless (eq activeTab sidekick.name) 'hide'}}">
<div class="inner">
{{sidekick-addtl-info sidekick=sidekick.config containers=sidekick.instances}}
</div>
</div>
{{/each}}
</div>
{{yield}}
</div>

View File

@ -117,6 +117,6 @@
{{/if}}
</tbody>
</table>
{{#if paging}}
{{#if (and paging filtered.length)}}
{{page-numbers content=pagedContent class="text-center mt-10 mb-10 no-select" indexTo=indexTo indexFrom=indexFrom totalCount=filtered.length textLabel=pagingLabel}}
{{/if}}

View File

@ -123,28 +123,9 @@ export default Ember.Component.extend(ThrottledResize, {
$('#stack-svg svg').css('height', height);
},
showService: function(id) {
let svgHeight;
if ( id ) {
svgHeight = $('#stack-svg').height() - 260; // svg minus the height of info service-addtl-info.scss
this.styleSvg(`${svgHeight}px`);
if (!this.get('model.showServiceInfo')) {
this.zoomAndScale(1.5);
}
this.set('model.showServiceInfo', true);
this.set('model.selectedService', this.get('model.stack.services').findBy('id', id));
} else {
svgHeight = $('#stack-svg').height() - 0; // svg minus the height of info service-addtl-info.scss
showService: function() {
let svgHeight = $('#stack-svg').height() - 0; // svg minus the height of info service-addtl-info.scss
this.styleSvg(svgHeight);
if (this.get('model.showServiceInfo')) {
this.zoomAndScale(2);
}
this.set('model.showServiceInfo', null);
}
},
crosslinkServices: function() {

View File

@ -106,9 +106,6 @@
{{#if service.showTransitioningMessage}}
<span class="{{service.stateColor}}">({{service.transitioningMessage}})</span>
{{/if}}
<a type="button" class="bg-transparent" role="button" {{action 'addtlInfo' service}}>
<i class="icon icon-info addtl-info-trigger"/>
</a>
{{#if service.isError}}
{{#link-to "service.log" service.stackId service.id class="bg-transparent"}}<i class="icon icon-alert"/>{{/link-to}}
{{/if}}

View File

@ -79,14 +79,14 @@ export default Ember.Controller.extend({
sort: ['memory','displayName'],
searchField: 'memoryBlurb',
width: 80,
icon: 'icon icon-lg icon-memory',
translationKey: 'hostsPage.index.table.memory',
},
{
name: 'docker',
sort: ['dockerEngineVersion','displayName'],
searchField: 'dockerEngineVersion',
width: 125,
icon: 'icon icon-lg icon-docker',
width: 110,
translationKey: 'hostsPage.index.table.docker',
},
{
name: 'instanceCount',

View File

@ -1,12 +1,15 @@
<section class="header clearfix">
<section class="header has-tabs clearfix">
<h1>{{t 'hostsPage.index.header'}}</h1>
<div class="btn-group pull-right">
<div class="right-buttons">
{{#link-to "hosts.new" classNames="btn btn-sm bg-primary pull-right"}}{{t 'hostsPage.index.addHost'}}{{/link-to}}
<div class="btn-group pull-right p-0 mr-20">
{{#link-to "hosts" (query-params mode="list") classNames="btn btn-sm bg-default"}}{{tooltip-link icon="icon-hamburger-nav" text=(t 'hostsPage.index.tooltip.listView') options=listLinkOptions}}{{/link-to}}
{{#link-to "hosts" (query-params mode="dot") classNames="btn btn-sm bg-default"}}{{tooltip-link icon="icon-ellipsis" text=(t 'hostsPage.index.tooltip.iconView') options=listLinkOptions}}{{/link-to}}
{{#link-to "hosts" (query-params mode="grouped") classNames="btn btn-sm bg-default"}}{{tooltip-link icon="icon-layeredgroup" text=(t 'hostsPage.index.tooltip.groupedView') options=groupLinkOptions}}{{/link-to}}
</div>
{{#link-to "hosts.new" classNames="btn btn-sm bg-primary"}}{{t 'hostsPage.index.addHost'}}{{/link-to}}
</div>
</section>

View File

@ -1,6 +1,4 @@
<div id="chart-svg">
{{svg-service-graph services=model.services action='openInfo'}}
</div>
{{#service-addtl-info service=selectedService show=showAddtlInfo dismiss='dismiss'}}
{{/service-addtl-info}}

View File

@ -3,13 +3,9 @@ import Ember from 'ember';
export default Ember.Controller.extend({
stack: Ember.computed.alias('model.stack'),
showServiceInfo: null,
selectedService: null,
noServices: false,
actions: {
dismiss: function() {
this.set('showServiceInfo',false);
},
setNoServices: function(val) {
this.set('noServices', val);
}

View File

@ -9,7 +9,6 @@ export default Ember.Route.extend({
if (isExiting)
{
controller.setProperties({
showServiceInfo: false,
selectedService: null,
});
}

View File

@ -1,4 +1,4 @@
{{stack-header model=model.stack all=model.all.stacks hideAddtlInfo="dismiss"}}
{{stack-header model=model.stack all=model.all.stacks}}
{{#if noServices}}
<div class="stack-section mt-20">
@ -7,5 +7,3 @@
{{/if}}
{{stack-graph model=model setNoServices='setNoServices'}}
{{! The graph container isn't actually in this template because it needs to be higher up in the DOM...}}
{{service-addtl-info service=selectedService show=showServiceInfo dismiss='dismiss'}}

View File

@ -1,5 +1,3 @@
{{stack-header model=model.stack all=model.all.stacks hideAddtlInfo="dismiss"}}
{{stack-header model=model.stack all=model.all.stacks}}
{{stack-section model=model.stack single=true collapsed=false showAddtlInfo=(action "showAddtlInfo") classNames="mt-20"}}
{{service-addtl-info service=selectedService show=showAddtlInfo dismiss='dismiss'}}
{{stack-section model=model.stack single=true collapsed=false classNames="mt-20"}}

View File

@ -9,28 +9,8 @@ export default Ember.Controller.extend(Sortable, {
prefs: Ember.inject.service(),
intl: Ember.inject.service(),
infraTemplates: Ember.computed.alias('stacksController.infraTemplates'),
which: Ember.computed.alias('stacksController.which'),
tags: Ember.computed.alias('stacksController.tags'),
showAddtlInfo: false,
selectedService: null,
actions: {
showAddtlInfo(service) {
this.set('selectedService', service);
this.set('showAddtlInfo', true);
},
dismiss() {
this.set('showAddtlInfo', false);
this.set('selectedService', null);
},
sortResults(name) {
this.get('prefs').set(C.PREFS.SORT_STACKS_BY, name);
this.send('setSort', name);
},
},
filteredStacks: function() {
var which = this.get('which');
@ -61,7 +41,21 @@ export default Ember.Controller.extend(Sortable, {
return out;
// state isn't really a dependency here, but sortable won't recompute when it changes otherwise
}.property('model.stacks.[]','model.stacks.@each.{state,grouping,system}','which','tags','prefs.showSystemResources'),
}.property('model.stacks.@each.{state,grouping,system}','which','tags','prefs.showSystemResources'),
simpleMode: function() {
if ( this.get('which') !== C.EXTERNAL_ID.KIND_ALL ) {
return false;
}
let all = this.get('model.stacks');
if ( all.get('length') > 1 ) {
return false;
}
let stack = all.objectAt(0);
return (stack.get('name')||'').toLowerCase() === 'default';
}.property('which','model.stacks.@each.name'),
sortableContent: Ember.computed.alias('filteredStacks'),
sortBy: 'name',

View File

@ -1,30 +1,25 @@
<section class="header clearfix">
<section class="header has-tabs clearfix">
<h1>
{{t pageHeader name=which tags=tags}}
</h1>
<div class="pull-right">
<label class="text-muted pr-5" style="font-size: 13px;">{{t 'stacksPage.sort.label'}}: </label>
<div class="btn-group pr-0" role="group" aria-label="{{t 'stacksPage.sort.label'}}">
<button {{action 'sortResults' 'state'}} type="button" class="btn btn-sm bg-default {{if (eq sortBy "state") 'active'}}">{{t 'stacksPage.sort.state'}}</button>
<button {{action 'sortResults' 'name'}} type="button" class="btn btn-sm bg-default {{if (eq sortBy "name") 'active'}}">{{t 'stacksPage.sort.name'}}</button>
</div>
<ul class="tab-nav">
<li><a>Volumes</a></li>
<li><a>Balancers</a></li>
<li><a>DNS</a></li>
<li><a>Volumes</a></li>
</ul>
{{#if (eq which "infra")}}
{{#link-to "catalog-tab" projects.current.id (query-params catalogId="all" templateBase="infra") classNames="btn btn-sm bg-primary"}}{{t 'stacksPage.catalogButton'}}{{/link-to}}
{{else}}
{{#link-to "stacks.new" classNames="btn btn-sm bg-primary"}}{{t 'stacksPage.actionButton'}}{{/link-to}}
{{#if arranged.length}}
{{#link-to "catalog-tab" projects.current.id (query-params catalogId="all") classNames="btn btn-sm bg-primary"}}{{t 'stacksPage.catalogButton'}}{{/link-to}}
{{/if}}
{{/if}}
<div class="btn-group pull-right">
{{#link-to "service.new" projects.current.id class="btn btn-sm bg-primary"}}{{t 'stacksPage.header.addContainer'}}{{/link-to}}
{{#link-to "stacks.new" classNames="btn btn-sm bg-primary"}}{{t 'stacksPage.header.uploadCompose'}}{{/link-to}}
</div>
</section>
<section class="stacks-wrap pl-0 pr-0">
<div>
{{#each arranged as |stack|}}
{{stack-section model=stack showAddtlInfo='showAddtlInfo' showAddService=(not stack.system)}}
{{stack-section model=stack showAddService=(not stack.system)}}
{{else}}
{{#if (and model.stacks.length tags)}}
<div class="m-20 text-center text-muted">{{t 'stacksPage.noMatch'}}</div>
@ -36,5 +31,3 @@
{{/each}}
</div>
</section>
{{service-addtl-info service=selectedService dismiss='dismiss' show=showAddtlInfo}}

View File

@ -98,5 +98,4 @@
@import "app/styles/pages/welcome";
@import "app/styles/pages/settings";
@import "app/styles/pages/catalog";
@import "app/styles/pages/service-addtl-info";
@import "app/styles/pages/virtualmachine";

View File

@ -114,16 +114,20 @@ TABLE {
font-weight: normal;
}
}
&.has-sub-rows TABLE > THEAD > TR.fixed-header {
&.has-sub-rows TABLE {
> THEAD > TR.fixed-header {
background: darken($link-color, 15);
}
> TBODY > TR > TD {
border: solid thin $table-border-color;
}
}
> TBODY {
border: none;
background-color: $table-bg;
> TR {
> TD {
border: solid thin $table-border-color;
}
&.row-selected {
background-color: $table-bg-selected;
}

View File

@ -5,18 +5,6 @@ header {
clear: both;
}
.searchable {
position: relative;
.icon-search {
position: absolute;
top: 10px;
left: 10px;
}
.input-sm {
padding: 3px 0 3px 35px;
}
}
.header {
border-bottom: solid 2px $border;
padding: 15px 0;
@ -31,6 +19,12 @@ header {
line-height: 45px;
}
.right-buttons {
@include clearfix;
float: right;
margin-top: 7px;
}
&.has-tabs {
padding: 0;
ul {

View File

@ -1,130 +0,0 @@
.summary-shown {
margin-bottom: 320px;
}
.btn-group{
display: inline-block;
&.no-wrap {
white-space: no-wrap;
.btn {
float: none;
display:inline-block;
margin-left: -4px;
&:first-child {
margin-left: 0;
}
}
}
}
.service-addtl-info {
overflow: visible !important;
position: fixed;
bottom: 0;
left: 0;
height: 260px;
width: 100%;
box-shadow: 0px -1px 14px $shadow;
z-index: 4;
font-size: 13px;
&.collapse {
height: 0;
}
.list-labels {
font-size: 11px;
}
hr {
border-color: $accent-one;
margin: 5px 0;
}
.tabs {
.tab-header li a{
background-color: $tab-active-bg;
}
.tab-content {
overflow-y: auto;
overflow-x: hidden;
background-color: $tab-active-bg;
}
.tab-content,
.tab-pane {
height: 100%;
}
}
table {
&.tight {
th,
td {
font-size: 11px;
}
}
}
// ul.nav-tabs {
// position: absolute;
// top: -38px;
// left: 15px;
// border-bottom: none;
// li {
// &.active {
// background: $body-bg;
// }
// a {
// max-width: 125px;
// }
// }
// .close {
// position: absolute;
// top: -10px;
// background: $error;
// color: white;
// height: 20px;
// width: 20px;
// border-radius: 50%;
// text-align: center;
// padding-top: 0.2em;
// z-index: 10;
// opacity: 1;
// left: -10px;
// font-size: 12px;
// }
// }
.description {
@include clip;
padding: 5px 25px 0 25px;
div:first-of-type {
padding-top: 2px;
}
}
.inner {
display: table;
table-layout: fixed;
height: 240px;
width: 100%;
padding-top: 10px;
}
.container-dots {
height: 165px;
}
div[class*='col-'] {
height: 100%;
}
.content-box {
padding: 5px 5px 15px 15px;
&:last-child {
.content {
border-right: none;
}
}
}
.content {
height: 100%;
padding: 10px 0;
border-right: 1px solid $table-border-color;
max-height: 215px;
overflow-y: auto;
}
.action-menu {
margin-right: 15px;
}
}

View File

@ -10,11 +10,28 @@ const KIND_INFRA = 'infra';
const KIND_NOT_ORCHESTRATION = 'cattle';
var C = {
AUTH_TYPES: {
AdminAuth: 'None',
BasicAuth: 'API Key',
HeaderAuth: 'HeaderAuth',
RegistrationToken: 'Host Registration',
TokenAccount: 'TokenAccount',
TokenAuth: 'UI Session'
},
CAPABILITY: {
NETWORK_POLICIES: 'network-policy-manager',
SECRETS: 'secrets',
},
CATALOG: {
LIBRARY_KEY: 'library',
LIBRARY_VALUE: 'https://git.rancher.io/rancher-catalog.git',
COMMUNITY_KEY: 'community',
COMMUNITY_VALUE: 'https://git.rancher.io/community-catalog.git',
DEFAULT_BRANCH: 'master',
},
COOKIE: {
TOKEN: 'token',
PL: 'PL',
@ -63,12 +80,12 @@ var C = {
CATALOG_DEFAULT_GROUP: 'library',
},
CATALOG: {
LIBRARY_KEY: 'library',
LIBRARY_VALUE: 'https://git.rancher.io/rancher-catalog.git',
COMMUNITY_KEY: 'community',
COMMUNITY_VALUE: 'https://git.rancher.io/community-catalog.git',
DEFAULT_BRANCH: 'master',
EXT_REFERENCES: {
FORUM: 'https://forums.rancher.com',
COMPANY: 'http://rancher.com',
GITHUB: 'https://github.com/rancher/rancher',
DOCS: 'http://docs.rancher.com/rancher',
SLACK: 'https://slack.rancher.io',
},
GITHUB: {
@ -89,6 +106,11 @@ var C = {
RANCHER_VERSION: 'X-Rancher-Version',
},
K8S: {
BASE: 'api',
BASE_VERSION: 'api/v1',
},
KEY: {
LEFT: 37,
UP: 38,
@ -156,6 +178,36 @@ var C = {
SIDEKICK: 'io.rancher.sidekicks',
},
LANGUAGE: {
DEFAULT: 'en-us',
FORMAT_RELATIVE_TIMEOUT: 1000,
DOCS: ['en'],
},
// CSS map to driver icons
MACHINE_DRIVER_IMAGES: {
AMAZONEC2: 'amazonec2',
AZURE: 'azure',
DIGITALOCEAN: 'digitalocean',
EXOSCALE: 'exoscale',
GENERIC: 'generic',
OPENSTACK: 'openstack',
PACKET: 'packet',
RACKSPACE: 'rackspace',
UBIQUITY: 'ubiquity',
VMWAREVSPHERE: 'vmwarevsphere',
OTHER: 'other',
CUSTOM: 'custom',
ALIYUNECS: 'aliyunecs',
},
MESOS: {
HEALTH: 'health',
FRAMEWORKS: 'frameworks',
MASTER_SERVICE: 'mesos-master',
MASTER_PORT: 5050,
},
MODE: {
OSS: 'oss', // Regular community UI
CAAS: 'caas', // Container cloud UI
@ -176,24 +228,6 @@ var C = {
SHOW_SYSTEM : 'showSystem',
},
LANGUAGE: {
DEFAULT: 'en-us',
FORMAT_RELATIVE_TIMEOUT: 1000,
DOCS: ['en'],
},
TABLES: {
DEFAULT_COUNT: 50
},
THEME: {
AUTO_UPDATE_TIMER : 1800000,
START_HOUR : 7,
END_HOUR : 18,
DEFAULT : 'ui-light',
},
PROJECT: {
TYPE_RANCHER: 'rancher_id',
TYPE_AZURE_USER: 'azuread_user',
@ -241,12 +275,6 @@ var C = {
LOGIN_LANGUAGE : 'loginLanguage',
},
// Ephemeral and unique for each browser tab
TABSESSION: {
PROJECT: 'projectId',
NAMESPACE: 'namespaceId',
},
SETTING: {
// Dots in key names do not mix well with Ember, so use $ in their place.
DOT_CHAR: '$',
@ -281,57 +309,28 @@ var C = {
SHOW_SYSTEM: 'ui$show$system',
},
TABLES: {
DEFAULT_COUNT: 50
},
// Ephemeral and unique for each browser tab
TABSESSION: {
PROJECT: 'projectId',
NAMESPACE: 'namespaceId',
},
THEME: {
AUTO_UPDATE_TIMER : 1800000,
START_HOUR : 7,
END_HOUR : 18,
DEFAULT : 'ui-light',
},
USER: {
TYPE_NORMAL: 'user',
TYPE_ADMIN: 'admin',
BASIC_BEARER: 'x-api-bearer',
},
AUTH_TYPES: {
AdminAuth: 'None',
BasicAuth: 'API Key',
HeaderAuth: 'HeaderAuth',
RegistrationToken: 'Host Registration',
TokenAccount: 'TokenAccount',
TokenAuth: 'UI Session'
},
EXT_REFERENCES: {
FORUM: 'https://forums.rancher.com',
COMPANY: 'http://rancher.com',
GITHUB: 'https://github.com/rancher/rancher',
DOCS: 'http://docs.rancher.com/rancher',
SLACK: 'https://slack.rancher.io',
},
K8S: {
BASE: 'api',
BASE_VERSION: 'api/v1',
},
MESOS: {
HEALTH: 'health',
FRAMEWORKS: 'frameworks',
MASTER_SERVICE: 'mesos-master',
MASTER_PORT: 5050,
},
// CSS map to driver icons
MACHINE_DRIVER_IMAGES: {
AMAZONEC2: 'amazonec2',
AZURE: 'azure',
DIGITALOCEAN: 'digitalocean',
EXOSCALE: 'exoscale',
GENERIC: 'generic',
OPENSTACK: 'openstack',
PACKET: 'packet',
RACKSPACE: 'rackspace',
UBIQUITY: 'ubiquity',
VMWAREVSPHERE: 'vmwarevsphere',
OTHER: 'other',
CUSTOM: 'custom',
ALIYUNECS: 'aliyunecs',
}
};
C.TOKEN_TO_SESSION_KEYS = [

View File

@ -650,6 +650,7 @@ hostsPage:
name: Name
ip: IP Address
host: Host
memory: RAM
docker: Docker
instanceState: States
noData: You do not have any hosts yet
@ -974,11 +975,12 @@ signupPage:
stacksPage:
header:
addContainer: Add Container
uploadCompose: Upload compose.yml
containers: Containers
volumes: Volumes
balancers: Load balancers
actionButton: Add Stack
catalogButton: Add from Catalog
balancers: Balancers
dns: DNS
sort:
label: Sort By
state: State