From: samhenri <samuel.guimaraes(a)eldorado.org.br>
Signed-off-by: samhenri <samuel.guimaraes(a)eldorado.org.br>
---
ui/css/src/bootstrap-select.custom.scss | 1 +
ui/css/src/modules/_host.scss | 3 +-
ui/css/src/modules/_menu-flat.scss | 6 +-
ui/css/src/modules/_modal-flat.scss | 2 +-
ui/css/src/modules/_navbar-flat.scss | 4 +-
ui/css/src/modules/_toolbar.scss | 24 +-
ui/css/src/modules/_wok-confirm.scss | 42 ++++
ui/css/src/modules/_wok-grid.scss | 24 ++
ui/css/src/wok.scss | 6 +-
ui/images/theme-default/Makefile.am | 2 +-
ui/images/theme-default/logo-flat.svg | 43 ++++
ui/images/theme-default/logo-white.png | Bin 9879 -> 7583 bytes
ui/js/src/wok.confirm.js | 91 +++++++
ui/js/src/wok.grid.js | 416 ++++++++------------------------
ui/js/src/wok.line-chart.js | 74 +++---
ui/js/src/wok.list.js | 302 +++++++++++++++++++++++
ui/js/src/wok.login.js | 9 +-
ui/js/src/wok.main.js | 37 +--
ui/js/src/wok.message.js | 96 ++------
ui/js/src/wok.window.js | 38 +--
ui/pages/login.html.tmpl | 186 +++++++-------
ui/pages/wok-ui.html.tmpl | 219 +++++++++--------
22 files changed, 965 insertions(+), 660 deletions(-)
create mode 100644 ui/css/src/modules/_wok-confirm.scss
create mode 100644 ui/images/theme-default/logo-flat.svg
create mode 100644 ui/js/src/wok.confirm.js
create mode 100644 ui/js/src/wok.list.js
diff --git a/ui/css/src/bootstrap-select.custom.scss
b/ui/css/src/bootstrap-select.custom.scss
index 49f9bc2..dd895f2 100644
--- a/ui/css/src/bootstrap-select.custom.scss
+++ b/ui/css/src/bootstrap-select.custom.scss
@@ -25,6 +25,7 @@
&.btn-group {
.btn {
.caret {
+ position: absolute;
top: 0;
right: 40px;
margin-top: 0;
diff --git a/ui/css/src/modules/_host.scss b/ui/css/src/modules/_host.scss
index 5c2d9f6..cfd2f00 100644
--- a/ui/css/src/modules/_host.scss
+++ b/ui/css/src/modules/_host.scss
@@ -90,7 +90,8 @@
.wok-list-content {
height: 517px;
- overflow-x: auto;
+ overflow-y: auto;
+ overflow-x: hidden;
}
.dropdown.menu-flat {
diff --git a/ui/css/src/modules/_menu-flat.scss b/ui/css/src/modules/_menu-flat.scss
index 9d7036b..46ed21c 100644
--- a/ui/css/src/modules/_menu-flat.scss
+++ b/ui/css/src/modules/_menu-flat.scss
@@ -127,7 +127,7 @@
background-color: $menu-flat-dropdown-bg;
border: 0;
border-radius: 0;
- @include box-shadow(none !important);
+ box-shadow: none !important;
background-clip: padding-box;
// Aligns the dropdown menu to right
@@ -150,11 +150,11 @@
li:first-child > a {
border-top: 1px solid
$menu-flat-dropdown-bg;
- @include box-shadow(none);
+ box-shadow: none;
}
li.critical:last-child > a {
- @include
box-shadow(none);
+ box-shadow: none;
}
// Links within the dropdown menu
diff --git a/ui/css/src/modules/_modal-flat.scss b/ui/css/src/modules/_modal-flat.scss
index 8265140..90ae44a 100644
--- a/ui/css/src/modules/_modal-flat.scss
+++ b/ui/css/src/modules/_modal-flat.scss
@@ -76,7 +76,7 @@
border-radius: 0;
border: 3px solid #999;
background-clip: padding-box;
- @include box-shadow(none !important);
+ box-shadow: none !important;
border-radius: 0;
outline: 0;
}
diff --git a/ui/css/src/modules/_navbar-flat.scss b/ui/css/src/modules/_navbar-flat.scss
index b54db68..47246a6 100644
--- a/ui/css/src/modules/_navbar-flat.scss
+++ b/ui/css/src/modules/_navbar-flat.scss
@@ -355,7 +355,7 @@
margin-right: 0;
padding-top: 0;
padding-bottom: 0;
- @include box-shadow(none);
+ box-shadow: none;
}
}
@@ -418,7 +418,7 @@
background-color: $menu-flat-dropdown-bg;
border: 0;
border-radius: 0;
- @include box-shadow(none !important);
+ box-shadow: none !important;
background-clip: padding-box;
height: auto;
max-height: 400px;
diff --git a/ui/css/src/modules/_toolbar.scss b/ui/css/src/modules/_toolbar.scss
index eaa962f..77455fd 100644
--- a/ui/css/src/modules/_toolbar.scss
+++ b/ui/css/src/modules/_toolbar.scss
@@ -16,7 +16,7 @@
// limitations under the License.
//
-.toolbar {
+.navbar-default.toolbar {
height: 40px;
padding: 0;
margin: 0;
@@ -27,15 +27,29 @@
height: 40px;
}
- a {
+ .navbar-nav > li > a.dropdown-toggle > .caret {
+ margin-top: -5px;
+ width: 20px;
+ margin-left: 5px;
+ }
+
+ .navbar-nav > li > a.dropdown-toggle > .caret:before {
+ top: 15px;
+ margin-left: 0;
+ }
+
+ .navbar-right.tools > li > a {
font-family: $font-family-alternate;
display: inline-block;
color: $highlights-color;
text-decoration: none;
font-size: 13pt;
vertical-align: middle;
- padding: 6px 0;
- margin-left: 50px;
+ padding: 6px 0 !important;
+ margin-left: 50px !important;
+ font-weight: 400;
+ width: auto;
+ min-width: auto;
}
span, .fa {
@@ -52,7 +66,7 @@
@each $page, $bgcolor in $colors {
-##{$page}-root-container .toolbar {
+##{$page}-root-container .navbar-default.toolbar.toolbar {
background-color: $bgcolor !important;
}
}
\ No newline at end of file
diff --git a/ui/css/src/modules/_wok-confirm.scss b/ui/css/src/modules/_wok-confirm.scss
new file mode 100644
index 0000000..21693ac
--- /dev/null
+++ b/ui/css/src/modules/_wok-confirm.scss
@@ -0,0 +1,42 @@
+//
+// Project Wok
+//
+// Copyright IBM, Corp. 2015
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//
http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#wok-confirm-modal {
+
+ .modal-title .fa {
+ font-size: 47px;
+ color: #fdb813;
+ position: absolute;
+ left: 38px;
+ top: 19px;
+ }
+
+ .modal-footer {
+ background-color: $state-warning-border;
+ }
+
+ .modal-header,
+ .modal-body {
+ padding-left: 100px;
+ }
+
+ .modal-header.icon {
+ padding: 19px 0 0 0;
+ }
+
+}
\ No newline at end of file
diff --git a/ui/css/src/modules/_wok-grid.scss b/ui/css/src/modules/_wok-grid.scss
index cffaede..e1c15e0 100644
--- a/ui/css/src/modules/_wok-grid.scss
+++ b/ui/css/src/modules/_wok-grid.scss
@@ -108,6 +108,11 @@
cursor: pointer;
}
+.wok-list-content tbody tr.generating:hover {
+ text-decoration: none;
+ cursor: default;
+}
+
.wok-list-content tbody tr.selected {
background: #ddd;
}
@@ -119,3 +124,22 @@ span.wok-repository-status.disabled {
.wok-list-cell.disabled span {
color: #999;
}
+
+.wok-single-button {
+ padding-bottom: 16px;
+ margin-top: -11px;
+}
+
+.generating .wok-list-description {
+ padding-left: 24px;
+}
+
+.generating .wok-list-loading-icon-inline {
+ background: transparent url('#{$wok-icon-path}/spin5.svg') no-repeat 50% 50%;
+ @include animation(spin 3s infinite linear);
+ height: 16px;
+ width: 16px;
+ background-size: 100%;
+ display: block;
+ position: absolute;
+}
\ No newline at end of file
diff --git a/ui/css/src/wok.scss b/ui/css/src/wok.scss
index 9c0dee2..a9685c3 100755
--- a/ui/css/src/wok.scss
+++ b/ui/css/src/wok.scss
@@ -64,7 +64,8 @@
// Override panels
.panel {
- @include box-shadow(none);
+ box-shadow: none !important;
+ -webkit-box-shadow: none !important;
}
.panel-title {
@@ -91,6 +92,9 @@
// Wok Grid & Wok List
@import "modules/wok-grid";
+// Wok Confirm Dialog
+@import "modules/wok-confirm";
+
// Utils
.absolute-middle {
margin: auto;
diff --git a/ui/images/theme-default/Makefile.am b/ui/images/theme-default/Makefile.am
index 85fdf5f..7deb55f 100644
--- a/ui/images/theme-default/Makefile.am
+++ b/ui/images/theme-default/Makefile.am
@@ -19,4 +19,4 @@
imagedir = $(datadir)/wok/ui/images/theme-default
-dist_image_DATA = *.png *.gif
+dist_image_DATA = *.png *.gif *.svg
diff --git a/ui/images/theme-default/logo-flat.svg
b/ui/images/theme-default/logo-flat.svg
new file mode 100644
index 0000000..dda5822
--- /dev/null
+++ b/ui/images/theme-default/logo-flat.svg
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
+ <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" width="387"
height="366" id="svg2">
+ <title id="title4148">Project Kimchi</title>
+ <metadata id="metadata20">
+ <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>Project Kimchi</dc:title>
+ <cc:license
rdf:resource="http://www.apache.org/licenses/LICENSE-2.0" />
+ <dc:date>2013 - 2015</dc:date>
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>IBM, Corp.</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:rights>
+ <cc:Agent>
+ <dc:title>IBM, Corp.</dc:title>
+ </cc:Agent>
+ </dc:rights>
+ <dc:publisher>
+ <cc:Agent>
+ <dc:title>IBM, Corp.</dc:title>
+ </cc:Agent>
+ </dc:publisher>
+ <dc:contributor>
+ <cc:Agent>
+
<
dc:title>https://github.com/kimchi-project</dc:title>
+ </cc:Agent>
+ </dc:contributor>
+ <dc:description>An HTML5 management interface for
KVM</dc:description>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs id="defs18" />
+ <path fill="#D91F2F"
d="M303.868,82.71c25.172-8.604,27.898-42.319,7.13-55.331c-1.923-1.04-16.93-10.998-43.506-11.999
c-39.783,1.486-71.632,13.167-92.662,62.139c-0.25,2.109-0.508,6.054,1.977,3.206c0,0,0.284-0.329,0.443-0.515
c15.153-23.034,69.707-29.756,88.572-8.681c0.625,0.72,1.297,1.634,2.003,2.274C276.457,82.654,293.688,86.191,303.868,82.71"
id="path4" />
+ <path fill="#F19125"
d="M336.691,227.692c20.913,16.439,50.687,0.387,50.306-24.119c-0.174-2.18,0.018-20.188-13.601-43.033
c-22.892-32.571-50.019-52.939-102.551-43.944c-1.906,0.938-5.355,2.866-1.615,3.403c0,0,0.432,0.059,0.674,0.093
c27.571,0.183,62.889,42.3,55.469,69.596c-0.263,0.916-0.665,1.977-0.817,2.918C321.826,204.661,328.231,221.044,336.691,227.692"
id="path6" />
+ <path fill="#8CC643"
d="M228.105,329.358c-4.421,26.23,23.926,44.686,45.259,32.619c1.831-1.197,17.731-9.65,31.27-32.543
c17.636-35.689,22.531-69.258-10.515-111.072c-1.737-1.225-5.082-3.33-3.762,0.211c0,0,0.152,0.406,0.24,0.637
c13.04,24.293-7.028,75.463-34.545,82.018c-0.932,0.207-2.055,0.361-2.955,0.68C241.207,305.282,229.893,318.749,228.105,329.358"
id="path8" />
+ <path fill="#27AEE4"
d="M81.133,285.823c-25.04,8.973-27.272,42.725-6.314,55.43c1.939,1.01,17.088,10.746,43.677,11.357
c39.757-2.072,71.43-14.219,91.738-63.496c0.22-2.113,0.421-6.061-2.023-3.176c0,0-0.279,0.33-0.438,0.521
c-14.811,23.254-69.259,30.777-88.434,9.982c-0.637-0.711-1.321-1.615-2.038-2.246C108.544,285.476,91.262,282.192,81.133,285.823"
id="path10" />
+ <path fill="#06659E"
d="M48.671,141.301c-21.969-14.995-50.596,3.023-48.569,27.447c0.321,2.165,1.34,20.143,16.463,42.022
c25.03,30.957,53.465,49.455,105.273,36.947c1.839-1.063,5.151-3.219,1.382-3.502c0,0-0.432-0.031-0.678-0.047
c-27.52,1.672-65.589-37.975-60.023-65.709c0.202-0.933,0.531-2.018,0.62-2.968C65.053,163.281,57.561,147.365,48.671,141.301"
id="path12" />
+ <path fill="#BA1E70"
d="M164.882,38.837c6.497-25.793-20.29-46.448-42.516-36.122c-1.919,1.049-18.444,8.206-33.764,29.946
c-20.424,34.171-27.98,67.243,1.628,111.558c1.632,1.359,4.798,3.726,3.765,0.089c0,0-0.119-0.417-0.188-0.651
c-11.062-25.255,13.021-74.663,40.974-79.004c0.945-0.132,2.076-0.198,3-0.441C149.9,61.794,162.255,49.273,164.882,38.837"
id="path14" />
+ </svg>
diff --git a/ui/images/theme-default/logo-white.png
b/ui/images/theme-default/logo-white.png
index 8ef8ae15aa40ceb7db5170c9806ac74b840eaa0f..f2630da0fd837573cd6ca69a46823260b899f9ac
100644
GIT binary patch
literal 7583
zcmV;Q9bn>#P)<h;3K|Lk000e1NJLTq001@s001xu1^@s6S{#YM00004XF*Lt006O%
z3;baP000U)X+uL$P-t&-Z*ypGa3D!TLm+T+Z)Rz1WdHz3iJg{rR8-d%htIutdZEoQ
z6e&aRy$v9}H>uJ@VVD_UC<6{NG_fI~0ue<-1QkJoA_k0xBC#Thg@9ne9*`iQ#9$Or
zQF$}6R&?d%y_c8YA7_1QpS|}zXYYO1x&V;8{kgn!SPFnNo`4_X<w}o?il$@x0Sxc}
z1Iz$mvNAIQLOsKPNIo8J^h}Wx_#y~^H+RG<05^@igXnbd|4Eva!54_q1c}&!&B<hm
zxKPBY*@6tQeMZF8_!Ke2C^7Rz2Nbcqm=hP-@Uzb%JByi}#$$_EeC7;x8e7agBHo%M
z<cJvY7jaP*my<2xTO!s>6{c}T{8k*B#$jdxfFg<Q0uC!l#HJ!9@xwygM7$IL94YZD
zj{k}UoE(ApQf}!PxqNP7l7Ozu(xaQ%+A`?goa|JNKwuQaWTi0qY`R-|S_YGs3&7%?
zKTAejTe_&o)@HWW)<)*WW?vQRzi$3biF><9uYy1K45IaYvHg`_dOZM)Sy63ve6hvv
z1)yUy0P^?0*fb9UASvow`@mQCp^4`uNg&9uGcn1|&Nk+9SjOUl{-OWr@Hh0;_l(8q
z{wNRKos+;6rV8ldy0Owz(}jF`W(JeRp&R{qi2rfmU!TJ;gp<JGb9kbNaM6@;d5NNS
z^VnPgH=Rf4^8Qm3|6$mlv^duyQ5rr0YOFDk8lVE?*FJ!v5CIZ%K(qt>(Kmm5I1s<Q
z2-S(jx&JKa-?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002ov
JPDHLkV1gkP$2tH2
diff --git a/ui/js/src/wok.confirm.js b/ui/js/src/wok.confirm.js
new file mode 100644
index 0000000..63f01c4
--- /dev/null
+++ b/ui/js/src/wok.confirm.js
@@ -0,0 +1,91 @@
+/*
+ * Project Wok
+ *
+ * Copyright IBM, Corp. 2015
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * A public function of confirm box.
+ *
+ * @param msg
+ * type:[object]
+ * @param msg.title
+ * The title of the confirm box.
+ * @param msg.content
+ * The main text of the confirm box.
+ * @param msg.confirm
+ * The text of the confirm button.
+ * @param msg.cancel
+ * the text of the cancel button.
+ * @param confirmCallback
+ * the callback function of click the confirm button.
+ * @param cancelCallback
+ * The callback function of click the cancel and X button.
+ */
+wok.confirm = function(settings, confirmCallback, cancelCallback) {
+ "use strict";
+ var modalStr = '<div id="wok-confirm-modal" class="modal fade
host-modal" tabindex="-1" role="dialog"
aria-labelledby="confirmModalLabel"
aria-hidden="true"></div>';
+ if ($('#wok-confirm-modal ').size() < 1 &&
$('#modalWindow').size() < 1 ) {
+ $(document.body).append(modalStr);
+ } else if ($('#wok-confirm-modal ').size() < 1) {
+ $('#modalWindow').after(modalStr);
+ }
+
+ var confirmboxHeader = [
+ '<div class="modal-header', (settings.title ===
'' || typeof settings.title === 'undefined' ? ' icon' : ''
) ,'">',
+ '<h4 class="modal-title"><i class="fa
fa-exclamation-triangle"></i>'+(settings.title ||
'')+'</h4>',
+ '</div>'
+ ].join('');
+
+ var confirmboxHtml = [
+ '<div class="modal-dialog modal-sm">',
+ '<div class="modal-content">',
+ confirmboxHeader,
+ '<div class="modal-body">',
+ settings.content,
+ '</div>',
+ '<div class="modal-footer">',
+ '<button id="button-confirm" class="btn
btn-default">' + (settings.confirm || i18n['KCHAPI6004M']) +
'</button>',
+ '<button id="button-cancel" class="btn
btn-default">' + (settings.cancel || i18n['KCHAPI6003M']) +
'</button>',
+ '</div>',
+ '</div>',
+ '</div>'
+ ].join('');
+ var confirmboxNode = $(confirmboxHtml);
+ $('#wok-confirm-modal').append(confirmboxNode);
+ $('#wok-confirm-modal').modal('show');
+ $('#wok-confirm-modal').on("click", "#button-confirm",
function(e) {
+ if (confirmCallback) {
+ confirmCallback();
+ }
+ $('#wok-confirm-modal').modal('hide');
+ });
+ $('#wok-confirm-modal').on("click", "#button-cancel",
function(e) {
+ if (cancelCallback) {
+ cancelCallback();
+ }
+ $('#wok-confirm-modal').modal('hide');
+ });
+
+ $('#wok-confirm-modal').on('hidden.bs.modal', function () {
+ close();
+ });
+
+ var close = function(){
+ "use strict";
+ $('#wok-confirm-modal').removeData('bs.modal');
+ $('#wok-confirm-modal').remove();
+ };
+
+};
\ No newline at end of file
diff --git a/ui/js/src/wok.grid.js b/ui/js/src/wok.grid.js
index 12f191c..0606bc6 100644
--- a/ui/js/src/wok.grid.js
+++ b/ui/js/src/wok.grid.js
@@ -18,106 +18,73 @@
* limitations under the License.
*/
wok.widget.Grid = function(opts) {
+ "use strict";
this.opts = $.extend({}, this.opts, opts);
this.createDOM();
this.reload();
};
wok.widget.Grid.prototype = (function() {
+ "use strict";
var htmlStr = [
- '<div id="{id}" class="grid">',
- '<div class="grid-content">',
- '<div class="grid-header">',
- '<div class="grid-frozen-header-view">',
- '<table
class="grid-frozen-header-container">',
- '</table>',
- '</div>',
- '<div class="grid-header-view">',
- '<div class="grid-header-wrapper">',
- '<table
class="grid-header-container">',
- '</table>',
- '</div>',
- '</div>',
- '</div>',
- '<div class="grid-body">',
- '<div class="grid-frozen-body-view">',
- '<div
class="grid-frozen-body-wrapper">',
- '<table
class="grid-frozen-body-container">',
- '</table>',
- '</div>',
- '</div>',
- '<div class="grid-body-view">',
- '<div class="grid-body-wrapper">',
- '<table
class="grid-body-container">',
- '</table>',
- '</div>',
- '</div>',
+ '<div id="{id}" class="grid wok-grid">',
+ '<div class="wok-grid-message hidden">',
+ '<div class="alert alert-danger fade in"
role="alert">',
+ '<p><strong>{message}</strong> ',
+ '<span
class="detailed-text"></span></p>',
+ '<p><button class="btn btn-primary btn-xs
retry-button">',
+ '{buttonLabel}',
+ '</button></p>',
'</div>',
- '<div class="grid-resizer-leftmost
hidden"></div>',
- '<div class="grid-resizer hidden"></div>',
'</div>',
- '<div class="grid-footer"></div>',
- '<div class="grid-mask hidden">',
- '<div class="grid-loading">',
- '<div
class="grid-loading-icon"></div>',
- '<div class="grid-loading-text">',
- '{loading}',
- '</div>',
- '</div>',
+ '<div class="grid-content wok-grid-content">',
+ '<table class="wok-table table">',
+ '<thead
class="wok-grid-header-container"></thead>',
+ '<tbody
class="wok-grid-body-container">',
+ '</tbody>',
+ '</table>',
'</div>',
- '<div class="grid-message hidden">',
- '<div class="grid-message-text">',
- '{message}',
- '<button class="retry-button btn-small">',
- '{buttonLabel}',
- '</button>',
- '</div>',
- '<div class="detailed-title">',
- '{detailedLabel}',
+ '<div class="wok-grid-mask hidden">',
+ '<div class="wok-grid-loader-container">',
+ '<div class="wok-grid-loading">',
+ '<div
class="wok-grid-loading-icon"></div>',
+ '<div class="wok-grid-loading-text">',
+ '{loading}',
+ '</div>',
+ '</div>',
'</div>',
- '<div class="detailed-text"></div>',
'</div>',
'</div>'
].join('');
- var CONTAINER_NORMAL = 0, CONTAINER_FROZEN = 1;
-
var setupHeaders = function(header, body, fields) {
var colGroup = $('<colgroup></colgroup>').appendTo(header);
- var headerHeader = $('<thead></thead>');
- var headerRow = $('<tr></tr>').appendTo(headerHeader);
+ var headerRow = $('<tr></tr>').appendTo(header);
$.each(fields || [], function(i, field) {
$('<col class="' +
field['class'] +
'"/>')
.appendTo(colGroup);
- $('<th><div class="cell-text-wrapper">' +
+ $('<th><div class="wok-text-header">' +
field['label'] +
'</div></th>').appendTo(headerRow);
});
- headerHeader.appendTo(header);
var totalWidth = 0;
- $('col', colGroup).each(function(index, col) {
- var width = $(col).width();
- totalWidth += width;
- $(col).css('width', width + 'px');
- });
- $(body).append(colGroup.clone());
return totalWidth;
};
var getValue = function(name, obj) {
- var result=undefined;
+ var result;
if(!Array.isArray(name)) {
name=name.parseKey();
}
- if(name.length!=0) {
+ if(name.length!==0) {
var tmpName=name.shift();
- if(obj[tmpName]!=undefined) {
+ if(obj[tmpName]!==undefined) {
result=obj[tmpName];
}
- if(name.length!=0) {
+ if(name.length!==0) {
result=getValue(name,obj[tmpName]);
}
}
@@ -126,55 +93,18 @@ wok.widget.Grid.prototype = (function() {
var fillBody = function(container, fields) {
var data = this.data;
- var tbody = ($('tbody', container).length && $('tbody',
container))
- || $('<tbody></tbody>').appendTo(container);
- tbody.empty();
$.each(data, function(i, row) {
- var rowNode = $('<tr></tr>').appendTo(tbody);
+ var rowNode = $('<tr></tr>').appendTo(container);
$.each(fields, function(fi, field) {
var value = getValue(field['name'], row);
- $('<td><div class="cell-text-wrapper"' +
- (field['makeTitle'] === true
- ? ' title="' + value + '"'
- : ''
- ) + '>' + value.toString() +
'</div></td>'
+ $('<td><div class="wok-cell-text"' +
(field['makeTitle'] === true ? ' title="' + value + '"'
: '' ) + '>' + value.toString() + '</div></td>'
).appendTo(rowNode);
});
});
};
- var fixTableLayout = function(style) {
- $.each([
- this.frozenHeaderContainer,
- this.headerContainer,
- this.frozenBodyContainer,
- this.bodyContainer
- ], function(i, tableNode) {
- $(tableNode).css('table-layout', style || 'fixed');
- });
- };
-
- var initResizing = function(event) {
- var resizer = event.data.resizer;
- var pageX = event.pageX;
- var tailPos = $(this).width() + $(this).offset()['left'];
- var atResizer = Math.abs(pageX - tailPos) <= 2;
- var isResizing = !$(resizer).hasClass('hidden');
- $('body')[(atResizer || isResizing)
- ? 'addClass'
- : 'removeClass'
- ]('resizing');
- };
-
- var clearResizing = function(event) {
- $(event.data.resizer).hasClass('hidden') &&
- $('body').removeClass('resizing');
- };
-
var stylingRow = function(row, className, add) {
var index = $(row).index() + 1;
- $('tr', this.frozenBodyContainer)
- .removeClass(className);
$('tr', this.bodyContainer)
.removeClass(className);
@@ -182,19 +112,18 @@ wok.widget.Grid.prototype = (function() {
return;
}
- $('tr:nth-child(' + index + ')', this.frozenBodyContainer)
- .addClass(className);
$('tr:nth-child(' + index + ')', this.bodyContainer)
.addClass(className);
};
var setBodyListeners = function() {
- if(this['opts']['rowSelection'] != 'disabled') {
+ if(this['opts']['rowSelection'] !== 'disabled') {
$('tr', this.gridBody).on('mouseover', {
grid: this
}, function(event) {
- if (! $(this).hasClass('no-hover'))
+ if (! $(this).hasClass('no-hover')) {
stylingRow.call(event.data.grid, this, 'hover');
+ }
});
$('tr', this.gridBody).on('mouseout', {
@@ -213,128 +142,16 @@ wok.widget.Grid.prototype = (function() {
});
}
- $('.grid-body-view', this.domNode).on('scroll', {
- grid: this
- }, function(event) {
- var grid = event.data.grid;
- $('.grid-header .grid-header-view', grid.domNode)
- .prop('scrollLeft', this.scrollLeft);
- $('.grid-body .grid-frozen-body-view', grid.domNode)
- .prop('scrollTop', this.scrollTop);
- });
};
var setData = function(data) {
this.data = data;
- fillBody.call(this, this.frozenBodyContainer,
this['opts']['frozenFields']);
fillBody.call(this, this.bodyContainer, this['opts']['fields']);
setBodyListeners.call(this);
};
var getSelected = function() {
- return this.selectedIndex >= 0
- ? this.data[this.selectedIndex]
- : null;
- };
-
- var startResizing = function(container, event) {
- var grid = event.data.grid;
- wok.widget.Grid.beingResized = grid;
- if(!($('body').hasClass('resizing')
- && $(grid.resizer).hasClass('hidden'))) {
- return;
- }
-
- grid.columnBeingResized = container;
- var pageX = event.pageX;
- var gridOffsetX = grid.domNode.offset()['left'];
- var leftmostOffsetX = $(container).offset()['left'] - gridOffsetX;
- var left = pageX - gridOffsetX;
- var contentHeight = $('.grid-content', grid.domNode).height();
- $(grid.resizerLeftmost).css({
- left: leftmostOffsetX + 'px',
- height: contentHeight + 'px'
- });
- $(grid.resizer).css({
- left: left + 'px',
- height: contentHeight + 'px'
- });
- $(grid.resizerLeftmost).removeClass('hidden');
- $(grid.resizer).removeClass('hidden');
- event.preventDefault();
- };
-
- var endResizing = function(event) {
- var grid = wok.widget.Grid.beingResized;
- if(!$('body').hasClass('resizing')) {
- return;
- }
- $(grid.resizerLeftmost).addClass('hidden');
- $(grid.resizer).addClass('hidden');
- $('body').removeClass('resizing');
- var leftmostOffset = $(grid.columnBeingResized).offset()['left'];
- var left = event.pageX;
- if(leftmostOffset > left) {
- return;
- }
- resizeColumnWidth.call(
- grid,
- $(grid.columnBeingResized).index(),
- left - leftmostOffset
- );
- fixTableLayout.call(grid);
- grid.columnBeingResized = null;
- wok.widget.Grid.beingResized = null;
- };
-
- var resizeColumnWidth = function(index, width) {
- var width = Math.ceil(width);
- var widthArray = [];
- var totalWidth = 0;
- var header = this.headerContainer;
- var body = this.bodyContainer;
- if(this.containerBeingResized === CONTAINER_FROZEN) {
- header = this.frozenHeaderContainer;
- body = this.frozenBodyContainer;
- }
- $('col', header).each(function(i, colNode) {
- var w = index === i ? width : $(colNode).width();
- widthArray.push(w);
- totalWidth += w;
- });
- $.each([header, body], function(i, container) {
- container.css({
- 'table-layout': 'fixed',
- width: totalWidth + 'px'
- });
- $('col:nth-child(' + (index + 1) + ')', container).css({
- width: width + 'px'
- });
- });
-
- if(this.containerBeingResized === CONTAINER_FROZEN) {
- var headerView = $('.grid-header-view', this.domNode);
- var bodyView = $('.grid-body-view', this.domNode);
- $.each([headerView, bodyView], function(i, view) {
- view.css({
- left: totalWidth + 'px'
- });
- });
- }
- };
-
- var positionResizer = function(event) {
- var grid = event.data.grid;
- if($(grid.resizer).hasClass('hidden')) {
- return;
- }
-
- var pageX = event.pageX;
- var gridOffsetX = $(grid.domNode).offset()['left'];
- var leftMost = $(grid.resizerLeftmost).position()['left'];
- var offsetX = pageX - gridOffsetX;
- offsetX = offsetX >= leftMost ? offsetX : leftMost;
- $(grid.resizer).css('left', offsetX + 'px');
+ return this.selectedIndex >= 0 ? this.data[this.selectedIndex] : null;
};
var showMessage = function(msg) {
@@ -368,11 +185,6 @@ wok.widget.Grid.prototype = (function() {
}
};
- var destroy = function() {
- $('body').off('mousemove.grid#' +
this['opts']['id'], positionResizer);
- $('body').off('mouseup.grid#' +
this['opts']['id'], endResizing);
- };
-
var createDOM = function() {
var containerID = this['opts']['container'];
var container = $('#' + containerID);
@@ -387,118 +199,91 @@ wok.widget.Grid.prototype = (function() {
})).appendTo(container);
this.domNode = domNode;
+ var theTable = $('.wok-table', domNode);
+ var theContainer = $('.wok-grid-content', domNode);
+ var headerContainer = $('.wok-grid-header-container', domNode);
+ var bodyContainer = $('.wok-grid-body-container', domNode);
+ setupHeaders(headerContainer, bodyContainer,
this['opts']['fields']);
+ this.theTable = theTable;
+ this.theContainer = theContainer;
+ this.headerContainer = headerContainer;
+ this.bodyContainer = bodyContainer;
+
var height = domNode.height();
var width = domNode.width();
var title = this['opts']['title'];
var titleNode = null;
if(title) {
- titleNode = $('<div class="grid-caption">' + title +
'</div>')
- .prependTo(domNode);
+ titleNode = $('<caption class="sr-only">' + title +
'</caption>').prependTo(theTable);
}
var toolbarButtons = this['opts']['toolbarButtons'];
var toolbarNode = null;
+ var btnHTML, dropHTML = [];
if(toolbarButtons) {
- toolbarNode = $('<div
class="grid-toolbar"></div>');
- if(titleNode) {
- titleNode.after(toolbarNode);
- }
- else {
- toolbarNode.prependTo(domNode);
+ toolbarNode = $('<div
class="btn-group"></div>');
+ toolbarNode.prependTo(theContainer);
+ 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>',
+ '</button>',
+ '<ul class="dropdown-menu"></ul>',
+ '</div>'
+ ].join('');
+ $(dropHTML).appendTo(toolbarNode);
+ $.each(toolbarButtons, function(i, button) {
+ btnHTML = [
+ '<li role="presentation"', button.critical
=== true ? ' class="critical"' : '', '><a
data-toggle="modal"',
+ button.id ? (' id="' + button.id + '"')
: '',
+ ' class="', button.disabled === true ? '
disabled' : '', '">',
+ button.class ? ('<i class="' + button.class) +
'"></i>' : '',
+ button.label,
+ '</a></li>'
+ ].join('');
+ var btnNode =
$(btnHTML).appendTo(toolbarNode[0].children[0].children[1]);
+ button.onClick && btnNode.on('click',
button.onClick);
+ });
+ }else {
+ $.each(toolbarButtons, function(i, button) {
+ btnHTML = [
+ '<button data-dismiss="modal" ',
+ button['id'] ? (' id="' +
button['id'] + '"') : '',
+ ' class="btn btn-primary',
+ button['class'] ? (' ' +
button['class']) : '',
+ '"',
+ button['disabled'] === true ? ' disabled'
: '',
+ '>',
+ button['label'],
+ '</button>'
+ ].join('');
+ var btnNode = $(btnHTML).appendTo(toolbarNode);
+ button['onClick'] &&
+ btnNode.on('click', button['onClick']);
+ });
}
- $.each(toolbarButtons, function(i, button) {
- var btnHTML = [
- '<button',
- button['id'] ? (' id="' +
button['id'] + '"') : '',
- ' class="grid-toolbar-button',
- button['class'] ? (' ' +
button['class']) : '',
- '"',
- button['disabled'] === true ? ' disabled' :
'',
- '>',
- button['label'],
- '</button>'
- ].join('');
- var btnNode = $(btnHTML).appendTo(toolbarNode);
- button['onClick'] &&
- btnNode.on('click', button['onClick']);
- });
}
- var frozenHeaderContainer = $('.grid-frozen-header-container', domNode);
- var frozenBodyContainer = $('.grid-frozen-body-container', domNode);
- var frozenWidth = setupHeaders(
- frozenHeaderContainer,
- frozenBodyContainer,
- this['opts']['frozenFields']
- );
- this.frozenHeaderContainer = frozenHeaderContainer;
- this.frozenBodyContainer = frozenBodyContainer;
-
- var headerContainer = $('.grid-header-container', domNode);
- var bodyContainer = $('.grid-body-container', domNode);
- setupHeaders(headerContainer, bodyContainer,
this['opts']['fields']);
- this.headerContainer = headerContainer;
- this.bodyContainer = bodyContainer;
-
- fixTableLayout.call(this, 'auto');
+ // var domHeight = domNode && $(domNode).height() || 0;
+ // var toolbarHeight = toolbarNode && $(toolbarNode).height() || 0;
+ // var maskHeight = domHeight - toolbarHeight;
- var gridContentNode = $('.grid-content', domNode);
- var captionHeight = titleNode && $(titleNode).height() || 0;
- var toolbarHeight = toolbarNode && $(toolbarNode).height() || 0;
- gridContentNode.css('top', (captionHeight + toolbarHeight) +
'px');
+ // var maskContainer = $('.wok-grid-loader-container',domNode);
+ // maskContainer.css({'top': toolbarHeight+'px',
'height': maskHeight+'px'});
+ // this.maskContainer = maskContainer;
- var maskNode = $('.grid-mask', domNode);
- maskNode.css('top', captionHeight + 'px');
+ var maskNode = $('.wok-grid-mask', domNode);
this.maskNode = maskNode;
- var messageNode = $('.grid-message', domNode);
- messageNode.css('top', captionHeight + 'px');
+ var messageNode = $('.wok-grid-message', domNode);
this.messageNode = messageNode;
- var headerView = $('.grid-header-view', domNode);
- var bodyView = $('.grid-body-view', domNode);
- headerView.css('left', (frozenWidth) + 'px');
- bodyView.css('left', (frozenWidth) + 'px');
+ //fixTableLayout.call(this);
- var bodyWidth = width - frozenWidth;
- headerContainer.css('width', bodyWidth + 'px');
- bodyContainer.css('width', bodyWidth + 'px');
-
- fixTableLayout.call(this);
-
- var gridBody = $('.grid-body', domNode);
+ var gridBody = $('.wok-grid-body', domNode);
this.gridBody = gridBody;
- this.resizerLeftmost = $('.grid-resizer-leftmost', domNode);
- this.resizer = $('.grid-resizer', domNode);
- var gridHeader = $('.grid-header', domNode);
- $('th', gridHeader).on('mouseover mousemove', {
- resizer: this.resizer
- }, initResizing);
-
- $('th', gridHeader).on('mouseout', {
- resizer: this.resizer
- }, clearResizing);
-
- this.containerBeingResized = CONTAINER_NORMAL;
- $('th', frozenHeaderContainer).on('mousedown', {
- grid: this
- }, function(event) {
- event.data.grid.containerBeingResized = CONTAINER_FROZEN;
- startResizing(this, event);
- });
- $('th', headerContainer).on('mousedown', {
- grid: this
- }, function(event) {
- event.data.grid.containerBeingResized = CONTAINER_NORMAL;
- startResizing(this, event);
- });
-
- $('body').on('mousemove.grid#' +
this['opts']['id'], {
- grid: this
- }, positionResizer);
- $('body').on('mouseup.grid#' +
this['opts']['id'], endResizing);
var data = this['opts']['data'];
@@ -517,14 +302,13 @@ wok.widget.Grid.prototype = (function() {
onRowSelected: null,
title: null,
toolbarButtons: null,
- frozenFields: null,
fields: null
},
createDOM: createDOM,
setData: setData,
getSelected: getSelected,
reload: reload,
- destroy: destroy,
+ //destroy: destroy,
showMessage: showMessage
};
-})();
+})();
\ No newline at end of file
diff --git a/ui/js/src/wok.line-chart.js b/ui/js/src/wok.line-chart.js
index 3c740e6..3eb3494 100644
--- a/ui/js/src/wok.line-chart.js
+++ b/ui/js/src/wok.line-chart.js
@@ -18,13 +18,15 @@
* limitations under the License.
*/
-/**
+/*
* new wok.widget.LineChart({
* node: 'line-chart-cpu',
* id: 'line-chart',
* type: 'value'
* });
*/
+
+
wok.widget.LineChart = function(params) {
var container = $('#' + params['node']);
container.addClass('chart-container');
@@ -82,6 +84,14 @@ wok.widget.LineChart = function(params) {
}
});
}
+
+ var defs = [
+ '<defs>',
+ '<pattern id="patternbg" x="0" y="0"
width="6" height="6"
patternUnits="userSpaceOnUse">',
+ '<rect x="0" y="0" width="3"
height="6" style="stroke:none; fill: #eeeeee;"></rect>',
+ '</pattern>',
+ '</defs>'
+ ].join('');
var canvasNode = $('#' + canvasID);
canvasNode.length && canvasNode.remove();
@@ -89,25 +99,10 @@ wok.widget.LineChart = function(params) {
'<svg id="', canvasID, '"
class="line-chart"',
' height="', height, '" width="', width,
'"',
'>',
+ defs,
'<rect height="', height, '" width="',
width, '" class="background" />'
];
- for(var x = linesOffset; x < width; x += linesSpace) {
- htmlStr.push(
- '<line x1="', x, '" y1="', 0,
'" x2="', x, '" y2="', height, '" />'
- );
- }
-
- linesOffset -= xFactor;
- while(linesOffset < 0) {
- linesOffset = linesSpace + linesOffset;
- }
-
- for(var y = height - linesSpace; y > 0; y -= linesSpace) {
- htmlStr.push(
- '<line x1="', 0, '" y1="', y,
'" x2="', width, '" y2="', y, '" />'
- );
- }
var maxValueLabel = i18n['KCHHOST6001M'] + ' ' +
(type === 'value'
@@ -124,12 +119,34 @@ wok.widget.LineChart = function(params) {
chartVAxis.text(maxValueLabel);
}
+
seriesNames = [];
$.each(data, function(i, series) {
var points = series['points'];
var className = series['class'];
var latestPoint = points.slice(-1).pop();
xStart = latestPoint['x'] - period;
+ htmlStr.push('<path',
+ ' class="series', className ? ' ' + className :
'', '"',
+ ' d="M 0,92 '
+ );
+ var first = true;
+ $.each(points, function(i, point) {
+ if(first) {
+ first = false;
+ }
+ else {
+ htmlStr.push(' ');
+ }
+
+ var x = xFactor * (point['x'] - xStart);
+ var y = height - yFactor * (type === 'value' ?
+ point['y'] * 100 / maxValue :
+ point['y']
+ );
+ htmlStr.push(x, ',', y);
+ });
+ htmlStr.push(' 310,92z" />');
htmlStr.push('<polyline',
' class="series', className ? ' ' + className :
'', '"',
@@ -152,6 +169,7 @@ wok.widget.LineChart = function(params) {
htmlStr.push(x, ',', y);
});
htmlStr.push('" />');
+
});
htmlStr.push('</svg>');
@@ -160,7 +178,7 @@ wok.widget.LineChart = function(params) {
if(!chartLegend) {
chartLegend = $('<div
class="chart-legend-container"></div>');
- container.after(chartLegend);
+ container.before(chartLegend);
}
else {
chartLegend.empty();
@@ -169,18 +187,15 @@ wok.widget.LineChart = function(params) {
var wrapper = $('<div
class="legend-wrapper"></div>')
.appendTo(chartLegend);
$([
- '<svg class="legend-icon" width="20"
height="10">',
- '<line x1="0" y1="5" x2="20"
y2="5"/>',
+ '<svg class="legend-icon" width="5"
height="40">',
+ '<rect width="5" height="40" />',
'</svg>'
].join('')).appendTo(wrapper);
- $('line', wrapper).css({
- stroke: $(polyline).css('stroke'),
- 'stroke-width': $(polyline).css('stroke-width')
+ $('rect', wrapper).css({
+ fill: $(polyline).css('stroke')
});
var label = data[i]['legend'];
var base = data[i]['base'];
- $('<label class="legend-label">' + label +
'</label>')
- .appendTo(wrapper);
var latestPoint = data[i]['points'].slice(-1).pop();
var latestValue = latestPoint['y'];
if(type === 'value') {
@@ -189,11 +204,12 @@ wok.widget.LineChart = function(params) {
formatSettings
);
}
- else {
- latestValue += '%';
+ else {
+ latestValue = { v: latestValue, s: '%' };
}
- $('<div class="latest-value">' + latestValue +
'</div>')
- .appendTo(wrapper);
+ $('<div class="latest-value"><span
class="number">' + latestValue.v +
'</span></div>').appendTo(wrapper);
+ $('<span class="legend-label">'+ latestValue.s
+'</span><span class="legend-string">'+ label +
'</span>').appendTo(wrapper[0].children[1]);
+
});
};
diff --git a/ui/js/src/wok.list.js b/ui/js/src/wok.list.js
new file mode 100644
index 0000000..455150d
--- /dev/null
+++ b/ui/js/src/wok.list.js
@@ -0,0 +1,302 @@
+/*
+ * Project Wok
+ *
+ * Copyright IBM, Corp. 2013-2015
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+wok.widget.List = function(opts) {
+ "use strict";
+ this.opts = $.extend({}, this.opts, opts);
+ this.createDOM();
+ this.reload();
+};
+
+wok.widget.List.prototype = (function() {
+ "use strict";
+ var htmlStr = [
+ '<div id="{id}-section" class="panel
panel-default">',
+ '<div class="panel-heading">',
+ '</div>',
+ '<div id="content-{id}"
class="panel-body">',
+ '<div id="{id}-container">',
+ '<div class="wok-list-message clearfix
hidden">',
+ '<div class="alert alert-danger fade in"
role="alert">',
+ '<p><strong>{message}</strong> ',
+ '<span
class="detailed-text"></span></p>',
+ '<p><button class="btn btn-primary btn-xs
retry-button">',
+ '{buttonLabel}',
+ '</button></p>',
+ '</div>',
+ '</div>',
+ '<div id="{id}-btn-group" class="btn-group
wok-single-button hidden">',
+
+ '</div>',
+ '<div id="{id}" class="row
clearfix">',
+ '<div class="wok-list-content">',
+ '<table class="wok-list-table table
table-striped" id="list">',
+ '</table>',
+ '</div>',
+ '</div>',
+ '<div class="wok-list-mask hidden">',
+ '<div
class="wok-list-loader-container">',
+ '<div class="wok-list-loading">',
+ '<div
class="wok-list-loading-icon"></div>',
+ '<div
class="wok-list-loading-text">',
+ '{loading}',
+ '</div>',
+ '</div>',
+ '</div>',
+ '</div>',
+ '</div>',
+ '</div>',
+ '</div>'
+ ].join('');
+
+ var getValue = function(name, obj) {
+ var result;
+ if (!Array.isArray(name)) {
+ name = name.parseKey();
+ }
+ if (name.length !== 0) {
+ var tmpName = name.shift();
+ if (obj[tmpName] !== undefined) {
+ result = obj[tmpName];
+ }
+ if (name.length !== 0) {
+ result = getValue(name, obj[tmpName]);
+ }
+ }
+ return (result);
+ };
+
+
+ var fillButton = function(btnContainer){
+ var addOrGenerateBtn = this.opts.toolbarButtons[0];
+ var singleBtnHTML = [
+ '<a class="btn btn-primary" href="#"',
(addOrGenerateBtn.id ? (' id="' + addOrGenerateBtn.id + '"') :
''),' role="button">',
+ addOrGenerateBtn.class ? ('<i class="' +
addOrGenerateBtn.class) + '"></i> ' : '',
+ addOrGenerateBtn.label,
+ '</a>'
+ ].join('');
+ var singleBtn = $(singleBtnHTML).appendTo(btnContainer);
+ $(singleBtn).click(function(e) {
+ e.preventDefault();
+ });
+ addOrGenerateBtn.onClick && singleBtn.on('click',
addOrGenerateBtn.onClick);
+ };
+
+ var fillBody = function(container, fields) {
+
+ var toolbarButtons = this.opts.toolbarButtons;
+ var actionDropdownHtml;
+ var data = this.data;
+ var tbody = ($('tbody', container).length && $('tbody',
container)) || $('<tbody></tbody>').appendTo(container);
+ tbody.empty();
+ if (typeof data !== 'undefined' && data.length > 0) {
+ $.each(data, function(i, row) {
+ var rowNode = $('<tr></tr>').appendTo(tbody);
+ var columnNodeHTML;
+ var columnData = '';
+ var state = '';
+ var styleClass = '';
+ if (toolbarButtons) {
+ actionDropdownHtml = [
+ '<td>',
+ '<div class="dropdown menu-flat">',
+ '<button id="wok-dropdown-button-', i,
'" class="btn btn-primary dropdown-toggle" type="button"
data-toggle="dropdown">',
+ '<span
class="edit-alt"></span>Actions<span
class="caret"></span>',
+ '</button>',
+ '<ul class="dropdown-menu"
role="menu" aria-labelledby="action-dropdown-menu-', i,
'">',
+ '</ul>',
+ '</div>',
+ '</td>'
+ ].join('');
+ }
+ $.each(fields, function(fi, field) {
+ var value = getValue(field.name, row);
+ if (field.type === 'status' && field.name ===
'enabled') {
+ styleClass = (value === true ? '' : '
disabled');
+ state = [
+ '<span class="wok-repository-status ',
+ value === true ? 'enabled' : 'disabled',
+ '"><i class="fa
fa-power-off"></i></span>'
+ ].join('');
+ }
+ columnData += (field.type === 'name') ? ('<span
class="wok-list-name">' + value.toString() + '</span>') :
(field.type !== 'status' ? '<span
class="wok-list-loading-icon-inline"></span><span
class="wok-list-description">' + value.toString() +
'</span>' : '');
+
+ });
+ columnNodeHTML = [
+ '<td>',
+ '<div class="wok-list-cell', styleClass,
'">', state,
+ columnData,
+ '</div>',
+ '</td>'
+ ].join('');
+ $(columnNodeHTML).appendTo(rowNode);
+
+ var actionMenuNode = $(actionDropdownHtml).appendTo(rowNode);
+
+ $.each(toolbarButtons, function(i, button) {
+ var btnHTML = [
+ '<li role="presentation"', button.critical
=== true ? ' class="critical"' : '', '>',
+ '<a role="menuitem" tabindex="-1"
data-dismiss="modal"', (button.id ? (' id="' + button.id +
'"') : ''), (button.disabled === true ? '
class="disabled"' : ''),
+ '>',
+ button.class ? ('<i class="' + button.class) +
'"></i>' : '',
+ button.label,
+ '</a></li>'
+ ].join('');
+ var btnNode = $(btnHTML).appendTo($('.dropdown-menu',
rowNode));
+ button.onClick && btnNode.on('click',
button.onClick);
+ });
+ });
+ }
+ };
+
+ var stylingRow = function(row, className, add) {
+ var index = $(row).index() + 1;
+ $('tr', this.bodyContainer)
+ .removeClass(className);
+ if (add === false) {
+ return;
+ }
+ $('tr:nth-child(' + index + ')', this.bodyContainer)
+ .addClass(className);
+ };
+
+ var setBodyListeners = function() {
+ if (this['opts']['rowSelection'] != 'disabled') {
+
+ $('tr', this.bodyContainer).on('click', {
+ grid: this
+ }, function(event) {
+ var grid = event.data.grid;
+ if (!$(this).hasClass('generating')) {
+ grid.selectedIndex = $(this).index();
+ stylingRow.call(grid, this, 'selected');
+ grid['opts']['onRowSelected'] &&
grid['opts']['onRowSelected']();
+ }
+ });
+ }
+ };
+
+ var setData = function(data) {
+ this.data = data;
+ fillBody.call(this, this.bodyContainer, this.opts.fields);
+ setBodyListeners.call(this);
+ };
+
+ var getSelected = function() {
+ return this.selectedIndex >= 0 ? this.data[this.selectedIndex] : null;
+ };
+
+ var showMessage = function(msg) {
+ $('.detailed-text', this.messageNode).text(msg);
+ $(this.messageNode).removeClass('hidden');
+ };
+
+ var hideMessage = function() {
+ $(this.messageNode).addClass('hidden');
+ };
+
+ var reload = function() {
+ var data = this.opts.data;
+ if (!data) {
+ return;
+ }
+
+ if ($.isArray(data)) {
+ return this.setData(data);
+ }
+
+ if ($.isFunction(data)) {
+ var loadData = data;
+ $(this.maskNode).removeClass('hidden');
+ loadData($.proxy(function(data) {
+ this.setData(data);
+ $(this.maskNode).addClass('hidden');
+ }, this));
+ }
+ };
+
+ var createDOM = function() {
+ var containerID = this.opts.container;
+ var container = $('#' + containerID);
+ var gridID = this.opts.id;
+ var data = this.opts.data;
+ var rowSelection = this.opts.rowSelection || 'single';
+ var domNode = $(wok.substitute(htmlStr, {
+ id: gridID,
+ loading: i18n.KCHGRD6001M,
+ message: i18n.KCHGRD6002M,
+ buttonLabel: i18n.KCHGRD6003M,
+ detailedLabel: i18n.KCHGRD6004
+ })).appendTo(container);
+ this.domNode = domNode;
+
+
+ var titleContainer = $('.panel-heading', domNode);
+ this.titleContainer = titleContainer;
+
+ var title = this.opts.title;
+ var titleNode = null;
+
+ if (title) {
+ titleNode = $('<h3 class="panel-title">' + title +
'</h3>').appendTo(titleContainer);
+ }
+
+ var bodyContainer = $('.wok-list-table.table.table-striped', domNode);
+ this.bodyContainer = bodyContainer;
+
+ var singleButtonContainer = $('.wok-single-button', domNode);
+ this.singleButtonContainer = singleButtonContainer;
+
+ var gridBody = $('.wok-list-content', domNode);
+ this.gridBody = gridBody;
+
+ var maskNode = $('.wok-list-mask', domNode);
+ this.maskNode = maskNode;
+
+ var messageNode = $('.wok-list-message', domNode);
+ this.messageNode = messageNode;
+
+
+ fillButton.call(this,this.singleButtonContainer);
+
+ $('.retry-button', domNode).on('click', {
+ grid: this
+ }, function(event) {
+ event.data.grid.reload();
+ });
+
+
+ };
+
+ return {
+ opts: {
+ container: null,
+ id: null,
+ rowSelection: 'single',
+ onRowSelected: null,
+ title: null,
+ toolbarButtons: null,
+ frozenFields: null,
+ fields: null
+ },
+ createDOM: createDOM,
+ setData: setData,
+ getSelected: getSelected,
+ reload: reload,
+ showMessage: showMessage
+ };
+})();
diff --git a/ui/js/src/wok.login.js b/ui/js/src/wok.login.js
index d9ccae6..13a1da0 100644
--- a/ui/js/src/wok.login.js
+++ b/ui/js/src/wok.login.js
@@ -18,9 +18,12 @@
* limitations under the License.
*/
wok.login_main = function() {
-
+ "use strict";
var selectedLanguage = wok.lang.get();
$('#userLang').val(selectedLanguage);
+ $('#userLang
option[value="'+selectedLanguage+'"]').attr("selected",
"selected");
+
$('#userLang').next().find('.selectpicker').attr('title',$('#userLang
option[value="'+selectedLanguage+'"]').text());
+
$('#userLang').next().children().find('.filter-option').text($('#userLang
option[value="'+selectedLanguage+'"]').text());
$('#userLang').on('change', function() {
wok.lang.set($(this).val());
@@ -29,7 +32,7 @@ wok.login_main = function() {
var query = window.location.search;
var error = /.*error=(.*?)(&|$)/g.exec(query);
- if (error && error[1] == "sessionTimeout") {
+ if (error && error[1] === "sessionTimeout") {
$("#messSession").show();
}
@@ -59,7 +62,7 @@ wok.login_main = function() {
var next_url = lastPage ? lastPage.replace(/\"/g,'') :
"/";
}
wok.cookie.set('roles',JSON.stringify(data.roles));
- window.location.replace(window.location.pathname.replace(/\/+login.html/,
'') + next_url)
+ window.location.replace(window.location.pathname.replace(/\/+login.html/,
'') + next_url);
}, function() {
$("#messUserPass").show();
$("#messSession").hide();
diff --git a/ui/js/src/wok.main.js b/ui/js/src/wok.main.js
index 25fed31..af8695b 100644
--- a/ui/js/src/wok.main.js
+++ b/ui/js/src/wok.main.js
@@ -27,6 +27,7 @@ wok.main = function() {
var tabsHtml = [];
$(tabs).each(function(i, tab) {
var title = tab['title'];
+ var cssClass = tab['css'];
var path = tab['path'];
var mode = tab['mode'];
if (mode != 'none') {
@@ -34,10 +35,10 @@ wok.main = function() {
var disableHelp = (helpPath.length == 0 ? "disableHelp" :
helpPath);
tabsHtml.push(
'<li>',
- '<a class="item ', disableHelp,'"
href="', path, '">',
+ '<a class="item ', disableHelp,'
',cssClass,'" href="', path, '">',
title,
'</a>',
- '<input id="helpPathId"
name="helpPath" value="' + helpPath + '"
type="hidden"/>',
+ '<input id="helpPathId"
name="helpPath" class="sr-only" value="' + helpPath +
'" type="hidden"/>',
'</li>'
);
}
@@ -51,6 +52,7 @@ wok.main = function() {
var $tab = $(this);
var titleKey = $tab.find('title').text();
var title = i18n[titleKey] ? i18n[titleKey] : titleKey;
+ var css = $tab.find('class').text();
var path = $tab.find('path').text();
var roles = wok.cookie.get('roles');
if (roles) {
@@ -60,6 +62,7 @@ wok.main = function() {
tabs.push({
title: title,
path: path,
+ css: css,
mode: mode
});
} else {
@@ -113,7 +116,8 @@ wok.main = function() {
DEFAULT_HASH = defaultTabPath &&
defaultTabPath.substring(0, defaultTabPath.lastIndexOf('.'))
}
- $('#nav-menu').append(genTabs(tabs));
+ $('#nav-menu ul.navbar-nav li.hostname').after(genTabs(tabs));
+ wok.getHostname();
callback && callback();
}, function(data) {
@@ -142,7 +146,7 @@ wok.main = function() {
* point to the tab. If nothing found, inform user the URL is invalid
* and clear location.hash to jump to home page.
*/
- var tab = $('#nav-menu a[href="' + url + '"]');
+ var tab = $('#nav-menu ul li a[href="' + url + '"]');
if (tab.length === 0 && url!='wok-empty.html') {
location.hash = '';
return;
@@ -150,20 +154,14 @@ wok.main = function() {
//Remove the tab arrow indicator for no plugin
if(url=='wok-empty.html'){
- $('.menu-arrow').hide();
$('#main').html('No plugins installed currently.You can download
the available plugins <a
href="https://github.com/kimchi-project/kimchi">Kimchi</a... and <a
href="https://github.com/kimchi-project/ginger">Ginger</a... from
Github').addClass('noPluginMessage');
}else{
- // Animate arrow indicator.
- var left = $(tab).parent().position().left;
- var width = $(tab).parent().width();
- $('.menu-arrow').stop().animate({
- left : left + width / 2 - 10
- });
-
+
// Update the visual style of tabs; focus the selected one.
- $('#nav-menu a').removeClass('current');
- $(tab).addClass('current');
+ $('#nav-menu ul li').removeClass('active');
+ $(tab).parent().addClass('active');
$(tab).focus();
+
// Disable Help button according to selected tab
if ($(tab).hasClass("disableHelp")) {
$('#btn-help').css('cursor', "not-allowed");
@@ -240,7 +238,7 @@ wok.main = function() {
* Register click listener of tabs. Replace the default reloading page
* behavior of <a> with Ajax loading.
*/
- $('#nav-menu').on('click', 'a.item', function(event) {
+ $('#nav-menu ul li').on('click', 'a.item',
function(event) {
var href = $(this).attr('href');
// Remove file extension from 'href'
location.hash = href.substring(0,href.lastIndexOf('.'))
@@ -279,7 +277,7 @@ wok.main = function() {
$('#peers').on('click', function() {
// Check if any request is in progress
- if ($('.popover', '#peers').is(':visible') ||
searchingPeers == true)
+ if ($('.dropdown', '#peers').is('.open') ||
searchingPeers == true)
return
$('#search-peers').show();
@@ -294,7 +292,7 @@ wok.main = function() {
$('#no-peers').removeClass('hide-content');
for(var i=0; i<data.length; i++){
- $('.dropdown', '#peers').append("<a
href='"+data[i]+"'
target='_blank'>"+data[i]+"</a>");
+ $('.dropdown-menu ',
'#peers').append("<li><a href='"+data[i]+"'
target='_blank'>"+data[i]+"</a></li>");
}
searchingPeers = false;
});
@@ -361,6 +359,11 @@ wok.checkHelpFile = function(path) {
return url;
};
+wok.getHostname = function(e) {
+ host = window.location.hostname;
+ $('span.host-location').text(host);
+ return host;
+}
wok.openHelp = function(e) {
var tab = $('#nav-menu a.current');
diff --git a/ui/js/src/wok.message.js b/ui/js/src/wok.message.js
index bd650e0..1947970 100644
--- a/ui/js/src/wok.message.js
+++ b/ui/js/src/wok.message.js
@@ -18,101 +18,47 @@
* limitations under the License.
*/
wok.message = function(msg, level, node) {
- var container = node || $('#messageField');
+ "use strict";
+ var container = node || $('#alert-fields');
if ($(container).size() < 1) {
- container = $('<div
id="messageField"/>').appendTo(document.body);
+ container = $('<div
id="alert-fields"/>').appendTo($('#alert-container'));
}
- var message = '<div class="message ' + (level || '') +
'" style="display: none;">';
+ var message = '<div role="alert" class="alert ' + (level ||
'') + ' alert-dismissible fade in" style="display:
none;">';
if(!node) {
- message += '<div class="close">X</div>';
+ message += '<button type="button" class="close"
data-dismiss="alert" aria-label="Close"><span
aria-hidden="true"><i class="fa
fa-times-circle"></i></span></button>';
}
- message += '<div class="content">' + msg +
'</div>';
+ message += msg;
message += '</div>';
var $message = $(message);
$(container).append($message);
+ $message.alert();
$message.fadeIn(100);
setTimeout(function() {
$message.fadeOut(2000, function() {
+ $message.alert('close');
$(this).remove();
+ $(container).remove();
+ if ($(container).children().length < 1) {
+ $(container).remove();
+ }
});
}, 4000);
-
- $(container).on("click", ".close", function(e) {
- $(this).parent().fadeOut(200, function() {
- $(this).remove();
- });
- });
-};
-
-/**
- * A public function of confirm box.
- *
- * @param msg
- * type:[object]
- * @param msg.title
- * The title of the confirm box.
- * @param msg.content
- * The main text of the confirm box.
- * @param msg.confirm
- * The text of the confirm button.
- * @param msg.cancel
- * the text of the cancel button.
- * @param confirmCallback
- * the callback function of click the confirm button.
- * @param cancelCallback
- * The callback function of click the cancel and X button.
- */
-wok.confirm = function(settings, confirmCallback, cancelCallback) {
- if ($('#confirmbox-container ').size() < 1) {
- $(document.body).append('<div id="confirmbox-container"
class="bgmask"></div>');
- }
- var confirmboxHtml = '<div class="confirmbox">';
- confirmboxHtml += '<header>';
- confirmboxHtml += '<h4 class="title">' + (settings.title ||
'') + '</h4>';
- confirmboxHtml += '<div class="close cancel">X</div>';
- confirmboxHtml += '</header>';
- confirmboxHtml += '<div class="content">';
- confirmboxHtml += settings.content + '</div>';
- confirmboxHtml += '<footer>';
- confirmboxHtml += '<div class="btn-group">';
- confirmboxHtml += '<button id="button-confirm"
class="btn-small"><span class="text">' +
(settings.confirm || i18n['KCHAPI6004M']) +
'</span></button>';
- confirmboxHtml += '<button id="button-cancel" class="btn-small
cancel"><span class="text">' + (settings.cancel ||
i18n['KCHAPI6003M']) + '</span></button>';
- confirmboxHtml += '</div>';
- confirmboxHtml += '</footer>';
- confirmboxHtml += '</div>';
- var confirmboxNode = $(confirmboxHtml);
- $('#confirmbox-container').append(confirmboxNode);
- confirmboxNode.fadeIn();
-
- $('#confirmbox-container').on("click", "#button-confirm",
function(e) {
- if (confirmCallback) {
- confirmCallback();
- }
- confirmboxNode.fadeOut(1, function() {
- $('#confirmbox-container').remove();
- });
- });
- $('#confirmbox-container').on("click", ".cancel",
function(e) {
- if (cancelCallback) {
- cancelCallback();
- }
- confirmboxNode.fadeOut(1, function() {
- $('#confirmbox-container').remove();
- });
- });
};
-
wok.message.warn = function(msg, node) {
- wok.message(msg, 'warn', node);
+ "use strict";
+ wok.message(msg, 'alert-warning', node);
};
wok.message.error = function(msg, node) {
- wok.message(msg, 'error', node);
+ "use strict";
+ wok.message(msg, 'alert-danger', node);
};
wok.message.error.code = function(code) {
- msg = code + ": " + i18n[code]
- wok.message(msg, 'error');
+ "use strict";
+ msg = code + ": " + i18n[code];
+ wok.message(msg, 'alert-danger');
};
wok.message.success = function(msg, node) {
- wok.message(msg, 'success', node);
+ "use strict";
+ wok.message(msg, 'alert-success', node);
};
diff --git a/ui/js/src/wok.window.js b/ui/js/src/wok.window.js
index ef00a77..2c2a440 100644
--- a/ui/js/src/wok.window.js
+++ b/ui/js/src/wok.window.js
@@ -17,11 +17,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-wok.window = (function() {
+ wok.window = (function() {
+ "use strict";
var _windows = [];
var _listeners = {};
var open = function(settings) {
- var settings = jQuery.type(settings) === 'object' ? settings : {
+ settings = jQuery.type(settings) === 'object' ? settings : {
url: settings
};
@@ -33,14 +34,15 @@ wok.window = (function() {
_windows.push(windowID);
_listeners[windowID] = settings['close'];
- var windowNode = $('<div></div>', {
- id: windowID,
- 'class': settings['class'] ? settings['class'] +
' bgmask remove-when-logged-off' : 'bgmask remove-when-logged-off'
- });
+ var windowNode = $('<div id="'+windowID+'"
class="modal-dialog"></div>');
+
+ $('#modalWindow').modal('show');
- $(windowNode).css(settings['style'] || '');
+ $('#modalWindow').on('hidden.bs.modal', function () {
+ wok.window.close();
+ });
- $(windowNode).appendTo('body').on('click', '.window
.close', function() {
+ $(windowNode).appendTo('#modalWindow').on('click', '.window
.close', function() {
wok.window.close();
});
@@ -53,20 +55,18 @@ wok.window = (function() {
};
var close = function() {
- var windowID = _windows.pop();
- if(_listeners[windowID]) {
- _listeners[windowID]();
- _listeners[windowID] = null;
- }
- delete _listeners[windowID];
-
- $('#' + windowID).fadeOut(100, function() {
- $(this).remove();
- });
+ $('#modalWindow').removeData('bs.modal');
+ var windowID = _windows.pop();
+ if(_listeners[windowID]) {
+ _listeners[windowID]();
+ _listeners[windowID] = null;
+ }
+ delete _listeners[windowID];
+ $('#' + windowID).remove();
};
return {
open: open,
close: close
};
-})();
+})();
\ No newline at end of file
diff --git a/ui/pages/login.html.tmpl b/ui/pages/login.html.tmpl
index 2703d02..f2d5acb 100644
--- a/ui/pages/login.html.tmpl
+++ b/ui/pages/login.html.tmpl
@@ -28,95 +28,109 @@
<!DOCTYPE html>
<html lang="$lang.lang[0]">
<head>
-<meta charset="UTF-8">
-<title>Kimchi</title>
-<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
-<meta name="viewport" content="width=device-width, initial-scale=1.0,
user-scalable=yes" />
-<meta name="apple-mobile-web-app-capable" content="yes">
-<meta name="apple-mobile-web-app-title" content="Wok">
-<link href="images/apple-touch-icon-152.png" sizes="152x152"
rel="apple-touch-icon-precomposed">
-<link href="images/apple-touch-icon-144.png" sizes="144x144"
rel="apple-touch-icon-precomposed">
-<link href="images/apple-touch-icon-76.png" sizes="76x76"
rel="apple-touch-icon-precomposed">
-<link href="images/apple-touch-icon-72.png" sizes="72x72"
rel="apple-touch-icon-precomposed">
-<link href="images/apple-touch-icon-180x180.png" sizes="120x120"
rel="apple-touch-icon-precomposed">
-<link href="images/apple-touch-icon-114x114.png" sizes="114x114"
rel="apple-touch-icon-precomposed">
-<link href="images/apple-touch-icon-57x57.png" sizes="57x57"
rel="apple-touch-icon-precomposed">
-<link rel="icon" type="image/png"
href="images/android-chrome-192x192.png" sizes="192x192">
-<!--[if IE lte 9]><link rel="shortcut icon"
href="images/favicon.ico"><![endif]-->
-<link rel="shortcut icon" href="images/favicon.png">
-<meta name="application-name" content="Wok">
-<meta name="msapplication-config" content="none" />
-<meta name="msapplication-TileColor" content="#4f4f4f"/>
-<meta name="msapplication-square70x70logo"
content="images/tiny.png"/>
-<meta name="msapplication-square150x150logo"
content="images/square.png"/>
-<meta name="msapplication-wide310x150logo"
content="images/wide.png"/>
-<meta name="msapplication-square310x310logo"
content="images/large.png"/>
-<link rel="stylesheet"
href="$href('libs/jquery-ui/themes/base/jquery-ui.min.css')">
-<link rel="stylesheet"
href="$href('css/jquery-ui.custom.css')">
-<link rel="stylesheet"
href="$href('css/theme-default.min.css')">
-<script src="$href('libs/jquery/jquery.min.js')"></script>
-<script
src="$href('libs/jquery-ui/jquery-ui.min.js')"></script>
-<script
src="$href('libs/jquery-ui/jquery-ui-i18n.min.js')"></script>
-<script src="$href('js/wok.min.js')"></script>
-<style type="text/css">
-.topbar select {
- float: right;
- margin-top: 12px;
- margin-right: 10px;
-}
-.login-area {
- margin: 120px auto 0;
-}
-#login-window {
- width: 315px;
-}
-.err-area {
- height: auto;
- margin-bottom: 10px;
-}
-.err-mess {
- color: #C85305;
-}
-</style>
+ <meta charset="UTF-8">
+ <title>Kimchi</title>
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+ <meta name="viewport" content="width=device-width,
initial-scale=1.0, user-scalable=yes" />
+ <meta name="apple-mobile-web-app-capable" content="yes">
+ <meta name="apple-mobile-web-app-title" content="Wok">
+ <link href="images/apple-touch-icon-152.png" sizes="152x152"
rel="apple-touch-icon-precomposed">
+ <link href="images/apple-touch-icon-144.png" sizes="144x144"
rel="apple-touch-icon-precomposed">
+ <link href="images/apple-touch-icon-76.png" sizes="76x76"
rel="apple-touch-icon-precomposed">
+ <link href="images/apple-touch-icon-72.png" sizes="72x72"
rel="apple-touch-icon-precomposed">
+ <link href="images/apple-touch-icon-180x180.png"
sizes="120x120" rel="apple-touch-icon-precomposed">
+ <link href="images/apple-touch-icon-114x114.png"
sizes="114x114" rel="apple-touch-icon-precomposed">
+ <link href="images/apple-touch-icon-57x57.png" sizes="57x57"
rel="apple-touch-icon-precomposed">
+ <link rel="icon" type="image/png"
href="images/android-chrome-192x192.png" sizes="192x192">
+ <!--[if IE lte 9]><link rel="shortcut icon"
href="images/favicon.ico"><![endif]-->
+ <link rel="shortcut icon" href="images/favicon.png">
+ <meta name="application-name" content="Wok">
+ <meta name="msapplication-config" content="none" />
+ <meta name="msapplication-TileColor" content="#4f4f4f" />
+ <meta name="msapplication-square70x70logo"
content="images/tiny.png" />
+ <meta name="msapplication-square150x150logo"
content="images/square.png" />
+ <meta name="msapplication-wide310x150logo"
content="images/wide.png" />
+ <meta name="msapplication-square310x310logo"
content="images/large.png" />
+ <link rel="stylesheet"
href="$href('libs/jquery-ui/themes/base/jquery-ui.min.css')">
+ <link rel="stylesheet"
href="$href('css/jquery-ui.custom.css')">
+ <link rel="stylesheet"
href="$href('css/bootstrap.custom.css')">
+ <link rel="stylesheet"
href="$href('libs/bootstrap-select/dist/css/bootstrap-select.min.css')">
+ <link rel="stylesheet"
href="$href('css/fontawesome/fontawesome.css')">
+ <link rel="stylesheet"
href="$href('css/opensans/opensans.css')">
+ <link rel="stylesheet"
href="$href('css/bootstrap-select.custom.css')">
+ <link rel="stylesheet"
href="$href('css/wok.css')">
+ <script
src="$href('libs/es5-shim/es5-shim.min.js')"></script>
+ <script
src="$href('libs/jquery/jquery.min.js')"></script>
+ <script
src="$href('libs/jquery-ui/jquery-ui.min.js')"></script>
+ <script
src="$href('libs/jquery-ui/jquery-ui-i18n.min.js')"></script>
+ <script
src="$href('libs/jquery-i18n/jquery.i18n.min.js')"></script>
+ <script
src="$href('libs/bootstrap/bootstrap.min.js')"></script>
+ <script
src="$href('libs/bootstrap-select/dist/js/bootstrap-select.min.js')"></script>
+ <script src="$href('js/wok.min.js')"></script>
</head>
<body onload="wok.login_main()">
-<div class="container topbar">
- <span id="logo"><img alt="Project Wok"
src="images/theme-default/logo-white.png"></span>
- <select id="userLang">
- <option value="en_US">English (US)</option>
- <option value="zh_CN">中文(简体)</option>
- <option value="pt_BR">Português (Brasil)</option>
- <option value="de_DE">Deutsch (Deutschland)</option>
- <option value="es_ES">Español (España)</option>
- <option value="fr_FR">Français (France)</option>
- <option value="it_IT">Italiano (Italia)</option>
- <option value="ja_JP">日本語 (日本)</option>
- <option value="ko_KR">한국어 (대한민국)</option>
- <option value="ru_RU">Русский (Россия)</option>
- <option value="zh_TW">中文(繁體)</option>
- </select>
-</div>
-<div id="login-window" class="login-area">
- <div class="err-area">
- <div id="messUserPass" class="err-mess"
style="display: none;">$_("The username or password you entered is
incorrect. Please try again.")</div>
- <div id="messSession" class="err-mess"
style="display: none;">$_("Session timeout, please
re-login.")</div>
+ <div class="topbar">
+ <nav class="navbar navbar-inverse">
+ <div class="container">
+ <div class="navbar-header">
+ <a class="navbar-brand"
href="#">Kimchi</a>
+ </div>
+ </div>
+ </nav>
+ <nav class="navbar navbar-default">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle
collapsed" data-toggle="collapse" data-target="#nav-menu"
aria-expanded="false">
+ <span class="sr-only">Toggle
navigation</span>
+ <span class="icon-bar"><!-- Hamburguer button
here --></span>
+ </button>
+ </div>
+ <div class="collapse navbar-collapse"
id="nav-menu">
+ <ul class="nav navbar-nav">
+ <li class="hostname"><span
class="host-location"></span></li>
+ </ul>
+ </div>
+ </div>
+ </nav>
</div>
- <form id="form-login" class="login-panel"
method="post">
- <div class="row">
- <input type="text" id="username"
name="username" required="required" placeholder="$_("User
Name")" autofocus/>
- <div id="username-msg"
class="msg-required"></div>
+ <div class="content">
+ <div id="login-window" class="login-area">
+ <div class="err-area">
+ <div id="messUserPass" class="alert alert-danger"
style="display: none;">$_("The username or password you entered is
incorrect. Please try again.")</div>
+ <div id="messSession" class="alert alert-danger"
style="display: none;">$_("Session timeout, please
re-login.")</div>
+ </div>
+ <form id="form-login" class="form-horizontal"
method="post" autocomplete="off">
+ <div class="form-group">
+ <label for="username"
class="sr-only">$_("User Name")</label>
+ <input type="text" class="form-control"
id="username" name="username" required="required"
placeholder="$_(" User Name ")" autofocus/>
+ <div id="username-msg"
class="msg-required"></div>
+ </div>
+ <div class="form-group">
+ <label for="password"
class="sr-only">$_("Password")</label>
+ <input type="password" class="form-control"
id="password" name="password" required="required"
placeholder="$_(" Password ")" />
+ <div id="password-msg"
class="msg-required"></div>
+ </div>
+ <div class="form-group">
+ <button id="btn-login" class="btn btn-login
col-md-12 col-lg-12">
+ <span id="login">$_("Log
in")</span>
+ <span id="logging" style="display:
none;">$_("Logging in...")</span>
+ </button>
+ </div>
+ <select id="userLang" class="selectpicker col-md-12
col-lg-12">
+ <option value="en_US">English (US)</option>
+ <option value="zh_CN">中文(简体)</option>
+ <option value="pt_BR">Português
(Brasil)</option>
+ <option value="de_DE">Deutsch
(Deutschland)</option>
+ <option value="es_ES">Español
(España)</option>
+ <option value="fr_FR">Français
(France)</option>
+ <option value="it_IT">Italiano
(Italia)</option>
+ <option value="ja_JP">日本語 (日本)</option>
+ <option value="ko_KR">한국어 (대한민국)</option>
+ <option value="ru_RU">Русский
(Россия)</option>
+ <option value="zh_TW">中文(繁體)</option>
+ </select>
+ </form>
</div>
- <div class="row">
- <input type="password" id="password"
name="password" required="required"
placeholder="$_("Password")" />
- <div id="password-msg"
class="msg-required"></div>
- </div>
- <div class="row">
- <button id="btn-login" class="btn-normal-1">
- <label id="login">$_("Log in")</label>
- <label id="logging" style="display:
none;">$_("Logging in...")</label>
- </button>
- </div>
- </form>
-</div>
+ </div>
</body>
</html>
diff --git a/ui/pages/wok-ui.html.tmpl b/ui/pages/wok-ui.html.tmpl
index 669ae29..59a7612 100644
--- a/ui/pages/wok-ui.html.tmpl
+++ b/ui/pages/wok-ui.html.tmpl
@@ -24,117 +24,134 @@
#silent _ = t.gettext
#silent _t = t.gettext
#from wok.config import get_version
-<!DOCTYPE html>
<html lang="$lang.lang[0]">
<head>
-<meta charset="UTF-8">
-<title>Kimchi</title>
-<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
-<meta name="viewport" content="width=device-width, initial-scale=1.0,
user-scalable=yes" />
-<meta name="apple-mobile-web-app-capable" content="yes">
-<meta name="apple-mobile-web-app-title" content="Wok">
-<link href="images/apple-touch-icon-152.png" sizes="152x152"
rel="apple-touch-icon-precomposed">
-<link href="images/apple-touch-icon-144.png" sizes="144x144"
rel="apple-touch-icon-precomposed">
-<link href="images/apple-touch-icon-76.png" sizes="76x76"
rel="apple-touch-icon-precomposed">
-<link href="images/apple-touch-icon-72.png" sizes="72x72"
rel="apple-touch-icon-precomposed">
-<link href="images/apple-touch-icon-180x180.png" sizes="120x120"
rel="apple-touch-icon-precomposed">
-<link href="images/apple-touch-icon-114x114.png" sizes="114x114"
rel="apple-touch-icon-precomposed">
-<link href="images/apple-touch-icon-57x57.png" sizes="57x57"
rel="apple-touch-icon-precomposed">
-<link rel="icon" type="image/png"
href="images/android-chrome-192x192.png" sizes="192x192">
-<!--[if IE lte 9]><link rel="shortcut icon"
href="images/favicon.ico"><![endif]-->
-<link rel="shortcut icon" href="images/favicon.png">
-<meta name="application-name" content="Wok">
-<meta name="msapplication-config" content="none" />
-<meta name="msapplication-TileColor" content="#4f4f4f"/>
-<meta name="msapplication-square70x70logo"
content="images/tiny.png"/>
-<meta name="msapplication-square150x150logo"
content="images/square.png"/>
-<meta name="msapplication-wide310x150logo"
content="images/wide.png"/>
-<meta name="msapplication-square310x310logo"
content="images/large.png"/>
-<link rel="stylesheet"
href="$href('libs/jquery-ui/themes/base/jquery-ui.min.css')">
-<link rel="stylesheet"
href="$href('css/jquery-ui.custom.css')">
-<link rel="stylesheet"
href="$href('css/theme-default.min.css')">
-<script src="$href('base64/jquery.base64.js')"></script>
-<script src="$href('libs/jquery/jquery.min.js')"></script>
-<script
src="$href('libs/jquery-ui/jquery-ui.min.js')"></script>
-<script
src="$href('libs/jquery-ui/jquery-ui-i18n.min.js')"></script>
-<script src="$href('js/wok.min.js')"></script>
+ <meta charset="UTF-8">
+ <title>Kimchi</title>
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+ <meta name="viewport" content="width=device-width,
initial-scale=1.0, user-scalable=yes" />
+ <meta name="apple-mobile-web-app-capable" content="yes">
+ <meta name="apple-mobile-web-app-title" content="Wok">
+ <link href="images/apple-touch-icon-152.png" sizes="152x152"
rel="apple-touch-icon-precomposed">
+ <link href="images/apple-touch-icon-144.png" sizes="144x144"
rel="apple-touch-icon-precomposed">
+ <link href="images/apple-touch-icon-76.png" sizes="76x76"
rel="apple-touch-icon-precomposed">
+ <link href="images/apple-touch-icon-72.png" sizes="72x72"
rel="apple-touch-icon-precomposed">
+ <link href="images/apple-touch-icon-180x180.png"
sizes="120x120" rel="apple-touch-icon-precomposed">
+ <link href="images/apple-touch-icon-114x114.png"
sizes="114x114" rel="apple-touch-icon-precomposed">
+ <link href="images/apple-touch-icon-57x57.png" sizes="57x57"
rel="apple-touch-icon-precomposed">
+ <link rel="icon" type="image/png"
href="images/android-chrome-192x192.png" sizes="192x192">
+ <!--[if IE lte 9]><link rel="shortcut icon"
href="images/favicon.ico"><![endif]-->
+ <link rel="shortcut icon" href="images/favicon.png">
+ <meta name="application-name" content="Wok">
+ <meta name="msapplication-config" content="none" />
+ <meta name="msapplication-TileColor" content="#4f4f4f" />
+ <meta name="msapplication-square70x70logo"
content="images/tiny.png" />
+ <meta name="msapplication-square150x150logo"
content="images/square.png" />
+ <meta name="msapplication-wide310x150logo"
content="images/wide.png" />
+ <meta name="msapplication-square310x310logo"
content="images/large.png" />
+ <link rel="stylesheet"
href="$href('libs/jquery-ui/themes/base/jquery-ui.min.css')">
+ <link rel="stylesheet"
href="$href('css/jquery-ui.custom.css')">
+ <link rel="stylesheet"
href="$href('css/bootstrap.custom.css')">
+ <link rel="stylesheet"
href="$href('libs/bootstrap-select/dist/css/bootstrap-select.min.css')">
+ <link rel="stylesheet"
href="$href('css/fontawesome/fontawesome.css')">
+ <link rel="stylesheet"
href="$href('css/opensans/opensans.css')">
+ <link rel="stylesheet"
href="$href('css/bootstrap-select.custom.css')">
+ <link rel="stylesheet"
href="$href('css/wok.css')">
+ <script
src="$href('libs/es5-shim/es5-shim.min.js')"></script>
+ <script
src="$href('libs/jquery/jquery.min.js')"></script>
+ <script
src="$href('libs/jquery-ui/jquery-ui.min.js')"></script>
+ <script
src="$href('libs/jquery-ui/jquery-ui-i18n.min.js')"></script>
+ <script
src="$href('libs/jquery-i18n/jquery.i18n.min.js')"></script>
+ <script
src="$href('libs/bootstrap/bootstrap.min.js')"></script>
+ <script
src="$href('libs/bootstrap-select/dist/js/bootstrap-select.min.js')"></script>
+ <script src="$href('js/wok.min.js')"></script>
+ <!-- This is used for detecting if the UI needs to be built -->
+ <style type="text/css">
+ #buildme {
+ position: fixed;
+ background: rgba(0, 0, 0, 0.5);
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 10000;
+ }
-<!-- This is used for detecting if the UI needs to be built -->
-<style type="text/css">
-#buildme {
- position: fixed;
- background: rgba(0, 0, 0, 0.5);
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- z-index: 10000;
-}
-
-#buildme div {
- background-color: #FFB2C0;
- border-style: solid;
- border-color: #FF0000;
- padding: 30px;
- width: 75%;
- margin-left: auto;
- margin-right: auto;
- margin-top: 50px;
- -moz-border-radius: 15px;
- border-radius: 15px;
-}
-</style>
-</head>
+ #buildme div {
+ background-color: #FFB2C0;
+ border-style: solid;
+ border-color: #FF0000;
+ padding: 30px;
+ width: 75%;
+ margin-left: auto;
+ margin-right: auto;
+ margin-top: 50px;
+ -moz-border-radius: 15px;
+ border-radius: 15px;
+ }
+ </style>
+ </head>
<body onload="wok.main()">
-<div class="container">
-<header class="topbar">
- <h1 id="logo"><img alt="Project Wok"
src="images/theme-default/logo-white.png"></h1>
- <ul class="nav-top">
- <li>
- <div id="peers" class="peers hide-content
popable">
- <span>$_("Peers")</span>
- <span class="arrow"></span>
- <div class="dropdown popover right-side">
- <p
id="search-peers">$_("Searching")...</p>
- <p id="no-peers"
class="hide-content">$_("No peers found.")</p>
- </div>
+ <div class="topbar">
+ <nav class="navbar navbar-inverse">
+ <div class="container">
+ <div class="navbar-header">
+ <a id="logo" class="navbar-brand" href="#"
title="Project Kimchi">Kimchi</a>
</div>
- </li>
- <li>
- <div id="user" class="popable">
- <span id="user-icon"></span>
- <span id="user-name"
class="empty-when-logged-off"></span>
- <span class="arrow"></span>
- <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>
+ <ul class="nav navbar-nav navbar-right">
+ <li class="dropdown hide-content peers"
id="peers">
+ <a href="#" class="dropdown-toggle"
data-toggle="dropdown" role="button" aria-haspopup="true"
aria-expanded="false"><span
class="topbar-text">$_("Peers")</span><span
class="caret"></span></a>
+ <ul class="dropdown-menu">
+ <li
id="search-peers"><span>$_("Searching")...</span></li>
+ <li id="no-peers"
class="hide-content">$_("No peers found.")</li>
+ </ul>
+ </li>
+ <li class="dropdown" id="user">
+ <a href="#" class="dropdown-toggle"
data-toggle="dropdown" role="button" aria-haspopup="true"
aria-expanded="false">
+ <i class="fa fa-user"
id="user-icon"></i><span class="topbar-text
empty-when-logged-off" id="user-name"></span><span
class="caret"></span>
+ </a>
+ <ul class="dropdown-menu">
+ <li class="critical"><a
id="btn-logout" href="javascript: void(0);"><i class="fa
fa-ban"></i><span>$_("Log
out")</span></a></li>
+ </ul>
+ </li>
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle"
data-toggle="dropdown" role="button" aria-haspopup="true"
aria-expanded="false"><i class="fa
fa-question-circle"></i><span
class="topbar-text">$_("Help")</span><span
class="caret"></span></a>
+ <ul class="dropdown-menu">
+ <li><a id="btn-help" href="javascript:
void(0);">$_("Help")</a></li>
+ <li><a id="btn-about"
href="javascript:void(0);">$_("About")</a></li>
+ </ul>
+ </li>
+ </ul>
+ </div>
+ </nav>
+ <nav class="navbar navbar-default">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle
collapsed" data-toggle="collapse" data-target="#nav-menu"
aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"><!-- Hamburguer button here
--></span>
+ </button>
</div>
- </li>
- </ul>
-</header>
-<div class="content">
- <nav class="navbar">
- <ul id="nav-menu" class="nav-menu">
- <li class="menu-arrow"></li>
- </ul>
- </nav>
- <div id="main">
+ <div class="collapse navbar-collapse"
id="nav-menu">
+ <ul class="nav navbar-nav">
+ <li class="hostname"><span
class="host-location"></span></li>
+ </ul>
+ </div>
+ </div>
+ </nav>
+ </div>
+ <div class="content">
+ <div id="main">
+ </div>
+ </div>
</div>
-</div>
-</div>
-<div id="buildme">
- <div><p>Oops! It looks like I am running from a source tree and you
forgot to build!
+ <div id="buildme" style="display:none">
+ <div><p>Oops! It looks like I am running from a source tree and you
forgot to build!
Please run the following command from the wok and kimchi directories and reload this
page:</p>
- <p><code>make</code></p>
+ <p><code>make</code></p>
+ </div>
</div>
-</div>
<script id="about-tmpl" type="wok/template">
<div class="window about-window">
--
1.9.3