[Kimchi-devel] [PATCH V2 2/2] Plugins: Fix Sample plugin tab-xml

Rodrigo Trujillo rodrigo.trujillo at linux.vnet.ibm.com
Tue Jan 21 16:28:10 UTC 2014


On 01/19/2014 11:43 PM, zhoumeina wrote:
> On 01/18/2014 02:41 AM, Rodrigo Trujillo wrote:
>> The xml file had wrong entries, then kimchi UI did not recognize the
>> tabs. This patch fixes this problem and also disables the sample plugin
>> by default.
>>
>> Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo at linux.vnet.ibm.com>
>> ---
>>   plugins/sample/sample.conf           | 7 ++++++-
>>   plugins/sample/ui/config/tab-ext.xml | 8 ++++----
>>   plugins/sample/ui/tab.html           | 1 +
>>   3 files changed, 11 insertions(+), 5 deletions(-)
>>   create mode 100644 plugins/sample/ui/tab.html
>>
>> diff --git a/plugins/sample/sample.conf b/plugins/sample/sample.conf
>> index c4e80f7..1a8d6b4 100644
>> --- a/plugins/sample/sample.conf
>> +++ b/plugins/sample/sample.conf
>> @@ -1,7 +1,12 @@
>>   [kimchi]
>> -enable = True
>> +enable = False
>>   plugin_class = "Drawings"
>>   uri = "/plugins/sample"
>>
>>   [/]
>>   tools.trailing_slash.on = False
>> +
>> +
>> +[/ui/tab.html]
>> +tools.staticfile.on: True
>> +tools.staticfile.filename:  kimchi.config.get_plugins_dir() + 
>> '/sample/ui/tab.html'
>> diff --git a/plugins/sample/ui/config/tab-ext.xml 
>> b/plugins/sample/ui/config/tab-ext.xml
>> index 948fa07..d1f8456 100644
>> --- a/plugins/sample/ui/config/tab-ext.xml
>> +++ b/plugins/sample/ui/config/tab-ext.xml
>> @@ -1,7 +1,7 @@
>>   <?xml version="1.0" encoding="utf-8"?>
>> -<!--<tabs-ext>
>> +<tabs-ext>
>>       <tab>
>> -        <title>Test</title>
>> - <filePath>plugins/sample/ui/tab.html</filePath>
>> +        <title>Sample</title>
>> +        <path>plugins/sample/ui/tab.html</path>
>>       </tab>
>> -</tabs-ext>-->
>> \ No newline at end of file
>> +</tabs-ext>
>> diff --git a/plugins/sample/ui/tab.html b/plugins/sample/ui/tab.html
>> new file mode 100644
>> index 0000000..1562713
>> --- /dev/null
>> +++ b/plugins/sample/ui/tab.html
> Sorry, I don't understand why you add a test tab in sample/ui, seems 
> it does't needed.

Hi, I think this plugin should only work as an example (since plugin 
development for Kimchi is not well documented), so I thought that would 
be good to add an example of UI. Then, anyone that wants to create a 
plugin, will have a better idea how to proceed.

>> @@ -0,0 +1 @@
>> +This is a test TAB for SAMPLE plugin
>
> _______________________________________________
> Kimchi-devel mailing list
> Kimchi-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/kimchi-devel
>




More information about the Kimchi-devel mailing list