Merge pull request #2514 from coreos-inc/small-app-fixes

Small fixes for the apps view
This commit is contained in:
josephschorr 2017-04-05 14:24:27 -04:00 committed by GitHub
commit 48c40cbe3a
3 changed files with 12 additions and 4 deletions

View file

@ -188,7 +188,7 @@ def push(namespace, package_name):
raise InvalidUsage()
values = request.get_json(force=True, silent=True) or {}
private = values.get('visibility', 'public')
private = values.get('visibility', 'private')
owner = get_authenticated_user()
if not Package.exists(reponame):

View file

@ -1,3 +1,4 @@
<span ng-repeat="channel_name in item.channels">
<channel-icon name="channel_name"></channel-icon>
</span>
</span>
<span ng-if="!item.channels.length" class="empty">(None)</span>

View file

@ -10,7 +10,7 @@ import { CorTableColumn } from './cor-table-col.component';
transclude: true,
})
export class CorTableComponent implements ng.IComponentController {
@Input('=') public tableData: any[];
@Input('<') public tableData: any[];
@Input('@') public tableItemTitle: string;
@Input('<') public filterFields: string[];
@Input('@') public compact: string;
@ -30,6 +30,12 @@ export class CorTableComponent implements ng.IComponentController {
};
}
public $onChanges(changes: ng.IOnChangesObject): void {
if (changes['tableData'] !== undefined) {
this.refreshOrder();
}
}
public addColumn(col: CorTableColumn): void {
this.columns.push(col);
@ -64,7 +70,8 @@ export class CorTableComponent implements ng.IComponentController {
return col.isNumeric();
}).map((col) => (col.datafield));
var processed = this.tableData.map((item) => {
var tableData = this.tableData || [];
var processed = tableData.map((item) => {
var keys = Object.keys(item);
var newObj = {};
for (var i = 0; i < keys.length; ++i) {