Split env/env templates

This commit is contained in:
Vincent Fiduccia 2017-05-23 22:22:12 -07:00
parent e89cb4aebb
commit 71ae6d1d34
No known key found for this signature in database
GPG Key ID: 2B29AD6BB2BB2582
19 changed files with 69 additions and 24 deletions

View File

@ -22,7 +22,7 @@
</section>
<div class="row">
<div class="col span-3">
<div class="col span-5-of-24">
<div class="catalog-search box">
<div class="mb-25">
<label class="pb-10">{{t 'catalogPage.index.search.label'}}</label>
@ -70,7 +70,7 @@
{{/each-in}}
</ul>
</div>
<div class="col span-9">
<div class="col span-19-of-24">
{{#each arrangedContent as |catalogItem|}}
{{#catalog-box model=catalogItem showSource=showCatalogDropdown as |section|}}
{{#if (eq section 'body')}}

View File

@ -58,7 +58,7 @@
<p class="help-block">{{t 'formNetwork.requestedIp.help'}}</p>
{{/input-or-display}}
</div>
{{#if (or true (and isService (not isSidekick)))}}
{{#if (and isService (not isSidekick))}}
<div class="col span-4">
<label class="acc-label">{{t 'formNetwork.retainIp.label'}}</label>
{{#input-or-display editable=editing value=service.retainIp}}

View File

@ -1,7 +1,3 @@
<section class="header clearfix">
<h1>{{t 'projectList.index.header'}}</h1>
{{#link-to "settings.projects.new" class="btn btn-sm bg-primary pull-right"}}{{t 'projectList.index.new'}}{{/link-to}}
</section>
<section>
<div class="box mb-20">
{{t 'projectList.index.subtext' appName=settings.appName htmlSafe=true}}

View File

@ -1,7 +1,3 @@
<section class="header clearfix">
<h1>{{t 'projectList.indexTemplate.header'}}</h1>
{{#link-to "settings.projects.new-template" class="btn btn-sm bg-primary pull-right"}}{{t 'projectList.indexTemplate.new'}}{{/link-to}}
</section>
<section>
<div class="box mb-20">
{{t 'projectList.indexTemplate.subtext' appName=settings.appName htmlSafe=true}}

View File

@ -18,6 +18,10 @@
{{model.displayImage}}
</td>
<td data-title="{{dt.scale}}">
{{model.scale}}
</td>
<td data-title="{{dt.instanceState}}" class="pt-5">
<div style="margin-top:2px;">
{{#if canExpand}}
@ -28,8 +32,6 @@
values=model.instanceStates.byColor
tooltipValues=model.instanceStates.byName
}}
{{!-- {{else}}
<span class="text-muted">{{t 'generic.na'}}</span> --}}
{{/if}}
{{else}}
<span class="text-muted">{{t 'stacksPage.table.standalone'}}</span>
@ -71,8 +73,8 @@
{{#if canExpand}}
<tr class="sub-row hide">{{! make the alternating color match }}</tr>
<tr class="sub-row {{unless expanded 'hide'}}">
<td colspan="2">{{! checkbox and expand}}</td>
<td colspan="{{sub fullColspan 3}}">
<td>{{! checkbox and expand}}</td>
<td colspan="{{sub fullColspan 2}}">
{{#if expanded}}
{{container-table
body=model.instances

View File

@ -10,7 +10,7 @@
{{else}}
<h1>{{#link-to "settings.projects"}}{{t 'viewEditProject.header'}}{{/link-to}}</h1>
<div class="right-buttons">
{{header-state model=project}}
{{badge-state model=project}}
{{action-menu model=project size="sm" classNames="ml-10"}}
</div>
{{/if}}

View File

@ -6,7 +6,7 @@
{{info-multi-stats model=host linkName="hostStats" largeTargetId="largeStats"}}
</div>
<div class="right-buttons">
{{header-state model=model}}
{{badge-state model=model}}
{{action-menu model=model showPrimary=false classNames="ml-10 pull-right" size="sm"}}
</div>
</section>
@ -258,4 +258,4 @@
{{/component}}
{{/accordion-list-item}}
{{/accordion-list}}
</section>
</section>

View File

@ -111,7 +111,7 @@ export default Ember.Mixin.create({
url = url.replace(/https?:\/\/[^\/]+\/?/,endpoint);
// For local development where API doesn't match origin, add basic auth token
if ( url.indexOf(window.location.origin) !== 0 )
if ( url.indexOf(window.location.origin) !== 0 && this.get('app.mode') === 'development' )
{
let token = this.get('cookies').get(C.COOKIE.TOKEN);
if ( token )

View File

@ -244,6 +244,14 @@ var Service = Resource.extend(StateCounts, {
}
}.property('isReal','isGlobalScale'),
displayScale: function() {
if ( this.get('isGlobalScale') ) {
return this.get('scale') + this.get('intl').t('servicePage.globalScale');
} else {
return this.get('scale');
}
}.property('scale','isGlobalScale'),
canHaveContainers: function() {
if ( this.get('isReal') || this.get('isSelector') ) {
return true;

View File

@ -32,6 +32,7 @@ Router.map(function() {
this.route('settings', {resetNamespace: true}, function() {
this.route('projects', {path: '/env'}, function() {
this.route('index', {path: '/'});
this.route('templates', {path: '/templates'});
this.route('new', {path: '/add'});
this.route('new-template', {path: '/add-template'});
this.route('edit-template', {path: '/template/:template_id'});
@ -71,6 +72,10 @@ Router.map(function() {
this.route('project', {path: '/env/:project_id'}, function() {
this.route('index', {path: '/'});
this.route('apikeys', {path: '/api/keys'}, function() {
this.route('account', {path: '/account'});
this.route('environment', {path: '/environment'});
});
this.route('waiting');
this.route('containers', {resetNamespace: true}, function() {

View File

@ -62,6 +62,13 @@ export default Ember.Controller.extend({
searchField: 'displayImage',
translationKey: 'generic.image',
},
{
name: 'scale',
sort: 'scale:desc',
searchField: null,
translationKey: 'stacksPage.table.scale',
width: 100
},
{
name: 'instanceState',
sort: ['stack.isDefault:desc','stack.displayName', 'instanceCountSort:desc','displayName'],

View File

@ -8,7 +8,7 @@
</div>
{{/if}}
<div class="right-buttons">
{{header-state model=service}}
{{badge-state model=service}}
{{action-menu model=service showPrimary=false classNames="ml-10 pull-right" size="sm"}}
</div>
</section>

View File

@ -71,7 +71,7 @@ export default Ember.Service.extend({
// For local development where API doesn't match origin, add basic auth token
var authBase = base;
if ( base.indexOf(window.location.origin) !== 0 )
if ( base.indexOf(window.location.origin) !== 0 && this.get('app.mode') === 'development')
{
var token = this.get('cookies').get(C.COOKIE.TOKEN);
if ( token ) {

View File

@ -1,3 +1,12 @@
{{project-list model=model.projects}}
<section class="header has-tabs clearfix">
<ul class="tab-nav">
<li>{{#link-to "settings.projects.index"}}{{t 'projectList.index.header'}}{{/link-to}}</li>
<li>{{#link-to "settings.projects.templates"}}{{t 'projectList.indexTemplate.header'}}{{/link-to}}</li>
</ul>
{{project-template-list model=model.projectTemplates}}
<div class="right-buttons">
{{#link-to "settings.projects.new" class="btn btn-sm bg-primary"}}{{t 'projectList.index.new'}}{{/link-to}}
</div>
</section>
{{project-list model=model.projects}}

View File

@ -0,0 +1,8 @@
import Ember from 'ember';
export default Ember.Controller.extend({
access: Ember.inject.service(),
projects: Ember.inject.service(),
settings: Ember.inject.service(),
application: Ember.inject.controller(),
});

View File

@ -0,0 +1,12 @@
<section class="header has-tabs clearfix">
<ul class="tab-nav">
<li>{{#link-to "settings.projects.index"}}{{t 'projectList.index.header'}}{{/link-to}}</li>
<li>{{#link-to "settings.projects.templates"}}{{t 'projectList.indexTemplate.header'}}{{/link-to}}</li>
</ul>
<div class="right-buttons">
{{#link-to "settings.projects.new-template" class="btn btn-sm bg-primary"}}{{t 'projectList.indexTemplate.new'}}{{/link-to}}
</div>
</section>
{{project-template-list model=model.projectTemplates}}

View File

@ -96,6 +96,7 @@ module.exports = function(environment) {
mode: mode,
isCaas: mode === 'caas',
caasSignup: signup,
environment: environment,
apiServer: 'http://localhost:8080',
legacyApiEndpoint: '/v1',
apiEndpoint: '/v2-beta',

View File

@ -1895,6 +1895,7 @@ stacksPage:
table:
standalone: Standalone
endpoints: Endpoints
scale: Scale
instanceCount: Container Count
instanceState: Container States
instanceStateWithIcon: States

2
vendor/icons vendored

@ -1 +1 @@
Subproject commit 178e091d996fe5dd05b2f9c34b447d36c2b2e165
Subproject commit 6f7e52bf171e253ce70ee19ded57e18af60832ad