[Kimchi-devel] [wok V3 5/6] Replace kimchi by wok calls to reflect UI changes

Lucio Correia luciojhc at linux.vnet.ibm.com
Wed Aug 5 13:19:37 UTC 2015


Signed-off-by: Lucio Correia <luciojhc at linux.vnet.ibm.com>
---
 .../ui/js/src/kimchi.guest_storage_add.main.js     |    4 ++--
 plugins/kimchi/ui/js/src/kimchi.host.js            |   14 +++++++-------
 .../kimchi/ui/js/src/kimchi.template_edit_main.js  |    4 ++--
 ui/css/theme-default/grid.css                      |    2 +-
 ui/js/src/wok.grid.js                              |   10 +++++-----
 ui/js/src/wok.line-chart.js                        |    4 ++--
 ui/js/src/wok.select.js                            |    2 +-
 ui/js/widgets/circleGauge.js                       |    4 ++--
 8 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/plugins/kimchi/ui/js/src/kimchi.guest_storage_add.main.js b/plugins/kimchi/ui/js/src/kimchi.guest_storage_add.main.js
index 6723b1a..bc162e8 100644
--- a/plugins/kimchi/ui/js/src/kimchi.guest_storage_add.main.js
+++ b/plugins/kimchi/ui/js/src/kimchi.guest_storage_add.main.js
@@ -69,7 +69,7 @@ kimchi.guest_storage_add_main = function() {
                         });
                     }
                 });
-                kimchi.select('guest-add-storage-pool-list', options);
+                wok.select('guest-add-storage-pool-list', options);
         }
     });
 
@@ -117,7 +117,7 @@ kimchi.guest_storage_add_main = function() {
         poolTextbox.change();
     }
     var selectType = $(typeTextbox).val();
-    kimchi.select('guest-storage-type-list', types);
+    wok.select('guest-storage-type-list', types);
 
     var validateCDROM = function(settings) {
         if (/^((https|http|ftp|ftps|tftp|\/).*)+$/.test(settings['path']))
diff --git a/plugins/kimchi/ui/js/src/kimchi.host.js b/plugins/kimchi/ui/js/src/kimchi.host.js
index ab02333..e2d2511 100644
--- a/plugins/kimchi/ui/js/src/kimchi.host.js
+++ b/plugins/kimchi/ui/js/src/kimchi.host.js
@@ -78,7 +78,7 @@ kimchi.host_main = function() {
                     'class': 'repository-baseurl'
                 }];
         }
-        repositoriesGrid = new kimchi.widget.Grid({
+        repositoriesGrid = new wok.widget.Grid({
             container: 'repositories-grid-container',
             id: 'repositories-grid',
             title: i18n['KCHREPO6003M'],
@@ -205,7 +205,7 @@ kimchi.host_main = function() {
     };
 
     var initSoftwareUpdatesGrid = function(softwareUpdates) {
-        softwareUpdatesGrid = new kimchi.widget.Grid({
+        softwareUpdatesGrid = new wok.widget.Grid({
             container: 'software-updates-grid-container',
             id: softwareUpdatesGridID,
             title: i18n['KCHUPD6001M'],
@@ -296,7 +296,7 @@ kimchi.host_main = function() {
         });
     };
     var initReportGrid = function(reports) {
-        reportGrid = new kimchi.widget.Grid({
+        reportGrid = new wok.widget.Grid({
             container: 'available-reports-grid-container',
             id: reportGridID,
             title: i18n['KCHDR6002M'],
@@ -803,22 +803,22 @@ kimchi.host_main = function() {
         }
 
         var trackedCharts = {
-            cpu: new kimchi.widget.LineChart({
+            cpu: new wok.widget.LineChart({
                 id: 'chart-cpu',
                 node: 'container-chart-cpu',
                 type: 'percent'
             }),
-            memory: new kimchi.widget.LineChart({
+            memory: new wok.widget.LineChart({
                 id: 'chart-memory',
                 node: 'container-chart-memory',
                 type: 'value'
             }),
-            diskIO: new kimchi.widget.LineChart({
+            diskIO: new wok.widget.LineChart({
                 id: 'chart-disk-io',
                 node: 'container-chart-disk-io',
                 type: 'value'
             }),
-            networkIO: new kimchi.widget.LineChart({
+            networkIO: new wok.widget.LineChart({
                 id: 'chart-network-io',
                 node: 'container-chart-network-io',
                 type: 'value'
diff --git a/plugins/kimchi/ui/js/src/kimchi.template_edit_main.js b/plugins/kimchi/ui/js/src/kimchi.template_edit_main.js
index b00d596..d40b6c7 100644
--- a/plugins/kimchi/ui/js/src/kimchi.template_edit_main.js
+++ b/plugins/kimchi/ui/js/src/kimchi.template_edit_main.js
@@ -47,7 +47,7 @@ kimchi.template_edit_main = function() {
         var vncOpt = [{label: 'VNC', value: 'vnc'}];
         $('#template-edit-graphics').append('<option selected>VNC</option>');
         $('#template-edit-graphics').append('<option>Spice</option>');
-        kimchi.select('template-edit-graphics-list', vncOpt);
+        wok.select('template-edit-graphics-list', vncOpt);
         var enableSpice = function() {
             if (kimchi.capabilities == undefined) {
                 setTimeout(enableSpice, 2000);
@@ -55,7 +55,7 @@ kimchi.template_edit_main = function() {
             }
             if (kimchi.capabilities.qemu_spice == true) {
                 spiceOpt = [{label: 'Spice', value: 'spice'}]
-                kimchi.select('template-edit-graphics-list', spiceOpt);
+                wok.select('template-edit-graphics-list', spiceOpt);
             }
         };
         enableSpice();
diff --git a/ui/css/theme-default/grid.css b/ui/css/theme-default/grid.css
index a6a845e..dfc20ff 100644
--- a/ui/css/theme-default/grid.css
+++ b/ui/css/theme-default/grid.css
@@ -236,7 +236,7 @@
 }
 
 .grid-loading-icon {
-    background: url("../images/theme-default/kimchi-loading.gif") no-repeat left top;
+    background: url("../images/theme-default/wok-loading.gif") no-repeat left top;
     height: 48px;
     width: 49px;
 }
diff --git a/ui/js/src/wok.grid.js b/ui/js/src/wok.grid.js
index fcd9096..84f8d33 100644
--- a/ui/js/src/wok.grid.js
+++ b/ui/js/src/wok.grid.js
@@ -15,13 +15,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-kimchi.widget.Grid = function(opts) {
+wok.widget.Grid = function(opts) {
     this.opts = $.extend({}, this.opts, opts);
     this.createDOM();
     this.reload();
 };
 
-kimchi.widget.Grid.prototype = (function() {
+wok.widget.Grid.prototype = (function() {
     var htmlStr = [
         '<div id="{id}" class="grid">',
             '<div class="grid-content">',
@@ -237,7 +237,7 @@ kimchi.widget.Grid.prototype = (function() {
 
     var startResizing = function(container, event) {
         var grid = event.data.grid;
-        kimchi.widget.Grid.beingResized = grid;
+        wok.widget.Grid.beingResized = grid;
         if(!($('body').hasClass('resizing')
                 && $(grid.resizer).hasClass('hidden'))) {
             return;
@@ -263,7 +263,7 @@ kimchi.widget.Grid.prototype = (function() {
     };
 
     var endResizing = function(event) {
-        var grid = kimchi.widget.Grid.beingResized;
+        var grid = wok.widget.Grid.beingResized;
         if(!$('body').hasClass('resizing')) {
             return;
         }
@@ -282,7 +282,7 @@ kimchi.widget.Grid.prototype = (function() {
         );
         fixTableLayout.call(grid);
         grid.columnBeingResized = null;
-        kimchi.widget.Grid.beingResized = null;
+        wok.widget.Grid.beingResized = null;
     };
 
     var resizeColumnWidth = function(index, width) {
diff --git a/ui/js/src/wok.line-chart.js b/ui/js/src/wok.line-chart.js
index 46c9833..8b40288 100644
--- a/ui/js/src/wok.line-chart.js
+++ b/ui/js/src/wok.line-chart.js
@@ -17,13 +17,13 @@
  */
 
 /**
- * new kimchi.widget.LineChart({
+ * new wok.widget.LineChart({
  *   node: 'line-chart-cpu',
  *   id: 'line-chart',
  *   type: 'value'
  * });
  */
-kimchi.widget.LineChart = function(params) {
+wok.widget.LineChart = function(params) {
     var container = $('#' + params['node']);
     container.addClass('chart-container');
     var height = container.height();
diff --git a/ui/js/src/wok.select.js b/ui/js/src/wok.select.js
index 751167f..60830a5 100644
--- a/ui/js/src/wok.select.js
+++ b/ui/js/src/wok.select.js
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-kimchi.select = function(id, options) {
+wok.select = function(id, options) {
     var listControl = $('#'+ id);
     var targetId = listControl.data('target');
     var labelId = listControl.data('label');
diff --git a/ui/js/widgets/circleGauge.js b/ui/js/widgets/circleGauge.js
index 32973ac..52ec027 100644
--- a/ui/js/widgets/circleGauge.js
+++ b/ui/js/widgets/circleGauge.js
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
  (function($) {
-    $.widget('kimchi.circleGauge', {
+    $.widget('wok.circleGauge', {
 
         options : {
             color : '#87C004',
@@ -95,6 +95,6 @@
     });
 }(jQuery));
 
-kimchi.circleGauge = function(selector) {
+wok.circleGauge = function(selector) {
     $(selector).circleGauge();
 };
-- 
1.7.1




More information about the Kimchi-devel mailing list