[PATCH 14/15] V4 Ginger Base : base plugin ui make, images and config files
by chandra@linux.vnet.ibm.com
From: chandrureddy <chandra(a)linux.vnet.ibm.com>
---
src/wok/plugins/gingerbase/ui/Makefile.am | 20 +++++++++++++++++++
src/wok/plugins/gingerbase/ui/config/Makefile.am | 22 +++++++++++++++++++++
src/wok/plugins/gingerbase/ui/config/tab-ext.xml | 10 ++++++++++
src/wok/plugins/gingerbase/ui/images/Makefile.am | 22 +++++++++++++++++++++
src/wok/plugins/gingerbase/ui/images/icon-vm.png | Bin 0 -> 2976 bytes
src/wok/plugins/gingerbase/ui/images/logo.ico | Bin 0 -> 1214 bytes
.../gingerbase/ui/images/theme-default/Makefile.am | 20 +++++++++++++++++++
.../ui/images/theme-default/host-icon-sprite.png | Bin 0 -> 1034 bytes
.../images/theme-default/kimchi-loading15x15.gif | Bin 0 -> 1653 bytes
9 files changed, 94 insertions(+)
create mode 100644 src/wok/plugins/gingerbase/ui/Makefile.am
create mode 100644 src/wok/plugins/gingerbase/ui/config/Makefile.am
create mode 100644 src/wok/plugins/gingerbase/ui/config/tab-ext.xml
create mode 100644 src/wok/plugins/gingerbase/ui/images/Makefile.am
create mode 100644 src/wok/plugins/gingerbase/ui/images/icon-vm.png
create mode 100644 src/wok/plugins/gingerbase/ui/images/logo.ico
create mode 100644 src/wok/plugins/gingerbase/ui/images/theme-default/Makefile.am
create mode 100644 src/wok/plugins/gingerbase/ui/images/theme-default/host-icon-sprite.png
create mode 100644 src/wok/plugins/gingerbase/ui/images/theme-default/kimchi-loading15x15.gif
diff --git a/src/wok/plugins/gingerbase/ui/Makefile.am b/src/wok/plugins/gingerbase/ui/Makefile.am
new file mode 100644
index 0000000..b2b0e8f
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/Makefile.am
@@ -0,0 +1,20 @@
+#
+# Ginger Base
+#
+# Copyright IBM, Corp. 2015
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+SUBDIRS = config css images js pages
+
+uidir = $(datadir)/wok/plugins/gingerbase/ui
diff --git a/src/wok/plugins/gingerbase/ui/config/Makefile.am b/src/wok/plugins/gingerbase/ui/config/Makefile.am
new file mode 100644
index 0000000..0b60cc9
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/config/Makefile.am
@@ -0,0 +1,22 @@
+#
+# Ginger Base
+#
+# Copyright IBM, Corp. 2015
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+xmldir = $(datadir)/wok/plugins/gingerbase/ui/config
+
+dist_xml_DATA = \
+ tab-ext.xml \
+ $(NULL)
diff --git a/src/wok/plugins/gingerbase/ui/config/tab-ext.xml b/src/wok/plugins/gingerbase/ui/config/tab-ext.xml
new file mode 100644
index 0000000..2d2d9bd
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/config/tab-ext.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<tabs-ext>
+ <tab>
+ <access role="admin" mode="admin"/>
+ <access role="user" mode="none"/>
+
+ <title>Host</title>
+ <path>plugins/gingerbase/host.html</path>
+ </tab>
+</tabs-ext>
diff --git a/src/wok/plugins/gingerbase/ui/images/Makefile.am b/src/wok/plugins/gingerbase/ui/images/Makefile.am
new file mode 100644
index 0000000..34109bd
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/images/Makefile.am
@@ -0,0 +1,22 @@
+#
+# Ginger Base
+#
+# Copyright IBM, Corp. 2015
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+SUBDIRS = theme-default
+
+imagedir = $(datadir)/wok/plugins/gingerbase/ui/images
+
+dist_image_DATA = *.png *.ico
diff --git a/src/wok/plugins/gingerbase/ui/images/icon-vm.png b/src/wok/plugins/gingerbase/ui/images/icon-vm.png
new file mode 100644
index 0000000000000000000000000000000000000000..50dac50c5a0ee59f4e79170434f53bb3b94390e3
GIT binary patch
literal 2976
zcmbVOi8~YiAK$c?G*_1+SxjOnw_GDMmIx6-d=n-&8()kq<W|T%lAFvDQI1%-m1|)L
zlcVJ*<Q&6~-=FY(p3m`op6C63eO~YP`}I8UcZ`X#KIDYZ2><{9K^f?o9o~ea4Q4+)
zTM++z0RXsMP<l7a{~h~n$Ah+@iE!)YqjU0|_6;wf3Y?G$eFEW)8b<MQ?WJ#f1svn~
zW8Di*&&S4-g#A+Fkt*GZrm-n<u_IM6(We`*ZXNYMVhw0Dd}H$USYdKOOU2Xs4X*T1
zd#1>T!sWRfzrMOa{5InHIB|B;uUC_y-b`P{ZH>Rk5(<NY|J%wp^O<gq>H9ra<F+|6
zGQ!&1-MW^RqUJqCnc(2Lz?#m}jmj$EY!((2tTXIgoMjoShCU#_*{IO9w4|NvVsN9l
zBBP?x^W$-I;(4CFM&ZL);KH-rwYl&`?~o>3KJ!OrlIR$KnP)UzTQn=j#XOI|ZF6-7
zU@(}#JeQbSsf9S@p&gpBFwo>5OsTn;Ou_&>RUmbpVE)U-m*ub6rNo1(x2IOJ#${-4
zhM$#gEU}KG!6@slT|=`?%Q+m*mwCU0Lqa5J4I$NhCc#||5}_CV#ixK3qD}qi`<o`o
zP>|}IG5eWO7^>=Z*LQ-CVQs=AqFqs%TRRud9FtFOFIu`bQ@6@ObG(bXh@GaiNOJ|C
zZa(i~qELOe>cw0ingv-<*OFiMN9q>Y^sgX5dL^#m6Ow_5OC4OkjoBqE%h~!|!ysE>
ze*jF6d8@E(EE?L`;;SLkL7(ele1qYGjSfPQZ?wX8lb*YA5C{SrP*Jr93kM>oJ6%k}
z%Oxfvu#Z>fNw#a6su$WQW^v}~9w5rE<@xzQho4_FX>*pU#KDn~ZT2f{YTRdG<WY0K
zoF`7M9v&f|YFUB`&f}fV)%4a<r9+=o#mmijs<P+{=bkLA-}2-~Ei?XiAMOKrtvRSG
z{r&x0j2_}vlbgsrvTe*Kr4uv)t2hCG)+<}5Ei5h`xZ8}5R=dzA-+R&f25sNBmQ~Ix
z*5M71e`g>N$S}zE9eSYV)2B~f4y~D1AP9#Ts;RF*8IjD(cs)4R097IpWXgPU`0Kcw
zLl%cC(q~ed{eO?q1|{BgV0C?DwAEQDR!=z7Pk2o>GPB0FbX&R6082O^mlMyaCBsN(
z^yawPZ5A65_Y0lXx!4E<XcdbUt<gdBQG=%5ntKG*;4o{5*Gaq+{!#p|h6^z(%d<@i
zzqhloT*mch)2F-_ArN{RVR2!f`uQnW1$=ybJX^Q%)r~<ra;Txckti-mU%!K+cCI&5
zK~i#<W3}@-xUgD)7kW%*b8~ZF!I%Sz_4jXrGxxP$mT;KXLCW|x+(vnLPM&O>)0st&
zRsPdrB()|9Hb`Q;GdhMnArG6+#HfXQul>xgFk9<I-@ioSK<37c%KsFdO)_q*#4&v>
zr*p!a^(YaII(*t|O$0$uadaDrz@97R(fo}X`hGgij-L%6t77)cS&C&Umx~V|twZXT
zPdoEPhj~m8<PN~FfaS@(`Y)wPNc<fau8HD29X>$epT)&sVKV4Xk(K_d--8?RUw$3v
zjt|(Iu~9H?py1~0gRwS9DV-(pvuY*0)|1k~GF%DZynoy_T`(^X{AyrZGDAo#KPpvP
zQNkR~z8LuYd~OP3yT4>SnNPdG>TBL|(z;^|Qp;aZPThZLTM??O=Q+cU`-%?^-j&I?
zpE3SxT>%DEZ2$LoL69_!9Udu|n7k^H{^agGkZkcu5iqbtDKRM)51Q7_c<Xb_r$?)E
zm`*?7E`EGz=Q(?I9@xQF7+E77Yba?06lawZu<|duY<Wza=fMue^59UI9Y!#f><J|^
zX}%9AibhJTu|n`Gr#<A*z}ZCQzNL9jjcT{xR0$vjeLHv>6CWqMB6o1tI;$Vl@33Z%
zWJIUAM2LcV6TKz8_idv8-ns>F%(}?cvK8aH@5ulETwwOo9xvsZb|*s#e37!<d@v&6
zRGL10DnYx${=KIiSsKin`R!SEOOD}Z$iG?mQq0!RQ#psmF{-lN7uSSpzO@?mYr!7W
zFDPul;cOY)pIKuy7d^%S;9_wOpZ4mjpv9#noM_>|t3`zqcKo1du&&F+HR;urCdAWp
z<6k6<+8*7+DfKuISNP+hC#5lf!gWee)obKgHje7m6eM{AP~iW01B$<`iJhSM&^F7!
zY}*Dcck6%!N`&*!n2ZBq1l8*@8_Bx59T~ixOO_EBD3c$)p<(*<>Cn*7kD5RyK8n83
z%WjB34PP8WHq}p1m03tP0VOv2wJqc?%$%_T+Fg_NEXeR2t&(6||02b6g#UCLU~qi3
z9Xn=jumiaXz?dl$YeE=4#`d(AQuiW<8{|2s#32m7W9=2_DNOrZg7w9D6&P@HY4ipB
z?DMI*2m-#XN>R1Rj^tQ0saj^}#DB=)S(A}MITrK7Rl!{8Tn|qA$OE>V-D5jxYZEV9
zy49Pb4krQ-)Jl!c4lCX=I4)gi=%id*t;cur)5K8SQ`%x7-yPmvw*HDeV+0U&{kQ5F
zd65-0$fA=`QxY#Efu3C<DskAeNM-UhXNW{)qYU!~vdQ!<XeBkWhbk>$(!P=EDtGkh
z?1c{`PEK~M6EIQ7wsj|>RUYXmoR*W_np#5^Emo2TRwvi&O?DvHArYycuFQmCM#_Pc
z^NzLNd<%KA0Y&*o*2J4<KJWnZ&i6HB96Y3YX|v&8iRMoc3DpQHIncRhv5<GFEmo57
zT#=Np3n!gV3zl?Wu1N|##y>?@>uD`PKd(0!yleGwrru=pVcV(0^bDi7>k9)Uy7ys)
z>%tj;l6CdZyAj@unJa&yn^XsDB03(D0xoME6-S_p`eb;`{oGM3Q;#v-YOmgQYfXdj
ze@V^#XLPo8exZkW4*`)WGLR%cxdUaYmjN5aMSPgzF5atP+^c^s_ClG^5s)lHSuC!6
zT{sI+sVt3ye7L%LkJ?1Czg@DS@OI$!#Y6J(?bbDqExhMdfL#4W<+$&*>E%DLaw&Hj
z7Xhx=V+jjlhc?*}>qHQ69iGcR0hoDbRZmO{8(OR%)k8L$Kd{AuR+1uLB!<3#5=N!<
zRWb#Z|NLn(U)nzdzh_IcZjBDywN5>%kgj1fCqHG$O8&CQwn0e9p8DO1W}lgM#(Iwa
z@D-to`$u&1is*%4-nW?O<B@zkr4~V^?>jRIy*y5LOJ4VL2i?f(tXf@w9TGZ!f5#{m
zkknXdV=c4`qBJ_D=qm>c(Y%h!!n+q-X4i~z%Cio2=4~*qf?_Kbd^6<aKEnOxYW)Op
z^mQ)@OK6CFooaC;u@BLap_4avjFJIB(xZ(d4U?t*LN0vu80U}#O6v(-EzF;1Pn7X_
zuP=V|BxgQU;m+M-M-li@Ez$8akJ)}!!><TDF<cEqTNPdZ-rBV^bFE&*;nLvGcxfq~
zTS2eO%DRHQQyvko=d!Eh8W^e#9kz5)OSUUEwM)8P9OY3R`MLHT6?d`|#MIT)LgS<^
z6yx%0U4|_BHF=ZG%2GDU=aSt|&%+^$G(?AOZJ?6t#==lDO%vZ>TSUi+S!7o{{604J
zvOS*tTce4vA~B~W0$^`l^{C5&BjEa;P20|6Hf~`}BIc$_0isO&jc5U#c7UAbC-&sO
zotzTHYC7JUE;{TGL<fi6j8H3>-8pOYu|HJLvm)9;wPOpK^_ptrPX<rvG|jc;bq`#}
z@9EWsf*>QL(>N1x7G0$tb~D_exI8=(L)?q%_H5YJhE?vk@SqODLErHLrnkGe6b+?I
mVQE8J@&9#74TC1P9{|tL%c2?+(}WHuZvg71u^w5+A?$zXeWqvt
literal 0
HcmV?d00001
diff --git a/src/wok/plugins/gingerbase/ui/images/logo.ico b/src/wok/plugins/gingerbase/ui/images/logo.ico
new file mode 100644
index 0000000000000000000000000000000000000000..446143f066a60f479b2cb8f8d04ab3c97ff60e56
GIT binary patch
literal 1214
zcma)*3rLeu6vyu=X_;nPV)$&PPF)r(wTQ|dTGOUtnOdf0mZ=cR#99xbub1{BqnD9^
z^Z>PV6h)fUny6#CN{3di2P{*h2ek@Oq0a4o*=I}2Iv?krbAR`oKi_vQA0faVCr83o
zF{!X2#Dx$Nz}$(sm^sgR<Jj30yCMGpMl1z837jm3H1$<DU4IV>Tbdw<FM-;Hi<#et
z=I}n~iB^qh8{XzCNyvT<I;$&znmT~?eFXZgAE@Om?1h(6Iq+2e1-ca!zOAO7n3*};
zXq6n?2kF<!f%cez;-Fgx4$e+xo{WR;oqhc_OW;#nF!Zm|JK}m8gi6aC+##`QA5PmJ
zfeZ(o(}%&&1P5#*1vVbnssk~XhN5bNz=T)>5^+BS=V54SJ|^z)5I7%kU;>-skiq*{
z5B^=eF<T)pK9+)bV;9UCK>t-HOi+bkR-wK1xpfXL;S<?ho1pQ5gYzxiHR~=e+XHS(
zYe7QMZb3IjWV72H-JpD~6z(tbgwn1o$D2s!YteWNJS!i9l%iW?+34Lvr*KL(6{_X|
zobEjAb{lD|4qsmYvGF;~r0Aunc#>=c)0W4s|D{#(q9~vaX{rGms=((Wn*~LeWqIu}
zkGvlzwaxjL25hey2bVweu<xK*t+@Oa_)UKTK^x4IwmKMOjm@oL`l)}_NGPy}tdb}w
zHa>H`ji2N7m}Xsj#j7-`#=Dv}`)h&)9th^&^dR%>WH_MB8KcIXVf8p&s1xD|_k)R-
zrk$Z0-|Gf}&4Au$KhU$k?3YR5by~D9M&-q$=ocNz4!IY&p7%OxuJf&+Ei-G(23hU;
zHTLhMtjFR9ExVbPQVLzBFlROcIZ|#jmX6fm_hsVa3XP<aKAeAt8dqp&oBW=V^+d>Q
zkcNnm%Ds?ggd^Rv2~9_o82cv;p6LSBD_g_s-n1uZ8#<EeLwTm~LE9J!Zdo@M&*jFU
zoM+Z%F5)(8$8y`Wz~%Pd;Nlx@aH{<lk}}CcRMRXZMD&%Uhz3Ze$jpg#uec1IlFMPW
MDQ4iZEk#_;cNAJoqyPW_
literal 0
HcmV?d00001
diff --git a/src/wok/plugins/gingerbase/ui/images/theme-default/Makefile.am b/src/wok/plugins/gingerbase/ui/images/theme-default/Makefile.am
new file mode 100644
index 0000000..1fc98a3
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/images/theme-default/Makefile.am
@@ -0,0 +1,20 @@
+#
+# Ginger Base
+#
+# Copyright IBM, Corp. 2015
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+imagedir = $(datadir)/wok/plugins/gingerbase/ui/images/theme-default
+
+dist_image_DATA = *.png *.gif
diff --git a/src/wok/plugins/gingerbase/ui/images/theme-default/host-icon-sprite.png b/src/wok/plugins/gingerbase/ui/images/theme-default/host-icon-sprite.png
new file mode 100644
index 0000000000000000000000000000000000000000..da1cd3f2562a5905a526446bcc8fc18bea06c734
GIT binary patch
literal 1034
zcmV+l1oiugP)<h;3K|Lk000e1NJLTq003?P000^Y1^@s6R_JLg00006VoOIv0RI60
z0RN!9r;`8x010qNS#tmY3ljhU3ljkVnw%H_000McNliru-3t>283nlSO%wnC03B&m
zSad^gZEa<4bN~PV002XBWnpw>WFU8GbZ8()Nlj2>E@cM*00VAGL_t(&-tAexPZU8E
z{`PW&1_K4^OH?eZvAftnL5(5A#KOeLoryLc6xvbn7idfrLqY*-qLqe%L|Ypgg$i36
z(dbjkBSwPpvl)`j+}`fa-u^(2muzw~^LF01^X{8@Zysm_jzUN2Fh`A~Pjc5hKFL~I
z+Z}W#NVXC{Y>}KuY7;pNNspw5tO0f7IFeP8D-r4|QCJ)u*CII!fKd<0S(2@?9Y=DD
z<R_9!@=PZG-V7bLl9r_@9LG4P1)Rq+9Y?Z{<af)|`7qr|9MBxV)c`acbbCfT&pQC{
z%j$mX<hUFic+YA-2XN6mak_;`9K$+|XK?mUTkTPj&CIsEF5cU<hDHKoBi7iJvbM^i
z*Tus8!czN9a>$8s1<N-8RRC8_`$GnE?vb2Jz_2+0dq-p)ngI3#?S24@sTh|bQ+;d5
zH%uEL`5>TIAzA4bYua?6Ovagcnjz|Ai5Da5sM6$aQ8E^l$E3xZb^24#IlFC{{Sv!X
zdPZ`HoHhZhMyRZj95%WP!xe@3m<5`5?4yL_;89M%??>JmIN;83>nfaa#_lVU`y{Vr
z67H9I<>i9?7&xxqKI>29L{6meTNYI%0Emdw!G8E&QVE-1Rcq#UWYToK0q{&jHq+Sd
zU}FNnI)H(=d=J2sh`dW;({;UEMO8gxC-hsZHn6+_8Cz8V%OQ7`GXQ2(brnD(BP{Cx
z=6&CP5~WnH*XNDysWO?Qs#^et%pdJCfS-x(Dpi%PY)T=^F&E8^3~dd>ISl}e&Opgd
z>jQ8Oz$E}@0sK%^x9UJ%4m8_i!$G%aL_`u-2dYWWvJAJ-u<F2q`TaRWw_eh}pDyEv
z>yyFRKMi0z&>mIQrid&iVqA_4oV3~tBC;bQJ7_QMEcIHnC?X#LytKL>s%r052kP~D
zY<0ls{5RDBFDZ*`N~hftRMj`pW7t-CT|^!ky^4A7udB@<*0kwB7vI-)nq=l_0(fe5
zkBi7gBF9Bcoc6<NF-#g4k&RAyOj^9%=3_<YamMC0fYCtLR}r}oxmAjYmj^hLTt`+1
zRCTyh@)?Dxh{Y^e+NuMpIv5&N7WDCVBl5M=0B!+z9Oa;-3`iRt9+5!hy{f(jFa_X-
zh^)1x14RNBkv{-#tLjpkD=*u5$B=13xe4GPc-8~JKL<=Y@!??g0{{R307*qoM6N<$
Ef;%S0RsaA1
literal 0
HcmV?d00001
diff --git a/src/wok/plugins/gingerbase/ui/images/theme-default/kimchi-loading15x15.gif b/src/wok/plugins/gingerbase/ui/images/theme-default/kimchi-loading15x15.gif
new file mode 100644
index 0000000000000000000000000000000000000000..aaa4f85a0560dcb59d4bb70154a9144417aae926
GIT binary patch
literal 1653
zcmZ?wbhEHb6krfwcz&0`fx$V3fzy*s(30KRoyj+pP0*a%B9B4Xkl)0X$H9|dJd8D}
zo<ZDBSSFF7*jZT0OhTc9Q7nTgk3rREDud*7MxI>8&Ju=(ISf+93MQOdag7Y~1hic{
z8T#{u6)cohTNtM^7+W$J#50+i$>`cj=^O84k`pyFn#{1$Ur8%a&i6QjtgEuCfQhw>
zh77A6gQ$gokA@_-E$2dp^>Sv?oMy2Rvbjr`S1FsTIOwZtnQE_R*m$2oUC1KhF@wT7
z#vS5TPBXdYi#jqhIC*|#&}Xr)`pY25?86wZk@$x}Azj<#4}*rAu{Vcnu(UhJUj}_&
zGsWW!mvn9Irz#jqI|d0m<_4Kq$D4?%x#%8bJFV#KwS(tqvz9fdTmMyIV-~+CKU<>^
zTODbStQ;$e9OEp8kfaJrQB(IojUXN?PfLA&1ruKlE$<Ybz{O>Dnh|c+IZj3l84L_z
z+ZiGkGQ_8gg)Ec{ZB|VbVu;;p8Ir+}TJcZ8St};J)7e)ugI_wAy~kUSA^Gq;v#nzB
zo6<uZ9TN=&l6EuXHCx41&a>X&p6tkweNrgxtWY&KLrITauKX0wDL;*ZSPITdWuHCl
z7S2#|o1wN-skGcGd-j}YNrw7v?ff;HUH7htly%83WoVk=SR=P3TA8QnVNZtdt|Td^
z4tBRT;l<gOCKJSuq^f)gOk<w3o@>%d>z1S5joVY2V;E+x4Cszxn7#dGQiZ}|@k{wq
ze5<)H#@>~ixp+mvx~nC^*GqKvReGJxyd=J8Z|Hp0)LG8{Q?7j|(|J;(^S(;?X-VtX
z{Ej0{$vo>WNUb@RHtpd12Emt&YTJ7ve>HRaY*WxWB$BmO<7<oVrMfE&d+u577yI7H
zdv${AuTG6`J!)PD74G*(XRN&WpI$)mKewN2NU*bGfUA+70W%{51B2pE7EU3C{|q`n
zHZYS2Ffee)GW_S1@z}87U^9oXR?LYF3lFyoD0|KE*tqCuBO@a=9coY=j!k!j<aB0i
zc<9u4hfS*nq@!EHIP1=djf>s;v1`@Ep>^V-!(BqkNq@`*laF`Fn|H~0Zd!7(0h{Hf
zM42F;^~FLc<zy?bzucZ38xtI`nPf?{Nk)rZI#dI#a%KcAJ>AR3%!JJ}Tb!mjcL>V+
z&Dl|qe5_B>QtnB`#6;Il`9QBD85<TlO;@&EX5(p~fXzf_h=~b~c^s@tPtrczcWUF8
zl$)Y)G4W`lxU|rj6$Xj!z4E$EBA!9O@K)2-%Q<1V)NzW4rQ4Q{qQ@s^Df6<iU^CYa
zVJ@$f%ZvcUgKd2BZZRt+Jap&~-N|`mN5EtIK6cxtnin4*pO_@<TefG1V5)aFPwc)q
zGcP6L3rdhvk&Uz{R5;QluAbJjV`8#<o~Uk<jm4+?Cwh5=mxY`NNH{%#3wux+Vs{|2
sX~(-16pJpOC{Q`pufUDnn>s|9;tWh`McC5^G?`;~3OSj#0+YEl0GD)I?EnA(
literal 0
HcmV?d00001
--
2.1.0
9 years, 2 months
[PATCH 13/15] V4 Ginger Base : base plugin ui/css files
by chandra@linux.vnet.ibm.com
From: chandrureddy <chandra(a)linux.vnet.ibm.com>
---
src/wok/plugins/gingerbase/ui/css/Makefile.am | 26 ++
.../gingerbase/ui/css/theme-default/host.css | 287 +++++++++++++++++++++
.../gingerbase/ui/css/theme-default/report-add.css | 37 +++
.../ui/css/theme-default/report-rename.css | 39 +++
.../ui/css/theme-default/repository-add.css | 42 +++
.../ui/css/theme-default/repository-edit.css | 88 +++++++
.../plugins/kimchi/ui/css/theme-default/host.css | 287 ---------------------
.../kimchi/ui/css/theme-default/report-add.css | 37 ---
.../kimchi/ui/css/theme-default/report-rename.css | 39 ---
.../kimchi/ui/css/theme-default/repository-add.css | 42 ---
.../ui/css/theme-default/repository-edit.css | 88 -------
11 files changed, 519 insertions(+), 493 deletions(-)
create mode 100644 src/wok/plugins/gingerbase/ui/css/Makefile.am
create mode 100644 src/wok/plugins/gingerbase/ui/css/theme-default/host.css
create mode 100644 src/wok/plugins/gingerbase/ui/css/theme-default/report-add.css
create mode 100644 src/wok/plugins/gingerbase/ui/css/theme-default/report-rename.css
create mode 100644 src/wok/plugins/gingerbase/ui/css/theme-default/repository-add.css
create mode 100644 src/wok/plugins/gingerbase/ui/css/theme-default/repository-edit.css
delete mode 100644 src/wok/plugins/kimchi/ui/css/theme-default/host.css
delete mode 100644 src/wok/plugins/kimchi/ui/css/theme-default/report-add.css
delete mode 100644 src/wok/plugins/kimchi/ui/css/theme-default/report-rename.css
delete mode 100644 src/wok/plugins/kimchi/ui/css/theme-default/repository-add.css
delete mode 100644 src/wok/plugins/kimchi/ui/css/theme-default/repository-edit.css
diff --git a/src/wok/plugins/gingerbase/ui/css/Makefile.am b/src/wok/plugins/gingerbase/ui/css/Makefile.am
new file mode 100644
index 0000000..3e19c65
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/css/Makefile.am
@@ -0,0 +1,26 @@
+#
+# Ginger Base
+#
+# Copyright IBM, Corp. 2015
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+EXTRA_DIST = theme-default
+
+cssdir = $(datadir)/wok/plugins/gingerbase/ui/css
+dist_css_DATA = theme-default.min.css
+
+theme-default.min.css: theme-default/*.css
+ cat $^ > $@
+
+CLEANFILES = theme-default.min.css
diff --git a/src/wok/plugins/gingerbase/ui/css/theme-default/host.css b/src/wok/plugins/gingerbase/ui/css/theme-default/host.css
new file mode 100644
index 0000000..96a54b5
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/css/theme-default/host.css
@@ -0,0 +1,287 @@
+/*
+ * Project Ginger Base
+ *
+ * Copyright IBM, Corp. 2013-2015
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+.host-panel {
+ font-size: 12px;
+ margin-bottom: 100px;
+}
+
+.host-panel .logo-container, .host-panel .info-container,
+.host-panel .section-label, .host-panel .section-value {
+ display: inline-block;
+ vertical-align: top;
+}
+
+.host-panel .section-label {
+ display: inline-block;
+ margin-right: 1em;
+ vertical-align: top;
+}
+
+.host-panel .logo {
+ background: url("plugins/gingerbase/images/icon-vm.png") no-repeat left top;
+ height: 128px;
+ width: 128px;
+}
+
+.host-panel .hostname {
+ text-decoration: underline;
+}
+
+.host-panel .action-panel {
+ margin-top: 2em;
+ padding-left: 10px;
+}
+
+.host-panel .button-icon {
+ background: url("../images/theme-default/host-icon-sprite.png") no-repeat
+ left top;
+ display: inline-block;
+ height: 12px;
+ width: 12px;
+}
+
+.host-panel .action-icon-stop {
+ background-position: -14px 0;
+}
+
+.host-panel .action-icon-restart {
+ background-position: -28px 0;
+}
+
+.host-panel .action-icon-download {
+ background-position: -42px 0;
+}
+
+.host-panel .action-icon-connect {
+ background-position: -56px 0;
+}
+
+.host-panel .action-icon-add {
+ background-position: -70px 0;
+}
+
+.host-panel .action-icon-edit {
+ background-position: -84px 0;
+}
+
+.host-panel .action-icon-remove {
+ background-position: -98px 0;
+}
+
+.host-panel button:disabled .action-icon-start {
+ background-position: 0 -14px;
+}
+
+.host-panel button:disabled .action-icon-stop {
+ background-position: -14px -14px;
+}
+
+.host-panel button:disabled .action-icon-restart {
+ background-position: -28px -14px;
+}
+
+.host-panel button:disabled .action-icon-download {
+ background-position: -42px -14px;
+}
+
+.host-panel button:disabled .action-icon-connect {
+ background-position: -56px -14px;
+}
+
+.host-panel button:disabled .action-icon-add {
+ background-position: -70px -14px;
+}
+
+.host-panel button:disabled .action-icon-edit {
+ background-position: -84px -14px;
+}
+
+.host-panel button:disabled .action-icon-remove {
+ background-position: -98px -14px;
+}
+
+.host-panel .info-container {
+ padding-top: 16px;
+ width: 890px;
+}
+
+.host-panel .section-header {
+ background: #EEE;
+ border-radius: 5px;
+ cursor: pointer;
+ line-height: 2em;
+ margin: 1em 0 1em;
+ padding-left: 6px;
+}
+
+.host-panel .section-header:hover {
+ background: #06f;
+ color: white;
+}
+
+.host-panel .section-content {
+ padding-left: 1em;
+}
+
+.host-panel .section-header .arrow {
+ border-color: transparent;
+ border-style: solid;
+ display: inline-block;
+ margin-right: 6px;
+ width: 0;
+}
+
+.host-panel .section-header[aria-expanded="true"] .arrow {
+ border-top-color: black;
+ border-width: 8px 4px 0;
+ border-bottom: none;
+}
+
+.host-panel .section-header[aria-expanded="true"]:hover .arrow {
+ border-top-color: white;
+}
+
+.host-panel .section-header[aria-expanded="false"] .arrow {
+ border-left-color: black;
+ border-right: none;
+ border-width: 4px 0 4px 8px;
+}
+
+.host-panel .section-header[aria-expanded="false"]:hover .arrow {
+ border-left-color: white;
+}
+
+.host-panel .section-row {
+ line-height: 1.6em;
+ margin-bottom: 1em;
+}
+
+.host-panel .section-label {
+ width: 100px;
+}
+
+#frequency-textbox {
+ width: 20px;
+}
+
+#container-chart-cpu,
+#container-chart-memory,
+#container-chart-disk-io,
+#container-chart-network-io {
+ border: 1px solid white;
+ box-shadow: 2px 2px 2px gray, 2px -2px 2px gray, -2px -2px 2px gray, -2px
+ 2px 2px gray;
+ height: 100px;
+ width: 500px;
+}
+
+#container-chart-disk-io .disk-write,
+#container-chart-network-io .network-sent {
+ stroke: #f80;
+}
+
+/* Debug Report */
+.cell-text-wrapper {
+ margin-left: 10px;
+}
+
+.host-panel #available-reports-grid {
+ border-color: #ddd;
+ height: 400px;
+ width: 850px;
+}
+
+.host-panel select#available-reports-list {
+ width: 300px;
+}
+
+.host-panel select#available-reports-list option {
+ margin: .2em 1em;
+}
+
+.debug-report-name,
+.debug-report-time {
+ width: 424px;
+}
+
+#id-debug-img {
+ background: url(../images/theme-default/kimchi-loading15x15.gif) 12px
+ center no-repeat;
+ padding-left: 23px;
+}
+
+/* End of Debug Report */
+
+/* Software Updates */
+.host-panel #software-updates-grid {
+ border-color: #ddd;
+ height: 300px;
+ width: 850px;
+}
+
+.software-update-name,
+.software-update-repos {
+ width: 224px;
+}
+
+.software-update-version,
+.software-update-arch {
+ width: 200px;
+}
+
+.host-panel #software-updates-progress-textarea {
+ border: 1px solid #ddd;
+ box-sizing: border-box;
+ height: 100px;
+ padding: .2em .5em;
+ resize: vertical;
+ width: 852px;
+}
+/* End of Software Updates */
+
+/* Repository */
+.host-panel #repositories-grid {
+ border-color: #ddd;
+ height: 200px;
+ width: 850px;
+}
+
+.host-panel #repositories-grid .repository-id {
+ width: 120px;
+}
+
+.host-panel #repositories-grid .repository-name {
+ width: 640px;
+}
+
+.host-panel #repositories-grid .repository-enabled {
+ width: 88px;
+}
+
+.host-panel #repositories-grid .repository-baseurl.deb {
+ width: 400px;
+}
+
+.host-panel #repositories-grid .repository-enabled.deb {
+ width: 100px;
+}
+
+.host-panel #repositories-grid .repository-gpgcheck.deb {
+ width: 150px;
+}
+/* End of Repository */
diff --git a/src/wok/plugins/gingerbase/ui/css/theme-default/report-add.css b/src/wok/plugins/gingerbase/ui/css/theme-default/report-add.css
new file mode 100644
index 0000000..e9f639d
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/css/theme-default/report-add.css
@@ -0,0 +1,37 @@
+/*
+ * Project Ginger Base
+ *
+ * Copyright IBM, Corp. 2013-2015
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#report-add-window {
+ height: 300px;
+ width: 400px;
+}
+
+#report-add-window .field {
+ font-size: 12px;
+}
+
+#report-name-textbox {
+ margin: 0;
+ width: 100%;
+}
+
+.info-add-debug-report {
+ font-size: 12px;
+ color: #999999;
+ font-weight: lighter;
+ font-family: 'Helvetica Neue', Helvetica, Arial;
+}
diff --git a/src/wok/plugins/gingerbase/ui/css/theme-default/report-rename.css b/src/wok/plugins/gingerbase/ui/css/theme-default/report-rename.css
new file mode 100644
index 0000000..4b13946
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/css/theme-default/report-rename.css
@@ -0,0 +1,39 @@
+/*
+ * Project Ginger Base
+ *
+ * Copyright IBM, Corp. 2014-2015
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#report-rename-window {
+ height: 300px;
+ width: 400px;
+}
+
+#report-rename-window .field {
+ font-size: 12px;
+}
+
+#report-name-textbox {
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ margin: 0;
+ width: 100%;
+}
+
+.info-debug-report-rename {
+ font-size: 12px;
+ color: #999999;
+ font-weight: lighter;
+ font-family: 'Helvetica Neue', Helvetica, Arial;
+}
diff --git a/src/wok/plugins/gingerbase/ui/css/theme-default/repository-add.css b/src/wok/plugins/gingerbase/ui/css/theme-default/repository-add.css
new file mode 100644
index 0000000..365ca43
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/css/theme-default/repository-add.css
@@ -0,0 +1,42 @@
+/*
+ * Project Ginger Base
+ *
+ * Copyright IBM, Corp. 2014-2015
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#repository-add-window {
+ height: 500px;
+ width: 1000px;
+}
+
+#repository-add-window span.required {
+ color: red;
+ padding-left: 5px;
+ vertical-align: top;
+}
+
+#repository-add-window .textbox-wrapper input[type="text"] {
+ box-sizing: border-box;
+ width: 100%;
+}
+
+#repository-add-window .textbox-wrapper label {
+ vertical-align: middle;
+}
+
+#isMirrorLabel {
+ font-size: 14px;
+ font-weight: lighter;
+ font-family: 'Helvetica Neue', Helvetica, Arial;
+}
diff --git a/src/wok/plugins/gingerbase/ui/css/theme-default/repository-edit.css b/src/wok/plugins/gingerbase/ui/css/theme-default/repository-edit.css
new file mode 100644
index 0000000..19dff56
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/css/theme-default/repository-edit.css
@@ -0,0 +1,88 @@
+/*
+ * Project Ginger Base
+ *
+ * Copyright IBM, Corp. 2014-2015
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+.yum div#repository-edit-window {
+ height: 680px;
+ width: 1000px;
+}
+
+.deb div#repository-edit-window {
+ height: 480px;
+ width: 1000px;
+}
+
+
+.repository-edit-fieldset {
+ float: left;
+ padding: 0 30px;
+ width: 95%;
+}
+
+.repository-edit-wrapper-label, .repository-edit-wrapper-controls {
+ display: inline-block;
+ height: 30px;
+ line-height: 30px;
+ font-size: 14px;
+ vertical-align: top;
+}
+
+.repository-edit-wrapper-label {
+ margin-top: 10px;
+ width: 150px;
+}
+
+.repository-edit-wrapper-controls label {
+ vertical-align: middle;
+}
+
+.repository-edit-wrapper-controls {
+ width: 100%;
+}
+
+.repository-edit-wrapper-controls input[type="text"] {
+ font-size: 16px;
+ height: 30px;
+ line-height: 30px;
+ padding: 0 10px;
+ width: 100%;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ border: 1px solid #CCCCCC;
+}
+
+
+.repository-edit-wrapper-controls input[type="text"][readonly] {
+ color: #bbb;
+ background-color: #fafafa;
+}
+
+
+.repository-edit-wrapper-controls input[type="text"][disabled] {
+ color: #bbb;
+ background-color: #fafafa;
+ cursor: not-allowed;
+}
+
+
+.deb .yum{
+ display: none;
+}
+
+
+.yum .deb{
+ display: none;
+}
diff --git a/src/wok/plugins/kimchi/ui/css/theme-default/host.css b/src/wok/plugins/kimchi/ui/css/theme-default/host.css
deleted file mode 100644
index a0cccb1..0000000
--- a/src/wok/plugins/kimchi/ui/css/theme-default/host.css
+++ /dev/null
@@ -1,287 +0,0 @@
-/*
- * Project Kimchi
- *
- * Copyright IBM, Corp. 2013-2014
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-.host-panel {
- font-size: 12px;
- margin-bottom: 100px;
-}
-
-.host-panel .logo-container, .host-panel .info-container,
-.host-panel .section-label, .host-panel .section-value {
- display: inline-block;
- vertical-align: top;
-}
-
-.host-panel .section-label {
- display: inline-block;
- margin-right: 1em;
- vertical-align: top;
-}
-
-.host-panel .logo {
- background: url("plugins/kimchi/images/icon-vm.png") no-repeat left top;
- height: 128px;
- width: 128px;
-}
-
-.host-panel .hostname {
- text-decoration: underline;
-}
-
-.host-panel .action-panel {
- margin-top: 2em;
- padding-left: 10px;
-}
-
-.host-panel .button-icon {
- background: url("../images/theme-default/host-icon-sprite.png") no-repeat
- left top;
- display: inline-block;
- height: 12px;
- width: 12px;
-}
-
-.host-panel .action-icon-stop {
- background-position: -14px 0;
-}
-
-.host-panel .action-icon-restart {
- background-position: -28px 0;
-}
-
-.host-panel .action-icon-download {
- background-position: -42px 0;
-}
-
-.host-panel .action-icon-connect {
- background-position: -56px 0;
-}
-
-.host-panel .action-icon-add {
- background-position: -70px 0;
-}
-
-.host-panel .action-icon-edit {
- background-position: -84px 0;
-}
-
-.host-panel .action-icon-remove {
- background-position: -98px 0;
-}
-
-.host-panel button:disabled .action-icon-start {
- background-position: 0 -14px;
-}
-
-.host-panel button:disabled .action-icon-stop {
- background-position: -14px -14px;
-}
-
-.host-panel button:disabled .action-icon-restart {
- background-position: -28px -14px;
-}
-
-.host-panel button:disabled .action-icon-download {
- background-position: -42px -14px;
-}
-
-.host-panel button:disabled .action-icon-connect {
- background-position: -56px -14px;
-}
-
-.host-panel button:disabled .action-icon-add {
- background-position: -70px -14px;
-}
-
-.host-panel button:disabled .action-icon-edit {
- background-position: -84px -14px;
-}
-
-.host-panel button:disabled .action-icon-remove {
- background-position: -98px -14px;
-}
-
-.host-panel .info-container {
- padding-top: 16px;
- width: 890px;
-}
-
-.host-panel .section-header {
- background: #EEE;
- border-radius: 5px;
- cursor: pointer;
- line-height: 2em;
- margin: 1em 0 1em;
- padding-left: 6px;
-}
-
-.host-panel .section-header:hover {
- background: #06f;
- color: white;
-}
-
-.host-panel .section-content {
- padding-left: 1em;
-}
-
-.host-panel .section-header .arrow {
- border-color: transparent;
- border-style: solid;
- display: inline-block;
- margin-right: 6px;
- width: 0;
-}
-
-.host-panel .section-header[aria-expanded="true"] .arrow {
- border-top-color: black;
- border-width: 8px 4px 0;
- border-bottom: none;
-}
-
-.host-panel .section-header[aria-expanded="true"]:hover .arrow {
- border-top-color: white;
-}
-
-.host-panel .section-header[aria-expanded="false"] .arrow {
- border-left-color: black;
- border-right: none;
- border-width: 4px 0 4px 8px;
-}
-
-.host-panel .section-header[aria-expanded="false"]:hover .arrow {
- border-left-color: white;
-}
-
-.host-panel .section-row {
- line-height: 1.6em;
- margin-bottom: 1em;
-}
-
-.host-panel .section-label {
- width: 100px;
-}
-
-#frequency-textbox {
- width: 20px;
-}
-
-#container-chart-cpu,
-#container-chart-memory,
-#container-chart-disk-io,
-#container-chart-network-io {
- border: 1px solid white;
- box-shadow: 2px 2px 2px gray, 2px -2px 2px gray, -2px -2px 2px gray, -2px
- 2px 2px gray;
- height: 100px;
- width: 500px;
-}
-
-#container-chart-disk-io .disk-write,
-#container-chart-network-io .network-sent {
- stroke: #f80;
-}
-
-/* Debug Report */
-.cell-text-wrapper {
- margin-left: 10px;
-}
-
-.host-panel #available-reports-grid {
- border-color: #ddd;
- height: 400px;
- width: 850px;
-}
-
-.host-panel select#available-reports-list {
- width: 300px;
-}
-
-.host-panel select#available-reports-list option {
- margin: .2em 1em;
-}
-
-.debug-report-name,
-.debug-report-time {
- width: 424px;
-}
-
-#id-debug-img {
- background: url(../images/theme-default/kimchi-loading15x15.gif) 12px
- center no-repeat;
- padding-left: 23px;
-}
-
-/* End of Debug Report */
-
-/* Software Updates */
-.host-panel #software-updates-grid {
- border-color: #ddd;
- height: 300px;
- width: 850px;
-}
-
-.software-update-name,
-.software-update-repos {
- width: 224px;
-}
-
-.software-update-version,
-.software-update-arch {
- width: 200px;
-}
-
-.host-panel #software-updates-progress-textarea {
- border: 1px solid #ddd;
- box-sizing: border-box;
- height: 100px;
- padding: .2em .5em;
- resize: vertical;
- width: 852px;
-}
-/* End of Software Updates */
-
-/* Repository */
-.host-panel #repositories-grid {
- border-color: #ddd;
- height: 200px;
- width: 850px;
-}
-
-.host-panel #repositories-grid .repository-id {
- width: 120px;
-}
-
-.host-panel #repositories-grid .repository-name {
- width: 640px;
-}
-
-.host-panel #repositories-grid .repository-enabled {
- width: 88px;
-}
-
-.host-panel #repositories-grid .repository-baseurl.deb {
- width: 400px;
-}
-
-.host-panel #repositories-grid .repository-enabled.deb {
- width: 100px;
-}
-
-.host-panel #repositories-grid .repository-gpgcheck.deb {
- width: 150px;
-}
-/* End of Repository */
diff --git a/src/wok/plugins/kimchi/ui/css/theme-default/report-add.css b/src/wok/plugins/kimchi/ui/css/theme-default/report-add.css
deleted file mode 100644
index 8020182..0000000
--- a/src/wok/plugins/kimchi/ui/css/theme-default/report-add.css
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Project Kimchi
- *
- * Copyright IBM, Corp. 2013-2015
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#report-add-window {
- height: 300px;
- width: 400px;
-}
-
-#report-add-window .field {
- font-size: 12px;
-}
-
-#report-name-textbox {
- margin: 0;
- width: 100%;
-}
-
-.info-add-debug-report {
- font-size: 12px;
- color: #999999;
- font-weight: lighter;
- font-family: 'Helvetica Neue', Helvetica, Arial;
-}
\ No newline at end of file
diff --git a/src/wok/plugins/kimchi/ui/css/theme-default/report-rename.css b/src/wok/plugins/kimchi/ui/css/theme-default/report-rename.css
deleted file mode 100644
index 2fb2698..0000000
--- a/src/wok/plugins/kimchi/ui/css/theme-default/report-rename.css
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Project Kimchi
- *
- * Copyright IBM, Corp. 2014-2015
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#report-rename-window {
- height: 300px;
- width: 400px;
-}
-
-#report-rename-window .field {
- font-size: 12px;
-}
-
-#report-name-textbox {
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- margin: 0;
- width: 100%;
-}
-
-.info-debug-report-rename {
- font-size: 12px;
- color: #999999;
- font-weight: lighter;
- font-family: 'Helvetica Neue', Helvetica, Arial;
-}
diff --git a/src/wok/plugins/kimchi/ui/css/theme-default/repository-add.css b/src/wok/plugins/kimchi/ui/css/theme-default/repository-add.css
deleted file mode 100644
index 4344569..0000000
--- a/src/wok/plugins/kimchi/ui/css/theme-default/repository-add.css
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Project Kimchi
- *
- * Copyright IBM, Corp. 2014-2015
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#repository-add-window {
- height: 500px;
- width: 1000px;
-}
-
-#repository-add-window span.required {
- color: red;
- padding-left: 5px;
- vertical-align: top;
-}
-
-#repository-add-window .textbox-wrapper input[type="text"] {
- box-sizing: border-box;
- width: 100%;
-}
-
-#repository-add-window .textbox-wrapper label {
- vertical-align: middle;
-}
-
-#isMirrorLabel {
- font-size: 14px;
- font-weight: lighter;
- font-family: 'Helvetica Neue', Helvetica, Arial;
-}
\ No newline at end of file
diff --git a/src/wok/plugins/kimchi/ui/css/theme-default/repository-edit.css b/src/wok/plugins/kimchi/ui/css/theme-default/repository-edit.css
deleted file mode 100644
index 383a7fe..0000000
--- a/src/wok/plugins/kimchi/ui/css/theme-default/repository-edit.css
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Project Kimchi
- *
- * Copyright IBM, Corp. 2014-2015
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-.yum div#repository-edit-window {
- height: 680px;
- width: 1000px;
-}
-
-.deb div#repository-edit-window {
- height: 480px;
- width: 1000px;
-}
-
-
-.repository-edit-fieldset {
- float: left;
- padding: 0 30px;
- width: 95%;
-}
-
-.repository-edit-wrapper-label, .repository-edit-wrapper-controls {
- display: inline-block;
- height: 30px;
- line-height: 30px;
- font-size: 14px;
- vertical-align: top;
-}
-
-.repository-edit-wrapper-label {
- margin-top: 10px;
- width: 150px;
-}
-
-.repository-edit-wrapper-controls label {
- vertical-align: middle;
-}
-
-.repository-edit-wrapper-controls {
- width: 100%;
-}
-
-.repository-edit-wrapper-controls input[type="text"] {
- font-size: 16px;
- height: 30px;
- line-height: 30px;
- padding: 0 10px;
- width: 100%;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- border: 1px solid #CCCCCC;
-}
-
-
-.repository-edit-wrapper-controls input[type="text"][readonly] {
- color: #bbb;
- background-color: #fafafa;
-}
-
-
-.repository-edit-wrapper-controls input[type="text"][disabled] {
- color: #bbb;
- background-color: #fafafa;
- cursor: not-allowed;
-}
-
-
-.deb .yum{
- display: none;
-}
-
-
-.yum .deb{
- display: none;
-}
--
2.1.0
9 years, 2 months
[PATCH 12/15] V4 Ginger Base : base plugin ui/js files
by chandra@linux.vnet.ibm.com
From: chandrureddy <chandra(a)linux.vnet.ibm.com>
---
src/wok/plugins/gingerbase/ui/js/Makefile.am | 27 +
.../plugins/gingerbase/ui/js/src/gingerbase.api.js | 371 +++++++++
.../gingerbase/ui/js/src/gingerbase.host.js | 859 +++++++++++++++++++++
.../gingerbase/ui/js/src/gingerbase.main.js | 26 +
.../ui/js/src/gingerbase.report_add_main.js | 72 ++
.../ui/js/src/gingerbase.report_rename_main.js | 66 ++
.../ui/js/src/gingerbase.repository_add_main.js | 96 +++
.../ui/js/src/gingerbase.repository_edit_main.js | 74 ++
src/wok/plugins/kimchi/ui/js/src/kimchi.host.js | 858 --------------------
.../kimchi/ui/js/src/kimchi.report_add_main.js | 72 --
.../kimchi/ui/js/src/kimchi.report_rename_main.js | 66 --
.../kimchi/ui/js/src/kimchi.repository_add_main.js | 96 ---
.../ui/js/src/kimchi.repository_edit_main.js | 74 --
13 files changed, 1591 insertions(+), 1166 deletions(-)
create mode 100644 src/wok/plugins/gingerbase/ui/js/Makefile.am
create mode 100644 src/wok/plugins/gingerbase/ui/js/src/gingerbase.api.js
create mode 100644 src/wok/plugins/gingerbase/ui/js/src/gingerbase.host.js
create mode 100644 src/wok/plugins/gingerbase/ui/js/src/gingerbase.main.js
create mode 100644 src/wok/plugins/gingerbase/ui/js/src/gingerbase.report_add_main.js
create mode 100644 src/wok/plugins/gingerbase/ui/js/src/gingerbase.report_rename_main.js
create mode 100644 src/wok/plugins/gingerbase/ui/js/src/gingerbase.repository_add_main.js
create mode 100644 src/wok/plugins/gingerbase/ui/js/src/gingerbase.repository_edit_main.js
delete mode 100644 src/wok/plugins/kimchi/ui/js/src/kimchi.host.js
delete mode 100644 src/wok/plugins/kimchi/ui/js/src/kimchi.report_add_main.js
delete mode 100644 src/wok/plugins/kimchi/ui/js/src/kimchi.report_rename_main.js
delete mode 100644 src/wok/plugins/kimchi/ui/js/src/kimchi.repository_add_main.js
delete mode 100644 src/wok/plugins/kimchi/ui/js/src/kimchi.repository_edit_main.js
diff --git a/src/wok/plugins/gingerbase/ui/js/Makefile.am b/src/wok/plugins/gingerbase/ui/js/Makefile.am
new file mode 100644
index 0000000..fa7f3cf
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/js/Makefile.am
@@ -0,0 +1,27 @@
+#
+# Ginger Base
+#
+# Copyright IBM, Corp. 2015
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+EXTRA_DIST = src
+
+jsdir = $(datadir)/wok/plugins/gingerbase/ui/js
+
+dist_js_DATA = gingerbase.min.js $(filter-out gingerbase.min.js, $(wildcard *.js))
+
+gingerbase.min.js: src/*.js
+ cat $(sort $^) > $@
+
+CLEANFILES = gingerbase.min.js
diff --git a/src/wok/plugins/gingerbase/ui/js/src/gingerbase.api.js b/src/wok/plugins/gingerbase/ui/js/src/gingerbase.api.js
new file mode 100644
index 0000000..a3aca4a
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/js/src/gingerbase.api.js
@@ -0,0 +1,371 @@
+/*
+ * Project Ginger Base
+ *
+ * Copyright IBM, Corp. 2013-2015
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+var kimchi = {
+
+ widget: {},
+
+ trackingTasks: [],
+
+ /**
+ *
+ * Get host capabilities
+ * suc: callback if succeed err: callback if failed
+ */
+ getCapabilities : function(suc, err, done) {
+ done = typeof done !== 'undefined' ? done: function(){};
+ wok.requestJSON({
+ url : "plugins/gingerbase/host/capabilities",
+ type : "GET",
+ contentType : "application/json",
+ dataType : "json",
+ success: suc,
+ error: err,
+ complete: done
+ });
+ },
+
+ /**
+ * Get the i18 strings.
+ */
+ getI18n: function(suc, err, url, sync) {
+ wok.requestJSON({
+ url : url ? url : 'plugins/gingerbase/i18n.json',
+ type : 'GET',
+ resend: true,
+ dataType : 'json',
+ async : !sync,
+ success : suc,
+ error: err
+ });
+ },
+
+ /**
+ * Get the host static information.
+ */
+ getHost: function(suc, err) {
+ wok.requestJSON({
+ url : 'plugins/gingerbase/host',
+ type : 'GET',
+ resend: true,
+ contentType : 'application/json',
+ dataType : 'json',
+ success : suc,
+ error: err
+ });
+ },
+
+ /**
+ * Get the dynamic host stats (usually used for monitoring).
+ */
+ getHostStats : function(suc, err) {
+ wok.requestJSON({
+ url : 'plugins/gingerbase/host/stats',
+ type : 'GET',
+ contentType : 'application/json',
+ headers: {'Wok-Robot': 'wok-robot'},
+ dataType : 'json',
+ success : suc,
+ error: err
+ });
+ },
+
+ /**
+ * Get the historic host stats.
+ */
+ getHostStatsHistory : function(suc, err) {
+ wok.requestJSON({
+ url : 'plugins/gingerbase/host/stats/history',
+ type : 'GET',
+ resend: true,
+ contentType : 'application/json',
+ headers: {'Wok-Robot': 'wok-robot'},
+ dataType : 'json',
+ success : suc,
+ error: err
+ });
+ },
+
+ getTask : function(taskId, suc, err) {
+ wok.requestJSON({
+ url : 'plugins/gingerbase/tasks/' + encodeURIComponent(taskId),
+ type : 'GET',
+ contentType : 'application/json',
+ dataType : 'json',
+ success : suc,
+ error : err
+ });
+ },
+
+ getTasksByFilter : function(filter, suc, err, sync) {
+ wok.requestJSON({
+ url : 'plugins/gingerbase/tasks?' + filter,
+ type : 'GET',
+ contentType : 'application/json',
+ dataType : 'json',
+ async : !sync,
+ success : suc,
+ error : err
+ });
+ },
+
+ listReports : function(suc, err) {
+ wok.requestJSON({
+ url : 'plugins/gingerbase/debugreports',
+ type : 'GET',
+ contentType : 'application/json',
+ dataType : 'json',
+ resend: true,
+ success : suc,
+ error : err
+ });
+ },
+
+ trackTask : function(taskID, suc, err, progress) {
+ var onTaskResponse = function(result) {
+ var taskStatus = result['status'];
+ switch(taskStatus) {
+ case 'running':
+ progress && progress(result);
+ setTimeout(function() {
+ kimchi.trackTask(taskID, suc, err, progress);
+ }, 2000);
+ break;
+ case 'finished':
+ suc && suc(result);
+ break;
+ case 'failed':
+ err && err(result);
+ break;
+ default:
+ break;
+ }
+ };
+
+ kimchi.getTask(taskID, onTaskResponse, err);
+ if(kimchi.trackingTasks.indexOf(taskID) < 0)
+ kimchi.trackingTasks.push(taskID);
+ },
+
+ createReport: function(settings, suc, err, progress) {
+ var onResponse = function(data) {
+ taskID = data['id'];
+ kimchi.trackTask(taskID, suc, err, progress);
+ };
+
+ wok.requestJSON({
+ url : 'plugins/gingerbase/debugreports',
+ type : "POST",
+ contentType : "application/json",
+ data : JSON.stringify(settings),
+ dataType : "json",
+ success : onResponse,
+ error : err
+ });
+ },
+
+ renameReport : function(name, settings, suc, err) {
+ $.ajax({
+ url : "plugins/gingerbase/debugreports/" + encodeURIComponent(name),
+ type : 'PUT',
+ contentType : 'application/json',
+ data : JSON.stringify(settings),
+ dataType : 'json',
+ success: suc,
+ error: err
+ });
+ },
+
+ deleteReport: function(settings, suc, err) {
+ var reportName = encodeURIComponent(settings['name']);
+ wok.requestJSON({
+ url : 'plugins/gingerbase/debugreports/' + reportName,
+ type : 'DELETE',
+ contentType : 'application/json',
+ dataType : 'json',
+ success : suc,
+ error : err
+ });
+ },
+
+ downloadReport: function(settings, suc, err) {
+ window.open(settings['file']);
+ },
+
+ shutdown: function(settings, suc, err) {
+ var reboot = settings && settings['reboot'] === true;
+ var url = 'plugins/gingerbase/host/' + (reboot ? 'reboot' : 'shutdown');
+ wok.requestJSON({
+ url : url,
+ type : 'POST',
+ contentType : 'application/json',
+ dataType : 'json',
+ success : suc,
+ error : err
+ });
+ },
+
+ listHostPartitions : function(suc, err) {
+ wok.requestJSON({
+ url : 'plugins/gingerbase/host/partitions',
+ type : 'GET',
+ contentType : 'application/json',
+ dataType : 'json',
+ success : suc,
+ error : err
+ });
+ },
+
+ listSoftwareUpdates : function(suc, err) {
+ wok.requestJSON({
+ url : 'plugins/gingerbase/host/packagesupdate',
+ type : 'GET',
+ contentType : 'application/json',
+ dataType : 'json',
+ resend: true,
+ success : suc,
+ error : err
+ });
+ },
+
+ updateSoftware : function(suc, err, progress) {
+ var taskID = -1;
+ var onResponse = function(data) {
+ taskID = data['id'];
+ trackTask();
+ };
+
+ var trackTask = function() {
+ kimchi.getTask(taskID, onTaskResponse, err);
+ };
+
+ var onTaskResponse = function(result) {
+ var taskStatus = result['status'];
+ switch(taskStatus) {
+ case 'running':
+ progress && progress(result);
+ setTimeout(function() {
+ trackTask();
+ }, 200);
+ break;
+ case 'finished':
+ case 'failed':
+ suc(result);
+ break;
+ default:
+ break;
+ }
+ };
+
+ wok.requestJSON({
+ url : 'plugins/gingerbase/host/swupdate',
+ type : "POST",
+ contentType : "application/json",
+ dataType : "json",
+ success : onResponse,
+ error : err
+ });
+ },
+
+ createRepository : function(settings, suc, err) {
+ wok.requestJSON({
+ url : "plugins/gingerbase/host/repositories",
+ type : "POST",
+ contentType : "application/json",
+ data : JSON.stringify(settings),
+ dataType : "json",
+ success: suc,
+ error: err
+ });
+ },
+
+ retrieveRepository : function(repository, suc, err) {
+ var reposID = encodeURIComponent(repository);
+ wok.requestJSON({
+ url : "plugins/gingerbase/host/repositories/" + reposID,
+ type : 'GET',
+ contentType : 'application/json',
+ dataType : 'json',
+ success : suc,
+ error : err
+ });
+ },
+
+ updateRepository : function(name, settings, suc, err) {
+ var reposID = encodeURIComponent(name);
+ $.ajax({
+ url : "plugins/gingerbase/host/repositories/" + reposID,
+ type : 'PUT',
+ contentType : 'application/json',
+ data : JSON.stringify(settings),
+ dataType : 'json',
+ success : suc,
+ error : err
+ });
+ },
+
+ enableRepository : function(name, enable, suc, err) {
+ var reposID = encodeURIComponent(name);
+ $.ajax({
+ url : "plugins/gingerbase/host/repositories/" + reposID +
+ '/' + (enable === true ? 'enable' : 'disable'),
+ type : 'POST',
+ contentType : 'application/json',
+ dataType : 'json',
+ success : suc,
+ error : err
+ });
+ },
+
+ deleteRepository : function(repository, suc, err) {
+ var reposID = encodeURIComponent(repository);
+ wok.requestJSON({
+ url : 'plugins/gingerbase/host/repositories/' + reposID,
+ type : 'DELETE',
+ contentType : 'application/json',
+ dataType : 'json',
+ success : suc,
+ error : err
+ });
+ },
+
+ listRepositories : function(suc, err) {
+ wok.requestJSON({
+ url : 'plugins/gingerbase/host/repositories',
+ type : 'GET',
+ contentType : 'application/json',
+ dataType : 'json',
+ resend: true,
+ success : suc,
+ error : err
+ });
+ },
+
+ getCPUInfo : function(suc, err) {
+ wok.requestJSON({
+ url : 'plugins/gingerbase/host/cpuinfo',
+ type : 'GET',
+ contentType : 'application/json',
+ dataType : 'json',
+ resend : true,
+ success : suc,
+ error : err ? err : function(data) {
+ wok.message.error(data.responseJSON.reason);
+ }
+ });
+ }
+};
diff --git a/src/wok/plugins/gingerbase/ui/js/src/gingerbase.host.js b/src/wok/plugins/gingerbase/ui/js/src/gingerbase.host.js
new file mode 100644
index 0000000..8808e17
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/js/src/gingerbase.host.js
@@ -0,0 +1,859 @@
+/*
+ * Project Ginger Base
+ *
+ * Copyright IBM, Corp. 2013-2015
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+kimchi.host={};
+
+kimchi.host_main = function() {
+ var expand = function(header, toExpand) {
+ var controlledNode = $(header).attr('aria-controls');
+ $('#' + controlledNode)[toExpand ? 'removeClass' : 'addClass']('hidden');
+ $(header).attr('aria-expanded', toExpand ? 'true' : 'false');
+ };
+
+ var repositoriesGrid = null;
+ var initRepositoriesGrid = function(repo_type) {
+ var gridFields=[];
+ if (repo_type == "yum") {
+ gridFields=[{
+ name: 'repo_id',
+ label: i18n['GGBREPO6004M'],
+ 'class': 'repository-id'
+ }, {
+ name: 'config[repo_name]',
+ label: i18n['GGBREPO6005M'],
+ 'class': 'repository-name'
+ }, {
+ name: 'enabled',
+ label: i18n['GGBREPO6009M'],
+ 'class': 'repository-enabled'
+ }];
+ }
+ else if (repo_type == "deb") {
+ gridFields=[{
+ name: 'baseurl',
+ label: i18n['GGBREPO6006M'],
+ makeTitle: true,
+ 'class': 'repository-baseurl deb'
+ }, {
+ name: 'enabled',
+ label: i18n['GGBREPO6009M'],
+ 'class': 'repository-enabled deb'
+ }, {
+ name: 'config[dist]',
+ label: "dist",
+ 'class': 'repository-gpgcheck deb'
+ }, {
+ name: 'config[comps]',
+ label: "comps",
+ 'class': 'repository-gpgcheck deb'
+ }];
+ }
+ else {
+ gridFields=[{
+ name: 'repo_id',
+ label: i18n['GGBREPO6004M'],
+ 'class': 'repository-id'
+ }, {
+ name: 'enabled',
+ label: i18n['GGBREPO6009M'],
+ 'class': 'repository-enabled'
+ }, {
+ name: 'baseurl',
+ label: i18n['GGBREPO6006M'],
+ makeTitle: true,
+ 'class': 'repository-baseurl'
+ }];
+ }
+ repositoriesGrid = new wok.widget.Grid({
+ container: 'repositories-grid-container',
+ id: 'repositories-grid',
+ title: i18n['GGBREPO6003M'],
+ toolbarButtons: [{
+ id: 'repositories-grid-add-button',
+ label: i18n['GGBREPO6012M'],
+ onClick: function(event) {
+ wok.window.open({url:'plugins/gingerbase/repository-add.html',
+ class: repo_type});
+ }
+ }, {
+ id: 'repositories-grid-enable-button',
+ label: i18n['GGBREPO6016M'],
+ disabled: true,
+ onClick: function(event) {
+ var repository = repositoriesGrid.getSelected();
+ if(!repository) {
+ return;
+ }
+ var name = repository['repo_id'];
+ var enable = !repository['enabled'];
+ $(this).prop('disabled', true);
+ kimchi.enableRepository(name, enable, function() {
+ wok.topic('kimchi/repositoryUpdated').publish();
+ });
+ }
+ }, {
+ id: 'repositories-grid-edit-button',
+ label: i18n['GGBREPO6013M'],
+ disabled: true,
+ onClick: function(event) {
+ var repository = repositoriesGrid.getSelected();
+ if(!repository) {
+ return;
+ }
+ kimchi.selectedRepository = repository['repo_id'];
+ wok.window.open({url:'plugins/gingerbase/repository-edit.html',
+ class: repo_type});
+ }
+ }, {
+ id: 'repositories-grid-remove-button',
+ label: i18n['GGBREPO6014M'],
+ disabled: true,
+ onClick: function(event) {
+ var repository = repositoriesGrid.getSelected();
+ if(!repository) {
+ return;
+ }
+
+ var settings = {
+ title : i18n['GGBREPO6001M'],
+ content : i18n['GGBREPO6002M'],
+ confirm : i18n['GGBAPI6004M'],
+ cancel : i18n['GGBAPI6003M']
+ };
+
+ wok.confirm(settings, function() {
+ kimchi.deleteRepository(
+ repository['repo_id'],
+ function(result) {
+ wok.topic('kimchi/repositoryDeleted').publish(result);
+ }, function(error) {
+ }
+ );
+ });
+ }
+ }],
+ onRowSelected: function(row) {
+ var repository = repositoriesGrid.getSelected();
+ if(!repository) {
+ return;
+ }
+ $('#repositories-grid-remove-button').prop('disabled', false);
+ $('#repositories-grid-edit-button').prop('disabled', false);
+ var enabled = repository['enabled'];
+ $('#repositories-grid-enable-button')
+ .text(i18n[enabled ? 'GGBREPO6017M' : 'GGBREPO6016M'])
+ .prop('disabled', false);
+ },
+ frozenFields: [],
+ fields: gridFields,
+ data: listRepositories
+ });
+ };
+
+ var listRepositories = function(gridCallback) {
+ kimchi.listRepositories(function(repositories) {
+ if($.isFunction(gridCallback)) {
+ gridCallback(repositories);
+ }
+ else {
+ if(repositoriesGrid) {
+ repositoriesGrid.setData(repositories);
+ }
+ else {
+ initRepositoriesGrid();
+ repositoriesGrid.setData(repositories);
+ }
+ }
+ },
+ function(error) {
+ var message = error && error['responseJSON'] && error['responseJSON']['reason'];
+
+ if($.isFunction(gridCallback)) {
+ gridCallback([]);
+ }
+ repositoriesGrid &&
+ repositoriesGrid.showMessage(message || i18n['GGBUPD6008M']);
+ });
+
+ $('#repositories-grid-remove-button').prop('disabled', true);
+ $('#repositories-grid-edit-button').prop('disabled', true);
+ $('#repositories-grid-enable-button').prop('disabled', true);
+ };
+
+ var softwareUpdatesGridID = 'software-updates-grid';
+ var softwareUpdatesGrid = null;
+ var progressAreaID = 'software-updates-progress-textarea';
+ var reloadProgressArea = function(result) {
+ var progressArea = $('#' + progressAreaID)[0];
+ $(progressArea).text(result['message']);
+ var scrollTop = $(progressArea).prop('scrollHeight');
+ $(progressArea).prop('scrollTop', scrollTop);
+ };
+
+ var initSoftwareUpdatesGrid = function(softwareUpdates) {
+ softwareUpdatesGrid = new wok.widget.Grid({
+ container: 'software-updates-grid-container',
+ id: softwareUpdatesGridID,
+ title: i18n['GGBUPD6001M'],
+ rowSelection: 'disabled',
+ toolbarButtons: [{
+ id: softwareUpdatesGridID + '-update-button',
+ label: i18n['GGBUPD6006M'],
+ disabled: true,
+ onClick: function(event) {
+ var updateButton = $(this);
+ var progressArea = $('#' + progressAreaID)[0];
+ $('#software-updates-progress-container').removeClass('hidden');
+ $(progressArea).text('');
+ !wok.isElementInViewport(progressArea) &&
+ progressArea.scrollIntoView();
+ $(updateButton).text(i18n['GGBUPD6007M']).prop('disabled', true);
+
+ kimchi.updateSoftware(function(result) {
+ reloadProgressArea(result);
+ $(updateButton).text(i18n['GGBUPD6006M']).prop('disabled', false);
+ wok.topic('kimchi/softwareUpdated').publish({
+ result: result
+ });
+ }, function(error) {
+ var message = error && error['responseJSON'] && error['responseJSON']['reason'];
+ wok.message.error(message || i18n['GGBUPD6009M']);
+ $(updateButton).text(i18n['GGBUPD6006M']).prop('disabled', false);
+ }, reloadProgressArea);
+ }
+ }],
+ frozenFields: [],
+ fields: [{
+ name: 'package_name',
+ label: i18n['GGBUPD6002M'],
+ 'class': 'software-update-name'
+ }, {
+ name: 'version',
+ label: i18n['GGBUPD6003M'],
+ 'class': 'software-update-version'
+ }, {
+ name: 'arch',
+ label: i18n['GGBUPD6004M'],
+ 'class': 'software-update-arch'
+ }, {
+ name: 'repository',
+ label: i18n['GGBUPD6005M'],
+ 'class': 'software-update-repos'
+ }],
+ data: listSoftwareUpdates
+ });
+ };
+
+ var listSoftwareUpdates = function(gridCallback) {
+ kimchi.listSoftwareUpdates(function(softwareUpdates) {
+ if($.isFunction(gridCallback)) {
+ gridCallback(softwareUpdates);
+ }
+ else {
+ if(softwareUpdatesGrid) {
+ softwareUpdatesGrid.setData(softwareUpdates);
+ }
+ else {
+ initSoftwareUpdatesGrid(softwareUpdates);
+ }
+ }
+
+ var updateButton = $('#' + softwareUpdatesGridID + '-update-button');
+ $(updateButton).prop('disabled', softwareUpdates.length === 0);
+ }, function(error) {
+ var message = error && error['responseJSON'] && error['responseJSON']['reason'];
+ if($.isFunction(gridCallback)) {
+ gridCallback([]);
+ }
+ softwareUpdatesGrid &&
+ softwareUpdatesGrid.showMessage(message || i18n['GGBUPD6008M']);
+ });
+ };
+
+ var reportGridID = 'available-reports-grid';
+ var reportGrid = null;
+ var enableReportButtons = function(toEnable) {
+ var buttonID = '#{grid}-{btn}-button';
+ $.each(['rename', 'remove', 'download'], function(i, n) {
+ $(wok.substitute(buttonID, {
+ grid: reportGridID,
+ btn: n
+ })).prop('disabled', !toEnable);
+ });
+ };
+ var initReportGrid = function(reports) {
+ reportGrid = new wok.widget.Grid({
+ container: 'available-reports-grid-container',
+ id: reportGridID,
+ title: i18n['GGBDR6002M'],
+ toolbarButtons: [{
+ id: reportGridID + '-generate-button',
+ label: i18n['GGBDR6006M'],
+ onClick: function(event) {
+ wok.window.open('plugins/gingerbase/report-add.html');
+ }
+ }, {
+ id: reportGridID + '-rename-button',
+ label: i18n['GGBDR6008M'],
+ disabled: true,
+ onClick: function(event) {
+ var report = reportGrid.getSelected();
+ if(!report) {
+ return;
+ }
+
+ kimchi.selectedReport = report['name'];
+ wok.window.open('plugins/gingerbase/report-rename.html');
+ }
+ }, {
+ id: reportGridID + '-remove-button',
+ label: i18n['GGBDR6009M'],
+ disabled: true,
+ onClick: function(event) {
+ var report = reportGrid.getSelected();
+ if(!report) {
+ return;
+ }
+
+ var settings = {
+ title : i18n['GGBAPI6004M'],
+ content : i18n['GGBDR6001M'],
+ confirm : i18n['GGBAPI6002M'],
+ cancel : i18n['GGBAPI6003M']
+ };
+
+ wok.confirm(settings, function() {
+ kimchi.deleteReport({
+ name: report['name']
+ }, function(result) {
+ listDebugReports();
+ }, function(error) {
+ wok.message.error(error.responseJSON.reason);
+ });
+ });
+ }
+ }, {
+ id: reportGridID + '-download-button',
+ label: i18n['GGBDR6010M'],
+ disabled: true,
+ onClick: function(event) {
+ var report = reportGrid.getSelected();
+ if(!report) {
+ return;
+ }
+
+ kimchi.downloadReport({
+ file: report['uri']
+ });
+ }
+ }],
+ onRowSelected: function(row) {
+ var report = reportGrid.getSelected();
+ // Only enable report buttons if the selected line is not a
+ // pending report
+ if (report['time'] == i18n['GGBDR6007M']) {
+ var gridElement = $('#'+ reportGridID);
+ var row = $('tr:contains(' + report['name'] + ')', gridElement);
+ enableReportButtons(false);
+ row.attr('class', '');
+ }
+ else {
+ enableReportButtons(true);
+ }
+ },
+ frozenFields: [],
+ fields: [{
+ name: 'name',
+ label: i18n['GGBDR6003M'],
+ 'class': 'debug-report-name'
+ }, {
+ name: 'time',
+ label: i18n['GGBDR6005M'],
+ 'class': 'debug-report-time'
+ }],
+ data: reports
+ });
+ };
+
+ var getPendingReports = function() {
+ var reports = []
+ var filter = 'status=running&target_uri=' + encodeURIComponent('^/plugins/gingerbase/debugreports/*')
+
+ kimchi.getTasksByFilter(filter, function(tasks) {
+ for(var i = 0; i < tasks.length; i++) {
+ reportName = tasks[i].target_uri.replace(/^\/plugins\/gingerbase\/debugreports\//, '') || i18n['GGBDR6012M'];
+ reports.push({'name': reportName, 'time': i18n['GGBDR6007M']})
+
+ if(kimchi.trackingTasks.indexOf(tasks[i].id) >= 0) {
+ continue;
+ }
+
+ kimchi.trackTask(tasks[i].id, function(result) {
+ wok.topic('kimchi/debugReportAdded').publish();
+ }, function(result) {
+ // Error message from Async Task status
+ if (result['message']) {
+ var errText = result['message'];
+ }
+ // Error message from standard kimchi exception
+ else {
+ var errText = result['responseJSON']['reason'];
+ }
+ result && wok.message.error(errText);
+ wok.topic('kimchi/debugReportAdded').publish();
+ }, null);
+ }
+ }, null, true);
+
+ return reports;
+ };
+
+ var listDebugReports = function() {
+ kimchi.listReports(function(reports) {
+ pendingReports = getPendingReports();
+ allReports = pendingReports.concat(reports);
+ $('#debug-report-section').removeClass('hidden');
+
+ // Row selection will be cleared so disable buttons here
+ enableReportButtons(false);
+
+ if(reportGrid) {
+ reportGrid.setData(allReports);
+ }
+ else {
+ initReportGrid(allReports);
+ }
+
+ // Set id-debug-img to pending reports
+ // It will display a loading icon
+ var gridElement = $('#' + reportGridID);
+ $.each($('td:contains(' + i18n['GGBDR6007M'] + ')', gridElement), function(index, row) {
+ $(row).parent().addClass('no-hover');
+ $(row).attr('id', 'id-debug-img');
+ });
+ }, function(error) {
+ if(error['status'] == 403) {
+ $('#debug-report-section').addClass('hidden');
+ return;
+ }
+ $('#debug-report-section').removeClass('hidden');
+ });
+ };
+
+ var shutdownButtonID = '#host-button-shutdown';
+ var restartButtonID = '#host-button-restart';
+ var shutdownHost = function(params) {
+ var settings = {
+ title : i18n['GGBAPI6004M'],
+ content : i18n['GGBHOST6008M'],
+ confirm : i18n['GGBAPI6002M'],
+ cancel : i18n['GGBAPI6003M']
+ };
+
+ wok.confirm(settings, function() {
+ kimchi.shutdown(params);
+ $(shutdownButtonID).prop('disabled', true);
+ $(restartButtonID).prop('disabled', true);
+ // Check if there is any VM is running.
+ // FIXME : Find alternative way to figure out if any vms running
+ // kimchi.listVMs(function(vms) {
+ // for(var i = 0; i < vms.length; i++) {
+ // if(vms[i]['state'] === 'running') {
+ // wok.message.error.code('GGBHOST6001E');
+ // $(shutdownButtonID).prop('disabled', false);
+ // $(restartButtonID).prop('disabled', false);
+ // return;
+ // }
+ // }
+ //
+ // });
+ }, function() {
+ });
+ };
+
+ var initPage = function() {
+ $('#host-info-container .section-header').each(function(i, header) {
+ $('<span class="arrow"></span>').prependTo(header);
+ var toExpand = $(header).attr('aria-expanded') !== 'false';
+ expand(header, toExpand);
+ });
+
+ $('#host-info-container').on('click', '.section-header', function(event) {
+ var toExpand = $(this).attr('aria-expanded') === 'false';
+ expand(this, toExpand);
+ });
+
+ $('#host-button-shutdown').on('click', function(event) {
+ shutdownHost(null);
+ });
+
+ $('#host-button-restart').on('click', function(event) {
+ shutdownHost({
+ reboot: true
+ });
+ });
+
+ var setupUI = function() {
+ if (kimchi.capabilities == undefined) {
+ setTimeout(setupUI, 2000);
+ return;
+ }
+
+ if((kimchi.capabilities['repo_mngt_tool']) && (kimchi.capabilities['repo_mngt_tool']!="None")) {
+ initRepositoriesGrid(kimchi.capabilities['repo_mngt_tool']);
+ $('#repositories-section').switchClass('hidden', kimchi.capabilities['repo_mngt_tool']);
+ wok.topic('kimchi/repositoryAdded')
+ .subscribe(listRepositories);
+ wok.topic('kimchi/repositoryUpdated')
+ .subscribe(listRepositories);
+ wok.topic('kimchi/repositoryDeleted')
+ .subscribe(listRepositories);
+ }
+
+ if(kimchi.capabilities['update_tool']) {
+ $('#software-update-section').removeClass('hidden');
+ initSoftwareUpdatesGrid();
+ wok.topic('kimchi/softwareUpdated')
+ .subscribe(listSoftwareUpdates);
+ $('#software-updates-progress-container').accordion({
+ collapsible: true
+ });
+ }
+
+ if(kimchi.capabilities['system_report_tool']) {
+ listDebugReports();
+ wok.topic('kimchi/debugReportAdded')
+ .subscribe(listDebugReports);
+ wok.topic('kimchi/debugReportRenamed')
+ .subscribe(listDebugReports);
+ }
+ };
+ setupUI();
+ };
+
+ kimchi.getHost(function(data) {
+ var htmlTmpl = $('#host-tmpl').html();
+ data['logo'] = data['logo'] || '';
+ data['memory'] = wok.formatMeasurement(data['memory'], {
+ fixed: 2
+ });
+ var templated = wok.substitute(htmlTmpl, data);
+ $('#host-content-container').html(templated);
+
+ initPage();
+ initTracker();
+ });
+
+ var StatsMgr = function() {
+ var statsArray = {
+ cpu: {
+ u: {
+ type: 'percent',
+ legend: i18n['GGBHOST6002M'],
+ points: []
+ }
+ },
+ memory: {
+ u: {
+ type: 'value',
+ base: 2,
+ fixed: 2,
+ legend: i18n['GGBHOST6003M'],
+ points: []
+ }
+ },
+ diskIO: {
+ r: {
+ type: 'value',
+ base: 2,
+ fixed: 2,
+ unit: 'B/s',
+ legend: i18n['GGBHOST6004M'],
+ points: []
+ },
+ w: {
+ type: 'value',
+ base: 2,
+ fixed: 2,
+ unit: 'B/s',
+ legend: i18n['GGBHOST6005M'],
+ 'class': 'disk-write',
+ points: []
+ }
+ },
+ networkIO: {
+ r: {
+ type: 'value',
+ base: 2,
+ fixed: 2,
+ unit: 'B/s',
+ legend: i18n['GGBHOST6006M'],
+ points: []
+ },
+ s: {
+ type: 'value',
+ base: 2,
+ fixed: 2,
+ unit: 'B/s',
+ legend: i18n['GGBHOST6007M'],
+ 'class': 'network-sent',
+ points: []
+ }
+ }
+ };
+ var SIZE = 20;
+ var cursor = SIZE;
+
+ var add = function(stats) {
+ for(var key in stats) {
+ var item = stats[key];
+ for(var metrics in item) {
+ var value = item[metrics]['v'];
+ var max = item[metrics]['max'];
+ var unifiedMetrics = statsArray[key][metrics];
+ var ps = unifiedMetrics['points'];
+ if(!Array.isArray(value)){
+ ps.push(value);
+ if(ps.length > SIZE + 1) {
+ ps.shift();
+ }
+ }
+ else{
+ ps=ps.concat(value);
+ ps.splice(0, ps.length-SIZE-1);
+ unifiedMetrics['points']=ps;
+ }
+ if(max !== undefined) {
+ unifiedMetrics['max'] = max;
+ }
+ else {
+ if(unifiedMetrics['type'] !== 'value') {
+ continue;
+ }
+ max = -Infinity;
+ $.each(ps, function(i, value) {
+ if(value > max) {
+ max = value;
+ }
+ });
+ if(max === 0) {
+ ++max;
+ }
+ max *= 1.1;
+ unifiedMetrics['max'] = max;
+ }
+ }
+ }
+ cursor++;
+ };
+
+ var get = function(which) {
+ var stats = statsArray[which];
+ var lines = [];
+ for(var k in stats) {
+ var obj = stats[k];
+ var line = {
+ type: obj['type'],
+ base: obj['base'],
+ unit: obj['unit'],
+ fixed: obj['fixed'],
+ legend: obj['legend']
+ };
+ if(obj['max']) {
+ line['max'] = obj['max'];
+ }
+ if(obj['class']) {
+ line['class'] = obj['class'];
+ }
+ var ps = obj['points'];
+ var numStats = ps.length;
+ var unifiedPoints = [];
+ $.each(ps, function(i, value) {
+ unifiedPoints.push({
+ x: cursor - numStats + i,
+ y: value
+ });
+ });
+ line['points'] = unifiedPoints;
+ lines.push(line);
+ }
+ return lines;
+ };
+
+ return {
+ add: add,
+ get: get
+ };
+ };
+
+ var Tracker = function(charts) {
+ var charts = charts;
+ var timer = null;
+ var statsPool = new StatsMgr();
+ var setCharts = function(newCharts) {
+ charts = newCharts;
+ for(var key in charts) {
+ var chart = charts[key];
+ chart.updateUI(statsPool.get(key));
+ }
+ };
+
+ var self = this;
+
+ var UnifyStats = function(stats) {
+ var result= {
+ cpu: {
+ u: {
+ v: stats['cpu_utilization']
+ }
+ },
+ memory: {
+ u: {
+ }
+ },
+ diskIO: {
+ r: {
+ v: stats['disk_read_rate']
+ },
+ w: {
+ v: stats['disk_write_rate']
+ }
+ },
+ networkIO: {
+ r: {
+ v: stats['net_recv_rate']
+ },
+ s: {
+ v: stats['net_sent_rate']
+ }
+ }
+ };
+ if(Array.isArray(stats['memory'])){
+ result.memory.u['v']=[];
+ result.memory.u['max']=-Infinity;
+ for(var i=0;i<stats['memory'].length;i++){
+ result.memory.u['v'].push(stats['memory'][i]['avail']);
+ result.memory.u['max']=Math.max(result.memory.u['max'],stats['memory'][i]['total']);
+ }
+ }
+ else {
+ result.memory.u['v']=stats['memory']['avail'],
+ result.memory.u['max']=stats['memory']['total']
+ }
+ return(result);
+ };
+
+
+ var statsCallback = function(stats) {
+ var unifiedStats = UnifyStats(stats);
+ statsPool.add(unifiedStats);
+ for(var key in charts) {
+ var chart = charts[key];
+ chart.updateUI(statsPool.get(key));
+ }
+ timer = setTimeout(function() {
+ continueTrack();
+ }, 1000);
+ };
+
+ var track = function() {
+ kimchi.getHostStatsHistory(statsCallback,
+ function() {
+ continueTrack();
+ });
+ };
+
+ var continueTrack = function() {
+ kimchi.getHostStats(statsCallback,
+ function() {
+ continueTrack();
+ });
+ };
+
+ var destroy = function() {
+ timer && clearTimeout(timer);
+ timer = null;
+ };
+
+ return {
+ setCharts: setCharts,
+ start: track,
+ stop: destroy
+ };
+ };
+
+ var initTracker = function() {
+ // TODO: Extend tabs with onUnload event to unregister timers.
+ if(kimchi.hostTimer) {
+ kimchi.hostTimer.stop();
+ delete kimchi.hostTimer;
+ }
+
+ var trackedCharts = {
+ cpu: new wok.widget.LineChart({
+ id: 'chart-cpu',
+ node: 'container-chart-cpu',
+ type: 'percent'
+ }),
+ memory: new wok.widget.LineChart({
+ id: 'chart-memory',
+ node: 'container-chart-memory',
+ type: 'value'
+ }),
+ diskIO: new wok.widget.LineChart({
+ id: 'chart-disk-io',
+ node: 'container-chart-disk-io',
+ type: 'value'
+ }),
+ networkIO: new wok.widget.LineChart({
+ id: 'chart-network-io',
+ node: 'container-chart-network-io',
+ type: 'value'
+ })
+ };
+
+ if(kimchi.hostTimer) {
+ kimchi.hostTimer.setCharts(trackedCharts);
+ }
+ else {
+ kimchi.hostTimer = new Tracker(trackedCharts);
+ kimchi.hostTimer.start();
+ }
+ };
+
+ $('#host-root-container').on('remove', function() {
+ if(kimchi.hostTimer) {
+ kimchi.hostTimer.stop();
+ delete kimchi.hostTimer;
+ }
+
+ repositoriesGrid && repositoriesGrid.destroy();
+ wok.topic('kimchi/repositoryAdded')
+ .unsubscribe(listRepositories);
+ wok.topic('kimchi/repositoryUpdated')
+ .unsubscribe(listRepositories);
+ wok.topic('kimchi/repositoryDeleted')
+ .unsubscribe(listRepositories);
+
+ softwareUpdatesGrid && softwareUpdatesGrid.destroy();
+ wok.topic('kimchi/softwareUpdated').unsubscribe(listSoftwareUpdates);
+
+ reportGrid && reportGrid.destroy();
+ wok.topic('kimchi/debugReportAdded').unsubscribe(listDebugReports);
+ wok.topic('kimchi/debugReportRenamed').unsubscribe(listDebugReports);
+ });
+};
diff --git a/src/wok/plugins/gingerbase/ui/js/src/gingerbase.main.js b/src/wok/plugins/gingerbase/ui/js/src/gingerbase.main.js
new file mode 100644
index 0000000..824673d
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/js/src/gingerbase.main.js
@@ -0,0 +1,26 @@
+/*
+ * Project Ginger Base
+ *
+ * Copyright IBM, Corp. 2013-2015
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+kimchi.capabilities = undefined;
+kimchi.getCapabilities(function(result) {
+ kimchi.capabilities = result;
+
+ if(kimchi.capabilities.federation=="on")
+ $('#peers').removeClass('hide-content');
+}, function() {
+ kimchi.capabilities = {};
+});
diff --git a/src/wok/plugins/gingerbase/ui/js/src/gingerbase.report_add_main.js b/src/wok/plugins/gingerbase/ui/js/src/gingerbase.report_add_main.js
new file mode 100644
index 0000000..e8a2f4d
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/js/src/gingerbase.report_add_main.js
@@ -0,0 +1,72 @@
+/*
+ * Project Ginger Base
+ *
+ * Copyright IBM, Corp. 2013-2015
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+kimchi.report_add_main = function() {
+ var reportGridID = 'available-reports-grid';
+ var addReportForm = $('#form-report-add');
+ var submitButton = $('#button-report-add');
+ var nameTextbox = $('input[name="name"]', addReportForm);
+ nameTextbox.select();
+
+ var submitForm = function(event) {
+ if(submitButton.prop('disabled')) {
+ return false;
+ }
+ var reportName = nameTextbox.val();
+ var validator = RegExp("^[_A-Za-z0-9-]*$");
+ if (!validator.test(reportName)) {
+ wok.message.error.code('GGBDR6011M');
+ return false;
+ }
+ var formData = addReportForm.serializeObject();
+ var taskAccepted = false;
+ var onTaskAccepted = function() {
+ if(taskAccepted) {
+ return;
+ }
+ taskAccepted = true;
+ wok.window.close();
+ wok.topic('kimchi/debugReportAdded').publish();
+ };
+
+ kimchi.createReport(formData, function(result) {
+ onTaskAccepted();
+ wok.topic('kimchi/debugReportAdded').publish();
+ }, function(result) {
+ // Error message from Async Task status
+ if (result['message']) {
+ var errText = result['message'];
+ }
+ // Error message from standard kimchi exception
+ else {
+ var errText = result['responseJSON']['reason'];
+ }
+ result && wok.message.error(errText);
+
+ taskAccepted &&
+ $('.grid-body-view table tr:first-child',
+ '#' + reportGridID).remove();
+ submitButton.prop('disabled', false);
+ nameTextbox.select();
+ }, onTaskAccepted);
+
+ event.preventDefault();
+ };
+
+ addReportForm.on('submit', submitForm);
+ submitButton.on('click', submitForm);
+};
diff --git a/src/wok/plugins/gingerbase/ui/js/src/gingerbase.report_rename_main.js b/src/wok/plugins/gingerbase/ui/js/src/gingerbase.report_rename_main.js
new file mode 100644
index 0000000..b107ce5
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/js/src/gingerbase.report_rename_main.js
@@ -0,0 +1,66 @@
+/*
+ * Project Ginger Base
+ *
+ * Copyright IBM, Corp. 2015
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+kimchi.report_rename_main = function() {
+ var renameReportForm = $('#form-report-rename');
+ var submitButton = $('#button-report-rename');
+ var nameTextbox = $('input[name="name"]', renameReportForm);
+ var submitForm = function(event) {
+ if(submitButton.prop('disabled')) {
+ return false;
+ }
+ var reportName = nameTextbox.val();
+
+ // if the user hasn't changed the report's name,
+ // nothing should be done.
+ if (reportName == kimchi.selectedReport) {
+ wok.message.error.code('GGBDR6013M');
+ return false;
+ }
+
+ var validator = RegExp("^[A-Za-z0-9-]*$");
+ if (!validator.test(reportName)) {
+ wok.message.error.code('GGBDR6011M');
+ return false;
+ }
+ var formData = renameReportForm.serializeObject();
+ submitButton.prop('disabled', true);
+ nameTextbox.prop('disabled', true);
+ kimchi.renameReport(kimchi.selectedReport, formData, function(result) {
+ submitButton.prop('disabled', false);
+ nameTextbox.prop('disabled', false);
+ wok.window.close();
+ wok.topic('kimchi/debugReportRenamed').publish({
+ result: result
+ });
+ }, function(result) {
+ var errText = result &&
+ result['responseJSON'] &&
+ result['responseJSON']['reason'];
+ wok.message.error(errText);
+ submitButton.prop('disabled', false);
+ nameTextbox.prop('disabled', false).focus();
+ });
+
+ event.preventDefault();
+ };
+
+ renameReportForm.on('submit', submitForm);
+ submitButton.on('click', submitForm);
+
+ nameTextbox.val(kimchi.selectedReport).select();
+};
diff --git a/src/wok/plugins/gingerbase/ui/js/src/gingerbase.repository_add_main.js b/src/wok/plugins/gingerbase/ui/js/src/gingerbase.repository_add_main.js
new file mode 100644
index 0000000..e612cdf
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/js/src/gingerbase.repository_add_main.js
@@ -0,0 +1,96 @@
+/*
+ * Project Ginger Base
+ *
+ * Copyright IBM, Corp. 2015
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+kimchi.repository_add_main = function() {
+
+ var addForm = $('#form-repository-add');
+ var addButton = $('#button-repository-add');
+
+ var validateField = function(event) {
+ var valid=($(this).val()!=='');
+ $(addButton).prop('disabled', !valid);
+ return(valid);
+ };
+
+ var validateForm = function(event) {
+ var valid=false;
+ addForm.find('input.required').each( function() {
+ valid=($(this).val()!=='');
+ return(!valid);
+ });
+ return(valid);
+ }
+
+ addForm.find('input.required').on('input propertychange', validateField);
+
+ var weedObject = function(obj) {
+ for (var key in obj) {
+ if (obj.hasOwnProperty(key)) {
+ if((typeof(obj[key])==="object") && !Array.isArray(obj[key])) {
+ weedObject(obj[key]);
+ }
+ else if(obj[key] == '') {
+ delete obj[key];
+ }
+ }
+ }
+ }
+
+ var addRepository = function(event) {
+ var valid = validateForm();
+ if(!valid) {
+ return false;
+ }
+
+ var formData = $(addForm).serializeObject();
+
+ if (formData && formData.isMirror!=undefined) {
+ formData.isMirror=(String(formData.isMirror).toLowerCase() === 'true');
+ }
+ if(formData.isMirror) {
+ if(formData.config==undefined) {
+ formData.config=new Object();
+ }
+ formData.config.mirrorlist=formData.baseurl;
+ delete formData.baseurl;
+ delete formData.isMirror;
+ }
+ weedObject(formData);
+ if(formData.config && formData.config.comps) {
+ formData.config.comps=formData.config.comps.split(/[,\s]/);
+ for(var i=0; i>formData.config.comps.length; i++) {
+ formData.config.comps[i]=formData.config.comps[i].trim();
+ }
+ for (var j=formData.config.comps.indexOf(""); j!=-1; j=formData.config.comps.indexOf("")) {
+ formData.config.comps.splice(j, 1);
+ }
+ }
+
+ kimchi.createRepository(formData, function() {
+ wok.topic('kimchi/repositoryAdded').publish();
+ wok.window.close();
+ }, function(jqXHR, textStatus, errorThrown) {
+ var reason = jqXHR &&
+ jqXHR['responseJSON'] &&
+ jqXHR['responseJSON']['reason'];
+ wok.message.error(reason);
+ });
+ return false;
+ };
+
+ $(addForm).on('submit', addRepository);
+};
diff --git a/src/wok/plugins/gingerbase/ui/js/src/gingerbase.repository_edit_main.js b/src/wok/plugins/gingerbase/ui/js/src/gingerbase.repository_edit_main.js
new file mode 100644
index 0000000..a6e0371
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/js/src/gingerbase.repository_edit_main.js
@@ -0,0 +1,74 @@
+/*
+ * Project Ginger Base
+ *
+ * Copyright IBM, Corp. 2015
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+kimchi.repository_edit_main = function() {
+
+ var editForm = $('#form-repository-edit');
+
+ var saveButton = $('#repository-edit-button-save');
+
+ if(kimchi.capabilities['repo_mngt_tool']=="yum") {
+ editForm.find('input.deb').prop('disabled', true);
+ }
+ else if(kimchi.capabilities['repo_mngt_tool']=="deb") {
+ editForm.find('input.yum').prop('disabled', true);
+ }
+
+ kimchi.retrieveRepository(kimchi.selectedRepository, function(repository) {
+ editForm.fillWithObject(repository);
+
+ $('input', editForm).on('input propertychange', function(event) {
+ if($(this).val() !== '') {
+ $(saveButton).prop('disabled', false);
+ }
+ });
+ });
+
+
+ var editRepository = function(event) {
+ var formData = $(editForm).serializeObject();
+
+ if (formData && formData.config) {
+ formData.config.gpgcheck=(String(formData.config.gpgcheck).toLowerCase() === 'true');
+ }
+
+ if(formData.config && formData.config.comps) {
+ formData.config.comps=formData.config.comps.split(/[,\s]/);
+ for(var i=0; i>formData.config.comps.length; i++) {
+ formData.config.comps[i]=formData.config.comps[i].trim();
+ }
+ for (var j=formData.config.comps.indexOf(""); j!=-1; j=formData.config.comps.indexOf("")) {
+ formData.config.comps.splice(j, 1);
+ }
+ }
+
+ kimchi.updateRepository(kimchi.selectedRepository, formData, function() {
+ wok.topic('kimchi/repositoryUpdated').publish();
+ wok.window.close();
+ }, function(jqXHR, textStatus, errorThrown) {
+ var reason = jqXHR &&
+ jqXHR['responseJSON'] &&
+ jqXHR['responseJSON']['reason'];
+ wok.message.error(reason);
+ });
+
+ return false;
+ };
+
+ $(editForm).on('submit', editRepository);
+ $(saveButton).on('click', editRepository);
+};
diff --git a/src/wok/plugins/kimchi/ui/js/src/kimchi.host.js b/src/wok/plugins/kimchi/ui/js/src/kimchi.host.js
deleted file mode 100644
index c3765dc..0000000
--- a/src/wok/plugins/kimchi/ui/js/src/kimchi.host.js
+++ /dev/null
@@ -1,858 +0,0 @@
-/*
- * Project Kimchi
- *
- * Copyright IBM, Corp. 2013-2015
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-kimchi.host={};
-
-kimchi.host_main = function() {
- var expand = function(header, toExpand) {
- var controlledNode = $(header).attr('aria-controls');
- $('#' + controlledNode)[toExpand ? 'removeClass' : 'addClass']('hidden');
- $(header).attr('aria-expanded', toExpand ? 'true' : 'false');
- };
-
- var repositoriesGrid = null;
- var initRepositoriesGrid = function(repo_type) {
- var gridFields=[];
- if (repo_type == "yum") {
- gridFields=[{
- name: 'repo_id',
- label: i18n['KCHREPO6004M'],
- 'class': 'repository-id'
- }, {
- name: 'config[display_repo_name]',
- label: i18n['KCHREPO6005M'],
- 'class': 'repository-name'
- }, {
- name: 'enabled',
- label: i18n['KCHREPO6009M'],
- 'class': 'repository-enabled'
- }];
- }
- else if (repo_type == "deb") {
- gridFields=[{
- name: 'baseurl',
- label: i18n['KCHREPO6006M'],
- makeTitle: true,
- 'class': 'repository-baseurl deb'
- }, {
- name: 'enabled',
- label: i18n['KCHREPO6009M'],
- 'class': 'repository-enabled deb'
- }, {
- name: 'config[dist]',
- label: "dist",
- 'class': 'repository-gpgcheck deb'
- }, {
- name: 'config[comps]',
- label: "comps",
- 'class': 'repository-gpgcheck deb'
- }];
- }
- else {
- gridFields=[{
- name: 'repo_id',
- label: i18n['KCHREPO6004M'],
- 'class': 'repository-id'
- }, {
- name: 'enabled',
- label: i18n['KCHREPO6009M'],
- 'class': 'repository-enabled'
- }, {
- name: 'baseurl',
- label: i18n['KCHREPO6006M'],
- makeTitle: true,
- 'class': 'repository-baseurl'
- }];
- }
- repositoriesGrid = new wok.widget.Grid({
- container: 'repositories-grid-container',
- id: 'repositories-grid',
- title: i18n['KCHREPO6003M'],
- toolbarButtons: [{
- id: 'repositories-grid-add-button',
- label: i18n['KCHREPO6012M'],
- onClick: function(event) {
- wok.window.open({url:'plugins/kimchi/repository-add.html',
- class: repo_type});
- }
- }, {
- id: 'repositories-grid-enable-button',
- label: i18n['KCHREPO6016M'],
- disabled: true,
- onClick: function(event) {
- var repository = repositoriesGrid.getSelected();
- if(!repository) {
- return;
- }
- var name = repository['repo_id'];
- var enable = !repository['enabled'];
- $(this).prop('disabled', true);
- kimchi.enableRepository(name, enable, function() {
- wok.topic('kimchi/repositoryUpdated').publish();
- });
- }
- }, {
- id: 'repositories-grid-edit-button',
- label: i18n['KCHREPO6013M'],
- disabled: true,
- onClick: function(event) {
- var repository = repositoriesGrid.getSelected();
- if(!repository) {
- return;
- }
- kimchi.selectedRepository = repository['repo_id'];
- wok.window.open({url:'plugins/kimchi/repository-edit.html',
- class: repo_type});
- }
- }, {
- id: 'repositories-grid-remove-button',
- label: i18n['KCHREPO6014M'],
- disabled: true,
- onClick: function(event) {
- var repository = repositoriesGrid.getSelected();
- if(!repository) {
- return;
- }
-
- var settings = {
- title : i18n['KCHREPO6001M'],
- content : i18n['KCHREPO6002M'],
- confirm : i18n['KCHAPI6004M'],
- cancel : i18n['KCHAPI6003M']
- };
-
- wok.confirm(settings, function() {
- kimchi.deleteRepository(
- repository['repo_id'],
- function(result) {
- wok.topic('kimchi/repositoryDeleted').publish(result);
- }, function(error) {
- }
- );
- });
- }
- }],
- onRowSelected: function(row) {
- var repository = repositoriesGrid.getSelected();
- if(!repository) {
- return;
- }
- $('#repositories-grid-remove-button').prop('disabled', false);
- $('#repositories-grid-edit-button').prop('disabled', false);
- var enabled = repository['enabled'];
- $('#repositories-grid-enable-button')
- .text(i18n[enabled ? 'KCHREPO6017M' : 'KCHREPO6016M'])
- .prop('disabled', false);
- },
- frozenFields: [],
- fields: gridFields,
- data: listRepositories
- });
- };
-
- var listRepositories = function(gridCallback) {
- kimchi.listRepositories(function(repositories) {
- if($.isFunction(gridCallback)) {
- gridCallback(repositories);
- }
- else {
- if(repositoriesGrid) {
- repositoriesGrid.setData(repositories);
- }
- else {
- initRepositoriesGrid();
- repositoriesGrid.setData(repositories);
- }
- }
- },
- function(error) {
- var message = error && error['responseJSON'] && error['responseJSON']['reason'];
-
- if($.isFunction(gridCallback)) {
- gridCallback([]);
- }
- repositoriesGrid &&
- repositoriesGrid.showMessage(message || i18n['KCHUPD6008M']);
- });
-
- $('#repositories-grid-remove-button').prop('disabled', true);
- $('#repositories-grid-edit-button').prop('disabled', true);
- $('#repositories-grid-enable-button').prop('disabled', true);
- };
-
- var softwareUpdatesGridID = 'software-updates-grid';
- var softwareUpdatesGrid = null;
- var progressAreaID = 'software-updates-progress-textarea';
- var reloadProgressArea = function(result) {
- var progressArea = $('#' + progressAreaID)[0];
- $(progressArea).text(result['message']);
- var scrollTop = $(progressArea).prop('scrollHeight');
- $(progressArea).prop('scrollTop', scrollTop);
- };
-
- var initSoftwareUpdatesGrid = function(softwareUpdates) {
- softwareUpdatesGrid = new wok.widget.Grid({
- container: 'software-updates-grid-container',
- id: softwareUpdatesGridID,
- title: i18n['KCHUPD6001M'],
- rowSelection: 'disabled',
- toolbarButtons: [{
- id: softwareUpdatesGridID + '-update-button',
- label: i18n['KCHUPD6006M'],
- disabled: true,
- onClick: function(event) {
- var updateButton = $(this);
- var progressArea = $('#' + progressAreaID)[0];
- $('#software-updates-progress-container').removeClass('hidden');
- $(progressArea).text('');
- !wok.isElementInViewport(progressArea) &&
- progressArea.scrollIntoView();
- $(updateButton).text(i18n['KCHUPD6007M']).prop('disabled', true);
-
- kimchi.updateSoftware(function(result) {
- reloadProgressArea(result);
- $(updateButton).text(i18n['KCHUPD6006M']).prop('disabled', false);
- wok.topic('kimchi/softwareUpdated').publish({
- result: result
- });
- }, function(error) {
- var message = error && error['responseJSON'] && error['responseJSON']['reason'];
- wok.message.error(message || i18n['KCHUPD6009M']);
- $(updateButton).text(i18n['KCHUPD6006M']).prop('disabled', false);
- }, reloadProgressArea);
- }
- }],
- frozenFields: [],
- fields: [{
- name: 'package_name',
- label: i18n['KCHUPD6002M'],
- 'class': 'software-update-name'
- }, {
- name: 'version',
- label: i18n['KCHUPD6003M'],
- 'class': 'software-update-version'
- }, {
- name: 'arch',
- label: i18n['KCHUPD6004M'],
- 'class': 'software-update-arch'
- }, {
- name: 'repository',
- label: i18n['KCHUPD6005M'],
- 'class': 'software-update-repos'
- }],
- data: listSoftwareUpdates
- });
- };
-
- var listSoftwareUpdates = function(gridCallback) {
- kimchi.listSoftwareUpdates(function(softwareUpdates) {
- if($.isFunction(gridCallback)) {
- gridCallback(softwareUpdates);
- }
- else {
- if(softwareUpdatesGrid) {
- softwareUpdatesGrid.setData(softwareUpdates);
- }
- else {
- initSoftwareUpdatesGrid(softwareUpdates);
- }
- }
-
- var updateButton = $('#' + softwareUpdatesGridID + '-update-button');
- $(updateButton).prop('disabled', softwareUpdates.length === 0);
- }, function(error) {
- var message = error && error['responseJSON'] && error['responseJSON']['reason'];
- if($.isFunction(gridCallback)) {
- gridCallback([]);
- }
- softwareUpdatesGrid &&
- softwareUpdatesGrid.showMessage(message || i18n['KCHUPD6008M']);
- });
- };
-
- var reportGridID = 'available-reports-grid';
- var reportGrid = null;
- var enableReportButtons = function(toEnable) {
- var buttonID = '#{grid}-{btn}-button';
- $.each(['rename', 'remove', 'download'], function(i, n) {
- $(wok.substitute(buttonID, {
- grid: reportGridID,
- btn: n
- })).prop('disabled', !toEnable);
- });
- };
- var initReportGrid = function(reports) {
- reportGrid = new wok.widget.Grid({
- container: 'available-reports-grid-container',
- id: reportGridID,
- title: i18n['KCHDR6002M'],
- toolbarButtons: [{
- id: reportGridID + '-generate-button',
- label: i18n['KCHDR6006M'],
- onClick: function(event) {
- wok.window.open('plugins/kimchi/report-add.html');
- }
- }, {
- id: reportGridID + '-rename-button',
- label: i18n['KCHDR6008M'],
- disabled: true,
- onClick: function(event) {
- var report = reportGrid.getSelected();
- if(!report) {
- return;
- }
-
- kimchi.selectedReport = report['name'];
- wok.window.open('plugins/kimchi/report-rename.html');
- }
- }, {
- id: reportGridID + '-remove-button',
- label: i18n['KCHDR6009M'],
- disabled: true,
- onClick: function(event) {
- var report = reportGrid.getSelected();
- if(!report) {
- return;
- }
-
- var settings = {
- title : i18n['KCHAPI6004M'],
- content : i18n['KCHDR6001M'],
- confirm : i18n['KCHAPI6002M'],
- cancel : i18n['KCHAPI6003M']
- };
-
- wok.confirm(settings, function() {
- kimchi.deleteReport({
- name: report['name']
- }, function(result) {
- listDebugReports();
- }, function(error) {
- wok.message.error(error.responseJSON.reason);
- });
- });
- }
- }, {
- id: reportGridID + '-download-button',
- label: i18n['KCHDR6010M'],
- disabled: true,
- onClick: function(event) {
- var report = reportGrid.getSelected();
- if(!report) {
- return;
- }
-
- kimchi.downloadReport({
- file: report['uri']
- });
- }
- }],
- onRowSelected: function(row) {
- var report = reportGrid.getSelected();
- // Only enable report buttons if the selected line is not a
- // pending report
- if (report['time'] == i18n['KCHDR6007M']) {
- var gridElement = $('#'+ reportGridID);
- var row = $('tr:contains(' + report['name'] + ')', gridElement);
- enableReportButtons(false);
- row.attr('class', '');
- }
- else {
- enableReportButtons(true);
- }
- },
- frozenFields: [],
- fields: [{
- name: 'name',
- label: i18n['KCHDR6003M'],
- 'class': 'debug-report-name'
- }, {
- name: 'time',
- label: i18n['KCHDR6005M'],
- 'class': 'debug-report-time'
- }],
- data: reports
- });
- };
-
- var getPendingReports = function() {
- var reports = []
- var filter = 'status=running&target_uri=' + encodeURIComponent('^/plugins/kimchi/debugreports/*')
-
- kimchi.getTasksByFilter(filter, function(tasks) {
- for(var i = 0; i < tasks.length; i++) {
- reportName = tasks[i].target_uri.replace(/^\/plugins\/kimchi\/debugreports\//, '') || i18n['KCHDR6012M'];
- reports.push({'name': reportName, 'time': i18n['KCHDR6007M']})
-
- if(kimchi.trackingTasks.indexOf(tasks[i].id) >= 0) {
- continue;
- }
-
- kimchi.trackTask(tasks[i].id, function(result) {
- wok.topic('kimchi/debugReportAdded').publish();
- }, function(result) {
- // Error message from Async Task status
- if (result['message']) {
- var errText = result['message'];
- }
- // Error message from standard kimchi exception
- else {
- var errText = result['responseJSON']['reason'];
- }
- result && wok.message.error(errText);
- wok.topic('kimchi/debugReportAdded').publish();
- }, null);
- }
- }, null, true);
-
- return reports;
- };
-
- var listDebugReports = function() {
- kimchi.listReports(function(reports) {
- pendingReports = getPendingReports();
- allReports = pendingReports.concat(reports);
- $('#debug-report-section').removeClass('hidden');
-
- // Row selection will be cleared so disable buttons here
- enableReportButtons(false);
-
- if(reportGrid) {
- reportGrid.setData(allReports);
- }
- else {
- initReportGrid(allReports);
- }
-
- // Set id-debug-img to pending reports
- // It will display a loading icon
- var gridElement = $('#' + reportGridID);
- $.each($('td:contains(' + i18n['KCHDR6007M'] + ')', gridElement), function(index, row) {
- $(row).parent().addClass('no-hover');
- $(row).attr('id', 'id-debug-img');
- });
- }, function(error) {
- if(error['status'] == 403) {
- $('#debug-report-section').addClass('hidden');
- return;
- }
- $('#debug-report-section').removeClass('hidden');
- });
- };
-
- var shutdownButtonID = '#host-button-shutdown';
- var restartButtonID = '#host-button-restart';
- var shutdownHost = function(params) {
- var settings = {
- title : i18n['KCHAPI6004M'],
- content : i18n['KCHHOST6008M'],
- confirm : i18n['KCHAPI6002M'],
- cancel : i18n['KCHAPI6003M']
- };
-
- wok.confirm(settings, function() {
- kimchi.shutdown(params);
- $(shutdownButtonID).prop('disabled', true);
- $(restartButtonID).prop('disabled', true);
- // Check if there is any VM is running.
- kimchi.listVMs(function(vms) {
- for(var i = 0; i < vms.length; i++) {
- if(vms[i]['state'] === 'running') {
- wok.message.error.code('KCHHOST6001E');
- $(shutdownButtonID).prop('disabled', false);
- $(restartButtonID).prop('disabled', false);
- return;
- }
- }
-
- });
- }, function() {
- });
- };
-
- var initPage = function() {
- $('#host-info-container .section-header').each(function(i, header) {
- $('<span class="arrow"></span>').prependTo(header);
- var toExpand = $(header).attr('aria-expanded') !== 'false';
- expand(header, toExpand);
- });
-
- $('#host-info-container').on('click', '.section-header', function(event) {
- var toExpand = $(this).attr('aria-expanded') === 'false';
- expand(this, toExpand);
- });
-
- $('#host-button-shutdown').on('click', function(event) {
- shutdownHost(null);
- });
-
- $('#host-button-restart').on('click', function(event) {
- shutdownHost({
- reboot: true
- });
- });
-
- var setupUI = function() {
- if (kimchi.capabilities == undefined) {
- setTimeout(setupUI, 2000);
- return;
- }
-
- if((kimchi.capabilities['repo_mngt_tool']) && (kimchi.capabilities['repo_mngt_tool']!="None")) {
- initRepositoriesGrid(kimchi.capabilities['repo_mngt_tool']);
- $('#repositories-section').switchClass('hidden', kimchi.capabilities['repo_mngt_tool']);
- wok.topic('kimchi/repositoryAdded')
- .subscribe(listRepositories);
- wok.topic('kimchi/repositoryUpdated')
- .subscribe(listRepositories);
- wok.topic('kimchi/repositoryDeleted')
- .subscribe(listRepositories);
- }
-
- if(kimchi.capabilities['update_tool']) {
- $('#software-update-section').removeClass('hidden');
- initSoftwareUpdatesGrid();
- wok.topic('kimchi/softwareUpdated')
- .subscribe(listSoftwareUpdates);
- $('#software-updates-progress-container').accordion({
- collapsible: true
- });
- }
-
- if(kimchi.capabilities['system_report_tool']) {
- listDebugReports();
- wok.topic('kimchi/debugReportAdded')
- .subscribe(listDebugReports);
- wok.topic('kimchi/debugReportRenamed')
- .subscribe(listDebugReports);
- }
- };
- setupUI();
- };
-
- kimchi.getHost(function(data) {
- var htmlTmpl = $('#host-tmpl').html();
- data['logo'] = data['logo'] || '';
- data['memory'] = wok.formatMeasurement(data['memory'], {
- fixed: 2
- });
- var templated = wok.substitute(htmlTmpl, data);
- $('#host-content-container').html(templated);
-
- initPage();
- initTracker();
- });
-
- var StatsMgr = function() {
- var statsArray = {
- cpu: {
- u: {
- type: 'percent',
- legend: i18n['KCHHOST6002M'],
- points: []
- }
- },
- memory: {
- u: {
- type: 'value',
- base: 2,
- fixed: 2,
- legend: i18n['KCHHOST6003M'],
- points: []
- }
- },
- diskIO: {
- r: {
- type: 'value',
- base: 2,
- fixed: 2,
- unit: 'B/s',
- legend: i18n['KCHHOST6004M'],
- points: []
- },
- w: {
- type: 'value',
- base: 2,
- fixed: 2,
- unit: 'B/s',
- legend: i18n['KCHHOST6005M'],
- 'class': 'disk-write',
- points: []
- }
- },
- networkIO: {
- r: {
- type: 'value',
- base: 2,
- fixed: 2,
- unit: 'B/s',
- legend: i18n['KCHHOST6006M'],
- points: []
- },
- s: {
- type: 'value',
- base: 2,
- fixed: 2,
- unit: 'B/s',
- legend: i18n['KCHHOST6007M'],
- 'class': 'network-sent',
- points: []
- }
- }
- };
- var SIZE = 20;
- var cursor = SIZE;
-
- var add = function(stats) {
- for(var key in stats) {
- var item = stats[key];
- for(var metrics in item) {
- var value = item[metrics]['v'];
- var max = item[metrics]['max'];
- var unifiedMetrics = statsArray[key][metrics];
- var ps = unifiedMetrics['points'];
- if(!Array.isArray(value)){
- ps.push(value);
- if(ps.length > SIZE + 1) {
- ps.shift();
- }
- }
- else{
- ps=ps.concat(value);
- ps.splice(0, ps.length-SIZE-1);
- unifiedMetrics['points']=ps;
- }
- if(max !== undefined) {
- unifiedMetrics['max'] = max;
- }
- else {
- if(unifiedMetrics['type'] !== 'value') {
- continue;
- }
- max = -Infinity;
- $.each(ps, function(i, value) {
- if(value > max) {
- max = value;
- }
- });
- if(max === 0) {
- ++max;
- }
- max *= 1.1;
- unifiedMetrics['max'] = max;
- }
- }
- }
- cursor++;
- };
-
- var get = function(which) {
- var stats = statsArray[which];
- var lines = [];
- for(var k in stats) {
- var obj = stats[k];
- var line = {
- type: obj['type'],
- base: obj['base'],
- unit: obj['unit'],
- fixed: obj['fixed'],
- legend: obj['legend']
- };
- if(obj['max']) {
- line['max'] = obj['max'];
- }
- if(obj['class']) {
- line['class'] = obj['class'];
- }
- var ps = obj['points'];
- var numStats = ps.length;
- var unifiedPoints = [];
- $.each(ps, function(i, value) {
- unifiedPoints.push({
- x: cursor - numStats + i,
- y: value
- });
- });
- line['points'] = unifiedPoints;
- lines.push(line);
- }
- return lines;
- };
-
- return {
- add: add,
- get: get
- };
- };
-
- var Tracker = function(charts) {
- var charts = charts;
- var timer = null;
- var statsPool = new StatsMgr();
- var setCharts = function(newCharts) {
- charts = newCharts;
- for(var key in charts) {
- var chart = charts[key];
- chart.updateUI(statsPool.get(key));
- }
- };
-
- var self = this;
-
- var UnifyStats = function(stats) {
- var result= {
- cpu: {
- u: {
- v: stats['cpu_utilization']
- }
- },
- memory: {
- u: {
- }
- },
- diskIO: {
- r: {
- v: stats['disk_read_rate']
- },
- w: {
- v: stats['disk_write_rate']
- }
- },
- networkIO: {
- r: {
- v: stats['net_recv_rate']
- },
- s: {
- v: stats['net_sent_rate']
- }
- }
- };
- if(Array.isArray(stats['memory'])){
- result.memory.u['v']=[];
- result.memory.u['max']=-Infinity;
- for(var i=0;i<stats['memory'].length;i++){
- result.memory.u['v'].push(stats['memory'][i]['avail']);
- result.memory.u['max']=Math.max(result.memory.u['max'],stats['memory'][i]['total']);
- }
- }
- else {
- result.memory.u['v']=stats['memory']['avail'],
- result.memory.u['max']=stats['memory']['total']
- }
- return(result);
- };
-
-
- var statsCallback = function(stats) {
- var unifiedStats = UnifyStats(stats);
- statsPool.add(unifiedStats);
- for(var key in charts) {
- var chart = charts[key];
- chart.updateUI(statsPool.get(key));
- }
- timer = setTimeout(function() {
- continueTrack();
- }, 1000);
- };
-
- var track = function() {
- kimchi.getHostStatsHistory(statsCallback,
- function() {
- continueTrack();
- });
- };
-
- var continueTrack = function() {
- kimchi.getHostStats(statsCallback,
- function() {
- continueTrack();
- });
- };
-
- var destroy = function() {
- timer && clearTimeout(timer);
- timer = null;
- };
-
- return {
- setCharts: setCharts,
- start: track,
- stop: destroy
- };
- };
-
- var initTracker = function() {
- // TODO: Extend tabs with onUnload event to unregister timers.
- if(kimchi.hostTimer) {
- kimchi.hostTimer.stop();
- delete kimchi.hostTimer;
- }
-
- var trackedCharts = {
- cpu: new wok.widget.LineChart({
- id: 'chart-cpu',
- node: 'container-chart-cpu',
- type: 'percent'
- }),
- memory: new wok.widget.LineChart({
- id: 'chart-memory',
- node: 'container-chart-memory',
- type: 'value'
- }),
- diskIO: new wok.widget.LineChart({
- id: 'chart-disk-io',
- node: 'container-chart-disk-io',
- type: 'value'
- }),
- networkIO: new wok.widget.LineChart({
- id: 'chart-network-io',
- node: 'container-chart-network-io',
- type: 'value'
- })
- };
-
- if(kimchi.hostTimer) {
- kimchi.hostTimer.setCharts(trackedCharts);
- }
- else {
- kimchi.hostTimer = new Tracker(trackedCharts);
- kimchi.hostTimer.start();
- }
- };
-
- $('#host-root-container').on('remove', function() {
- if(kimchi.hostTimer) {
- kimchi.hostTimer.stop();
- delete kimchi.hostTimer;
- }
-
- repositoriesGrid && repositoriesGrid.destroy();
- wok.topic('kimchi/repositoryAdded')
- .unsubscribe(listRepositories);
- wok.topic('kimchi/repositoryUpdated')
- .unsubscribe(listRepositories);
- wok.topic('kimchi/repositoryDeleted')
- .unsubscribe(listRepositories);
-
- softwareUpdatesGrid && softwareUpdatesGrid.destroy();
- wok.topic('kimchi/softwareUpdated').unsubscribe(listSoftwareUpdates);
-
- reportGrid && reportGrid.destroy();
- wok.topic('kimchi/debugReportAdded').unsubscribe(listDebugReports);
- wok.topic('kimchi/debugReportRenamed').unsubscribe(listDebugReports);
- });
-};
diff --git a/src/wok/plugins/kimchi/ui/js/src/kimchi.report_add_main.js b/src/wok/plugins/kimchi/ui/js/src/kimchi.report_add_main.js
deleted file mode 100644
index 5f098d3..0000000
--- a/src/wok/plugins/kimchi/ui/js/src/kimchi.report_add_main.js
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Project Kimchi
- *
- * Copyright IBM, Corp. 2013-2014
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-kimchi.report_add_main = function() {
- var reportGridID = 'available-reports-grid';
- var addReportForm = $('#form-report-add');
- var submitButton = $('#button-report-add');
- var nameTextbox = $('input[name="name"]', addReportForm);
- nameTextbox.select();
-
- var submitForm = function(event) {
- if(submitButton.prop('disabled')) {
- return false;
- }
- var reportName = nameTextbox.val();
- var validator = RegExp("^[_A-Za-z0-9-]*$");
- if (!validator.test(reportName)) {
- wok.message.error.code('KCHDR6011M');
- return false;
- }
- var formData = addReportForm.serializeObject();
- var taskAccepted = false;
- var onTaskAccepted = function() {
- if(taskAccepted) {
- return;
- }
- taskAccepted = true;
- wok.window.close();
- wok.topic('kimchi/debugReportAdded').publish();
- };
-
- kimchi.createReport(formData, function(result) {
- onTaskAccepted();
- wok.topic('kimchi/debugReportAdded').publish();
- }, function(result) {
- // Error message from Async Task status
- if (result['message']) {
- var errText = result['message'];
- }
- // Error message from standard kimchi exception
- else {
- var errText = result['responseJSON']['reason'];
- }
- result && wok.message.error(errText);
-
- taskAccepted &&
- $('.grid-body-view table tr:first-child',
- '#' + reportGridID).remove();
- submitButton.prop('disabled', false);
- nameTextbox.select();
- }, onTaskAccepted);
-
- event.preventDefault();
- };
-
- addReportForm.on('submit', submitForm);
- submitButton.on('click', submitForm);
-};
diff --git a/src/wok/plugins/kimchi/ui/js/src/kimchi.report_rename_main.js b/src/wok/plugins/kimchi/ui/js/src/kimchi.report_rename_main.js
deleted file mode 100644
index 1bdb8d9..0000000
--- a/src/wok/plugins/kimchi/ui/js/src/kimchi.report_rename_main.js
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Project Kimchi
- *
- * Copyright IBM, Corp. 2014
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-kimchi.report_rename_main = function() {
- var renameReportForm = $('#form-report-rename');
- var submitButton = $('#button-report-rename');
- var nameTextbox = $('input[name="name"]', renameReportForm);
- var submitForm = function(event) {
- if(submitButton.prop('disabled')) {
- return false;
- }
- var reportName = nameTextbox.val();
-
- // if the user hasn't changed the report's name,
- // nothing should be done.
- if (reportName == kimchi.selectedReport) {
- wok.message.error.code('KCHDR6013M');
- return false;
- }
-
- var validator = RegExp("^[A-Za-z0-9-]*$");
- if (!validator.test(reportName)) {
- wok.message.error.code('KCHDR6011M');
- return false;
- }
- var formData = renameReportForm.serializeObject();
- submitButton.prop('disabled', true);
- nameTextbox.prop('disabled', true);
- kimchi.renameReport(kimchi.selectedReport, formData, function(result) {
- submitButton.prop('disabled', false);
- nameTextbox.prop('disabled', false);
- wok.window.close();
- wok.topic('kimchi/debugReportRenamed').publish({
- result: result
- });
- }, function(result) {
- var errText = result &&
- result['responseJSON'] &&
- result['responseJSON']['reason'];
- wok.message.error(errText);
- submitButton.prop('disabled', false);
- nameTextbox.prop('disabled', false).focus();
- });
-
- event.preventDefault();
- };
-
- renameReportForm.on('submit', submitForm);
- submitButton.on('click', submitForm);
-
- nameTextbox.val(kimchi.selectedReport).select();
-};
diff --git a/src/wok/plugins/kimchi/ui/js/src/kimchi.repository_add_main.js b/src/wok/plugins/kimchi/ui/js/src/kimchi.repository_add_main.js
deleted file mode 100644
index 656306b..0000000
--- a/src/wok/plugins/kimchi/ui/js/src/kimchi.repository_add_main.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Project Kimchi
- *
- * Copyright IBM, Corp. 2014
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-kimchi.repository_add_main = function() {
-
- var addForm = $('#form-repository-add');
- var addButton = $('#button-repository-add');
-
- var validateField = function(event) {
- var valid=($(this).val()!=='');
- $(addButton).prop('disabled', !valid);
- return(valid);
- };
-
- var validateForm = function(event) {
- var valid=false;
- addForm.find('input.required').each( function() {
- valid=($(this).val()!=='');
- return(!valid);
- });
- return(valid);
- }
-
- addForm.find('input.required').on('input propertychange', validateField);
-
- var weedObject = function(obj) {
- for (var key in obj) {
- if (obj.hasOwnProperty(key)) {
- if((typeof(obj[key])==="object") && !Array.isArray(obj[key])) {
- weedObject(obj[key]);
- }
- else if(obj[key] == '') {
- delete obj[key];
- }
- }
- }
- }
-
- var addRepository = function(event) {
- var valid = validateForm();
- if(!valid) {
- return false;
- }
-
- var formData = $(addForm).serializeObject();
-
- if (formData && formData.isMirror!=undefined) {
- formData.isMirror=(String(formData.isMirror).toLowerCase() === 'true');
- }
- if(formData.isMirror) {
- if(formData.config==undefined) {
- formData.config=new Object();
- }
- formData.config.mirrorlist=formData.baseurl;
- delete formData.baseurl;
- delete formData.isMirror;
- }
- weedObject(formData);
- if(formData.config && formData.config.comps) {
- formData.config.comps=formData.config.comps.split(/[,\s]/);
- for(var i=0; i>formData.config.comps.length; i++) {
- formData.config.comps[i]=formData.config.comps[i].trim();
- }
- for (var j=formData.config.comps.indexOf(""); j!=-1; j=formData.config.comps.indexOf("")) {
- formData.config.comps.splice(j, 1);
- }
- }
-
- kimchi.createRepository(formData, function() {
- wok.topic('kimchi/repositoryAdded').publish();
- wok.window.close();
- }, function(jqXHR, textStatus, errorThrown) {
- var reason = jqXHR &&
- jqXHR['responseJSON'] &&
- jqXHR['responseJSON']['reason'];
- wok.message.error(reason);
- });
- return false;
- };
-
- $(addForm).on('submit', addRepository);
-};
diff --git a/src/wok/plugins/kimchi/ui/js/src/kimchi.repository_edit_main.js b/src/wok/plugins/kimchi/ui/js/src/kimchi.repository_edit_main.js
deleted file mode 100644
index 5bfc51e..0000000
--- a/src/wok/plugins/kimchi/ui/js/src/kimchi.repository_edit_main.js
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Project Kimchi
- *
- * Copyright IBM, Corp. 2014
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-kimchi.repository_edit_main = function() {
-
- var editForm = $('#form-repository-edit');
-
- var saveButton = $('#repository-edit-button-save');
-
- if(kimchi.capabilities['repo_mngt_tool']=="yum") {
- editForm.find('input.deb').prop('disabled', true);
- }
- else if(kimchi.capabilities['repo_mngt_tool']=="deb") {
- editForm.find('input.yum').prop('disabled', true);
- }
-
- kimchi.retrieveRepository(kimchi.selectedRepository, function(repository) {
- editForm.fillWithObject(repository);
-
- $('input', editForm).on('input propertychange', function(event) {
- if($(this).val() !== '') {
- $(saveButton).prop('disabled', false);
- }
- });
- });
-
-
- var editRepository = function(event) {
- var formData = $(editForm).serializeObject();
-
- if (formData && formData.config) {
- formData.config.gpgcheck=(String(formData.config.gpgcheck).toLowerCase() === 'true');
- }
-
- if(formData.config && formData.config.comps) {
- formData.config.comps=formData.config.comps.split(/[,\s]/);
- for(var i=0; i>formData.config.comps.length; i++) {
- formData.config.comps[i]=formData.config.comps[i].trim();
- }
- for (var j=formData.config.comps.indexOf(""); j!=-1; j=formData.config.comps.indexOf("")) {
- formData.config.comps.splice(j, 1);
- }
- }
-
- kimchi.updateRepository(kimchi.selectedRepository, formData, function() {
- wok.topic('kimchi/repositoryUpdated').publish();
- wok.window.close();
- }, function(jqXHR, textStatus, errorThrown) {
- var reason = jqXHR &&
- jqXHR['responseJSON'] &&
- jqXHR['responseJSON']['reason'];
- wok.message.error(reason);
- });
-
- return false;
- };
-
- $(editForm).on('submit', editRepository);
- $(saveButton).on('click', editRepository);
-};
--
2.1.0
9 years, 2 months
[PATCH 11/15] V4 Ginger Base : base plugin ui/pages files
by chandra@linux.vnet.ibm.com
From: chandrureddy <chandra(a)linux.vnet.ibm.com>
---
src/wok/plugins/gingerbase/ui/pages/Makefile.am | 22 +++
src/wok/plugins/gingerbase/ui/pages/host.html.tmpl | 177 +++++++++++++++++++++
src/wok/plugins/gingerbase/ui/pages/i18n.json.tmpl | 148 +++++++++++++++++
.../gingerbase/ui/pages/report-add.html.tmpl | 56 +++++++
.../gingerbase/ui/pages/report-rename.html.tmpl | 56 +++++++
.../gingerbase/ui/pages/repository-add.html.tmpl | 113 +++++++++++++
.../gingerbase/ui/pages/repository-edit.html.tmpl | 117 ++++++++++++++
src/wok/plugins/kimchi/ui/pages/host.html.tmpl | 177 ---------------------
.../plugins/kimchi/ui/pages/report-add.html.tmpl | 56 -------
.../kimchi/ui/pages/report-rename.html.tmpl | 56 -------
.../kimchi/ui/pages/repository-add.html.tmpl | 113 -------------
.../kimchi/ui/pages/repository-edit.html.tmpl | 117 --------------
12 files changed, 689 insertions(+), 519 deletions(-)
create mode 100644 src/wok/plugins/gingerbase/ui/pages/Makefile.am
create mode 100644 src/wok/plugins/gingerbase/ui/pages/host.html.tmpl
create mode 100644 src/wok/plugins/gingerbase/ui/pages/i18n.json.tmpl
create mode 100644 src/wok/plugins/gingerbase/ui/pages/report-add.html.tmpl
create mode 100644 src/wok/plugins/gingerbase/ui/pages/report-rename.html.tmpl
create mode 100644 src/wok/plugins/gingerbase/ui/pages/repository-add.html.tmpl
create mode 100644 src/wok/plugins/gingerbase/ui/pages/repository-edit.html.tmpl
delete mode 100644 src/wok/plugins/kimchi/ui/pages/host.html.tmpl
delete mode 100644 src/wok/plugins/kimchi/ui/pages/report-add.html.tmpl
delete mode 100644 src/wok/plugins/kimchi/ui/pages/report-rename.html.tmpl
delete mode 100644 src/wok/plugins/kimchi/ui/pages/repository-add.html.tmpl
delete mode 100644 src/wok/plugins/kimchi/ui/pages/repository-edit.html.tmpl
diff --git a/src/wok/plugins/gingerbase/ui/pages/Makefile.am b/src/wok/plugins/gingerbase/ui/pages/Makefile.am
new file mode 100644
index 0000000..d8c729f
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/pages/Makefile.am
@@ -0,0 +1,22 @@
+#
+# Ginger Base
+#
+# Copyright IBM, Corp. 2015
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+SUBDIRS = help
+
+htmldir = $(datadir)/wok/plugins/gingerbase/ui/pages
+
+dist_html_DATA = $(wildcard *.tmpl) $(NULL)
diff --git a/src/wok/plugins/gingerbase/ui/pages/host.html.tmpl b/src/wok/plugins/gingerbase/ui/pages/host.html.tmpl
new file mode 100644
index 0000000..2c55614
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/pages/host.html.tmpl
@@ -0,0 +1,177 @@
+#*
+ * Project Ginger Base
+ *
+ * Copyright IBM, Corp. 2013-2015
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *#
+
+#unicode UTF-8
+#import gettext
+#from wok.cachebust import href
+#silent t = gettext.translation($lang.domain, $lang.localedir, languages=$lang.lang, fallback=True)
+#silent _ = t.gettext
+#silent _t = t.gettext
+<!DOCTYPE html>
+<html>
+<head>
+<link rel="stylesheet" href="plugins/gingerbase/css/theme-default.min.css">
+<script src="plugins/gingerbase/js/gingerbase.min.js"></script>
+</head>
+<body>
+<div id="host-root-container">
+ <div class="toolbar">
+ <div class="tools">
+ </div>
+ </div>
+ <div id="host-content-container" class="empty-when-logged-off"></div>
+</div>
+
+<script id="host-tmpl" type="gingerbase/template">
+ <div class="host-panel">
+ <div class="logo-container">
+ <div class="logo" style="background-image: url({logo});"></div>
+ </div>
+ <div id="host-info-container" class="info-container">
+ <h2 class="hostname">{hostname}</h2>
+ <div class="action-panel">
+ <button id="host-button-shutdown" class="btn-normal-1 stop">
+ <div class="button-icon action-icon-stop"></div>
+ $_("Shut down")
+ </button>
+ <button id="host-button-restart" class="btn-normal-1 restart">
+ <div class="button-icon action-icon-restart"></div>
+ $_("Restart")
+ </button>
+ <button class="btn-normal-1 connect" disabled="disabled">
+ <div class="button-icon action-icon-connect"></div>
+ $_("Connect")
+ </button>
+ </div>
+ <div class="host-section">
+ <h3 class="section-header"
+ aria-expanded="false"
+ aria-controls="content-sys-info">
+ $_("Basic Information")
+ </h3>
+ <div id="content-sys-info" class="section-content">
+ <div class="section-row">
+ <div class="section-label">$_("OS Distro")</div>
+ <div class="section-value">{os_distro}</div>
+ </div>
+ <div class="section-row">
+ <div class="section-label">$_("OS Version")</div>
+ <div class="section-value">{os_version}</div>
+ </div>
+ <div class="section-row">
+ <div class="section-label">$_("OS Code Name")</div>
+ <div class="section-value">{os_codename}</div>
+ </div>
+ <div class="section-row">
+ <div class="section-label">$_("Processor")</div>
+ <div class="section-value">{cpu_model}</div>
+ </div>
+ <div class="section-row">
+ <div class="section-label">$_("CPU(s)")</div>
+ <div class="section-value">{cpus}</div>
+ </div>
+ <div class="section-row">
+ <div class="section-label">$_("Memory")</div>
+ <div class="section-value">{memory}</div>
+ </div>
+ </div>
+ </div>
+ <div class="host-section">
+ <h3 class="section-header"
+ aria-controls="content-sys-statistics">
+ $_("System Statistics")
+ </h3>
+ <div id="content-sys-statistics" class="section-content">
+ <div class="section-row">
+ <div class="section-label">$_("CPU")</div>
+ <div class="section-value">
+ <div id="container-chart-cpu" class="inline-block"></div>
+ </div>
+ </div>
+ <div class="section-row">
+ <div class="section-label">$_("Memory")</div>
+ <div class="section-value">
+ <div id="container-chart-memory" class="inline-block"></div>
+ </div>
+ </div>
+ <div class="section-row">
+ <div class="section-label">$_("Disk I/O")</div>
+ <div class="section-value">
+ <div id="container-chart-disk-io" class="inline-block"></div>
+ </div>
+ </div>
+ <div class="section-row">
+ <div class="section-label">$_("Network I/O")</div>
+ <div class="section-value">
+ <div id="container-chart-network-io" class="inline-block"></div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="software-update-section" class="host-section hidden">
+ <h3 class="section-header"
+ aria-controls="content-software-update">
+ $_("Software Updates")
+ </h3>
+ <div id="content-software-update" class="section-content">
+ <div class="section-row">
+ <div class="section-value">
+ <div id="software-updates-grid-container"></div>
+ <div id="software-updates-progress-container" class="hidden">
+ <label for="software-updates-progress-textarea">$_("Update Progress")</label>
+ <textarea id="software-updates-progress-textarea" readonly></textarea>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="repositories-section" class="host-section hidden">
+ <h3 class="section-header"
+ aria-controls="content-repositories">
+ $_("Repositories")
+ </h3>
+ <div id="content-repositories" class="section-content">
+ <div class="section-row">
+ <div class="section-value">
+ <div id="repositories-grid-container"></div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="debug-report-section" class="host-section hidden">
+ <h3 class="section-header"
+ aria-controls="content-sys-reports">
+ $_("Debug Reports")
+ </h3>
+ <div id="content-sys-reports" class="section-content">
+ <div class="section-row">
+ <div class="section-value">
+ <div id="available-reports-grid-container"></div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+</script>
+
+<script type="text/javascript">
+ kimchi.host_main();
+</script>
+</body>
+</html>
diff --git a/src/wok/plugins/gingerbase/ui/pages/i18n.json.tmpl b/src/wok/plugins/gingerbase/ui/pages/i18n.json.tmpl
new file mode 100644
index 0000000..b6091ca
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/pages/i18n.json.tmpl
@@ -0,0 +1,148 @@
+#*
+ * Project Ginger Base
+ *
+ * Copyright IBM, Corp. 2015
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *#
+#unicode UTF-8
+#import gettext
+#from wok.cachebust import href
+#silent t = gettext.translation($lang.domain, $lang.localedir, languages=$lang.lang, fallback=True)
+#silent _ = t.gettext
+#silent _t = t.gettext
+{
+ "GGBAUTH6001E": "$_("The username or password you entered is incorrect. Please try again.")",
+ "GGBAUTH6002E": "$_("This field is required.")",
+
+ "GGBAUTH6001M": "$_("Log in")",
+ "GGBAUTH6002M": "$_("Logging in...")",
+
+ "Host": "$_("Host")",
+ "Guests": "$_("Guests")",
+ "Templates": "$_("Templates")",
+ "Storage": "$_("Storage")",
+ "Network": "$_("Network")",
+
+ "GGBAPI6002E": "$_("Failed to get application configuration")",
+ "GGBAPI6003E": "$_("This is not a valid Linux path")",
+ "GGBAPI6004E": "$_("This is not a valid URL.")",
+ "GGBAPI6005E": "$_("No such data available.")",
+ "GGBAPI6007E": "$_("Can not contact the host system. Verify the host system is up and that you have network connectivity to it. HTTP request response %1. ")",
+ "GGBAPI6008E": "$_("Unable to read file.")",
+ "GGBAPI6009E": "$_("Error while uploading file.")",
+
+ "GGBAPI6001M": "$_("Delete Confirmation")",
+ "GGBAPI6002M": "$_("OK")",
+ "GGBAPI6003M": "$_("Cancel")",
+ "GGBAPI6004M": "$_("Confirm")",
+ "GGBAPI6005M": "$_("Create")",
+ "GGBAPI6006M": "$_("Warning")",
+ "GGBAPI6007M": "$_("Save")",
+ "GGBAPI6008M": "$_("Creating...")",
+ "GGBAPI6009M": "$_("Cloning...")",
+
+ "GGBGRD6001M": "$_("Loading...")",
+ "GGBGRD6002M": "$_("An error occurred while retrieving system information.")",
+ "GGBGRD6003M": "$_("Retry")",
+ "GGBGRD6004M": "$_("Detailed message:")",
+
+ "GGBHOST6001E": "$_("Unable to shut down system as there are some virtual machines running!")",
+
+ "GGBHOST6001M": "$_("Max:")",
+ "GGBHOST6002M": "$_("Utilization")",
+ "GGBHOST6003M": "$_("Available")",
+ "GGBHOST6004M": "$_("Read Rate")",
+ "GGBHOST6005M": "$_("Write Rate")",
+ "GGBHOST6006M": "$_("Received")",
+ "GGBHOST6007M": "$_("Sent")",
+ "GGBHOST6008M": "$_("Shutting down or restarting host will cause unsaved work lost. Continue to shut down/restarting?")",
+
+
+ "GGBREPO6001M": "$_("Confirm")",
+ "GGBREPO6002M": "$_("Repository will be removed permanently and can't be recovered. Do you want to continue?")",
+ "GGBREPO6003M": "$_("Repositories")",
+ "GGBREPO6004M": "$_("ID")",
+ "GGBREPO6005M": "$_("Name")",
+ "GGBREPO6006M": "$_("Base URL")",
+ "GGBREPO6007M": "$_("Is Mirror")",
+ "GGBREPO6008M": "$_("URL Args")",
+ "GGBREPO6009M": "$_("Enabled")",
+ "GGBREPO6010M": "$_("GPG Check")",
+ "GGBREPO6011M": "$_("GPG Key")",
+ "GGBREPO6012M": "$_("Add")",
+ "GGBREPO6013M": "$_("Edit")",
+ "GGBREPO6014M": "$_("Remove")",
+ "GGBREPO6016M": "$_("Enable")",
+ "GGBREPO6017M": "$_("Disable")",
+
+
+ "GGBUPD6001M": "$_("Software Updates")",
+ "GGBUPD6002M": "$_("Package Name")",
+ "GGBUPD6003M": "$_("Version")",
+ "GGBUPD6004M": "$_("Architecture")",
+ "GGBUPD6005M": "$_("Repository")",
+ "GGBUPD6006M": "$_("Update All")",
+ "GGBUPD6007M": "$_("Updating...")",
+ "GGBUPD6008M": "$_("Failed to retrieve packages update information.")",
+ "GGBUPD6009M": "$_("Failed to update package(s).")",
+
+
+ "GGBDR6001M": "$_("Debug report will be removed permanently and can't be recovered. Do you want to continue?")",
+ "GGBDR6002M": "$_("Debug Reports")",
+ "GGBDR6003M": "$_("Name")",
+ "GGBDR6005M": "$_("Generated Time")",
+ "GGBDR6006M": "$_("Generate")",
+ "GGBDR6007M": "$_("Generating...")",
+ "GGBDR6008M": "$_("Rename")",
+ "GGBDR6009M": "$_("Remove")",
+ "GGBDR6010M": "$_("Download")",
+ "GGBDR6011M": "$_("Report name should contain only letters, digits, underscore ('_') and/or hyphen ('-').")",
+ "GGBDR6012M": "$_("Pending...")",
+ "GGBDR6013M": "$_("Report name is the same as the original one.")",
+
+ "GGBVM6001M": "$_("This will delete the virtual machine and its virtual disks. This operation cannot be undone. Would you like to continue?")",
+ "GGBVM6002M": "$_("Power off Confirmation")",
+ "GGBVM6003M": "$_("This action may produce undesirable results, "
+ "for example unflushed disk cache in the guest. "
+ "Would you like to continue?")",
+ "GGBVM6004M": "$_("Reset Confirmation")",
+ "GGBVM6005M": "$_("There is a risk of data loss caused by reset without"
+ " the guest OS shutdown. Would you like to continue?")",
+ "GGBVM6006M": "$_("Shut Down Confirmation")",
+ "GGBVM6007M": "$_("Note the guest OS may ignore this request. Would you like to continue?")",
+ "GGBVM6008M": "$_("Virtual Machine delete Confirmation")",
+ "GGBVM6009M": "$_("This virtual machine is not persistent. Power Off will delete it. Continue?")",
+ "GGBVM6010M": "$_("When the target guest has SCSI or iSCSI volumes, they will be cloned on default storage pool. The same will happen when the target pool does not have enough space to clone the volumes. Do you want to continue?")",
+
+ "GGBVMCD6001M": "$_("This CDROM will be detached permanently and you can re-attach it. Continue to detach it?")",
+ "GGBVMCD6002M": "$_("Attach")",
+ "GGBVMCD6003M": "$_("Attaching...")",
+ "GGBVMCD6004M": "$_("Replace")",
+ "GGBVMCD6005M": "$_("Replacing...")",
+ "GGBVMCD6006M": "$_("Successfully attached!")",
+ "GGBVMCD6007M": "$_("Successfully replaced!")",
+ "GGBVMCD6008M": "$_("Successfully detached!")",
+ "GGBVMCD6009M": "$_("This disk will be detached permanently and you can re-attach it. Continue to detach it?")",
+
+ "GGBVMED6001M": "$_("interface:")",
+ "GGBVMED6002M": "$_("address:")",
+ "GGBVMED6003M": "$_("link_type:")",
+ "GGBVMED6004M": "$_("block:")",
+ "GGBVMED6005M": "$_("drive_type:")",
+ "GGBVMED6006M": "$_("model:")",
+ "GGBVMED6007M": "$_("Affected devices:")",
+
+ "GGBVMSTOR0001E": "$_("CDROM path needs to be a valid local/remote path and cannot be blank.")",
+ "GGBVMSTOR0002E": "$_("Disk pool or volume cannot be blank.")"
+}
diff --git a/src/wok/plugins/gingerbase/ui/pages/report-add.html.tmpl b/src/wok/plugins/gingerbase/ui/pages/report-add.html.tmpl
new file mode 100644
index 0000000..4983ff0
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/pages/report-add.html.tmpl
@@ -0,0 +1,56 @@
+#*
+ * Project Ginger Base
+ *
+ * Copyright IBM, Corp. 2013-2015
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *#
+#unicode UTF-8
+#import gettext
+#from wok.cachebust import href
+#silent t = gettext.translation($lang.domain, $lang.localedir, languages=$lang.lang, fallback=True)
+#silent _ = t.gettext
+#silent _t = t.gettext
+<!DOCTYPE html>
+<div id="report-add-window" class="window">
+ <header>
+ <h1 class="title h1 grey">$_("Generate a New Debug Report")</h1>
+ </header>
+ <div class="content">
+ <form id="form-report-add">
+ <section class="form-section">
+ <h2>
+ <label for="report-name-textbox">$_("Report Name")</label>
+ </h2>
+ <div class="field">
+ <input type="text" class="text" id="report-name-textbox" name="name" />
+ <span class="icon-info-circled light-grey c1"></span>
+ <span class="info-add-debug-report">
+ $_("The name used to identify the report. If omitted, a name will be chosen based on current time. Name can contain: letters, digits, underscore (\"_\") and hyphen (\"-\").")
+ </span>
+ </div>
+ </section>
+ </form>
+ </div>
+ <footer>
+ <div class="btn-group">
+ <button id="button-report-add" class="btn-normal"><span class="text">$_("Generate")</span></button>
+ <button id="button-report-cancel" class="btn-normal close" type="button">
+ <span calss="text">$_("Cancel")</span>
+ </button>
+ </div>
+ </footer>
+</div>
+<script>
+ kimchi.report_add_main();
+</script>
diff --git a/src/wok/plugins/gingerbase/ui/pages/report-rename.html.tmpl b/src/wok/plugins/gingerbase/ui/pages/report-rename.html.tmpl
new file mode 100644
index 0000000..900dae8
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/pages/report-rename.html.tmpl
@@ -0,0 +1,56 @@
+#*
+ * Project Ginger Base
+ *
+ * Copyright IBM, Corp. 2014-2015
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *#
+#unicode UTF-8
+#import gettext
+#from wok.cachebust import href
+#silent t = gettext.translation($lang.domain, $lang.localedir, languages=$lang.lang, fallback=True)
+#silent _ = t.gettext
+#silent _t = t.gettext
+<!DOCTYPE html>
+<div id="report-rename-window" class="window">
+ <header>
+ <h1 class="title h1 grey">$_("Rename a Debug Report")</h1>
+ </header>
+ <div class="content">
+ <form id="form-report-rename">
+ <section class="form-section">
+ <h2>
+ <label for="report-name-textbox">$_("Report Name")</label>
+ </h2>
+ <div class="field">
+ <input type="text" class="text" id="report-name-textbox" name="name" />
+ <span class="icon-info-circled light-grey c1"></span>
+ <span class="info-debug-report-rename">
+ $_("The name used to identify the report. Name can contain: letters, digits and hyphen (\"-\").")
+ </span>
+ </div>
+ </section>
+ </form>
+ </div>
+ <footer>
+ <div class="btn-group">
+ <button id="button-report-rename" class="btn-normal"><span class="text">$_("Submit")</span></button>
+ <button id-"button-report-rename-cancel" class="btn-normal close" type="button">
+ <span class="text">$_("Cancel")</span>
+ </button>
+ </div>
+ </footer>
+</div>
+<script>
+ kimchi.report_rename_main();
+</script>
diff --git a/src/wok/plugins/gingerbase/ui/pages/repository-add.html.tmpl b/src/wok/plugins/gingerbase/ui/pages/repository-add.html.tmpl
new file mode 100644
index 0000000..a5b4001
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/pages/repository-add.html.tmpl
@@ -0,0 +1,113 @@
+#*
+ * Project Ginger Base
+ *
+ * Copyright IBM, Corp. 2014-2015
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *#
+#unicode UTF-8
+#import gettext
+#from wok.cachebust import href
+#silent t = gettext.translation($lang.domain, $lang.localedir, languages=$lang.lang, fallback=True)
+#silent _ = t.gettext
+#silent _t = t.gettext
+<div id="repository-add-window" class="window">
+ <form id="form-repository-add">
+ <header class="window-header">
+ <h1 class="title h1 grey">$_("Add a Repository")</h1>
+ </header>
+ <section>
+ <div class="content">
+ <div class="form-section yum">
+ <h2>$_("Identifier")</h2>
+ <div class="field">
+ <div class="textbox-wrapper">
+ <input type="text" class="text" name="repo_id" />
+ </div>
+ <div class="icon-info-circled light-grey c1 help-inline"></div>
+ <p class="text-help help-inline">
+ $_("Single word, unique identifier for the repository.")
+ </p>
+ </div>
+ </div>
+ <section class="form-section yum">
+ <h2>$_("Name")</h2>
+ <div class="field">
+ <div class="textbox-wrapper">
+ <input type="text" class="text" name="config[repo_name]" />
+ </div>
+ <div class="icon-info-circled light-grey c1 help-inline"></div>
+ <p class="text-help help-inline">
+ $_("Textual name for the repository.")
+ </p>
+ </div>
+ </section>
+ <section class="form-section">
+ <h2>$_("URL")<span class="required" role="presentation" title='$_("Required Field")'>*</span></h2>
+ <div class="field">
+ <div class="textbox-wrapper">
+ <input type="text" class="text required" name="baseurl" />
+ </div>
+ <div class="icon-info-circled light-grey c1 help-inline"></div>
+ <p class="text-help help-inline">
+ $_("URL to the repository. Supported protocols are http, ftp, and file.")
+ </p>
+ </div>
+ <div class="field yum">
+ <p class="yum">
+ <input type="checkbox" name="isMirror" value="true" id="isMirror" />
+ <label id="isMirrorLabel" for="isMirror">$_("Repository is a mirror")</label>
+ </p>
+ </div>
+ </section>
+ <section class="form-section repository-dist deb">
+ <h2>$_("Distribution")</h2>
+ <div class="field">
+ <div class="textbox-wrapper">
+ <input type="text" class="text" name="config[dist]" />
+ </div>
+ <div class="icon-info-circled light-grey c1 help-inline"></div>
+ <p class="text-help help-inline">
+ $_("Distribution of the DEB repository.")
+ </p>
+ </div>
+ </section>
+ <section class="form-section repository-comps deb">
+ <h2>$_("Components")</h2>
+ <div class="field">
+ <div class="textbox-wrapper">
+ <input type="text" class="text" name="config[comps]" />
+ </div>
+ <div class="icon-info-circled light-grey c1 help-inline"></div>
+ <p class="text-help help-inline">
+ $_("List of components in DEB repository.")
+ </p>
+ </div>
+ </section>
+ </div>
+ </section>
+ <footer>
+ <div class="btn-group">
+ <button type="submit" id="button-repository-add" class="btn-normal" disabled="disabled">
+ <span class="text">$_("Add")</span>
+ </button>
+ <button type="button" id="button-repository-close" class="btn-normal close">
+ <span class="text">$("Cancel")</span>
+ </button>
+ </div>
+ </footer>
+ </form>
+</div>
+<script>
+ kimchi.repository_add_main();
+</script>
diff --git a/src/wok/plugins/gingerbase/ui/pages/repository-edit.html.tmpl b/src/wok/plugins/gingerbase/ui/pages/repository-edit.html.tmpl
new file mode 100644
index 0000000..b1a421e
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/pages/repository-edit.html.tmpl
@@ -0,0 +1,117 @@
+#*
+ * Project Ginger Base
+ *
+ * Copyright IBM, Corp. 2014-2015
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *#
+#unicode UTF-8
+#import gettext
+#from wok.cachebust import href
+#silent t = gettext.translation($lang.domain, $lang.localedir, languages=$lang.lang, fallback=True)
+#silent _ = t.gettext
+#silent _t = t.gettext
+
+<div id="repository-edit-window" class="window">
+ <form id="form-repository-edit">
+ <header>
+ <h1 class="title h1 grey">$_("Edit Repository")</h1>
+ </header>
+ <div class="content">
+ <section id="form-repository-edit">
+ <fieldset class="repository-edit-fieldset">
+ <div class="repository-id yum">
+ <div class="repository-edit-wrapper-label">
+ <label for="repository-edit-id-textbox">$_("ID")</label>
+ </div>
+ <div class="repository-edit-wrapper-controls">
+ <input id="repository-edit-id-textbox" name="repo_id" type="text" disabled="disabled" readonly="readonly"/>
+ </div>
+ </div>
+ <div class="repository-name yum">
+ <div class="repository-edit-wrapper-label">
+ <label for="repository-edit-name-textbox">$_("Name")</label>
+ </div>
+ <div class="repository-edit-wrapper-controls">
+ <input id="repository-edit-name-textbox" class="yum" name="config[repo_name]" type="text" />
+ </div>
+ </div>
+ <div class="repository-url">
+ <div class="repository-edit-wrapper-label">
+ <label for="repository-edit-baseurl-textbox">$_("URL")</label>
+ </div>
+ <div class="repository-edit-wrapper-controls">
+ <input id="repository-edit-baseurl-textbox" name="baseurl" type="text" />
+ </div>
+ </div>
+ <div class="repository-dist deb">
+ <div class="repository-edit-wrapper-label">
+ <label for="repository-edit-urlargs-textbox">$_("Distribution")</label>
+ </div>
+ <div class="repository-edit-wrapper-controls">
+ <input id="repository-edit-urlargs-textbox" class="deb" name="config[dist]" type="text" />
+ </div>
+ </div>
+ <div class="repository-mirrorlist yum">
+ <div class="repository-edit-wrapper-label">
+ <label for="repository-edit-urlargs-textbox">$_("Mirror List URL")</label>
+ </div>
+ <div class="repository-edit-wrapper-controls">
+ <input id="repository-edit-urlargs-textbox" class="yum" name="config[mirrorlist]" type="text" />
+ </div>
+ </div>
+ <div class="repository-comps deb">
+ <div class="repository-edit-wrapper-label">
+ <label for="repository-edit-urlargs-textbox">$_("Components")</label>
+ </div>
+ <div class="repository-edit-wrapper-controls">
+ <input id="repository-edit-urlargs-textbox" class="deb" name="config[comps]" type="text" />
+ </div>
+ </div>
+ <div class="repository-gpgkey yum">
+ <div class="repository-edit-wrapper-label">
+ <label for="repository-edit-gpgkey-textbox">$_("GPG Key")</label>
+ </div>
+ <div class="repository-edit-wrapper-controls">
+ <input id="repository-edit-gpgkey-textbox" class="yum" name="config[gpgkey]" type="text" />
+ </div>
+ </div>
+ <div class="repository-gpgcheck yum">
+ <div class="repository-edit-wrapper-label">
+ <label>$_("GPG Check")</label>
+ </div>
+ <div class="repository-edit-wrapper-controls">
+ <input id="repository-edit-gpgcheck-radio-true" class="yum" name="config[gpgcheck]" type="radio" value="true" />
+ <label for="repository-edit-gpgcheck-radio-true">$_("Yes")</label>
+ <input id="repository-edit-gpgcheck-radio-false" class="yum" name="config[gpgcheck]" type="radio" value="false" />
+ <label for="repository-edit-gpgcheck-radio-false">$_("No")</label>
+ </div>
+ </div>
+ </fieldset>
+ </section>
+ </div>
+ <footer>
+ <div class="btn-group">
+ <button type="submit" id="repository-edit-button-save" class="btn-normal">
+ <span class="text">$_("Save")</span>
+ </button>
+ <button type="button" id="repository-edit-button-cancel" class="close btn-normal">
+ <span class="text">$_("Cancel")</span>
+ </button>
+ </div>
+ </footer>
+ </form>
+</div>
+<script type="text/javascript">
+ kimchi.repository_edit_main();
+</script>
diff --git a/src/wok/plugins/kimchi/ui/pages/host.html.tmpl b/src/wok/plugins/kimchi/ui/pages/host.html.tmpl
deleted file mode 100644
index d87debc..0000000
--- a/src/wok/plugins/kimchi/ui/pages/host.html.tmpl
+++ /dev/null
@@ -1,177 +0,0 @@
-#*
- * Project Kimchi
- *
- * Copyright IBM, Corp. 2013-2015
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *#
-
-#unicode UTF-8
-#import gettext
-#from wok.cachebust import href
-#silent t = gettext.translation($lang.domain, $lang.localedir, languages=$lang.lang, fallback=True)
-#silent _ = t.gettext
-#silent _t = t.gettext
-<!DOCTYPE html>
-<html>
-<head>
-<link rel="stylesheet" href="plugins/kimchi/css/theme-default.min.css">
-<script src="plugins/kimchi/js/kimchi.min.js"></script>
-</head>
-<body>
-<div id="host-root-container">
- <div class="toolbar">
- <div class="tools">
- </div>
- </div>
- <div id="host-content-container" class="empty-when-logged-off"></div>
-</div>
-
-<script id="host-tmpl" type="kimchi/template">
- <div class="host-panel">
- <div class="logo-container">
- <div class="logo" style="background-image: url({logo});"></div>
- </div>
- <div id="host-info-container" class="info-container">
- <h2 class="hostname">{hostname}</h2>
- <div class="action-panel">
- <button id="host-button-shutdown" class="btn-normal-1 stop">
- <div class="button-icon action-icon-stop"></div>
- $_("Shut down")
- </button>
- <button id="host-button-restart" class="btn-normal-1 restart">
- <div class="button-icon action-icon-restart"></div>
- $_("Restart")
- </button>
- <button class="btn-normal-1 connect" disabled="disabled">
- <div class="button-icon action-icon-connect"></div>
- $_("Connect")
- </button>
- </div>
- <div class="host-section">
- <h3 class="section-header"
- aria-expanded="false"
- aria-controls="content-sys-info">
- $_("Basic Information")
- </h3>
- <div id="content-sys-info" class="section-content">
- <div class="section-row">
- <div class="section-label">$_("OS Distro")</div>
- <div class="section-value">{os_distro}</div>
- </div>
- <div class="section-row">
- <div class="section-label">$_("OS Version")</div>
- <div class="section-value">{os_version}</div>
- </div>
- <div class="section-row">
- <div class="section-label">$_("OS Code Name")</div>
- <div class="section-value">{os_codename}</div>
- </div>
- <div class="section-row">
- <div class="section-label">$_("Processor")</div>
- <div class="section-value">{cpu_model}</div>
- </div>
- <div class="section-row">
- <div class="section-label">$_("CPU(s)")</div>
- <div class="section-value">{cpus}</div>
- </div>
- <div class="section-row">
- <div class="section-label">$_("Memory")</div>
- <div class="section-value">{memory}</div>
- </div>
- </div>
- </div>
- <div class="host-section">
- <h3 class="section-header"
- aria-controls="content-sys-statistics">
- $_("System Statistics")
- </h3>
- <div id="content-sys-statistics" class="section-content">
- <div class="section-row">
- <div class="section-label">$_("CPU")</div>
- <div class="section-value">
- <div id="container-chart-cpu" class="inline-block"></div>
- </div>
- </div>
- <div class="section-row">
- <div class="section-label">$_("Memory")</div>
- <div class="section-value">
- <div id="container-chart-memory" class="inline-block"></div>
- </div>
- </div>
- <div class="section-row">
- <div class="section-label">$_("Disk I/O")</div>
- <div class="section-value">
- <div id="container-chart-disk-io" class="inline-block"></div>
- </div>
- </div>
- <div class="section-row">
- <div class="section-label">$_("Network I/O")</div>
- <div class="section-value">
- <div id="container-chart-network-io" class="inline-block"></div>
- </div>
- </div>
- </div>
- </div>
- <div id="software-update-section" class="host-section hidden">
- <h3 class="section-header"
- aria-controls="content-software-update">
- $_("Software Updates")
- </h3>
- <div id="content-software-update" class="section-content">
- <div class="section-row">
- <div class="section-value">
- <div id="software-updates-grid-container"></div>
- <div id="software-updates-progress-container" class="hidden">
- <label for="software-updates-progress-textarea">$_("Update Progress")</label>
- <textarea id="software-updates-progress-textarea" readonly></textarea>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div id="repositories-section" class="host-section hidden">
- <h3 class="section-header"
- aria-controls="content-repositories">
- $_("Repositories")
- </h3>
- <div id="content-repositories" class="section-content">
- <div class="section-row">
- <div class="section-value">
- <div id="repositories-grid-container"></div>
- </div>
- </div>
- </div>
- </div>
- <div id="debug-report-section" class="host-section hidden">
- <h3 class="section-header"
- aria-controls="content-sys-reports">
- $_("Debug Reports")
- </h3>
- <div id="content-sys-reports" class="section-content">
- <div class="section-row">
- <div class="section-value">
- <div id="available-reports-grid-container"></div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
-</script>
-
-<script type="text/javascript">
- kimchi.host_main();
-</script>
-</body>
-</html>
diff --git a/src/wok/plugins/kimchi/ui/pages/report-add.html.tmpl b/src/wok/plugins/kimchi/ui/pages/report-add.html.tmpl
deleted file mode 100644
index 25bf0a9..0000000
--- a/src/wok/plugins/kimchi/ui/pages/report-add.html.tmpl
+++ /dev/null
@@ -1,56 +0,0 @@
-#*
- * Project Kimchi
- *
- * Copyright IBM, Corp. 2013-2015
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *#
-#unicode UTF-8
-#import gettext
-#from wok.cachebust import href
-#silent t = gettext.translation($lang.domain, $lang.localedir, languages=$lang.lang, fallback=True)
-#silent _ = t.gettext
-#silent _t = t.gettext
-<!DOCTYPE html>
-<div id="report-add-window" class="window">
- <header>
- <h1 class="title h1 grey">$_("Generate a New Debug Report")</h1>
- </header>
- <div class="content">
- <form id="form-report-add">
- <section class="form-section">
- <h2>
- <label for="report-name-textbox">$_("Report Name")</label>
- </h2>
- <div class="field">
- <input type="text" class="text" id="report-name-textbox" name="name" />
- <span class="icon-info-circled light-grey c1"></span>
- <span class="info-add-debug-report">
- $_("The name used to identify the report. If omitted, a name will be chosen based on current time. Name can contain: letters, digits, underscore (\"_\") and hyphen (\"-\").")
- </span>
- </div>
- </section>
- </form>
- </div>
- <footer>
- <div class="btn-group">
- <button id="button-report-add" class="btn-normal"><span class="text">$_("Generate")</span></button>
- <button id="button-report-cancel" class="btn-normal close" type="button">
- <span calss="text">$_("Cancel")</span>
- </button>
- </div>
- </footer>
-</div>
-<script>
- kimchi.report_add_main();
-</script>
diff --git a/src/wok/plugins/kimchi/ui/pages/report-rename.html.tmpl b/src/wok/plugins/kimchi/ui/pages/report-rename.html.tmpl
deleted file mode 100644
index 90a0a80..0000000
--- a/src/wok/plugins/kimchi/ui/pages/report-rename.html.tmpl
+++ /dev/null
@@ -1,56 +0,0 @@
-#*
- * Project Kimchi
- *
- * Copyright IBM, Corp. 2014-2015
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *#
-#unicode UTF-8
-#import gettext
-#from wok.cachebust import href
-#silent t = gettext.translation($lang.domain, $lang.localedir, languages=$lang.lang, fallback=True)
-#silent _ = t.gettext
-#silent _t = t.gettext
-<!DOCTYPE html>
-<div id="report-rename-window" class="window">
- <header>
- <h1 class="title h1 grey">$_("Rename a Debug Report")</h1>
- </header>
- <div class="content">
- <form id="form-report-rename">
- <section class="form-section">
- <h2>
- <label for="report-name-textbox">$_("Report Name")</label>
- </h2>
- <div class="field">
- <input type="text" class="text" id="report-name-textbox" name="name" />
- <span class="icon-info-circled light-grey c1"></span>
- <span class="info-debug-report-rename">
- $_("The name used to identify the report. Name can contain: letters, digits and hyphen (\"-\").")
- </span>
- </div>
- </section>
- </form>
- </div>
- <footer>
- <div class="btn-group">
- <button id="button-report-rename" class="btn-normal"><span class="text">$_("Submit")</span></button>
- <button id-"button-report-rename-cancel" class="btn-normal close" type="button">
- <span class="text">$_("Cancel")</span>
- </button>
- </div>
- </footer>
-</div>
-<script>
- kimchi.report_rename_main();
-</script>
diff --git a/src/wok/plugins/kimchi/ui/pages/repository-add.html.tmpl b/src/wok/plugins/kimchi/ui/pages/repository-add.html.tmpl
deleted file mode 100644
index 950252a..0000000
--- a/src/wok/plugins/kimchi/ui/pages/repository-add.html.tmpl
+++ /dev/null
@@ -1,113 +0,0 @@
-#*
- * Project Kimchi
- *
- * Copyright IBM, Corp. 2014-2015
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *#
-#unicode UTF-8
-#import gettext
-#from wok.cachebust import href
-#silent t = gettext.translation($lang.domain, $lang.localedir, languages=$lang.lang, fallback=True)
-#silent _ = t.gettext
-#silent _t = t.gettext
-<div id="repository-add-window" class="window">
- <form id="form-repository-add">
- <header class="window-header">
- <h1 class="title h1 grey">$_("Add a Repository")</h1>
- </header>
- <section>
- <div class="content">
- <div class="form-section yum">
- <h2>$_("Identifier")</h2>
- <div class="field">
- <div class="textbox-wrapper">
- <input type="text" class="text" name="repo_id" />
- </div>
- <div class="icon-info-circled light-grey c1 help-inline"></div>
- <p class="text-help help-inline">
- $_("Single word, unique identifier for the repository.")
- </p>
- </div>
- </div>
- <section class="form-section yum">
- <h2>$_("Name")</h2>
- <div class="field">
- <div class="textbox-wrapper">
- <input type="text" class="text" name="config[repo_name]" />
- </div>
- <div class="icon-info-circled light-grey c1 help-inline"></div>
- <p class="text-help help-inline">
- $_("Textual name for the repository.")
- </p>
- </div>
- </section>
- <section class="form-section">
- <h2>$_("URL")<span class="required" role="presentation" title='$_("Required Field")'>*</span></h2>
- <div class="field">
- <div class="textbox-wrapper">
- <input type="text" class="text required" name="baseurl" />
- </div>
- <div class="icon-info-circled light-grey c1 help-inline"></div>
- <p class="text-help help-inline">
- $_("URL to the repository. Supported protocols are http, ftp, and file.")
- </p>
- </div>
- <div class="field yum">
- <p class="yum">
- <input type="checkbox" name="isMirror" value="true" id="isMirror" />
- <label id="isMirrorLabel" for="isMirror">$_("Repository is a mirror")</label>
- </p>
- </div>
- </section>
- <section class="form-section repository-dist deb">
- <h2>$_("Distribution")</h2>
- <div class="field">
- <div class="textbox-wrapper">
- <input type="text" class="text" name="config[dist]" />
- </div>
- <div class="icon-info-circled light-grey c1 help-inline"></div>
- <p class="text-help help-inline">
- $_("Distribution of the DEB repository.")
- </p>
- </div>
- </section>
- <section class="form-section repository-comps deb">
- <h2>$_("Components")</h2>
- <div class="field">
- <div class="textbox-wrapper">
- <input type="text" class="text" name="config[comps]" />
- </div>
- <div class="icon-info-circled light-grey c1 help-inline"></div>
- <p class="text-help help-inline">
- $_("List of components in DEB repository.")
- </p>
- </div>
- </section>
- </div>
- </section>
- <footer>
- <div class="btn-group">
- <button type="submit" id="button-repository-add" class="btn-normal" disabled="disabled">
- <span class="text">$_("Add")</span>
- </button>
- <button type="button" id="button-repository-close" class="btn-normal close">
- <span class="text">$("Cancel")</span>
- </button>
- </div>
- </footer>
- </form>
-</div>
-<script>
- kimchi.repository_add_main();
-</script>
diff --git a/src/wok/plugins/kimchi/ui/pages/repository-edit.html.tmpl b/src/wok/plugins/kimchi/ui/pages/repository-edit.html.tmpl
deleted file mode 100644
index e5a3cfb..0000000
--- a/src/wok/plugins/kimchi/ui/pages/repository-edit.html.tmpl
+++ /dev/null
@@ -1,117 +0,0 @@
-#*
- * Project Kimchi
- *
- * Copyright IBM, Corp. 2014-2015
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *#
-#unicode UTF-8
-#import gettext
-#from wok.cachebust import href
-#silent t = gettext.translation($lang.domain, $lang.localedir, languages=$lang.lang, fallback=True)
-#silent _ = t.gettext
-#silent _t = t.gettext
-
-<div id="repository-edit-window" class="window">
- <form id="form-repository-edit">
- <header>
- <h1 class="title h1 grey">$_("Edit Repository")</h1>
- </header>
- <div class="content">
- <section id="form-repository-edit">
- <fieldset class="repository-edit-fieldset">
- <div class="repository-id yum">
- <div class="repository-edit-wrapper-label">
- <label for="repository-edit-id-textbox">$_("ID")</label>
- </div>
- <div class="repository-edit-wrapper-controls">
- <input id="repository-edit-id-textbox" name="repo_id" type="text" disabled="disabled" readonly="readonly"/>
- </div>
- </div>
- <div class="repository-name yum">
- <div class="repository-edit-wrapper-label">
- <label for="repository-edit-name-textbox">$_("Name")</label>
- </div>
- <div class="repository-edit-wrapper-controls">
- <input id="repository-edit-name-textbox" class="yum" name="config[repo_name]" type="text" />
- </div>
- </div>
- <div class="repository-url">
- <div class="repository-edit-wrapper-label">
- <label for="repository-edit-baseurl-textbox">$_("URL")</label>
- </div>
- <div class="repository-edit-wrapper-controls">
- <input id="repository-edit-baseurl-textbox" name="baseurl" type="text" />
- </div>
- </div>
- <div class="repository-dist deb">
- <div class="repository-edit-wrapper-label">
- <label for="repository-edit-urlargs-textbox">$_("Distribution")</label>
- </div>
- <div class="repository-edit-wrapper-controls">
- <input id="repository-edit-urlargs-textbox" class="deb" name="config[dist]" type="text" />
- </div>
- </div>
- <div class="repository-mirrorlist yum">
- <div class="repository-edit-wrapper-label">
- <label for="repository-edit-urlargs-textbox">$_("Mirror List URL")</label>
- </div>
- <div class="repository-edit-wrapper-controls">
- <input id="repository-edit-urlargs-textbox" class="yum" name="config[mirrorlist]" type="text" />
- </div>
- </div>
- <div class="repository-comps deb">
- <div class="repository-edit-wrapper-label">
- <label for="repository-edit-urlargs-textbox">$_("Components")</label>
- </div>
- <div class="repository-edit-wrapper-controls">
- <input id="repository-edit-urlargs-textbox" class="deb" name="config[comps]" type="text" />
- </div>
- </div>
- <div class="repository-gpgkey yum">
- <div class="repository-edit-wrapper-label">
- <label for="repository-edit-gpgkey-textbox">$_("GPG Key")</label>
- </div>
- <div class="repository-edit-wrapper-controls">
- <input id="repository-edit-gpgkey-textbox" class="yum" name="config[gpgkey]" type="text" />
- </div>
- </div>
- <div class="repository-gpgcheck yum">
- <div class="repository-edit-wrapper-label">
- <label>$_("GPG Check")</label>
- </div>
- <div class="repository-edit-wrapper-controls">
- <input id="repository-edit-gpgcheck-radio-true" class="yum" name="config[gpgcheck]" type="radio" value="true" />
- <label for="repository-edit-gpgcheck-radio-true">$_("Yes")</label>
- <input id="repository-edit-gpgcheck-radio-false" class="yum" name="config[gpgcheck]" type="radio" value="false" />
- <label for="repository-edit-gpgcheck-radio-false">$_("No")</label>
- </div>
- </div>
- </fieldset>
- </section>
- </div>
- <footer>
- <div class="btn-group">
- <button type="submit" id="repository-edit-button-save" class="btn-normal">
- <span class="text">$_("Save")</span>
- </button>
- <button type="button" id="repository-edit-button-cancel" class="close btn-normal">
- <span class="text">$_("Cancel")</span>
- </button>
- </div>
- </footer>
- </form>
-</div>
-<script type="text/javascript">
- kimchi.repository_edit_main();
-</script>
--
2.1.0
9 years, 2 months
[PATCH 10/15] V4 Ginger Base : base plugin ui/pages/help files
by chandra@linux.vnet.ibm.com
From: chandrureddy <chandra(a)linux.vnet.ibm.com>
---
.../plugins/gingerbase/ui/pages/help/Makefile.am | 37 ++++
.../gingerbase/ui/pages/help/de_DE/Makefile.am | 26 +++
.../gingerbase/ui/pages/help/de_DE/host.dita | 49 +++++
.../plugins/gingerbase/ui/pages/help/dita-help.xsl | 26 +++
.../gingerbase/ui/pages/help/en_US/Makefile.am | 26 +++
.../gingerbase/ui/pages/help/en_US/host.dita | 68 +++++++
.../gingerbase/ui/pages/help/es_ES/Makefile.am | 26 +++
.../gingerbase/ui/pages/help/es_ES/host.dita | 49 +++++
.../gingerbase/ui/pages/help/fr_FR/Makefile.am | 26 +++
.../gingerbase/ui/pages/help/fr_FR/host.dita | 65 +++++++
.../gingerbase/ui/pages/help/gingerbase.css | 208 +++++++++++++++++++++
.../gingerbase/ui/pages/help/it_IT/Makefile.am | 26 +++
.../gingerbase/ui/pages/help/it_IT/host.dita | 51 +++++
.../gingerbase/ui/pages/help/ja_JP/Makefile.am | 26 +++
.../gingerbase/ui/pages/help/ja_JP/host.dita | 69 +++++++
.../gingerbase/ui/pages/help/ko_KR/Makefile.am | 26 +++
.../gingerbase/ui/pages/help/ko_KR/host.dita | 51 +++++
.../gingerbase/ui/pages/help/pt_BR/Makefile.am | 26 +++
.../gingerbase/ui/pages/help/pt_BR/host.dita | 72 +++++++
.../gingerbase/ui/pages/help/ru_RU/Makefile.am | 26 +++
.../gingerbase/ui/pages/help/ru_RU/host.dita | 48 +++++
.../gingerbase/ui/pages/help/zh_CN/Makefile.am | 26 +++
.../gingerbase/ui/pages/help/zh_CN/host.dita | 45 +++++
.../gingerbase/ui/pages/help/zh_TW/Makefile.am | 26 +++
.../gingerbase/ui/pages/help/zh_TW/host.dita | 49 +++++
.../plugins/kimchi/ui/pages/help/de_DE/host.dita | 49 -----
.../plugins/kimchi/ui/pages/help/en_US/host.dita | 68 -------
.../plugins/kimchi/ui/pages/help/es_ES/host.dita | 49 -----
.../plugins/kimchi/ui/pages/help/fr_FR/host.dita | 65 -------
.../plugins/kimchi/ui/pages/help/it_IT/host.dita | 51 -----
.../plugins/kimchi/ui/pages/help/ja_JP/host.dita | 69 -------
.../plugins/kimchi/ui/pages/help/ko_KR/host.dita | 51 -----
.../plugins/kimchi/ui/pages/help/pt_BR/host.dita | 72 -------
.../plugins/kimchi/ui/pages/help/ru_RU/host.dita | 48 -----
.../plugins/kimchi/ui/pages/help/zh_CN/host.dita | 45 -----
.../plugins/kimchi/ui/pages/help/zh_TW/host.dita | 49 -----
36 files changed, 1173 insertions(+), 616 deletions(-)
create mode 100644 src/wok/plugins/gingerbase/ui/pages/help/Makefile.am
create mode 100644 src/wok/plugins/gingerbase/ui/pages/help/de_DE/Makefile.am
create mode 100644 src/wok/plugins/gingerbase/ui/pages/help/de_DE/host.dita
create mode 100644 src/wok/plugins/gingerbase/ui/pages/help/dita-help.xsl
create mode 100644 src/wok/plugins/gingerbase/ui/pages/help/en_US/Makefile.am
create mode 100644 src/wok/plugins/gingerbase/ui/pages/help/en_US/host.dita
create mode 100644 src/wok/plugins/gingerbase/ui/pages/help/es_ES/Makefile.am
create mode 100644 src/wok/plugins/gingerbase/ui/pages/help/es_ES/host.dita
create mode 100644 src/wok/plugins/gingerbase/ui/pages/help/fr_FR/Makefile.am
create mode 100644 src/wok/plugins/gingerbase/ui/pages/help/fr_FR/host.dita
create mode 100644 src/wok/plugins/gingerbase/ui/pages/help/gingerbase.css
create mode 100644 src/wok/plugins/gingerbase/ui/pages/help/it_IT/Makefile.am
create mode 100644 src/wok/plugins/gingerbase/ui/pages/help/it_IT/host.dita
create mode 100644 src/wok/plugins/gingerbase/ui/pages/help/ja_JP/Makefile.am
create mode 100644 src/wok/plugins/gingerbase/ui/pages/help/ja_JP/host.dita
create mode 100644 src/wok/plugins/gingerbase/ui/pages/help/ko_KR/Makefile.am
create mode 100644 src/wok/plugins/gingerbase/ui/pages/help/ko_KR/host.dita
create mode 100644 src/wok/plugins/gingerbase/ui/pages/help/pt_BR/Makefile.am
create mode 100644 src/wok/plugins/gingerbase/ui/pages/help/pt_BR/host.dita
create mode 100644 src/wok/plugins/gingerbase/ui/pages/help/ru_RU/Makefile.am
create mode 100644 src/wok/plugins/gingerbase/ui/pages/help/ru_RU/host.dita
create mode 100644 src/wok/plugins/gingerbase/ui/pages/help/zh_CN/Makefile.am
create mode 100644 src/wok/plugins/gingerbase/ui/pages/help/zh_CN/host.dita
create mode 100644 src/wok/plugins/gingerbase/ui/pages/help/zh_TW/Makefile.am
create mode 100644 src/wok/plugins/gingerbase/ui/pages/help/zh_TW/host.dita
delete mode 100644 src/wok/plugins/kimchi/ui/pages/help/de_DE/host.dita
delete mode 100644 src/wok/plugins/kimchi/ui/pages/help/en_US/host.dita
delete mode 100644 src/wok/plugins/kimchi/ui/pages/help/es_ES/host.dita
delete mode 100644 src/wok/plugins/kimchi/ui/pages/help/fr_FR/host.dita
delete mode 100644 src/wok/plugins/kimchi/ui/pages/help/it_IT/host.dita
delete mode 100644 src/wok/plugins/kimchi/ui/pages/help/ja_JP/host.dita
delete mode 100644 src/wok/plugins/kimchi/ui/pages/help/ko_KR/host.dita
delete mode 100644 src/wok/plugins/kimchi/ui/pages/help/pt_BR/host.dita
delete mode 100644 src/wok/plugins/kimchi/ui/pages/help/ru_RU/host.dita
delete mode 100644 src/wok/plugins/kimchi/ui/pages/help/zh_CN/host.dita
delete mode 100644 src/wok/plugins/kimchi/ui/pages/help/zh_TW/host.dita
diff --git a/src/wok/plugins/gingerbase/ui/pages/help/Makefile.am b/src/wok/plugins/gingerbase/ui/pages/help/Makefile.am
new file mode 100644
index 0000000..2c61ea4
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/pages/help/Makefile.am
@@ -0,0 +1,37 @@
+#
+# Ginger Base
+#
+# Copyright IBM Corp, 2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+SUBDIRS = zh_CN it_IT en_US zh_TW pt_BR ja_JP ru_RU ko_KR fr_FR de_DE es_ES
+
+DITA_HTML_FILES = $(patsubst %.dita,%.html,$(wildcard */*.dita))
+HTML_FILES = $(if $(DITA_HTML_FILES), $(DITA_HTML_FILES), $(wildcard */*.html))
+DITA_XSL_FILE = dita-help.xsl
+
+EXTRA_DIST = $(DITA_XSL_FILE)
+
+helpdir = $(datadir)/wok/plugins/gingerbase/ui/pages/help
+
+dist_help_DATA = gingerbase.css
+
+all: $(HTML_FILES) $(wildcard */*.dita)
+
+%.html: %.dita $(DITA_XSL_FILE)
+ xsltproc -o $@ $(DITA_XSL_FILE) $<
+
+CLEANFILES = $(HTML_FILES)
diff --git a/src/wok/plugins/gingerbase/ui/pages/help/de_DE/Makefile.am b/src/wok/plugins/gingerbase/ui/pages/help/de_DE/Makefile.am
new file mode 100644
index 0000000..dc393e4
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/pages/help/de_DE/Makefile.am
@@ -0,0 +1,26 @@
+#
+# Ginger Base
+#
+# Copyright IBM Corp, 2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+de_DE_helpdir = $(datadir)/wok/plugins/gingerbase/ui/pages/help/de_DE
+
+dist_de_DE_help_DATA = $(wildcard *.html) $(NULL)
+
+EXTRA_DIST = $(wildcard *.dita)
+
+CLEANFILES = $(wildcard *.html)
diff --git a/src/wok/plugins/gingerbase/ui/pages/help/de_DE/host.dita b/src/wok/plugins/gingerbase/ui/pages/help/de_DE/host.dita
new file mode 100644
index 0000000..9f676df
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/pages/help/de_DE/host.dita
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--Arbortext, Inc., 1988-2011, v.4002-->
+<!DOCTYPE cshelp PUBLIC "-//IBM//DTD DITA CSHelp//EN"
+ "..\dtd\cshelp.dtd">
+
+
+<!--This DITA specialized document type is not supported by the Authoring Tools development team.
+For support please see:
+https://w3.opensource.ibm.com/projects/dita-cshelp/-->
+<cshelp id="kimhhost" xml:lang="de-de">
+<title>Host</title>
+<shortdesc>Die Seite <wintitle>Host</wintitle> zeigt Informationen zum Hostsystem an und ermöglicht Ihnen, den Host herunterzufahren, erneut zu starten und eine Verbindung zu ihm herzustellen.</shortdesc>
+<csbody>
+<p>Sie können die folgenden Aktionen am Host durchführen:<ul>
+<li>Wählen Sie <uicontrol>Herunterfahren</uicontrol> aus, um das Hostsystem herunterzufahren.</li>
+<li>Wählen Sie <uicontrol>Erneut starten</uicontrol> aus, um das Hostsystem erneut zu starten.</li>
+<li>Wählen Sie <uicontrol>Verbinden</uicontrol> aus, um eine VNC-Verbindung zum Hostsystem herzustellen, wenn noch keine Verbindung besteht.</li>
+</ul></p>
+<p>Klicken Sie auf die folgenden Abschnitte, um Informationen zum Host anzuzeigen:</p>
+<dl><dlentry>
+<dt>Basisinformationen</dt>
+<dd>Dieser Abschnitt zeigt die Verteilung, die Version und den Codenamen des Hostbetriebssystems sowie den Prozessortyp, die Anzahl der Online-CPUs und die Speicherkapazität in GB an. </dd>
+</dlentry><dlentry>
+<dt>Systemstatistik</dt>
+<dd>Dieser Abschnitt zeigt mithilfe von Grafiken Statistiken für CPU, Speicher, Platten-E/A und Netz-E/A für den Host an. </dd>
+</dlentry><dlentry>
+<dt>Software-Updates</dt>
+<dd>Dieser Abschnitt zeigt Informationen für alle Pakete an, bei denen Aktualisierungen verfügbar sind, einschließlich Paketname, Version, Architektur und Repository. Sie können alle aufgelisteten Pakete aktualisieren, indem Sie <uicontrol>Alle aktualisieren</uicontrol> auswählen. Sie können nicht einzelne Pakete zur Aktualisierung auswählen.</dd>
+</dlentry><dlentry>
+<dt>Repositorys</dt>
+<dd>Dieser Abschnitt zeigt Repositorys an, die dem Hostsystem zugeordnet sind. Sie können Repositorys hinzufügen, aktivieren, bearbeiten oder entfernen. Beim Hinzufügen wird ein Repository dem Hostsystem zugeordnet. Das Aktivieren eines Repositorys dagegen ermöglicht dem Host den Zugriff auf das Repository. Wenn Ihr System Red Hat Enterprise
+Linux oder Fedora ist, können Sie <filepath>yum</filepath>-Repositorys hinzufügen.
+Wenn Ihr System Ubuntu oder Debian ist, fügen Sie <filepath>deb</filepath>-Repositorys hinzu.<p>Wenn Sie mit yum-Repositorys arbeiten, können Sie eine GPG-Prüfung hinzufügen, um sicherzustellen, dass ein Paket aus diesem Repository nicht beschädigt wurde.
+Wählen Sie ein Repository und dann <uicontrol>Bearbeiten</uicontrol> aus. Wählen Sie <uicontrol>Ja</uicontrol> aus, um <uicontrol>GPG-Prüfung</uicontrol> zu aktivieren, und geben Sie dann eine URL zur GPG-Schlüsseldatei für das Repository ein. </p></dd>
+</dlentry><dlentry>
+<dt>Debugberichte</dt>
+<dd>Dieser Abschnitt zeigt Debugberichte, einschließlich Name und Dateipfad, an.
+Sie haben die Möglichkeit, einen neuen Bericht zu erstellen oder einen bestehenden Bericht umzubenennen, zu entfernen oder herunterzuladen.<p>Der Debugbericht wird während des Befehls <cmdname>sosreport</cmdname> generiert. Er ist verfügbar für Red Hat Enterprise <tm tmtype="tm" trademark="Linux">Linux</tm>-, Fedora-
+und Ubuntu-Verteilungen. Der Befehl generiert eine .tar-Datei, die Konfigurations- und Diagnoseinformationen enthält, wie zum Beispiel Kernelversion, geladene Module sowie System- und Servicekonfigurationdateien.
+Der Befehl führt zudem externe Programme aus, um weitere Informationen zu sammeln, und speichert diese Ausgabe im resultierenden Archiv.</p> </dd>
+</dlentry></dl>
+</csbody>
+<?tm 1392659967 1?>
+</cshelp>
+
+
+<!-- ENGL1SH_VERS10N 42248_4 DO NOT REMOVE OR CHANGE THIS LINE -->
+<!-- T9N_SRC_ID 232 -->
+<!-- T9N_SH1P_STR1NG KV310AAP001 1 -->
diff --git a/src/wok/plugins/gingerbase/ui/pages/help/dita-help.xsl b/src/wok/plugins/gingerbase/ui/pages/help/dita-help.xsl
new file mode 100644
index 0000000..2e66903
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/pages/help/dita-help.xsl
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <xsl:output method="xml" indent="yes" encoding="UTF-8" />
+
+ <xsl:template match="/">
+ <html>
+ <head>
+ <title><xsl:value-of select="/cshelp/title" /></title>
+ <meta charset="UTF-8" />
+ <link rel="shortcut icon" href="../../images/logo.ico" />
+ <link rel="stylesheet" type="text/css" href="../gingerbase.css" />
+ </head>
+ <body>
+ <xsl:apply-templates select="//cshelp" />
+ </body>
+ </html>
+ </xsl:template>
+
+ <xsl:template match="cshelp">
+ <h1><xsl:value-of select="title" /></h1>
+ <p class="shortdesc"><xsl:value-of select="shortdesc" /></p>
+ <p class="csbody"><xsl:copy-of select="csbody/node()" /></p>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/src/wok/plugins/gingerbase/ui/pages/help/en_US/Makefile.am b/src/wok/plugins/gingerbase/ui/pages/help/en_US/Makefile.am
new file mode 100644
index 0000000..0a75a81
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/pages/help/en_US/Makefile.am
@@ -0,0 +1,26 @@
+#
+# Ginger Base
+#
+# Copyright IBM Corp, 2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+en_US_helpdir = $(datadir)/wok/plugins/gingerbase/ui/pages/help/en_US
+
+dist_en_US_help_DATA = $(wildcard *.html) $(NULL)
+
+EXTRA_DIST = $(wildcard *.dita)
+
+CLEANFILES = $(wildcard *.html)
\ No newline at end of file
diff --git a/src/wok/plugins/gingerbase/ui/pages/help/en_US/host.dita b/src/wok/plugins/gingerbase/ui/pages/help/en_US/host.dita
new file mode 100644
index 0000000..4af3498
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/pages/help/en_US/host.dita
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--Arbortext, Inc., 1988-2011, v.4002-->
+<!DOCTYPE cshelp PUBLIC "-//IBM//DTD DITA CSHelp//EN"
+ "..\dtd\cshelp.dtd">
+<?Pub Sty _display FontColor="red"?>
+<?Pub Inc?>
+<!--This DITA specialized document type is not supported by the Authoring Tools development team.
+For support please see:
+https://w3.opensource.ibm.com/projects/dita-cshelp/-->
+<cshelp id="kimhhost" xml:lang="en-us">
+<title>Host</title>
+<shortdesc>The <wintitle>Host</wintitle> page shows information about
+the host system, and allows you to shut down, restart, and connect
+to the host.</shortdesc>
+<csbody>
+<p>You can perform the following actions on the host:<ul>
+<li>Select <uicontrol>Shut down</uicontrol> to shut down the host
+system.</li>
+<li>Select <uicontrol>Restart</uicontrol> to restart the host system.</li>
+<li>Select <uicontrol>Connect</uicontrol> to open a VNC connection
+to the host system, if it is not already connected.</li>
+</ul></p>
+<p>Click the following sections to display information about the host:</p>
+<dl><dlentry>
+<dt>Basic information</dt>
+<dd>This section displays the host operating system distribution,
+version, and code name, as well as the processor type, the number
+of online CPUs and amount of memory in GB.</dd>
+</dlentry><dlentry>
+<dt>System statistics</dt>
+<dd>This section displays graphs to show statistics for CPU, memory,
+disk I/O, and network I/O for the host. </dd>
+</dlentry><dlentry>
+<dt>Software Updates</dt>
+<dd>This section displays information for all of the packages that
+have updates available, including package name, version, architecture,
+and repository. You can update all of the packages listed by selecting <uicontrol>Update
+All</uicontrol>. You cannot select individual packages for updates.</dd>
+</dlentry><dlentry>
+<dt>Repositories</dt>
+<dd>This section displays repositories that are associated with the
+host system. You can add, enable, edit, or remove repositories. Adding
+a repository associates it with the host system while enabling a repository
+allows the host to access it. If your system is Red Hat Enterprise
+Linux or Fedora, you can add <filepath>yum</filepath> repositories.
+If your system is Ubuntu or Debian, then add <filepath>deb</filepath> repositories.<p>If
+you are working with yum repositories, you can add a GPG check to
+verify that a package from this repository have not been corrupted.
+Select a repository and then <uicontrol>Edit</uicontrol>. Select <uicontrol>Yes</uicontrol> to
+enable <uicontrol>GPG Check</uicontrol> and then enter a URL to the
+GPG key file for the repository.</p></dd>
+</dlentry><dlentry>
+<dt>Debug reports</dt>
+<dd>This section displays debug reports, including name and file path.
+You can select from options to generate a new report, or rename, remove,
+or download an existing report.<p>The debug report is generated using
+the <cmdname>sosreport</cmdname> command. It is available for Red
+Hat Enterprise <tm tmtype="tm" trademark="Linux">Linux</tm>, Fedora,
+and Ubuntu distributions. The command generates a .tar file that contains
+configuration and diagnostic information, such as the running kernel
+version, loaded modules, and system and service configuration files.
+The command also runs external programs to collect further information
+and stores this output in the resulting archive.</p> </dd>
+</dlentry></dl>
+</csbody><?Pub Caret -1?>
+<?tm 1392659967 1?>
+</cshelp>
+<?Pub *0000003410?>
diff --git a/src/wok/plugins/gingerbase/ui/pages/help/es_ES/Makefile.am b/src/wok/plugins/gingerbase/ui/pages/help/es_ES/Makefile.am
new file mode 100644
index 0000000..b95744a
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/pages/help/es_ES/Makefile.am
@@ -0,0 +1,26 @@
+#
+# Ginger Base
+#
+# Copyright IBM Corp, 2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+es_ES_helpdir = $(datadir)/wok/plugins/gingerbase/ui/pages/help/es_ES
+
+dist_es_ES_help_DATA = $(wildcard *.html) $(NULL)
+
+EXTRA_DIST = $(wildcard *.dita)
+
+CLEANFILES = $(wildcard *.html)
diff --git a/src/wok/plugins/gingerbase/ui/pages/help/es_ES/host.dita b/src/wok/plugins/gingerbase/ui/pages/help/es_ES/host.dita
new file mode 100644
index 0000000..90f60f8
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/pages/help/es_ES/host.dita
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--Arbortext, Inc., 1988-2011, v.4002-->
+<!DOCTYPE cshelp PUBLIC "-//IBM//DTD DITA CSHelp//EN"
+ "..\dtd\cshelp.dtd">
+
+
+<!--This DITA specialized document type is not supported by the Authoring Tools development team.
+For support please see:
+https://w3.opensource.ibm.com/projects/dita-cshelp/-->
+<cshelp id="kimhhost" xml:lang="es-es">
+<title>Host</title>
+<shortdesc>La página <wintitle>Host</wintitle> muestra información sobre el sistema host y le permite concluir, reiniciar y conectar con el sistema principal.</shortdesc>
+<csbody>
+<p>Puede realizar las acciones siguientes en el host:<ul>
+<li>Seleccione <uicontrol>Concluir</uicontrol> para concluir el sistema host.</li>
+<li>Seleccione <uicontrol>Reiniciar</uicontrol> para reiniciar el sistema host.</li>
+<li>Seleccione <uicontrol>Conectar</uicontrol> para abrir una conexión VNC al sistema host, si no está conectado aún.</li>
+</ul></p>
+<p>Pulse en las secciones siguientes para visualizar información acerca del host:</p>
+<dl><dlentry>
+<dt>Información básica</dt>
+<dd>Esta sección muestra la distribución del sistema operativo de host, la versión, el nombre de código, así como el tipo de procesador, el número de CPU en línea y la cantidad de memoria en GB.</dd>
+</dlentry><dlentry>
+<dt>Estadísticas del sistema</dt>
+<dd>Esta sección muestra gráficos para mostrar estadísticas para CPU, memoria, E/S de disco y E/S de red para el host. </dd>
+</dlentry><dlentry>
+<dt>Actualizaciones de software</dt>
+<dd>En esta sección se muestra información para todos los paquetes que tienen actualizaciones disponibles, incluido el nombre de paquete, versión, arquitectura y repositorio. Puede actualizar todos los paquetes listados seleccionando <uicontrol>Actualizar todo</uicontrol>. No puede seleccionar paquetes individuales para las actualizaciones.</dd>
+</dlentry><dlentry>
+<dt>Repositorios</dt>
+<dd>En esta sección se muestran los repositorios que están asociados con el sistema host. Puede añadir, habilitar, editar o eliminar repositorios. Añadir un repositorio lo asocia con el sistema host mientras que habilitar un repositorio permite que el host acceda a él. Si el sistema es Red Hat Enterprise
+Linux o Fedora, puede añadir repositorios <filepath>yum</filepath>.
+Si el sistema es Ubuntu o Debian, añada repositorios <filepath>deb</filepath>.<p>Si está trabajando con repositorios yum, puede añadir una comprobación GPG para verificar que un paquete de este repositorio no ha resultado dañado.
+Seleccione un repositorio y, a continuación, <uicontrol>Editar</uicontrol>. Seleccione <uicontrol>Sí</uicontrol> para habilitar <uicontrol>Comprobación GPG</uicontrol> y, a continuación, especifique un URL al archivo de claves GPG para el repositorio. </p></dd>
+</dlentry><dlentry>
+<dt>Informes de depuración</dt>
+<dd>En esta sección se muestran informes de depuración, incluido el nombre y la ruta de archivo.
+Puede seleccionar entre opciones para generar un informe nuevo, o bien redenominar, eliminar o descargar un informe existente.<p>El informe de depuración se genera utilizando el mandato <cmdname>sosreport</cmdname>. Está disponible para distribuciones de Red
+Hat Enterprise <tm tmtype="tm" trademark="Linux">Linux</tm>, Fedora y Ubuntu. El mandato genera un archivo .tar que contiene la información de configuración y de diagnóstico, como la versión de kernel en ejecución, los módulos de carga y los archivos de configuración del sistema y servicio.
+El mandato también ejecuta programas externos para recopilar información adicional y almacena esta salida en el archivo resultante.</p> </dd>
+</dlentry></dl>
+</csbody>
+<?tm 1392659967 1?>
+</cshelp>
+
+
+<!-- ENGL1SH_VERS10N 42248_4 DO NOT REMOVE OR CHANGE THIS LINE -->
+<!-- T9N_SRC_ID 232 -->
+<!-- T9N_SH1P_STR1NG KV310AAP001 1 -->
diff --git a/src/wok/plugins/gingerbase/ui/pages/help/fr_FR/Makefile.am b/src/wok/plugins/gingerbase/ui/pages/help/fr_FR/Makefile.am
new file mode 100644
index 0000000..c3e9a14
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/pages/help/fr_FR/Makefile.am
@@ -0,0 +1,26 @@
+#
+# Ginger Base
+#
+# Copyright IBM Corp, 2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+fr_FR_helpdir = $(datadir)/wok/plugins/gingerbase/ui/pages/help/fr_FR
+
+dist_fr_FR_help_DATA = $(wildcard *.html) $(NULL)
+
+EXTRA_DIST = $(wildcard *.dita)
+
+CLEANFILES = $(wildcard *.html)
diff --git a/src/wok/plugins/gingerbase/ui/pages/help/fr_FR/host.dita b/src/wok/plugins/gingerbase/ui/pages/help/fr_FR/host.dita
new file mode 100644
index 0000000..099d342
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/pages/help/fr_FR/host.dita
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--Arbortext, Inc., 1988-2011, v.4002-->
+<!DOCTYPE cshelp PUBLIC "-//IBM//DTD DITA CSHelp//EN"
+ "..\dtd\cshelp.dtd">
+
+
+<!--This DITA specialized document type is not supported by the Authoring Tools development team.
+For support please see:
+https://w3.opensource.ibm.com/projects/dita-cshelp/-->
+<cshelp id="kimhhost" xml:lang="fr-fr">
+<title>Hôte</title>
+<shortdesc>La page <wintitle>Hôte</wintitle> affiche des informations
+sur le système hôte et vous permet d'arrêter, de redémarrer et de vous
+connecter à l'hôte.</shortdesc>
+<csbody>
+<p>Vous pouvez effectuer les actions suivantes sur l'hôte :<ul>
+<li>Sélectionnez <uicontrol>Arrêter</uicontrol> pour arrêter le système hôte.</li>
+<li>Sélectionnez <uicontrol>Redémarrer</uicontrol> pour redémarrer le système hôte.</li>
+<li>Sélectionnez <uicontrol>Connexion</uicontrol> pour ouvrir une connexion VNC
+au système hôte, si celui-ci n'est pas déjà connecté.</li>
+</ul></p>
+<p>Cliquez sur les sections suivantes pour afficher des informations sur l'hôte :</p>
+<dl><dlentry>
+<dt>Informations de base</dt>
+<dd>Cette section affiche la distribution, la version et le nom de code
+du système d'exploitation hôte, ainsi que le type de processeur, le nombre d'UC en ligne et la quantité de mémoire en Go.</dd>
+</dlentry><dlentry>
+<dt>Statistiques système</dt>
+<dd>Cette section affiche les graphiques des statistiques pour l'UC, mémoire, ainsi que
+les E-S disque et E-S réseau pour l'hôte. </dd>
+</dlentry><dlentry>
+<dt>Mises à jour logicielles</dt>
+<dd>Cette section affiche des informations pour tous les modules qui
+disposent de mises à jour disponibles, y compris le nom de module, la version, l'architecture
+et le référentiel. Vous pouvez mettre à jour toutes les modules répertoriés en sélectionnant <uicontrol>Tout
+mettre à jour</uicontrol>. Vous ne pouvez pas sélectionner des modules individuels pour les mises à jour.</dd>
+</dlentry><dlentry>
+<dt>Référentiels</dt>
+<dd>Cette section affiche les référentiels associés au système hôte. Vous pouvez ajouter, activer, éditer ou retirer des référentiels. L'ajout d'un référentiel associe celui-ci au système hôte,
+tandis que l'activation d'un référentiel permet à l'hôte d'y accéder. Si votre système est Red Hat Enterprise Linux ou Fedora,
+vous pouvez ajouter des référentiels <filepath>yum</filepath>.
+Si votre système est de type Ubuntu ou Debian, ajoutez des référentiels
+<filepath>deb</filepath>.<p>Si vous travaillez avec des référentiels yum, vous pouvez ajouter un contrôle GPG
+afin de vérifier qu'un module provenant de ce référentiel n'a pas été endommagé.
+Sélectionnez un référentiel puis cliquez sur <uicontrol>Editer</uicontrol>. Sélectionnez <uicontrol>Oui</uicontrol> pour activer <uicontrol>Contrôle GPG</uicontrol>, puis entrez une URL pour le fichier de clés GPG du référentiel.</p></dd>
+</dlentry><dlentry>
+<dt>Rapports de débogage</dt>
+<dd>Cette section affiche les rapports de débogage, y compris le nom et le chemin du fichier.
+Vous pouvez faire un choix parmi les options afin de générer un nouveau rapport, ou renommer, supprimer,
+ou télécharger un rapport existant.<p>Le rapport de débogage est généré à
+l'aide de la commande <cmdname>sosreport</cmdname>. Cette option est disponible pour les distributions
+Red Hat Enterprise <tm tmtype="tm" trademark="Linux">Linux</tm>, Fedora et Ubuntu. La commande génère un fichier .tar contenant la configuration et des informations de diagnostic,
+telles que la version du noyau d'exécution, les modules chargés, ainsi que les fichiers de configuration
+du système et de la maintenance.
+La commande exécute également des programmes externes pour collecter des informations
+supplémentaires et stocke cette sortie dans l'archive résultante.</p> </dd>
+</dlentry></dl>
+</csbody>
+<?tm 1392659967 1?>
+</cshelp>
+
+
+<!-- ENGL1SH_VERS10N 42248_4 DO NOT REMOVE OR CHANGE THIS LINE -->
+<!-- T9N_SRC_ID 232 -->
+<!-- T9N_SH1P_STR1NG KV310AAP001 1 -->
diff --git a/src/wok/plugins/gingerbase/ui/pages/help/gingerbase.css b/src/wok/plugins/gingerbase/ui/pages/help/gingerbase.css
new file mode 100644
index 0000000..88b23bf
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/pages/help/gingerbase.css
@@ -0,0 +1,208 @@
+/*
+ * Project Ginger Base
+ *
+ * Copyright IBM, Corp. 2015
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+BODY {
+ background: #FFFFFF;
+ margin-bottom: 1em;
+ margin-left: .5em;
+}
+
+bold {
+ font-weight: bold;
+}
+
+boldItalic {
+ font-weight: bold;
+ font-style: italic;
+}
+
+italic {
+ font-style: italic;
+}
+
+underlined {
+ text-decoration: underline;
+}
+
+uicontrol {
+ font-weight: bold;
+}
+
+filepath {
+ font-family: monospace, monospace;
+}.option {
+ font-family: monospace, monospace;
+}
+
+cmdname {
+ font-weight: bold;
+ font-family: monospace, monospace;
+}
+
+.defparmname {
+ font-weight: bold;
+ text-decoration: underline;
+ font-family: monospace, monospace;
+}
+
+.kwd {
+ font-weight: bold;
+}
+
+.defkwd {
+ font-weight: bold;
+ text-decoration: underline;
+}
+
+var {
+ font-style : italic;
+}
+
+strongwintitle {
+ font-weight : bold;
+}
+
+parmname {
+ font-weight: bold;
+ font-family: monospace, monospace;
+ white-space: nowrap;
+}
+
+code {
+ font-family: monospace, monospace;
+}
+
+pre {
+ font-family: monospace, monospace;
+}
+
+CITE {
+ font-style: italic;
+}
+
+EM {
+ font-style: italic;
+}
+
+STRONG {
+ font-weight: bold;
+}
+
+VAR {
+ font-style: italic;
+}
+
+dt {
+ font-weight: bold;
+}
+
+/***********************************************************
+ * Basic fonts
+ ***********************************************************/
+body,
+td,
+th,
+caption {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 10pt;
+}
+
+pre, code {
+ font-family: MS Courier New, Courier, monospace;
+}
+
+h1, h2, h3 {
+ font-size: 12pt;
+ font-weight: bold;
+ color: #336699;
+}
+
+h4 {
+ font-size: 10pt;
+ font-weight: bold;
+ color: #336699;
+}
+
+/***********************************************************
+ * Basic indents, padding, and margin
+ ***********************************************************/
+body {
+ color: black;
+ background-color: white;
+ margin: 0;
+ padding-top: 0.2em;
+ padding-left: 0.6em;
+ padding-right: 0.2em;
+ padding-bottom: 1em;
+}
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+ padding: 0;
+ margin-top: 1em;
+ margin-bottom: 0.75em;
+ margin-left: 0;
+ margin-right: 0;
+}
+
+address,
+dl,
+li,
+p {
+ padding: 0;
+ margin-top: 0.75em;
+ margin-bottom: 0.75em;
+ margin-left: 0;
+ margin-right: 0;
+ line-height: 125%;
+}
+
+td dl {
+ margin-left: 2em;
+}
+
+pre {
+ padding: 0;
+ margin-top: 0.75em;
+ margin-bottom: 0.75em;
+ margin-left: 2em;
+ margin-right: 0;
+}
+
+ol,
+ul {
+ padding: 0;
+ margin-top: 0.75em;
+ margin-bottom: 0.75em;
+ margin-left: 2.00em;
+ margin-right: 0;
+}
+
+dd {
+ margin-left: 3.00em;
+ margin-top: 0.75em;
+ margin-bottom: 0.75em;
+}
+
+dt {
+ margin-left: 1.00em;
+ margin-top: 0.75em;
+}
diff --git a/src/wok/plugins/gingerbase/ui/pages/help/it_IT/Makefile.am b/src/wok/plugins/gingerbase/ui/pages/help/it_IT/Makefile.am
new file mode 100644
index 0000000..3eaa7b8
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/pages/help/it_IT/Makefile.am
@@ -0,0 +1,26 @@
+#
+# Ginger Base
+#
+# Copyright IBM Corp, 2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+it_IT_helpdir = $(datadir)/wok/plugins/gingerbase/ui/pages/help/it_IT
+
+dist_it_IT_help_DATA = $(wildcard *.html) $(NULL)
+
+EXTRA_DIST = $(wildcard *.dita)
+
+CLEANFILES = $(wildcard *.html)
diff --git a/src/wok/plugins/gingerbase/ui/pages/help/it_IT/host.dita b/src/wok/plugins/gingerbase/ui/pages/help/it_IT/host.dita
new file mode 100644
index 0000000..c2783bf
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/pages/help/it_IT/host.dita
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--Arbortext, Inc., 1988-2011, v.4002-->
+<!DOCTYPE cshelp PUBLIC "-//IBM//DTD DITA CSHelp//EN"
+ "..\dtd\cshelp.dtd">
+
+
+<!--This DITA specialized document type is not supported by the Authoring Tools development team.
+For support please see:
+https://w3.opensource.ibm.com/projects/dita-cshelp/-->
+<cshelp id="kimhhost" xml:lang="it-it">
+<title>Host</title>
+<shortdesc>La pagina <wintitle>Host</wintitle> visualizza le informazioni sul sistema host e consente di arrestarlo, riavviarlo e connettersi ad esso.</shortdesc>
+<csbody>
+<p>È possibile effettuare le seguenti operazioni sull'host:<ul>
+<li>Selezionare <uicontrol>Arresta</uicontrol> per arrestare il sistema host.</li>
+<li>Selezionare <uicontrol>Riavvia</uicontrol> per riavviare il sistema host.</li>
+<li>Selezionare <uicontrol>Connetti</uicontrol> per aprire una connessione VNC al sistema host, se non è già connesso.</li>
+</ul></p>
+<p>Fare clic sulle seguenti sezioni per visualizzare le informazioni sull'host:</p>
+<dl><dlentry>
+<dt>Informazioni di base</dt>
+<dd>Questa sezione visualizza il nome codice, la versione e la distribuzione del sistema operativo, come pure il tipo di processore, il numero di CPU in linea e la quantità di memoria in GB.</dd>
+</dlentry><dlentry>
+<dt>Statistiche di sistema</dt>
+<dd>Questa sezione visualizza i grafici che mostrano le statistiche per la CPU, la memoria, l'I/O disco e di rete per l'host. </dd>
+</dlentry><dlentry>
+<dt>Aggiornamenti del software</dt>
+<dd>Questa sezione visualizza le informazioni per tutti i pacchetti per cui sono disponibili gli aggiornamenti, incluso il nome, la versione, l'architettura e il repository del pacchetto. È possibile aggiornare tutti i pacchetti elencati, selezionando <uicontrol>Aggiorna tutto</uicontrol>. Non è possibile selezionare singoli pacchetti per gli aggiornamenti.</dd>
+</dlentry><dlentry>
+<dt>Repository</dt>
+<dd>Questa sezione visualizza i repository associati al sistema host. È possibile aggiungere, abilitare, modificare o rimuovere i repository. L'aggiunta di un repository lo associa al sistema host, mentre l'abilitazione di un repository
+consente all'host di accedervi. Se il sistema è Red Hat Enterprise
+Linux o Fedora, è possibile aggiungere i repository <filepath>yum</filepath>.
+Se il sistema è Ubuntu o Debian, aggiungere i repository <filepath>deb</filepath>.<p>Se si stanno utilizzando i repository yum, è possibile aggiungere un controllo GPG per verificare che un pacchetto da questo repository non sia stato corrotto.
+Selezionare un repository, quindi <uicontrol>Modifica</uicontrol>. Selezionare <uicontrol>Sì</uicontrol> per abilitare il <uicontrol>controllo GPG</uicontrol>, quindi immettere un URL al file di chiavi GPG per il
+repository.</p></dd>
+</dlentry><dlentry>
+<dt>Report di debug</dt>
+<dd>Questa sezione visualizza i report di debug, incluso il nome e il percorso file.
+Le opzioni disponibili consentono di generare un nuovo report oppure ridenominare, rimuovere o scaricare un report esistente.<p>Il report di debug viene generato utilizzando il comando <cmdname>sosreport</cmdname>. È disponibile per le distribuzioni Red
+Hat Enterprise <tm tmtype="tm" trademark="Linux">Linux</tm>, Fedora e Ubuntu. Il comando genera un file .tar che contiene informazioni di diagnostica e configurazione, come la versione del kernel in esecuzione, i moduli caricati e i file di configurazione del servizio e del sistema.
+Il comando esegue anche programmi esterni per raccogliere ulteriori informazioni e memorizza l'output nell'archivio risultante.</p> </dd>
+</dlentry></dl>
+</csbody>
+<?tm 1392659967 1?>
+</cshelp>
+
+
+<!-- ENGL1SH_VERS10N 42248_4 DO NOT REMOVE OR CHANGE THIS LINE -->
+<!-- T9N_SRC_ID 232 -->
+<!-- T9N_SH1P_STR1NG KV310AAP001 1 -->
diff --git a/src/wok/plugins/gingerbase/ui/pages/help/ja_JP/Makefile.am b/src/wok/plugins/gingerbase/ui/pages/help/ja_JP/Makefile.am
new file mode 100644
index 0000000..eef3ea8
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/pages/help/ja_JP/Makefile.am
@@ -0,0 +1,26 @@
+#
+# Ginger Base
+#
+# Copyright IBM Corp, 2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+ja_JP_helpdir = $(datadir)/wok/plugins/gingerbase/ui/pages/help/ja_JP
+
+dist_ja_JP_help_DATA = $(wildcard *.html) $(NULL)
+
+EXTRA_DIST = $(wildcard *.dita)
+
+CLEANFILES = $(wildcard *.html)
diff --git a/src/wok/plugins/gingerbase/ui/pages/help/ja_JP/host.dita b/src/wok/plugins/gingerbase/ui/pages/help/ja_JP/host.dita
new file mode 100644
index 0000000..2b9c765
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/pages/help/ja_JP/host.dita
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--Arbortext, Inc., 1988-2011, v.4002-->
+<!DOCTYPE cshelp PUBLIC "-//IBM//DTD DITA CSHelp//EN"
+ "..\dtd\cshelp.dtd">
+
+
+<!--This DITA specialized document type is not supported by the Authoring Tools development team.
+For support please see:
+https://w3.opensource.ibm.com/projects/dita-cshelp/-->
+<cshelp id="kimhhost" xml:lang="ja-jp">
+<title>ホスト</title>
+<shortdesc><wintitle>「ホスト」</wintitle>ページには、ホスト・システムに関する情報が表示されます。ここで、ホストをシャットダウン、再始動、またホストに接続することができます。
+</shortdesc>
+<csbody>
+<p>以下のアクションをホストに対して実行できます。
+<ul>
+<li>ホスト・システムをシャットダウンするには<uicontrol>「シャットダウン」</uicontrol>を選択します。
+</li>
+<li>ホスト・システムを再始動するには<uicontrol>「再始動」</uicontrol>を選択します。
+</li>
+<li>ホスト・システムへの VNC 接続を (まだ接続されていない場合に) オープンするには、<uicontrol>「接続」</uicontrol>を選択します。
+</li>
+</ul></p>
+<p>ホストに関する情報を表示するには、以下の選択項目をクリックしてください。
+</p>
+<dl><dlentry>
+<dt>基本情報</dt>
+<dd>このセクションには、ホスト・オペレーティング・システムのディストリビューション、バージョン、およびコード名、さらにプロセッサー・タイプ、オンライン CPU の数、およびメモリーの量 (GB 単位)が表示されます。
+</dd>
+</dlentry><dlentry>
+<dt>システム統計情報</dt>
+<dd>このセクションには、ホストの CPU、メモリー、ディスク入出力、およびネットワーク入出力の統計情報を表すグラフが表示されます。
+</dd>
+</dlentry><dlentry>
+<dt>ソフトウェア更新</dt>
+<dd>このセクションには、更新が用意されているパッケージすべての情報
+(パッケージ名、バージョン、アーキテクチャー、リポジトリーなど) が表示されます。
+<uicontrol>「すべて更新」</uicontrol>を選択すると、リストされているパッケージすべてを更新できます。
+更新する対象として個別のパッケージを選択することはできません。
+</dd>
+</dlentry><dlentry>
+<dt>リポジトリー</dt>
+<dd>このセクションには、ホスト・システムに関連付けられているリポジトリーが表示されます。
+リポジトリーを追加する、有効にする、編集する、または削除することができます。
+リポジトリーを追加すると、そのリポジトリーがホスト・システムに関連付けられ、リポジトリーを有効にすると、そのリポジトリーにホストがアクセスできるようになります。
+システムが Red Hat Enterprise Linux または Fedora であれば、<filepath>yum</filepath> リポジトリーを追加できます。
+システムが Ubuntu または Debian であれば、<filepath>deb</filepath> リポジトリーを追加してください。
+<p>yum リポジトリーを操作している場合、そのリポジトリーに入っているパッケージが壊れていないことを確認するため、GPG チェックを追加できます。
+リポジトリーを選択し、<uicontrol>「編集」</uicontrol>をクリックしてください。
+<uicontrol>「はい」</uicontrol>を選択して<uicontrol>「GPG チェック」</uicontrol>を有効にしてから、そのリポジトリーの GPG 鍵ファイルの URL を入力してください。
+</p></dd>
+</dlentry><dlentry>
+<dt>デバッグ・レポート</dt>
+<dd>このセクションには、デバッグ・レポート (名前やファイル・パスなど) が表示されます。
+新しいレポートを生成、既存のレポートを名前変更、削除、またはダウンロードするためのオプションを選択できます。
+<p>デバッグ・レポートは、<cmdname>sosreport</cmdname> コマンドで生成されます。
+これは、Red Hat Enterprise <tm tmtype="tm" trademark="Linux">Linux</tm>、Fedora、および Ubuntu ディストリビューションに用意されています。
+このコマンドは、構成および診断情報 (稼働中のカーネルのバージョン、ロードされているモジュール、システムおよびサービス構成ファイルなど) が入った .tar ファイルを生成します。
+このコマンドはまた、外部プログラムを実行して情報をさらに収集し、その出力を結果のアーカイブに保管します。
+</p> </dd>
+</dlentry></dl>
+</csbody>
+<?tm 1392659967 1?>
+</cshelp>
+
+
+<!-- ENGL1SH_VERS10N 42248_4 DO NOT REMOVE OR CHANGE THIS LINE -->
+<!-- T9N_SRC_ID 232 -->
+<!-- T9N_SH1P_STR1NG KV310AAP001 1 -->
diff --git a/src/wok/plugins/gingerbase/ui/pages/help/ko_KR/Makefile.am b/src/wok/plugins/gingerbase/ui/pages/help/ko_KR/Makefile.am
new file mode 100644
index 0000000..e25a747
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/pages/help/ko_KR/Makefile.am
@@ -0,0 +1,26 @@
+#
+# Ginger Base
+#
+# Copyright IBM Corp, 2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+ko_KR_helpdir = $(datadir)/wok/plugins/gingerbase/ui/pages/help/ko_KR
+
+dist_ko_KR_help_DATA = $(wildcard *.html) $(NULL)
+
+EXTRA_DIST = $(wildcard *.dita)
+
+CLEANFILES = $(wildcard *.html)
diff --git a/src/wok/plugins/gingerbase/ui/pages/help/ko_KR/host.dita b/src/wok/plugins/gingerbase/ui/pages/help/ko_KR/host.dita
new file mode 100644
index 0000000..220e166
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/pages/help/ko_KR/host.dita
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--Arbortext, Inc., 1988-2011, v.4002-->
+<!DOCTYPE cshelp PUBLIC "-//IBM//DTD DITA CSHelp//EN"
+ "..\dtd\cshelp.dtd">
+
+
+<!--This DITA specialized document type is not supported by the Authoring Tools development team.
+For support please see:
+https://w3.opensource.ibm.com/projects/dita-cshelp/-->
+<cshelp id="kimhhost" xml:lang="ko-kr">
+<title>호스트</title>
+<shortdesc><wintitle>호스트</wintitle> 페이지에는 호스트 시스템에 대한 정보가 표시되며 이 페이지를 사용하여 호스트를 종료 및 다시 시작하거나 호스트에 연결할 수 있습니다.</shortdesc>
+<csbody>
+<p>호스트에 대해 다음 조치를 수행할 수 있습니다.<ul>
+<li>호스트 시스템을 종료하려면 <uicontrol>시스템 종료</uicontrol>를 선택합니다.</li>
+<li>호스트 시스템을 다시 시작하려면 <uicontrol>다시 시작</uicontrol>을 선택합니다.</li>
+<li>이미 연결되어 있지 않은 경우, 호스트 시스템에 대한 VNC 연결을 시작하려면 <uicontrol>연결</uicontrol>을 선택합니다.</li>
+</ul></p>
+<p>호스트에 대한 정보를 표시하려면 다음 섹션을 클릭하십시오.</p>
+<dl><dlentry>
+<dt>기본 정보</dt>
+<dd>이 섹션에는 호스트 운영 체제 배포,
+버전, 코드 이름, 프로세서 유형, 온라인 CPU 수,
+메모리 용량(GB) 등이 표시됩니다.</dd>
+</dlentry><dlentry>
+<dt>시스템 통계</dt>
+<dd>이 섹션에는 호스트의 CPU, 메모리, 디스크 I/O, 네트워크 I/O에 대한 통계를 표시하는 그래프가 표시됩니다. </dd>
+</dlentry><dlentry>
+<dt>소프트웨어 업데이트</dt>
+<dd>이 섹션에는 패키지 이름, 버전, 아키텍처, 저장소를 비롯하여 사용 가능한 업데이트가 있는 모든 패키지에 대한 정보가 표시됩니다. <uicontrol>모두 업데이트</uicontrol>를 선택하여 나열된 모든 패키지를 업데이트할 수 있습니다. 업데이트에 대해 개별 패키지를 선택할 수는 없습니다.</dd>
+</dlentry><dlentry>
+<dt>저장소</dt>
+<dd>이 섹션에는 호스트 시스템과 연관된 저장소가 표시됩니다. 저장소를 추가하거나, 사용으로 설정하거나, 편집하거나, 제거할 수 있습니다. 저장소를 추가하면 저장소가 호스트 시스템과 연관되며, 저장소를 사용으로 설정하면 호스트가 저장소에 액세스할 수 있습니다. 해당 시스템이 Red Hat Enterprise Linux 또는 Fedora인 경우, <filepath>yum</filepath> 저장소를 추가할 수 있습니다.
+해당 시스템이 Ubuntu 또는 Debian인 경우, <filepath>deb</filepath> 저장소를 추가하십시오.<p>yum 저장소로 작업하는 경우, GPG 검사를 추가하여 이 저장소의 패키지가 손상되지 않았는지 확인할 수 있습니다.
+저장소를 선택한 후 <uicontrol>편집</uicontrol>을 선택하십시오. <uicontrol>예</uicontrol>를 선택하여
+<uicontrol>GPG 검사</uicontrol>를 사용으로 설정한 후
+저장소에 대한 GPG 키 파일의 URL을 입력하십시오.</p></dd>
+</dlentry><dlentry>
+<dt>디버그 보고서</dt>
+<dd>이 섹션에는 이름 및 파일 경로를 포함한 디버그 보고서가 표시됩니다.
+새 보고서 생성, 기존 보고서 이름 바꾸기, 제거, 다운로드 등의 옵션 중에서 선택할 수 있습니다.<p>디버그 보고서는 <cmdname>sosreport</cmdname> 명령을 사용하여 생성됩니다. 이는 Red Hat Enterprise <tm tmtype="tm" trademark="Linux">Linux</tm>, Fedora 및 Ubuntu 배포에서 사용 가능합니다. 이 명령은 구성 및 진단 정보(예: 실행 중인 커널 버전, 로드된 모듈, 시스템 및 서비스 구성 파일)를 포함하는 .tar 파일을 생성합니다.
+또한 이 명령은 외부 프로그램을 실행하여 추가 정보를 수집하고 결과 아카이브에 이 출력을 저장합니다.</p> </dd>
+</dlentry></dl>
+</csbody>
+<?tm 1392659967 1?>
+</cshelp>
+
+
+<!-- ENGL1SH_VERS10N 42248_4 DO NOT REMOVE OR CHANGE THIS LINE -->
+<!-- T9N_SRC_ID 232 -->
+<!-- T9N_SH1P_STR1NG KV310AAP001 1 -->
diff --git a/src/wok/plugins/gingerbase/ui/pages/help/pt_BR/Makefile.am b/src/wok/plugins/gingerbase/ui/pages/help/pt_BR/Makefile.am
new file mode 100644
index 0000000..afb77db
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/pages/help/pt_BR/Makefile.am
@@ -0,0 +1,26 @@
+#
+# Ginger Base
+#
+# Copyright IBM Corp, 2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+pt_BR_helpdir = $(datadir)/wok/plugins/gingerbase/ui/pages/help/pt_BR
+
+dist_pt_BR_help_DATA = $(wildcard *.html) $(NULL)
+
+EXTRA_DIST = $(wildcard *.dita)
+
+CLEANFILES = $(wildcard *.html)
diff --git a/src/wok/plugins/gingerbase/ui/pages/help/pt_BR/host.dita b/src/wok/plugins/gingerbase/ui/pages/help/pt_BR/host.dita
new file mode 100644
index 0000000..a9814e8
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/pages/help/pt_BR/host.dita
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--Arbortext, Inc., 1988-2011, v.4002-->
+<!DOCTYPE cshelp PUBLIC "-//IBM//DTD DITA CSHelp//EN"
+ "..\dtd\cshelp.dtd">
+
+
+<!--This DITA specialized document type is not supported by the Authoring Tools development team.
+For support please see:
+https://w3.opensource.ibm.com/projects/dita-cshelp/-->
+<cshelp id="kimhhost" xml:lang="pt-br">
+<title>Host</title>
+<shortdesc>A página <wintitle>Host</wintitle> mostra informações sobre
+o sistema host e permite encerrar, reiniciar e conectar
+ao host.</shortdesc>
+<csbody>
+<p>É possível executar as ações a segur no host:<ul>
+<li>Selecione <uicontrol>Encerrar</uicontrol> para encerrar o sistema
+host.</li>
+<li>Selecione <uicontrol>Reiniciar</uicontrol> para reiniciar o sistema host.</li>
+<li>Selecione <uicontrol>Conectar</uicontrol> para abrir uma conexão VNC
+para o sistema host, se ele já não estiver conectado.</li>
+</ul></p>
+<p>Clique nas seções a seguir para exibir informações sobre o host:</p>
+<dl><dlentry>
+<dt>Informações básicas</dt>
+<dd>Esta seção exibe a distribuição do sistema operacional do host,
+a versão e o nome do código, bem como o tipo de processador, o número de CPUs on-line e a quantia de
+memória em GB.</dd>
+</dlentry><dlentry>
+<dt>Estatísticas do sistema</dt>
+<dd>Esta seção exibe gráficos para mostrar estatísticas para CPU, memória,
+E/S de disco e E/S de rede para o host. </dd>
+</dlentry><dlentry>
+<dt>Atualizações de software</dt>
+<dd>Esta seção exibe informações de todos os pacotes que
+possuem atualizações disponíveis, incluindo nome do pacote, versão, arquitetura
+e repositório. É possível atualizar todos os pacotes listados selecionando <uicontrol>Atualizar
+todos</uicontrol>. Não é possível selecionar pacotes individuais para atualizações.</dd>
+</dlentry><dlentry>
+<dt>Repositórios</dt>
+<dd>Esta seção exibe repositórios que estão associados ao
+sistema host. É possível incluir, ativar, editar ou remover repositórios. Incluir
+um repositório o associa com o sistema host enquanto ativar um repositório
+permite que o host o acesse. Se o seu sistema for Red Hat Enterprise
+Linux ou Fedora, será possível incluir repositórios <filepath>yum</filepath>.
+Se o seu sistema for Ubuntu ou Debian, inclua repositórios <filepath>deb</filepath>.<p>Se
+você estiver trabalhando com repositórios yum, será possível incluir uma verificação de GPG para
+verificar se um pacote desse repositório não foi corrompido.
+Selecione um repositório e, em seguida, <uicontrol>Editar</uicontrol>. Selecione <uicontrol>Sim</uicontrol> para
+ativar a <uicontrol>Verificação de GPG</uicontrol> e, então, insira uma URL no arquivo-chave de GPG para o
+repositório.</p></dd>
+</dlentry><dlentry>
+<dt>Relatórios de depuração</dt>
+<dd>Esta seção exibe relatórios de depuração, incluindo nome e caminho do arquivo.
+É possível selecionar a partir das opções para gerar um novo relatório ou renomear, remover
+ou fazer o download de um relatório existente.<p>O relatório de depuração é gerado usando
+o comando <cmdname>sosreport</cmdname>. Ele está disponível para distribuições
+Red Hat Enterprise <tm tmtype="tm" trademark="Linux">Linux</tm>, Fedora
+e Ubuntu. O comando gera um arquivo .tar que contém
+informações de configuração e de diagnóstico, como versão do kernel
+em execução, módulos carregados e arquivos de configuração de sistema e de serviço.
+O comando também executa programas externos para coletar informações adicionais
+e armazena essa saída no archive resultante.</p> </dd>
+</dlentry></dl>
+</csbody>
+<?tm 1392659967 1?>
+</cshelp>
+
+
+<!-- ENGL1SH_VERS10N 42248_4 DO NOT REMOVE OR CHANGE THIS LINE -->
+<!-- T9N_SRC_ID 232 -->
+<!-- T9N_SH1P_STR1NG KV310AAP001 1 -->
diff --git a/src/wok/plugins/gingerbase/ui/pages/help/ru_RU/Makefile.am b/src/wok/plugins/gingerbase/ui/pages/help/ru_RU/Makefile.am
new file mode 100644
index 0000000..7f1bc1c
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/pages/help/ru_RU/Makefile.am
@@ -0,0 +1,26 @@
+#
+# Ginger Base
+#
+# Copyright IBM Corp, 2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+ru_RU_helpdir = $(datadir)/wok/plugins/gingerbase/ui/pages/help/ru_RU
+
+dist_ru_RU_help_DATA = $(wildcard *.html) $(NULL)
+
+EXTRA_DIST = $(wildcard *.dita)
+
+CLEANFILES = $(wildcard *.html)
diff --git a/src/wok/plugins/gingerbase/ui/pages/help/ru_RU/host.dita b/src/wok/plugins/gingerbase/ui/pages/help/ru_RU/host.dita
new file mode 100644
index 0000000..54a78f5
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/pages/help/ru_RU/host.dita
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--Arbortext, Inc., 1988-2011, v.4002-->
+<!DOCTYPE cshelp PUBLIC "-//IBM//DTD DITA CSHelp//EN"
+ "..\dtd\cshelp.dtd">
+
+
+<!--This DITA specialized document type is not supported by the Authoring Tools development team.
+For support please see:
+https://w3.opensource.ibm.com/projects/dita-cshelp/-->
+<cshelp id="kimhhost" xml:lang="ru-ru">
+<title>Хост</title>
+<shortdesc>Страница <wintitle>Хост</wintitle> показывает информацию о системе хоста и позволяет останавливать хост, перезапускать хост и подключаться к нему.</shortdesc>
+<csbody>
+<p>На хосте можно выполнять следующие действия:<ul>
+<li><uicontrol>Завершить работу</uicontrol> - остановить систему хоста.</li>
+<li><uicontrol>Перезапустить</uicontrol> - перезапустить систему хоста.</li>
+<li><uicontrol>Подключиться</uicontrol> - открыть соединение VNC с системой хоста, если оно еще не установлено.</li>
+</ul></p>
+<p>Щелкните на следующих разделах для просмотра информации о хосте:</p>
+<dl><dlentry>
+<dt>Базовая информация</dt>
+<dd>В этом разделе показывается вариант операционной системы, его версия и кодовое имя, а также тип процессора, число подключенных процессоров и объем памяти в ГБ.</dd>
+</dlentry><dlentry>
+<dt>Системная статистика</dt>
+<dd>В этом разделе показываются графики, отражающие статистическую информацию о процессоре, памяти, дисковом вводе-выводе и сетевом вводе-выводе для хоста. </dd>
+</dlentry><dlentry>
+<dt>Обновления программного обеспечения</dt>
+<dd>В этом разделе показывается информация обо всех пакетах, для которых доступны обновления, включая имя пакета, версию, архитектуру и хранилище. Можно обновить все пакеты в списке щелчком на <uicontrol>Обновить все</uicontrol>. Отдельные пакеты для обновления выбрать нельзя.</dd>
+</dlentry><dlentry>
+<dt>Хранилища</dt>
+<dd>В этом разделе показываются хранилища, связанные с системой хоста. Хранилища можно добавлять, активировать, изменять и удалять. При добавлении хранилище связывается с системой хоста, при активации хранилище становится доступным для хоста. Если система - Red Hat Enterprise Linux или Fedora, можно добавить хранилища <filepath>yum</filepath>.
+Если система - Ubuntu или Debian, добавьте хранилища <filepath>deb</filepath>.<p>При работе с хранилищами yum можно добавить проверку GPG для проверки целостности пакетов из данного хранилища.
+Выберите хранилище и щелкните на <uicontrol>Изменить</uicontrol>. Выберите <uicontrol>Да</uicontrol>, чтобы включить <uicontrol>Проверку GPG</uicontrol>, и введите URL файла ключей GPG для хранилища.</p></dd>
+</dlentry><dlentry>
+<dt>Отладочные отчеты</dt>
+<dd>В этом разделе показываются отладочные отчеты, включая имя и путь.
+Доступны команды для создания, переименования, удаления и загрузки отчетов.<p>Отладочный отчет создается командой <cmdname>sosreport</cmdname>. Он доступен для Red
+Hat Enterprise <tm tmtype="tm" trademark="Linux">Linux</tm>, Fedora и Ubuntu. Команда создает файл .tar с конфигурационной и диагностической информацией, такой как версия ядра, загруженные модули и файлы конфигурации системы и служб.
+Команда также выполняет внешние программы для сбора дополнительной информации и сохраняет их вывод в результирующем архиве.</p> </dd>
+</dlentry></dl>
+</csbody>
+<?tm 1392659967 1?>
+</cshelp>
+
+
+<!-- ENGL1SH_VERS10N 42248_4 DO NOT REMOVE OR CHANGE THIS LINE -->
+<!-- T9N_SRC_ID 232 -->
+<!-- T9N_SH1P_STR1NG KV310AAP001 1 -->
diff --git a/src/wok/plugins/gingerbase/ui/pages/help/zh_CN/Makefile.am b/src/wok/plugins/gingerbase/ui/pages/help/zh_CN/Makefile.am
new file mode 100644
index 0000000..9cb5a0c
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/pages/help/zh_CN/Makefile.am
@@ -0,0 +1,26 @@
+#
+# Ginger Base
+#
+# Copyright IBM Corp, 2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+zh_CN_helpdir = $(datadir)/wok/plugins/gingerbase/ui/pages/help/zh_CN
+
+dist_zh_CN_help_DATA = $(wildcard *.html) $(NULL)
+
+EXTRA_DIST = $(wildcard *.dita)
+
+CLEANFILES = $(wildcard *.html)
diff --git a/src/wok/plugins/gingerbase/ui/pages/help/zh_CN/host.dita b/src/wok/plugins/gingerbase/ui/pages/help/zh_CN/host.dita
new file mode 100644
index 0000000..a8622a2
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/pages/help/zh_CN/host.dita
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--Arbortext, Inc., 1988-2011, v.4002-->
+<!DOCTYPE cshelp PUBLIC "-//IBM//DTD DITA CSHelp//EN"
+ "..\dtd\cshelp.dtd">
+
+
+<!--This DITA specialized document type is not supported by the Authoring Tools development team.
+For support please see:
+https://w3.opensource.ibm.com/projects/dita-cshelp/-->
+<cshelp id="kimhhost" xml:lang="zh-cn">
+<title>主机</title>
+<shortdesc>“<wintitle>主机</wintitle>”页面显示有关主机系统的信息,并且允许您对主机进行关闭、启动和连接。</shortdesc>
+<csbody>
+<p>可对主机执行以下操作:<ul>
+<li>选择<uicontrol>关闭</uicontrol>以关闭主机系统。</li>
+<li>选择<uicontrol>重新启动</uicontrol>以重新启动主机系统。</li>
+<li>选择<uicontrol>连接</uicontrol>以打开与主机系统的 VNC 连接(如果尚未连接)。</li>
+</ul></p>
+<p>单击以下部分以显示有关主机的信息:</p>
+<dl><dlentry>
+<dt>基本信息</dt>
+<dd>本部分显示主机操作系统分发版、版本和代码名称以及处理器类型、联机 CPU 的数目和内存量(以 GB 计)。</dd>
+</dlentry><dlentry>
+<dt>系统统计信息</dt>
+<dd>本部分显示图形,以显示主机有关 CPU、内存、磁盘 I/O 和网络 I/O 的统计信息。</dd>
+</dlentry><dlentry>
+<dt>软件更新</dt>
+<dd>本部分显示有更新可用的所有软件包的信息,其中包括软件包名称、版本、体系结构和存储库。可通过选择<uicontrol>全部更新</uicontrol>来更新所列示的所有软件包。不能针对更新选择各个软件包。</dd>
+</dlentry><dlentry>
+<dt>存储库</dt>
+<dd>本部分显示与主机系统关联的存储库。您可以添加、启用、编辑或除去存储库。当启用存储库会允许主机对其进行访问时,添加存储库会将其与主机系统关联。如果您的系统为 Red Hat Enterprise Linux 或 Fedora,那么可添加 <filepath>yum</filepath> 存储库。如果您的系统为 Ubuntu 或 Debian,那么请添加 <filepath>deb</filepath> 存储库。<p>如果要处理 Yum 存储库,您可以添加 GPG 检查以验证此存储库中的软件包是否已损坏。选择一个存储库,然后选择<uicontrol>编辑</uicontrol>。选择<uicontrol>是</uicontrol>以启用 <uicontrol>GPG 检查</uicontrol>,然后输入存储库的 GPG 密钥文件的 URL。</p></dd>
+</dlentry><dlentry>
+<dt>调试报告</dt>
+<dd>本部分显示调试报告,其中包括名称和文件路径。您可以从选项中进行选择以生成新报告,或者对现有报告进行重命名、除去或下载。<p>调试报告将使用
+<cmdname>sosreport</cmdname> 命令生成。该报告可用于 Red
+Hat Enterprise <tm tmtype="tm" trademark="Linux">Linux</tm>、Fedora 和 Ubuntu 分发版。该命令将生成包含配置和诊断信息的 .tar 文件,例如,正在运行的内核版本、已装入的模块以及系统和服务配置文件。该命令还会运行外部程序以收集更多信息并将此输出存储在生成的归档中。</p> </dd>
+</dlentry></dl>
+</csbody>
+<?tm 1392659967 1?>
+</cshelp>
+
+
+<!-- ENGL1SH_VERS10N 42248_4 DO NOT REMOVE OR CHANGE THIS LINE -->
+<!-- T9N_SRC_ID 232 -->
+<!-- T9N_SH1P_STR1NG KV310AAP001 1 -->
diff --git a/src/wok/plugins/gingerbase/ui/pages/help/zh_TW/Makefile.am b/src/wok/plugins/gingerbase/ui/pages/help/zh_TW/Makefile.am
new file mode 100644
index 0000000..e27b90b
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/pages/help/zh_TW/Makefile.am
@@ -0,0 +1,26 @@
+#
+# Ginger Base
+#
+# Copyright IBM Corp, 2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+zh_TW_helpdir = $(datadir)/wok/plugins/gingerbase/ui/pages/help/zh_TW
+
+dist_zh_TW_help_DATA = $(wildcard *.html) $(NULL)
+
+EXTRA_DIST = $(wildcard *.dita)
+
+CLEANFILES = $(wildcard *.html)
diff --git a/src/wok/plugins/gingerbase/ui/pages/help/zh_TW/host.dita b/src/wok/plugins/gingerbase/ui/pages/help/zh_TW/host.dita
new file mode 100644
index 0000000..550945e
--- /dev/null
+++ b/src/wok/plugins/gingerbase/ui/pages/help/zh_TW/host.dita
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--Arbortext, Inc., 1988-2011, v.4002-->
+<!DOCTYPE cshelp PUBLIC "-//IBM//DTD DITA CSHelp//EN"
+ "..\dtd\cshelp.dtd">
+
+
+<!--This DITA specialized document type is not supported by the Authoring Tools development team.
+For support please see:
+https://w3.opensource.ibm.com/projects/dita-cshelp/-->
+<cshelp id="kimhhost" xml:lang="zh-tw">
+<title>主機</title>
+<shortdesc>「<wintitle>主機</wintitle>」頁面會顯示主機系統的相關資訊,並容許您關閉、重新啟動以及連接到主機。</shortdesc>
+<csbody>
+<p>您可以針對主機執行下列動作:<ul>
+<li>選取<uicontrol>關閉</uicontrol>以關閉主機系統。</li>
+<li>選取<uicontrol>重新啟動</uicontrol>以重新啟動主機系統。</li>
+<li>選取<uicontrol>連接</uicontrol>以開啟與主機系統的 VNC 連線(如果尚未連線到主機系統)。</li>
+</ul></p>
+<p>按一下下列區段以顯示主機的相關資訊:</p>
+<dl><dlentry>
+<dt>基本資訊</dt>
+<dd>此區段會顯示主機作業系統發行套件、版本、程式碼名稱以及處理器類型、線上 CPU 數目和記憶體數量 (GB)。</dd>
+</dlentry><dlentry>
+<dt>系統統計資料</dt>
+<dd>此區段會顯示一些圖形,以顯示主機的 CPU、記憶體、磁碟 I/O 和網路 I/O 的統計資料。</dd>
+</dlentry><dlentry>
+<dt>軟體更新</dt>
+<dd>此區段會顯示具有可用更新的所有套件的相關資訊,包括套件名稱、版本、架構和儲存庫。您可以透過選取<uicontrol>全部更新</uicontrol>來更新所有列出的套件。不能選取個別套件以進行更新。</dd>
+</dlentry><dlentry>
+<dt>儲存庫</dt>
+<dd>此區段會顯示與主機系統相關聯的儲存庫。您可以新增、啟用、編輯或移除儲存庫。新增儲存庫可使它與主機系統相關聯,而啟用儲存庫則容許主機存取儲存庫。如果您的系統是
+Red Hat Enterprise Linux 或 Fedora,則可以新增 <filepath>yum</filepath> 儲存庫。如果您的系統是
+Ubuntu 或 Debian,則可以新增 <filepath>deb</filepath> 儲存庫。<p>如果您正在使用
+yum 儲存庫,則可以新增 GPG 檢查以驗證此儲存庫中的某個套件是否未毀損。選取儲存庫,然後選取<uicontrol>編輯</uicontrol>。選取<uicontrol>是</uicontrol>以啟用 <uicontrol>GPG 檢查</uicontrol>,然後輸入儲存庫的 GPG 金鑰檔的 URL。</p></dd>
+</dlentry><dlentry>
+<dt>除錯報告</dt>
+<dd>此區段顯示除錯報告,包括名稱和檔案路徑。您可以選取選項以產生新報告、或是重新命名、移除或下載現有報告。<p>除錯報告是使用
+<cmdname>sosreport</cmdname> 指令產生的。該指令可用於 Red
+Hat Enterprise <tm tmtype="tm" trademark="Linux">Linux</tm>、Fedora
+及 Ubuntu 發行套件。該指令會產生 .tar 檔案,其包含配置與診斷資訊,例如執行中的核心版本、已載入模組以及系統和服務配置檔案。該指令還會執行外部程式來收集更多資訊並將此輸出儲存在產生的保存檔中。</p> </dd>
+</dlentry></dl>
+</csbody>
+<?tm 1392659967 1?>
+</cshelp>
+
+
+<!-- ENGL1SH_VERS10N 42248_4 DO NOT REMOVE OR CHANGE THIS LINE -->
+<!-- T9N_SRC_ID 232 -->
+<!-- T9N_SH1P_STR1NG KV310AAP001 1 -->
diff --git a/src/wok/plugins/kimchi/ui/pages/help/de_DE/host.dita b/src/wok/plugins/kimchi/ui/pages/help/de_DE/host.dita
deleted file mode 100644
index 9f676df..0000000
--- a/src/wok/plugins/kimchi/ui/pages/help/de_DE/host.dita
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--Arbortext, Inc., 1988-2011, v.4002-->
-<!DOCTYPE cshelp PUBLIC "-//IBM//DTD DITA CSHelp//EN"
- "..\dtd\cshelp.dtd">
-
-
-<!--This DITA specialized document type is not supported by the Authoring Tools development team.
-For support please see:
-https://w3.opensource.ibm.com/projects/dita-cshelp/-->
-<cshelp id="kimhhost" xml:lang="de-de">
-<title>Host</title>
-<shortdesc>Die Seite <wintitle>Host</wintitle> zeigt Informationen zum Hostsystem an und ermöglicht Ihnen, den Host herunterzufahren, erneut zu starten und eine Verbindung zu ihm herzustellen.</shortdesc>
-<csbody>
-<p>Sie können die folgenden Aktionen am Host durchführen:<ul>
-<li>Wählen Sie <uicontrol>Herunterfahren</uicontrol> aus, um das Hostsystem herunterzufahren.</li>
-<li>Wählen Sie <uicontrol>Erneut starten</uicontrol> aus, um das Hostsystem erneut zu starten.</li>
-<li>Wählen Sie <uicontrol>Verbinden</uicontrol> aus, um eine VNC-Verbindung zum Hostsystem herzustellen, wenn noch keine Verbindung besteht.</li>
-</ul></p>
-<p>Klicken Sie auf die folgenden Abschnitte, um Informationen zum Host anzuzeigen:</p>
-<dl><dlentry>
-<dt>Basisinformationen</dt>
-<dd>Dieser Abschnitt zeigt die Verteilung, die Version und den Codenamen des Hostbetriebssystems sowie den Prozessortyp, die Anzahl der Online-CPUs und die Speicherkapazität in GB an. </dd>
-</dlentry><dlentry>
-<dt>Systemstatistik</dt>
-<dd>Dieser Abschnitt zeigt mithilfe von Grafiken Statistiken für CPU, Speicher, Platten-E/A und Netz-E/A für den Host an. </dd>
-</dlentry><dlentry>
-<dt>Software-Updates</dt>
-<dd>Dieser Abschnitt zeigt Informationen für alle Pakete an, bei denen Aktualisierungen verfügbar sind, einschließlich Paketname, Version, Architektur und Repository. Sie können alle aufgelisteten Pakete aktualisieren, indem Sie <uicontrol>Alle aktualisieren</uicontrol> auswählen. Sie können nicht einzelne Pakete zur Aktualisierung auswählen.</dd>
-</dlentry><dlentry>
-<dt>Repositorys</dt>
-<dd>Dieser Abschnitt zeigt Repositorys an, die dem Hostsystem zugeordnet sind. Sie können Repositorys hinzufügen, aktivieren, bearbeiten oder entfernen. Beim Hinzufügen wird ein Repository dem Hostsystem zugeordnet. Das Aktivieren eines Repositorys dagegen ermöglicht dem Host den Zugriff auf das Repository. Wenn Ihr System Red Hat Enterprise
-Linux oder Fedora ist, können Sie <filepath>yum</filepath>-Repositorys hinzufügen.
-Wenn Ihr System Ubuntu oder Debian ist, fügen Sie <filepath>deb</filepath>-Repositorys hinzu.<p>Wenn Sie mit yum-Repositorys arbeiten, können Sie eine GPG-Prüfung hinzufügen, um sicherzustellen, dass ein Paket aus diesem Repository nicht beschädigt wurde.
-Wählen Sie ein Repository und dann <uicontrol>Bearbeiten</uicontrol> aus. Wählen Sie <uicontrol>Ja</uicontrol> aus, um <uicontrol>GPG-Prüfung</uicontrol> zu aktivieren, und geben Sie dann eine URL zur GPG-Schlüsseldatei für das Repository ein. </p></dd>
-</dlentry><dlentry>
-<dt>Debugberichte</dt>
-<dd>Dieser Abschnitt zeigt Debugberichte, einschließlich Name und Dateipfad, an.
-Sie haben die Möglichkeit, einen neuen Bericht zu erstellen oder einen bestehenden Bericht umzubenennen, zu entfernen oder herunterzuladen.<p>Der Debugbericht wird während des Befehls <cmdname>sosreport</cmdname> generiert. Er ist verfügbar für Red Hat Enterprise <tm tmtype="tm" trademark="Linux">Linux</tm>-, Fedora-
-und Ubuntu-Verteilungen. Der Befehl generiert eine .tar-Datei, die Konfigurations- und Diagnoseinformationen enthält, wie zum Beispiel Kernelversion, geladene Module sowie System- und Servicekonfigurationdateien.
-Der Befehl führt zudem externe Programme aus, um weitere Informationen zu sammeln, und speichert diese Ausgabe im resultierenden Archiv.</p> </dd>
-</dlentry></dl>
-</csbody>
-<?tm 1392659967 1?>
-</cshelp>
-
-
-<!-- ENGL1SH_VERS10N 42248_4 DO NOT REMOVE OR CHANGE THIS LINE -->
-<!-- T9N_SRC_ID 232 -->
-<!-- T9N_SH1P_STR1NG KV310AAP001 1 -->
diff --git a/src/wok/plugins/kimchi/ui/pages/help/en_US/host.dita b/src/wok/plugins/kimchi/ui/pages/help/en_US/host.dita
deleted file mode 100644
index 4af3498..0000000
--- a/src/wok/plugins/kimchi/ui/pages/help/en_US/host.dita
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--Arbortext, Inc., 1988-2011, v.4002-->
-<!DOCTYPE cshelp PUBLIC "-//IBM//DTD DITA CSHelp//EN"
- "..\dtd\cshelp.dtd">
-<?Pub Sty _display FontColor="red"?>
-<?Pub Inc?>
-<!--This DITA specialized document type is not supported by the Authoring Tools development team.
-For support please see:
-https://w3.opensource.ibm.com/projects/dita-cshelp/-->
-<cshelp id="kimhhost" xml:lang="en-us">
-<title>Host</title>
-<shortdesc>The <wintitle>Host</wintitle> page shows information about
-the host system, and allows you to shut down, restart, and connect
-to the host.</shortdesc>
-<csbody>
-<p>You can perform the following actions on the host:<ul>
-<li>Select <uicontrol>Shut down</uicontrol> to shut down the host
-system.</li>
-<li>Select <uicontrol>Restart</uicontrol> to restart the host system.</li>
-<li>Select <uicontrol>Connect</uicontrol> to open a VNC connection
-to the host system, if it is not already connected.</li>
-</ul></p>
-<p>Click the following sections to display information about the host:</p>
-<dl><dlentry>
-<dt>Basic information</dt>
-<dd>This section displays the host operating system distribution,
-version, and code name, as well as the processor type, the number
-of online CPUs and amount of memory in GB.</dd>
-</dlentry><dlentry>
-<dt>System statistics</dt>
-<dd>This section displays graphs to show statistics for CPU, memory,
-disk I/O, and network I/O for the host. </dd>
-</dlentry><dlentry>
-<dt>Software Updates</dt>
-<dd>This section displays information for all of the packages that
-have updates available, including package name, version, architecture,
-and repository. You can update all of the packages listed by selecting <uicontrol>Update
-All</uicontrol>. You cannot select individual packages for updates.</dd>
-</dlentry><dlentry>
-<dt>Repositories</dt>
-<dd>This section displays repositories that are associated with the
-host system. You can add, enable, edit, or remove repositories. Adding
-a repository associates it with the host system while enabling a repository
-allows the host to access it. If your system is Red Hat Enterprise
-Linux or Fedora, you can add <filepath>yum</filepath> repositories.
-If your system is Ubuntu or Debian, then add <filepath>deb</filepath> repositories.<p>If
-you are working with yum repositories, you can add a GPG check to
-verify that a package from this repository have not been corrupted.
-Select a repository and then <uicontrol>Edit</uicontrol>. Select <uicontrol>Yes</uicontrol> to
-enable <uicontrol>GPG Check</uicontrol> and then enter a URL to the
-GPG key file for the repository.</p></dd>
-</dlentry><dlentry>
-<dt>Debug reports</dt>
-<dd>This section displays debug reports, including name and file path.
-You can select from options to generate a new report, or rename, remove,
-or download an existing report.<p>The debug report is generated using
-the <cmdname>sosreport</cmdname> command. It is available for Red
-Hat Enterprise <tm tmtype="tm" trademark="Linux">Linux</tm>, Fedora,
-and Ubuntu distributions. The command generates a .tar file that contains
-configuration and diagnostic information, such as the running kernel
-version, loaded modules, and system and service configuration files.
-The command also runs external programs to collect further information
-and stores this output in the resulting archive.</p> </dd>
-</dlentry></dl>
-</csbody><?Pub Caret -1?>
-<?tm 1392659967 1?>
-</cshelp>
-<?Pub *0000003410?>
diff --git a/src/wok/plugins/kimchi/ui/pages/help/es_ES/host.dita b/src/wok/plugins/kimchi/ui/pages/help/es_ES/host.dita
deleted file mode 100644
index 90f60f8..0000000
--- a/src/wok/plugins/kimchi/ui/pages/help/es_ES/host.dita
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--Arbortext, Inc., 1988-2011, v.4002-->
-<!DOCTYPE cshelp PUBLIC "-//IBM//DTD DITA CSHelp//EN"
- "..\dtd\cshelp.dtd">
-
-
-<!--This DITA specialized document type is not supported by the Authoring Tools development team.
-For support please see:
-https://w3.opensource.ibm.com/projects/dita-cshelp/-->
-<cshelp id="kimhhost" xml:lang="es-es">
-<title>Host</title>
-<shortdesc>La página <wintitle>Host</wintitle> muestra información sobre el sistema host y le permite concluir, reiniciar y conectar con el sistema principal.</shortdesc>
-<csbody>
-<p>Puede realizar las acciones siguientes en el host:<ul>
-<li>Seleccione <uicontrol>Concluir</uicontrol> para concluir el sistema host.</li>
-<li>Seleccione <uicontrol>Reiniciar</uicontrol> para reiniciar el sistema host.</li>
-<li>Seleccione <uicontrol>Conectar</uicontrol> para abrir una conexión VNC al sistema host, si no está conectado aún.</li>
-</ul></p>
-<p>Pulse en las secciones siguientes para visualizar información acerca del host:</p>
-<dl><dlentry>
-<dt>Información básica</dt>
-<dd>Esta sección muestra la distribución del sistema operativo de host, la versión, el nombre de código, así como el tipo de procesador, el número de CPU en línea y la cantidad de memoria en GB.</dd>
-</dlentry><dlentry>
-<dt>Estadísticas del sistema</dt>
-<dd>Esta sección muestra gráficos para mostrar estadísticas para CPU, memoria, E/S de disco y E/S de red para el host. </dd>
-</dlentry><dlentry>
-<dt>Actualizaciones de software</dt>
-<dd>En esta sección se muestra información para todos los paquetes que tienen actualizaciones disponibles, incluido el nombre de paquete, versión, arquitectura y repositorio. Puede actualizar todos los paquetes listados seleccionando <uicontrol>Actualizar todo</uicontrol>. No puede seleccionar paquetes individuales para las actualizaciones.</dd>
-</dlentry><dlentry>
-<dt>Repositorios</dt>
-<dd>En esta sección se muestran los repositorios que están asociados con el sistema host. Puede añadir, habilitar, editar o eliminar repositorios. Añadir un repositorio lo asocia con el sistema host mientras que habilitar un repositorio permite que el host acceda a él. Si el sistema es Red Hat Enterprise
-Linux o Fedora, puede añadir repositorios <filepath>yum</filepath>.
-Si el sistema es Ubuntu o Debian, añada repositorios <filepath>deb</filepath>.<p>Si está trabajando con repositorios yum, puede añadir una comprobación GPG para verificar que un paquete de este repositorio no ha resultado dañado.
-Seleccione un repositorio y, a continuación, <uicontrol>Editar</uicontrol>. Seleccione <uicontrol>Sí</uicontrol> para habilitar <uicontrol>Comprobación GPG</uicontrol> y, a continuación, especifique un URL al archivo de claves GPG para el repositorio. </p></dd>
-</dlentry><dlentry>
-<dt>Informes de depuración</dt>
-<dd>En esta sección se muestran informes de depuración, incluido el nombre y la ruta de archivo.
-Puede seleccionar entre opciones para generar un informe nuevo, o bien redenominar, eliminar o descargar un informe existente.<p>El informe de depuración se genera utilizando el mandato <cmdname>sosreport</cmdname>. Está disponible para distribuciones de Red
-Hat Enterprise <tm tmtype="tm" trademark="Linux">Linux</tm>, Fedora y Ubuntu. El mandato genera un archivo .tar que contiene la información de configuración y de diagnóstico, como la versión de kernel en ejecución, los módulos de carga y los archivos de configuración del sistema y servicio.
-El mandato también ejecuta programas externos para recopilar información adicional y almacena esta salida en el archivo resultante.</p> </dd>
-</dlentry></dl>
-</csbody>
-<?tm 1392659967 1?>
-</cshelp>
-
-
-<!-- ENGL1SH_VERS10N 42248_4 DO NOT REMOVE OR CHANGE THIS LINE -->
-<!-- T9N_SRC_ID 232 -->
-<!-- T9N_SH1P_STR1NG KV310AAP001 1 -->
diff --git a/src/wok/plugins/kimchi/ui/pages/help/fr_FR/host.dita b/src/wok/plugins/kimchi/ui/pages/help/fr_FR/host.dita
deleted file mode 100644
index 099d342..0000000
--- a/src/wok/plugins/kimchi/ui/pages/help/fr_FR/host.dita
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--Arbortext, Inc., 1988-2011, v.4002-->
-<!DOCTYPE cshelp PUBLIC "-//IBM//DTD DITA CSHelp//EN"
- "..\dtd\cshelp.dtd">
-
-
-<!--This DITA specialized document type is not supported by the Authoring Tools development team.
-For support please see:
-https://w3.opensource.ibm.com/projects/dita-cshelp/-->
-<cshelp id="kimhhost" xml:lang="fr-fr">
-<title>Hôte</title>
-<shortdesc>La page <wintitle>Hôte</wintitle> affiche des informations
-sur le système hôte et vous permet d'arrêter, de redémarrer et de vous
-connecter à l'hôte.</shortdesc>
-<csbody>
-<p>Vous pouvez effectuer les actions suivantes sur l'hôte :<ul>
-<li>Sélectionnez <uicontrol>Arrêter</uicontrol> pour arrêter le système hôte.</li>
-<li>Sélectionnez <uicontrol>Redémarrer</uicontrol> pour redémarrer le système hôte.</li>
-<li>Sélectionnez <uicontrol>Connexion</uicontrol> pour ouvrir une connexion VNC
-au système hôte, si celui-ci n'est pas déjà connecté.</li>
-</ul></p>
-<p>Cliquez sur les sections suivantes pour afficher des informations sur l'hôte :</p>
-<dl><dlentry>
-<dt>Informations de base</dt>
-<dd>Cette section affiche la distribution, la version et le nom de code
-du système d'exploitation hôte, ainsi que le type de processeur, le nombre d'UC en ligne et la quantité de mémoire en Go.</dd>
-</dlentry><dlentry>
-<dt>Statistiques système</dt>
-<dd>Cette section affiche les graphiques des statistiques pour l'UC, mémoire, ainsi que
-les E-S disque et E-S réseau pour l'hôte. </dd>
-</dlentry><dlentry>
-<dt>Mises à jour logicielles</dt>
-<dd>Cette section affiche des informations pour tous les modules qui
-disposent de mises à jour disponibles, y compris le nom de module, la version, l'architecture
-et le référentiel. Vous pouvez mettre à jour toutes les modules répertoriés en sélectionnant <uicontrol>Tout
-mettre à jour</uicontrol>. Vous ne pouvez pas sélectionner des modules individuels pour les mises à jour.</dd>
-</dlentry><dlentry>
-<dt>Référentiels</dt>
-<dd>Cette section affiche les référentiels associés au système hôte. Vous pouvez ajouter, activer, éditer ou retirer des référentiels. L'ajout d'un référentiel associe celui-ci au système hôte,
-tandis que l'activation d'un référentiel permet à l'hôte d'y accéder. Si votre système est Red Hat Enterprise Linux ou Fedora,
-vous pouvez ajouter des référentiels <filepath>yum</filepath>.
-Si votre système est de type Ubuntu ou Debian, ajoutez des référentiels
-<filepath>deb</filepath>.<p>Si vous travaillez avec des référentiels yum, vous pouvez ajouter un contrôle GPG
-afin de vérifier qu'un module provenant de ce référentiel n'a pas été endommagé.
-Sélectionnez un référentiel puis cliquez sur <uicontrol>Editer</uicontrol>. Sélectionnez <uicontrol>Oui</uicontrol> pour activer <uicontrol>Contrôle GPG</uicontrol>, puis entrez une URL pour le fichier de clés GPG du référentiel.</p></dd>
-</dlentry><dlentry>
-<dt>Rapports de débogage</dt>
-<dd>Cette section affiche les rapports de débogage, y compris le nom et le chemin du fichier.
-Vous pouvez faire un choix parmi les options afin de générer un nouveau rapport, ou renommer, supprimer,
-ou télécharger un rapport existant.<p>Le rapport de débogage est généré à
-l'aide de la commande <cmdname>sosreport</cmdname>. Cette option est disponible pour les distributions
-Red Hat Enterprise <tm tmtype="tm" trademark="Linux">Linux</tm>, Fedora et Ubuntu. La commande génère un fichier .tar contenant la configuration et des informations de diagnostic,
-telles que la version du noyau d'exécution, les modules chargés, ainsi que les fichiers de configuration
-du système et de la maintenance.
-La commande exécute également des programmes externes pour collecter des informations
-supplémentaires et stocke cette sortie dans l'archive résultante.</p> </dd>
-</dlentry></dl>
-</csbody>
-<?tm 1392659967 1?>
-</cshelp>
-
-
-<!-- ENGL1SH_VERS10N 42248_4 DO NOT REMOVE OR CHANGE THIS LINE -->
-<!-- T9N_SRC_ID 232 -->
-<!-- T9N_SH1P_STR1NG KV310AAP001 1 -->
diff --git a/src/wok/plugins/kimchi/ui/pages/help/it_IT/host.dita b/src/wok/plugins/kimchi/ui/pages/help/it_IT/host.dita
deleted file mode 100644
index c2783bf..0000000
--- a/src/wok/plugins/kimchi/ui/pages/help/it_IT/host.dita
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--Arbortext, Inc., 1988-2011, v.4002-->
-<!DOCTYPE cshelp PUBLIC "-//IBM//DTD DITA CSHelp//EN"
- "..\dtd\cshelp.dtd">
-
-
-<!--This DITA specialized document type is not supported by the Authoring Tools development team.
-For support please see:
-https://w3.opensource.ibm.com/projects/dita-cshelp/-->
-<cshelp id="kimhhost" xml:lang="it-it">
-<title>Host</title>
-<shortdesc>La pagina <wintitle>Host</wintitle> visualizza le informazioni sul sistema host e consente di arrestarlo, riavviarlo e connettersi ad esso.</shortdesc>
-<csbody>
-<p>È possibile effettuare le seguenti operazioni sull'host:<ul>
-<li>Selezionare <uicontrol>Arresta</uicontrol> per arrestare il sistema host.</li>
-<li>Selezionare <uicontrol>Riavvia</uicontrol> per riavviare il sistema host.</li>
-<li>Selezionare <uicontrol>Connetti</uicontrol> per aprire una connessione VNC al sistema host, se non è già connesso.</li>
-</ul></p>
-<p>Fare clic sulle seguenti sezioni per visualizzare le informazioni sull'host:</p>
-<dl><dlentry>
-<dt>Informazioni di base</dt>
-<dd>Questa sezione visualizza il nome codice, la versione e la distribuzione del sistema operativo, come pure il tipo di processore, il numero di CPU in linea e la quantità di memoria in GB.</dd>
-</dlentry><dlentry>
-<dt>Statistiche di sistema</dt>
-<dd>Questa sezione visualizza i grafici che mostrano le statistiche per la CPU, la memoria, l'I/O disco e di rete per l'host. </dd>
-</dlentry><dlentry>
-<dt>Aggiornamenti del software</dt>
-<dd>Questa sezione visualizza le informazioni per tutti i pacchetti per cui sono disponibili gli aggiornamenti, incluso il nome, la versione, l'architettura e il repository del pacchetto. È possibile aggiornare tutti i pacchetti elencati, selezionando <uicontrol>Aggiorna tutto</uicontrol>. Non è possibile selezionare singoli pacchetti per gli aggiornamenti.</dd>
-</dlentry><dlentry>
-<dt>Repository</dt>
-<dd>Questa sezione visualizza i repository associati al sistema host. È possibile aggiungere, abilitare, modificare o rimuovere i repository. L'aggiunta di un repository lo associa al sistema host, mentre l'abilitazione di un repository
-consente all'host di accedervi. Se il sistema è Red Hat Enterprise
-Linux o Fedora, è possibile aggiungere i repository <filepath>yum</filepath>.
-Se il sistema è Ubuntu o Debian, aggiungere i repository <filepath>deb</filepath>.<p>Se si stanno utilizzando i repository yum, è possibile aggiungere un controllo GPG per verificare che un pacchetto da questo repository non sia stato corrotto.
-Selezionare un repository, quindi <uicontrol>Modifica</uicontrol>. Selezionare <uicontrol>Sì</uicontrol> per abilitare il <uicontrol>controllo GPG</uicontrol>, quindi immettere un URL al file di chiavi GPG per il
-repository.</p></dd>
-</dlentry><dlentry>
-<dt>Report di debug</dt>
-<dd>Questa sezione visualizza i report di debug, incluso il nome e il percorso file.
-Le opzioni disponibili consentono di generare un nuovo report oppure ridenominare, rimuovere o scaricare un report esistente.<p>Il report di debug viene generato utilizzando il comando <cmdname>sosreport</cmdname>. È disponibile per le distribuzioni Red
-Hat Enterprise <tm tmtype="tm" trademark="Linux">Linux</tm>, Fedora e Ubuntu. Il comando genera un file .tar che contiene informazioni di diagnostica e configurazione, come la versione del kernel in esecuzione, i moduli caricati e i file di configurazione del servizio e del sistema.
-Il comando esegue anche programmi esterni per raccogliere ulteriori informazioni e memorizza l'output nell'archivio risultante.</p> </dd>
-</dlentry></dl>
-</csbody>
-<?tm 1392659967 1?>
-</cshelp>
-
-
-<!-- ENGL1SH_VERS10N 42248_4 DO NOT REMOVE OR CHANGE THIS LINE -->
-<!-- T9N_SRC_ID 232 -->
-<!-- T9N_SH1P_STR1NG KV310AAP001 1 -->
diff --git a/src/wok/plugins/kimchi/ui/pages/help/ja_JP/host.dita b/src/wok/plugins/kimchi/ui/pages/help/ja_JP/host.dita
deleted file mode 100644
index 2b9c765..0000000
--- a/src/wok/plugins/kimchi/ui/pages/help/ja_JP/host.dita
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--Arbortext, Inc., 1988-2011, v.4002-->
-<!DOCTYPE cshelp PUBLIC "-//IBM//DTD DITA CSHelp//EN"
- "..\dtd\cshelp.dtd">
-
-
-<!--This DITA specialized document type is not supported by the Authoring Tools development team.
-For support please see:
-https://w3.opensource.ibm.com/projects/dita-cshelp/-->
-<cshelp id="kimhhost" xml:lang="ja-jp">
-<title>ホスト</title>
-<shortdesc><wintitle>「ホスト」</wintitle>ページには、ホスト・システムに関する情報が表示されます。ここで、ホストをシャットダウン、再始動、またホストに接続することができます。
-</shortdesc>
-<csbody>
-<p>以下のアクションをホストに対して実行できます。
-<ul>
-<li>ホスト・システムをシャットダウンするには<uicontrol>「シャットダウン」</uicontrol>を選択します。
-</li>
-<li>ホスト・システムを再始動するには<uicontrol>「再始動」</uicontrol>を選択します。
-</li>
-<li>ホスト・システムへの VNC 接続を (まだ接続されていない場合に) オープンするには、<uicontrol>「接続」</uicontrol>を選択します。
-</li>
-</ul></p>
-<p>ホストに関する情報を表示するには、以下の選択項目をクリックしてください。
-</p>
-<dl><dlentry>
-<dt>基本情報</dt>
-<dd>このセクションには、ホスト・オペレーティング・システムのディストリビューション、バージョン、およびコード名、さらにプロセッサー・タイプ、オンライン CPU の数、およびメモリーの量 (GB 単位)が表示されます。
-</dd>
-</dlentry><dlentry>
-<dt>システム統計情報</dt>
-<dd>このセクションには、ホストの CPU、メモリー、ディスク入出力、およびネットワーク入出力の統計情報を表すグラフが表示されます。
-</dd>
-</dlentry><dlentry>
-<dt>ソフトウェア更新</dt>
-<dd>このセクションには、更新が用意されているパッケージすべての情報
-(パッケージ名、バージョン、アーキテクチャー、リポジトリーなど) が表示されます。
-<uicontrol>「すべて更新」</uicontrol>を選択すると、リストされているパッケージすべてを更新できます。
-更新する対象として個別のパッケージを選択することはできません。
-</dd>
-</dlentry><dlentry>
-<dt>リポジトリー</dt>
-<dd>このセクションには、ホスト・システムに関連付けられているリポジトリーが表示されます。
-リポジトリーを追加する、有効にする、編集する、または削除することができます。
-リポジトリーを追加すると、そのリポジトリーがホスト・システムに関連付けられ、リポジトリーを有効にすると、そのリポジトリーにホストがアクセスできるようになります。
-システムが Red Hat Enterprise Linux または Fedora であれば、<filepath>yum</filepath> リポジトリーを追加できます。
-システムが Ubuntu または Debian であれば、<filepath>deb</filepath> リポジトリーを追加してください。
-<p>yum リポジトリーを操作している場合、そのリポジトリーに入っているパッケージが壊れていないことを確認するため、GPG チェックを追加できます。
-リポジトリーを選択し、<uicontrol>「編集」</uicontrol>をクリックしてください。
-<uicontrol>「はい」</uicontrol>を選択して<uicontrol>「GPG チェック」</uicontrol>を有効にしてから、そのリポジトリーの GPG 鍵ファイルの URL を入力してください。
-</p></dd>
-</dlentry><dlentry>
-<dt>デバッグ・レポート</dt>
-<dd>このセクションには、デバッグ・レポート (名前やファイル・パスなど) が表示されます。
-新しいレポートを生成、既存のレポートを名前変更、削除、またはダウンロードするためのオプションを選択できます。
-<p>デバッグ・レポートは、<cmdname>sosreport</cmdname> コマンドで生成されます。
-これは、Red Hat Enterprise <tm tmtype="tm" trademark="Linux">Linux</tm>、Fedora、および Ubuntu ディストリビューションに用意されています。
-このコマンドは、構成および診断情報 (稼働中のカーネルのバージョン、ロードされているモジュール、システムおよびサービス構成ファイルなど) が入った .tar ファイルを生成します。
-このコマンドはまた、外部プログラムを実行して情報をさらに収集し、その出力を結果のアーカイブに保管します。
-</p> </dd>
-</dlentry></dl>
-</csbody>
-<?tm 1392659967 1?>
-</cshelp>
-
-
-<!-- ENGL1SH_VERS10N 42248_4 DO NOT REMOVE OR CHANGE THIS LINE -->
-<!-- T9N_SRC_ID 232 -->
-<!-- T9N_SH1P_STR1NG KV310AAP001 1 -->
diff --git a/src/wok/plugins/kimchi/ui/pages/help/ko_KR/host.dita b/src/wok/plugins/kimchi/ui/pages/help/ko_KR/host.dita
deleted file mode 100644
index 220e166..0000000
--- a/src/wok/plugins/kimchi/ui/pages/help/ko_KR/host.dita
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--Arbortext, Inc., 1988-2011, v.4002-->
-<!DOCTYPE cshelp PUBLIC "-//IBM//DTD DITA CSHelp//EN"
- "..\dtd\cshelp.dtd">
-
-
-<!--This DITA specialized document type is not supported by the Authoring Tools development team.
-For support please see:
-https://w3.opensource.ibm.com/projects/dita-cshelp/-->
-<cshelp id="kimhhost" xml:lang="ko-kr">
-<title>호스트</title>
-<shortdesc><wintitle>호스트</wintitle> 페이지에는 호스트 시스템에 대한 정보가 표시되며 이 페이지를 사용하여 호스트를 종료 및 다시 시작하거나 호스트에 연결할 수 있습니다.</shortdesc>
-<csbody>
-<p>호스트에 대해 다음 조치를 수행할 수 있습니다.<ul>
-<li>호스트 시스템을 종료하려면 <uicontrol>시스템 종료</uicontrol>를 선택합니다.</li>
-<li>호스트 시스템을 다시 시작하려면 <uicontrol>다시 시작</uicontrol>을 선택합니다.</li>
-<li>이미 연결되어 있지 않은 경우, 호스트 시스템에 대한 VNC 연결을 시작하려면 <uicontrol>연결</uicontrol>을 선택합니다.</li>
-</ul></p>
-<p>호스트에 대한 정보를 표시하려면 다음 섹션을 클릭하십시오.</p>
-<dl><dlentry>
-<dt>기본 정보</dt>
-<dd>이 섹션에는 호스트 운영 체제 배포,
-버전, 코드 이름, 프로세서 유형, 온라인 CPU 수,
-메모리 용량(GB) 등이 표시됩니다.</dd>
-</dlentry><dlentry>
-<dt>시스템 통계</dt>
-<dd>이 섹션에는 호스트의 CPU, 메모리, 디스크 I/O, 네트워크 I/O에 대한 통계를 표시하는 그래프가 표시됩니다. </dd>
-</dlentry><dlentry>
-<dt>소프트웨어 업데이트</dt>
-<dd>이 섹션에는 패키지 이름, 버전, 아키텍처, 저장소를 비롯하여 사용 가능한 업데이트가 있는 모든 패키지에 대한 정보가 표시됩니다. <uicontrol>모두 업데이트</uicontrol>를 선택하여 나열된 모든 패키지를 업데이트할 수 있습니다. 업데이트에 대해 개별 패키지를 선택할 수는 없습니다.</dd>
-</dlentry><dlentry>
-<dt>저장소</dt>
-<dd>이 섹션에는 호스트 시스템과 연관된 저장소가 표시됩니다. 저장소를 추가하거나, 사용으로 설정하거나, 편집하거나, 제거할 수 있습니다. 저장소를 추가하면 저장소가 호스트 시스템과 연관되며, 저장소를 사용으로 설정하면 호스트가 저장소에 액세스할 수 있습니다. 해당 시스템이 Red Hat Enterprise Linux 또는 Fedora인 경우, <filepath>yum</filepath> 저장소를 추가할 수 있습니다.
-해당 시스템이 Ubuntu 또는 Debian인 경우, <filepath>deb</filepath> 저장소를 추가하십시오.<p>yum 저장소로 작업하는 경우, GPG 검사를 추가하여 이 저장소의 패키지가 손상되지 않았는지 확인할 수 있습니다.
-저장소를 선택한 후 <uicontrol>편집</uicontrol>을 선택하십시오. <uicontrol>예</uicontrol>를 선택하여
-<uicontrol>GPG 검사</uicontrol>를 사용으로 설정한 후
-저장소에 대한 GPG 키 파일의 URL을 입력하십시오.</p></dd>
-</dlentry><dlentry>
-<dt>디버그 보고서</dt>
-<dd>이 섹션에는 이름 및 파일 경로를 포함한 디버그 보고서가 표시됩니다.
-새 보고서 생성, 기존 보고서 이름 바꾸기, 제거, 다운로드 등의 옵션 중에서 선택할 수 있습니다.<p>디버그 보고서는 <cmdname>sosreport</cmdname> 명령을 사용하여 생성됩니다. 이는 Red Hat Enterprise <tm tmtype="tm" trademark="Linux">Linux</tm>, Fedora 및 Ubuntu 배포에서 사용 가능합니다. 이 명령은 구성 및 진단 정보(예: 실행 중인 커널 버전, 로드된 모듈, 시스템 및 서비스 구성 파일)를 포함하는 .tar 파일을 생성합니다.
-또한 이 명령은 외부 프로그램을 실행하여 추가 정보를 수집하고 결과 아카이브에 이 출력을 저장합니다.</p> </dd>
-</dlentry></dl>
-</csbody>
-<?tm 1392659967 1?>
-</cshelp>
-
-
-<!-- ENGL1SH_VERS10N 42248_4 DO NOT REMOVE OR CHANGE THIS LINE -->
-<!-- T9N_SRC_ID 232 -->
-<!-- T9N_SH1P_STR1NG KV310AAP001 1 -->
diff --git a/src/wok/plugins/kimchi/ui/pages/help/pt_BR/host.dita b/src/wok/plugins/kimchi/ui/pages/help/pt_BR/host.dita
deleted file mode 100644
index a9814e8..0000000
--- a/src/wok/plugins/kimchi/ui/pages/help/pt_BR/host.dita
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--Arbortext, Inc., 1988-2011, v.4002-->
-<!DOCTYPE cshelp PUBLIC "-//IBM//DTD DITA CSHelp//EN"
- "..\dtd\cshelp.dtd">
-
-
-<!--This DITA specialized document type is not supported by the Authoring Tools development team.
-For support please see:
-https://w3.opensource.ibm.com/projects/dita-cshelp/-->
-<cshelp id="kimhhost" xml:lang="pt-br">
-<title>Host</title>
-<shortdesc>A página <wintitle>Host</wintitle> mostra informações sobre
-o sistema host e permite encerrar, reiniciar e conectar
-ao host.</shortdesc>
-<csbody>
-<p>É possível executar as ações a segur no host:<ul>
-<li>Selecione <uicontrol>Encerrar</uicontrol> para encerrar o sistema
-host.</li>
-<li>Selecione <uicontrol>Reiniciar</uicontrol> para reiniciar o sistema host.</li>
-<li>Selecione <uicontrol>Conectar</uicontrol> para abrir uma conexão VNC
-para o sistema host, se ele já não estiver conectado.</li>
-</ul></p>
-<p>Clique nas seções a seguir para exibir informações sobre o host:</p>
-<dl><dlentry>
-<dt>Informações básicas</dt>
-<dd>Esta seção exibe a distribuição do sistema operacional do host,
-a versão e o nome do código, bem como o tipo de processador, o número de CPUs on-line e a quantia de
-memória em GB.</dd>
-</dlentry><dlentry>
-<dt>Estatísticas do sistema</dt>
-<dd>Esta seção exibe gráficos para mostrar estatísticas para CPU, memória,
-E/S de disco e E/S de rede para o host. </dd>
-</dlentry><dlentry>
-<dt>Atualizações de software</dt>
-<dd>Esta seção exibe informações de todos os pacotes que
-possuem atualizações disponíveis, incluindo nome do pacote, versão, arquitetura
-e repositório. É possível atualizar todos os pacotes listados selecionando <uicontrol>Atualizar
-todos</uicontrol>. Não é possível selecionar pacotes individuais para atualizações.</dd>
-</dlentry><dlentry>
-<dt>Repositórios</dt>
-<dd>Esta seção exibe repositórios que estão associados ao
-sistema host. É possível incluir, ativar, editar ou remover repositórios. Incluir
-um repositório o associa com o sistema host enquanto ativar um repositório
-permite que o host o acesse. Se o seu sistema for Red Hat Enterprise
-Linux ou Fedora, será possível incluir repositórios <filepath>yum</filepath>.
-Se o seu sistema for Ubuntu ou Debian, inclua repositórios <filepath>deb</filepath>.<p>Se
-você estiver trabalhando com repositórios yum, será possível incluir uma verificação de GPG para
-verificar se um pacote desse repositório não foi corrompido.
-Selecione um repositório e, em seguida, <uicontrol>Editar</uicontrol>. Selecione <uicontrol>Sim</uicontrol> para
-ativar a <uicontrol>Verificação de GPG</uicontrol> e, então, insira uma URL no arquivo-chave de GPG para o
-repositório.</p></dd>
-</dlentry><dlentry>
-<dt>Relatórios de depuração</dt>
-<dd>Esta seção exibe relatórios de depuração, incluindo nome e caminho do arquivo.
-É possível selecionar a partir das opções para gerar um novo relatório ou renomear, remover
-ou fazer o download de um relatório existente.<p>O relatório de depuração é gerado usando
-o comando <cmdname>sosreport</cmdname>. Ele está disponível para distribuições
-Red Hat Enterprise <tm tmtype="tm" trademark="Linux">Linux</tm>, Fedora
-e Ubuntu. O comando gera um arquivo .tar que contém
-informações de configuração e de diagnóstico, como versão do kernel
-em execução, módulos carregados e arquivos de configuração de sistema e de serviço.
-O comando também executa programas externos para coletar informações adicionais
-e armazena essa saída no archive resultante.</p> </dd>
-</dlentry></dl>
-</csbody>
-<?tm 1392659967 1?>
-</cshelp>
-
-
-<!-- ENGL1SH_VERS10N 42248_4 DO NOT REMOVE OR CHANGE THIS LINE -->
-<!-- T9N_SRC_ID 232 -->
-<!-- T9N_SH1P_STR1NG KV310AAP001 1 -->
diff --git a/src/wok/plugins/kimchi/ui/pages/help/ru_RU/host.dita b/src/wok/plugins/kimchi/ui/pages/help/ru_RU/host.dita
deleted file mode 100644
index 54a78f5..0000000
--- a/src/wok/plugins/kimchi/ui/pages/help/ru_RU/host.dita
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--Arbortext, Inc., 1988-2011, v.4002-->
-<!DOCTYPE cshelp PUBLIC "-//IBM//DTD DITA CSHelp//EN"
- "..\dtd\cshelp.dtd">
-
-
-<!--This DITA specialized document type is not supported by the Authoring Tools development team.
-For support please see:
-https://w3.opensource.ibm.com/projects/dita-cshelp/-->
-<cshelp id="kimhhost" xml:lang="ru-ru">
-<title>Хост</title>
-<shortdesc>Страница <wintitle>Хост</wintitle> показывает информацию о системе хоста и позволяет останавливать хост, перезапускать хост и подключаться к нему.</shortdesc>
-<csbody>
-<p>На хосте можно выполнять следующие действия:<ul>
-<li><uicontrol>Завершить работу</uicontrol> - остановить систему хоста.</li>
-<li><uicontrol>Перезапустить</uicontrol> - перезапустить систему хоста.</li>
-<li><uicontrol>Подключиться</uicontrol> - открыть соединение VNC с системой хоста, если оно еще не установлено.</li>
-</ul></p>
-<p>Щелкните на следующих разделах для просмотра информации о хосте:</p>
-<dl><dlentry>
-<dt>Базовая информация</dt>
-<dd>В этом разделе показывается вариант операционной системы, его версия и кодовое имя, а также тип процессора, число подключенных процессоров и объем памяти в ГБ.</dd>
-</dlentry><dlentry>
-<dt>Системная статистика</dt>
-<dd>В этом разделе показываются графики, отражающие статистическую информацию о процессоре, памяти, дисковом вводе-выводе и сетевом вводе-выводе для хоста. </dd>
-</dlentry><dlentry>
-<dt>Обновления программного обеспечения</dt>
-<dd>В этом разделе показывается информация обо всех пакетах, для которых доступны обновления, включая имя пакета, версию, архитектуру и хранилище. Можно обновить все пакеты в списке щелчком на <uicontrol>Обновить все</uicontrol>. Отдельные пакеты для обновления выбрать нельзя.</dd>
-</dlentry><dlentry>
-<dt>Хранилища</dt>
-<dd>В этом разделе показываются хранилища, связанные с системой хоста. Хранилища можно добавлять, активировать, изменять и удалять. При добавлении хранилище связывается с системой хоста, при активации хранилище становится доступным для хоста. Если система - Red Hat Enterprise Linux или Fedora, можно добавить хранилища <filepath>yum</filepath>.
-Если система - Ubuntu или Debian, добавьте хранилища <filepath>deb</filepath>.<p>При работе с хранилищами yum можно добавить проверку GPG для проверки целостности пакетов из данного хранилища.
-Выберите хранилище и щелкните на <uicontrol>Изменить</uicontrol>. Выберите <uicontrol>Да</uicontrol>, чтобы включить <uicontrol>Проверку GPG</uicontrol>, и введите URL файла ключей GPG для хранилища.</p></dd>
-</dlentry><dlentry>
-<dt>Отладочные отчеты</dt>
-<dd>В этом разделе показываются отладочные отчеты, включая имя и путь.
-Доступны команды для создания, переименования, удаления и загрузки отчетов.<p>Отладочный отчет создается командой <cmdname>sosreport</cmdname>. Он доступен для Red
-Hat Enterprise <tm tmtype="tm" trademark="Linux">Linux</tm>, Fedora и Ubuntu. Команда создает файл .tar с конфигурационной и диагностической информацией, такой как версия ядра, загруженные модули и файлы конфигурации системы и служб.
-Команда также выполняет внешние программы для сбора дополнительной информации и сохраняет их вывод в результирующем архиве.</p> </dd>
-</dlentry></dl>
-</csbody>
-<?tm 1392659967 1?>
-</cshelp>
-
-
-<!-- ENGL1SH_VERS10N 42248_4 DO NOT REMOVE OR CHANGE THIS LINE -->
-<!-- T9N_SRC_ID 232 -->
-<!-- T9N_SH1P_STR1NG KV310AAP001 1 -->
diff --git a/src/wok/plugins/kimchi/ui/pages/help/zh_CN/host.dita b/src/wok/plugins/kimchi/ui/pages/help/zh_CN/host.dita
deleted file mode 100644
index a8622a2..0000000
--- a/src/wok/plugins/kimchi/ui/pages/help/zh_CN/host.dita
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--Arbortext, Inc., 1988-2011, v.4002-->
-<!DOCTYPE cshelp PUBLIC "-//IBM//DTD DITA CSHelp//EN"
- "..\dtd\cshelp.dtd">
-
-
-<!--This DITA specialized document type is not supported by the Authoring Tools development team.
-For support please see:
-https://w3.opensource.ibm.com/projects/dita-cshelp/-->
-<cshelp id="kimhhost" xml:lang="zh-cn">
-<title>主机</title>
-<shortdesc>“<wintitle>主机</wintitle>”页面显示有关主机系统的信息,并且允许您对主机进行关闭、启动和连接。</shortdesc>
-<csbody>
-<p>可对主机执行以下操作:<ul>
-<li>选择<uicontrol>关闭</uicontrol>以关闭主机系统。</li>
-<li>选择<uicontrol>重新启动</uicontrol>以重新启动主机系统。</li>
-<li>选择<uicontrol>连接</uicontrol>以打开与主机系统的 VNC 连接(如果尚未连接)。</li>
-</ul></p>
-<p>单击以下部分以显示有关主机的信息:</p>
-<dl><dlentry>
-<dt>基本信息</dt>
-<dd>本部分显示主机操作系统分发版、版本和代码名称以及处理器类型、联机 CPU 的数目和内存量(以 GB 计)。</dd>
-</dlentry><dlentry>
-<dt>系统统计信息</dt>
-<dd>本部分显示图形,以显示主机有关 CPU、内存、磁盘 I/O 和网络 I/O 的统计信息。</dd>
-</dlentry><dlentry>
-<dt>软件更新</dt>
-<dd>本部分显示有更新可用的所有软件包的信息,其中包括软件包名称、版本、体系结构和存储库。可通过选择<uicontrol>全部更新</uicontrol>来更新所列示的所有软件包。不能针对更新选择各个软件包。</dd>
-</dlentry><dlentry>
-<dt>存储库</dt>
-<dd>本部分显示与主机系统关联的存储库。您可以添加、启用、编辑或除去存储库。当启用存储库会允许主机对其进行访问时,添加存储库会将其与主机系统关联。如果您的系统为 Red Hat Enterprise Linux 或 Fedora,那么可添加 <filepath>yum</filepath> 存储库。如果您的系统为 Ubuntu 或 Debian,那么请添加 <filepath>deb</filepath> 存储库。<p>如果要处理 Yum 存储库,您可以添加 GPG 检查以验证此存储库中的软件包是否已损坏。选择一个存储库,然后选择<uicontrol>编辑</uicontrol>。选择<uicontrol>是</uicontrol>以启用 <uicontrol>GPG 检查</uicontrol>,然后输入存储库的 GPG 密钥文件的 URL。</p></dd>
-</dlentry><dlentry>
-<dt>调试报告</dt>
-<dd>本部分显示调试报告,其中包括名称和文件路径。您可以从选项中进行选择以生成新报告,或者对现有报告进行重命名、除去或下载。<p>调试报告将使用
-<cmdname>sosreport</cmdname> 命令生成。该报告可用于 Red
-Hat Enterprise <tm tmtype="tm" trademark="Linux">Linux</tm>、Fedora 和 Ubuntu 分发版。该命令将生成包含配置和诊断信息的 .tar 文件,例如,正在运行的内核版本、已装入的模块以及系统和服务配置文件。该命令还会运行外部程序以收集更多信息并将此输出存储在生成的归档中。</p> </dd>
-</dlentry></dl>
-</csbody>
-<?tm 1392659967 1?>
-</cshelp>
-
-
-<!-- ENGL1SH_VERS10N 42248_4 DO NOT REMOVE OR CHANGE THIS LINE -->
-<!-- T9N_SRC_ID 232 -->
-<!-- T9N_SH1P_STR1NG KV310AAP001 1 -->
diff --git a/src/wok/plugins/kimchi/ui/pages/help/zh_TW/host.dita b/src/wok/plugins/kimchi/ui/pages/help/zh_TW/host.dita
deleted file mode 100644
index 550945e..0000000
--- a/src/wok/plugins/kimchi/ui/pages/help/zh_TW/host.dita
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--Arbortext, Inc., 1988-2011, v.4002-->
-<!DOCTYPE cshelp PUBLIC "-//IBM//DTD DITA CSHelp//EN"
- "..\dtd\cshelp.dtd">
-
-
-<!--This DITA specialized document type is not supported by the Authoring Tools development team.
-For support please see:
-https://w3.opensource.ibm.com/projects/dita-cshelp/-->
-<cshelp id="kimhhost" xml:lang="zh-tw">
-<title>主機</title>
-<shortdesc>「<wintitle>主機</wintitle>」頁面會顯示主機系統的相關資訊,並容許您關閉、重新啟動以及連接到主機。</shortdesc>
-<csbody>
-<p>您可以針對主機執行下列動作:<ul>
-<li>選取<uicontrol>關閉</uicontrol>以關閉主機系統。</li>
-<li>選取<uicontrol>重新啟動</uicontrol>以重新啟動主機系統。</li>
-<li>選取<uicontrol>連接</uicontrol>以開啟與主機系統的 VNC 連線(如果尚未連線到主機系統)。</li>
-</ul></p>
-<p>按一下下列區段以顯示主機的相關資訊:</p>
-<dl><dlentry>
-<dt>基本資訊</dt>
-<dd>此區段會顯示主機作業系統發行套件、版本、程式碼名稱以及處理器類型、線上 CPU 數目和記憶體數量 (GB)。</dd>
-</dlentry><dlentry>
-<dt>系統統計資料</dt>
-<dd>此區段會顯示一些圖形,以顯示主機的 CPU、記憶體、磁碟 I/O 和網路 I/O 的統計資料。</dd>
-</dlentry><dlentry>
-<dt>軟體更新</dt>
-<dd>此區段會顯示具有可用更新的所有套件的相關資訊,包括套件名稱、版本、架構和儲存庫。您可以透過選取<uicontrol>全部更新</uicontrol>來更新所有列出的套件。不能選取個別套件以進行更新。</dd>
-</dlentry><dlentry>
-<dt>儲存庫</dt>
-<dd>此區段會顯示與主機系統相關聯的儲存庫。您可以新增、啟用、編輯或移除儲存庫。新增儲存庫可使它與主機系統相關聯,而啟用儲存庫則容許主機存取儲存庫。如果您的系統是
-Red Hat Enterprise Linux 或 Fedora,則可以新增 <filepath>yum</filepath> 儲存庫。如果您的系統是
-Ubuntu 或 Debian,則可以新增 <filepath>deb</filepath> 儲存庫。<p>如果您正在使用
-yum 儲存庫,則可以新增 GPG 檢查以驗證此儲存庫中的某個套件是否未毀損。選取儲存庫,然後選取<uicontrol>編輯</uicontrol>。選取<uicontrol>是</uicontrol>以啟用 <uicontrol>GPG 檢查</uicontrol>,然後輸入儲存庫的 GPG 金鑰檔的 URL。</p></dd>
-</dlentry><dlentry>
-<dt>除錯報告</dt>
-<dd>此區段顯示除錯報告,包括名稱和檔案路徑。您可以選取選項以產生新報告、或是重新命名、移除或下載現有報告。<p>除錯報告是使用
-<cmdname>sosreport</cmdname> 指令產生的。該指令可用於 Red
-Hat Enterprise <tm tmtype="tm" trademark="Linux">Linux</tm>、Fedora
-及 Ubuntu 發行套件。該指令會產生 .tar 檔案,其包含配置與診斷資訊,例如執行中的核心版本、已載入模組以及系統和服務配置檔案。該指令還會執行外部程式來收集更多資訊並將此輸出儲存在產生的保存檔中。</p> </dd>
-</dlentry></dl>
-</csbody>
-<?tm 1392659967 1?>
-</cshelp>
-
-
-<!-- ENGL1SH_VERS10N 42248_4 DO NOT REMOVE OR CHANGE THIS LINE -->
-<!-- T9N_SRC_ID 232 -->
-<!-- T9N_SH1P_STR1NG KV310AAP001 1 -->
--
2.1.0
9 years, 2 months
[PATCH 09/15] V4 Ginger Base : base plugin tests files
by chandra@linux.vnet.ibm.com
From: chandrureddy <chandra(a)linux.vnet.ibm.com>
---
src/wok/plugins/gingerbase/tests/Makefile.am | 49 ++++
src/wok/plugins/gingerbase/tests/run_tests.sh.in | 55 +++++
src/wok/plugins/gingerbase/tests/test_config.py.in | 155 ++++++++++++
src/wok/plugins/gingerbase/tests/test_host.py | 152 ++++++++++++
src/wok/plugins/gingerbase/tests/test_model.py | 274 +++++++++++++++++++++
src/wok/plugins/gingerbase/tests/test_rest.py | 182 ++++++++++++++
src/wok/plugins/gingerbase/tests/utils.py | 260 +++++++++++++++++++
7 files changed, 1127 insertions(+)
create mode 100644 src/wok/plugins/gingerbase/tests/Makefile.am
create mode 100644 src/wok/plugins/gingerbase/tests/run_tests.sh.in
create mode 100644 src/wok/plugins/gingerbase/tests/test_config.py.in
create mode 100644 src/wok/plugins/gingerbase/tests/test_host.py
create mode 100644 src/wok/plugins/gingerbase/tests/test_model.py
create mode 100644 src/wok/plugins/gingerbase/tests/test_rest.py
create mode 100644 src/wok/plugins/gingerbase/tests/utils.py
diff --git a/src/wok/plugins/gingerbase/tests/Makefile.am b/src/wok/plugins/gingerbase/tests/Makefile.am
new file mode 100644
index 0000000..477df12
--- /dev/null
+++ b/src/wok/plugins/gingerbase/tests/Makefile.am
@@ -0,0 +1,49 @@
+#
+# Ginger Base
+#
+# Copyright IBM Corp, 2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+EXTRA_DIST = \
+ Makefile.am \
+ run_tests.sh.in \
+ test_config.py.in \
+ $(filter-out test_config.py, $(wildcard *.py)) \
+ $(NULL)
+
+noinst_SCRIPTS = run_tests.sh
+
+do_substitution = \
+ sed -e 's,[@]HAVE_PYMOD_UNITTEST[@],$(HAVE_PYMOD_UNITTEST),g' \
+ -e 's,[@]prefix[@],$(prefix),g' \
+ -e 's,[@]datadir[@],$(datadir),g' \
+ -e 's,[@]PYTHON_VERSION[@],$(PYTHON_VERSION),g' \
+ -e 's,[@]wokdir[@],$(pythondir)/wok,g' \
+ -e 's,[@]pkgdatadir[@],$(pkgdatadir),g'
+
+
+run_tests.sh: run_tests.sh.in Makefile
+ $(do_substitution) < $(srcdir)/run_tests.sh.in > run_tests.sh
+ chmod +x run_tests.sh
+
+test_config.py: test_config.py.in Makefile
+ $(do_substitution) < $(srcdir)/test_config.py.in > test_config.py
+
+check-local:
+ ./run_tests.sh
+
+BUILT_SOURCES = test_config.py
+CLEANFILES = run_tests.sh test_config.py
diff --git a/src/wok/plugins/gingerbase/tests/run_tests.sh.in b/src/wok/plugins/gingerbase/tests/run_tests.sh.in
new file mode 100644
index 0000000..1a34418
--- /dev/null
+++ b/src/wok/plugins/gingerbase/tests/run_tests.sh.in
@@ -0,0 +1,55 @@
+#!/bin/bash
+#
+# Project Ginger Base
+#
+# Copyright IBM, Corp. 2013-2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+HAVE_UNITTEST=@HAVE_PYMOD_UNITTEST@
+PYTHON_VER=@PYTHON_VERSION@
+
+if [ "$1" = "-v" ]; then
+ OPTS="-v"
+ shift
+else
+ OPTS=""
+fi
+
+if [ $# -ne 0 ]; then
+ ARGS="$@"
+else
+ ARGS=`find -name "test_*.py" | xargs -I @ basename @ .py`
+fi
+
+if [ "$HAVE_UNITTEST" != "yes" -o "$PYTHON_VER" == "2.6" ]; then
+ CMD="unit2"
+else
+ CMD="python -m unittest"
+fi
+
+LIST=($ARGS)
+MODEL_LIST=()
+MOCK_LIST=()
+for ((i=0;i<${#LIST[@]};i++)); do
+
+ if [[ ${LIST[$i]} == test_model* ]]; then
+ MODEL_LIST+=(${LIST[$i]})
+ else
+ MOCK_LIST+=(${LIST[$i]})
+ fi
+done
+
+PYTHONPATH=../plugins:../src:../ $CMD $OPTS ${MODEL_LIST[@]} ${MOCK_LIST[@]}
diff --git a/src/wok/plugins/gingerbase/tests/test_config.py.in b/src/wok/plugins/gingerbase/tests/test_config.py.in
new file mode 100644
index 0000000..4ab54cb
--- /dev/null
+++ b/src/wok/plugins/gingerbase/tests/test_config.py.in
@@ -0,0 +1,155 @@
+#
+# Project Ginger Base
+#
+# Copyright IBM, Corp. 2014-2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+import unittest
+from cherrypy.lib.reprconf import Parser
+from wok.config import Paths
+
+from wok.plugins.gingerbase.config import GingerBasePaths
+
+get_prefix = None
+
+
+def setUpModule():
+ global get_prefix
+ get_prefix = Paths.get_prefix
+
+
+def tearDownModule():
+ Paths.get_prefix = GingerBasePaths.get_prefix = get_prefix
+
+
+class ConfigTests(unittest.TestCase):
+ def assertInstalledPath(self, actual, expected):
+ if '@pkgdatadir@' != '/usr/share/gingerbase':
+ usr_local = '/usr/local'
+ if not expected.startswith('/usr'):
+ expected = usr_local + expected
+ self.assertEquals(actual, expected)
+
+ def test_installed_paths(self):
+ Paths.get_prefix = lambda self: '@datadir@/wok'
+ paths = Paths()
+ self.assertInstalledPath(paths.state_dir, '/var/lib/wok')
+ self.assertInstalledPath(paths.log_dir, '/var/log/wok')
+ self.assertInstalledPath(paths.conf_dir, '/etc/wok')
+ self.assertInstalledPath(paths.src_dir, '@wokdir@')
+ self.assertInstalledPath(paths.plugins_dir, '@wokdir@/plugins')
+ self.assertInstalledPath(paths.ui_dir, '@datadir@/wok/ui')
+ self.assertInstalledPath(paths.mo_dir, '@prefix@/share/locale')
+
+ def test_uninstalled_paths(self):
+ Paths.get_prefix = lambda self: '/home/user/wok'
+ paths = Paths()
+ self.assertEquals(paths.state_dir, '/home/user/wok/data')
+ self.assertEquals(paths.log_dir, '/home/user/wok/log')
+ self.assertEquals(paths.conf_dir, '/home/user/wok/src')
+ self.assertEquals(paths.src_dir, '/home/user/wok/src/wok')
+ self.assertEquals(paths.plugins_dir, '/home/user/wok/plugins')
+ self.assertEquals(paths.ui_dir, '/home/user/wok/ui')
+ self.assertEquals(paths.mo_dir, '/home/user/wok/mo')
+
+ def test_installed_plugin_paths(self):
+ GingerBasePaths.get_prefix = lambda self: '@datadir@/wok'
+ paths = GingerBasePaths()
+ self.assertInstalledPath(paths.conf_dir, '/etc/wok/plugins.d')
+ self.assertInstalledPath(paths.conf_file,
+ '/etc/wok/plugins.d/gingerbase.conf')
+ self.assertInstalledPath(paths.src_dir, '@wokdir@/plugins/ginger-base')
+ self.assertInstalledPath(paths.ui_dir,
+ '@datadir@/wok/plugins/gingerbase/ui')
+ self.assertInstalledPath(paths.mo_dir, '@prefix@/share/locale')
+
+ def test_uninstalled_plugin_paths(self):
+ GingerBasePaths.get_prefix = lambda self: '/home/user/wok'
+ paths = GingerBasePaths()
+ self.assertEquals(paths.conf_dir, '/home/user/wok/plugins/gingerbase')
+ self.assertEquals(paths.conf_file,
+ '/home/user/wok/plugins/gingerbase/gingerbase.conf')
+ self.assertEquals(paths.src_dir, '/home/user/wok/plugins/gingerbase')
+ self.assertEquals(paths.ui_dir, '/home/user/wok/plugins/gingerbase/ui')
+ self.assertEquals(paths.mo_dir, '/home/user/wok/plugins/gingerbase/mo')
+
+ def test_kimchi_config(self):
+ Paths.get_prefix = GingerBasePaths.get_prefix = get_prefix
+ CACHEEXPIRES = 31536000
+ SESSIONSTIMEOUT = 10
+ configObj = {
+ '/': {
+ 'tools.trailing_slash.on': False,
+ 'request.methods_with_bodies': ('POST', 'PUT'),
+ 'tools.nocache.on': True,
+ 'tools.proxy.on': True,
+ 'tools.sessions.on': True,
+ 'tools.sessions.name': 'wok',
+ 'tools.sessions.secure': True,
+ 'tools.sessions.httponly': True,
+ 'tools.sessions.locking': 'explicit',
+ 'tools.sessions.storage_type': 'ram',
+ 'tools.sessions.timeout': SESSIONSTIMEOUT,
+ 'tools.wokauth.on': False
+ },
+ '/css': {
+ 'tools.staticdir.on': True,
+ 'tools.staticdir.dir': '%s/ui/css' % GingerBasePaths().prefix,
+ 'tools.expires.on': True,
+ 'tools.expires.secs': CACHEEXPIRES,
+ 'tools.nocache.on': False
+ },
+ '/js': {
+ 'tools.staticdir.on': True,
+ 'tools.staticdir.dir': '%s/ui/js' % GingerBasePaths().prefix,
+ 'tools.expires.on': True,
+ 'tools.expires.secs': CACHEEXPIRES,
+ 'tools.nocache.on': False
+ },
+ '/libs': {
+ 'tools.staticdir.on': True,
+ 'tools.staticdir.dir': '%s/ui/libs' % GingerBasePaths().prefix,
+ 'tools.expires.on': True,
+ 'tools.expires.secs': CACHEEXPIRES,
+ 'tools.nocache.on': False,
+ },
+ '/images': {
+ 'tools.staticdir.on': True,
+ 'tools.staticdir.dir':
+ '%s/ui/images' % GingerBasePaths().prefix,
+ 'tools.nocache.on': False
+ },
+ '/favicon.ico': {
+ 'tools.staticfile.on': True,
+ 'tools.staticfile.filename':
+ '%s/images/logo.ico' % GingerBasePaths().ui_dir
+ },
+ '/robots.txt': {
+ 'tools.staticfile.on': True,
+ 'tools.staticfile.filename':
+ '%s/robots.txt' % GingerBasePaths().ui_dir
+ },
+ '/help': {
+ 'tools.staticdir.on': True,
+ 'tools.staticdir.dir':
+ '%s/ui/pages/help' % GingerBasePaths().prefix,
+ 'tools.staticdir.index': 'en_US/index.html',
+ 'tools.nocache.on': True
+ }
+ }
+
+ kimchi_config = Parser().dict_from_file(GingerBasePaths().conf_file)
+ self.assertEquals(kimchi_config, configObj)
\ No newline at end of file
diff --git a/src/wok/plugins/gingerbase/tests/test_host.py b/src/wok/plugins/gingerbase/tests/test_host.py
new file mode 100644
index 0000000..8d9340e
--- /dev/null
+++ b/src/wok/plugins/gingerbase/tests/test_host.py
@@ -0,0 +1,152 @@
+# -*- coding: utf-8 -*-
+#
+# Project Ginger Base
+#
+# Copyright IBM, Corp. 2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+import json
+import os
+import platform
+import psutil
+import tempfile
+import time
+import unittest
+from functools import partial
+
+from wok.plugins.gingerbase.mockmodel import MockModel
+from utils import get_free_port, patch_auth, request, run_server, wait_task
+
+
+test_server = None
+model = None
+host = None
+ssl_port = None
+tmpfile = None
+
+
+def setUpModule():
+ global test_server, model, host, ssl_port, tmpfile
+
+ patch_auth()
+ tmpfile = tempfile.mktemp()
+ model = MockModel(tmpfile)
+ host = '127.0.0.1'
+ port = get_free_port('http')
+ ssl_port = get_free_port('https')
+ cherrypy_port = get_free_port('cherrypy_port')
+ test_server = run_server(host, port, ssl_port, test_mode=True,
+ cherrypy_port=cherrypy_port, model=model)
+
+
+def tearDownModule():
+ test_server.stop()
+ os.unlink(tmpfile)
+
+
+class HostTests(unittest.TestCase):
+ def setUp(self):
+ self.request = partial(request, host, ssl_port)
+
+ def test_hostinfo(self):
+ resp = self.request('/plugins/gingerbase/host').read()
+ info = json.loads(resp)
+ keys = ['os_distro', 'os_version', 'os_codename', 'cpu_model',
+ 'memory', 'cpus']
+ self.assertEquals(sorted(keys), sorted(info.keys()))
+
+ distro, version, codename = platform.linux_distribution()
+ self.assertEquals(distro, info['os_distro'])
+ self.assertEquals(version, info['os_version'])
+ self.assertEquals(unicode(codename, "utf-8"), info['os_codename'])
+ self.assertEquals(psutil.TOTAL_PHYMEM, info['memory'])
+
+ def test_hoststats(self):
+ time.sleep(1)
+ stats_keys = ['cpu_utilization', 'memory', 'disk_read_rate',
+ 'disk_write_rate', 'net_recv_rate', 'net_sent_rate']
+ resp = self.request('/plugins/gingerbase/host/stats').read()
+ stats = json.loads(resp)
+ self.assertEquals(sorted(stats_keys), sorted(stats.keys()))
+
+ cpu_utilization = stats['cpu_utilization']
+ self.assertIsInstance(cpu_utilization, float)
+ self.assertGreaterEqual(cpu_utilization, 0.0)
+ self.assertTrue(cpu_utilization <= 100.0)
+
+ memory_stats = stats['memory']
+ self.assertIn('total', memory_stats)
+ self.assertIn('free', memory_stats)
+ self.assertIn('cached', memory_stats)
+ self.assertIn('buffers', memory_stats)
+ self.assertIn('avail', memory_stats)
+
+ resp = self.request('/plugins/gingerbase/host/stats/history').read()
+ history = json.loads(resp)
+ self.assertEquals(sorted(stats_keys), sorted(history.keys()))
+
+ def test_host_actions(self):
+ def _task_lookup(taskid):
+ return json.loads(self.request('/plugins/gingerbase/tasks/%s' %
+ taskid).read())
+
+ resp = self.request('/plugins/gingerbase/host/shutdown', '{}', 'POST')
+ self.assertEquals(200, resp.status)
+ resp = self.request('/plugins/gingerbase/host/reboot', '{}', 'POST')
+ self.assertEquals(200, resp.status)
+
+ # Test system update
+ resp = self.request('/plugins/gingerbase/host/packagesupdate',
+ None, 'GET')
+ pkgs = json.loads(resp.read())
+ self.assertEquals(3, len(pkgs))
+
+ pkg_keys = ['package_name', 'repository', 'arch', 'version']
+ for p in pkgs:
+ name = p['package_name']
+ resp = self.request('/plugins/gingerbase/host/packagesupdate/'
+ + name, None, 'GET')
+ info = json.loads(resp.read())
+ self.assertEquals(sorted(pkg_keys), sorted(info.keys()))
+
+ resp = self.request('/plugins/gingerbase/host/swupdate', '{}', 'POST')
+ task = json.loads(resp.read())
+ task_params = [u'id', u'message', u'status', u'target_uri']
+ self.assertEquals(sorted(task_params), sorted(task.keys()))
+
+ resp = self.request('/tasks/' + task[u'id'], None, 'GET')
+ task_info = json.loads(resp.read())
+ self.assertEquals(task_info['status'], 'running')
+ wait_task(_task_lookup, task_info['id'])
+ resp = self.request('/tasks/' + task[u'id'], None, 'GET')
+ task_info = json.loads(resp.read())
+ self.assertEquals(task_info['status'], 'finished')
+ self.assertIn(u'All packages updated', task_info['message'])
+ pkgs = model.packagesupdate_get_list()
+ self.assertEquals(0, len(pkgs))
+
+ def test_host_partitions(self):
+ resp = self.request('/plugins/gingerbase/host/partitions')
+ self.assertEquals(200, resp.status)
+ partitions = json.loads(resp.read())
+
+ keys = ['name', 'path', 'type', 'fstype', 'size', 'mountpoint',
+ 'available']
+ for item in partitions:
+ resp = self.request('/plugins/gingerbase/host/partitions/%s' %
+ item['name'])
+ info = json.loads(resp.read())
+ self.assertEquals(sorted(info.keys()), sorted(keys))
\ No newline at end of file
diff --git a/src/wok/plugins/gingerbase/tests/test_model.py b/src/wok/plugins/gingerbase/tests/test_model.py
new file mode 100644
index 0000000..c6f6f6f
--- /dev/null
+++ b/src/wok/plugins/gingerbase/tests/test_model.py
@@ -0,0 +1,274 @@
+# -*- coding: utf-8 -*-
+#
+# Project Ginger Base
+#
+# Copyright IBM, Corp. 2013-2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+import os
+import shutil
+import unittest
+
+import wok.objectstore
+from wok.basemodel import Singleton
+from wok.exception import InvalidParameter, NotFoundError
+from wok.rollbackcontext import RollbackContext
+from wok.plugins.gingerbase.model import model
+
+invalid_repository_urls = ['www.fedora.org', # missing protocol
+ '://www.fedora.org', # missing protocol
+ 'http://www.fedora', # invalid domain name
+ 'file:///home/foobar'] # invalid path
+
+TMP_DIR = '/var/lib/kimchi/tests/'
+
+
+def setUpModule():
+ if not os.path.exists(TMP_DIR):
+ os.makedirs(TMP_DIR)
+
+ # iso_gen.construct_fake_iso(UBUNTU_ISO, True, '14.04', 'ubuntu')
+
+ # Some FeatureTests functions depend on server to validate their result.
+ # As CapabilitiesModel is a Singleton class it will get the first result
+ # from FeatureTests which may be wrong when using the Model instance
+ # directly - the case of this test_model.py
+ # So clean Singleton instances to make sure to get the right result when
+ # running the following tests.
+ Singleton._instances = {}
+
+
+def tearDownModule():
+ shutil.rmtree(TMP_DIR)
+
+
+class ModelTests(unittest.TestCase):
+ def setUp(self):
+ self.tmp_store = '/tmp/kimchi-store-test'
+
+ def tearDown(self):
+ # FIXME: Tests using 'test:///default' URI should be moved to
+ # test_rest or test_mockmodel to avoid overriding problems
+ # LibvirtConnection._connections['test:///default'] = {}
+
+ os.unlink(self.tmp_store)
+
+ def test_repository_create(self):
+ inst = model.Model(objstore_loc=self.tmp_store)
+
+ yum_repos = [{'repo_id': 'fedora-fake',
+ 'baseurl': 'http://www.fedora.org'},
+ {'repo_id': 'fedora-updates-fake',
+ 'config':
+ {'mirrorlist': 'http://www.fedoraproject.org'}}]
+
+ deb_repos = [{'baseurl': 'http://archive.ubuntu.com/ubuntu/',
+ 'config': {'dist': 'quantal'}},
+ {'baseurl': 'http://archive.ubuntu.com/ubuntu/',
+ 'config': {'dist': 'quantal', 'comps': ['main']}}]
+
+ yum_invalid_repos = []
+ deb_invalid_repos = []
+
+ for url in invalid_repository_urls:
+ wrong_baseurl = {'repo_id': 'wrong-id', 'baseurl': url}
+ wrong_mirrorlist = {'repo_id': 'wrong-id',
+ 'baseurl': 'www.example.com',
+ 'config': {'mirrorlist': url}}
+ wrong_config_item = {
+ 'repo_id': 'wrong-id',
+ 'baseurl': 'www.example.com',
+ 'config': {
+ 'gpgkey': 'file:///tmp/KEY-fedora-updates-fake-19'}}
+
+ yum_invalid_repos.append(wrong_baseurl)
+ yum_invalid_repos.append(wrong_mirrorlist)
+ yum_invalid_repos.append(wrong_config_item)
+
+ wrong_baseurl['config'] = {'dist': 'tasty'}
+ wrong_config = {'baseurl': deb_repos[0]['baseurl'],
+ 'config': {
+ 'unsupported_item': "a_unsupported_item"}}
+ deb_invalid_repos.append(wrong_baseurl)
+ deb_invalid_repos.append(wrong_config)
+
+ repo_type = inst.capabilities_lookup()['repo_mngt_tool']
+ if repo_type == 'yum':
+ test_repos = yum_repos
+ invalid_repos = yum_invalid_repos
+ elif repo_type == 'deb':
+ test_repos = deb_repos
+ invalid_repos = deb_invalid_repos
+ else:
+ # repository management tool was not recognized by Ginger Base
+ # skip test case
+ return
+
+ # create repositories with invalid data
+ for repo in invalid_repos:
+ self.assertRaises(InvalidParameter, inst.repositories_create, repo)
+
+ for repo in test_repos:
+ system_host_repos = len(inst.repositories_get_list())
+ repo_id = inst.repositories_create(repo)
+ host_repos = inst.repositories_get_list()
+ self.assertEquals(system_host_repos + 1, len(host_repos))
+
+ repo_info = inst.repository_lookup(repo_id)
+ self.assertEquals(repo_id, repo_info['repo_id'])
+ self.assertEquals(True, repo_info.get('enabled'))
+ self.assertEquals(repo.get('baseurl', ''),
+ repo_info.get('baseurl'))
+
+ original_config = repo.get('config', {})
+ config_info = repo_info.get('config', {})
+
+ if repo_type == 'yum':
+ self.assertEquals(original_config.get('mirrorlist', ''),
+ config_info.get('mirrorlist', ''))
+ self.assertEquals(True, config_info['gpgcheck'])
+ else:
+ self.assertEquals(original_config['dist'], config_info['dist'])
+ self.assertEquals(original_config.get('comps', []),
+ config_info.get('comps', []))
+
+ inst.repository_delete(repo_id)
+ self.assertRaises(NotFoundError, inst.repository_lookup, repo_id)
+
+ self.assertRaises(NotFoundError, inst.repository_lookup, 'google')
+
+ def test_repository_update(self):
+ inst = model.Model(objstore_loc=self.tmp_store)
+
+ yum_repo = {'repo_id': 'fedora-fake',
+ 'baseurl': 'http://www.fedora.org'}
+ yum_new_repo = {'baseurl': 'http://www.fedoraproject.org'}
+
+ deb_repo = {'baseurl': 'http://archive.ubuntu.com/ubuntu/',
+ 'config': {'dist': 'quantal'}}
+ deb_new_repo = {'baseurl': 'http://br.archive.canonical.com/ubuntu/',
+ 'config': {'dist': 'utopic'}}
+
+ yum_invalid_repos = []
+ deb_invalid_repos = []
+
+ for url in invalid_repository_urls:
+ wrong_baseurl = {'baseurl': url}
+ wrong_mirrorlist = {'baseurl': 'www.example.com',
+ 'config': {'mirrorlist': url}}
+
+ yum_invalid_repos.append(wrong_baseurl)
+ yum_invalid_repos.append(wrong_mirrorlist)
+
+ wrong_baseurl['config'] = {'dist': 'tasty'}
+ deb_invalid_repos.append(wrong_baseurl)
+
+ repo_type = inst.capabilities_lookup()['repo_mngt_tool']
+ if repo_type == 'yum':
+ repo = yum_repo
+ new_repo = yum_new_repo
+ invalid_repos = yum_invalid_repos
+ elif repo_type == 'deb':
+ repo = deb_repo
+ new_repo = deb_new_repo
+ invalid_repos = deb_invalid_repos
+ else:
+ # repository management tool was not recognized by Ginger Base
+ # skip test case
+ return
+
+ system_host_repos = len(inst.repositories_get_list())
+
+ with RollbackContext() as rollback:
+ repo_id = inst.repositories_create(repo)
+ rollback.prependDefer(inst.repository_delete, repo_id)
+
+ host_repos = inst.repositories_get_list()
+ self.assertEquals(system_host_repos + 1, len(host_repos))
+
+ # update repositories with invalid data
+ for tmp_repo in invalid_repos:
+ self.assertRaises(InvalidParameter, inst.repository_update,
+ repo_id, tmp_repo)
+
+ new_repo_id = inst.repository_update(repo_id, new_repo)
+ repo_info = inst.repository_lookup(new_repo_id)
+
+ self.assertEquals(new_repo_id, repo_info['repo_id'])
+ self.assertEquals(new_repo['baseurl'], repo_info['baseurl'])
+ self.assertEquals(True, repo_info['enabled'])
+ inst.repository_update(new_repo_id, repo)
+
+ def test_repository_disable_enable(self):
+ inst = model.Model(objstore_loc=self.tmp_store)
+
+ yum_repo = {'repo_id': 'fedora-fake',
+ 'baseurl': 'http://www.fedora.org'}
+ deb_repo = {'baseurl': 'http://archive.ubuntu.com/ubuntu/',
+ 'config': {'dist': 'quantal'}}
+
+ repo_type = inst.capabilities_lookup()['repo_mngt_tool']
+ if repo_type == 'yum':
+ repo = yum_repo
+ elif repo_type == 'deb':
+ repo = deb_repo
+ else:
+ # repository management tool was not recognized by Ginger Base
+ # skip test case
+ return
+
+ system_host_repos = len(inst.repositories_get_list())
+
+ repo_id = inst.repositories_create(repo)
+
+ host_repos = inst.repositories_get_list()
+ self.assertEquals(system_host_repos + 1, len(host_repos))
+
+ repo_info = inst.repository_lookup(repo_id)
+ self.assertEquals(True, repo_info['enabled'])
+
+ inst.repository_disable(repo_id)
+ repo_info = inst.repository_lookup(repo_id)
+ self.assertEquals(False, repo_info['enabled'])
+
+ inst.repository_enable(repo_id)
+ repo_info = inst.repository_lookup(repo_id)
+ self.assertEquals(True, repo_info['enabled'])
+
+ # remove files creates
+ inst.repository_delete(repo_id)
+
+
+class BaseModelTests(unittest.TestCase):
+ class FoosModel(object):
+ def __init__(self):
+ self.data = {}
+
+ def create(self, params):
+ self.data.update(params)
+
+ def get_list(self):
+ return list(self.data)
+
+ class TestModel(wok.basemodel.BaseModel):
+ def __init__(self):
+ foo = BaseModelTests.FoosModel()
+ super(BaseModelTests.TestModel, self).__init__([foo])
+
+ def test_root_model(self):
+ t = BaseModelTests.TestModel()
+ t.foos_create({'item1': 10})
+ self.assertEquals(t.foos_get_list(), ['item1'])
\ No newline at end of file
diff --git a/src/wok/plugins/gingerbase/tests/test_rest.py b/src/wok/plugins/gingerbase/tests/test_rest.py
new file mode 100644
index 0000000..d7cee1c
--- /dev/null
+++ b/src/wok/plugins/gingerbase/tests/test_rest.py
@@ -0,0 +1,182 @@
+# -*- coding: utf-8 -*-
+#
+# Project Kimchi
+#
+# Copyright IBM, Corp. 2013-2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+import json
+import os
+import time
+import unittest
+from functools import partial
+
+from wok.rollbackcontext import RollbackContext
+
+from wok.plugins.kimchi import mockmodel
+
+from utils import get_free_port, patch_auth, request
+from utils import run_server, wait_task
+
+
+test_server = None
+model = None
+host = None
+port = None
+ssl_port = None
+cherrypy_port = None
+
+
+def setUpModule():
+ global test_server, model, host, port, ssl_port, cherrypy_port
+
+ patch_auth()
+ model = mockmodel.MockModel('/tmp/obj-store-test')
+ host = '127.0.0.1'
+ port = get_free_port('http')
+ ssl_port = get_free_port('https')
+ cherrypy_port = get_free_port('cherrypy_port')
+ test_server = run_server(host, port, ssl_port, test_mode=True,
+ cherrypy_port=cherrypy_port, model=model)
+
+
+def tearDownModule():
+ test_server.stop()
+ os.unlink('/tmp/obj-store-test')
+
+
+class RestTests(unittest.TestCase):
+ def _async_op(self, cb, opaque):
+ time.sleep(1)
+ cb('success', True)
+
+ def _except_op(self, cb, opaque):
+ time.sleep(1)
+ raise Exception("Oops, this is an exception handle test."
+ " You can ignore it safely")
+ cb('success', True)
+
+ def _intermid_op(self, cb, opaque):
+ time.sleep(1)
+ cb('in progress')
+
+ def setUp(self):
+ self.request = partial(request, host, ssl_port)
+ model.reset()
+
+ def assertHTTPStatus(self, code, *args):
+ resp = self.request(*args)
+ self.assertEquals(code, resp.status)
+
+ def test_debugreports(self):
+ resp = request(host, ssl_port, '/plugins/kimchi/debugreports')
+ self.assertEquals(200, resp.status)
+
+ def _report_delete(self, name):
+ request(host, ssl_port, '/plugins/kimchi/debugreports/%s' % name, '{}',
+ 'DELETE')
+
+ def test_create_debugreport(self):
+ req = json.dumps({'name': 'report1'})
+ with RollbackContext() as rollback:
+ resp = request(host, ssl_port, '/plugins/kimchi/debugreports', req,
+ 'POST')
+ self.assertEquals(202, resp.status)
+ task = json.loads(resp.read())
+ # make sure the debugreport doesn't exist until the
+ # the task is finished
+ wait_task(self._task_lookup, task['id'])
+ rollback.prependDefer(self._report_delete, 'report2')
+ resp = request(host, ssl_port,
+ '/plugins/kimchi/debugreports/report1')
+ debugreport = json.loads(resp.read())
+ self.assertEquals("report1", debugreport['name'])
+ self.assertEquals(200, resp.status)
+ req = json.dumps({'name': 'report2'})
+ resp = request(host, ssl_port,
+ '/plugins/kimchi/debugreports/report1', req, 'PUT')
+ self.assertEquals(303, resp.status)
+
+ def test_debugreport_download(self):
+ req = json.dumps({'name': 'report1'})
+ with RollbackContext() as rollback:
+ resp = request(host, ssl_port, '/plugins/kimchi/debugreports', req,
+ 'POST')
+ self.assertEquals(202, resp.status)
+ task = json.loads(resp.read())
+ # make sure the debugreport doesn't exist until the
+ # the task is finished
+ wait_task(self._task_lookup, task['id'], 20)
+ rollback.prependDefer(self._report_delete, 'report1')
+ resp = request(host, ssl_port,
+ '/plugins/kimchi/debugreports/report1')
+ debugreport = json.loads(resp.read())
+ self.assertEquals("report1", debugreport['name'])
+ self.assertEquals(200, resp.status)
+ resp = request(host, ssl_port,
+ '/plugins/kimchi/debugreports/report1/content')
+ self.assertEquals(200, resp.status)
+ resp = request(host, ssl_port,
+ '/plugins/kimchi/debugreports/report1')
+ debugre = json.loads(resp.read())
+ resp = request(host, ssl_port, debugre['uri'])
+ self.assertEquals(200, resp.status)
+
+ def test_repositories(self):
+ def verify_repo(t, res):
+ for field in ('repo_id', 'enabled', 'baseurl', 'config'):
+ if field in t.keys():
+ self.assertEquals(t[field], res[field])
+
+ base_uri = '/plugins/kimchi/host/repositories'
+ resp = self.request(base_uri)
+ self.assertEquals(200, resp.status)
+ # Already have one repo in Kimchi's system
+ self.assertEquals(1, len(json.loads(resp.read())))
+
+ # Create a repository
+ repo = {'repo_id': 'fedora-fake',
+ 'baseurl': 'http://www.fedora.org'}
+ req = json.dumps(repo)
+ resp = self.request(base_uri, req, 'POST')
+ self.assertEquals(201, resp.status)
+
+ # Verify the repository
+ res = json.loads(self.request('%s/fedora-fake' % base_uri).read())
+ verify_repo(repo, res)
+
+ # Update the repository
+ params = {}
+ params['baseurl'] = repo['baseurl'] = 'http://www.fedoraproject.org'
+ resp = self.request('%s/fedora-fake' % base_uri, json.dumps(params),
+ 'PUT')
+
+ # Verify the repository
+ res = json.loads(self.request('%s/fedora-fake' % base_uri).read())
+ verify_repo(repo, res)
+
+ # Delete the repository
+ resp = self.request('%s/fedora-fake' % base_uri, '{}', 'DELETE')
+ self.assertEquals(204, resp.status)
+
+
+class HttpsRestTests(RestTests):
+ """
+ Run all of the same tests as above, but use https instead
+ """
+ def setUp(self):
+ self.request = partial(request, host, ssl_port)
+ model.reset()
diff --git a/src/wok/plugins/gingerbase/tests/utils.py b/src/wok/plugins/gingerbase/tests/utils.py
new file mode 100644
index 0000000..dccf764
--- /dev/null
+++ b/src/wok/plugins/gingerbase/tests/utils.py
@@ -0,0 +1,260 @@
+#
+# Project Ginger Base
+#
+# Copyright IBM, Corp. 2013-2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+
+import base64
+import cherrypy
+import grp
+import httplib
+import inspect
+import json
+import os
+import socket
+import ssl
+import sys
+import threading
+import time
+import unittest
+from contextlib import closing
+from lxml import etree
+
+import wok.server
+from wok.config import config, PluginPaths
+from wok.auth import User, USER_NAME, USER_GROUPS, USER_ROLES, tabs
+from wok.exception import NotFoundError, OperationFailed
+from wok.utils import wok_log
+
+from wok.plugins.gingerbase import mockmodel
+
+
+_ports = {}
+
+# provide missing unittest decorators and API for python 2.6; these decorators
+# do not actually work, just avoid the syntax failure
+if sys.version_info[:2] == (2, 6):
+ def skipUnless(condition, reason):
+ if not condition:
+ sys.stderr.write('[expected failure] ')
+ raise Exception(reason)
+ return lambda obj: obj
+
+ unittest.skipUnless = skipUnless
+ unittest.expectedFailure = lambda obj: obj
+
+ def assertGreater(self, a, b, msg=None):
+ if not a > b:
+ self.fail('%s not greater than %s' % (repr(a), repr(b)))
+
+ def assertGreaterEqual(self, a, b, msg=None):
+ if not a >= b:
+ self.fail('%s not greater than or equal to %s'
+ % (repr(a), repr(b)))
+
+ def assertIsInstance(self, obj, cls, msg=None):
+ if not isinstance(obj, cls):
+ self.fail('%s is not an instance of %r' % (repr(obj), cls))
+
+ def assertIn(self, a, b, msg=None):
+ if a not in b:
+ self.fail("%s is not in %b" % (repr(a), repr(b)))
+
+ def assertNotIn(self, a, b, msg=None):
+ if a in b:
+ self.fail("%s is in %b" % (repr(a), repr(b)))
+
+ unittest.TestCase.assertGreaterEqual = assertGreaterEqual
+ unittest.TestCase.assertGreater = assertGreater
+ unittest.TestCase.assertIsInstance = assertIsInstance
+ unittest.TestCase.assertIn = assertIn
+ unittest.TestCase.assertNotIn = assertNotIn
+
+
+def get_free_port(name='http'):
+ global _ports
+ if _ports.get(name) is not None:
+ return _ports[name]
+ sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ with closing(sock):
+ try:
+ sock.bind(("0.0.0.0", 0))
+ except:
+ raise Exception("Could not find a free port")
+ _ports[name] = sock.getsockname()[1]
+ return _ports[name]
+
+
+def run_server(host, port, ssl_port, test_mode, cherrypy_port=None,
+ model=None, environment='development'):
+
+ if cherrypy_port is None:
+ cherrypy_port = get_free_port('cherrypy_port')
+
+ if ssl_port is None:
+ ssl_port = get_free_port('https')
+
+ args = type('_', (object,),
+ {'host': host, 'port': port, 'ssl_port': ssl_port,
+ 'cherrypy_port': cherrypy_port, 'max_body_size': '4*1024',
+ 'ssl_cert': '', 'ssl_key': '',
+ 'test': test_mode, 'access_log': '/dev/null',
+ 'error_log': '/dev/null', 'environment': environment,
+ 'log_level': 'debug'})()
+ if model is not None:
+ setattr(args, 'model', model)
+
+ s = wok.server.Server(args)
+ t = threading.Thread(target=s.start)
+ t.setDaemon(True)
+ t.start()
+ cherrypy.engine.wait(cherrypy.engine.states.STARTED)
+ return s
+
+
+def silence_server():
+ """
+ Silence server status messages on stdout
+ """
+ cherrypy.config.update({"environment": "embedded"})
+
+
+def running_as_root():
+ return os.geteuid() == 0
+
+
+def _request(conn, path, data, method, headers):
+ if headers is None:
+ headers = {'Content-Type': 'application/json',
+ 'Accept': 'application/json'}
+ if 'AUTHORIZATION' not in headers.keys():
+ user, pw = mockmodel.fake_user.items()[0]
+ hdr = "Basic " + base64.b64encode("%s:%s" % (user, pw))
+ headers['AUTHORIZATION'] = hdr
+ conn.request(method, path, data, headers)
+ return conn.getresponse()
+
+
+def request(host, port, path, data=None, method='GET', headers=None):
+ # verify if HTTPSConnection has context parameter
+ if "context" in inspect.getargspec(httplib.HTTPSConnection.__init__).args:
+ context = ssl._create_unverified_context()
+ conn = httplib.HTTPSConnection(host, port, context=context)
+ else:
+ conn = httplib.HTTPSConnection(host, port)
+
+ return _request(conn, path, data, method, headers)
+
+
+def get_remote_iso_path():
+ """
+ Get a remote iso with the right arch from the distro files shipped
+ with kimchi.
+ """
+ host_arch = os.uname()[4]
+ remote_path = ''
+ with open(os.path.join(PluginPaths('kimchi').conf_dir, 'distros.d', 'fedora.json')) \
+ as fedora_isos:
+ # Get a list of dicts
+ json_isos_list = json.load(fedora_isos)
+ for iso in json_isos_list:
+ if (iso.get('os_arch')) == host_arch:
+ remote_path = iso.get('path')
+ break
+
+ return remote_path
+
+
+class FakeUser(User):
+ auth_type = "fake"
+ sudo = True
+
+ def __init__(self, username):
+ self.user = {}
+ self.user[USER_NAME] = username
+ self.user[USER_GROUPS] = None
+ self.user[USER_ROLES] = dict.fromkeys(tabs, 'user')
+
+ def get_groups(self):
+ return sorted([group.gr_name for group in grp.getgrall()])[0:3]
+
+ def get_roles(self):
+ if self.sudo:
+ self.user[USER_ROLES] = dict.fromkeys(tabs, 'admin')
+ return self.user[USER_ROLES]
+
+ def get_user(self):
+ return self.user
+
+ @staticmethod
+ def authenticate(username, password, service="passwd"):
+ try:
+ return mockmodel.fake_user[username] == password
+ except KeyError, e:
+ raise OperationFailed("GGBAUTH0001E", {'username': 'username',
+ 'code': e.message})
+
+
+def patch_auth(sudo=True):
+ """
+ Override the authenticate function with a simple test against an
+ internal dict of users and passwords.
+ """
+ config.set("authentication", "method", "fake")
+ FakeUser.sudo = sudo
+
+
+def normalize_xml(xml_str):
+ return etree.tostring(etree.fromstring(xml_str,
+ etree.XMLParser(remove_blank_text=True)))
+
+
+def wait_task(task_lookup, taskid, timeout=10):
+ for i in range(0, timeout):
+ task_info = task_lookup(taskid)
+ if task_info['status'] == "running":
+ wok_log.info("Waiting task %s, message: %s",
+ taskid, task_info['message'])
+ time.sleep(1)
+ else:
+ return
+ wok_log.error("Timeout while process long-run task, "
+ "try to increase timeout value.")
+
+
+# The action functions in model backend raise NotFoundError exception if the
+# element is not found. But in some tests, these functions are called after
+# the element has been deleted if test finishes correctly, then NofFoundError
+# exception is raised and rollback breaks. To avoid it, this wrapper ignores
+# the NotFoundError.
+def rollback_wrapper(func, resource, *args):
+ try:
+ func(resource, *args)
+ except NotFoundError:
+ # VM has been deleted already
+ return
+
+
+# This function is used to test storage volume upload.
+# If we use self.request, we may encode multipart formdata by ourselves
+# requests lib take care of encode part, so use this lib instead
+def fake_auth_header():
+ headers = {'Accept': 'application/json'}
+ user, pw = mockmodel.fake_user.items()[0]
+ hdr = "Basic " + base64.b64encode("%s:%s" % (user, pw))
+ headers['AUTHORIZATION'] = hdr
+ return headers
--
2.1.0
9 years, 2 months
[PATCH 08/15] V4 Ginger Base : base plugin model files
by chandra@linux.vnet.ibm.com
From: chandrureddy <chandra(a)linux.vnet.ibm.com>
---
src/wok/plugins/gingerbase/model/Makefile.am | 25 ++
src/wok/plugins/gingerbase/model/__init__.py | 18 +
src/wok/plugins/gingerbase/model/cpuinfo.py | 103 ++++++
src/wok/plugins/gingerbase/model/debugreports.py | 213 ++++++++++++
src/wok/plugins/gingerbase/model/host.py | 426 +++++++++++++++++++++++
src/wok/plugins/gingerbase/model/model.py | 49 +++
src/wok/plugins/kimchi/model/debugreports.py | 213 ------------
7 files changed, 834 insertions(+), 213 deletions(-)
create mode 100644 src/wok/plugins/gingerbase/model/Makefile.am
create mode 100644 src/wok/plugins/gingerbase/model/__init__.py
create mode 100644 src/wok/plugins/gingerbase/model/cpuinfo.py
create mode 100644 src/wok/plugins/gingerbase/model/debugreports.py
create mode 100644 src/wok/plugins/gingerbase/model/host.py
create mode 100644 src/wok/plugins/gingerbase/model/model.py
delete mode 100644 src/wok/plugins/kimchi/model/debugreports.py
diff --git a/src/wok/plugins/gingerbase/model/Makefile.am b/src/wok/plugins/gingerbase/model/Makefile.am
new file mode 100644
index 0000000..80c4e07
--- /dev/null
+++ b/src/wok/plugins/gingerbase/model/Makefile.am
@@ -0,0 +1,25 @@
+#
+# Ginger Base
+#
+# Copyright IBM Corp, 2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+model_PYTHON = *.py
+
+modeldir = $(pythondir)/wok/plugins/gingerbase/model
+
+install-data-local:
+ $(MKDIR_P) $(DESTDIR)$(modeldir)
diff --git a/src/wok/plugins/gingerbase/model/__init__.py b/src/wok/plugins/gingerbase/model/__init__.py
new file mode 100644
index 0000000..355a76c
--- /dev/null
+++ b/src/wok/plugins/gingerbase/model/__init__.py
@@ -0,0 +1,18 @@
+#
+# Project Ginger Base
+#
+# Copyright IBM, Corp. 2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/wok/plugins/gingerbase/model/cpuinfo.py b/src/wok/plugins/gingerbase/model/cpuinfo.py
new file mode 100644
index 0000000..688d58f
--- /dev/null
+++ b/src/wok/plugins/gingerbase/model/cpuinfo.py
@@ -0,0 +1,103 @@
+#
+# Project Ginger Base
+#
+# Copyright IBM, Corp. 2014-2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+import platform
+
+from wok.exception import InvalidParameter, InvalidOperation
+from wok.utils import run_command
+from ..lscpu import LsCpu
+
+
+ARCH = 'power' if platform.machine().startswith('ppc') else 'x86'
+
+
+class CPUInfoModel(object):
+ """
+ Get information about a CPU for hyperthreading (on x86)
+ or SMT (on POWER) for logic when creating templates and VMs.
+ """
+
+ def __init__(self, **kargs):
+ self.guest_threads_enabled = False
+ self.sockets = 0
+ self.cores_present = 0
+ self.cores_available = 0
+ self.cores_per_socket = 0
+ self.threads_per_core = 0
+ self.max_threads = 0
+ self.lscpu = LsCpu()
+
+ if ARCH == 'power':
+ # IBM PowerPC
+ self.guest_threads_enabled = True
+ out, error, rc = run_command(['ppc64_cpu', '--smt'])
+ if rc or 'on' in out:
+ # SMT has to be disabled for guest to use threads as CPUs.
+ # rc is always zero, whether SMT is off or on.
+ self.guest_threads_enabled = False
+ out, error, rc = run_command(['ppc64_cpu', '--cores-present'])
+ if not rc:
+ self.cores_present = int(out.split()[-1])
+ out, error, rc = run_command(['ppc64_cpu', '--cores-on'])
+ if not rc:
+ self.cores_available = int(out.split()[-1])
+ out, error, rc = run_command(['ppc64_cpu', '--threads-per-core'])
+ if not rc:
+ self.threads_per_core = int(out.split()[-1])
+ self.sockets = self.cores_present/self.threads_per_core
+ if self.sockets == 0:
+ self.sockets = 1
+ self.cores_per_socket = self.cores_present/self.sockets
+ else:
+ # Intel or AMD
+ self.guest_threads_enabled = True
+ self.sockets = int(self.lscpu.get_sockets())
+ self.cores_per_socket = int(self.lscpu.get_cores_per_socket())
+ self.cores_present = self.cores_per_socket * self.sockets
+ self.cores_available = self.cores_present
+ self.threads_per_core = self.lscpu.get_threads_per_core()
+
+ def lookup(self, ident):
+ return {
+ 'guest_threads_enabled': self.guest_threads_enabled,
+ 'sockets': self.sockets,
+ 'cores_per_socket': self.cores_per_socket,
+ 'cores_present': self.cores_present,
+ 'cores_available': self.cores_available,
+ 'threads_per_core': self.threads_per_core,
+ }
+
+ def check_topology(self, vcpus, topology):
+ """
+ param vcpus: should be an integer
+ param iso_path: the path of the guest ISO
+ param topology: {'sockets': x, 'cores': x, 'threads': x}
+ """
+ sockets = topology['sockets']
+ cores = topology['cores']
+ threads = topology['threads']
+
+ if not self.guest_threads_enabled:
+ raise InvalidOperation("GGBCPUINF0003E")
+ if vcpus != sockets * cores * threads:
+ raise InvalidParameter("GGBCPUINF0002E")
+ if vcpus > self.cores_available * self.threads_per_core:
+ raise InvalidParameter("GGBCPUINF0001E")
+ if threads > self.threads_per_core:
+ raise InvalidParameter("GGBCPUINF0002E")
diff --git a/src/wok/plugins/gingerbase/model/debugreports.py b/src/wok/plugins/gingerbase/model/debugreports.py
new file mode 100644
index 0000000..33ae357
--- /dev/null
+++ b/src/wok/plugins/gingerbase/model/debugreports.py
@@ -0,0 +1,213 @@
+#
+# Project Ginger Base
+#
+# Copyright IBM, Corp. 2014-2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+import fnmatch
+import glob
+import logging
+import os
+import shutil
+import subprocess
+import time
+
+from wok.exception import InvalidParameter, NotFoundError, OperationFailed
+from wok.exception import WokException
+from wok.utils import add_task, wok_log
+from wok.utils import run_command
+from wok.model.tasks import TaskModel
+
+from wok.plugins.kimchi import config
+
+
+class DebugReportsModel(object):
+ def __init__(self, **kargs):
+ self.objstore = kargs['objstore']
+ self.task = TaskModel(**kargs)
+
+ def create(self, params):
+ ident = params.get('name').strip()
+ # Generate a name with time and millisec precision, if necessary
+ if ident is None or ident == "":
+ ident = 'report-' + str(int(time.time() * 1000))
+ else:
+ if ident in self.get_list():
+ raise InvalidParameter("GGBDR0008E", {"name": ident})
+ taskid = self._gen_debugreport_file(ident)
+ return self.task.lookup(taskid)
+
+ def get_list(self):
+ path = config.get_debugreports_path()
+ file_pattern = os.path.join(path, '*.*')
+ file_lists = glob.glob(file_pattern)
+ file_lists = [os.path.split(file)[1] for file in file_lists]
+ name_lists = [file.split('.', 1)[0] for file in file_lists]
+
+ return name_lists
+
+ def _gen_debugreport_file(self, name):
+ gen_cmd = self.get_system_report_tool()
+
+ if gen_cmd is not None:
+ return add_task('/plugins/gingerbase/debugreports/%s' % name,
+ gen_cmd, self.objstore, name)
+
+ raise OperationFailed("GGBDR0002E")
+
+ @staticmethod
+ def sosreport_generate(cb, name):
+ def log_error(e):
+ log = logging.getLogger('Model')
+ log.warning('Exception in generating debug file: %s', e)
+
+ try:
+ command = ['sosreport', '--batch', '--name=%s' % name]
+ output, error, retcode = run_command(command)
+
+ if retcode != 0:
+ raise OperationFailed("GGBDR0003E", {'name': name,
+ 'err': retcode})
+
+ # SOSREPORT might create file in /tmp or /var/tmp
+ # FIXME: The right way should be passing the tar.xz file directory
+ # though the parameter '--tmp-dir', but it is failing in Fedora 20
+ patterns = ['/tmp/sosreport-%s-*', '/var/tmp/sosreport-%s-*']
+ reports = []
+ reportFile = None
+ for p in patterns:
+ reports = reports + [f for f in glob.glob(p % name)]
+ for f in reports:
+ if not fnmatch.fnmatch(f, '*.md5'):
+ reportFile = f
+ break
+ # Some error in sosreport happened
+ if reportFile is None:
+ wok_log.error('Debug report file not found. See sosreport '
+ 'output for detail:\n%s', output)
+ fname = (patterns[0] % name).split('/')[-1]
+ raise OperationFailed('GGBDR0004E', {'name': fname})
+
+ md5_report_file = reportFile + '.md5'
+ report_file_extension = '.' + reportFile.split('.', 1)[1]
+ path = config.get_debugreports_path()
+ target = os.path.join(path, name + report_file_extension)
+ # Moving report
+ msg = 'Moving debug report file "%s" to "%s"' % (reportFile,
+ target)
+ wok_log.info(msg)
+ shutil.move(reportFile, target)
+ # Deleting md5
+ msg = 'Deleting report md5 file: "%s"' % (md5_report_file)
+ wok_log.info(msg)
+ with open(md5_report_file) as f:
+ md5 = f.read().strip()
+ wok_log.info('Md5 file content: "%s"', md5)
+ os.remove(md5_report_file)
+ cb('OK', True)
+ return
+
+ except WokException as e:
+ log_error(e)
+ raise
+
+ except OSError as e:
+ log_error(e)
+ raise
+
+ except Exception, e:
+ # No need to call cb to update the task status here.
+ # The task object will catch the exception raised here
+ # and update the task status there
+ log_error(e)
+ raise OperationFailed("GGBDR0005E", {'name': name, 'err': e})
+
+ @staticmethod
+ def get_system_report_tool():
+ # Please add new possible debug report command here
+ # and implement the report generating function
+ # based on the new report command
+ report_tools = ({'cmd': 'sosreport --help',
+ 'fn': DebugReportsModel.sosreport_generate},)
+
+ # check if the command can be found by shell one by one
+ for helper_tool in report_tools:
+ try:
+ retcode = subprocess.call(helper_tool['cmd'], shell=True,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
+ if retcode == 0:
+ return helper_tool['fn']
+ except Exception, e:
+ wok_log.info('Exception running command: %s', e)
+
+ return None
+
+
+class DebugReportModel(object):
+ def __init__(self, **kargs):
+ pass
+
+ def lookup(self, name):
+ path = config.get_debugreports_path()
+ file_pattern = os.path.join(path, name)
+ file_pattern = file_pattern + '.*'
+ try:
+ file_target = glob.glob(file_pattern)[0]
+ except IndexError:
+ raise NotFoundError("GGBDR0001E", {'name': name})
+
+ ctime = os.stat(file_target).st_mtime
+ ctime = time.strftime("%Y-%m-%d-%H:%M:%S", time.localtime(ctime))
+ file_target = os.path.split(file_target)[-1]
+ file_target = os.path.join("plugins/gingerbase/data/debugreports",
+ file_target)
+ return {'uri': file_target,
+ 'ctime': ctime}
+
+ def update(self, name, params):
+ path = config.get_debugreports_path()
+ file_pattern = os.path.join(path, name + '.*')
+ try:
+ file_source = glob.glob(file_pattern)[0]
+ except IndexError:
+ raise NotFoundError("GGBDR0001E", {'name': name})
+
+ file_target = file_source.replace(name, params['name'])
+ if os.path.isfile(file_target):
+ raise InvalidParameter('GGBDR0008E', {'name': params['name']})
+
+ shutil.move(file_source, file_target)
+ wok_log.info('%s renamed to %s' % (file_source, file_target))
+ return params['name']
+
+ def delete(self, name):
+ path = config.get_debugreports_path()
+ file_pattern = os.path.join(path, name + '.*')
+ try:
+ file_target = glob.glob(file_pattern)[0]
+ except IndexError:
+ raise NotFoundError("GGBDR0001E", {'name': name})
+
+ os.remove(file_target)
+
+
+class DebugReportContentModel(object):
+ def __init__(self, **kargs):
+ self._debugreport = DebugReportModel()
+
+ def lookup(self, name):
+ return self._debugreport.lookup(name)
diff --git a/src/wok/plugins/gingerbase/model/host.py b/src/wok/plugins/gingerbase/model/host.py
new file mode 100644
index 0000000..2bc2fdc
--- /dev/null
+++ b/src/wok/plugins/gingerbase/model/host.py
@@ -0,0 +1,426 @@
+#
+# Project Ginger Base
+#
+# Copyright IBM, Corp. 2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+import os
+import platform
+import psutil
+import time
+from cherrypy.process.plugins import BackgroundTask
+from collections import defaultdict
+import glob
+
+from wok.basemodel import Singleton
+from wok.exception import InvalidOperation
+from wok.exception import OperationFailed
+from wok.utils import add_task, wok_log
+
+
+from .. import disks
+from ..repositories import Repositories
+from ..swupdate import SoftwareUpdate
+from debugreports import DebugReportsModel
+from wok.model.tasks import TaskModel
+from wok.config import config as kconfig
+
+
+HOST_STATS_INTERVAL = 1
+
+
+class HostModel(object):
+ def __init__(self, **kargs):
+ # self.conn = kargs['conn']
+ self.objstore = kargs['objstore']
+ self.task = TaskModel(**kargs)
+ self.host_info = self._get_host_info()
+
+ def _get_ppc_cpu_info(self):
+ res = {}
+ with open('/proc/cpuinfo') as f:
+ for line in f.xreadlines():
+ # Parse CPU, CPU's revision and CPU's clock information
+ for key in ['cpu', 'revision', 'clock']:
+ if key in line:
+ info = line.split(':')[1].strip()
+ if key == 'clock':
+ value = float(info.split('MHz')[0].strip()) / 1000
+ else:
+ value = info.split('(')[0].strip()
+ res[key] = value
+
+ # Power machines show, for each cpu/core, a block with
+ # all cpu information. Here we control the scan of the
+ # necessary information (1st block provides
+ # everything), skipping the function when find all
+ # information.
+ if len(res.keys()) == 3:
+ return "%(cpu)s (%(revision)s) @ %(clock)s GHz\
+ " % res
+
+ return ""
+
+ def _get_host_info(self):
+ res = {}
+ if platform.machine().startswith('ppc'):
+ res['cpu_model'] = self._get_ppc_cpu_info()
+ else:
+ with open('/proc/cpuinfo') as f:
+ for line in f.xreadlines():
+ if "model name" in line:
+ res['cpu_model'] = line.split(':')[1].strip()
+ break
+
+ res['cpus'] = 0
+ res['memory'] = 0L
+
+ # Include IBM PowerKVM name to supported distro names
+ _sup_distros = platform._supported_dists + ('ibm_powerkvm',)
+ # 'fedora' '17' 'Beefy Miracle'
+ distro, version, codename = platform.linux_distribution(
+ supported_dists=_sup_distros)
+ res['os_distro'] = distro
+ res['os_version'] = version
+ res['os_codename'] = unicode(codename, "utf-8")
+
+ return res
+
+ def lookup(self, *name):
+ cpus = psutil.NUM_CPUS
+
+ # psutil is unstable on how to get the number of
+ # cpus, different versions call it differently
+ if hasattr(psutil, 'cpu_count'):
+ cpus = psutil.cpu_count()
+
+ elif hasattr(psutil, 'NUM_CPUS'):
+ cpus = psutil.NUM_CPUS
+
+ elif hasattr(psutil, '_psplatform'):
+ for method_name in ['_get_num_cpus', 'get_num_cpus']:
+
+ method = getattr(psutil._psplatform, method_name, None)
+ if method is not None:
+ cpus = method()
+ break
+
+ self.host_info['cpus'] = cpus
+ if hasattr(psutil, 'phymem_usage'):
+ self.host_info['memory'] = psutil.phymem_usage().total
+ elif hasattr(psutil, 'virtual_memory'):
+ self.host_info['memory'] = psutil.virtual_memory().total
+ return self.host_info
+
+ def swupdate(self, *name):
+ try:
+ swupdate = SoftwareUpdate()
+ except:
+ raise OperationFailed('GGBPKGUPD0004E')
+
+ pkgs = swupdate.getNumOfUpdates()
+ if pkgs == 0:
+ raise OperationFailed('GGBPKGUPD0001E')
+
+ wok_log.debug('Host is going to be updated.')
+ taskid = add_task('/plugins/gingerbase/host/swupdate',
+ swupdate.doUpdate,
+ self.objstore, None)
+ return self.task.lookup(taskid)
+
+ def shutdown(self, args=None):
+ # Check for running vms before shutdown
+ # FIXME : Find alternative way to figure out if any vms running
+ # running_vms = self._get_vms_list_by_state('running')
+ # if len(running_vms) > 0:
+ # raise OperationFailed("GGBHOST0001E")
+
+ wok_log.info('Host is going to shutdown.')
+ os.system('shutdown -h now')
+
+ def reboot(self, args=None):
+ # Find running VMs
+ # FIXME : Find alternative way to figure out if any vms running
+ # running_vms = self._get_vms_list_by_state('running')
+ # if len(running_vms) > 0:
+ # raise OperationFailed("GGBHOST0002E")
+
+ wok_log.info('Host is going to reboot.')
+ os.system('reboot')
+
+ # def _get_vms_list_by_state(self, state):
+ # conn = self.conn.get()
+ # return [dom.name().decode('utf-8')
+ # for dom in conn.listAllDomains(0)
+ # if (DOM_STATE_MAP[dom.info()[0]]) == state]
+
+
+class HostStatsModel(object):
+ __metaclass__ = Singleton
+
+ def __init__(self, **kargs):
+ self.host_stats = defaultdict(list)
+ self.host_stats_thread = BackgroundTask(HOST_STATS_INTERVAL,
+ self._update_host_stats)
+ self.host_stats_thread.start()
+
+ def lookup(self, *name):
+ return {'cpu_utilization': self.host_stats['cpu_utilization'][-1],
+ 'memory': self.host_stats['memory'][-1],
+ 'disk_read_rate': self.host_stats['disk_read_rate'][-1],
+ 'disk_write_rate': self.host_stats['disk_write_rate'][-1],
+ 'net_recv_rate': self.host_stats['net_recv_rate'][-1],
+ 'net_sent_rate': self.host_stats['net_sent_rate'][-1]}
+
+ def _update_host_stats(self):
+ preTimeStamp = self.host_stats['timestamp']
+ timestamp = time.time()
+ # FIXME when we upgrade psutil, we can get uptime by psutil.uptime
+ # we get uptime by float(open("/proc/uptime").readline().split()[0])
+ # and calculate the first io_rate after the OS started.
+ with open("/proc/uptime") as time_f:
+ seconds = (timestamp - preTimeStamp if preTimeStamp else
+ float(time_f.readline().split()[0]))
+
+ self.host_stats['timestamp'] = timestamp
+ self._get_host_disk_io_rate(seconds)
+ self._get_host_network_io_rate(seconds)
+
+ self._get_percentage_host_cpu_usage()
+ self._get_host_memory_stats()
+
+ # store only 60 stats (1 min)
+ for key, value in self.host_stats.iteritems():
+ if isinstance(value, list):
+ if len(value) == 60:
+ self.host_stats[key] = value[10:]
+
+ def _get_percentage_host_cpu_usage(self):
+ # This is cpu usage producer. This producer will calculate the usage
+ # at an interval of HOST_STATS_INTERVAL.
+ # The psutil.cpu_percent works as non blocking.
+ # psutil.cpu_percent maintains a cpu time sample.
+ # It will update the cpu time sample when it is called.
+ # So only this producer can call psutil.cpu_percent in kimchi.
+ self.host_stats['cpu_utilization'].append(psutil.cpu_percent(None))
+
+ def _get_host_memory_stats(self):
+ virt_mem = psutil.virtual_memory()
+ # available:
+ # the actual amount of available memory that can be given
+ # instantly to processes that request more memory in bytes; this
+ # is calculated by summing different memory values depending on
+ # the platform (e.g. free + buffers + cached on Linux)
+ memory_stats = {'total': virt_mem.total,
+ 'free': virt_mem.free,
+ 'cached': virt_mem.cached,
+ 'buffers': virt_mem.buffers,
+ 'avail': virt_mem.available}
+ self.host_stats['memory'].append(memory_stats)
+
+ def _get_host_disk_io_rate(self, seconds):
+ disk_read_bytes = self.host_stats['disk_read_bytes']
+ disk_write_bytes = self.host_stats['disk_write_bytes']
+ prev_read_bytes = disk_read_bytes[-1] if disk_read_bytes else 0
+ prev_write_bytes = disk_write_bytes[-1] if disk_write_bytes else 0
+
+ disk_io = psutil.disk_io_counters(False)
+ read_bytes = disk_io.read_bytes
+ write_bytes = disk_io.write_bytes
+
+ rd_rate = int(float(read_bytes - prev_read_bytes) / seconds + 0.5)
+ wr_rate = int(float(write_bytes - prev_write_bytes) / seconds + 0.5)
+
+ self.host_stats['disk_read_rate'].append(rd_rate)
+ self.host_stats['disk_write_rate'].append(wr_rate)
+ self.host_stats['disk_read_bytes'].append(read_bytes)
+ self.host_stats['disk_write_bytes'].append(write_bytes)
+
+ def _get_host_network_io_rate(self, seconds):
+ net_recv_bytes = self.host_stats['net_recv_bytes']
+ net_sent_bytes = self.host_stats['net_sent_bytes']
+ prev_recv_bytes = net_recv_bytes[-1] if net_recv_bytes else 0
+ prev_sent_bytes = net_sent_bytes[-1] if net_sent_bytes else 0
+
+ net_ios = psutil.network_io_counters(True)
+ recv_bytes = 0
+ sent_bytes = 0
+ for key in set(self.nics() +
+ self.wlans()) & set(net_ios.iterkeys()):
+ recv_bytes = recv_bytes + net_ios[key].bytes_recv
+ sent_bytes = sent_bytes + net_ios[key].bytes_sent
+
+ rx_rate = int(float(recv_bytes - prev_recv_bytes) / seconds + 0.5)
+ tx_rate = int(float(sent_bytes - prev_sent_bytes) / seconds + 0.5)
+
+ self.host_stats['net_recv_rate'].append(rx_rate)
+ self.host_stats['net_sent_rate'].append(tx_rate)
+ self.host_stats['net_recv_bytes'].append(recv_bytes)
+ self.host_stats['net_sent_bytes'].append(sent_bytes)
+
+ def wlans(self):
+ WLAN_PATH = '/sys/class/net/*/wireless'
+ return [b.split('/')[-2] for b in glob.glob(WLAN_PATH)]
+
+ # FIXME if we do not want to list usb nic
+ def nics(self):
+ NIC_PATH = '/sys/class/net/*/device'
+ return list(set([b.split('/')[-2] for b in glob.glob(NIC_PATH)]) -
+ set(self.wlans()))
+
+
+class HostStatsHistoryModel(object):
+ def __init__(self, **kargs):
+ self.history = HostStatsModel(**kargs)
+
+ def lookup(self, *name):
+ return {'cpu_utilization': self.history.host_stats['cpu_utilization'],
+ 'memory': self.history.host_stats['memory'],
+ 'disk_read_rate': self.history.host_stats['disk_read_rate'],
+ 'disk_write_rate': self.history.host_stats['disk_write_rate'],
+ 'net_recv_rate': self.history.host_stats['net_recv_rate'],
+ 'net_sent_rate': self.history.host_stats['net_sent_rate']}
+
+
+class CapabilitiesModel(object):
+ __metaclass__ = Singleton
+
+ def __init__(self, **kargs):
+ pass
+
+ def lookup(self, *ident):
+ report_tool = DebugReportsModel.get_system_report_tool()
+ try:
+ SoftwareUpdate()
+ except Exception:
+ update_tool = False
+ else:
+ update_tool = True
+
+ try:
+ repo = Repositories()
+ except Exception:
+ repo_mngt_tool = None
+ else:
+ repo_mngt_tool = repo._pkg_mnger.TYPE
+
+ return {'system_report_tool': bool(report_tool),
+ 'update_tool': update_tool,
+ 'repo_mngt_tool': repo_mngt_tool,
+ 'federation': kconfig.get("server", "federation")
+ }
+
+
+class PartitionsModel(object):
+ def __init__(self, **kargs):
+ pass
+
+ def get_list(self):
+ result = disks.get_partitions_names()
+ return result
+
+
+class PartitionModel(object):
+ def __init__(self, **kargs):
+ pass
+
+ def lookup(self, name):
+ return disks.get_partition_details(name)
+
+
+class PackagesUpdateModel(object):
+ def __init__(self, **kargs):
+ try:
+ self.host_swupdate = SoftwareUpdate()
+ except:
+ self.host_swupdate = None
+
+ def get_list(self):
+ if self.host_swupdate is None:
+ raise OperationFailed('GGBPKGUPD0004E')
+
+ return self.host_swupdate.getUpdates()
+
+
+class PackageUpdateModel(object):
+ def __init__(self, **kargs):
+ pass
+
+ def lookup(self, name):
+ try:
+ swupdate = SoftwareUpdate()
+ except Exception:
+ raise OperationFailed('GGBPKGUPD0004E')
+
+ return swupdate.getUpdate(name)
+
+
+class RepositoriesModel(object):
+ def __init__(self, **kargs):
+ try:
+ self.host_repositories = Repositories()
+ except:
+ self.host_repositories = None
+
+ def get_list(self):
+ if self.host_repositories is None:
+ raise InvalidOperation('GGBREPOS0014E')
+
+ return sorted(self.host_repositories.getRepositories())
+
+ def create(self, params):
+ if self.host_repositories is None:
+ raise InvalidOperation('GGBREPOS0014E')
+
+ return self.host_repositories.addRepository(params)
+
+
+class RepositoryModel(object):
+ def __init__(self, **kargs):
+ try:
+ self._repositories = Repositories()
+ except:
+ self._repositories = None
+
+ def lookup(self, repo_id):
+ if self._repositories is None:
+ raise InvalidOperation('GGBREPOS0014E')
+
+ return self._repositories.getRepository(repo_id)
+
+ def enable(self, repo_id):
+ if self._repositories is None:
+ raise InvalidOperation('GGBREPOS0014E')
+
+ return self._repositories.enableRepository(repo_id)
+
+ def disable(self, repo_id):
+ if self._repositories is None:
+ raise InvalidOperation('GGBREPOS0014E')
+
+ return self._repositories.disableRepository(repo_id)
+
+ def update(self, repo_id, params):
+ if self._repositories is None:
+ raise InvalidOperation('GGBREPOS0014E')
+
+ return self._repositories.updateRepository(repo_id, params)
+
+ def delete(self, repo_id):
+ if self._repositories is None:
+ raise InvalidOperation('GGBREPOS0014E')
+
+ return self._repositories.removeRepository(repo_id)
diff --git a/src/wok/plugins/gingerbase/model/model.py b/src/wok/plugins/gingerbase/model/model.py
new file mode 100644
index 0000000..90331f5
--- /dev/null
+++ b/src/wok/plugins/gingerbase/model/model.py
@@ -0,0 +1,49 @@
+#
+# Project Ginger Base
+#
+# Copyright IBM, Corp. 2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+import inspect
+import os
+
+from wok.basemodel import BaseModel
+from wok.objectstore import ObjectStore
+from wok.utils import import_module, listPathModules
+
+
+class Model(BaseModel):
+ def __init__(self, objstore_loc=None):
+
+ self.objstore = ObjectStore(objstore_loc)
+ kargs = {'objstore': self.objstore}
+
+ this = os.path.basename(__file__)
+ this_mod = os.path.splitext(this)[0]
+
+ models = []
+ for mod_name in listPathModules(os.path.dirname(__file__)):
+ if mod_name.startswith("_") or mod_name == this_mod:
+ continue
+
+ module = import_module('plugins.gingerbase.model.' + mod_name)
+ members = inspect.getmembers(module, inspect.isclass)
+ for cls_name, instance in members:
+ if inspect.getmodule(instance) == module:
+ if cls_name.endswith('Model'):
+ models.append(instance(**kargs))
+
+ return super(Model, self).__init__(models)
diff --git a/src/wok/plugins/kimchi/model/debugreports.py b/src/wok/plugins/kimchi/model/debugreports.py
deleted file mode 100644
index dcd1b64..0000000
--- a/src/wok/plugins/kimchi/model/debugreports.py
+++ /dev/null
@@ -1,213 +0,0 @@
-#
-# Project Kimchi
-#
-# Copyright IBM, Corp. 2014-2015
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-import fnmatch
-import glob
-import logging
-import os
-import shutil
-import subprocess
-import time
-
-from wok.exception import InvalidParameter, NotFoundError, OperationFailed
-from wok.exception import WokException
-from wok.utils import add_task, wok_log
-from wok.utils import run_command
-from wok.model.tasks import TaskModel
-
-from wok.plugins.kimchi import config
-
-
-class DebugReportsModel(object):
- def __init__(self, **kargs):
- self.objstore = kargs['objstore']
- self.task = TaskModel(**kargs)
-
- def create(self, params):
- ident = params.get('name').strip()
- # Generate a name with time and millisec precision, if necessary
- if ident is None or ident == "":
- ident = 'report-' + str(int(time.time() * 1000))
- else:
- if ident in self.get_list():
- raise InvalidParameter("KCHDR0008E", {"name": ident})
- taskid = self._gen_debugreport_file(ident)
- return self.task.lookup(taskid)
-
- def get_list(self):
- path = config.get_debugreports_path()
- file_pattern = os.path.join(path, '*.*')
- file_lists = glob.glob(file_pattern)
- file_lists = [os.path.split(file)[1] for file in file_lists]
- name_lists = [file.split('.', 1)[0] for file in file_lists]
-
- return name_lists
-
- def _gen_debugreport_file(self, name):
- gen_cmd = self.get_system_report_tool()
-
- if gen_cmd is not None:
- return add_task('/plugins/kimchi/debugreports/%s' % name, gen_cmd,
- self.objstore, name)
-
- raise OperationFailed("KCHDR0002E")
-
- @staticmethod
- def sosreport_generate(cb, name):
- def log_error(e):
- log = logging.getLogger('Model')
- log.warning('Exception in generating debug file: %s', e)
-
- try:
- command = ['sosreport', '--batch', '--name=%s' % name]
- output, error, retcode = run_command(command)
-
- if retcode != 0:
- raise OperationFailed("KCHDR0003E", {'name': name,
- 'err': retcode})
-
- # SOSREPORT might create file in /tmp or /var/tmp
- # FIXME: The right way should be passing the tar.xz file directory
- # though the parameter '--tmp-dir', but it is failing in Fedora 20
- patterns = ['/tmp/sosreport-%s-*', '/var/tmp/sosreport-%s-*']
- reports = []
- reportFile = None
- for p in patterns:
- reports = reports + [f for f in glob.glob(p % name)]
- for f in reports:
- if not fnmatch.fnmatch(f, '*.md5'):
- reportFile = f
- break
- # Some error in sosreport happened
- if reportFile is None:
- wok_log.error('Debug report file not found. See sosreport '
- 'output for detail:\n%s', output)
- fname = (patterns[0] % name).split('/')[-1]
- raise OperationFailed('KCHDR0004E', {'name': fname})
-
- md5_report_file = reportFile + '.md5'
- report_file_extension = '.' + reportFile.split('.', 1)[1]
- path = config.get_debugreports_path()
- target = os.path.join(path, name + report_file_extension)
- # Moving report
- msg = 'Moving debug report file "%s" to "%s"' % (reportFile,
- target)
- wok_log.info(msg)
- shutil.move(reportFile, target)
- # Deleting md5
- msg = 'Deleting report md5 file: "%s"' % (md5_report_file)
- wok_log.info(msg)
- with open(md5_report_file) as f:
- md5 = f.read().strip()
- wok_log.info('Md5 file content: "%s"', md5)
- os.remove(md5_report_file)
- cb('OK', True)
- return
-
- except WokException as e:
- log_error(e)
- raise
-
- except OSError as e:
- log_error(e)
- raise
-
- except Exception, e:
- # No need to call cb to update the task status here.
- # The task object will catch the exception raised here
- # and update the task status there
- log_error(e)
- raise OperationFailed("KCHDR0005E", {'name': name, 'err': e})
-
- @staticmethod
- def get_system_report_tool():
- # Please add new possible debug report command here
- # and implement the report generating function
- # based on the new report command
- report_tools = ({'cmd': 'sosreport --help',
- 'fn': DebugReportsModel.sosreport_generate},)
-
- # check if the command can be found by shell one by one
- for helper_tool in report_tools:
- try:
- retcode = subprocess.call(helper_tool['cmd'], shell=True,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- if retcode == 0:
- return helper_tool['fn']
- except Exception, e:
- wok_log.info('Exception running command: %s', e)
-
- return None
-
-
-class DebugReportModel(object):
- def __init__(self, **kargs):
- pass
-
- def lookup(self, name):
- path = config.get_debugreports_path()
- file_pattern = os.path.join(path, name)
- file_pattern = file_pattern + '.*'
- try:
- file_target = glob.glob(file_pattern)[0]
- except IndexError:
- raise NotFoundError("KCHDR0001E", {'name': name})
-
- ctime = os.stat(file_target).st_mtime
- ctime = time.strftime("%Y-%m-%d-%H:%M:%S", time.localtime(ctime))
- file_target = os.path.split(file_target)[-1]
- file_target = os.path.join("plugins/kimchi/data/debugreports",
- file_target)
- return {'uri': file_target,
- 'ctime': ctime}
-
- def update(self, name, params):
- path = config.get_debugreports_path()
- file_pattern = os.path.join(path, name + '.*')
- try:
- file_source = glob.glob(file_pattern)[0]
- except IndexError:
- raise NotFoundError("KCHDR0001E", {'name': name})
-
- file_target = file_source.replace(name, params['name'])
- if os.path.isfile(file_target):
- raise InvalidParameter('KCHDR0008E', {'name': params['name']})
-
- shutil.move(file_source, file_target)
- wok_log.info('%s renamed to %s' % (file_source, file_target))
- return params['name']
-
- def delete(self, name):
- path = config.get_debugreports_path()
- file_pattern = os.path.join(path, name + '.*')
- try:
- file_target = glob.glob(file_pattern)[0]
- except IndexError:
- raise NotFoundError("KCHDR0001E", {'name': name})
-
- os.remove(file_target)
-
-
-class DebugReportContentModel(object):
- def __init__(self, **kargs):
- self._debugreport = DebugReportModel()
-
- def lookup(self, name):
- return self._debugreport.lookup(name)
--
2.1.0
9 years, 2 months
[PATCH 07/15] V4 Ginger Base : control files
by chandra@linux.vnet.ibm.com
From: chandrureddy <chandra(a)linux.vnet.ibm.com>
---
src/wok/plugins/gingerbase/control/Makefile.am | 25 ++++
src/wok/plugins/gingerbase/control/__init__.py | 26 ++++
src/wok/plugins/gingerbase/control/cpuinfo.py | 37 ++++++
src/wok/plugins/gingerbase/control/debugreports.py | 61 +++++++++
src/wok/plugins/gingerbase/control/host.py | 145 +++++++++++++++++++++
src/wok/plugins/kimchi/control/debugreports.py | 61 ---------
6 files changed, 294 insertions(+), 61 deletions(-)
create mode 100644 src/wok/plugins/gingerbase/control/Makefile.am
create mode 100644 src/wok/plugins/gingerbase/control/__init__.py
create mode 100644 src/wok/plugins/gingerbase/control/cpuinfo.py
create mode 100644 src/wok/plugins/gingerbase/control/debugreports.py
create mode 100644 src/wok/plugins/gingerbase/control/host.py
delete mode 100644 src/wok/plugins/kimchi/control/debugreports.py
diff --git a/src/wok/plugins/gingerbase/control/Makefile.am b/src/wok/plugins/gingerbase/control/Makefile.am
new file mode 100644
index 0000000..49da0ae
--- /dev/null
+++ b/src/wok/plugins/gingerbase/control/Makefile.am
@@ -0,0 +1,25 @@
+#
+# Ginger Base
+#
+# Copyright IBM Corp, 2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+control_PYTHON = *.py
+
+controldir = $(pythondir)/wok/plugins/gingerbase/control
+
+install-data-local:
+ $(MKDIR_P) $(DESTDIR)$(controldir)
diff --git a/src/wok/plugins/gingerbase/control/__init__.py b/src/wok/plugins/gingerbase/control/__init__.py
new file mode 100644
index 0000000..b4d8dfd
--- /dev/null
+++ b/src/wok/plugins/gingerbase/control/__init__.py
@@ -0,0 +1,26 @@
+#
+# Project Ginger Base
+#
+# Copyright IBM, Corp. 2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+import os
+
+
+from wok.control.utils import load_url_sub_node
+
+
+sub_nodes = load_url_sub_node(os.path.dirname(__file__), __name__)
diff --git a/src/wok/plugins/gingerbase/control/cpuinfo.py b/src/wok/plugins/gingerbase/control/cpuinfo.py
new file mode 100644
index 0000000..f992bf5
--- /dev/null
+++ b/src/wok/plugins/gingerbase/control/cpuinfo.py
@@ -0,0 +1,37 @@
+#
+# Project Ginger Base
+#
+# Copyright IBM, Corp. 2014-2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+from wok.control.base import Resource
+
+
+class CPUInfo(Resource):
+ def __init__(self, model):
+ super(CPUInfo, self).__init__(model)
+ self.admin_methods = ['GET']
+ self.role_key = 'host'
+ self.uri_fmt = "/host/cpuinfo"
+
+ @property
+ def data(self):
+ return {'threading_enabled': self.info['guest_threads_enabled'],
+ 'sockets': self.info['sockets'],
+ 'cores': self.info['cores_available'],
+ 'threads_per_core': self.info['threads_per_core']
+ }
diff --git a/src/wok/plugins/gingerbase/control/debugreports.py b/src/wok/plugins/gingerbase/control/debugreports.py
new file mode 100644
index 0000000..2e76654
--- /dev/null
+++ b/src/wok/plugins/gingerbase/control/debugreports.py
@@ -0,0 +1,61 @@
+#
+# Project Ginger Base
+#
+# Copyright IBM, Corp. 2013-2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+from wok.control.base import AsyncCollection, Resource
+from wok.control.utils import internal_redirect
+from wok.control.utils import UrlSubNode
+
+
+@UrlSubNode('debugreports', True)
+class DebugReports(AsyncCollection):
+ def __init__(self, model):
+ super(DebugReports, self).__init__(model)
+ self.resource = DebugReport
+ self.role_key = 'host'
+ self.admin_methods = ['GET', 'POST']
+
+ def _get_resources(self, filter_params):
+ res_list = super(DebugReports, self)._get_resources(filter_params)
+ return sorted(res_list, key=lambda x: x.data['time'], reverse=True)
+
+
+class DebugReport(Resource):
+ def __init__(self, model, ident):
+ super(DebugReport, self).__init__(model, ident)
+ self.role_key = 'host'
+ self.admin_methods = ['GET', 'PUT', 'POST']
+ self.uri_fmt = '/debugreports/%s'
+ self.content = DebugReportContent(model, ident)
+
+ @property
+ def data(self):
+ return {'name': self.ident,
+ 'uri': self.info['uri'],
+ 'time': self.info['ctime']}
+
+
+class DebugReportContent(Resource):
+ def __init__(self, model, ident):
+ super(DebugReportContent, self).__init__(model, ident)
+ self.role_key = 'host'
+ self.admin_methods = ['GET']
+
+ def get(self):
+ self.lookup()
+ raise internal_redirect(self.info['uri'])
diff --git a/src/wok/plugins/gingerbase/control/host.py b/src/wok/plugins/gingerbase/control/host.py
new file mode 100644
index 0000000..b923569
--- /dev/null
+++ b/src/wok/plugins/gingerbase/control/host.py
@@ -0,0 +1,145 @@
+#
+# Project Ginger Base
+#
+# Copyright IBM, Corp. 2013-2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+from wok.control.base import Collection, Resource
+from wok.control.utils import UrlSubNode
+from wok.exception import NotFoundError
+
+from cpuinfo import CPUInfo
+
+
+@UrlSubNode('host', True)
+class Host(Resource):
+ def __init__(self, model, id=None):
+ super(Host, self).__init__(model, id)
+ self.role_key = 'host'
+ self.admin_methods = ['GET', 'POST']
+ self.uri_fmt = '/host/%s'
+ self.reboot = self.generate_action_handler('reboot')
+ self.shutdown = self.generate_action_handler('shutdown')
+ self.stats = HostStats(self.model)
+ self.partitions = Partitions(self.model)
+ # self.devices = Devices(self.model)
+ self.packagesupdate = PackagesUpdate(self.model)
+ self.repositories = Repositories(self.model)
+ self.swupdate = self.generate_action_handler_task('swupdate')
+ self.cpuinfo = CPUInfo(self.model)
+ self.capabilities = Capabilities(self.model)
+
+ @property
+ def data(self):
+ return self.info
+
+
+class HostStats(Resource):
+ def __init__(self, model, id=None):
+ super(HostStats, self).__init__(model, id)
+ self.role_key = 'host'
+ self.admin_methods = ['GET']
+ self.history = HostStatsHistory(self.model)
+
+ @property
+ def data(self):
+ return self.info
+
+
+class HostStatsHistory(Resource):
+ @property
+ def data(self):
+ return self.info
+
+
+class Capabilities(Resource):
+ def __init__(self, model, id=None):
+ super(Capabilities, self).__init__(model, id)
+
+ @property
+ def data(self):
+ return self.info
+
+
+class Partitions(Collection):
+ def __init__(self, model):
+ super(Partitions, self).__init__(model)
+ self.role_key = 'storage'
+ self.admin_methods = ['GET']
+ self.resource = Partition
+
+ # Defining get_resources in order to return list of partitions in UI
+ # sorted by their path
+ def _get_resources(self, flag_filter):
+ res_list = super(Partitions, self)._get_resources(flag_filter)
+ res_list = filter(lambda x: x.info['available'], res_list)
+ res_list.sort(key=lambda x: x.info['path'])
+ return res_list
+
+
+class Partition(Resource):
+ def __init__(self, model, id):
+ self.role_key = 'storage'
+ self.admin_methods = ['GET']
+ super(Partition, self).__init__(model, id)
+
+ @property
+ def data(self):
+ if not self.info['available']:
+ raise NotFoundError("GGBPART0001E", {'name': self.info['name']})
+
+ return self.info
+
+
+class PackagesUpdate(Collection):
+ def __init__(self, model):
+ super(PackagesUpdate, self).__init__(model)
+ self.role_key = 'host'
+ self.admin_methods = ['GET']
+ self.resource = PackageUpdate
+
+
+class PackageUpdate(Resource):
+ def __init__(self, model, id=None):
+ super(PackageUpdate, self).__init__(model, id)
+ self.role_key = 'host'
+ self.admin_methods = ['GET']
+
+ @property
+ def data(self):
+ return self.info
+
+
+class Repositories(Collection):
+ def __init__(self, model):
+ super(Repositories, self).__init__(model)
+ self.role_key = 'host'
+ self.admin_methods = ['GET', 'POST']
+ self.resource = Repository
+
+
+class Repository(Resource):
+ def __init__(self, model, id):
+ super(Repository, self).__init__(model, id)
+ self.role_key = 'host'
+ self.admin_methods = ['GET', 'PUT', 'POST', 'DELETE']
+ self.uri_fmt = "/host/repositories/%s"
+ self.enable = self.generate_action_handler('enable')
+ self.disable = self.generate_action_handler('disable')
+
+ @property
+ def data(self):
+ return self.info
diff --git a/src/wok/plugins/kimchi/control/debugreports.py b/src/wok/plugins/kimchi/control/debugreports.py
deleted file mode 100644
index b5a3072..0000000
--- a/src/wok/plugins/kimchi/control/debugreports.py
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# Project Kimchi
-#
-# Copyright IBM, Corp. 2013-2015
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-from wok.control.base import AsyncCollection, Resource
-from wok.control.utils import internal_redirect
-from wok.control.utils import UrlSubNode
-
-
-@UrlSubNode('debugreports', True)
-class DebugReports(AsyncCollection):
- def __init__(self, model):
- super(DebugReports, self).__init__(model)
- self.resource = DebugReport
- self.role_key = 'host'
- self.admin_methods = ['GET', 'POST']
-
- def _get_resources(self, filter_params):
- res_list = super(DebugReports, self)._get_resources(filter_params)
- return sorted(res_list, key=lambda x: x.data['time'], reverse=True)
-
-
-class DebugReport(Resource):
- def __init__(self, model, ident):
- super(DebugReport, self).__init__(model, ident)
- self.role_key = 'host'
- self.admin_methods = ['GET', 'PUT', 'POST']
- self.uri_fmt = '/debugreports/%s'
- self.content = DebugReportContent(model, ident)
-
- @property
- def data(self):
- return {'name': self.ident,
- 'uri': self.info['uri'],
- 'time': self.info['ctime']}
-
-
-class DebugReportContent(Resource):
- def __init__(self, model, ident):
- super(DebugReportContent, self).__init__(model, ident)
- self.role_key = 'host'
- self.admin_methods = ['GET']
-
- def get(self):
- self.lookup()
- raise internal_redirect(self.info['uri'])
--
2.1.0
9 years, 2 months
[PATCH 06/15] V4 Ginger Base : base plugin m4 files
by chandra@linux.vnet.ibm.com
From: chandrureddy <chandra(a)linux.vnet.ibm.com>
---
src/wok/plugins/gingerbase/m4/ac_python_module.m4 | 30 +
src/wok/plugins/gingerbase/m4/gettext.m4 | 383 +++++++++++
src/wok/plugins/gingerbase/m4/iconv.m4 | 214 ++++++
src/wok/plugins/gingerbase/m4/intlmacosx.m4 | 51 ++
src/wok/plugins/gingerbase/m4/lib-ld.m4 | 110 +++
src/wok/plugins/gingerbase/m4/lib-link.m4 | 774 ++++++++++++++++++++++
src/wok/plugins/gingerbase/m4/lib-prefix.m4 | 224 +++++++
src/wok/plugins/gingerbase/m4/nls.m4 | 32 +
src/wok/plugins/gingerbase/m4/po.m4 | 449 +++++++++++++
src/wok/plugins/gingerbase/m4/progtest.m4 | 92 +++
10 files changed, 2359 insertions(+)
create mode 100644 src/wok/plugins/gingerbase/m4/ac_python_module.m4
create mode 100644 src/wok/plugins/gingerbase/m4/gettext.m4
create mode 100644 src/wok/plugins/gingerbase/m4/iconv.m4
create mode 100644 src/wok/plugins/gingerbase/m4/intlmacosx.m4
create mode 100644 src/wok/plugins/gingerbase/m4/lib-ld.m4
create mode 100644 src/wok/plugins/gingerbase/m4/lib-link.m4
create mode 100644 src/wok/plugins/gingerbase/m4/lib-prefix.m4
create mode 100644 src/wok/plugins/gingerbase/m4/nls.m4
create mode 100644 src/wok/plugins/gingerbase/m4/po.m4
create mode 100644 src/wok/plugins/gingerbase/m4/progtest.m4
diff --git a/src/wok/plugins/gingerbase/m4/ac_python_module.m4 b/src/wok/plugins/gingerbase/m4/ac_python_module.m4
new file mode 100644
index 0000000..32b9d72
--- /dev/null
+++ b/src/wok/plugins/gingerbase/m4/ac_python_module.m4
@@ -0,0 +1,30 @@
+dnl @synopsis AC_PYTHON_MODULE(modname[, fatal])
+dnl
+dnl Checks for Python module.
+dnl
+dnl If fatal is non-empty then absence of a module will trigger an
+dnl error.
+dnl
+dnl @category InstalledPackages
+dnl @author Andrew Collier <colliera(a)nu.ac.za>.
+dnl @version 2004-07-14
+dnl @license AllPermissive
+
+AC_DEFUN([AC_PYTHON_MODULE],[
+ AC_MSG_CHECKING(python module: $1)
+ python -c "import $1" 2>/dev/null
+ if test $? -eq 0;
+ then
+ AC_MSG_RESULT(yes)
+ eval AS_TR_CPP(HAVE_PYMOD_$1)=yes
+ else
+ AC_MSG_RESULT(no)
+ eval AS_TR_CPP(HAVE_PYMOD_$1)=no
+ #
+ if test -n "$2"
+ then
+ AC_MSG_ERROR(failed to find required module $1)
+ exit 1
+ fi
+ fi
+])
diff --git a/src/wok/plugins/gingerbase/m4/gettext.m4 b/src/wok/plugins/gingerbase/m4/gettext.m4
new file mode 100644
index 0000000..f84e6a5
--- /dev/null
+++ b/src/wok/plugins/gingerbase/m4/gettext.m4
@@ -0,0 +1,383 @@
+# gettext.m4 serial 63 (gettext-0.18)
+dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper(a)cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible(a)clisp.cons.org>, 2000-2006, 2008-2010.
+
+dnl Macro to add for using GNU gettext.
+
+dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
+dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
+dnl default (if it is not specified or empty) is 'no-libtool'.
+dnl INTLSYMBOL should be 'external' for packages with no intl directory,
+dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
+dnl If INTLSYMBOL is 'use-libtool', then a libtool library
+dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
+dnl depending on --{enable,disable}-{shared,static} and on the presence of
+dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
+dnl $(top_builddir)/intl/libintl.a will be created.
+dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
+dnl implementations (in libc or libintl) without the ngettext() function
+dnl will be ignored. If NEEDSYMBOL is specified and is
+dnl 'need-formatstring-macros', then GNU gettext implementations that don't
+dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
+dnl INTLDIR is used to find the intl libraries. If empty,
+dnl the value `$(top_builddir)/intl/' is used.
+dnl
+dnl The result of the configuration is one of three cases:
+dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
+dnl and used.
+dnl Catalog format: GNU --> install in $(datadir)
+dnl Catalog extension: .mo after installation, .gmo in source tree
+dnl 2) GNU gettext has been found in the system's C library.
+dnl Catalog format: GNU --> install in $(datadir)
+dnl Catalog extension: .mo after installation, .gmo in source tree
+dnl 3) No internationalization, always use English msgid.
+dnl Catalog format: none
+dnl Catalog extension: none
+dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
+dnl The use of .gmo is historical (it was needed to avoid overwriting the
+dnl GNU format catalogs when building on a platform with an X/Open gettext),
+dnl but we keep it in order not to force irrelevant filename changes on the
+dnl maintainers.
+dnl
+AC_DEFUN([AM_GNU_GETTEXT],
+[
+ dnl Argument checking.
+ ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
+ [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
+])])])])])
+ ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
+ [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])])
+ ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
+ [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
+])])])])
+ define([gt_included_intl],
+ ifelse([$1], [external],
+ ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
+ [yes]))
+ define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
+ gt_NEEDS_INIT
+ AM_GNU_GETTEXT_NEED([$2])
+
+ AC_REQUIRE([AM_PO_SUBDIRS])dnl
+ ifelse(gt_included_intl, yes, [
+ AC_REQUIRE([AM_INTL_SUBDIR])dnl
+ ])
+
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+
+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
+ dnl Ideally we would do this search only after the
+ dnl if test "$USE_NLS" = "yes"; then
+ dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+ dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
+ dnl the configure script would need to contain the same shell code
+ dnl again, outside any 'if'. There are two solutions:
+ dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
+ dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
+ dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
+ dnl documented, we avoid it.
+ ifelse(gt_included_intl, yes, , [
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+ ])
+
+ dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
+ gt_INTL_MACOSX
+
+ dnl Set USE_NLS.
+ AC_REQUIRE([AM_NLS])
+
+ ifelse(gt_included_intl, yes, [
+ BUILD_INCLUDED_LIBINTL=no
+ USE_INCLUDED_LIBINTL=no
+ ])
+ LIBINTL=
+ LTLIBINTL=
+ POSUB=
+
+ dnl Add a version number to the cache macros.
+ case " $gt_needs " in
+ *" need-formatstring-macros "*) gt_api_version=3 ;;
+ *" need-ngettext "*) gt_api_version=2 ;;
+ *) gt_api_version=1 ;;
+ esac
+ gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
+ gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
+
+ dnl If we use NLS figure out what method
+ if test "$USE_NLS" = "yes"; then
+ gt_use_preinstalled_gnugettext=no
+ ifelse(gt_included_intl, yes, [
+ AC_MSG_CHECKING([whether included gettext is requested])
+ AC_ARG_WITH([included-gettext],
+ [ --with-included-gettext use the GNU gettext library included here],
+ nls_cv_force_use_gnu_gettext=$withval,
+ nls_cv_force_use_gnu_gettext=no)
+ AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+ ])
+ dnl User does not insist on using GNU NLS library. Figure out what
+ dnl to use. If GNU gettext is available we use this. Else we have
+ dnl to fall back to GNU NLS library.
+
+ if test $gt_api_version -ge 3; then
+ gt_revision_test_code='
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+'
+ else
+ gt_revision_test_code=
+ fi
+ if test $gt_api_version -ge 2; then
+ gt_expression_test_code=' + * ngettext ("", "", 0)'
+ else
+ gt_expression_test_code=
+ fi
+
+ AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
+ [AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;],
+ [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
+ [eval "$gt_func_gnugettext_libc=yes"],
+ [eval "$gt_func_gnugettext_libc=no"])])
+
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
+ ifelse(gt_included_intl, yes, , [
+ AM_ICONV_LINK
+ ])
+ dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
+ dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
+ dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
+ dnl even if libiconv doesn't exist.
+ AC_LIB_LINKFLAGS_BODY([intl])
+ AC_CACHE_CHECK([for GNU gettext in libintl],
+ [$gt_func_gnugettext_libintl],
+ [gt_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $INCINTL"
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBINTL"
+ dnl Now see whether libintl exists and does not depend on libiconv.
+ AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);],
+ [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
+ [eval "$gt_func_gnugettext_libintl=yes"],
+ [eval "$gt_func_gnugettext_libintl=no"])
+ dnl Now see whether libintl exists and depends on libiconv.
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
+ LIBS="$LIBS $LIBICONV"
+ AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);],
+ [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
+ [LIBINTL="$LIBINTL $LIBICONV"
+ LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+ eval "$gt_func_gnugettext_libintl=yes"
+ ])
+ fi
+ CPPFLAGS="$gt_save_CPPFLAGS"
+ LIBS="$gt_save_LIBS"])
+ fi
+
+ dnl If an already present or preinstalled GNU gettext() is found,
+ dnl use it. But if this macro is used in GNU gettext, and GNU
+ dnl gettext is already preinstalled in libintl, we update this
+ dnl libintl. (Cf. the install rule in intl/Makefile.in.)
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
+ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
+ && test "$PACKAGE" != gettext-runtime \
+ && test "$PACKAGE" != gettext-tools; }; then
+ gt_use_preinstalled_gnugettext=yes
+ else
+ dnl Reset the values set by searching for libintl.
+ LIBINTL=
+ LTLIBINTL=
+ INCINTL=
+ fi
+
+ ifelse(gt_included_intl, yes, [
+ if test "$gt_use_preinstalled_gnugettext" != "yes"; then
+ dnl GNU gettext is not found in the C library.
+ dnl Fall back on included GNU gettext library.
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions used to generate GNU NLS library.
+ BUILD_INCLUDED_LIBINTL=yes
+ USE_INCLUDED_LIBINTL=yes
+ LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
+ LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
+ LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+ fi
+
+ CATOBJEXT=
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions to use GNU gettext tools.
+ CATOBJEXT=.gmo
+ fi
+ ])
+
+ if test -n "$INTL_MACOSX_LIBS"; then
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Some extra flags are needed during linking.
+ LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
+ LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
+ fi
+ fi
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ AC_DEFINE([ENABLE_NLS], [1],
+ [Define to 1 if translation of program messages to the user's native language
+ is requested.])
+ else
+ USE_NLS=no
+ fi
+ fi
+
+ AC_MSG_CHECKING([whether to use NLS])
+ AC_MSG_RESULT([$USE_NLS])
+ if test "$USE_NLS" = "yes"; then
+ AC_MSG_CHECKING([where the gettext function comes from])
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+ gt_source="external libintl"
+ else
+ gt_source="libc"
+ fi
+ else
+ gt_source="included intl directory"
+ fi
+ AC_MSG_RESULT([$gt_source])
+ fi
+
+ if test "$USE_NLS" = "yes"; then
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+ AC_MSG_CHECKING([how to link with libintl])
+ AC_MSG_RESULT([$LIBINTL])
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
+ fi
+
+ dnl For backward compatibility. Some packages may be using this.
+ AC_DEFINE([HAVE_GETTEXT], [1],
+ [Define if the GNU gettext() function is already present or preinstalled.])
+ AC_DEFINE([HAVE_DCGETTEXT], [1],
+ [Define if the GNU dcgettext() function is already present or preinstalled.])
+ fi
+
+ dnl We need to process the po/ directory.
+ POSUB=po
+ fi
+
+ ifelse(gt_included_intl, yes, [
+ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
+ dnl to 'yes' because some of the testsuite requires it.
+ if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
+ BUILD_INCLUDED_LIBINTL=yes
+ fi
+
+ dnl Make all variables we use known to autoconf.
+ AC_SUBST([BUILD_INCLUDED_LIBINTL])
+ AC_SUBST([USE_INCLUDED_LIBINTL])
+ AC_SUBST([CATOBJEXT])
+
+ dnl For backward compatibility. Some configure.ins may be using this.
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ DATADIRNAME=share
+ AC_SUBST([DATADIRNAME])
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INSTOBJEXT=.mo
+ AC_SUBST([INSTOBJEXT])
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ GENCAT=gencat
+ AC_SUBST([GENCAT])
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INTLOBJS=
+ if test "$USE_INCLUDED_LIBINTL" = yes; then
+ INTLOBJS="\$(GETTOBJS)"
+ fi
+ AC_SUBST([INTLOBJS])
+
+ dnl Enable libtool support if the surrounding package wishes it.
+ INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
+ AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
+ ])
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INTLLIBS="$LIBINTL"
+ AC_SUBST([INTLLIBS])
+
+ dnl Make all documented variables known to autoconf.
+ AC_SUBST([LIBINTL])
+ AC_SUBST([LTLIBINTL])
+ AC_SUBST([POSUB])
+])
+
+
+dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
+m4_define([gt_NEEDS_INIT],
+[
+ m4_divert_text([DEFAULTS], [gt_needs=])
+ m4_define([gt_NEEDS_INIT], [])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
+AC_DEFUN([AM_GNU_GETTEXT_NEED],
+[
+ m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
+AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
diff --git a/src/wok/plugins/gingerbase/m4/iconv.m4 b/src/wok/plugins/gingerbase/m4/iconv.m4
new file mode 100644
index 0000000..e2041b9
--- /dev/null
+++ b/src/wok/plugins/gingerbase/m4/iconv.m4
@@ -0,0 +1,214 @@
+# iconv.m4 serial 11 (gettext-0.18.1)
+dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
+[
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([iconv])
+])
+
+AC_DEFUN([AM_ICONV_LINK],
+[
+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+ dnl those with the standalone portable GNU libiconv installed).
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+
+ dnl Add $INCICONV to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed libiconv and not disabled its use
+ dnl via --without-libiconv-prefix, he wants to use it. The first
+ dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
+ am_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
+
+ AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ [am_cv_func_iconv=yes])
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ [am_cv_lib_iconv=yes]
+ [am_cv_func_iconv=yes])
+ LIBS="$am_save_LIBS"
+ fi
+ ])
+ if test "$am_cv_func_iconv" = yes; then
+ AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
+ dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10.
+ am_save_LIBS="$LIBS"
+ if test $am_cv_lib_iconv = yes; then
+ LIBS="$LIBS $LIBICONV"
+ fi
+ AC_TRY_RUN([
+#include <iconv.h>
+#include <string.h>
+int main ()
+{
+ /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
+ returns. */
+ {
+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+ if (cd_utf8_to_88591 != (iconv_t)(-1))
+ {
+ static const char input[] = "\342\202\254"; /* EURO SIGN */
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_utf8_to_88591,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ return 1;
+ }
+ }
+ /* Test against Solaris 10 bug: Failures are not distinguishable from
+ successful returns. */
+ {
+ iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
+ if (cd_ascii_to_88591 != (iconv_t)(-1))
+ {
+ static const char input[] = "\263";
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_ascii_to_88591,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ return 1;
+ }
+ }
+#if 0 /* This bug could be worked around by the caller. */
+ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
+ {
+ iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+ if (cd_88591_to_utf8 != (iconv_t)(-1))
+ {
+ static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ char buf[50];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_88591_to_utf8,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if ((int)res > 0)
+ return 1;
+ }
+ }
+#endif
+ /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+ provided. */
+ if (/* Try standardized names. */
+ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
+ /* Try IRIX, OSF/1 names. */
+ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
+ /* Try AIX names. */
+ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
+ /* Try HP-UX names. */
+ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
+ return 1;
+ return 0;
+}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
+ [case "$host_os" in
+ aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+ *) am_cv_func_iconv_works="guessing yes" ;;
+ esac])
+ LIBS="$am_save_LIBS"
+ ])
+ case "$am_cv_func_iconv_works" in
+ *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+ *) am_func_iconv=yes ;;
+ esac
+ else
+ am_func_iconv=no am_cv_lib_iconv=no
+ fi
+ if test "$am_func_iconv" = yes; then
+ AC_DEFINE([HAVE_ICONV], [1],
+ [Define if you have the iconv() function and it works.])
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ AC_MSG_CHECKING([how to link with libiconv])
+ AC_MSG_RESULT([$LIBICONV])
+ else
+ dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
+ dnl either.
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+ AC_SUBST([LIBICONV])
+ AC_SUBST([LTLIBICONV])
+])
+
+dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
+dnl avoid warnings like
+dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
+dnl This is tricky because of the way 'aclocal' is implemented:
+dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
+dnl Otherwise aclocal's initial scan pass would miss the macro definition.
+dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
+dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
+dnl warnings.
+m4_define([gl_iconv_AC_DEFUN],
+ m4_version_prereq([2.64],
+ [[AC_DEFUN_ONCE(
+ [$1], [$2])]],
+ [[AC_DEFUN(
+ [$1], [$2])]]))
+gl_iconv_AC_DEFUN([AM_ICONV],
+[
+ AM_ICONV_LINK
+ if test "$am_cv_func_iconv" = yes; then
+ AC_MSG_CHECKING([for iconv declaration])
+ AC_CACHE_VAL([am_cv_proto_iconv], [
+ AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
+ am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+ AC_MSG_RESULT([
+ $am_cv_proto_iconv])
+ AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
+ [Define as const if the declaration of iconv() needs const.])
+ fi
+])
diff --git a/src/wok/plugins/gingerbase/m4/intlmacosx.m4 b/src/wok/plugins/gingerbase/m4/intlmacosx.m4
new file mode 100644
index 0000000..dd91025
--- /dev/null
+++ b/src/wok/plugins/gingerbase/m4/intlmacosx.m4
@@ -0,0 +1,51 @@
+# intlmacosx.m4 serial 3 (gettext-0.18)
+dnl Copyright (C) 2004-2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Checks for special options needed on MacOS X.
+dnl Defines INTL_MACOSX_LIBS.
+AC_DEFUN([gt_INTL_MACOSX],
+[
+ dnl Check for API introduced in MacOS X 10.2.
+ AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
+ [gt_cv_func_CFPreferencesCopyAppValue],
+ [gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
+ [CFPreferencesCopyAppValue(NULL, NULL)],
+ [gt_cv_func_CFPreferencesCopyAppValue=yes],
+ [gt_cv_func_CFPreferencesCopyAppValue=no])
+ LIBS="$gt_save_LIBS"])
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+ AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
+ [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
+ fi
+ dnl Check for API introduced in MacOS X 10.3.
+ AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
+ [gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
+ [gt_cv_func_CFLocaleCopyCurrent=yes],
+ [gt_cv_func_CFLocaleCopyCurrent=no])
+ LIBS="$gt_save_LIBS"])
+ if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+ AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
+ [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
+ fi
+ INTL_MACOSX_LIBS=
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+ INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+ fi
+ AC_SUBST([INTL_MACOSX_LIBS])
+])
diff --git a/src/wok/plugins/gingerbase/m4/lib-ld.m4 b/src/wok/plugins/gingerbase/m4/lib-ld.m4
new file mode 100644
index 0000000..ebb3052
--- /dev/null
+++ b/src/wok/plugins/gingerbase/m4/lib-ld.m4
@@ -0,0 +1,110 @@
+# lib-ld.m4 serial 4 (gettext-0.18)
+dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Subroutines of libtool.m4,
+dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
+dnl with libtool.m4.
+
+dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
+AC_DEFUN([AC_LIB_PROG_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ acl_cv_prog_gnu_ld=yes ;;
+*)
+ acl_cv_prog_gnu_ld=no ;;
+esac])
+with_gnu_ld=$acl_cv_prog_gnu_ld
+])
+
+dnl From libtool-1.4. Sets the variable LD.
+AC_DEFUN([AC_LIB_PROG_LD],
+[AC_ARG_WITH([gnu-ld],
+[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by GCC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]* | [A-Za-z]:[\\/]*)]
+ [re_direlt='/[^/][^/]*/\.\./']
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL([acl_cv_path_LD],
+[if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ acl_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break ;;
+ *)
+ test "$with_gnu_ld" != yes && break ;;
+ esac
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT([$LD])
+else
+ AC_MSG_RESULT([no])
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_LIB_PROG_LD_GNU
+])
diff --git a/src/wok/plugins/gingerbase/m4/lib-link.m4 b/src/wok/plugins/gingerbase/m4/lib-link.m4
new file mode 100644
index 0000000..c73bd8e
--- /dev/null
+++ b/src/wok/plugins/gingerbase/m4/lib-link.m4
@@ -0,0 +1,774 @@
+# lib-link.m4 serial 21 (gettext-0.18)
+dnl Copyright (C) 2001-2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_PREREQ([2.54])
+
+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
+dnl augments the CPPFLAGS variable.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ pushdef([Name],[translit([$1],[./-], [___])])
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+ ac_cv_lib[]Name[]_libs="$LIB[]NAME"
+ ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
+ ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+ ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
+ ])
+ LIB[]NAME="$ac_cv_lib[]Name[]_libs"
+ LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
+ INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+ LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ AC_SUBST([LIB]NAME[_PREFIX])
+ dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
+ dnl results of this search when this library appears as a dependency.
+ HAVE_LIB[]NAME=yes
+ popdef([NAME])
+ popdef([Name])
+])
+
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
+dnl searches for libname and the libraries corresponding to explicit and
+dnl implicit dependencies, together with the specified include files and
+dnl the ability to compile and link the specified testcode. The missing-message
+dnl defaults to 'no' and may contain additional hints for the user.
+dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
+dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ pushdef([Name],[translit([$1],[./-], [___])])
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+
+ dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+
+ dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed lib[]Name and not disabled its use
+ dnl via --without-lib[]Name-prefix, he wants to use it.
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+
+ AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
+ ac_save_LIBS="$LIBS"
+ dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
+ dnl because these -l options might require -L options that are present in
+ dnl LIBS. -l options benefit only from the -L options listed before it.
+ dnl Otherwise, add it to the front of LIBS, because it may be a static
+ dnl library that depends on another static library that is present in LIBS.
+ dnl Static libraries benefit only from the static libraries listed after
+ dnl it.
+ case " $LIB[]NAME" in
+ *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
+ *) LIBS="$LIB[]NAME $LIBS" ;;
+ esac
+ AC_TRY_LINK([$3], [$4],
+ [ac_cv_lib[]Name=yes],
+ [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
+ LIBS="$ac_save_LIBS"
+ ])
+ if test "$ac_cv_lib[]Name" = yes; then
+ HAVE_LIB[]NAME=yes
+ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
+ AC_MSG_CHECKING([how to link with lib[]$1])
+ AC_MSG_RESULT([$LIB[]NAME])
+ else
+ HAVE_LIB[]NAME=no
+ dnl If $LIB[]NAME didn't lead to a usable library, we don't need
+ dnl $INC[]NAME either.
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LIB[]NAME=
+ LTLIB[]NAME=
+ LIB[]NAME[]_PREFIX=
+ fi
+ AC_SUBST([HAVE_LIB]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ AC_SUBST([LIB]NAME[_PREFIX])
+ popdef([NAME])
+ popdef([Name])
+])
+
+dnl Determine the platform dependent parameters needed to use rpath:
+dnl acl_libext,
+dnl acl_shlibext,
+dnl acl_hardcode_libdir_flag_spec,
+dnl acl_hardcode_libdir_separator,
+dnl acl_hardcode_direct,
+dnl acl_hardcode_minus_L.
+AC_DEFUN([AC_LIB_RPATH],
+[
+ dnl Tell automake >= 1.10 to complain if config.rpath is missing.
+ m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
+ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
+ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
+ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
+ AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+ . ./conftest.sh
+ rm -f ./conftest.sh
+ acl_cv_rpath=done
+ ])
+ wl="$acl_cv_wl"
+ acl_libext="$acl_cv_libext"
+ acl_shlibext="$acl_cv_shlibext"
+ acl_libname_spec="$acl_cv_libname_spec"
+ acl_library_names_spec="$acl_cv_library_names_spec"
+ acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+ acl_hardcode_direct="$acl_cv_hardcode_direct"
+ acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
+ dnl Determine whether the user wants rpath handling at all.
+ AC_ARG_ENABLE([rpath],
+ [ --disable-rpath do not hardcode runtime library paths],
+ :, enable_rpath=yes)
+])
+
+dnl AC_LIB_FROMPACKAGE(name, package)
+dnl declares that libname comes from the given package. The configure file
+dnl will then not have a --with-libname-prefix option but a
+dnl --with-package-prefix option. Several libraries can come from the same
+dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
+dnl macro call that searches for libname.
+AC_DEFUN([AC_LIB_FROMPACKAGE],
+[
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ define([acl_frompackage_]NAME, [$2])
+ popdef([NAME])
+ pushdef([PACK],[$2])
+ pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ define([acl_libsinpackage_]PACKUP,
+ m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
+ popdef([PACKUP])
+ popdef([PACK])
+])
+
+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
+dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
+ pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
+ dnl Autoconf >= 2.61 supports dots in --with options.
+ pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_ARG_WITH(P_A_C_K[-prefix],
+[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
+ --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ if test "$acl_libdirstem2" != "$acl_libdirstem" \
+ && ! test -d "$withval/$acl_libdirstem"; then
+ additional_libdir="$withval/$acl_libdirstem2"
+ fi
+ fi
+ fi
+])
+ dnl Search the library and its dependencies in $additional_libdir and
+ dnl $LDFLAGS. Using breadth-first-seach.
+ LIB[]NAME=
+ LTLIB[]NAME=
+ INC[]NAME=
+ LIB[]NAME[]_PREFIX=
+ dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
+ dnl computed. So it has to be reset here.
+ HAVE_LIB[]NAME=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='$1 $2'
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
+ dnl or AC_LIB_HAVE_LINKFLAGS call.
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
+ else
+ dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
+ dnl that this library doesn't exist. So just drop it.
+ :
+ fi
+ else
+ dnl Search the library lib$name in $additional_libdir and $LDFLAGS
+ dnl and the already constructed $LIBNAME/$LTLIBNAME.
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
+ if test -n "$acl_shlibext"; then
+ shrext=".$acl_shlibext" # typically: shrext=.so
+ else
+ shrext=
+ fi
+ if test $use_additional = yes; then
+ dir="$additional_libdir"
+ dnl The same code as in the loop below:
+ dnl First look for a shared library.
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ dnl Then look for a static library.
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ dnl First look for a shared library.
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ dnl Then look for a static library.
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ dnl Found the library.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ dnl Linking with a shared library. We attempt to hardcode its
+ dnl directory into the executable's runpath, unless it's the
+ dnl standard /usr/lib.
+ if test "$enable_rpath" = no \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
+ dnl No hardcoding is needed.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ dnl The hardcoding into $LIBNAME is system dependent.
+ if test "$acl_hardcode_direct" = yes; then
+ dnl Using DIR/libNAME.so during linking hardcodes DIR into the
+ dnl resulting binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ dnl Rely on "-L$found_dir".
+ dnl But don't add it if it's already contained in the LDFLAGS
+ dnl or the already constructed $LIBNAME
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
+ fi
+ if test "$acl_hardcode_minus_L" != no; then
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
+ dnl here, because this doesn't fit in flags passed to the
+ dnl compiler. So give up. No hardcoding. This affects only
+ dnl very old systems.
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ dnl Linking with a static library.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
+ else
+ dnl We shouldn't come here, but anyway it's good to have a
+ dnl fallback.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
+ fi
+ fi
+ dnl Assume the include files are nearby.
+ additional_includedir=
+ case "$found_dir" in
+ */$acl_libdirstem | */$acl_libdirstem/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+ if test "$name" = '$1'; then
+ LIB[]NAME[]_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ */$acl_libdirstem2 | */$acl_libdirstem2/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+ if test "$name" = '$1'; then
+ LIB[]NAME[]_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ dnl Potentially add $additional_includedir to $INCNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 3. if it's already present in $CPPFLAGS or the already
+ dnl constructed $INCNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INC[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $INCNAME.
+ INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ dnl Look for dependencies.
+ if test -n "$found_la"; then
+ dnl Read the .la file. It defines the variables
+ dnl dlname, library_names, old_library, dependency_libs, current,
+ dnl age, revision, installed, dlopen, dlpreopen, libdir.
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ dnl We use only dependency_libs.
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 3. if it's already present in $LDFLAGS or the already
+ dnl constructed $LIBNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
+ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LIBNAME.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LTLIBNAME.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ dnl Handle this in the next round.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ dnl Handle this in the next round. Throw away the .la's
+ dnl directory; it is already contained in a preceding -L
+ dnl option.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ dnl Most likely an immediate library name.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ dnl Didn't find the library; assume it is in the system directories
+ dnl known to the linker and runtime loader. (All the system
+ dnl directories known to the linker should also be known to the
+ dnl runtime loader, otherwise the system is severely misconfigured.)
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$acl_hardcode_libdir_separator"; then
+ dnl Weird platform: only the last -rpath option counts, the user must
+ dnl pass all path elements in one option. We can arrange that for a
+ dnl single library, but not when more than one $LIBNAMEs are used.
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+ done
+ dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ dnl When using libtool, the option that works for both libraries and
+ dnl executables is -R. The -R options are cumulative.
+ for found_dir in $ltrpathdirs; do
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
+ done
+ fi
+ popdef([P_A_C_K])
+ popdef([PACKLIBS])
+ popdef([PACKUP])
+ popdef([PACK])
+ popdef([NAME])
+])
+
+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
+dnl unless already present in VAR.
+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
+dnl contains two or three consecutive elements that belong together.
+AC_DEFUN([AC_LIB_APPENDTOVAR],
+[
+ for element in [$2]; do
+ haveit=
+ for x in $[$1]; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ [$1]="${[$1]}${[$1]:+ }$element"
+ fi
+ done
+])
+
+dnl For those cases where a variable contains several -L and -l options
+dnl referring to unknown libraries and directories, this macro determines the
+dnl necessary additional linker options for the runtime path.
+dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
+dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
+dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
+dnl otherwise linking without libtool is assumed.
+AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
+[
+ AC_REQUIRE([AC_LIB_RPATH])
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ $1=
+ if test "$enable_rpath" != no; then
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ dnl Use an explicit option to hardcode directories into the resulting
+ dnl binary.
+ rpathdirs=
+ next=
+ for opt in $2; do
+ if test -n "$next"; then
+ dir="$next"
+ dnl No need to hardcode the standard /usr/lib.
+ if test "X$dir" != "X/usr/$acl_libdirstem" \
+ && test "X$dir" != "X/usr/$acl_libdirstem2"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ next=
+ else
+ case $opt in
+ -L) next=yes ;;
+ -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
+ dnl No need to hardcode the standard /usr/lib.
+ if test "X$dir" != "X/usr/$acl_libdirstem" \
+ && test "X$dir" != "X/usr/$acl_libdirstem2"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ next= ;;
+ *) next= ;;
+ esac
+ fi
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n ""$3""; then
+ dnl libtool is used for linking. Use -R options.
+ for dir in $rpathdirs; do
+ $1="${$1}${$1:+ }-R$dir"
+ done
+ else
+ dnl The linker is used for linking directly.
+ if test -n "$acl_hardcode_libdir_separator"; then
+ dnl Weird platform: only the last -rpath option counts, the user
+ dnl must pass all path elements in one option.
+ alldirs=
+ for dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ $1="$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ $1="${$1}${$1:+ }$flag"
+ done
+ fi
+ fi
+ fi
+ fi
+ fi
+ AC_SUBST([$1])
+])
diff --git a/src/wok/plugins/gingerbase/m4/lib-prefix.m4 b/src/wok/plugins/gingerbase/m4/lib-prefix.m4
new file mode 100644
index 0000000..1601cea
--- /dev/null
+++ b/src/wok/plugins/gingerbase/m4/lib-prefix.m4
@@ -0,0 +1,224 @@
+# lib-prefix.m4 serial 7 (gettext-0.18)
+dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
+dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
+dnl require excessive bracketing.
+ifdef([AC_HELP_STRING],
+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
+[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
+
+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
+dnl to access previously installed libraries. The basic assumption is that
+dnl a user will want packages to use other packages he previously installed
+dnl with the same --prefix option.
+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
+dnl libraries, but is otherwise very convenient.
+AC_DEFUN([AC_LIB_PREFIX],
+[
+ AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_LIB_ARG_WITH([lib-prefix],
+[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
+ --without-lib-prefix don't search for libraries in includedir and libdir],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ fi
+ fi
+])
+ if test $use_additional = yes; then
+ dnl Potentially add $additional_includedir to $CPPFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's already present in $CPPFLAGS,
+ dnl 3. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ for x in $CPPFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $CPPFLAGS.
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ dnl Potentially add $additional_libdir to $LDFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's already present in $LDFLAGS,
+ dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+ haveit=
+ for x in $LDFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LDFLAGS.
+ LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ fi
+])
+
+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
+dnl acl_final_exec_prefix, containing the values to which $prefix and
+dnl $exec_prefix will expand at the end of the configure script.
+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
+[
+ dnl Unfortunately, prefix and exec_prefix get only finally determined
+ dnl at the end of configure.
+ if test "X$prefix" = "XNONE"; then
+ acl_final_prefix="$ac_default_prefix"
+ else
+ acl_final_prefix="$prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ acl_final_exec_prefix='${prefix}'
+ else
+ acl_final_exec_prefix="$exec_prefix"
+ fi
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+ prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
+dnl variables prefix and exec_prefix bound to the values they will have
+dnl at the end of the configure script.
+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
+[
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ $1
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_PREPARE_MULTILIB creates
+dnl - a variable acl_libdirstem, containing the basename of the libdir, either
+dnl "lib" or "lib64" or "lib/64",
+dnl - a variable acl_libdirstem2, as a secondary possible value for
+dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
+dnl "lib/amd64".
+AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
+[
+ dnl There is no formal standard regarding lib and lib64.
+ dnl On glibc systems, the current practice is that on a system supporting
+ dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
+ dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
+ dnl the compiler's default mode by looking at the compiler's library search
+ dnl path. If at least one of its elements ends in /lib64 or points to a
+ dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
+ dnl Otherwise we use the default, namely "lib".
+ dnl On Solaris systems, the current practice is that on a system supporting
+ dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
+ dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
+ dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ acl_libdirstem=lib
+ acl_libdirstem2=
+ case "$host_os" in
+ solaris*)
+ dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
+ dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
+ dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
+ dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
+ dnl symlink is missing, so we set acl_libdirstem2 too.
+ AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
+ [AC_EGREP_CPP([sixtyfour bits], [
+#ifdef _LP64
+sixtyfour bits
+#endif
+ ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
+ ])
+ if test $gl_cv_solaris_64bit = yes; then
+ acl_libdirstem=lib/64
+ case "$host_cpu" in
+ sparc*) acl_libdirstem2=lib/sparcv9 ;;
+ i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
+ esac
+ fi
+ ;;
+ *)
+ searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+ if test -n "$searchpath"; then
+ acl_save_IFS="${IFS= }"; IFS=":"
+ for searchdir in $searchpath; do
+ if test -d "$searchdir"; then
+ case "$searchdir" in
+ */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+ */../ | */.. )
+ # Better ignore directories of this form. They are misleading.
+ ;;
+ *) searchdir=`cd "$searchdir" && pwd`
+ case "$searchdir" in
+ */lib64 ) acl_libdirstem=lib64 ;;
+ esac ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_IFS"
+ fi
+ ;;
+ esac
+ test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
+])
diff --git a/src/wok/plugins/gingerbase/m4/nls.m4 b/src/wok/plugins/gingerbase/m4/nls.m4
new file mode 100644
index 0000000..003704c
--- /dev/null
+++ b/src/wok/plugins/gingerbase/m4/nls.m4
@@ -0,0 +1,32 @@
+# nls.m4 serial 5 (gettext-0.18)
+dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper(a)cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible(a)clisp.cons.org>, 2000-2003.
+
+AC_PREREQ([2.50])
+
+AC_DEFUN([AM_NLS],
+[
+ AC_MSG_CHECKING([whether NLS is requested])
+ dnl Default is enabled NLS
+ AC_ARG_ENABLE([nls],
+ [ --disable-nls do not use Native Language Support],
+ USE_NLS=$enableval, USE_NLS=yes)
+ AC_MSG_RESULT([$USE_NLS])
+ AC_SUBST([USE_NLS])
+])
diff --git a/src/wok/plugins/gingerbase/m4/po.m4 b/src/wok/plugins/gingerbase/m4/po.m4
new file mode 100644
index 0000000..8bc921d
--- /dev/null
+++ b/src/wok/plugins/gingerbase/m4/po.m4
@@ -0,0 +1,449 @@
+# po.m4 serial 17 (gettext-0.18)
+dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper(a)cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible(a)clisp.cons.org>, 2000-2003.
+
+AC_PREREQ([2.50])
+
+dnl Checks for all prerequisites of the po subdirectory.
+AC_DEFUN([AM_PO_SUBDIRS],
+[
+ AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+ AC_REQUIRE([AC_PROG_MKDIR_P])dnl defined by autoconf
+ AC_REQUIRE([AM_NLS])dnl
+
+ dnl Release version of the gettext macros. This is used to ensure that
+ dnl the gettext macros and po/Makefile.in.in are in sync.
+ AC_SUBST([GETTEXT_MACRO_VERSION], [0.18])
+
+ dnl Perform the following tests also if --disable-nls has been given,
+ dnl because they are needed for "make dist" to work.
+
+ dnl Search for GNU msgfmt in the PATH.
+ dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
+ dnl The second test excludes FreeBSD msgfmt.
+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+ :)
+ AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
+
+ dnl Test whether it is GNU msgfmt >= 0.15.
+changequote(,)dnl
+ case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
+ *) MSGFMT_015=$MSGFMT ;;
+ esac
+changequote([,])dnl
+ AC_SUBST([MSGFMT_015])
+changequote(,)dnl
+ case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
+ *) GMSGFMT_015=$GMSGFMT ;;
+ esac
+changequote([,])dnl
+ AC_SUBST([GMSGFMT_015])
+
+ dnl Search for GNU xgettext 0.12 or newer in the PATH.
+ dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
+ dnl The second test excludes FreeBSD xgettext.
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+ (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+ :)
+ dnl Remove leftover from FreeBSD xgettext call.
+ rm -f messages.po
+
+ dnl Test whether it is GNU xgettext >= 0.15.
+changequote(,)dnl
+ case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
+ *) XGETTEXT_015=$XGETTEXT ;;
+ esac
+changequote([,])dnl
+ AC_SUBST([XGETTEXT_015])
+
+ dnl Search for GNU msgmerge 0.11 or newer in the PATH.
+ AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
+ [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
+
+ dnl Installation directories.
+ dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
+ dnl have to define it here, so that it can be used in po/Makefile.
+ test -n "$localedir" || localedir='${datadir}/locale'
+ AC_SUBST([localedir])
+
+ dnl Support for AM_XGETTEXT_OPTION.
+ test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
+ AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
+
+ AC_CONFIG_COMMANDS([po-directories], [[
+ for ac_file in $CONFIG_FILES; do
+ # Support "outfile[:infile[:infile...]]"
+ case "$ac_file" in
+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ esac
+ # PO directories have a Makefile.in generated from Makefile.in.in.
+ case "$ac_file" in */Makefile.in)
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+ # Treat a directory as a PO directory if and only if it has a
+ # POTFILES.in file. This allows packages to have multiple PO
+ # directories under different names or in different locations.
+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+ rm -f "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+ POMAKEFILEDEPS="POTFILES.in"
+ # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
+ # on $ac_dir but don't depend on user-specified configuration
+ # parameters.
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # The set of available languages was given in configure.in.
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+ fi
+ # Compute POFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+ # Compute UPDATEPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+ # Compute DUMMYPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+ # Compute GMOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ GMOFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ done
+ fi
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+ if test -f "$f"; then
+ case "$f" in
+ *.orig | *.bak | *~) ;;
+ *) cat "$f" >> "$ac_dir/Makefile" ;;
+ esac
+ fi
+ done
+ fi
+ ;;
+ esac
+ done]],
+ [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+ # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
+ # from automake < 1.5.
+ eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
+ LINGUAS="${LINGUAS-%UNSET%}"
+ ])
+])
+
+dnl Postprocesses a Makefile in a directory containing PO files.
+AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
+[
+ # When this code is run, in config.status, two variables have already been
+ # set:
+ # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
+ # - LINGUAS is the value of the environment variable LINGUAS at configure
+ # time.
+
+changequote(,)dnl
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+ # Find a way to echo strings without interpreting backslash.
+ if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
+ gt_echo='echo'
+ else
+ if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
+ gt_echo='printf %s\n'
+ else
+ echo_func () {
+ cat <<EOT
+$*
+EOT
+ }
+ gt_echo='echo_func'
+ fi
+ fi
+
+ # A sed script that extracts the value of VARIABLE from a Makefile.
+ sed_x_variable='
+# Test if the hold space is empty.
+x
+s/P/P/
+x
+ta
+# Yes it was empty. Look if we have the expected variable definition.
+/^[ ]*VARIABLE[ ]*=/{
+ # Seen the first line of the variable definition.
+ s/^[ ]*VARIABLE[ ]*=//
+ ba
+}
+bd
+:a
+# Here we are processing a line from the variable definition.
+# Remove comment, more precisely replace it with a space.
+s/#.*$/ /
+# See if the line ends in a backslash.
+tb
+:b
+s/\\$//
+# Print the line, without the trailing backslash.
+p
+tc
+# There was no trailing backslash. The end of the variable definition is
+# reached. Clear the hold space.
+s/^.*$//
+x
+bd
+:c
+# A trailing backslash means that the variable definition continues in the
+# next line. Put a nonempty string into the hold space to indicate this.
+s/^.*$/P/
+x
+:d
+'
+changequote([,])dnl
+
+ # Set POTFILES to the value of the Makefile variable POTFILES.
+ sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
+ POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
+ # Compute POTFILES_DEPS as
+ # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
+ POTFILES_DEPS=
+ for file in $POTFILES; do
+ POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
+ done
+ POMAKEFILEDEPS=""
+
+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
+ sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
+ ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
+ fi
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ # Compute POFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+ # Compute UPDATEPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+ # Compute DUMMYPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+ # Compute GMOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+ # Compute PROPERTIESFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
+ # Compute CLASSFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
+ # Compute QMFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
+ # Compute MSGFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
+ # Compute RESOURCESDLLFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ GMOFILES=
+ PROPERTIESFILES=
+ CLASSFILES=
+ QMFILES=
+ MSGFILES=
+ RESOURCESDLLFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
+ CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
+ QMFILES="$QMFILES $srcdirpre$lang.qm"
+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+ MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
+ frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+ RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ JAVACATALOGS=
+ QTCATALOGS=
+ TCLCATALOGS=
+ CSHARPCATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
+ QTCATALOGS="$QTCATALOGS $lang.qm"
+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+ TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
+ frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+ CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
+ done
+ fi
+
+ sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
+ if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
+ # Add dependencies that cannot be formulated as a simple suffix rule.
+ for lang in $ALL_LINGUAS; do
+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+ cat >> "$ac_file.tmp" <<EOF
+$frobbedlang.msg: $lang.po
+ @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
+ \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+ done
+ fi
+ if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
+ # Add dependencies that cannot be formulated as a simple suffix rule.
+ for lang in $ALL_LINGUAS; do
+ frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+ cat >> "$ac_file.tmp" <<EOF
+$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
+ @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
+ \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+ done
+ fi
+ if test -n "$POMAKEFILEDEPS"; then
+ cat >> "$ac_file.tmp" <<EOF
+Makefile: $POMAKEFILEDEPS
+EOF
+ fi
+ mv "$ac_file.tmp" "$ac_file"
+])
+
+dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
+AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
+[
+ XGETTEXT_EXTRA_OPTIONS=
+])
+
+dnl Registers an option to be passed to xgettext in the po subdirectory.
+AC_DEFUN([AM_XGETTEXT_OPTION],
+[
+ AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
+])
diff --git a/src/wok/plugins/gingerbase/m4/progtest.m4 b/src/wok/plugins/gingerbase/m4/progtest.m4
new file mode 100644
index 0000000..2d804ac
--- /dev/null
+++ b/src/wok/plugins/gingerbase/m4/progtest.m4
@@ -0,0 +1,92 @@
+# progtest.m4 serial 6 (gettext-0.18)
+dnl Copyright (C) 1996-2003, 2005, 2008-2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper(a)cygnus.com>, 1996.
+
+AC_PREREQ([2.50])
+
+# Search path for a program which passes the given test.
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN([AM_PATH_PROG_WITH_TEST],
+[
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL([ac_cv_path_$1],
+[case "[$]$1" in
+ [[\\/]]* | ?:[[\\/]]*)
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
+ if [$3]; then
+ ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+ ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+ AC_MSG_RESULT([$][$1])
+else
+ AC_MSG_RESULT([no])
+fi
+AC_SUBST([$1])dnl
+])
--
2.1.0
9 years, 2 months
[PATCH 05/15] V4 Ginger Base : base plugin build-aix and contrib folders
by chandra@linux.vnet.ibm.com
From: chandrureddy <chandra(a)linux.vnet.ibm.com>
---
src/wok/plugins/gingerbase/build-aux/config.rpath | 672 +++++++++++++++++++++
src/wok/plugins/gingerbase/build-aux/genChangelog | 25 +
src/wok/plugins/gingerbase/build-aux/pkg-version | 59 ++
.../plugins/gingerbase/contrib/DEBIAN/Makefile.am | 17 +
.../plugins/gingerbase/contrib/DEBIAN/control.in | 14 +
src/wok/plugins/gingerbase/contrib/Makefile.am | 35 ++
src/wok/plugins/gingerbase/contrib/check_i18n.py | 82 +++
.../gingerbase/contrib/gingerbase.spec.fedora.in | 68 +++
.../gingerbase/contrib/gingerbase.spec.suse.in | 62 ++
src/wok/plugins/gingerbase/contrib/make-deb.sh.in | 15 +
10 files changed, 1049 insertions(+)
create mode 100644 src/wok/plugins/gingerbase/build-aux/config.rpath
create mode 100755 src/wok/plugins/gingerbase/build-aux/genChangelog
create mode 100755 src/wok/plugins/gingerbase/build-aux/pkg-version
create mode 100644 src/wok/plugins/gingerbase/contrib/DEBIAN/Makefile.am
create mode 100644 src/wok/plugins/gingerbase/contrib/DEBIAN/control.in
create mode 100644 src/wok/plugins/gingerbase/contrib/Makefile.am
create mode 100755 src/wok/plugins/gingerbase/contrib/check_i18n.py
create mode 100644 src/wok/plugins/gingerbase/contrib/gingerbase.spec.fedora.in
create mode 100644 src/wok/plugins/gingerbase/contrib/gingerbase.spec.suse.in
create mode 100644 src/wok/plugins/gingerbase/contrib/make-deb.sh.in
diff --git a/src/wok/plugins/gingerbase/build-aux/config.rpath b/src/wok/plugins/gingerbase/build-aux/config.rpath
new file mode 100644
index 0000000..17298f2
--- /dev/null
+++ b/src/wok/plugins/gingerbase/build-aux/config.rpath
@@ -0,0 +1,672 @@
+#! /bin/sh
+# Output a system dependent set of variables, describing how to set the
+# run time search path of shared libraries in an executable.
+#
+# Copyright 1996-2010 Free Software Foundation, Inc.
+# Taken from GNU libtool, 2001
+# Originally by Gordon Matzigkeit <gord(a)gnu.ai.mit.edu>, 1996
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# The first argument passed to this file is the canonical host specification,
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
+# should be set by the caller.
+#
+# The set of defined variables is at the end of this script.
+
+# Known limitations:
+# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
+# than 256 bytes, otherwise the compiler driver will dump core. The only
+# known workaround is to choose shorter directory names for the build
+# directory and/or the installation directory.
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+shrext=.so
+
+host="$1"
+host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+# Code taken from libtool.m4's _LT_CC_BASENAME.
+
+for cc_temp in $CC""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
+
+# Code taken from libtool.m4's _LT_COMPILER_PIC.
+
+wl=
+if test "$GCC" = yes; then
+ wl='-Wl,'
+else
+ case "$host_os" in
+ aix*)
+ wl='-Wl,'
+ ;;
+ darwin*)
+ case $cc_basename in
+ xlc*)
+ wl='-Wl,'
+ ;;
+ esac
+ ;;
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ wl='-Wl,'
+ ;;
+ irix5* | irix6* | nonstopux*)
+ wl='-Wl,'
+ ;;
+ newsos6)
+ ;;
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ ecc*)
+ wl='-Wl,'
+ ;;
+ icc* | ifort*)
+ wl='-Wl,'
+ ;;
+ lf95*)
+ wl='-Wl,'
+ ;;
+ pgcc | pgf77 | pgf90)
+ wl='-Wl,'
+ ;;
+ ccc*)
+ wl='-Wl,'
+ ;;
+ como)
+ wl='-lopt='
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ wl='-Wl,'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ osf3* | osf4* | osf5*)
+ wl='-Wl,'
+ ;;
+ rdos*)
+ ;;
+ solaris*)
+ wl='-Wl,'
+ ;;
+ sunos4*)
+ wl='-Qoption ld '
+ ;;
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ wl='-Wl,'
+ ;;
+ sysv4*MP*)
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ wl='-Wl,'
+ ;;
+ unicos*)
+ wl='-Wl,'
+ ;;
+ uts4*)
+ ;;
+ esac
+fi
+
+# Code taken from libtool.m4's _LT_LINKER_SHLIBS.
+
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+
+case "$host_os" in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ # Unlike libtool, we use -rpath here, not --rpath, since the documented
+ # option of GNU ld is called -rpath, not --rpath.
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ case "$host_os" in
+ aix[3-9]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs=no
+ fi
+ ;;
+ amigaos*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ # Samuel A. Falvo II <kc5tja(a)dolphin.openprojects.net> reports
+ # that the semantics of dynamic libraries on AmigaOS, at least up
+ # to version 4, is to share data among multiple programs linked
+ # with the same dynamic library. Since this doesn't match the
+ # behavior of shared libraries on other platforms, we cannot use
+ # them.
+ ld_shlibs=no
+ ;;
+ beos*)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ cygwin* | mingw* | pw32* | cegcc*)
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ interix[3-9]*)
+ hardcode_direct=no
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ gnu* | linux* | k*bsd*-gnu)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ netbsd*)
+ ;;
+ solaris*)
+ if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ ;;
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ ;;
+ sunos4*)
+ hardcode_direct=yes
+ ;;
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ if test "$ld_shlibs" = no; then
+ hardcode_libdir_flag_spec=
+ fi
+else
+ case "$host_os" in
+ aix3*)
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$GCC" = yes; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+ aix[4-9]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ else
+ aix_use_runtimelinking=no
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+ fi
+ hardcode_direct=yes
+ hardcode_libdir_separator=':'
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" && \
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ ;;
+ esac
+ fi
+ # Begin _LT_AC_SYS_LIBPATH_AIX.
+ echo 'int main () { return 0; }' > conftest.c
+ ${CC} ${LDFLAGS} conftest.c -o conftest
+ aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+ if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+ fi
+ if test -z "$aix_libpath"; then
+ aix_libpath="/usr/lib:/lib"
+ fi
+ rm -f conftest.c conftest
+ # End _LT_AC_SYS_LIBPATH_AIX.
+ if test "$aix_use_runtimelinking" = yes; then
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ else
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ fi
+ fi
+ ;;
+ amigaos*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ # see comment about different semantics on the GNU ld section
+ ld_shlibs=no
+ ;;
+ bsdi[45]*)
+ ;;
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ libext=lib
+ ;;
+ darwin* | rhapsody*)
+ hardcode_direct=no
+ if test "$GCC" = yes ; then
+ :
+ else
+ case $cc_basename in
+ xlc*)
+ ;;
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+ fi
+ ;;
+ dgux*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+ freebsd1*)
+ ld_shlibs=no
+ ;;
+ freebsd2.2*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ freebsd2*)
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ ;;
+ freebsd* | dragonfly*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ hpux9*)
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ hpux10*)
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
+ hpux11*)
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct=no
+ ;;
+ *)
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+ irix5* | irix6* | nonstopux*)
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ netbsd*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ newsos6)
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct=yes
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ else
+ case "$host_os" in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ osf3*)
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ osf4* | osf5*)
+ if test "$GCC" = yes; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ else
+ # Both cc and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ hardcode_libdir_separator=:
+ ;;
+ solaris*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ sunos4*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ ;;
+ sysv4)
+ case $host_vendor in
+ sni)
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ hardcode_direct=no
+ ;;
+ motorola)
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ ;;
+ sysv4.3*)
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ ld_shlibs=yes
+ fi
+ ;;
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ ;;
+ sysv5* | sco3.2v5* | sco5v6*)
+ hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+ hardcode_libdir_separator=':'
+ ;;
+ uts4*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+fi
+
+# Check dynamic linker characteristics
+# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER.
+# Unlike libtool.m4, here we don't care about _all_ names of the library, but
+# only about the one the linker finds when passed -lNAME. This is the last
+# element of library_names_spec in libtool.m4, or possibly two of them if the
+# linker has special search rules.
+library_names_spec= # the last element of library_names_spec in libtool.m4
+libname_spec='lib$name'
+case "$host_os" in
+ aix3*)
+ library_names_spec='$libname.a'
+ ;;
+ aix[4-9]*)
+ library_names_spec='$libname$shrext'
+ ;;
+ amigaos*)
+ library_names_spec='$libname.a'
+ ;;
+ beos*)
+ library_names_spec='$libname$shrext'
+ ;;
+ bsdi[45]*)
+ library_names_spec='$libname$shrext'
+ ;;
+ cygwin* | mingw* | pw32* | cegcc*)
+ shrext=.dll
+ library_names_spec='$libname.dll.a $libname.lib'
+ ;;
+ darwin* | rhapsody*)
+ shrext=.dylib
+ library_names_spec='$libname$shrext'
+ ;;
+ dgux*)
+ library_names_spec='$libname$shrext'
+ ;;
+ freebsd1*)
+ ;;
+ freebsd* | dragonfly*)
+ case "$host_os" in
+ freebsd[123]*)
+ library_names_spec='$libname$shrext$versuffix' ;;
+ *)
+ library_names_spec='$libname$shrext' ;;
+ esac
+ ;;
+ gnu*)
+ library_names_spec='$libname$shrext'
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $host_cpu in
+ ia64*)
+ shrext=.so
+ ;;
+ hppa*64*)
+ shrext=.sl
+ ;;
+ *)
+ shrext=.sl
+ ;;
+ esac
+ library_names_spec='$libname$shrext'
+ ;;
+ interix[3-9]*)
+ library_names_spec='$libname$shrext'
+ ;;
+ irix5* | irix6* | nonstopux*)
+ library_names_spec='$libname$shrext'
+ case "$host_os" in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
+ *) libsuff= shlibsuff= ;;
+ esac
+ ;;
+ esac
+ ;;
+ linux*oldld* | linux*aout* | linux*coff*)
+ ;;
+ linux* | k*bsd*-gnu)
+ library_names_spec='$libname$shrext'
+ ;;
+ knetbsd*-gnu)
+ library_names_spec='$libname$shrext'
+ ;;
+ netbsd*)
+ library_names_spec='$libname$shrext'
+ ;;
+ newsos6)
+ library_names_spec='$libname$shrext'
+ ;;
+ nto-qnx*)
+ library_names_spec='$libname$shrext'
+ ;;
+ openbsd*)
+ library_names_spec='$libname$shrext$versuffix'
+ ;;
+ os2*)
+ libname_spec='$name'
+ shrext=.dll
+ library_names_spec='$libname.a'
+ ;;
+ osf3* | osf4* | osf5*)
+ library_names_spec='$libname$shrext'
+ ;;
+ rdos*)
+ ;;
+ solaris*)
+ library_names_spec='$libname$shrext'
+ ;;
+ sunos4*)
+ library_names_spec='$libname$shrext$versuffix'
+ ;;
+ sysv4 | sysv4.3*)
+ library_names_spec='$libname$shrext'
+ ;;
+ sysv4*MP*)
+ library_names_spec='$libname$shrext'
+ ;;
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ library_names_spec='$libname$shrext'
+ ;;
+ uts4*)
+ library_names_spec='$libname$shrext'
+ ;;
+esac
+
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
+shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
+escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+
+LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
+
+# How to pass a linker flag through the compiler.
+wl="$escaped_wl"
+
+# Static library suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally "so").
+shlibext="$shlibext"
+
+# Format of library name prefix.
+libname_spec="$escaped_libname_spec"
+
+# Library names that the linker finds when passed -lNAME.
+library_names_spec="$escaped_library_names_spec"
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator="$hardcode_libdir_separator"
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct="$hardcode_direct"
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L="$hardcode_minus_L"
+
+EOF
diff --git a/src/wok/plugins/gingerbase/build-aux/genChangelog b/src/wok/plugins/gingerbase/build-aux/genChangelog
new file mode 100755
index 0000000..803f24e
--- /dev/null
+++ b/src/wok/plugins/gingerbase/build-aux/genChangelog
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# This script is based on code from the Kandan project:
+# https://github.com/kandanapp/kandan/blob/master/gen-changelog.sh
+
+echo "CHANGELOG"
+echo "========="
+echo
+git for-each-ref --sort='*authordate' --format='%(tag)' refs/tags | tac |grep -v '^$' | while read TAG ; do
+ if [ $NEXT ]; then
+ echo "#### [$NEXT] ####"
+ elif [ "$1" != "--release" ]; then
+ echo "#### [Current] ####"
+ else
+ NEXT=$TAG
+ continue
+ fi
+ GIT_PAGER=cat git log --pretty=format:" * [%h] %<(78,trunc)%s (%an)" $TAG..$NEXT
+ NEXT=$TAG
+ echo; echo
+done
+FIRST=$(git for-each-ref --sort='*authordate' --format='%(tag)' refs/tags | head -1)
+
+echo "#### [$FIRST] ####"
+GIT_PAGER=cat git log --pretty=format:" * [%h] %<(78,trunc)%s (%an)" $FIRST
diff --git a/src/wok/plugins/gingerbase/build-aux/pkg-version b/src/wok/plugins/gingerbase/build-aux/pkg-version
new file mode 100755
index 0000000..749cf6c
--- /dev/null
+++ b/src/wok/plugins/gingerbase/build-aux/pkg-version
@@ -0,0 +1,59 @@
+#!/bin/sh
+#
+# Copyright 2008-2012 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+# tags and output versions:
+# - 4.9.0 => 4.9.0 (upstream clean)
+# - 4.9.0-1 => 4.9.0 (downstream clean)
+# - 4.9.0-2-g34e62f => 4.9.0 (upstream dirty)
+# - 4.9.0-1-2-g34e62f => 4.9.0 (downstream dirty)
+AWK_VERSION='
+ BEGIN { FS="-" }
+ /^[0-9]/ {
+ print $1
+ }'
+
+# tags and output releases:
+# - 4.9.0 => 0 (upstream clean)
+# - 4.9.0-1 => 1 (downstream clean)
+# - 4.9.0-2-g34e62f1 => 2.git34e62f1 (upstream dirty)
+# - 4.9.0-1-2-g34e62f1 => 1.2.git34e62f1 (downstream dirty)
+AWK_RELEASE='
+ BEGIN { FS="-"; OFS="." }
+ /^[0-9]/ {
+ if (NF == 1) print 0
+ else if (NF == 2) print $2
+ else if (NF == 3) print $2, "git" substr($3, 2)
+ else if (NF == 4) print $2, $3, "git" substr($4, 2)
+ }'
+
+if [ ! -d .git ]; then
+ PKG_VERSION=`cat VERSION`
+else
+ PKG_VERSION=`git describe --tags --match "[0-9]*" || cat VERSION`
+fi
+
+if test "x$1" = "x--full"; then
+ echo $PKG_VERSION | tr -d '[:space:]'
+elif test "x$1" = "x--version"; then
+ echo $PKG_VERSION | awk "$AWK_VERSION" | tr -cd '[:alnum:].'
+elif test "x$1" = "x--release"; then
+ echo $PKG_VERSION | awk "$AWK_RELEASE" | tr -cd '[:alnum:].'
+else
+ echo "usage: $0 [--full|--version|--release]"
+ exit 1
+fi
diff --git a/src/wok/plugins/gingerbase/contrib/DEBIAN/Makefile.am b/src/wok/plugins/gingerbase/contrib/DEBIAN/Makefile.am
new file mode 100644
index 0000000..43e19ab
--- /dev/null
+++ b/src/wok/plugins/gingerbase/contrib/DEBIAN/Makefile.am
@@ -0,0 +1,17 @@
+# Copyright IBM Corp, 2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+CLEANFILES = control
diff --git a/src/wok/plugins/gingerbase/contrib/DEBIAN/control.in b/src/wok/plugins/gingerbase/contrib/DEBIAN/control.in
new file mode 100644
index 0000000..aacf946
--- /dev/null
+++ b/src/wok/plugins/gingerbase/contrib/DEBIAN/control.in
@@ -0,0 +1,14 @@
+Package: @PACKAGE_NAME@
+Version: @PACKAGE_VERSION@
+Section: base
+Priority: optional
+Architecture: all
+Depends: wok,
+ python-psutil (>= 0.6.0),
+ sosreport,
+Build-Depends: libxslt,
+ python-lxml
+Maintainer: Daniel Henrique Barboza <danielhb(a)linux.vnet.ibm.com>
+Description: Ginger Base is an open source base host management plugin for Wok
+(Webserver Originated from Kimchi), that provides an intuitive web panel with
+common tools for configuring and managing the Linux systems.
diff --git a/src/wok/plugins/gingerbase/contrib/Makefile.am b/src/wok/plugins/gingerbase/contrib/Makefile.am
new file mode 100644
index 0000000..8e02cfd
--- /dev/null
+++ b/src/wok/plugins/gingerbase/contrib/Makefile.am
@@ -0,0 +1,35 @@
+# Copyright IBM Corp, 2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+SUBDIRS = DEBIAN
+
+EXTRA_DIST = \
+ check_i18n.py \
+ gingerbase.spec.fedora.in \
+ gingerbase.spec.suse.in \
+ make-deb.sh.in \
+ $(NULL)
+
+make-deb.sh: make-deb.sh.in $(top_builddir)/config.status
+ $(AM_V_GEN)sed \
+ -e 's|[@]PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g' \
+ -e 's|[@]PACKAGE_RELEASE[@]|$(PACKAGE_RELEASE)|g' \
+ < $< > $@-t && \
+ chmod a+x $@-t && \
+ mv $@-t $@
+BUILT_SOURCES = make-deb.sh
+
+CLEANFILES = gingerbase.spec.fedora gingerbase.spec.suse gingerbase.spec make-deb.sh
diff --git a/src/wok/plugins/gingerbase/contrib/check_i18n.py b/src/wok/plugins/gingerbase/contrib/check_i18n.py
new file mode 100755
index 0000000..fe1fc0b
--- /dev/null
+++ b/src/wok/plugins/gingerbase/contrib/check_i18n.py
@@ -0,0 +1,82 @@
+#!/usr/bin/env python2
+#
+# Project Ginger Base
+#
+# Copyright IBM, Corp. 2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+import imp
+import os
+import re
+import sys
+
+
+# Match all conversion specifier with mapping key
+PATTERN = re.compile(r'''%\([^)]+\) # Mapping key
+ [#0\-+]? # Conversion flags (optional)
+ (\d+|\*)? # Minimum field width (optional)
+ (\.(\d+|\*))? # Precision (optional)
+ [lLh]? # Length modifier (optional)
+ [cdeEfFgGioursxX%] # Conversion type''',
+ re.VERBOSE)
+BAD_PATTERN = re.compile(r"%\([^)]*?\)")
+
+
+def load_i18n_module(i18nfile):
+ path = os.path.dirname(i18nfile)
+ mname = i18nfile.replace("/", "_").rstrip(".py")
+ mobj = imp.find_module("i18n", [path])
+ return imp.load_module(mname, *mobj)
+
+
+def check_string_formatting(messages):
+ for k, v in messages.iteritems():
+ if BAD_PATTERN.findall(PATTERN.sub(" ", v)):
+ print "bad i18n string formatting:"
+ print " %s: %s" % (k, v)
+ exit(1)
+
+
+def check_obsolete_messages(path, messages):
+ def find_message_key(path, k):
+ for root, dirs, files in os.walk(path):
+ for f in files:
+ fname = os.path.join(root, f)
+ if (not fname.endswith("i18n.py") and fname.endswith(".py") or
+ fname.endswith(".json")):
+ with open(fname) as f:
+ string = "".join(f.readlines())
+ if k in string:
+ return True
+ return False
+
+ for k in messages.iterkeys():
+ if not find_message_key(path, k):
+ print " %s is obsolete, it is no longer in use" % k
+ exit(1)
+
+
+def main():
+ print "Checking for invalid i18n string..."
+ for f in sys.argv[1:]:
+ messages = load_i18n_module(f).messages
+ check_string_formatting(messages)
+ check_obsolete_messages(os.path.dirname(f), messages)
+ print "Checking for invalid i18n string successfully"
+
+
+if __name__ == '__main__':
+ main()
diff --git a/src/wok/plugins/gingerbase/contrib/gingerbase.spec.fedora.in b/src/wok/plugins/gingerbase/contrib/gingerbase.spec.fedora.in
new file mode 100644
index 0000000..a4ffb66
--- /dev/null
+++ b/src/wok/plugins/gingerbase/contrib/gingerbase.spec.fedora.in
@@ -0,0 +1,68 @@
+Name: Ginger Base
+Version: @PACKAGE_VERSION@
+Release: @PACKAGE_RELEASE@%{?dist}
+Summary: Wok plugin for base host management
+BuildRoot: %{_topdir}/BUILD/%{name}-%{version}-%{release}
+BuildArch: noarch
+Group: System Environment/Base
+License: LGPL/ASL2
+Source0: %{name}-%{version}.tar.gz
+Requires: wok
+Requires: python-psutil >= 0.6.0
+Requires: sos
+BuildRequires: libxslt
+BuildRequires: python-lxml
+
+%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
+%global with_systemd 1
+%endif
+
+%if 0%{?rhel} == 6
+Requires: python-ordereddict
+BuildRequires: python-unittest2
+%endif
+
+%description
+Ginger Base is an open source base host management plugin for Wok
+(Webserver Originated from Kimchi), that provides an intuitive web panel with
+common tools for configuring and managing the Linux systems.
+
+%prep
+
+
+%build
+%configure
+make
+
+
+%install
+rm -rf %{buildroot}
+make DESTDIR=%{buildroot} install
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%attr(-,root,root)
+%{python_sitelib}/wok/plugins/gingerbase/*.py*
+%{python_sitelib}/wok/plugins/gingerbase/control/*.py*
+%{python_sitelib}/wok/plugins/gingerbase/model/*.py*
+%{python_sitelib}/wok/plugins/gingerbase/API.json
+%{python_sitelib}/wok/plugins/gingerbase/
+%{_datadir}/wok/plugins/gingerbase/doc/API.md
+%{_datadir}/wok/plugins/gingerbase/doc/README.md
+%{_datadir}/wok/plugins/gingerbase/doc/README-federation.md
+%{_prefix}/share/locale/*/LC_MESSAGES/gingerbase.mo
+%{_datadir}/wok/plugins/gingerbase/ui/config/*.xml
+%{_datadir}/wok/plugins/gingerbase/ui/
+%{_datadir}/wok/plugins/gingerbase
+%{_sysconfdir}/wok/plugins.d/gingerbase.conf
+%{_sysconfdir}/wok/
+%{_sharedstatedir}/wok/debugreports/
+%{_sharedstatedir}/wok/
+
+
+%changelog
+* Thu Aug 25 2015 Chandra Shehkhar Reddy Potula <chandra(a)linux.vnet.ibm.com> 0.0-1s
+- First build
diff --git a/src/wok/plugins/gingerbase/contrib/gingerbase.spec.suse.in b/src/wok/plugins/gingerbase/contrib/gingerbase.spec.suse.in
new file mode 100644
index 0000000..ba92606
--- /dev/null
+++ b/src/wok/plugins/gingerbase/contrib/gingerbase.spec.suse.in
@@ -0,0 +1,62 @@
+Name: Ginger Base
+Version: @PACKAGE_VERSION@
+Release: @PACKAGE_RELEASE@%{?dist}
+Summary: Wok plugin for base host management
+BuildRoot: %{_topdir}/BUILD/%{name}-%{version}-%{release}
+BuildArch: noarch
+Group: System Environment/Base
+License: LGPL/ASL2
+Source0: %{name}-%{version}.tar.gz
+Requires: wok
+Requires: python-psutil >= 0.6.0
+BuildRequires: libxslt-tools
+BuildRequires: python-lxml
+
+%if 0%{?suse_version} == 1100
+Requires: python-ordereddict
+%endif
+
+%if 0%{?suse_version} > 1140
+%global with_systemd 1
+%endif
+
+%description
+Ginger Base is an open source base host management plugin for Wok
+(Webserver Originated from Kimchi), that provides an intuitive web panel with
+common tools for configuring and managing the Linux systems.
+
+%prep
+%setup
+
+%install
+rm -rf %{buildroot}
+make DESTDIR=%{buildroot} install
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%attr(-,root,root)
+%{python_sitelib}/wok/plugins/gingerbase/*.py*
+%{python_sitelib}/wok/plugins/gingerbase/control/*.py*
+%{python_sitelib}/wok/plugins/gingerbase/model/*.py*
+%{python_sitelib}/wok/plugins/gingerbase/API.json
+%{python_sitelib}/wok/plugins/gingerbase/
+%{_datadir}/wok/plugins/gingerbase/doc/API.md
+%{_datadir}/wok/plugins/gingerbase/doc/README.md
+%{_datadir}/wok/plugins/gingerbase/doc/README-federation.md
+%{_prefix}/share/locale/*/LC_MESSAGES/gingerbase.mo
+%{_datadir}/wok/plugins/gingerbase/ui/config/*.xml
+%{_datadir}/wok/plugins/gingerbase/ui/
+%{_datadir}/wok/plugins/gingerbase
+%{_sysconfdir}/wok/plugins.d/gingerbase.conf
+%{_sysconfdir}/wok/
+%{_var}/lib/wok/debugreports/
+%{_var}/lib/wok/
+
+
+
+%changelog
+* Thu Aug 25 2015 Chandra Shehkhar Reddy Potula <chandra(a)linux.vnet.ibm.com> 0.0-1
+- First build
diff --git a/src/wok/plugins/gingerbase/contrib/make-deb.sh.in b/src/wok/plugins/gingerbase/contrib/make-deb.sh.in
new file mode 100644
index 0000000..a4c92bf
--- /dev/null
+++ b/src/wok/plugins/gingerbase/contrib/make-deb.sh.in
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+VERSION="@PACKAGE_VERSION@"
+RELEASE="@PACKAGE_RELEASE@"
+
+if [ ! -f configure ]; then
+ echo "Please run this script from the top of the package tree"
+ exit 1
+fi
+
+TMPDIR=`mktemp -d`
+
+make DESTDIR=$TMPDIR install-deb
+dpkg-deb -b $TMPDIR gingerbase-${VERSION}-${RELEASE}.noarch.deb
+rm -rf $TMPDIR
--
2.1.0
9 years, 2 months