[Kimchi-devel] [PATCH] [Kimchi] Create template (UI part) without specifying media type

Aline Manera alinefm at linux.vnet.ibm.com
Wed Apr 13 22:01:01 UTC 2016



On 04/13/2016 06:58 PM, Samuel Henrique De Oliveira Guimaraes wrote:
>
> -----Original Message-----
> From: Aline Manera [mailto:alinefm at linux.vnet.ibm.com]
> Sent: quarta-feira, 13 de abril de 2016 18:55
> To: Samuel Henrique De Oliveira Guimaraes <samuel.guimaraes at eldorado.org.br>; Socorro Stoppler <socorro at linux.vnet.ibm.com>; Kimchi Devel <kimchi-devel at ovirt.org>; sguimaraes943 at gmail.com
> Subject: Re: [PATCH] [Kimchi] Create template (UI part) without specifying media type
>
>
>
> On 04/13/2016 06:49 PM, Samuel Henrique De Oliveira Guimaraes wrote:
>> -----Original Message-----
>> From: Socorro Stoppler [mailto:socorro at linux.vnet.ibm.com]
>> Sent: quarta-feira, 13 de abril de 2016 17:11
>> To: Aline Manera <alinefm at linux.vnet.ibm.com>; Samuel Henrique De
>> Oliveira Guimaraes <samuel.guimaraes at eldorado.org.br>; Kimchi Devel
>> <kimchi-devel at ovirt.org>; sguimaraes943 at gmail.com
>> Subject: Re: [PATCH] [Kimchi] Create template (UI part) without
>> specifying media type
>>
>>
>>
>> On 04/13/2016 12:56 PM, Aline Manera wrote:
>>> On 04/13/2016 04:05 PM, Samuel Henrique De Oliveira Guimaraes wrote:
>>>> Hi,
>>>>
>>>> I think we can display the remote and local isos in the same list,
>>>> maybe showing a label or icon to distinguish between remote or local
>>>> images (and even adding a filter and sort option like when editing
>>>> the PCI devices from a Guest, to sort local or remote isos first)
>>>> and keep the source media input on top. This way we would only have
>>>> one "tab" in this modal window and no sliding animation from left to right.
>>> Agree.
>>>
>>> In the old UI, we had a globe icon for remote ISOs and a disk icon
>>> for local ISOs. Maybe we can get it back.
>>> I like the idea of filter and sort too.
>>>
>>>>     I'm not sure if adding paginators would be a good idea, a
>>>> Gallery/List view toggle button could do the trick if space is an
>>>> issue for numerous images.
>>> If we add filter and sort, I think we can do it in a single way by
>>> now, ie, displaying the ISOs as we do today.
>>> We can fix the height to list at least 2 or 3 rows of ISOs and add
>>> vertical scroll bar.
>>>
>>> And don't forget that user can select multiple ISOs from those listed
>>> to create a bunch of Templates at once.
>>> Since the user is able to select multiple ISOs and it's in a list, what if we use the same widget like we are doing for updating selected packages/deleting debug reports?
>>> Is that available yet and if not, when will that be available?
>> Debug Reports and Repositories are using wok.list.js and Peter is porting System Updates to jQuery Bootgrid so we can discard wok.grid.js since only Updates section is using it. I think the wok-list widget is very limited to a plain text list. The CSS and HTML for ISO and Template selection is good and the only issue we have is with keyboard navigation (I'm going to send a patch to fix it soon). If we want to add a gallery/list view toggle like we use in Guests and Templates (and in Storages in the future), we can change the parent CSS class and the styles based on inheritance (when the user toggles from Gallery to List, only the parent element changes it classes and the other styles are overwritten by the cascade, ex .wok-list > li will have a different style from .wok-gallery > li but the same HTML markup).
> So your suggestion is to keep the gallery view as it is today and implement the list view later. Is that correct? What do you think we should do now for this feature?
>
> Yes. I think for now we can bring back the remote and local icons on top of the image items and put a simple filter and sort button like PCI tab. We set the panel scrollable area height with CSS media queries.

OK. Great! It sounds good for me too.

>> Samuel
>>
>>>> For the source media input, I think we could use Typeahead.js the
>>>> same way it is used for Ginger System Modules page. In this page the
>>>> typeahead input suggests loaded modules only instead of all
>>>> available modules. We would have to create some sort of source media
>>>> history mechanism or get the source media path from all existing
>>>> templates and put in a list and integrate with Typeahead:
>>>> https://twitter.github.io/typeahead.js/examples/
>>> I don't think it is interesting to have for source media. I don't
>>> expect the user to create multiple templates using the same source
>>> media. He/she can use the Template clone option for it so I suggest
>>> to keep the simple input box there.
>> I agree to make this as simple as possible.
>>>> Samuel
>>>>
>>>> -----Original Message-----
>>>> From: Socorro Stoppler [mailto:socorro at linux.vnet.ibm.com]
>>>> Sent: quarta-feira, 13 de abril de 2016 14:51
>>>> To: Aline Manera <alinefm at linux.vnet.ibm.com>; Kimchi Devel
>>>> <kimchi-devel at ovirt.org>; Samuel Henrique De Oliveira Guimaraes
>>>> <samuel.guimaraes at eldorado.org.br>; sguimaraes943 at gmail.com
>>>> Subject: Re: [PATCH] [Kimchi] Create template (UI part) without
>>>> specifying media type
>>>>
>>>> On 04/12/2016 10:19 AM, Aline Manera wrote:
>>>>> Hi Socorro,
>>>>>
>>>>> The user will not need to choose any template type, ie, choose
>>>>> between local file or remote ISO.
>>>>>
>>>>> Said that, when selecting "Add Template" a new dialog will be open
>>>>> to collect the source media path which can be a local file or remote one.
>>>>>
>>>>> I think in something like below:
>>>>>
>>>>> -------------------------------------------------------------------
>>>>> -
>>>>> --
>>>>> ------------
>>>>>
>>>>> |  Source media: < input box >
>>>>>                                                      |
>>>>> |  <info icon> Specify a local ISO file or a local image file
>>>>> or         |
>>>>> |                      even an URL to an specific ISO
>>>>> image                   |
>>>>> | |
>>>>> | Suggested ISO files: |
>>>>> | < keep displaying the ISOs found in the active storage pools > |
>>>>> | |
>>>>> | Suggested Remote ISO
>>>>> files:                                                      |
>>>>> | < keep displaying the remote ISOs
>>>>>> |
>>>>> -------------------------------------------------------------------
>>>>> -
>>>>> --
>>>>> ------------
>>>>>
>>>> While the concept is good regarding the UI suggestion, I'm
>>>> questioning if that'll be too much in one panel?  (i.e. what if
>>>> there are numerous local and remote ISOs?)
>>>>
>>>> Samuel,
>>>>
>>>> I'd like to get your thoughts on this --- do you have a suggestion
>>>> on how to handle what Aline is trying to get across?
>>>>
>>>>> Either way, you just need to collect the file path (local or
>>>>> remote) and pass it to 'source_media' parameter.
>>>>>
>>>>> Please, let me know your thoughts on it.
>>>>>
>>>>> On 04/06/2016 03:20 PM, Socorro Stoppler wrote:
>>>>>> Rather than specifying whether local file is an img or an ISO, all
>>>>>> the user has to do is to input the file including the path of its
>>>>>> location.
>>>>>> Kimchi will handle the rest on the backend.  Rather than
>>>>>> originally having 3 radio buttons, it is now 2 radio buttons --
>>>>>> one for local and the other for remote.
>>>>>>
>>>>>> This patch needs to work in conjunction w/Ramon's latest patch set
>>>>>> sent today - Use a single field to create a template - (backend)
>>>>>>
>>>>>> Socorro Stoppler (1):
>>>>>>       Create template without specifying media type
>>>>>>
>>>>>>      ui/css/kimchi.css                     |   2 +-
>>>>>>      ui/css/src/modules/_templates.scss    |   2 +-
>>>>>>      ui/js/src/kimchi.template_add_main.js | 378
>>>>>> +++++-----------------------------
>>>>>>      ui/pages/template-add.html.tmpl       |  73 +------
>>>>>>      4 files changed, 55 insertions(+), 400 deletions(-)
>>>>>>
>>>> Thanks
>>>> -Socorro
>>>>




More information about the Kimchi-devel mailing list