Final changes to Angular Images before making default
This addresses the suggestions found by Rob and Travis: - The Admin panel doesn't show *all* images, just those either in the current project or exposed as public (same as Project). (Travis) FIX: The Admin panel now supplies is_public: None as the Python code does, which allows all images to be shown. - The 'Is Public' attribute is in the drawer now (even on large screen sizes) and we can't sort by shared, public etc, as far as I can tell. I don't think we specifically need the buttons like the previous design had, but it feels like a regression to have no filtering or sorting on that field? Perhaps someone with better glance knowledge could correct me. FIX: Added 'visibility' as a synthesized field and added as a facet, making sure to use the current project to correctly identify 'Shared with Project'. Did *not* add 'Is Public' as that is a vestigial concept. - Create/Edit Image > Image Details tab needs help text. Create has some info, but Edit has nothing really. Also, we can drop that "description" header in the help text; it doesnt add any value. This would be a nice improvement over the Python version for novice users, and shouldnt take long to enter - just pull info from the API docs. NO CHANGE: Let's not block enablement on verbiage. I think we need a better consistency and I don't believe the last-minute is the best time to add this because it's very easy to create/find nits. - Create Volume help text is also entirely blank. We should fill that out with some useful instructions, IMO. FIX: Added basic help text. - Create Volume should default to the first Availability Zone if there is only one, as it is a required field anyway. FIX: I added logic for this, and also added in some test features so we don't lose coverage. - The Image Details page now longer lists the owner ID. I don't think this is addressed by Travis' patch either. FIX: This is now under the 'Security' heading. - Kernel ID and Ramdisk ID seem empty in angular image details, but populated in the python equivalent. FIX: This was a regression that this patch fixes. - Why are created/updated/ID separated into "Record Properties"? Is there something in the API about this, or is it just a presentation construct? CHANGE: Moved into the general 'Image' header. Added a filter so that these can be implemented as basic property registrations. - I think 'Filename' in angular image details can be hidden if empty. CHANGE: Instead of hiding, we can show the standard '-' if no filename. Change-Id: I4b770f9e61f9a8b1bd735d95c2ccc75bc21dd944 Partially-Implements: blueprint angularize-images-table
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
angular
|
||||
.module('horizon.framework.util.filters')
|
||||
.filter('yesno', yesNoFilter)
|
||||
.filter('simpleDate', simpleDateFilter)
|
||||
.filter('gb', gbFilter)
|
||||
.filter('mb', mbFilter)
|
||||
.filter('title', titleFilter)
|
||||
@@ -45,6 +46,19 @@
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @ngdoc filter
|
||||
* @name simpleDate
|
||||
* @description
|
||||
* Evaluates given for display as a short date, returning '-' if empty.
|
||||
*/
|
||||
simpleDateFilter.$inject = ['$filter'];
|
||||
function simpleDateFilter($filter) {
|
||||
return function (input) {
|
||||
return $filter('noValue')($filter('date')(input, 'short'));
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @ngdoc filter
|
||||
* @name gb
|
||||
|
||||
@@ -38,6 +38,21 @@
|
||||
});
|
||||
});
|
||||
|
||||
describe('simpleDate', function () {
|
||||
var simpleDateFilter;
|
||||
beforeEach(inject(function (_simpleDateFilter_) {
|
||||
simpleDateFilter = _simpleDateFilter_;
|
||||
}));
|
||||
|
||||
it('returns blank if nothing', function () {
|
||||
expect(simpleDateFilter()).toBe('-');
|
||||
});
|
||||
|
||||
it('returns the expected time', function() {
|
||||
expect(simpleDateFilter('2016-06-24T04:19:07')).toBe('6/24/16 4:19 AM');
|
||||
});
|
||||
});
|
||||
|
||||
describe('gb', function () {
|
||||
var gbFilter;
|
||||
beforeEach(inject(function (_gbFilter_) {
|
||||
|
||||
Reference in New Issue
Block a user