sunstone-master.patch
src/sunstone/public/js/layout.js | ||
---|---|---|
27 | 27 |
} |
28 | 28 | |
29 | 29 |
function popDialogLoading(){ |
30 |
var loading = '<div style="margin-top:'+Math.round($("#dialog").height()/6)+'px; text-align: center; width: 100%"><img src="/images/pbar.gif" alt="loading..."/></div>';
|
|
30 |
var loading = '<div style="margin-top:'+Math.round($("#dialog").height()/6)+'px; text-align: center; width: 100%"><img src="images/pbar.gif" alt="loading..."/></div>'; |
|
31 | 31 |
popDialog(loading); |
32 | 32 |
} |
33 | 33 |
src/sunstone/public/js/login.js | ||
---|---|---|
15 | 15 |
/* -------------------------------------------------------------------------- */ |
16 | 16 | |
17 | 17 |
function auth_success(req, response){ |
18 |
window.location.href = "/";
|
|
18 |
window.location.href = ".";
|
|
19 | 19 |
} |
20 | 20 | |
21 | 21 |
function auth_error(req, error){ |
src/sunstone/public/js/opennebula.js | ||
---|---|---|
186 | 186 |
var request = OpenNebula.Helper.request(resource,"login"); |
187 | 187 | |
188 | 188 |
$.ajax({ |
189 |
url: "/login",
|
|
189 |
url: "login", |
|
190 | 190 |
type: "POST", |
191 | 191 |
data: {remember: remember}, |
192 | 192 |
beforeSend : function(req) { |
... | ... | |
220 | 220 |
var request = OpenNebula.Helper.request(resource,"logout"); |
221 | 221 | |
222 | 222 |
$.ajax({ |
223 |
url: "/logout",
|
|
223 |
url: "logout", |
|
224 | 224 |
type: "POST", |
225 | 225 |
success: function(response) |
226 | 226 |
{ |
... | ... | |
252 | 252 |
var request = OpenNebula.Helper.request(resource,"list"); |
253 | 253 | |
254 | 254 |
$.ajax({ |
255 |
url: "/config",
|
|
255 |
url: "config", |
|
256 | 256 |
type: "GET", |
257 | 257 |
dataType: "json", |
258 | 258 |
success: function(response) |
... | ... | |
286 | 286 |
var request = OpenNebula.Helper.request(resource,"create", data); |
287 | 287 | |
288 | 288 |
$.ajax({ |
289 |
url: "/host",
|
|
289 |
url: "host", |
|
290 | 290 |
type: "POST", |
291 | 291 |
dataType: "json", |
292 | 292 |
data: JSON.stringify(data), |
... | ... | |
318 | 318 |
var request = OpenNebula.Helper.request(resource,"delete", id); |
319 | 319 | |
320 | 320 |
$.ajax({ |
321 |
url: "/host/" + id,
|
|
321 |
url: "host/" + id, |
|
322 | 322 |
type: "DELETE", |
323 | 323 |
success: function() |
324 | 324 |
{ |
... | ... | |
347 | 347 |
var request = OpenNebula.Helper.request(resource,"list"); |
348 | 348 | |
349 | 349 |
$.ajax({ |
350 |
url: "/host",
|
|
350 |
url: "host", |
|
351 | 351 |
type: "GET", |
352 | 352 |
data: {timeout: timeout}, |
353 | 353 |
dataType: "json", |
... | ... | |
380 | 380 |
var request = OpenNebula.Helper.request(resource,"show", id); |
381 | 381 | |
382 | 382 |
$.ajax({ |
383 |
url: "/host/" + id,
|
|
383 |
url: "host/" + id, |
|
384 | 384 |
type: "GET", |
385 | 385 |
dataType: "json", |
386 | 386 |
success: function(response) |
... | ... | |
412 | 412 |
var request = OpenNebula.Helper.request(resource,method, id); |
413 | 413 | |
414 | 414 |
$.ajax({ |
415 |
url: "/host/" + id + "/action",
|
|
415 |
url: "host/" + id + "/action", |
|
416 | 416 |
type: "POST", |
417 | 417 |
data: JSON.stringify(action), |
418 | 418 |
success: function() |
... | ... | |
444 | 444 |
var request = OpenNebula.Helper.request(resource,method, id); |
445 | 445 | |
446 | 446 |
$.ajax({ |
447 |
url: "/host/" + id + "/action",
|
|
447 |
url: "host/" + id + "/action", |
|
448 | 448 |
type: "POST", |
449 | 449 |
data: JSON.stringify(action), |
450 | 450 |
success: function() |
... | ... | |
478 | 478 |
var request = OpenNebula.Helper.request(resource,"create",data); |
479 | 479 | |
480 | 480 |
$.ajax({ |
481 |
url: "/vnet",
|
|
481 |
url: "vnet", |
|
482 | 482 |
type: "POST", |
483 | 483 |
dataType: "json", |
484 | 484 |
data: JSON.stringify(data), |
... | ... | |
509 | 509 |
var request = OpenNebula.Helper.request(resource,"delete", id); |
510 | 510 | |
511 | 511 |
$.ajax({ |
512 |
url: "/vnet/" + id,
|
|
512 |
url: "vnet/" + id, |
|
513 | 513 |
type: "DELETE", |
514 | 514 |
success: function() |
515 | 515 |
{ |
... | ... | |
538 | 538 |
var request = OpenNebula.Helper.request(resource,"list"); |
539 | 539 | |
540 | 540 |
$.ajax({ |
541 |
url: "/vnet",
|
|
541 |
url: "vnet", |
|
542 | 542 |
type: "GET", |
543 | 543 |
dataType: "json", |
544 | 544 |
data: {timeout: timeout}, |
... | ... | |
570 | 570 |
var request = OpenNebula.Helper.request(resource,"show", id); |
571 | 571 | |
572 | 572 |
$.ajax({ |
573 |
url: "/vnet/" + id,
|
|
573 |
url: "vnet/" + id, |
|
574 | 574 |
type: "GET", |
575 | 575 |
dataType: "json", |
576 | 576 |
success: function(response) |
... | ... | |
602 | 602 |
var request = OpenNebula.Helper.request(resource,method, id); |
603 | 603 | |
604 | 604 |
$.ajax({ |
605 |
url: "/vnet/" + id + "/action",
|
|
605 |
url: "vnet/" + id + "/action", |
|
606 | 606 |
type: "POST", |
607 | 607 |
data: JSON.stringify(action), |
608 | 608 |
success: function() |
... | ... | |
634 | 634 |
var request = OpenNebula.Helper.request(resource,method, id); |
635 | 635 | |
636 | 636 |
$.ajax({ |
637 |
url: "/vnet/" + id + "/action",
|
|
637 |
url: "vnet/" + id + "/action", |
|
638 | 638 |
type: "POST", |
639 | 639 |
data: JSON.stringify(action), |
640 | 640 |
success: function() |
... | ... | |
668 | 668 |
var request = OpenNebula.Helper.request(resource,"create",data); |
669 | 669 | |
670 | 670 |
$.ajax({ |
671 |
url: "/vm",
|
|
671 |
url: "vm", |
|
672 | 672 |
type: "POST", |
673 | 673 |
dataType: "json", |
674 | 674 |
data: JSON.stringify(data), |
... | ... | |
699 | 699 |
var request = OpenNebula.Helper.request(resource,"delete", id); |
700 | 700 | |
701 | 701 |
$.ajax({ |
702 |
url: "/vm/" + id,
|
|
702 |
url: "vm/" + id, |
|
703 | 703 |
type: "DELETE", |
704 | 704 |
success: function() |
705 | 705 |
{ |
... | ... | |
728 | 728 |
var request = OpenNebula.Helper.request(resource,"list"); |
729 | 729 | |
730 | 730 |
$.ajax({ |
731 |
url: "/vm",
|
|
731 |
url: "vm", |
|
732 | 732 |
type: "GET", |
733 | 733 |
dataType: "json", |
734 | 734 |
data: {timeout: timeout}, |
... | ... | |
760 | 760 |
var request = OpenNebula.Helper.request(resource,"log", id); |
761 | 761 | |
762 | 762 |
$.ajax({ |
763 |
url: "/vm/" + id + "/log",
|
|
763 |
url: "vm/" + id + "/log", |
|
764 | 764 |
type: "GET", |
765 | 765 |
success: function(response) |
766 | 766 |
{ |
... | ... | |
789 | 789 |
var request = OpenNebula.Helper.request(resource,"show", id); |
790 | 790 | |
791 | 791 |
$.ajax({ |
792 |
url: "/vm/" + id,
|
|
792 |
url: "vm/" + id, |
|
793 | 793 |
type: "GET", |
794 | 794 |
dataType: "json", |
795 | 795 |
success: function(response) |
... | ... | |
822 | 822 |
var request = OpenNebula.Helper.request(resource,method, [id, host]); |
823 | 823 | |
824 | 824 |
$.ajax({ |
825 |
url: "/vm/" + id + "/action",
|
|
825 |
url: "vm/" + id + "/action", |
|
826 | 826 |
type: "POST", |
827 | 827 |
data: JSON.stringify(action), |
828 | 828 |
success: function() |
... | ... | |
854 | 854 |
var request = OpenNebula.Helper.request(resource,method, id); |
855 | 855 | |
856 | 856 |
$.ajax({ |
857 |
url: "/vm/" + id + "/action",
|
|
857 |
url: "vm/" + id + "/action", |
|
858 | 858 |
type: "POST", |
859 | 859 |
data: JSON.stringify(action), |
860 | 860 |
success: function() |
... | ... | |
887 | 887 |
var request = OpenNebula.Helper.request(resource,method, [id, host]); |
888 | 888 | |
889 | 889 |
$.ajax({ |
890 |
url: "/vm/" + id + "/action",
|
|
890 |
url: "vm/" + id + "/action", |
|
891 | 891 |
type: "POST", |
892 | 892 |
data: JSON.stringify(action), |
893 | 893 |
success: function() |
... | ... | |
920 | 920 |
var request = OpenNebula.Helper.request(resource,method, [id, host]); |
921 | 921 | |
922 | 922 |
$.ajax({ |
923 |
url: "/vm/" + id + "/action",
|
|
923 |
url: "vm/" + id + "/action", |
|
924 | 924 |
type: "POST", |
925 | 925 |
data: JSON.stringify(action), |
926 | 926 |
success: function() |
... | ... | |
952 | 952 |
var request = OpenNebula.Helper.request(resource,method, id); |
953 | 953 | |
954 | 954 |
$.ajax({ |
955 |
url: "/vm/" + id + "/action",
|
|
955 |
url: "vm/" + id + "/action", |
|
956 | 956 |
type: "POST", |
957 | 957 |
data: JSON.stringify(action), |
958 | 958 |
success: function() |
... | ... | |
984 | 984 |
var request = OpenNebula.Helper.request(resource,method, id); |
985 | 985 | |
986 | 986 |
$.ajax({ |
987 |
url: "/vm/" + id + "/action",
|
|
987 |
url: "vm/" + id + "/action", |
|
988 | 988 |
type: "POST", |
989 | 989 |
data: JSON.stringify(action), |
990 | 990 |
success: function() |
... | ... | |
1016 | 1016 |
var request = OpenNebula.Helper.request(resource,method, id); |
1017 | 1017 | |
1018 | 1018 |
$.ajax({ |
1019 |
url: "/vm/" + id + "/action",
|
|
1019 |
url: "vm/" + id + "/action", |
|
1020 | 1020 |
type: "POST", |
1021 | 1021 |
data: JSON.stringify(action), |
1022 | 1022 |
success: function() |
... | ... | |
1048 | 1048 |
var request = OpenNebula.Helper.request(resource,method, id); |
1049 | 1049 | |
1050 | 1050 |
$.ajax({ |
1051 |
url: "/vm/" + id + "/action",
|
|
1051 |
url: "vm/" + id + "/action", |
|
1052 | 1052 |
type: "POST", |
1053 | 1053 |
data: JSON.stringify(action), |
1054 | 1054 |
success: function() |
... | ... | |
1080 | 1080 |
var request = OpenNebula.Helper.request(resource,method, id); |
1081 | 1081 | |
1082 | 1082 |
$.ajax({ |
1083 |
url: "/vm/" + id + "/action",
|
|
1083 |
url: "vm/" + id + "/action", |
|
1084 | 1084 |
type: "POST", |
1085 | 1085 |
data: JSON.stringify(action), |
1086 | 1086 |
success: function() |
... | ... | |
1112 | 1112 |
var request = OpenNebula.Helper.request(resource,method, id); |
1113 | 1113 | |
1114 | 1114 |
$.ajax({ |
1115 |
url: "/vm/" + id + "/action",
|
|
1115 |
url: "vm/" + id + "/action", |
|
1116 | 1116 |
type: "POST", |
1117 | 1117 |
data: JSON.stringify(action), |
1118 | 1118 |
success: function() |
... | ... | |
1154 | 1154 |
var request = OpenNebula.Helper.request(resource,method, [vm_id, disk_id, image_name, type]); |
1155 | 1155 | |
1156 | 1156 |
$.ajax({ |
1157 |
url: "/vm/" + id + "/action",
|
|
1157 |
url: "vm/" + id + "/action", |
|
1158 | 1158 |
type: "POST", |
1159 | 1159 |
data: JSON.stringify(action), |
1160 | 1160 |
success: function() |
... | ... | |
1186 | 1186 |
var request = OpenNebula.Helper.request(resource,method, id); |
1187 | 1187 | |
1188 | 1188 |
$.ajax({ |
1189 |
url: "/vm/" + id + "/action",
|
|
1189 |
url: "vm/" + id + "/action", |
|
1190 | 1190 |
type: "POST", |
1191 | 1191 |
data: JSON.stringify(action), |
1192 | 1192 |
success: function() |
... | ... | |
1220 | 1220 |
var request = OpenNebula.Helper.request(resource,"create", name); |
1221 | 1221 | |
1222 | 1222 |
$.ajax({ |
1223 |
url: "/cluster",
|
|
1223 |
url: "cluster", |
|
1224 | 1224 |
type: "POST", |
1225 | 1225 |
dataType: "json", |
1226 | 1226 |
data: JSON.stringify(data), |
... | ... | |
1251 | 1251 |
var request = OpenNebula.Helper.request(resource,"delete", id); |
1252 | 1252 | |
1253 | 1253 |
$.ajax({ |
1254 |
url: "/cluster/" + id,
|
|
1254 |
url: "cluster/" + id, |
|
1255 | 1255 |
type: "DELETE", |
1256 | 1256 |
success: function() |
1257 | 1257 |
{ |
... | ... | |
1280 | 1280 |
var request = OpenNebula.Helper.request(resource,"list"); |
1281 | 1281 | |
1282 | 1282 |
$.ajax({ |
1283 |
url: "/cluster",
|
|
1283 |
url: "cluster", |
|
1284 | 1284 |
type: "GET", |
1285 | 1285 |
dataType: "json", |
1286 | 1286 |
data: {timeout: timeout}, |
... | ... | |
1317 | 1317 |
var request = OpenNebula.Helper.request(resource,method, [host_id, cluster_id]); |
1318 | 1318 | |
1319 | 1319 |
$.ajax({ |
1320 |
url: "/cluster/" + cluster_id + "/action",
|
|
1320 |
url: "cluster/" + cluster_id + "/action", |
|
1321 | 1321 |
type: "POST", |
1322 | 1322 |
data: JSON.stringify(action), |
1323 | 1323 |
success: function(response) |
... | ... | |
1353 | 1353 |
var request = OpenNebula.Helper.request(resource,method, [host_id, cluster_id]); |
1354 | 1354 | |
1355 | 1355 |
$.ajax({ |
1356 |
url: "/cluster/" + cluster_id + "/action",
|
|
1356 |
url: "cluster/" + cluster_id + "/action", |
|
1357 | 1357 |
type: "POST", |
1358 | 1358 |
data: JSON.stringify(action), |
1359 | 1359 |
success: function(response) |
... | ... | |
1387 | 1387 |
var request = OpenNebula.Helper.request(resource,"create",data); |
1388 | 1388 | |
1389 | 1389 |
$.ajax({ |
1390 |
url: "/user",
|
|
1390 |
url: "user", |
|
1391 | 1391 |
type: "POST", |
1392 | 1392 |
dataType: "json", |
1393 | 1393 |
data: JSON.stringify(data), |
... | ... | |
1418 | 1418 |
var request = OpenNebula.Helper.request(resource,"delete", id); |
1419 | 1419 | |
1420 | 1420 |
$.ajax({ |
1421 |
url: "/user/" + id,
|
|
1421 |
url: "user/" + id, |
|
1422 | 1422 |
type: "DELETE", |
1423 | 1423 |
success: function() |
1424 | 1424 |
{ |
... | ... | |
1447 | 1447 |
var request = OpenNebula.Helper.request(resource,"list"); |
1448 | 1448 | |
1449 | 1449 |
$.ajax({ |
1450 |
url: "/user",
|
|
1450 |
url: "user", |
|
1451 | 1451 |
type: "GET", |
1452 | 1452 |
dataType: "json", |
1453 | 1453 |
data: {timeout: timeout}, |
... | ... | |
1485 | 1485 |
var request = OpenNebula.Helper.request(resource,method, passwd); |
1486 | 1486 | |
1487 | 1487 |
$.ajax({ |
1488 |
url: "/user/" + id + "/action",
|
|
1488 |
url: "user/" + id + "/action", |
|
1489 | 1489 |
type: "POST", |
1490 | 1490 |
data: JSON.stringify(action), |
1491 | 1491 |
success: function(response) |
... | ... | |
1519 | 1519 |
var request = OpenNebula.Helper.request(resource,"register",data); |
1520 | 1520 | |
1521 | 1521 |
$.ajax({ |
1522 |
url: "/image",
|
|
1522 |
url: "image", |
|
1523 | 1523 |
type: "POST", |
1524 | 1524 |
dataType: "json", |
1525 | 1525 |
data: JSON.stringify(data), |
... | ... | |
1550 | 1550 |
var request = OpenNebula.Helper.request(resource,"delete", id); |
1551 | 1551 | |
1552 | 1552 |
$.ajax({ |
1553 |
url: "/image/" + id,
|
|
1553 |
url: "image/" + id, |
|
1554 | 1554 |
type: "DELETE", |
1555 | 1555 |
success: function() |
1556 | 1556 |
{ |
... | ... | |
1579 | 1579 |
var request = OpenNebula.Helper.request(resource,"list"); |
1580 | 1580 | |
1581 | 1581 |
$.ajax({ |
1582 |
url: "/image",
|
|
1582 |
url: "image", |
|
1583 | 1583 |
type: "GET", |
1584 | 1584 |
dataType: "json", |
1585 | 1585 |
data: {timeout: timeout}, |
... | ... | |
1611 | 1611 |
var request = OpenNebula.Helper.request(resource,"show", id); |
1612 | 1612 | |
1613 | 1613 |
$.ajax({ |
1614 |
url: "/image/" + id,
|
|
1614 |
url: "image/" + id, |
|
1615 | 1615 |
type: "GET", |
1616 | 1616 |
dataType: "json", |
1617 | 1617 |
success: function(response) |
... | ... | |
1649 | 1649 |
var request = OpenNebula.Helper.request(resource,method, [id, name, value]); |
1650 | 1650 | |
1651 | 1651 |
$.ajax({ |
1652 |
url: "/image/" + id + "/action",
|
|
1652 |
url: "image/" + id + "/action", |
|
1653 | 1653 |
type: "POST", |
1654 | 1654 |
data: JSON.stringify(action), |
1655 | 1655 |
success: function(response) |
... | ... | |
1686 | 1686 |
var request = OpenNebula.Helper.request(resource,method, [id, name]); |
1687 | 1687 | |
1688 | 1688 |
$.ajax({ |
1689 |
url: "/image/" + id + "/action",
|
|
1689 |
url: "image/" + id + "/action", |
|
1690 | 1690 |
type: "POST", |
1691 | 1691 |
data: JSON.stringify(action), |
1692 | 1692 |
success: function(response) |
... | ... | |
1719 | 1719 |
var request = OpenNebula.Helper.request(resource,method, id); |
1720 | 1720 | |
1721 | 1721 |
$.ajax({ |
1722 |
url: "/image/" + id + "/action",
|
|
1722 |
url: "image/" + id + "/action", |
|
1723 | 1723 |
type: "POST", |
1724 | 1724 |
data: JSON.stringify(action), |
1725 | 1725 |
success: function() |
... | ... | |
1751 | 1751 |
var request = OpenNebula.Helper.request(resource,method, id); |
1752 | 1752 | |
1753 | 1753 |
$.ajax({ |
1754 |
url: "/image/" + id + "/action",
|
|
1754 |
url: "image/" + id + "/action", |
|
1755 | 1755 |
type: "POST", |
1756 | 1756 |
data: JSON.stringify(action), |
1757 | 1757 |
success: function() |
... | ... | |
1783 | 1783 |
var request = OpenNebula.Helper.request(resource,method, id); |
1784 | 1784 | |
1785 | 1785 |
$.ajax({ |
1786 |
url: "/image/" + id + "/action",
|
|
1786 |
url: "image/" + id + "/action", |
|
1787 | 1787 |
type: "POST", |
1788 | 1788 |
data: JSON.stringify(action), |
1789 | 1789 |
success: function() |
... | ... | |
1815 | 1815 |
var request = OpenNebula.Helper.request(resource,method, id); |
1816 | 1816 | |
1817 | 1817 |
$.ajax({ |
1818 |
url: "/image/" + id + "/action",
|
|
1818 |
url: "image/" + id + "/action", |
|
1819 | 1819 |
type: "POST", |
1820 | 1820 |
data: JSON.stringify(action), |
1821 | 1821 |
success: function() |
... | ... | |
1848 | 1848 |
var request = OpenNebula.Helper.request(resource,method, id); |
1849 | 1849 | |
1850 | 1850 |
$.ajax({ |
1851 |
url: "/image/" + id + "/action",
|
|
1851 |
url: "image/" + id + "/action", |
|
1852 | 1852 |
type: "POST", |
1853 | 1853 |
data: JSON.stringify(action), |
1854 | 1854 |
success: function() |
... | ... | |
1881 | 1881 |
var request = OpenNebula.Helper.request(resource,method, id); |
1882 | 1882 | |
1883 | 1883 |
$.ajax({ |
1884 |
url: "/image/" + id + "/action",
|
|
1884 |
url: "image/" + id + "/action", |
|
1885 | 1885 |
type: "POST", |
1886 | 1886 |
data: JSON.stringify(action), |
1887 | 1887 |
success: function() |
src/sunstone/public/js/plugins/hosts-tab.js | ||
---|---|---|
264 | 264 |
"Host.refresh" : { |
265 | 265 |
type: "image", |
266 | 266 |
text: "Refresh list", |
267 |
img: "/images/Refresh-icon.png",
|
|
267 |
img: "images/Refresh-icon.png", |
|
268 | 268 |
condition: True |
269 | 269 |
}, |
270 | 270 |
"Host.create_dialog" : { |
src/sunstone/public/js/plugins/images-tab.js | ||
---|---|---|
353 | 353 |
"Image.refresh" : { |
354 | 354 |
type: "image", |
355 | 355 |
text: "Refresh list", |
356 |
img: "/images/Refresh-icon.png",
|
|
356 |
img: "images/Refresh-icon.png", |
|
357 | 357 |
condition: True |
358 | 358 |
}, |
359 | 359 |
"Image.create_dialog" : { |
src/sunstone/public/js/plugins/users-tab.js | ||
---|---|---|
106 | 106 |
"User.refresh" : { |
107 | 107 |
type: "image", |
108 | 108 |
text: "Refresh list", |
109 |
img: "/images/Refresh-icon.png",
|
|
109 |
img: "images/Refresh-icon.png", |
|
110 | 110 |
condition: True |
111 | 111 |
}, |
112 | 112 |
"User.create_dialog" : { |
src/sunstone/public/js/plugins/vms-tab.js | ||
---|---|---|
713 | 713 |
"VM.refresh" : { |
714 | 714 |
type: "image", |
715 | 715 |
text: "Refresh list", |
716 |
img: "/images/Refresh-icon.png",
|
|
716 |
img: "images/Refresh-icon.png", |
|
717 | 717 |
condition: True |
718 | 718 |
}, |
719 | 719 |
|
src/sunstone/public/js/plugins/vnets-tab.js | ||
---|---|---|
215 | 215 |
"Network.refresh" : { |
216 | 216 |
type: "image", |
217 | 217 |
text: "Refresh list", |
218 |
img: "/images/Refresh-icon.png",
|
|
218 |
img: "images/Refresh-icon.png", |
|
219 | 219 |
condition: True |
220 | 220 |
}, |
221 | 221 |
|
src/sunstone/public/js/sunstone-util.js | ||
---|---|---|
238 | 238 | |
239 | 239 |
//redirect to login if unauthenticated |
240 | 240 |
if (error_json.error.http_status=="401") { |
241 |
window.location.href = "/login";
|
|
241 |
window.location.href = "login"; |
|
242 | 242 |
}; |
243 | 243 |
|
244 | 244 |
if (!message){ |
src/sunstone/public/js/sunstone.js | ||
---|---|---|
358 | 358 |
$("#user").html(username); |
359 | 359 |
$("#logout").click(function(){ |
360 | 360 |
OpenNebula.Auth.logout({success:function(){ |
361 |
window.location.href = "/login";
|
|
361 |
window.location.href = "login"; |
|
362 | 362 |
} |
363 | 363 |
}); |
364 | 364 |
return false; |
src/sunstone/sunstone-server.rb | ||
---|---|---|
96 | 96 |
# HTML Requests |
97 | 97 |
############################################################################## |
98 | 98 |
get '/' do |
99 |
redirect '/login' unless authorized?
|
|
99 |
redirect 'login' unless authorized? |
|
100 | 100 | |
101 | 101 |
time = Time.now + 60 |
102 | 102 |
response.set_cookie("one-user", |
src/sunstone/templates/index.html | ||
---|---|---|
5 | 5 |
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> |
6 | 6 | |
7 | 7 |
<!-- Vendor Libraries --> |
8 |
<link rel="stylesheet" type="text/css" href="/vendor/dataTables/demo_table_jui.css" />
|
|
9 |
<link rel="stylesheet" type="text/css" href="/vendor/jQueryUI/jquery-ui-1.8.7.custom.css" />
|
|
10 |
<link rel="stylesheet" type="text/css" href="/vendor/jGrowl/jquery.jgrowl.css" />
|
|
11 |
<link rel="stylesheet" type="text/css" href="/vendor/jQueryLayout/layout-default-latest.css" />
|
|
8 |
<link rel="stylesheet" type="text/css" href="vendor/dataTables/demo_table_jui.css" /> |
|
9 |
<link rel="stylesheet" type="text/css" href="vendor/jQueryUI/jquery-ui-1.8.7.custom.css" /> |
|
10 |
<link rel="stylesheet" type="text/css" href="vendor/jGrowl/jquery.jgrowl.css" /> |
|
11 |
<link rel="stylesheet" type="text/css" href="vendor/jQueryLayout/layout-default-latest.css" /> |
|
12 | 12 | |
13 |
<script type="text/javascript" src="/vendor/jQuery/jquery-1.4.4.min.js"></script>
|
|
14 |
<script type="text/javascript" src="/vendor/jGrowl/jquery.jgrowl_minimized.js"></script>
|
|
15 |
<script type="text/javascript" src="/vendor/jQueryUI/jquery-ui-1.8.7.custom.min.js"></script>
|
|
16 |
<script type="text/javascript" src="/vendor/jQueryLayout/jquery.layout.min-1.2.0.js"></script>
|
|
17 |
<script type="text/javascript" src="/vendor/dataTables/jquery.dataTables.min.js"></script>
|
|
13 |
<script type="text/javascript" src="vendor/jQuery/jquery-1.4.4.min.js"></script> |
|
14 |
<script type="text/javascript" src="vendor/jGrowl/jquery.jgrowl_minimized.js"></script> |
|
15 |
<script type="text/javascript" src="vendor/jQueryUI/jquery-ui-1.8.7.custom.min.js"></script> |
|
16 |
<script type="text/javascript" src="vendor/jQueryLayout/jquery.layout.min-1.2.0.js"></script> |
|
17 |
<script type="text/javascript" src="vendor/dataTables/jquery.dataTables.min.js"></script> |
|
18 | 18 |
<!-- End Vendor Libraries --> |
19 | 19 | |
20 |
<link rel="stylesheet" type="text/css" href="/css/application.css" />
|
|
21 |
<link rel="stylesheet" type="text/css" href="/css/layout.css" />
|
|
22 |
<script type="text/javascript" src="/js/opennebula.js"></script>
|
|
23 |
<script type="text/javascript" src="/js/layout.js"></script>
|
|
24 |
<script type="text/javascript" src="/js/sunstone.js"></script>
|
|
25 |
<script type="text/javascript" src="/js/sunstone-util.js"></script>
|
|
26 |
<script type="text/javascript" src="/js/plugins/dashboard-tab.js"></script>
|
|
27 |
<script type="text/javascript" src="/js/plugins/hosts-tab.js"></script>
|
|
28 |
<script type="text/javascript" src="/js/plugins/vms-tab.js"></script>
|
|
29 |
<script type="text/javascript" src="/js/plugins/vnets-tab.js"></script>
|
|
30 |
<script type="text/javascript" src="/js/plugins/images-tab.js"></script>
|
|
31 |
<script type="text/javascript" src="/js/plugins/users-tab.js"></script>
|
|
20 |
<link rel="stylesheet" type="text/css" href="css/application.css" /> |
|
21 |
<link rel="stylesheet" type="text/css" href="css/layout.css" /> |
|
22 |
<script type="text/javascript" src="js/opennebula.js"></script> |
|
23 |
<script type="text/javascript" src="js/layout.js"></script> |
|
24 |
<script type="text/javascript" src="js/sunstone.js"></script> |
|
25 |
<script type="text/javascript" src="js/sunstone-util.js"></script> |
|
26 |
<script type="text/javascript" src="js/plugins/dashboard-tab.js"></script> |
|
27 |
<script type="text/javascript" src="js/plugins/hosts-tab.js"></script> |
|
28 |
<script type="text/javascript" src="js/plugins/vms-tab.js"></script> |
|
29 |
<script type="text/javascript" src="js/plugins/vnets-tab.js"></script> |
|
30 |
<script type="text/javascript" src="js/plugins/images-tab.js"></script> |
|
31 |
<script type="text/javascript" src="js/plugins/users-tab.js"></script> |
|
32 | 32 |
|
33 |
<!--<script type="text/javascript" src="/js/plugins/dummy-plugin.js"></script>-->
|
|
33 |
<!--<script type="text/javascript" src="js/plugins/dummy-plugin.js"></script>--> |
|
34 | 34 |
|
35 | 35 |
</head> |
36 | 36 |
<body> |
... | ... | |
47 | 47 | |
48 | 48 |
<div id="header" class="ui-layout-north"> |
49 | 49 |
<div id="logo"> |
50 |
<img src="/images/opennebula-sunstone-small.png"/>
|
|
50 |
<img src="images/opennebula-sunstone-small.png"/> |
|
51 | 51 |
</div> |
52 | 52 |
<div id="login-info"> |
53 | 53 |
Welcome <span id="user"></span> | <a href="#" id="logout">Sign Out</a> |
src/sunstone/templates/login.html | ||
---|---|---|
2 | 2 |
<head> |
3 | 3 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
4 | 4 |
<title>OpenNebula Admin Console Login</title> |
5 |
<link rel="stylesheet" type="text/css" href="/css/login.css" />
|
|
5 |
<link rel="stylesheet" type="text/css" href="css/login.css" /> |
|
6 | 6 | |
7 | 7 |
<!-- Vendor Libraries --> |
8 |
<script type="text/javascript" src="/vendor/jQuery/jquery-1.4.4.min.js"></script>
|
|
8 |
<script type="text/javascript" src="vendor/jQuery/jquery-1.4.4.min.js"></script> |
|
9 | 9 |
<!-- End Vendor Libraries --> |
10 | 10 | |
11 |
<script type="text/javascript" src="/js/opennebula.js"></script>
|
|
12 |
<script type="text/javascript" src="/js/login.js"></script>
|
|
11 |
<script type="text/javascript" src="js/opennebula.js"></script> |
|
12 |
<script type="text/javascript" src="js/login.js"></script> |
|
13 | 13 | |
14 | 14 |
</head> |
15 | 15 |