[PATCH 1/2] List iSCSI server for initiator while creating iSCSI Pool
by shaohef@linux.vnet.ibm.com
From: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
The server should be already used in an existed iSCSI Pool.
Test this patch by:
$ curl -k -u shhfeng:123456 -H "Content-Type: application/json" \
> -H "Accept: application/json" \
> http://localhost:8000/storageservers?_target_type=iscsi
[
{
"host":"127.0.0.1"
}
]
Signed-off-by: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
---
src/kimchi/API.json | 2 +-
src/kimchi/model/storagepools.py | 4 +++-
src/kimchi/model/storageservers.py | 3 +--
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/kimchi/API.json b/src/kimchi/API.json
index 76c94ab..05a5866 100644
--- a/src/kimchi/API.json
+++ b/src/kimchi/API.json
@@ -416,7 +416,7 @@
"_target_type": {
"description": "List storage servers of given type",
"type": "string",
- "pattern": "^netfs$"
+ "pattern": "^netfs|iscsi$"
}
},
"additionalProperties": false,
diff --git a/src/kimchi/model/storagepools.py b/src/kimchi/model/storagepools.py
index c0f2c58..c699fc6 100644
--- a/src/kimchi/model/storagepools.py
+++ b/src/kimchi/model/storagepools.py
@@ -37,9 +37,11 @@ POOL_STATE_MAP = {0: 'inactive',
4: 'inaccessible'}
# Types of pools supported
-# FIXME: Addd 'iscsi'
STORAGE_SOURCES = {'netfs': {'addr': '/pool/source/host/@name',
'path': '/pool/source/dir/@path'},
+ 'iscsi': {'addr': '/pool/source/host/@name',
+ 'port': '/pool/source/host/@port',
+ 'path': '/pool/source/device/@path'},
'scsi': {'adapter_type': '/pool/source/adapter/@type',
'adapter_name': '/pool/source/adapter/@name',
'wwnn': '/pool/source/adapter/@wwnn',
diff --git a/src/kimchi/model/storageservers.py b/src/kimchi/model/storageservers.py
index c9dfb25..6259b92 100644
--- a/src/kimchi/model/storageservers.py
+++ b/src/kimchi/model/storageservers.py
@@ -21,8 +21,7 @@ from kimchi.exception import NotFoundError
from kimchi.model.storagepools import StoragePoolModel, StoragePoolsModel
# Types of remote storage servers supported
-# FIXME: Add iscsi?
-STORAGE_SERVERS = ['netfs']
+STORAGE_SERVERS = ['netfs', 'iscsi']
class StorageServersModel(object):
--
1.9.3
10 years, 6 months
[PATCH V4 0/7] Issue #342: load i18n.html of the plugin
by shaohef@linux.vnet.ibm.com
From: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
V3 -> V4:
rebase
V2 -> V3:
change "enable-plugins" to "enable-sample"
remove nls
improve the Portuguese translation.
V1 -> V2:
The improvement concept here is to directly generate JSON on the server
and assign it to the i18n variable, rather than inserting nodes into the DOM.
Plugins would use a plugin1.i18n= structure to keep plugin strings from
colliding with each other, or with the kimchi variables.
ShaoHe Feng (6):
Update root.py to make Cheetah render the JSON template.
Update the i18n tmpl to produce JSON
Add JS API for fetching i18n JSON
Issue #342: load i18n.html of the plugin
add an optional to toggle the sample plugin
generate the translation files for plugins/sample
Zhou Zheng Sheng (1):
Add Minimal UI Page for the Sample Plugin
configure.ac | 11 ++
plugins/sample/Makefile.am | 26 ++++-
plugins/sample/__init__.py | 3 +-
plugins/sample/config.status | 1 +
plugins/sample/po/LINGUAS | 1 +
plugins/sample/po/Makefile.in.in | 1 +
plugins/sample/po/Makevars | 1 +
plugins/sample/po/POTFILES.in | 2 +
plugins/sample/po/en_US.po | 21 ++++
plugins/sample/po/gen-pot | 1 +
plugins/sample/po/pt_BR.po | 24 +++++
plugins/sample/po/zh_CN.po | 24 +++++
plugins/sample/sample.conf | 7 --
plugins/sample/sample.conf.in | 12 +++
plugins/sample/ui/config/tab-ext.xml | 8 +-
plugins/sample/ui/pages/i18n.json.tmpl | 9 ++
plugins/sample/ui/pages/tab.html.tmpl | 6 ++
src/kimchi/root.py | 5 +
src/kimchi/template.py | 34 ++++---
ui/js/src/kimchi.api.js | 18 +++-
ui/js/src/kimchi.main.js | 24 ++++-
ui/pages/i18n.html.tmpl | 178 ---------------------------------
ui/pages/i18n.json.tmpl | 165 ++++++++++++++++++++++++++++++
23 files changed, 369 insertions(+), 213 deletions(-)
create mode 120000 plugins/sample/config.status
create mode 120000 plugins/sample/po/LINGUAS
create mode 120000 plugins/sample/po/Makefile.in.in
create mode 120000 plugins/sample/po/Makevars
create mode 100644 plugins/sample/po/POTFILES.in
create mode 100644 plugins/sample/po/en_US.po
create mode 120000 plugins/sample/po/gen-pot
create mode 100644 plugins/sample/po/pt_BR.po
create mode 100644 plugins/sample/po/zh_CN.po
delete mode 100644 plugins/sample/sample.conf
create mode 100644 plugins/sample/sample.conf.in
create mode 100644 plugins/sample/ui/pages/i18n.json.tmpl
create mode 100644 plugins/sample/ui/pages/tab.html.tmpl
delete mode 100644 ui/pages/i18n.html.tmpl
create mode 100644 ui/pages/i18n.json.tmpl
--
1.9.3
10 years, 6 months
[PATCH V3 0/7] Issue #342: load i18n.html of the plugin
by shaohef@linux.vnet.ibm.com
From: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
V2 -> V3:
change "enable-plugins" to "enable-sample"
remove nls
improve the Portuguese translation.
V1 -> V2:
The improvement concept here is to directly generate JSON on the server
and assign it to the i18n variable, rather than inserting nodes into the DOM.
Plugins would use a plugin1.i18n= structure to keep plugin strings from
colliding with each other, or with the kimchi variables.
ShaoHe Feng (6):
Update root.py to make Cheetah render the JSON template.
Update the i18n tmpl to produce JSON
Add JS API for fetching i18n JSON
Issue #342: load i18n.html of the plugin
add an optional to toggle the sample plugin
generate the translation files for plugins/sample
Zhou Zheng Sheng (1):
Add Minimal UI Page for the Sample Plugin
configure.ac | 11 +++
plugins/sample/Makefile.am | 26 ++++-
plugins/sample/__init__.py | 3 +-
plugins/sample/config.status | 1 +
plugins/sample/po/LINGUAS | 1 +
plugins/sample/po/Makefile.in.in | 1 +
plugins/sample/po/Makevars | 1 +
plugins/sample/po/POTFILES.in | 2 +
plugins/sample/po/en_US.po | 21 ++++
plugins/sample/po/gen-pot | 1 +
plugins/sample/po/pt_BR.po | 24 +++++
plugins/sample/po/zh_CN.po | 24 +++++
plugins/sample/sample.conf | 7 --
plugins/sample/sample.conf.in | 12 +++
plugins/sample/ui/config/tab-ext.xml | 8 +-
plugins/sample/ui/pages/i18n.json.tmpl | 9 ++
plugins/sample/ui/pages/tab.html.tmpl | 6 ++
src/kimchi/root.py | 5 +
src/kimchi/template.py | 34 ++++---
ui/js/src/kimchi.api.js | 18 +++-
ui/js/src/kimchi.main.js | 24 ++++-
ui/pages/i18n.html.tmpl | 176 ---------------------------------
ui/pages/i18n.json.tmpl | 163 ++++++++++++++++++++++++++++++
23 files changed, 367 insertions(+), 211 deletions(-)
create mode 120000 plugins/sample/config.status
create mode 120000 plugins/sample/po/LINGUAS
create mode 120000 plugins/sample/po/Makefile.in.in
create mode 120000 plugins/sample/po/Makevars
create mode 100644 plugins/sample/po/POTFILES.in
create mode 100644 plugins/sample/po/en_US.po
create mode 120000 plugins/sample/po/gen-pot
create mode 100644 plugins/sample/po/pt_BR.po
create mode 100644 plugins/sample/po/zh_CN.po
delete mode 100644 plugins/sample/sample.conf
create mode 100644 plugins/sample/sample.conf.in
create mode 100644 plugins/sample/ui/pages/i18n.json.tmpl
create mode 100644 plugins/sample/ui/pages/tab.html.tmpl
delete mode 100644 ui/pages/i18n.html.tmpl
create mode 100644 ui/pages/i18n.json.tmpl
--
1.9.0
10 years, 6 months
[RFC] Add VM names to disk image names
by Rodrigo Trujillo
Hi,
currently, the disk images are names as <UUID>.img.
What makes difficult to identify which VM the virtual disk belongs to.
I would like to propose to add the vm name to the image name as well.
So images would be named such as <VM_NAME>-<UUID>.img
Then I will have to change:
- disk generation in vm create
- vm update (when name is changed)
Rodrigo
10 years, 6 months
[PATCH] Bug Fix - Save Button Behaves Incorrectly in Guest Edit Window
by Hongliang Wang
There are 3 tabs in guest edit window and only the first tab needs
save button visible. Though in some cases, it will appear in other
tabs. Fixed it in this patch.
Signed-off-by: Hongliang Wang <hlwang(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.guest_edit_main.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ui/js/src/kimchi.guest_edit_main.js b/ui/js/src/kimchi.guest_edit_main.js
index 90dcb32..9ff1a95 100644
--- a/ui/js/src/kimchi.guest_edit_main.js
+++ b/ui/js/src/kimchi.guest_edit_main.js
@@ -19,12 +19,12 @@ kimchi.guest_edit_main = function() {
var buttonContainer = $('#action-button-container');
$('#guest-edit-tabs').tabs({
beforeActivate: function(event, ui) {
- var deactivated = ui['oldPanel'];
+ var deactivated = ui['newPanel'];
if($(deactivated).attr('id') === 'form-guest-edit-general') {
- $(buttonContainer).addClass('hidden');
+ $(buttonContainer).removeClass('hidden');
}
else {
- $(buttonContainer).removeClass('hidden');
+ $(buttonContainer).addClass('hidden');
}
}
});
--
1.8.1.4
10 years, 6 months
[PATCH] Adjust Guest Edit Storage Tab Styles
by Hongliang Wang
Keep consistent with interface setup tab.
Signed-off-by: Hongliang Wang <hlwang(a)linux.vnet.ibm.com>
---
ui/css/theme-default/guest-edit.css | 92 ++++++++++---------------------------
ui/js/src/kimchi.guest_edit_main.js | 23 ++++++++--
ui/pages/guest-edit.html.tmpl | 39 ++++++++--------
3 files changed, 63 insertions(+), 91 deletions(-)
diff --git a/ui/css/theme-default/guest-edit.css b/ui/css/theme-default/guest-edit.css
index 36f7f75..52c53eb 100644
--- a/ui/css/theme-default/guest-edit.css
+++ b/ui/css/theme-default/guest-edit.css
@@ -89,74 +89,7 @@
width: 400px;
}
-.guest-edit-cdrom-button {
- background: url("../images/theme-default/guest-icon-sprite.png") no-repeat left top transparent;
- border: none;
- height: 25px;
- vertical-align: middle;
- width: 25px;
-}
-
-.guest-edit-cdrom-button.attach {
- margin: 15px 0 0 521px;
-}
-
-.guest-edit-cdrom-button.attach:hover {
- background-position: 0 -27px;
-}
-
-.guest-edit-cdrom-button.attach:focus {
- background-position: 0 -54px;
-}
-
-.guest-edit-cdrom-button.attach:active {
- background-position: 0 -81px;
-}
-
-.guest-edit-cdrom-button.attach[disabled] {
- background-position: 0 -108px;
-}
-
-.guest-edit-cdrom-button.replace {
- background-position: -27px 0;
-}
-
-.guest-edit-cdrom-button.replace:hover {
- background-position: -27px -27px;
-}
-
-.guest-edit-cdrom-button.replace:focus {
- background-position: -27px -54px;
-}
-
-.guest-edit-cdrom-button.replace:active {
- background-position: -27px -81px;
-}
-
-.guest-edit-cdrom-button.replace[disabled] {
- background-position: -27px -108px;
-}
-
-.guest-edit-cdrom-button.detach {
- background-position: -54px 0;
-}
-
-.guest-edit-cdrom-button.detach:hover {
- background-position: -54px -27px;
-}
-
-.guest-edit-cdrom-button.detach:focus {
- background-position: -54px -54px;
-}
-
-.guest-edit-cdrom-button.detach:active {
- background-position: -54px -81px;
-}
-
-.guest-edit-cdrom-button.detach[disabled] {
- background-position: -54px -108px;
-}
-
+#form-guest-edit-storage .header,
.guest-edit-interface .header {
margin-bottom: 8px;
padding-bottom: 2px;
@@ -165,33 +98,56 @@
overflow: hidden;
}
+#form-guest-edit-storage .body .item,
.guest-edit-interface .body .item {
margin: 5px 0;
}
+#form-guest-edit-storage .cell,
.guest-edit-interface .cell {
display: inline-block;
width: 250px;
}
+#form-guest-edit-storage .cell.dev {
+ width: 60px;
+}
+
+#form-guest-edit-storage .cell.path {
+ width: 440px;
+}
+
+#form-guest-edit-storage .cell.path input {
+ box-sizing: border-box;
+ width: 100%;
+}
+
.guest-edit-interface .body select {
width: 180px;
padding: 0px;
}
+#form-guest-edit-storage .action-area,
.guest-edit-interface .action-area {
float: right;
}
+#form-guest-edit-storage .action-area {
+ line-height: 24px;
+}
+
+#form-guest-edit-storage button,
.guest-edit-interface button {
width: 20px;
height: 20px;
}
+#form-guest-edit-storage .header button,
.guest-edit-interface .header button {
margin-bottom: 1px;
}
+#form-guest-edit-storage .body button:not(:last-child),
.guest-edit-interface .body button:not(:last-child) {
margin-right: 2px;
}
diff --git a/ui/js/src/kimchi.guest_edit_main.js b/ui/js/src/kimchi.guest_edit_main.js
index 0236e2d..ba5fef5 100644
--- a/ui/js/src/kimchi.guest_edit_main.js
+++ b/ui/js/src/kimchi.guest_edit_main.js
@@ -36,7 +36,7 @@ kimchi.guest_edit_main = function() {
kimchi.listVMStorages({
vm: kimchi.selectedGuest
}, function(storages) {
- var container = $('#guest-edit-cdrom-row-container');
+ var container = $('#form-guest-edit-storage .body');
$(container).empty();
$.each(storages, function(index, storage) {
@@ -53,9 +53,19 @@ kimchi.guest_edit_main = function() {
};
$('input[type="text"][name="cdrom"]', container).on('click', replaceCDROM);
- $('.replace', container).on('click', replaceCDROM);
+ $('.replace', container).button({
+ icons: {
+ primary: 'ui-icon-pencil'
+ },
+ text: false
+ }).click(replaceCDROM);
- $('.detach', container).on('click', function(e) {
+ $('.detach', container).button({
+ icons: {
+ primary: 'ui-icon-trash'
+ },
+ text: false
+ }).click(function(e) {
e.preventDefault();
var settings = {
title : i18n['KCHAPI6004M'],
@@ -172,7 +182,12 @@ kimchi.guest_edit_main = function() {
refreshCDROMs();
- $('#guest-edit-attach-cdrom-button').on('click', function(event) {
+ $('#guest-edit-attach-cdrom-button').button({
+ icons: {
+ primary: "ui-icon-plusthick"
+ },
+ text: false
+ }).click(function(event) {
event.preventDefault();
kimchi.window.open("guest-storage-add.html");
});
diff --git a/ui/pages/guest-edit.html.tmpl b/ui/pages/guest-edit.html.tmpl
index 96d907e..3b7291a 100644
--- a/ui/pages/guest-edit.html.tmpl
+++ b/ui/pages/guest-edit.html.tmpl
@@ -94,15 +94,12 @@
</fieldset>
</form>
<form id="form-guest-edit-storage">
- <fieldset class="guest-edit-fieldset">
- <div id="guest-edit-cdrom-row-container" class="guest-edit-cdrom-row-container"></div>
- <div>
- <button id="guest-edit-attach-cdrom-button"
- class="guest-edit-cdrom-button attach"
- title='$_("Attach")'>
- </button>
- </div>
- </fieldset>
+ <div class="header">
+ <span class="cell">$_("Device")</span>
+ <span class="cell">$_("Path")</span>
+ <button id="guest-edit-attach-cdrom-button" class="action-area attach"></button>
+ </div>
+ <div class="body"></div>
</form>
<form id="form-guest-edit-interface" class="guest-edit-interface">
<div class="header">
@@ -123,14 +120,16 @@
</footer>
</div>
<script id="cdrom-row-tmpl" type="text/html">
- <div>
- <div class="guest-edit-wrapper-label">
+ <div class="item" id="cdrom-{dev}">
+ <span class="cell dev">
<label for="cdrom-{dev}">{dev}</label>
- </div>
- <div class="guest-edit-wrapper-controls">
+ </span>
+ <span class="cell path">
<input id="cdrom-{dev}" name="cdrom" type="text"
data-vm="{vm}" data-dev="{dev}"
value="{path}" readonly="readonly" />
+ </span>
+ <span class="action-area">
<button class="guest-edit-cdrom-button replace"
data-vm="{vm}" data-dev="{dev}"
title='$_("Replace")'>
@@ -139,7 +138,7 @@
data-vm="{vm}" data-dev="{dev}"
title='$_("Detach")'>
</button>
- </div>
+ </span>
</div>
</script>
<script id="interface-tmpl" type="text/html">
@@ -160,19 +159,21 @@
<div>
</script>
<script id="disk-row-tmpl" type="text/html">
- <div>
- <div class="guest-edit-wrapper-label">
+ <div class="item" id="cdrom-{dev}">
+ <span class="cell dev">
<label for="disk-{dev}">{dev}</label>
- </div>
- <div class="guest-edit-wrapper-controls">
+ </span>
+ <span class="cell path">
<input id="disk-{dev}" name="disk" type="text"
data-vm="{vm}" data-dev="{dev}"
value="{path}" readonly="readonly" />
+ </span>
+ <span class="action-area">
<button class="guest-edit-cdrom-button detach"
data-vm="{vm}" data-dev="{dev}"
title="$_("Detach")">
</button>
- </div>
+ </span>
</div>
</script>
<script type="text/javascript">
--
1.8.1.4
10 years, 6 months
[PATCH V5 0/2] Issue#296 UI redesign when generating debug reports
by Wang Wen
Issue#296 debug report: kimchi UI should not waiting while generating reports
V4 -> V5
Deleted one useless line that change the loading icon's size
V3 -> V4
Changed generating logo(Hong Liang Wang)
V2 -> V3
Change the layout of the grid: Removed the frist column that has line number
Changed the progress bar layout that make the whole table more consistant.
V1 -> V2
Accroding to Yu Xin, this patch move the progress bar to the top of the
grid and use ellipsis for hiding the name that is too long for the
generating progress bar.
1) Removed the dialogue window when generating a debug report.
2) Designed an animation bar indicate user there is a report generating
during the generating progress.
3) Disable the buttons' functions in debug report area when generating a new
report in case there might be any conflict. Meanwhile user can operate
on other parts of Kimchi.
4) Enable all buttonss' functions in debug report area after generating
progress.
Wang Wen (2):
Remove the first column of debug report grid
Added the generating progress indicator
ui/css/theme-default/host.css | 10 +++++---
ui/css/theme-default/report-add.css | 9 +-------
ui/images/theme-default/kimchi-loading.gif | Bin 6181 -> 6181 bytes
ui/images/theme-default/kimchi-loading15x15.gif | Bin 0 -> 1653 bytes
ui/js/src/kimchi.host.js | 6 +----
ui/js/src/kimchi.report_add_main.js | 26 ++++++++++++++++++----
ui/pages/i18n.html.tmpl | 1 +
7 files changed, 30 insertions(+), 22 deletions(-)
create mode 100644 ui/images/theme-default/kimchi-loading15x15.gif
10 years, 6 months
[PATCH] show template is local or remote
by shaohef@linux.vnet.ibm.com
From: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
We do not need a backed to support a field to indicate the template
type.
We just ckeck it by the prefix of iso name.
Signed-off-by: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
Signed-off-by: Yu Xin Huo <huoyuxin(a)linux.vnet.ibm.com>
---
ui/css/theme-default/template_list.css | 8 ++++++++
ui/js/src/kimchi.template_main.js | 6 ++++++
ui/pages/tabs/templates.html.tmpl | 1 +
3 files changed, 15 insertions(+)
diff --git a/ui/css/theme-default/template_list.css b/ui/css/theme-default/template_list.css
index df84a8f..41a5258 100644
--- a/ui/css/theme-default/template_list.css
+++ b/ui/css/theme-default/template_list.css
@@ -194,6 +194,14 @@ template-hidden {
width: 58px;
}
+.template-icon img.template-type-icon-position {
+ width: 20px;
+ height: 20px;
+ position: relative;
+ top: -15px;
+ left: 49px;
+}
+
.template-title-position {
float: left;
width: 120px;
diff --git a/ui/js/src/kimchi.template_main.js b/ui/js/src/kimchi.template_main.js
index b90e3f3..eaa5247 100644
--- a/ui/js/src/kimchi.template_main.js
+++ b/ui/js/src/kimchi.template_main.js
@@ -22,6 +22,12 @@ kimchi.doListTemplates = function() {
var listHtml = '';
var templateHtml = $('#templateTmpl').html();
$.each(result, function(index, value) {
+ var isLocal = value.cdrom.startsWith("/");
+ if(isLocal){
+ value.location = "images/theme-default/icon-local.png";
+ }else{
+ value.location = "images/theme-default/icon-remote.png";
+ }
listHtml += kimchi.substitute(templateHtml, value);
});
$('#templateList').html(listHtml);
diff --git a/ui/pages/tabs/templates.html.tmpl b/ui/pages/tabs/templates.html.tmpl
index 6ae6640..5e6b5aa 100644
--- a/ui/pages/tabs/templates.html.tmpl
+++ b/ui/pages/tabs/templates.html.tmpl
@@ -50,6 +50,7 @@
<div class="template-icon template-icon-position">
<img alt="" src="{icon}">
+ <img alt="" src="{location}" class="template-type-icon-position">
</div>
<div class="template-general template-title template-title-position">
<h2 class="title" title="{name}">{name}</h2>
--
1.9.3
10 years, 6 months
[PATCH v2 0/8] Debug Report Rename Feature
by Hongliang Wang
Enable debug report rename feature in this patch set.
v1 -> v2:
2a) Retrieved the Right Generated Time for Debug Report
(Wen Wang's comment)
2b) Sorted debug reports by Generated Time Descendingly
(Wen Wang's comment)
2c) Enabled Form Fields after Request Processed
(Yuxin's comment)
Hongliang Wang (8):
Debug Report Rename: Update API.json
Debug Report Rename: Update API.md
Debug Report Rename: Implement Back-end
Debug Report: Use Generated Time instead of Most Changed Time
Debug Report: Sort Reports by Generated Time Descendingly
Debug Report Rename UI: Add API in kimchi.api.js
Debug Report Rename UI: Add Rename Page
Debug Report Rename UI: Enable Rename in Host Tab
docs/API.md | 3 ++
src/kimchi/API.json | 11 +++++++
src/kimchi/control/debugreports.py | 8 ++++-
src/kimchi/model/debugreports.py | 15 +++++++++-
ui/css/theme-default/report-rename.css | 22 ++++++++++++++
ui/js/src/kimchi.api.js | 12 ++++++++
ui/js/src/kimchi.host.js | 12 ++++++++
ui/js/src/kimchi.report_rename_main.js | 41 ++++++++++++++++++++++++++
ui/pages/report-rename.html.tmpl | 53 ++++++++++++++++++++++++++++++++++
9 files changed, 175 insertions(+), 2 deletions(-)
create mode 100644 ui/css/theme-default/report-rename.css
create mode 100644 ui/js/src/kimchi.report_rename_main.js
create mode 100644 ui/pages/report-rename.html.tmpl
--
1.8.1.4
10 years, 6 months
[PATCH v2] Insert loading icon in Storage tab
by Daniel Barboza
From: Daniel Henrique Barboza <danielhb(a)linux.vnet.ibm.com>
Due to the timeout period to see if the NFS pool is
online, the Storage tab may look irresponsible and
the user might believe that the UI/kimchi is frozen.
Inserting the loading icon+text in this tab to show that
the UI is responsive, just waiting for an answer from the
server.
Signed-off-by: Daniel Henrique Barboza <danielhb(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.storage_main.js | 2 ++
ui/pages/tabs/storage.html.tmpl | 8 +++++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/ui/js/src/kimchi.storage_main.js b/ui/js/src/kimchi.storage_main.js
index 6052510..74e6892 100644
--- a/ui/js/src/kimchi.storage_main.js
+++ b/ui/js/src/kimchi.storage_main.js
@@ -17,6 +17,7 @@
*/
kimchi.doListStoragePools = function() {
kimchi.listStoragePools(function(result) {
+ $('#storagepoolsLoading').addClass('hidden');
var storageHtml = $('#storageTmpl').html();
if (result && result.length) {
var listHtml = '';
@@ -34,6 +35,7 @@ kimchi.doListStoragePools = function() {
$('#storagepoolsList').html('');
}
}, function(err) {
+ $('#storagepoolsLoading').addClass('hidden');
kimchi.message.error(err.responseJSON.reason);
});
diff --git a/ui/pages/tabs/storage.html.tmpl b/ui/pages/tabs/storage.html.tmpl
index c3a992e..e837599 100644
--- a/ui/pages/tabs/storage.html.tmpl
+++ b/ui/pages/tabs/storage.html.tmpl
@@ -40,7 +40,13 @@
<li class="title-actions">$_("Actions")</li>
</div>
<ul id="storagepoolsList" class="list-storage empty-when-logged-off"></ul>
-</div>
+ <div id="storagepoolsLoading">
+ <div class="grid-loading">
+ <div class="grid-loading-icon"></div>
+ <div class="grid-loading-text">$_("loading")</div>
+ </div>
+ </div>
+ </div>
<script id="storageTmpl" type="html/text">
<li id="{name}">
<div class="storage-li in" data-name="{name}" data-stat="{state}">
--
1.8.3.1
10 years, 6 months