Merge pull request #2514 from coreos-inc/small-app-fixes
Small fixes for the apps view
This commit is contained in:
commit
48c40cbe3a
3 changed files with 12 additions and 4 deletions
|
@ -188,7 +188,7 @@ def push(namespace, package_name):
|
||||||
raise InvalidUsage()
|
raise InvalidUsage()
|
||||||
|
|
||||||
values = request.get_json(force=True, silent=True) or {}
|
values = request.get_json(force=True, silent=True) or {}
|
||||||
private = values.get('visibility', 'public')
|
private = values.get('visibility', 'private')
|
||||||
|
|
||||||
owner = get_authenticated_user()
|
owner = get_authenticated_user()
|
||||||
if not Package.exists(reponame):
|
if not Package.exists(reponame):
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
<span ng-repeat="channel_name in item.channels">
|
<span ng-repeat="channel_name in item.channels">
|
||||||
<channel-icon name="channel_name"></channel-icon>
|
<channel-icon name="channel_name"></channel-icon>
|
||||||
</span>
|
</span>
|
||||||
|
<span ng-if="!item.channels.length" class="empty">(None)</span>
|
|
@ -10,7 +10,7 @@ import { CorTableColumn } from './cor-table-col.component';
|
||||||
transclude: true,
|
transclude: true,
|
||||||
})
|
})
|
||||||
export class CorTableComponent implements ng.IComponentController {
|
export class CorTableComponent implements ng.IComponentController {
|
||||||
@Input('=') public tableData: any[];
|
@Input('<') public tableData: any[];
|
||||||
@Input('@') public tableItemTitle: string;
|
@Input('@') public tableItemTitle: string;
|
||||||
@Input('<') public filterFields: string[];
|
@Input('<') public filterFields: string[];
|
||||||
@Input('@') public compact: 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 {
|
public addColumn(col: CorTableColumn): void {
|
||||||
this.columns.push(col);
|
this.columns.push(col);
|
||||||
|
|
||||||
|
@ -64,7 +70,8 @@ export class CorTableComponent implements ng.IComponentController {
|
||||||
return col.isNumeric();
|
return col.isNumeric();
|
||||||
}).map((col) => (col.datafield));
|
}).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 keys = Object.keys(item);
|
||||||
var newObj = {};
|
var newObj = {};
|
||||||
for (var i = 0; i < keys.length; ++i) {
|
for (var i = 0; i < keys.length; ++i) {
|
||||||
|
|
Reference in a new issue