Ovirt List Archives oVirt List Archives
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

Kimchi-devel

Thread Start a new thread
Download
Threads by month
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2018 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2017 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2016 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2015 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2014 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2013 -----
  • December
kimchi-devel@ovirt.org

  • 3775 discussions
[PATCH] [Wok 1/1] Use fontawesome icon instead of external image
by Aline Manera 12 Sep '17

12 Sep '17
Remove edit-alt.svg as there is no need to use an external image file as it is available on fontawesome icons. Signed-off-by: Aline Manera <aline.manera(a)gmail.com> --- COPYING | 4 -- ui/css/src/modules/_menu-flat.scss | 11 --- ui/css/wok.css | 12 ---- ui/images/theme-default/edit-alt.svg | 134 ----------------------------------- ui/js/src/wok.grid.js | 2 +- 5 files changed, 1 insertion(+), 162 deletions(-) delete mode 100644 ui/images/theme-default/edit-alt.svg diff --git a/COPYING b/COPYING index 980d0248..826af867 100644 --- a/COPYING +++ b/COPYING @@ -25,10 +25,6 @@ Files: ui/css/src/datatables.bootstrap.scss Source: http://datatables.net License: MIT -Files: ui/images/theme-default/edit-alt.svg -Source: http://elusiveicons.com -License: SIL-1.1 - Files: ui/images/theme-default/spin5.svg Source: http://fontello.com License: CC-BY-3.0 diff --git a/ui/css/src/modules/_menu-flat.scss b/ui/css/src/modules/_menu-flat.scss index 6a4e218b..c30ecf1c 100644 --- a/ui/css/src/modules/_menu-flat.scss +++ b/ui/css/src/modules/_menu-flat.scss @@ -76,17 +76,6 @@ & > i:before { line-height: 40px; } - span.edit-alt { - background: transparent url('#{$wok-icon-path}/edit-alt.svg') no-repeat 50% 50%; - background-size: 100%; - vertical-align: bottom; - width: 22px; - height: 40px; - display: block; - position: absolute; - top: 0; - left: 12px; - } } .caret { position: absolute; diff --git a/ui/css/wok.css b/ui/css/wok.css index d46ea86f..90e7d3b6 100644 --- a/ui/css/wok.css +++ b/ui/css/wok.css @@ -516,18 +516,6 @@ fieldset[disabled] .btn-group > span > .btn.active { line-height: 40px; } -.menu-flat .btn span.edit-alt { - background: transparent url("../images/theme-default/edit-alt.svg") no-repeat 50% 50%; - background-size: 100%; - vertical-align: bottom; - width: 22px; - height: 40px; - display: block; - position: absolute; - top: 0; - left: 12px; -} - .menu-flat .caret { position: absolute; top: 0; diff --git a/ui/images/theme-default/edit-alt.svg b/ui/images/theme-default/edit-alt.svg deleted file mode 100644 index ce10a74b..00000000 --- a/ui/images/theme-default/edit-alt.svg +++ /dev/null @@ -1,134 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- -Copyright (c) 2014-2015, Team Redux (http://reduxframework.com) -with Elusive Icons. -Copyright (c) 2014-2015, Dave Gandy (http://elusiveicons.com) -with Elusive Icons. - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - -################################# -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 -################################# - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting - in part or in whole - any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. ---> - <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" id="edit-alt" height="20" width="20"> - <title id="title4694">Elusive Icons by Team Redux - http://reduxframework.com/</title> - <metadata id="metadata4152"> - <rdf:RDF> - <cc:Work rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title>Elusive Icons by Team Redux - http://reduxframework.com/</dc:title> - <cc:license rdf:resource="http://scripts.sil.org/OFL" /> - <dc:creator> - <cc:Agent> - <dc:title>Elusive Icons by Dave Gandy - http://elusiveicons.com</dc:title> - </cc:Agent> - </dc:creator> - <dc:rights> - <cc:Agent> - <dc:title>Team Redux</dc:title> - </cc:Agent> - </dc:rights> - </cc:Work> - <cc:License rdf:about="http://scripts.sil.org/OFL"> - <cc:permits rdf:resource="http://scripts.sil.org/pub/OFL/Reproduction" /> - <cc:permits rdf:resource="http://scripts.sil.org/pub/OFL/Distribution" /> - <cc:permits rdf:resource="http://scripts.sil.org/pub/OFL/Embedding" /> - <cc:permits rdf:resource="http://scripts.sil.org/pub/OFL/DerivativeWorks" /> - <cc:requires rdf:resource="http://scripts.sil.org/pub/OFL/Notice" /> - <cc:requires rdf:resource="http://scripts.sil.org/pub/OFL/Attribution" /> - <cc:requires rdf:resource="http://scripts.sil.org/pub/OFL/ShareAlike" /> - <cc:requires rdf:resource="http://scripts.sil.org/pub/OFL/DerivativeRenaming" /> - <cc:requires rdf:resource="http://scripts.sil.org/pub/OFL/BundlingWhenSelling" /> - </cc:License> - </rdf:RDF> - </metadata> - <path id="path4656" d="M 0,20 C 0,13.333333 0,6.666667 0,0 4.3066666,0 8.6133335,0 12.92,0 11.826667,1.093333 10.733334,2.186667 9.6400001,3.28 c -2.12,0 -4.24,0 -6.3600001,0 0,4.48 0,8.96 0,13.44 4.4800001,0 8.96,0 13.44,0 0,-2.126667 0,-4.253333 0,-6.38 1.093333,-1.093333 2.186667,-2.186667 3.28,-3.28 0,4.313333 0,8.626667 0,12.94 -6.666667,0 -13.3333333,0 -20,0 z m 7.2600001,-7.26 c 0,-0.786667 0,-1.573333 0,-2.36 1.2707368,-0.104839 2.347146,1.140345 2.34,2.36 -0.78,0 -1.56,0 -2.34,0 z m 1.02,-3.52 C 10.726667,6.773333 13.173334,4.326667 15.62,1.88 c 0.833334,0.833333 1.666667,1.666667 2.5,2.5 -2.446666,2.446667 -4.893333,4.893333 -7.34,7.34 C 9.9466667,10.886667 9.1133335,10.053333 8.2800001,9.22 Z M 16.22,1.28 C 16.646667,0.853333 17.073334,0.426667 17.5,0 18.333333,0.833333 19.166667,1.666667 20,2.5 19.573333,2.926667 19.146667,3.353333 18.72,3.78 17.886667,2.946667 17.053334,2.113333 16.22,1.28 Z" style="fill:#ffffff" /> - </svg> diff --git a/ui/js/src/wok.grid.js b/ui/js/src/wok.grid.js index 9d814018..00e808db 100644 --- a/ui/js/src/wok.grid.js +++ b/ui/js/src/wok.grid.js @@ -227,7 +227,7 @@ wok.widget.Grid.prototype = (function() { if(toolbarButtons.length > 1) { dropHTML = ['<div class="dropdown menu-flat">', '<button id="wok-dropdown-button-', containerID, '" class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">', - '<span class="edit-alt"></span>Actions<span class="caret"></span>', + '<i class="fa fa-pencil-square-o" aria-hidden="true"></i>Actions<span class="caret"></span>', '</button>', '<ul class="dropdown-menu"></ul>', '</div>' -- 2.13.5
2 1
0 0
[PATCH] [Kimchi 1/1] Use distro icons exposed by Kimchi URIs
by Aline Manera 12 Sep '17

12 Sep '17
Kimchi was using distro icons exposed by Wok URIs which does not make sense as Kimchi packages those icons and should refer to them. Signed-off-by: Aline Manera <aline.manera(a)gmail.com> --- ui/css/kimchi.css | 56 +++++++++++++++++++------------------- ui/css/src/modules/_guests.scss | 14 +++++----- ui/css/src/modules/_iso-list.scss | 14 +++++----- ui/css/src/modules/_templates.scss | 28 +++++++++---------- 4 files changed, 56 insertions(+), 56 deletions(-) diff --git a/ui/css/kimchi.css b/ui/css/kimchi.css index 4c40fcd5..dec3874b 100644 --- a/ui/css/kimchi.css +++ b/ui/css/kimchi.css @@ -231,37 +231,37 @@ #template-add-window.modal-content h3.iso-title.centos, #guest-add-window.modal-content h3.iso-title.centos { - background-image: url("../../../images/theme-default/icon-centos.png"); + background-image: url("../images/icon-centos.png"); } #template-add-window.modal-content h3.iso-title.debian, #guest-add-window.modal-content h3.iso-title.debian { - background-image: url("../../../images/theme-default/icon-debian.png"); + background-image: url("../images/icon-debian.png"); } #template-add-window.modal-content h3.iso-title.fedora, #guest-add-window.modal-content h3.iso-title.fedora { - background-image: url("../../../images/theme-default/icon-fedora.png"); + background-image: url("../images/icon-fedora.png"); } #template-add-window.modal-content h3.iso-title.opensuse, #guest-add-window.modal-content h3.iso-title.opensuse { - background-image: url("../../../images/theme-default/icon-opensuse.png"); + background-image: url("../images/icon-opensuse.png"); } #template-add-window.modal-content h3.iso-title.ubuntu, #guest-add-window.modal-content h3.iso-title.ubuntu { - background-image: url("../../../images/theme-default/icon-ubuntu.png"); + background-image: url("../images/icon-ubuntu.png"); } #template-add-window.modal-content h3.iso-title.gentoo, #guest-add-window.modal-content h3.iso-title.gentoo { - background-image: url("../../../images/theme-default/icon-gentoo.png"); + background-image: url("../images/icon-gentoo.png"); } #template-add-window.modal-content h3.iso-title.unknown, #guest-add-window.modal-content h3.iso-title.unknown { - background-image: url("../../../images/theme-default/icon-unknown.png"); + background-image: url("../images/icon-vm.png"); } /* Create Guest Modal */ @@ -1037,31 +1037,31 @@ } #guest-content-container .distro-icon.icon-centos { - background-image: url("../../../images/theme-default/icon-centos.png"); + background-image: url("../images/icon-centos.png"); } #guest-content-container .distro-icon.icon-debian { - background-image: url("../../../images/theme-default/icon-debian.png"); + background-image: url("../images/icon-debian.png"); } #guest-content-container .distro-icon.icon-fedora { - background-image: url("../../../images/theme-default/icon-fedora.png"); + background-image: url("../images/icon-fedora.png"); } #guest-content-container .distro-icon.icon-opensuse { - background-image: url("../../../images/theme-default/icon-opensuse.png"); + background-image: url("../images/icon-opensuse.png"); } #guest-content-container .distro-icon.icon-ubuntu { - background-image: url("../../../images/theme-default/icon-ubuntu.png"); + background-image: url("../images/icon-ubuntu.png"); } #guest-content-container .distro-icon.icon-gentoo { - background-image: url("../../../images/theme-default/icon-gentoo.png"); + background-image: url("../images/icon-gentoo.png"); } #guest-content-container .distro-icon.icon-unknown { - background-image: url("../../../images/theme-default/icon-unknown.png"); + background-image: url("../images/icon-vm.png"); } body.wok-gallery { @@ -2149,31 +2149,31 @@ ul { } #templates-root-container .wok-vm-list .distro-icon.icon-centos { - background-image: url("../../../images/theme-default/icon-centos.png"); + background-image: url("../images/icon-centos.png"); } #templates-root-container .wok-vm-list .distro-icon.icon-debian { - background-image: url("../../../images/theme-default/icon-debian.png"); + background-image: url("../images/icon-debian.png"); } #templates-root-container .wok-vm-list .distro-icon.icon-fedora { - background-image: url("../../../images/theme-default/icon-fedora.png"); + background-image: url("../images/icon-fedora.png"); } #templates-root-container .wok-vm-list .distro-icon.icon-opensuse { - background-image: url("../../../images/theme-default/icon-opensuse.png"); + background-image: url("../images/icon-opensuse.png"); } #templates-root-container .wok-vm-list .distro-icon.icon-ubuntu { - background-image: url("../../../images/theme-default/icon-ubuntu.png"); + background-image: url("../images/icon-ubuntu.png"); } #templates-root-container .wok-vm-list .distro-icon.icon-gentoo { - background-image: url("../../../images/theme-default/icon-gentoo.png"); + background-image: url("../images/icon-gentoo.png"); } #templates-root-container .wok-vm-list .distro-icon.icon-unknown { - background-image: url("../../../images/theme-default/icon-unknown.png"); + background-image: url("../images/icon-vm.png"); } #templates-root-container .wok-vm-gallery { @@ -2280,31 +2280,31 @@ ul { } #templates-root-container .wok-vm-gallery .name-distro-icon.icon-centos { - background-image: url("../../../images/theme-default/icon-centos.png"); + background-image: url("../images/icon-centos.png"); } #templates-root-container .wok-vm-gallery .name-distro-icon.icon-debian { - background-image: url("../../../images/theme-default/icon-debian.png"); + background-image: url("../images/icon-debian.png"); } #templates-root-container .wok-vm-gallery .name-distro-icon.icon-fedora { - background-image: url("../../../images/theme-default/icon-fedora.png"); + background-image: url("../images/icon-fedora.png"); } #templates-root-container .wok-vm-gallery .name-distro-icon.icon-opensuse { - background-image: url("../../../images/theme-default/icon-opensuse.png"); + background-image: url("../images/icon-opensuse.png"); } #templates-root-container .wok-vm-gallery .name-distro-icon.icon-ubuntu { - background-image: url("../../../images/theme-default/icon-ubuntu.png"); + background-image: url("../images/icon-ubuntu.png"); } #templates-root-container .wok-vm-gallery .name-distro-icon.icon-gentoo { - background-image: url("../../../images/theme-default/icon-gentoo.png"); + background-image: url("../images/icon-gentoo.png"); } #templates-root-container .wok-vm-gallery .name-distro-icon.icon-unknown { - background-image: url("../../../images/theme-default/icon-unknown.png"); + background-image: url("../images/icon-vm.png"); } #templates-root-container span.template-status { diff --git a/ui/css/src/modules/_guests.scss b/ui/css/src/modules/_guests.scss index 37654dd7..efb349f9 100644 --- a/ui/css/src/modules/_guests.scss +++ b/ui/css/src/modules/_guests.scss @@ -682,25 +682,25 @@ background-repeat: no-repeat; background-position: 100% 50%; &.icon-centos { - background-image: url('../../#{$wok-icon-path}/icon-centos.png'); + background-image: url('../images/icon-centos.png'); } &.icon-debian { - background-image: url('../../#{$wok-icon-path}/icon-debian.png'); + background-image: url('../images/icon-debian.png'); } &.icon-fedora { - background-image: url('../../#{$wok-icon-path}/icon-fedora.png'); + background-image: url('../images/icon-fedora.png'); } &.icon-opensuse { - background-image: url('../../#{$wok-icon-path}/icon-opensuse.png'); + background-image: url('../images/icon-opensuse.png'); } &.icon-ubuntu { - background-image: url('../../#{$wok-icon-path}/icon-ubuntu.png'); + background-image: url('../images/icon-ubuntu.png'); } &.icon-gentoo { - background-image: url('../../#{$wok-icon-path}/icon-gentoo.png'); + background-image: url('../images/icon-gentoo.png'); } &.icon-unknown { - background-image: url('../../#{$wok-icon-path}/icon-unknown.png'); + background-image: url('../images/icon-vm.png'); } } } diff --git a/ui/css/src/modules/_iso-list.scss b/ui/css/src/modules/_iso-list.scss index 22b51a2b..02122403 100644 --- a/ui/css/src/modules/_iso-list.scss +++ b/ui/css/src/modules/_iso-list.scss @@ -122,25 +122,25 @@ text-overflow: ellipsis; white-space: nowrap; &.centos { - background-image: url('../../#{$wok-icon-path}/icon-centos.png'); + background-image: url('../images/icon-centos.png'); } &.debian { - background-image: url('../../#{$wok-icon-path}/icon-debian.png'); + background-image: url('../images/icon-debian.png'); } &.fedora { - background-image: url('../../#{$wok-icon-path}/icon-fedora.png'); + background-image: url('../images/icon-fedora.png'); } &.opensuse { - background-image: url('../../#{$wok-icon-path}/icon-opensuse.png'); + background-image: url('../images/icon-opensuse.png'); } &.ubuntu { - background-image: url('../../#{$wok-icon-path}/icon-ubuntu.png'); + background-image: url('../images/icon-ubuntu.png'); } &.gentoo { - background-image: url('../../#{$wok-icon-path}/icon-gentoo.png'); + background-image: url('../images/icon-gentoo.png'); } &.unknown { - background-image: url('../../#{$wok-icon-path}/icon-unknown.png'); + background-image: url('../images/icon-vm.png'); } } } diff --git a/ui/css/src/modules/_templates.scss b/ui/css/src/modules/_templates.scss index 49a4f1a0..9f183e4a 100644 --- a/ui/css/src/modules/_templates.scss +++ b/ui/css/src/modules/_templates.scss @@ -470,25 +470,25 @@ $kimchi-icon-path: '../images'; background-repeat: no-repeat; background-position: 8px 50%; &.icon-centos { - background-image: url('../../#{$wok-icon-path}/icon-centos.png'); + background-image: url('../images/icon-centos.png'); } &.icon-debian { - background-image: url('../../#{$wok-icon-path}/icon-debian.png'); + background-image: url('../images/icon-debian.png'); } &.icon-fedora { - background-image: url('../../#{$wok-icon-path}/icon-fedora.png'); + background-image: url('../images/icon-fedora.png'); } &.icon-opensuse { - background-image: url('../../#{$wok-icon-path}/icon-opensuse.png'); + background-image: url('../images/icon-opensuse.png'); } &.icon-ubuntu { - background-image: url('../../#{$wok-icon-path}/icon-ubuntu.png'); + background-image: url('../images/icon-ubuntu.png'); } &.icon-gentoo { - background-image: url('../../#{$wok-icon-path}/icon-gentoo.png'); + background-image: url('../images/icon-gentoo.png'); } &.icon-unknown { - background-image: url('../../#{$wok-icon-path}/icon-unknown.png'); + background-image: url('../images/icon-vm.png'); } } } @@ -585,25 +585,25 @@ $kimchi-icon-path: '../images'; background-repeat: no-repeat; background-position: 100% 50%; &.icon-centos { - background-image: url('../../#{$wok-icon-path}/icon-centos.png'); + background-image: url('../images/icon-centos.png'); } &.icon-debian { - background-image: url('../../#{$wok-icon-path}/icon-debian.png'); + background-image: url('../images/icon-debian.png'); } &.icon-fedora { - background-image: url('../../#{$wok-icon-path}/icon-fedora.png'); + background-image: url('../images/icon-fedora.png'); } &.icon-opensuse { - background-image: url('../../#{$wok-icon-path}/icon-opensuse.png'); + background-image: url('../images/icon-opensuse.png'); } &.icon-ubuntu { - background-image: url('../../#{$wok-icon-path}/icon-ubuntu.png'); + background-image: url('../images/icon-ubuntu.png'); } &.icon-gentoo { - background-image: url('../../#{$wok-icon-path}/icon-gentoo.png'); + background-image: url('../images/icon-gentoo.png'); } &.icon-unknown { - background-image: url('../../#{$wok-icon-path}/icon-unknown.png'); + background-image: url('../images/icon-vm.png'); } } } -- 2.13.5
2 1
0 0
[PATCH] [Kimchi 1/1] .size() is deprecated on JQuery 3.2.1
by Aline Manera 12 Sep '17

12 Sep '17
JQuery was updated on Wok and .size() is deprecated, so replace it to .length property. For reference: https://api.jquery.com/size/ Signed-off-by: Aline Manera <aline.manera(a)gmail.com> --- ui/js/src/kimchi.guest_edit_main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/js/src/kimchi.guest_edit_main.js b/ui/js/src/kimchi.guest_edit_main.js index e9fdc078..d28a0891 100644 --- a/ui/js/src/kimchi.guest_edit_main.js +++ b/ui/js/src/kimchi.guest_edit_main.js @@ -205,7 +205,7 @@ kimchi.guest_edit_main = function() { var addItem = function(data) { var oriID = data.id; if (data.id === -1) { - data.id = $('#form-guest-edit-interface > .body').children().size(); + data.id = $('#form-guest-edit-interface > .body').children().length; } if (data.ips === "" || data.ips === null || data.ips === undefined || data.ips.length === 0) { data.ips = i18n["KCHNET6001M"]; -- 2.13.5
2 1
0 0
Request For Enhancement in the Template section of Kimchi
by WK 12 Sep '17

12 Sep '17
In the template section we have the following information Template Name (ID)    OS    Version    Current CPUs    Memory Cent7-10    centos    7    1 Cores    2048 M What is missing is the Storage Disk(s) Size(s) that Template is assigned. We get around that with the extension on the name so we have Cent7-10, Cent7-25, Cent7-100 for templates with 10G, 25G, 100G  disks respectively. But it would be nice to just see it on the Screen. Even better would be able to change it on the fly when you 'add/create' a Guest from a template. Sincerely, -bill
2 1
0 0
[PATCH] [Kimchi 1/1] Remove kimchi.setListVMAuto call function
by Aline Manera 12 Sep '17

12 Sep '17
Commit 8611c1ea added listeners to Guests page but forgot to update the kimchi.guest_edit_main.js file. Signed-off-by: Aline Manera <aline.manera(a)gmail.com> --- ui/js/src/kimchi.guest_edit_main.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ui/js/src/kimchi.guest_edit_main.js b/ui/js/src/kimchi.guest_edit_main.js index e9fdc078..5417892f 100644 --- a/ui/js/src/kimchi.guest_edit_main.js +++ b/ui/js/src/kimchi.guest_edit_main.js @@ -29,10 +29,6 @@ kimchi.guest_edit_main = function() { clearTimeout(kimchi.vmTimeout); var bootOrderOptions = []; - $('#modalWindow').on('hidden.bs.modal', function() { - kimchi.setListVMAutoTimeout(); - }); - $('#guest-edit-window a[data-toggle="tab"]').on('show.bs.tab', function(tab) { tab.target; // newly activated tab tab.relatedTarget; // previous active tab -- 2.13.5
2 1
0 0
[Kimchi-devel] [PATCH] [Kimchi 1/1] Use distro icons exposed by Kimchi URIs
by Aline Manera 11 Sep '17

11 Sep '17
Kimchi was using distro icons exposed by Wok URIs which does not make sense as Kimchi packages those icons and should refer to them. Signed-off-by: Aline Manera <aline.manera(a)gmail.com> --- ui/css/kimchi.css | 56 +++++++++++++++++++------------------- ui/css/src/modules/_guests.scss | 14 +++++----- ui/css/src/modules/_iso-list.scss | 14 +++++----- ui/css/src/modules/_templates.scss | 28 +++++++++---------- 4 files changed, 56 insertions(+), 56 deletions(-) diff --git a/ui/css/kimchi.css b/ui/css/kimchi.css index 4c40fcd5..dec3874b 100644 --- a/ui/css/kimchi.css +++ b/ui/css/kimchi.css @@ -231,37 +231,37 @@ #template-add-window.modal-content h3.iso-title.centos, #guest-add-window.modal-content h3.iso-title.centos { - background-image: url("../../../images/theme-default/icon-centos.png"); + background-image: url("../images/icon-centos.png"); } #template-add-window.modal-content h3.iso-title.debian, #guest-add-window.modal-content h3.iso-title.debian { - background-image: url("../../../images/theme-default/icon-debian.png"); + background-image: url("../images/icon-debian.png"); } #template-add-window.modal-content h3.iso-title.fedora, #guest-add-window.modal-content h3.iso-title.fedora { - background-image: url("../../../images/theme-default/icon-fedora.png"); + background-image: url("../images/icon-fedora.png"); } #template-add-window.modal-content h3.iso-title.opensuse, #guest-add-window.modal-content h3.iso-title.opensuse { - background-image: url("../../../images/theme-default/icon-opensuse.png"); + background-image: url("../images/icon-opensuse.png"); } #template-add-window.modal-content h3.iso-title.ubuntu, #guest-add-window.modal-content h3.iso-title.ubuntu { - background-image: url("../../../images/theme-default/icon-ubuntu.png"); + background-image: url("../images/icon-ubuntu.png"); } #template-add-window.modal-content h3.iso-title.gentoo, #guest-add-window.modal-content h3.iso-title.gentoo { - background-image: url("../../../images/theme-default/icon-gentoo.png"); + background-image: url("../images/icon-gentoo.png"); } #template-add-window.modal-content h3.iso-title.unknown, #guest-add-window.modal-content h3.iso-title.unknown { - background-image: url("../../../images/theme-default/icon-unknown.png"); + background-image: url("../images/icon-vm.png"); } /* Create Guest Modal */ @@ -1037,31 +1037,31 @@ } #guest-content-container .distro-icon.icon-centos { - background-image: url("../../../images/theme-default/icon-centos.png"); + background-image: url("../images/icon-centos.png"); } #guest-content-container .distro-icon.icon-debian { - background-image: url("../../../images/theme-default/icon-debian.png"); + background-image: url("../images/icon-debian.png"); } #guest-content-container .distro-icon.icon-fedora { - background-image: url("../../../images/theme-default/icon-fedora.png"); + background-image: url("../images/icon-fedora.png"); } #guest-content-container .distro-icon.icon-opensuse { - background-image: url("../../../images/theme-default/icon-opensuse.png"); + background-image: url("../images/icon-opensuse.png"); } #guest-content-container .distro-icon.icon-ubuntu { - background-image: url("../../../images/theme-default/icon-ubuntu.png"); + background-image: url("../images/icon-ubuntu.png"); } #guest-content-container .distro-icon.icon-gentoo { - background-image: url("../../../images/theme-default/icon-gentoo.png"); + background-image: url("../images/icon-gentoo.png"); } #guest-content-container .distro-icon.icon-unknown { - background-image: url("../../../images/theme-default/icon-unknown.png"); + background-image: url("../images/icon-vm.png"); } body.wok-gallery { @@ -2149,31 +2149,31 @@ ul { } #templates-root-container .wok-vm-list .distro-icon.icon-centos { - background-image: url("../../../images/theme-default/icon-centos.png"); + background-image: url("../images/icon-centos.png"); } #templates-root-container .wok-vm-list .distro-icon.icon-debian { - background-image: url("../../../images/theme-default/icon-debian.png"); + background-image: url("../images/icon-debian.png"); } #templates-root-container .wok-vm-list .distro-icon.icon-fedora { - background-image: url("../../../images/theme-default/icon-fedora.png"); + background-image: url("../images/icon-fedora.png"); } #templates-root-container .wok-vm-list .distro-icon.icon-opensuse { - background-image: url("../../../images/theme-default/icon-opensuse.png"); + background-image: url("../images/icon-opensuse.png"); } #templates-root-container .wok-vm-list .distro-icon.icon-ubuntu { - background-image: url("../../../images/theme-default/icon-ubuntu.png"); + background-image: url("../images/icon-ubuntu.png"); } #templates-root-container .wok-vm-list .distro-icon.icon-gentoo { - background-image: url("../../../images/theme-default/icon-gentoo.png"); + background-image: url("../images/icon-gentoo.png"); } #templates-root-container .wok-vm-list .distro-icon.icon-unknown { - background-image: url("../../../images/theme-default/icon-unknown.png"); + background-image: url("../images/icon-vm.png"); } #templates-root-container .wok-vm-gallery { @@ -2280,31 +2280,31 @@ ul { } #templates-root-container .wok-vm-gallery .name-distro-icon.icon-centos { - background-image: url("../../../images/theme-default/icon-centos.png"); + background-image: url("../images/icon-centos.png"); } #templates-root-container .wok-vm-gallery .name-distro-icon.icon-debian { - background-image: url("../../../images/theme-default/icon-debian.png"); + background-image: url("../images/icon-debian.png"); } #templates-root-container .wok-vm-gallery .name-distro-icon.icon-fedora { - background-image: url("../../../images/theme-default/icon-fedora.png"); + background-image: url("../images/icon-fedora.png"); } #templates-root-container .wok-vm-gallery .name-distro-icon.icon-opensuse { - background-image: url("../../../images/theme-default/icon-opensuse.png"); + background-image: url("../images/icon-opensuse.png"); } #templates-root-container .wok-vm-gallery .name-distro-icon.icon-ubuntu { - background-image: url("../../../images/theme-default/icon-ubuntu.png"); + background-image: url("../images/icon-ubuntu.png"); } #templates-root-container .wok-vm-gallery .name-distro-icon.icon-gentoo { - background-image: url("../../../images/theme-default/icon-gentoo.png"); + background-image: url("../images/icon-gentoo.png"); } #templates-root-container .wok-vm-gallery .name-distro-icon.icon-unknown { - background-image: url("../../../images/theme-default/icon-unknown.png"); + background-image: url("../images/icon-vm.png"); } #templates-root-container span.template-status { diff --git a/ui/css/src/modules/_guests.scss b/ui/css/src/modules/_guests.scss index 37654dd7..efb349f9 100644 --- a/ui/css/src/modules/_guests.scss +++ b/ui/css/src/modules/_guests.scss @@ -682,25 +682,25 @@ background-repeat: no-repeat; background-position: 100% 50%; &.icon-centos { - background-image: url('../../#{$wok-icon-path}/icon-centos.png'); + background-image: url('../images/icon-centos.png'); } &.icon-debian { - background-image: url('../../#{$wok-icon-path}/icon-debian.png'); + background-image: url('../images/icon-debian.png'); } &.icon-fedora { - background-image: url('../../#{$wok-icon-path}/icon-fedora.png'); + background-image: url('../images/icon-fedora.png'); } &.icon-opensuse { - background-image: url('../../#{$wok-icon-path}/icon-opensuse.png'); + background-image: url('../images/icon-opensuse.png'); } &.icon-ubuntu { - background-image: url('../../#{$wok-icon-path}/icon-ubuntu.png'); + background-image: url('../images/icon-ubuntu.png'); } &.icon-gentoo { - background-image: url('../../#{$wok-icon-path}/icon-gentoo.png'); + background-image: url('../images/icon-gentoo.png'); } &.icon-unknown { - background-image: url('../../#{$wok-icon-path}/icon-unknown.png'); + background-image: url('../images/icon-vm.png'); } } } diff --git a/ui/css/src/modules/_iso-list.scss b/ui/css/src/modules/_iso-list.scss index 22b51a2b..02122403 100644 --- a/ui/css/src/modules/_iso-list.scss +++ b/ui/css/src/modules/_iso-list.scss @@ -122,25 +122,25 @@ text-overflow: ellipsis; white-space: nowrap; &.centos { - background-image: url('../../#{$wok-icon-path}/icon-centos.png'); + background-image: url('../images/icon-centos.png'); } &.debian { - background-image: url('../../#{$wok-icon-path}/icon-debian.png'); + background-image: url('../images/icon-debian.png'); } &.fedora { - background-image: url('../../#{$wok-icon-path}/icon-fedora.png'); + background-image: url('../images/icon-fedora.png'); } &.opensuse { - background-image: url('../../#{$wok-icon-path}/icon-opensuse.png'); + background-image: url('../images/icon-opensuse.png'); } &.ubuntu { - background-image: url('../../#{$wok-icon-path}/icon-ubuntu.png'); + background-image: url('../images/icon-ubuntu.png'); } &.gentoo { - background-image: url('../../#{$wok-icon-path}/icon-gentoo.png'); + background-image: url('../images/icon-gentoo.png'); } &.unknown { - background-image: url('../../#{$wok-icon-path}/icon-unknown.png'); + background-image: url('../images/icon-vm.png'); } } } diff --git a/ui/css/src/modules/_templates.scss b/ui/css/src/modules/_templates.scss index 49a4f1a0..9f183e4a 100644 --- a/ui/css/src/modules/_templates.scss +++ b/ui/css/src/modules/_templates.scss @@ -470,25 +470,25 @@ $kimchi-icon-path: '../images'; background-repeat: no-repeat; background-position: 8px 50%; &.icon-centos { - background-image: url('../../#{$wok-icon-path}/icon-centos.png'); + background-image: url('../images/icon-centos.png'); } &.icon-debian { - background-image: url('../../#{$wok-icon-path}/icon-debian.png'); + background-image: url('../images/icon-debian.png'); } &.icon-fedora { - background-image: url('../../#{$wok-icon-path}/icon-fedora.png'); + background-image: url('../images/icon-fedora.png'); } &.icon-opensuse { - background-image: url('../../#{$wok-icon-path}/icon-opensuse.png'); + background-image: url('../images/icon-opensuse.png'); } &.icon-ubuntu { - background-image: url('../../#{$wok-icon-path}/icon-ubuntu.png'); + background-image: url('../images/icon-ubuntu.png'); } &.icon-gentoo { - background-image: url('../../#{$wok-icon-path}/icon-gentoo.png'); + background-image: url('../images/icon-gentoo.png'); } &.icon-unknown { - background-image: url('../../#{$wok-icon-path}/icon-unknown.png'); + background-image: url('../images/icon-vm.png'); } } } @@ -585,25 +585,25 @@ $kimchi-icon-path: '../images'; background-repeat: no-repeat; background-position: 100% 50%; &.icon-centos { - background-image: url('../../#{$wok-icon-path}/icon-centos.png'); + background-image: url('../images/icon-centos.png'); } &.icon-debian { - background-image: url('../../#{$wok-icon-path}/icon-debian.png'); + background-image: url('../images/icon-debian.png'); } &.icon-fedora { - background-image: url('../../#{$wok-icon-path}/icon-fedora.png'); + background-image: url('../images/icon-fedora.png'); } &.icon-opensuse { - background-image: url('../../#{$wok-icon-path}/icon-opensuse.png'); + background-image: url('../images/icon-opensuse.png'); } &.icon-ubuntu { - background-image: url('../../#{$wok-icon-path}/icon-ubuntu.png'); + background-image: url('../images/icon-ubuntu.png'); } &.icon-gentoo { - background-image: url('../../#{$wok-icon-path}/icon-gentoo.png'); + background-image: url('../images/icon-gentoo.png'); } &.icon-unknown { - background-image: url('../../#{$wok-icon-path}/icon-unknown.png'); + background-image: url('../images/icon-vm.png'); } } } -- 2.13.5
1 0
0 0
[PATCH] [Wok] Use async websockets notifications to send overall notifications to Wok sessions
by Aline Manera 22 Aug '17

22 Aug '17
Instead of polling the server time by time for notifications, use async websockets notifications for that. This patch also improved the listener for the user logs changes and make some notifications handlers persistent accross tabs switching. Signed-off-by: Aline Manera <aline.manera(a)gmail.com> --- src/wok/model/notifications.py | 5 +++++ src/wok/reqlogger.py | 2 -- ui/css/bootstrap.custom.css | 6 ------ .../src/vendor/bootstrap-sass/bootstrap/_alerts.scss | 1 - ui/css/src/wok.scss | 8 +++++--- ui/css/wok.css | 6 ++++-- ui/js/src/wok.main.js | 19 +++++++++++-------- ui/js/src/wok.utils.js | 18 +++++------------- ui/js/wok.user-log.js | 4 +--- ui/pages/wok-ui.html.tmpl | 1 + 10 files changed, 32 insertions(+), 38 deletions(-) diff --git a/src/wok/model/notifications.py b/src/wok/model/notifications.py index f4eb542..59c4244 100644 --- a/src/wok/model/notifications.py +++ b/src/wok/model/notifications.py @@ -21,6 +21,7 @@ from datetime import datetime from wok.exception import NotFoundError, OperationFailed from wok.message import WokMessage +from wok.pushserver import send_wok_notification from wok.utils import wok_log @@ -45,6 +46,8 @@ def add_notification(code, args=None, plugin_name=None): args.update({"_plugin_name": plugin_name, "timestamp": timestamp}) notificationsStore[code] = args + send_wok_notification('', 'notifications', 'POST') + def del_notification(code): global notificationsStore @@ -54,6 +57,8 @@ def del_notification(code): except Exception as e: raise OperationFailed("WOKNOT0002E", {'id': str(code), 'msg': e.msg()}) + send_wok_notification('', 'notification', 'DELETE') + class NotificationsModel(object): def __init__(self, **kargs): diff --git a/src/wok/reqlogger.py b/src/wok/reqlogger.py index 02cd1d1..2959ddb 100644 --- a/src/wok/reqlogger.py +++ b/src/wok/reqlogger.py @@ -69,8 +69,6 @@ WOK_REQUEST_LOGGER = "wok_request_logger" # AsyncTask handling ASYNCTASK_REQUEST_METHOD = 'TASK' -NEW_LOG_ENTRY_MESSAGE = 'new_log_entry' - def log_request(code, params, exception, method, status, app=None, user=None, ip=None, class_name=None, action_name=None): diff --git a/ui/css/bootstrap.custom.css b/ui/css/bootstrap.custom.css index d2c2a32..1147fee 100644 --- a/ui/css/bootstrap.custom.css +++ b/ui/css/bootstrap.custom.css @@ -4954,12 +4954,6 @@ a.thumbnail.active { border-color: #3a393b; } -@media (min-width: 1200px) { - #alert-fields { - padding-top: 10px; - } -} - .alert { padding: 8px 15px; margin-bottom: 10px; diff --git a/ui/css/src/vendor/bootstrap-sass/bootstrap/_alerts.scss b/ui/css/src/vendor/bootstrap-sass/bootstrap/_alerts.scss index 79c6c12..f121c8e 100644 --- a/ui/css/src/vendor/bootstrap-sass/bootstrap/_alerts.scss +++ b/ui/css/src/vendor/bootstrap-sass/bootstrap/_alerts.scss @@ -8,7 +8,6 @@ #alert-fields { @media (min-width: $screen-lg-min) { - padding-top: 10px; } } diff --git a/ui/css/src/wok.scss b/ui/css/src/wok.scss index 9e76200..ac6d961 100644 --- a/ui/css/src/wok.scss +++ b/ui/css/src/wok.scss @@ -162,8 +162,10 @@ html.in-progress [disabled], } } -#notification-container .alert { - margin: 10px; +#alert-container { + padding-left: 80px; + padding-right: 60px; + padding-top: 10px; } // session expiring @@ -224,4 +226,4 @@ html.in-progress [disabled], // Utils @import "modules/utils"; // Animation -@import "modules/animation"; \ No newline at end of file +@import "modules/animation"; diff --git a/ui/css/wok.css b/ui/css/wok.css index b9b7c92..d46ea86 100644 --- a/ui/css/wok.css +++ b/ui/css/wok.css @@ -153,8 +153,10 @@ html.in-progress .disabled { cursor: not-allowed !important; } -#notification-container .alert { - margin: 10px; +#alert-container { + padding-left: 80px; + padding-right: 60px; + padding-top: 10px; } .session-expiring { diff --git a/ui/js/src/wok.main.js b/ui/js/src/wok.main.js index 411b05e..617a1c2 100644 --- a/ui/js/src/wok.main.js +++ b/ui/js/src/wok.main.js @@ -30,7 +30,7 @@ wok.getConfig(function(result) { }); wok.notificationListeners = {}; -wok.addNotificationListener = function(msg, func) { +wok.addNotificationListener = function(msg, func, persist) { var listenerArray = wok.notificationListeners[msg]; if (listenerArray == undefined) { listenerArray = []; @@ -38,10 +38,13 @@ wok.addNotificationListener = function(msg, func) { listenerArray.push(func); wok.notificationListeners[msg] = listenerArray; $(window).one("hashchange", function() { - var listenerArray = wok.notificationListeners[msg]; - var del_index = listenerArray.indexOf(func); - listenerArray.splice(del_index, 1); - wok.notificationListeners[msg] = listenerArray; + // Some notification may persist while switching tabs + if (persist == undefined) { + var listenerArray = wok.notificationListeners[msg]; + var del_index = listenerArray.indexOf(func); + listenerArray.splice(del_index, 1); + wok.notificationListeners[msg] = listenerArray; + } }); }; @@ -78,7 +81,6 @@ wok.startNotificationWebSocket = function () { }; }; - wok.main = function() { wok.isLoggingOut = false; wok.popable(); @@ -513,10 +515,11 @@ wok.main = function() { } ); - setTimeout(wok.notificationsLoop, wok.NOTIFICATION_INTERVAL); + wok.notificationsLoop(); + wok.addNotificationListener('POST:/wok/notifications', wok.notificationsLoop, true); + wok.addNotificationListener('DELETE:/wok/notification', wok.notificationsLoop, true); }; - wok.checkHelpFile = function(path) { var lang = wok.lang.get(); var url = path.replace("tabs", "help/" + lang); diff --git a/ui/js/src/wok.utils.js b/ui/js/src/wok.utils.js index 80bdb77..7d03060 100644 --- a/ui/js/src/wok.utils.js +++ b/ui/js/src/wok.utils.js @@ -1,7 +1,7 @@ /* * Project Wok * - * Copyright IBM Corp, 2015-2016 + * Copyright IBM Corp, 2015-2017 * * Code derived from Project Kimchi * @@ -209,26 +209,18 @@ wok.urlSafeB64Encode = function(str) { return $.base64.btoa(str, true).replace(/\+/g, '-').replace(/\//g, '_'); } -wok.notificationsLoop = function notificationsLoop() { +wok.notificationsLoop = function() { wok.getNotifications( function(notifications){ if(notifications && notifications.length > 0) { $.each(notifications, function(i, notif) { // Check if notification is being displayed - if (!$("#notification-container").length) { - $('.navbar.toolbar').next().prepend('<div id="notification-container"></div>'); - } - if (($("#notification-container").find("div:contains('" + notif.message + "')").length) == 0) { - wok.message.notify(notif, '#notification-container'); + if (($("#alert-container").find("div:contains('" + notif.message + "')").length) == 0) { + wok.message.notify(notif, '#alert-container'); } }); } - setTimeout(notificationsLoop, wok.NOTIFICATION_INTERVAL); - }, - function(data){ - setTimeout(notificationsLoop, wok.NOTIFICATION_INTERVAL); - } - ); + }, undefined); } wok.datetimeLocaleConverter = function datetimeLocaleConverter(datetime_string, locale){ diff --git a/ui/js/wok.user-log.js b/ui/js/wok.user-log.js index d5ba36d..a5e8bd0 100644 --- a/ui/js/wok.user-log.js +++ b/ui/js/wok.user-log.js @@ -154,9 +154,7 @@ wok.initUserLogContent = function() { wok.initUserLogConfigGridData(); }); - wok.addNotificationListener('POST:/wok/logs', function(message) { - $("#refresh-button").click(); - }); + wok.addNotificationListener('POST:/wok/logs', wok.initUserLogConfigGridData); }; wok.initUserLogWindow = function() { diff --git a/ui/pages/wok-ui.html.tmpl b/ui/pages/wok-ui.html.tmpl index 8780e0b..c3c545e 100644 --- a/ui/pages/wok-ui.html.tmpl +++ b/ui/pages/wok-ui.html.tmpl @@ -145,6 +145,7 @@ </nav> </div> <div class="content"> + <div id="alert-container"></div> <div id="main"> </div> </div> -- 2.9.5
2 1
0 0
[PATCH] [Kimchi] Remove alert-container as it is being provided by Wok basic-template
by Aline Manera 22 Aug '17

22 Aug '17
Signed-off-by: Aline Manera <aline.manera(a)gmail.com> --- ui/js/src/kimchi.network_edit_main.js | 2 +- ui/pages/tabs/guests.html.tmpl | 3 +-- ui/pages/tabs/network.html.tmpl | 3 +-- ui/pages/tabs/storage.html.tmpl | 1 - ui/pages/tabs/templates.html.tmpl | 3 +-- 5 files changed, 4 insertions(+), 8 deletions(-) diff --git a/ui/js/src/kimchi.network_edit_main.js b/ui/js/src/kimchi.network_edit_main.js index d0174dd..d1382e9 100644 --- a/ui/js/src/kimchi.network_edit_main.js +++ b/ui/js/src/kimchi.network_edit_main.js @@ -1,7 +1,7 @@ /* * Project Kimchi * - * Copyright IBM Corp, 2016 + * Copyright IBM Corp, 2016-2017 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/ui/pages/tabs/guests.html.tmpl b/ui/pages/tabs/guests.html.tmpl index 938e38a..d19fe15 100644 --- a/ui/pages/tabs/guests.html.tmpl +++ b/ui/pages/tabs/guests.html.tmpl @@ -1,7 +1,7 @@ #* * Project Kimchi * - * Copyright IBM Corp, 2013-2016 + * Copyright IBM Corp, 2013-2017 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,7 +45,6 @@ <input type="text" class="filter form-control search" id="search_input" placeholder="$_("Filter")"> </div> </div> - <div id="alert-container"></div> <div id="guestListField" style="display: none"> <ul class="wok-guest-list"> <li class="wok-guest-list-header"> diff --git a/ui/pages/tabs/network.html.tmpl b/ui/pages/tabs/network.html.tmpl index edffed0..bd7aca0 100644 --- a/ui/pages/tabs/network.html.tmpl +++ b/ui/pages/tabs/network.html.tmpl @@ -1,7 +1,7 @@ #* * Project Kimchi * - * Copyright IBM Corp, 2013-2016 + * Copyright IBM Corp, 2013-2017 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,7 +38,6 @@ <input type="text" class="filter form-control" placeholder="$_("Filter")"> </div> </div> - <div id="alert-container"></div> <div id="networkGrid" class="hidden"> <div> <span class="column-state"><span class="sr-only">$_("State")</span></span><!-- diff --git a/ui/pages/tabs/storage.html.tmpl b/ui/pages/tabs/storage.html.tmpl index ad88b65..06bfab5 100644 --- a/ui/pages/tabs/storage.html.tmpl +++ b/ui/pages/tabs/storage.html.tmpl @@ -37,7 +37,6 @@ <input type="text" class="filter form-control" placeholder="$_("Filter")"> </div> </div> - <div id="alert-container"></div> <div id='storageGrid' class="hidden"> <div> <span class="column-state"><span class="sr-only">$_("State")</span></span><!-- diff --git a/ui/pages/tabs/templates.html.tmpl b/ui/pages/tabs/templates.html.tmpl index 2700dd7..8642770 100644 --- a/ui/pages/tabs/templates.html.tmpl +++ b/ui/pages/tabs/templates.html.tmpl @@ -1,7 +1,7 @@ #* * Project Kimchi * -* Copyright IBM Corp, 2013-2016 +* Copyright IBM Corp, 2013-2017 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -54,7 +54,6 @@ <input type="text" class="filter form-control search" id="search_input" placeholder="$_("Filter")"> </div> </div> - <div id="alert-container"></div> <ul id="templates-grid" class="wok-vm-list hidden empty-when-logged-off"> <li class="wok-vm-header"> <span class="column-name" title="$_('Template Name (ID)')">$_("Template Name (ID)")</span><!-- -- 2.9.5
2 1
0 0
[PATCH] [Kimchi] Add Template listeners to update page according to user interations
by Aline Manera 02 Aug '17

02 Aug '17
From: Aline Manera <alinefm(a)linux.vnet.ibm.com> It makes use of the async websockets notification mechanism provided by Wok to update the Template tab content when a template is added, removed or updated without the need to polling requests to server. Signed-off-by: Aline Manera <alinefm(a)linux.vnet.ibm.com> --- ui/js/src/kimchi.template_main.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ui/js/src/kimchi.template_main.js b/ui/js/src/kimchi.template_main.js index 8755167..dd91dd5 100644 --- a/ui/js/src/kimchi.template_main.js +++ b/ui/js/src/kimchi.template_main.js @@ -1,7 +1,7 @@ /* * Project Kimchi * - * Copyright IBM Corp, 2013-2016 + * Copyright IBM Corp, 2013-2017 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -189,5 +189,10 @@ kimchi.template_main = function() { }); } + // Register listeners to update the page according to user interactions + wok.addNotificationListener('POST:/kimchi/templates', kimchi.doListTemplates); + wok.addNotificationListener('DELETE:/kimchi/template', kimchi.doListTemplates); + wok.addNotificationListener('PUT:/kimchi/template', kimchi.doListTemplates); + kimchi.doListTemplates(); }; -- 2.9.4
2 1
0 0
[PATCH] [Kimchi 0/6] Make use of async websockets notification mechanism
by Aline Manera 02 Aug '17

02 Aug '17
This patch set also register for libvirt events to update the page accordindly. Aline Manera (6): Register for libvirt storage pools events to update the UI accordindly Add Storage Pools listeners to update page according to user interations Register for libvirt network events to update the UI accordindly Add Network listeners to update page according to user interations Register for libvirt domain events to update the UI accordindly Add Domain listeners to update page according to user interations model/libvirtevents.py | 53 +++++++++++++++++++++++++++++++++++++++- model/model.py | 18 +++++++++++--- ui/js/src/kimchi.guest_main.js | 18 ++------------ ui/js/src/kimchi.network.js | 11 +++++++-- ui/js/src/kimchi.storage_main.js | 1 + 5 files changed, 79 insertions(+), 22 deletions(-) -- 2.9.4
2 7
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • ...
  • 378
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.