[PATCH 0/2] UI support for manage guest disk
by lvroyce@linux.vnet.ibm.com
From: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
Royce Lv (2):
Fix select menu data append
UI: Support add guest disk
ui/css/theme-default/guest-storage-add.css | 16 +++++
ui/js/src/kimchi.guest_storage_add.main.js | 105 +++++++++++++++++++++++++++--
ui/js/widgets/select-menu.js | 1 +
ui/pages/guest-storage-add.html.tmpl | 50 +++++++++++++-
4 files changed, 165 insertions(+), 7 deletions(-)
--
1.8.3.2
10 years, 8 months
[PATCH] Github #329: Packaging - Update Fedora spec file to address SELinux
by Paulo Vital
Signed-off-by: Paulo Vital <pvital(a)linux.vnet.ibm.com>
---
contrib/kimchi.spec.fedora.in | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/contrib/kimchi.spec.fedora.in b/contrib/kimchi.spec.fedora.in
index 77bf6bf..185f0ff 100644
--- a/contrib/kimchi.spec.fedora.in
+++ b/contrib/kimchi.spec.fedora.in
@@ -105,6 +105,8 @@ iptables -I INPUT -p tcp --dport 8001 -j ACCEPT
iptables -I INPUT -p tcp --dport 64667 -j ACCEPT
service iptables save >/dev/null 2>&1
%endif
+# Add SELinux rules to "open" Kimchi ports
+semanage permissive -a httpd_t
%preun
@@ -129,6 +131,8 @@ if [ "$1" -ge 1 ] ; then
/bin/systemctl try-restart kimchid.service >/dev/null 2>&1 || :
fi
exit 0
+# Rollback SELinux rules
+semanage permissive -d httpd_t
%clean
--
1.8.3.1
10 years, 8 months
[PATCH v3] Display version/build number in UI
by Adam King
Add a new "About" menu choice to allow the user access to the kimchi version and build number.
Signed-off-by: Adam King <rak(a)linux.vnet.ibm.com>
---
ui/css/theme-default/about.css | 21 +++++++++++++++++++++
ui/css/theme-default/topbar.css | 1 +
ui/images/theme-default/logo-plain.gif | Bin 0 -> 1601 bytes
ui/js/src/kimchi.main.js | 4 ++++
ui/pages/kimchi-ui.html.tmpl | 27 +++++++++++++++++++++++++++
5 files changed, 53 insertions(+)
create mode 100644 ui/css/theme-default/about.css
create mode 100644 ui/images/theme-default/logo-plain.gif
diff --git a/ui/css/theme-default/about.css b/ui/css/theme-default/about.css
new file mode 100644
index 0000000..577b403
--- /dev/null
+++ b/ui/css/theme-default/about.css
@@ -0,0 +1,21 @@
+/*
+ * 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.
+ */
+.about-window {
+ width: 350px;
+ height: 300px;
+}
diff --git a/ui/css/theme-default/topbar.css b/ui/css/theme-default/topbar.css
index 7180cd5..aed4f3f 100644
--- a/ui/css/theme-default/topbar.css
+++ b/ui/css/theme-default/topbar.css
@@ -155,6 +155,7 @@
color: black;
padding: 12px 18px;
white-space: nowrap;
+ line-height: 12px;
}
.user-menu-item {
diff --git a/ui/images/theme-default/logo-plain.gif b/ui/images/theme-default/logo-plain.gif
new file mode 100644
index 0000000000000000000000000000000000000000..4fd30d56db7951bb3efda43ea250d6335a49e40a
GIT binary patch
literal 1601
zcmV-H2EO@6Nk%w1VK@LV0O$VzKmbEr00~J35jh7#M*>Y%1`#(4IBozFF%L973_wW_
z7ghyYe*hOg6C7axb3+pvHW(m?0TyTiZU7}rl>ix+0Ss*ciF5#foB$d#AT$XoUV#9f
z5GzHA0FQ4IAUGo>gaMZTGdTb-Ujj8Y94$Q>FEhCU9u+Y%lK`ntA}UcHO~(KoMI%KJ
zG&@8n90fiA6*v$~C>aYq384V59yS{ZHeFa9ZKMOLBR3>KFC{89E3W{t-vB2PI9THV
zAg%$p7dk?j3ZE500{}uv@c=IbKYIND5d%yCUnpVx03c^8H2eT4Ml(wYMN=C`2>k#r
z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=vix@Fn<ly~$I8!)o%$ON-1qx+ITgLA_
zmMT;yKx2UM5D6r3KmtKO^s?GJ!VI$uDS*7u5D62AAc6)x43rBeylq2_G|beJNkbeI
zF~=Nrbb*M5%nc(AHreQM3PUy2A&Df5;DHHv|L{T#HZbbKP!)!VQpqHXD8u6@y8xNZ
zGR-Vh#Ue%`$>TqSkn&<S)?6cHAXOT2<r|$a1EV$PEF?yeM+VXjk6?5%%$edWl!qae
zwCM_uVaQ1*L!0C&Ng#tTr^7&GGLsFLX)+|qB!kMa<7#W9G0-W*IOB{p`81@=B#h*!
z;%bFFLeM+$#M7xm=`12gApUI>!3JfDnDPo`!QdfBtUVmalp>`7!y7lPY+{EPRGd-M
z8m2^ZB~xlN+s?BW>41hQ<<LWILMI#q!yUhrBM);xlq<zTC!AXl4Nia(%{bbw21FBO
zl<|cY+>T%n4Knx<ZaMhK`^6!jtn!H-UjRW+2`8K|f+qyw0D};BpaKp!<?z;oBfcQx
z@hXm#(L@U*hcLnrmkcEF3rGBc$}`@4V-Ih9tU}Gr9?NpDy<e0;N6G`q&@w8t!0Zh;
z{xIju&D418i!26zVu>cW5QN1MjnHCCHQIRN%{|+#gL5)Zufhr|u%J^A7IDy0&D&hh
z!=paytV6ahz9fTAAwLH-Vhc2I%e`$q48`(yHSFxOEkxwN0}nroM=rTY0RaFzYh-=D
literal 0
HcmV?d00001
diff --git a/ui/js/src/kimchi.main.js b/ui/js/src/kimchi.main.js
index ef64bf8..018f5e7 100644
--- a/ui/js/src/kimchi.main.js
+++ b/ui/js/src/kimchi.main.js
@@ -204,6 +204,10 @@ kimchi.main = function() {
kimchi.message.error(err.responseJSON.reason);
});
});
+ $('#btn-about').on('click', function(event) {
+ kimchi.window.open({"content": $('#about-tmpl').html()});
+ event.preventDefault();
+ });
$('#btn-help').on('click', kimchi.getHelp);
};
diff --git a/ui/pages/kimchi-ui.html.tmpl b/ui/pages/kimchi-ui.html.tmpl
index eb3cd9d..08b27a8 100644
--- a/ui/pages/kimchi-ui.html.tmpl
+++ b/ui/pages/kimchi-ui.html.tmpl
@@ -21,6 +21,7 @@
#silent t = gettext.translation($lang.domain, $lang.localedir, languages=$lang.lang)
#silent _ = t.gettext
#silent _t = t.gettext
+#from kimchi.config import get_version
<!DOCTYPE html>
<html lang="$lang.lang[0]">
<head>
@@ -77,6 +78,9 @@
<div class="action-panel popover right-side">
<a id="btn-help" class="user-menu-item" href="javascript:void(0);">$_("Help")</a>
<br/>
+ <br/>
+ <a id="btn-about" class="user-menu-item" href="javascript:void(0);">$_("About")</a>
+ <br/>
<hr/>
<a id="btn-logout" class="user-menu-item" href="javascript: void(0);">$_("Log out")</a>
</div>
@@ -101,5 +105,28 @@
<p><code>make</code></p>
</div>
</div>
+
+<script id="about-tmpl" type="kimchi/template">
+ <div class="window about-window">
+ <header>
+ <h1 class="title"><img alt="Kimchi logo" src="/images/logo.ico"/> $_("About")</h1>
+ <div class="close">X</div>
+ </header>
+ <div class="content" align="center">
+ <center>
+ <div>
+ <br/>
+ <br/>
+ <img src="/images/theme-default/logo-plain.gif"/>
+ <br/>
+ <br/>
+ <h2>Kimchi</h2>
+ <p>$_("Version:") $get_version()</p>
+ </div>
+ </center>
+ </div>
+ </div>
+</script>
+
</body>
</html>
--
1.9.0
10 years, 8 months
[PATCH V4 0/3] VM Edit CPU/Memory: (Backend)
by Rodrigo Trujillo
V4:
- Address Aline's comments
- Rebase with latest user/groups patches
V3:
- Fix PEP8 issues
V2:
- Rebased with latest Kimchi master
V1:
- This patch set implements backend side of feature "Edit VM CPU/Memory".
You can use curl to test:
curl -X PUT -u <USER> -H 'Content-type: application/json'
-H 'Accept: application/json' http://localhost:8000/vms/<VM_NAME>
-d '{ "cpus": <NUM>, "memory": <NUM>}'
Rodrigo Trujillo (3):
VM Edit CPU/Memory: (Backend) Changes API.md, API.json and i18n.py
VM Edit CPU/Memory: (Backend) Changes VM control and model
VM Edit CPU/Memory: (Backend) Changes mockmodel and tests
docs/API.md | 3 +++
src/kimchi/API.json | 12 ++++++++++++
src/kimchi/control/vms.py | 17 ++---------------
src/kimchi/i18n.py | 2 +-
src/kimchi/mockmodel.py | 27 +++++++++++++++------------
src/kimchi/model/vms.py | 24 +++++++++++++++---------
tests/test_mockmodel.py | 6 ++++--
tests/test_model.py | 14 ++++++++++----
tests/test_rest.py | 32 +++++++++++++++++++++++++++++---
9 files changed, 91 insertions(+), 46 deletions(-)
--
1.9.0
10 years, 8 months
[PATCH 1/2] VM shutdown support in backend
by shaohef@linux.vnet.ibm.com
From: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
Shutdown command stop guest graceful.
Guest os will react to a shutdown request after the the request is issued.
The differences from power off are that the guests disk storage will
be in a stable state rather than having the (virtual) power cord pulled.
Note that the guest OS may ignore the request, so the vm is not stopped.
Additionally, the hypervisor may check and support the VM 'on_poweroff'
XML setting resulting in a domain that reboots instead of shutting down.
For kimchi will not set 'on_poweroff' for VM XML configure.
So kimchi will not check the 'on_poweroff' setting of VM.
So if VM is create by other management tool and set 'on_poweroff' as
reboot, kimchi still will call this shutdown command.
Signed-off-by: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
Signed-off-by: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
---
docs/API.md | 3 +++
src/kimchi/control/vms.py | 1 +
src/kimchi/i18n.py | 1 +
src/kimchi/mockmodel.py | 3 +++
src/kimchi/model/vms.py | 8 ++++++++
5 files changed, 16 insertions(+)
diff --git a/docs/API.md b/docs/API.md
index 716c983..0394824 100644
--- a/docs/API.md
+++ b/docs/API.md
@@ -110,6 +110,9 @@ the following general conventions:
* start: Power on a VM
* poweroff: Power off a VM forcefully. Note this action may produce undesirable
results, for example unflushed disk cache in the guest.
+* shutdown: Shut down a VM graceful. This action issue shutdown request to guest.
+ And the guest will react this request. Note the guest OS may ignore
+ the request.
* reset: Reset a VM immediately without the guest OS shutdown.
It emulates the power reset button on a machine. Note that there is a
risk of data loss caused by reset without the guest OS shutdown.
diff --git a/src/kimchi/control/vms.py b/src/kimchi/control/vms.py
index ea810e4..c7a1ff7 100644
--- a/src/kimchi/control/vms.py
+++ b/src/kimchi/control/vms.py
@@ -39,6 +39,7 @@ class VM(Resource):
setattr(self, ident, node(model, self.ident))
self.start = self.generate_action_handler('start')
self.poweroff = self.generate_action_handler('poweroff')
+ self.shutdown = self.generate_action_handler('shutdown')
self.reset = self.generate_action_handler('reset')
self.connect = self.generate_action_handler('connect')
diff --git a/src/kimchi/i18n.py b/src/kimchi/i18n.py
index 3fc3013..1f8703e 100644
--- a/src/kimchi/i18n.py
+++ b/src/kimchi/i18n.py
@@ -86,6 +86,7 @@ messages = {
"KCHVM0026E": _("Group name must be a string"),
"KCHVM0027E": _("User %(user)s does not exist"),
"KCHVM0028E": _("Group %(group)s does not exist"),
+ "KCHVM0029E": _("Unable to shutdown virtual machine %(name)s. Details: %(err)s"),
"KCHVMIF0001E": _("Interface %(iface)s does not exist in virtual machine %(name)s"),
"KCHVMIF0002E": _("Network %(network)s specified for virtual machine %(name)s does not exist"),
diff --git a/src/kimchi/mockmodel.py b/src/kimchi/mockmodel.py
index 8c7d7bb..1bf0000 100644
--- a/src/kimchi/mockmodel.py
+++ b/src/kimchi/mockmodel.py
@@ -132,6 +132,9 @@ class MockModel(object):
def vm_poweroff(self, name):
self._get_vm(name).info['state'] = 'shutoff'
+ def vm_shutdown(self, name):
+ self._get_vm(name).info['state'] = 'shutoff'
+
def vm_reset(self, name):
pass
diff --git a/src/kimchi/model/vms.py b/src/kimchi/model/vms.py
index 90e9537..98e4a9f 100644
--- a/src/kimchi/model/vms.py
+++ b/src/kimchi/model/vms.py
@@ -439,6 +439,14 @@ class VMModel(object):
raise OperationFailed("KCHVM0020E",
{'name': name, 'err': e.get_error_message()})
+ def shutdown(self, name):
+ dom = self.get_vm(name, self.conn)
+ try:
+ dom.shutdown()
+ except libvirt.libvirtError as e:
+ raise OperationFailed("KCHVM0029E",
+ {'name': name, 'err': e.get_error_message()})
+
def reset(self, name):
dom = self.get_vm(name, self.conn)
try:
--
1.9.0
10 years, 8 months
[PATCH 0/7] Manage guest disks
by lvroyce@linux.vnet.ibm.com
From: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
This patchset deals with guest disk management,
when bus is given, attach/detach behavior is based on bus to hot plug
or cold plug.
when bus is not given, kimchi will look for distro info in db to decide
proper bus for disk.
Depend on:
[PATCH]Choose available address for ide disk
Tested:
1. make check.
2. cold plug with ide bus succeeds.
3. hot plug with ide bus fails.
4. when os version/distro unrecorded, default bus is chosed.
5. when os version/distro recorded, bus is chosed based on distro info.
6. hot plug/unplug for virtio bus succeeds.
Royce Lv (7):
Guest disks: Update doc to support manage guest disks
Guest disks: Update api definition and error reporting
fix: store distro and version information when creating vm
Guest disks: Choose proper bus for device
fix: Change check path function naming
Multiple pep8 fixes
Guest disks: Update testcase
docs/API.md | 10 +++---
src/kimchi/API.json | 24 ++++++++-----
src/kimchi/i18n.py | 27 ++++++++-------
src/kimchi/mockmodel.py | 18 +++++-----
src/kimchi/model/vms.py | 23 +++++++------
src/kimchi/model/vmstorages.py | 78 +++++++++++++++++++++++++++---------------
tests/test_model.py | 62 +++++++++++++++++++++++++++++++++
7 files changed, 170 insertions(+), 72 deletions(-)
--
1.8.3.2
10 years, 8 months
[PATCH v2] Display version/build number in UI
by Adam King
Add a new "About" menu choice to allow the user access to the kimchi version and build number.
Signed-off-by: Adam King <rak(a)linux.vnet.ibm.com>
---
ui/css/theme-default/about.css | 21 +++++++++++++++++++++
ui/css/theme-default/topbar.css | 1 +
ui/images/theme-default/logo-plain.gif | Bin 0 -> 1601 bytes
ui/js/src/kimchi.main.js | 4 ++++
ui/pages/kimchi-ui.html.tmpl | 27 +++++++++++++++++++++++++++
5 files changed, 53 insertions(+)
create mode 100644 ui/css/theme-default/about.css
create mode 100644 ui/images/theme-default/logo-plain.gif
diff --git a/ui/css/theme-default/about.css b/ui/css/theme-default/about.css
new file mode 100644
index 0000000..577b403
--- /dev/null
+++ b/ui/css/theme-default/about.css
@@ -0,0 +1,21 @@
+/*
+ * 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.
+ */
+.about-window {
+ width: 350px;
+ height: 300px;
+}
diff --git a/ui/css/theme-default/topbar.css b/ui/css/theme-default/topbar.css
index 7180cd5..aed4f3f 100644
--- a/ui/css/theme-default/topbar.css
+++ b/ui/css/theme-default/topbar.css
@@ -155,6 +155,7 @@
color: black;
padding: 12px 18px;
white-space: nowrap;
+ line-height: 12px;
}
.user-menu-item {
diff --git a/ui/images/theme-default/logo-plain.gif b/ui/images/theme-default/logo-plain.gif
new file mode 100644
index 0000000000000000000000000000000000000000..4fd30d56db7951bb3efda43ea250d6335a49e40a
GIT binary patch
literal 1601
zcmV-H2EO@6Nk%w1VK@LV0O$VzKmbEr00~J35jh7#M*>Y%1`#(4IBozFF%L973_wW_
z7ghyYe*hOg6C7axb3+pvHW(m?0TyTiZU7}rl>ix+0Ss*ciF5#foB$d#AT$XoUV#9f
z5GzHA0FQ4IAUGo>gaMZTGdTb-Ujj8Y94$Q>FEhCU9u+Y%lK`ntA}UcHO~(KoMI%KJ
zG&@8n90fiA6*v$~C>aYq384V59yS{ZHeFa9ZKMOLBR3>KFC{89E3W{t-vB2PI9THV
zAg%$p7dk?j3ZE500{}uv@c=IbKYIND5d%yCUnpVx03c^8H2eT4Ml(wYMN=C`2>k#r
zO*SFN0MaczKb0Uc8$nVNL2XhrJ6|*vCPXd42FoEsO1KQggDN`-Mvv7KGXzdrPCYVI
zJuDkYYHT_fY%^*ARAP8J6*WguC{heMNjWc1AT&)VDobPxQKNP~DOg53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3PUy2A&Df5;DHHv|L{T#HZbbKP!)!VQpqHXD8u6@y8xNZ
zGR-Vh#Ue%`$>TqSkn&<S)?6cHAXOT2<r|$a1EV$PEF?yeM+VXjk6?5%%$edWl!qae
zwCM_uVaQ1*L!0C&Ng#tTr^7&GGLsFLX)+|qB!kMa<7#W9G0-W*IOB{p`81@=B#h*!
z;%bFFLeM+$#M7xm=`12gApUI>!3JfDnDPo`!QdfBtUVmalp>`7!y7lPY+{EPRGd-M
z8m2^ZB~xlN+s?BW>41hQ<<LWILMI#q!yUhrBM);xlq<zTC!AXl4Nia(%{bbw21FBO
zl<|cY+>T%n4Knx<ZaMhK`^6!jtn!H-UjRW+2`8K|f+qyw0D};BpaKp!<?z;oBfcQx
z@hXm#(L@U*hcLnrmkcEF3rGBc$}`@4V-Ih9tU}Gr9?NpDy<e0;N6G`q&@w8t!0Zh;
z{xIju&D418i!26zVu>cW5QN1MjnHCCHQIRN%{|+#gL5)Zufhr|u%J^A7IDy0&D&hh
z!=paytV6ahz9fTAAwLH-Vhc2I%e`$q48`(yHSFxOEkxwN0}nroM=rTY0RaFzYh-=D
literal 0
HcmV?d00001
diff --git a/ui/js/src/kimchi.main.js b/ui/js/src/kimchi.main.js
index ef64bf8..018f5e7 100644
--- a/ui/js/src/kimchi.main.js
+++ b/ui/js/src/kimchi.main.js
@@ -204,6 +204,10 @@ kimchi.main = function() {
kimchi.message.error(err.responseJSON.reason);
});
});
+ $('#btn-about').on('click', function(event) {
+ kimchi.window.open({"content": $('#about-tmpl').html()});
+ event.preventDefault();
+ });
$('#btn-help').on('click', kimchi.getHelp);
};
diff --git a/ui/pages/kimchi-ui.html.tmpl b/ui/pages/kimchi-ui.html.tmpl
index eb3cd9d..9561e14 100644
--- a/ui/pages/kimchi-ui.html.tmpl
+++ b/ui/pages/kimchi-ui.html.tmpl
@@ -21,6 +21,7 @@
#silent t = gettext.translation($lang.domain, $lang.localedir, languages=$lang.lang)
#silent _ = t.gettext
#silent _t = t.gettext
+#from kimchi.config import get_version
<!DOCTYPE html>
<html lang="$lang.lang[0]">
<head>
@@ -77,6 +78,9 @@
<div class="action-panel popover right-side">
<a id="btn-help" class="user-menu-item" href="javascript:void(0);">$_("Help")</a>
<br/>
+ <br/>
+ <a id="btn-about" class="user-menu-item" href="javascript:void(0);">$_("About")</a>
+ <br/>
<hr/>
<a id="btn-logout" class="user-menu-item" href="javascript: void(0);">$_("Log out")</a>
</div>
@@ -101,5 +105,28 @@
<p><code>make</code></p>
</div>
</div>
+
+<script id="about-tmpl" type="kimchi/template">
+ <div class="window about-window">
+ <header>
+ <h1 class="title"><img alt="Kimchi logo" src="/images/logo.ico"/> $_("About")</h1>
+ <div class="close">X</div>
+ </header>
+ <div class="content" align="center">
+ <center>
+ <div>
+ <br/>
+ <br/>
+ <img src="/images/theme-default/logo-plain.gif"/>
+ <br/>
+ <br/>
+ <h2>Kimchi</h2>
+ <p>Version: $get_version()</p>
+ </div>
+ </center>
+ </div>
+ </div>
+</script>
+
</body>
</html>
--
1.9.0
10 years, 8 months
[PATCH] Display version/build number in UI
by Adam King
Add a new "About" menu choice to allow the user access to the kimchi version and build number.
Signed-off-by: Adam King <rak(a)linux.vnet.ibm.com>
---
ui/css/theme-default/about.css | 21 +++++++++++++++++++++
ui/images/theme-default/logo-plain.gif | Bin 0 -> 1601 bytes
ui/js/src/kimchi.main.js | 4 ++++
ui/pages/kimchi-ui.html.tmpl | 26 ++++++++++++++++++++++++++
4 files changed, 51 insertions(+)
create mode 100644 ui/css/theme-default/about.css
create mode 100644 ui/images/theme-default/logo-plain.gif
diff --git a/ui/css/theme-default/about.css b/ui/css/theme-default/about.css
new file mode 100644
index 0000000..577b403
--- /dev/null
+++ b/ui/css/theme-default/about.css
@@ -0,0 +1,21 @@
+/*
+ * 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.
+ */
+.about-window {
+ width: 350px;
+ height: 300px;
+}
diff --git a/ui/images/theme-default/logo-plain.gif b/ui/images/theme-default/logo-plain.gif
new file mode 100644
index 0000000000000000000000000000000000000000..4fd30d56db7951bb3efda43ea250d6335a49e40a
GIT binary patch
literal 1601
zcmV-H2EO@6Nk%w1VK@LV0O$VzKmbEr00~J35jh7#M*>Y%1`#(4IBozFF%L973_wW_
z7ghyYe*hOg6C7axb3+pvHW(m?0TyTiZU7}rl>ix+0Ss*ciF5#foB$d#AT$XoUV#9f
z5GzHA0FQ4IAUGo>gaMZTGdTb-Ujj8Y94$Q>FEhCU9u+Y%lK`ntA}UcHO~(KoMI%KJ
zG&@8n90fiA6*v$~C>aYq384V59yS{ZHeFa9ZKMOLBR3>KFC{89E3W{t-vB2PI9THV
zAg%$p7dk?j3ZE500{}uv@c=IbKYIND5d%yCUnpVx03c^8H2eT4Ml(wYMN=C`2>k#r
zO*SFN0MaczKb0Uc8$nVNL2XhrJ6|*vCPXd42FoEsO1KQggDN`-Mvv7KGXzdrPCYVI
zJuDkYYHT_fY%^*ARAP8J6*WguC{heMNjWc1AT&)VDobPxQKNP~DOg53Y(g>sXaE3K
zw*Xn80AFVoRG}VKgC$`S09~~?RA>NYc>W+mDqLrYLrp1Y4;yU<j7t#!W5b>{wH9Bp
zXH-E!VKES5y8v#3I$n96JFrJ%K>%yX5@yX3dkX+`j6Q82lu4BNGExL^&l+pZ!$wyC
zblU)Zi6V7(I%}JpTNwa<iz{!evqinASsg@gbpV2xL3|#xTO$m5;f!cax?&nahzCZ7
z6QgT6G>{j>WhC@bW&@J13X-WigvCpNw`7A{0GX*!i&_Aix7lKNAfp%3ZyFA(3(;NO
z9+{)4aIV#K6W4SszIjT`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l4Nia(%{bbw21FBO
zl<|cY+>T%n4Knx<ZaMhK`^6!jtn!H-UjRW+2`8K|f+qyw0D};BpaKp!<?z;oBfcQx
z@hXm#(L@U*hcLnrmkcEF3rGBc$}`@4V-Ih9tU}Gr9?NpDy<e0;N6G`q&@w8t!0Zh;
z{xIju&D418i!26zVu>cW5QN1MjnHCCHQIRN%{|+#gL5)Zufhr|u%J^A7IDy0&D&hh
z!=paytV6ahz9fTAAwLH-Vhc2I%e`$q48`(yHSFxOEkxwN0}nroM=rTY0RaFzYh-=D
literal 0
HcmV?d00001
diff --git a/ui/js/src/kimchi.main.js b/ui/js/src/kimchi.main.js
index ef64bf8..018f5e7 100644
--- a/ui/js/src/kimchi.main.js
+++ b/ui/js/src/kimchi.main.js
@@ -204,6 +204,10 @@ kimchi.main = function() {
kimchi.message.error(err.responseJSON.reason);
});
});
+ $('#btn-about').on('click', function(event) {
+ kimchi.window.open({"content": $('#about-tmpl').html()});
+ event.preventDefault();
+ });
$('#btn-help').on('click', kimchi.getHelp);
};
diff --git a/ui/pages/kimchi-ui.html.tmpl b/ui/pages/kimchi-ui.html.tmpl
index eb3cd9d..127960a 100644
--- a/ui/pages/kimchi-ui.html.tmpl
+++ b/ui/pages/kimchi-ui.html.tmpl
@@ -21,6 +21,7 @@
#silent t = gettext.translation($lang.domain, $lang.localedir, languages=$lang.lang)
#silent _ = t.gettext
#silent _t = t.gettext
+#from kimchi.config import get_version
<!DOCTYPE html>
<html lang="$lang.lang[0]">
<head>
@@ -77,6 +78,8 @@
<div class="action-panel popover right-side">
<a id="btn-help" class="user-menu-item" href="javascript:void(0);">$_("Help")</a>
<br/>
+ <a id="btn-about" class="user-menu-item">$_("About")</a>
+ <br/>
<hr/>
<a id="btn-logout" class="user-menu-item" href="javascript: void(0);">$_("Log out")</a>
</div>
@@ -101,5 +104,28 @@
<p><code>make</code></p>
</div>
</div>
+
+<script id="about-tmpl" type="kimchi/template">
+ <div class="window about-window">
+ <header>
+ <h1 class="title"><img alt="Kimchi logo" src="/images/logo.ico"/> $_("About")</h1>
+ <div class="close">X</div>
+ </header>
+ <div class="content" align="center">
+ <center>
+ <div>
+ <br/>
+ <br/>
+ <img src="/images/theme-default/logo-plain.gif"/>
+ <br/>
+ <br/>
+ <h2>Kimchi</h2>
+ <p>Version: $get_version()</p>
+ </div>
+ </center>
+ </div>
+ </div>
+</script>
+
</body>
</html>
--
1.9.0
10 years, 8 months
[PATCH v2] Set virt_use_nfs when NFS pool is added.
by Christy Perez
selinux has a special boolean to make it easier for disk images
to be managedi by libvirt. Set this to true when a user
adds an NFS storage pool.
Most virtualzation documentation recommends that this be set
to true. For example:
http://www.ovirt.org/Troubleshooting_NFS_Storage_Issues
http://fedoraproject.org/wiki/How_to_debug_Virtualization_problems
This will leave it set to true, even if
the user removes NFS storage pools. It is not a security risk, and
we should not set it to False in case it had already been set by the
user for another non-kimchi use.
Signed-off-by: Christy Perez <christy(a)linux.vnet.ibm.com>
---
src/kimchi/model/storagepools.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/kimchi/model/storagepools.py b/src/kimchi/model/storagepools.py
index 5af33b7..1ec6e99 100644
--- a/src/kimchi/model/storagepools.py
+++ b/src/kimchi/model/storagepools.py
@@ -126,6 +126,13 @@ class StoragePoolsModel(object):
kimchi_log.error("Problem creating Storage Pool: %s", e)
raise OperationFailed("KCHPOOL0007E",
{'name': name, 'err': e.get_error_message()})
+ if params['type'] == 'netfs':
+ output, error, returncode = run_command(['setsebool', '-P',
+ 'virt_use_nfs=1'])
+ if error or returncode:
+ kimchi_log.error('Unable to set virt_use_nfs=1. If you use
+ SELinux, this may prevent NFS pools from
+ being used.')
return name
def _clean_scan(self, pool_name):
--
1.9.0
10 years, 8 months
[PATCH 0/2] Issue#364: UI - Column Resizing Function Broken in Host Tab
by Hongliang Wang
1) Fixed column resizing bug.
2) Added repository grid column CSS width values.
Hongliang Wang (2):
Issue#364: UI - Column Resizing Function Broken in Host Tab
Host Tab: Add Widths for Repository Grid Columns
ui/css/theme-default/host.css | 12 +
ui/js/src/kimchi.grid.js | 879 ++++++++++++++++++++++--------------------
2 files changed, 474 insertions(+), 417 deletions(-)
--
1.8.1.4
10 years, 8 months