Licenses: Updated the list of licenses and added a PDF containing all license texts
[check_mk.git] / .werks / 6057
blob2e8abf507dc3d248186f1a977e3ce8c1582dd217
1 Title: Changed GUI internal API functions
2 Level: 2
3 Component: multisite
4 Compatible: incomp
5 Edition: cre
6 Version: 1.6.0i1
7 Date: 1525714596
8 Class: feature
10 During development of version 1.6 we have made a lot of internal changes
11 to the GUI internal code. In case you developed you own GUI extensions, you
12 may likely be affected by this. The following table tries to summarize the
13 most relevant changes to make it easier for you to port your custom code:
15 <h3>Moved exceptions to <tt>gui_exceptions</tt> module</h3>
17 Use <tt>from gui_exceptions import ..</tt> to import the exception objects
18 you need. Available are: MKAuthException, MKUnauthenticatedException, MKGeneralException, MKUserError, MKInternalError.
20 <h3>Moved lqencode() to livestatus module</h3>
22 Use <tt>import livestatus</tt> and <tt>livestatus.lqencode()</tt>.
24 <h3>Moved format_plugin_output() to views</h3>
26 Use <tt>import view</tt> and <tt>views.format_plugin_output()</tt>.
28 <h3>Moved make_nagios_directory() and make_nagios_directories() to cmk.utils.store</h3>
30 Use <tt>import cmk.utils.store</tt> and <tt>cmk.utils.store.mkdir()</tt> or <tt>cmk.utils.store.makedirs()</tt>.
32 <h3>Dropped create_user_file()</h3>
34 Use <tt>cmk.utils.store.save_file()</tt> instead.
36 <h3>Dropped bytes_human_readable()</h3>
38 Use <tt>cmk.utils.render.bytes()</tt> instead.
40 <h3>Dropped date_human_readable()</h3>
42 Use <tt>cmk.utils.render.date()</tt> instead.
44 <h3>Dropped percent_human_redable()</h3>
46 Use <tt>cmk.utils.render.percent()</tt> instead.
48 <h3>Moved make_utf8() to cmk.utils</h3>
50 Use <tt>cmk.utils.make_utf8()</tt>.
52 <h3>Moved quote_shell_string() to cmk.utils</h3>
54 Use <tt>cmk.utils.quote_shell_string()</tt>.
56 <h3>Moved pnp_cleanup() to cmk.utils</h3>
58 Use <tt>cmk.utils.pnp_cleanup()</tt>.
60 <h3>Moved aquire_lock(), release_all_locks(), have_lock() and release_lock() to cmk.utils.store</h3>
62 Use e.g. <tt>cmk.utils.store.aquire_lock()</tt>.
64 <h3>Dropped age_human_readable()</h3>
66 Use <tt>cmk.utils.render.approx_age()</tt> instead.
68 <h3>Moved render_scientific() to cmk.utils.render</h3>
70 Use <tt>cmk.utils.render.scientific()</tt>.
72 <h3>Moved render_scientific() to cmk.utils.render</h3>
74 Use <tt>cmk.utils.render.physical_precision()</tt>.
76 <h3>Moved several functions to new utils module</h3>
78 Use e.g. <tt>utils.drop_dotzero()</tt>.
80 These have moved been moved:
82 <ul>
83 <li><tt>drop_dotzero()</tt></li>
84 <li><tt>cmp_version()</tt></li>
85 <li><tt>num_split()</tt></li>
86 <li><tt>saveint()</tt></li>
87 <li><tt>savefloat()</tt></li>
88 <li><tt>get_random_string()</tt></li>
89 <li><tt>gen_id()</tt></li>
90 <li><tt>load_web_plugins()</tt></li>
91 </ul>
93 <h3>Dropped tryint()</h3>
95 This has totally been dropped. Implement it on your own in case
96 you really need this.