Hi,
Another thing I noticed is that the webclient plugins do
not use any shared code for generating HTML output or for translations.
I defined some helpers in web-client/webclient/app/helpers/application_helper.rb
file. These helpers are automatically available in all webclient templates.
There is e.g. 'delete' => _("Delete") helper, and more should be added. The
translators will translate the common texts just once not per plugin package.
Moreover I added 'simple_table' helper for generating overview table (optionally with
Add/Edit/Delete links), it's already used in samba_server plugin. It's not a generic
function for creating any table layout, but for major yast overview dialogs it should
be sufficient.
I wanted to define some namespaces for the helpers, like Label for delete, but I
failed. Rails could not find the functions in the namespace, any idea why?
(I can send a patch if needed...)
Again, we should share as much code as possible. So if you think that the code which
you just have written could be used in some other plugin move it to the base
webclient package (and don't forget to document it well).
--
Best Regards
Ladislav Slezák
Yast Developer
------------------------------------------------------------------------
SUSE LINUX, s.r.o. e-mail: lslezak(a)suse.cz
Lihovarská 1060/12 tel: +420 284 028 960
190 00 Prague 9 fax: +420 284 028 951
Czech Republic http://www.suse.cz/
--
To unsubscribe, e-mail: yast-devel+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-devel+help(a)opensuse.org
Hi all,
First off, let me apologize if my questions have already been covered.
I searched the archives and Googled for answers, but didn't come up
with much.
I am developing the YaST education module as part of the Google Summer
of Code. I am interested in using the Python bindings, and currently
have yast2-python-bindings-2.17.3-1.41 installed on openSUSE 11.1. I
created a template using the config-python skeleton, but when I do a
make/make install and then try to run my module, I get an error that
no such client module is found in the search path (/y2update/clients,
/root/.yast2/clients, /usr/share/YaST2/clients). I assume that the
problem lies in the fact that a .py file has been installed in
/usr/share/YaST2/clients instead of a .ycp file. Do I need to create
a .ycp wrapper to load my Python module, or what is the "standard"
way?
Second question, out of interest. I see that Ruby bindings exist for
YaST, but haven't seen much documentation on them except for a few
blog posts from 2007. Are the Ruby bindings production ready, or
still considered unstable?
If these questions are in the wrong list, please direct me to the
right place. Thanks all.
Regards,
Jeff Shantz
--
To unsubscribe, e-mail: yast-devel+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-devel+help(a)opensuse.org
Hi all,
I started to implement an example WebYast package and I have a yast2-devtools
skeleton for REST API package ready.
But I found that many things are duplicated in all REST plugins. E.g. each Rakefile
contains the same copied targets (e.g. 'package'). The common targets should be
shared instead of copying. If there is a bug or we want to add a new feature we have
to fix a lot of packages...
Here is my proposal:
- Add include.rake file into rakelib[*] subdirectory in each plugin, see
the attachment. (It includes the files from the current directory if it's called
inside the git repository otherwise it includes system files from
/srv/www/yastws/...)
- Define the shared tasks in rest-service/webservice/lib/tasks/webservice
subdirectory. The tasks should use webservice: namespace prefix so it's
obvious that they are defined in the webservice not in the plugin or somewhere
else. (See syntax_check.rake example)
After that 'rake -T' in a plugin subdirectory will display the syntax check target
from the shared directory, no need to copy&paste the code.
What do you think about it? Any comments? I'm not a Rakefile expert...
[*] I found that tasks defined in 'tasks' subdirectory in plugins are not found by
rake, they must be in 'rakelib' subdirectory instead. We have to call 'git mv tasks
rakelib' for all plugins and fix the .spec files...
--
Best Regards
Ladislav Slezák
Yast Developer
------------------------------------------------------------------------
SUSE LINUX, s.r.o. e-mail: lslezak(a)suse.cz
Lihovarská 1060/12 tel: +420 284 028 960
190 00 Prague 9 fax: +420 284 028 951
Czech Republic http://www.suse.cz/
# import global .rake files for plugins
if File.exist? "#{File.dirname(__FILE__)}/../../../webservice/lib/tasks/webservice/"
# use delopemnt files if we are in git repository
Dir["#{File.dirname(__FILE__)}/../../../webservice/lib/tasks/webservice/*.rake"].each { |ext| load ext }
else
# use the files from yast2-webservice package
Dir["/srv/www/yastws/lib/tasks/webservice/*.rake"].each { |ext| load ext }
end
require 'rake'
namespace :webservice do
desc "Check syntax of all Ruby (*.rb) files"
task :syntax_check do
`find . -name "*.rb" |xargs -n1 ruby -c |grep -v "Syntax OK"`
puts "* Done"
end
end
Hi all,
I just have committed a new yast2-devtools skeleton for yast webservice plugins to
Yast SVN repository. This is the first version, there might be bugs or we can change
something later, but it should be usable as a good starting point.
This skeleton uses the Yast DBus service as a backend, you need yast2-core>=2.18.10
(SVN trunk version is recommended, I just have noticed that there is a small
unsubmitted fix).
Note: The Yast Web interface has two parts - the REST service (backend) and webclient
(uses the backend and renders HTML pages), this skeleton is for the backend part.
Later I'll create skeleton also for the webclient plugins.
Quick start
-----------
- install the latest yast2-devtools from SVN trunk (yast2-core is recommended)
- go to the webservice plugins directory in the checked out GIT repository
- call 'y2tool create-new-package rest-plugin <plugin_name> <author> <email>',
e.g. 'y2tool create-new-package rest-plugin printers "Ladislav Slezak"
"lslezak(a)novell.com"'
- (re)start the webservice - the new plugin will be available after restart
- Test the new REST API:
http://localhost:8080/<plugin_name>.xml will download list of all items,
http://localhost:8080/<plugin_name>/first.xml will download details of the item
with ID 'first' (there are some testing data in the generated code, so you can
immediately check whether the created skeleton works)
Adapting the skeleton to your Yast module
-----------------------------------------
- Prerequisite1: Your Yast module must have high level stateless API (e.g. YaPI::
modules), if it doesn't exist yet you have to add it.
(Well, you can start with stateful API first, but you should definitely add and use
the stateless API later, see
http://en.opensuse.org/YaST/DBus_Service/Description#How_to_export_YaST_fun…
for details.)
- Prerequisite2: define .policy kit files for the needed functions in Prerequisite1
(see PolicyKit doc: http://hal.freedesktop.org/docs/PolicyKit/polkit-conf.html,
how to get the action ID for a specific Yast DBus service call:
http://en.opensuse.org/YaST/DBus_Service/Description#PolicyKit_Action_ID )
- Go through all generated files (the most important are in app/controllers and
app/models subdirectory) and adapt/fix the code marked by FIXME string.
Replace also the testing data with appropriate Yast calls.
Any feedback is welcomed!
--
Best Regards
Ladislav Slezák
Yast Developer
------------------------------------------------------------------------
SUSE LINUX, s.r.o. e-mail: lslezak(a)suse.cz
Lihovarská 1060/12 tel: +420 284 028 960
190 00 Prague 9 fax: +420 284 028 951
Czech Republic http://www.suse.cz/
--
To unsubscribe, e-mail: yast-devel+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-devel+help(a)opensuse.org
Hi,
I think that might be useful for some modules to allows enhanced specify
path of target machine. Usual java script browsing cannot be used, as it
uses browser pc and not server pc. As base I use this script
http://www.pengoworks.com/workshop/jquery/autocomplete.htm , but must
disable caching and losing focus, as it doesn't work after submit first
part of path (no hint on another parts).
If you want try it, just add to public/javascript attached js file and
to public/stylesheets attached css and gif.
Additional you must define for some controller response:
for path finding I use this:
def pathcompl
path = params[:q]
if (path[0].chr != "/")
path = "/"+path
end
dir = path[0..path.rindex("/")]
pre = path[path.rindex("/")+1..path.size]
result = `ls -1 '#{dir}' | sed "s:^\\(.\\+\\)$:#{dir}\\1:"| grep
'#{dir}#{pre}'`
render :text => result
end
How to use...fast way is add this to your RoR view (home_controller
contain pathcompl method) and:
<input type="text" id="autocomplete" name="autocomplete_parameter"/>
<script type="text/javascript">
$("#autocomplete").autocomplete("home/pathcompl",{ cacheLength:1 });
</script>
and to head of view:
<script src="/javascripts/jquery.autocomplete.js"
type="text/javascript"></script>
<link rel="stylesheet" type="text/css"
href="/stylesheets/jquery.autocomplete.css" />
What do you think about this enhancement? I welcome any comments as I am
just learning AJAX, RoR and js.
Josef
Hello, I'm thinking about a new usage of AutoYast (or at least a new
in my head), I'm thinking about building an automatic system recovery
for OpenSuse.
The idea is to install a system and then create an image of the
installed system and store into a partition of the disk.
This partition will contain the installer, with an autoyast.xml script
that will use this image to automatic restore the installed system
(like Sony does in its Notebooks).
I can boot the installer through the HD, but i can't use autoyast. I
don't know how to change the options on the manual-installer to use
the autoyast. if i enter in the expert mode i can change config
passing "autoysat=file:///autoyast.xml", but i don't know how to boot
through the HD in the expert mode. Can you help-me?
How do i change the "install url: cd:/" option?
It is possible to change the installer to automatic look for the data
in the HD instead of CD or USB?
Is there any detailed documentation about the installation process?
As conception sounds good, but I need to mature this idea, do you have
any suggestions, information or ideas to give?
Thanks.
--
Leonardo Luiz Padovani da Mata
barroca(a)gmail.com
"May the force be with you, always"
"Nerd Pride... eu tenho. Voce tem?"
--
To unsubscribe, e-mail: yast-devel+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-devel+help(a)opensuse.org
Hi,
I have made an snapshot of the current WebYaST and have put the
packages on:
https://build.opensuse.org/project/show?project=YaST%3AWeb
I have tested these packages on a new installed 11.1.
As we still have alpha phase we have reduced the version number to 0.0.1.
So do not wonder if "zypper up" does not work correctly :-)
We would like to ask you about your opinions. Thank you very much !!!
Greetings
Stefan
--
*******************************************************************************
Stefan Schubert
SUSE LINUX GmbH - Maxfeldstrasse 5 - D-90409 Nuernberg, Germany
e-mail: schubi(a)suse.de
-------------------------------------------------------------------------------
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
--
To unsubscribe, e-mail: yast-devel+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-devel+help(a)opensuse.org
Hi, I try webyast and this write in modules:
Error loading language plugin
/usr/lib64/YaST2/plugin/libpy2lang_ruby.so: libpy2wfm.so.2: cannot open
shared object file: No such file or directory false Error loading
language plugin /usr/lib64/YaST2/plugin/libpy2lang_ruby.so:
libpy2wfm.so.2: cannot open shared object file: No such file or directory
libpy2wfm is already in yast2 plugin directory, but also ldd doesn't
show it.
So I see two bugs - first is in webyast that show this errors and second
is this behavior.
ls -l /usr/lib64/YaST2/plugin/libpy2wfm.so.2*
lrwxrwxrwx 1 root root 18 2009-05-19 13:02 libpy2wfm.so.2 ->
libpy2wfm.so.2.0.0
-rwxr-xr-x 1 root root 118344 2009-05-19 09:54 libpy2wfm.so.2.0.0
ldd libpy2lang_ruby.so
linux-vdso.so.1 => (0x00007fff0b1ff000)
liby2.so.2 => /usr/lib64/liby2.so.2 (0x00007f2802cbd000)
libycp.so.3 => /usr/lib64/libycp.so.3 (0x00007f2802982000)
libpy2wfm.so.2 => not found
libruby.so.1.8 => /usr/lib64/libruby.so.1.8 (0x00007f280267d000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f2802370000)
libm.so.6 => /lib64/libm.so.6 (0x00007f280211a000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f2801f02000)
libc.so.6 => /lib64/libc.so.6 (0x00007f2801ba8000)
liby2util.so.4 => /usr/lib64/liby2util.so.4 (0x00007f2801985000)
libutil.so.1 => /lib64/libutil.so.1 (0x00007f2801782000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f280157d000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f2801361000)
libblocxx.so.6 => /usr/lib64/libblocxx.so.6 (0x00007f280103a000)
libpcre.so.0 => /usr/lib64/libpcre.so.0 (0x00007f2800e09000)
libxcrypt.so.2 => /lib64/libxcrypt.so.2 (0x00007f2800bd5000)
libycpvalues.so.3 => /usr/lib64/libycpvalues.so.3 (0x00007f2800967000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f2800729000)
/lib64/ld-linux-x86-64.so.2 (0x00007f2803126000)
libssl.so.0.9.8 => /usr/lib64/libssl.so.0.9.8 (0x00007f28004db000)
libcrypto.so.0.9.8 => /usr/lib64/libcrypto.so.0.9.8 (0x00007f280015d000)
libz.so.1 => /lib64/libz.so.1 (0x00007f27fff47000)
symlink solve this problem
linux-i632:/usr/lib64 # ln -s YaST2/plugin/libpy2wfm.so.2 libpy2wfm.so.2
Josef
--
To unsubscribe, e-mail: yast-devel+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-devel+help(a)opensuse.org
Hi hackers,
as Miso pointed out, y2tool tagversion was broken for the SP1-Stash
branch (because it sits under branches/tmp, not under branches).
You would not probably notice that until make package.
Since yast2-devtools SVN r57259 it works again, sorry for the inconvenience.
--
Martin Vidner, YaST developer
http://en.opensuse.org/User:Mvidner
Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu
--
To unsubscribe, e-mail: yast-devel+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-devel+help(a)opensuse.org