forked from community/device-mgt-plugins
parent
bee24366eb
commit
9012737b08
@ -0,0 +1,470 @@
|
||||
/*!
|
||||
* Bootstrap v3.3.1 (http://getbootstrap.com)
|
||||
* Copyright 2011-2014 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
.btn-default,
|
||||
.btn-primary,
|
||||
.btn-success,
|
||||
.btn-info,
|
||||
.btn-warning,
|
||||
.btn-danger {
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, .2);
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
|
||||
}
|
||||
.btn-default:active,
|
||||
.btn-primary:active,
|
||||
.btn-success:active,
|
||||
.btn-info:active,
|
||||
.btn-warning:active,
|
||||
.btn-danger:active,
|
||||
.btn-default.active,
|
||||
.btn-primary.active,
|
||||
.btn-success.active,
|
||||
.btn-info.active,
|
||||
.btn-warning.active,
|
||||
.btn-danger.active {
|
||||
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
|
||||
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
|
||||
}
|
||||
.btn-default .badge,
|
||||
.btn-primary .badge,
|
||||
.btn-success .badge,
|
||||
.btn-info .badge,
|
||||
.btn-warning .badge,
|
||||
.btn-danger .badge {
|
||||
text-shadow: none;
|
||||
}
|
||||
.btn:active,
|
||||
.btn.active {
|
||||
background-image: none;
|
||||
}
|
||||
.btn-default {
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%);
|
||||
background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0));
|
||||
background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #dbdbdb;
|
||||
border-color: #ccc;
|
||||
}
|
||||
.btn-default:hover,
|
||||
.btn-default:focus {
|
||||
background-color: #e0e0e0;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
.btn-default:active,
|
||||
.btn-default.active {
|
||||
background-color: #e0e0e0;
|
||||
border-color: #dbdbdb;
|
||||
}
|
||||
.btn-default:disabled,
|
||||
.btn-default[disabled] {
|
||||
background-color: #e0e0e0;
|
||||
background-image: none;
|
||||
}
|
||||
.btn-primary {
|
||||
background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%);
|
||||
background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88));
|
||||
background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #245580;
|
||||
}
|
||||
.btn-primary:hover,
|
||||
.btn-primary:focus {
|
||||
background-color: #265a88;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
.btn-primary:active,
|
||||
.btn-primary.active {
|
||||
background-color: #265a88;
|
||||
border-color: #245580;
|
||||
}
|
||||
.btn-primary:disabled,
|
||||
.btn-primary[disabled] {
|
||||
background-color: #265a88;
|
||||
background-image: none;
|
||||
}
|
||||
.btn-success {
|
||||
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);
|
||||
background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641));
|
||||
background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #3e8f3e;
|
||||
}
|
||||
.btn-success:hover,
|
||||
.btn-success:focus {
|
||||
background-color: #419641;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
.btn-success:active,
|
||||
.btn-success.active {
|
||||
background-color: #419641;
|
||||
border-color: #3e8f3e;
|
||||
}
|
||||
.btn-success:disabled,
|
||||
.btn-success[disabled] {
|
||||
background-color: #419641;
|
||||
background-image: none;
|
||||
}
|
||||
.btn-info {
|
||||
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
|
||||
background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2));
|
||||
background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #28a4c9;
|
||||
}
|
||||
.btn-info:hover,
|
||||
.btn-info:focus {
|
||||
background-color: #2aabd2;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
.btn-info:active,
|
||||
.btn-info.active {
|
||||
background-color: #2aabd2;
|
||||
border-color: #28a4c9;
|
||||
}
|
||||
.btn-info:disabled,
|
||||
.btn-info[disabled] {
|
||||
background-color: #2aabd2;
|
||||
background-image: none;
|
||||
}
|
||||
.btn-warning {
|
||||
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
|
||||
background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316));
|
||||
background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #e38d13;
|
||||
}
|
||||
.btn-warning:hover,
|
||||
.btn-warning:focus {
|
||||
background-color: #eb9316;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
.btn-warning:active,
|
||||
.btn-warning.active {
|
||||
background-color: #eb9316;
|
||||
border-color: #e38d13;
|
||||
}
|
||||
.btn-warning:disabled,
|
||||
.btn-warning[disabled] {
|
||||
background-color: #eb9316;
|
||||
background-image: none;
|
||||
}
|
||||
.btn-danger {
|
||||
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
|
||||
background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a));
|
||||
background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #b92c28;
|
||||
}
|
||||
.btn-danger:hover,
|
||||
.btn-danger:focus {
|
||||
background-color: #c12e2a;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
.btn-danger:active,
|
||||
.btn-danger.active {
|
||||
background-color: #c12e2a;
|
||||
border-color: #b92c28;
|
||||
}
|
||||
.btn-danger:disabled,
|
||||
.btn-danger[disabled] {
|
||||
background-color: #c12e2a;
|
||||
background-image: none;
|
||||
}
|
||||
.thumbnail,
|
||||
.img-thumbnail {
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
|
||||
}
|
||||
.dropdown-menu > li > a:hover,
|
||||
.dropdown-menu > li > a:focus {
|
||||
background-color: #e8e8e8;
|
||||
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||
background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
|
||||
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.dropdown-menu > .active > a,
|
||||
.dropdown-menu > .active > a:hover,
|
||||
.dropdown-menu > .active > a:focus {
|
||||
background-color: #2e6da4;
|
||||
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
|
||||
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.navbar-default {
|
||||
background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%);
|
||||
background-image: -o-linear-gradient(top, #fff 0%, #f8f8f8 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8));
|
||||
background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
border-radius: 4px;
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
|
||||
}
|
||||
.navbar-default .navbar-nav > .open > a,
|
||||
.navbar-default .navbar-nav > .active > a {
|
||||
background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
|
||||
background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2));
|
||||
background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
|
||||
box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
|
||||
}
|
||||
.navbar-brand,
|
||||
.navbar-nav > li > a {
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
|
||||
}
|
||||
.navbar-inverse {
|
||||
background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%);
|
||||
background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222));
|
||||
background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.navbar-inverse .navbar-nav > .open > a,
|
||||
.navbar-inverse .navbar-nav > .active > a {
|
||||
background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);
|
||||
background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f));
|
||||
background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
|
||||
box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
|
||||
}
|
||||
.navbar-inverse .navbar-brand,
|
||||
.navbar-inverse .navbar-nav > li > a {
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, .25);
|
||||
}
|
||||
.navbar-static-top,
|
||||
.navbar-fixed-top,
|
||||
.navbar-fixed-bottom {
|
||||
border-radius: 0;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.navbar .navbar-nav .open .dropdown-menu > .active > a,
|
||||
.navbar .navbar-nav .open .dropdown-menu > .active > a:hover,
|
||||
.navbar .navbar-nav .open .dropdown-menu > .active > a:focus {
|
||||
color: #fff;
|
||||
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
|
||||
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
}
|
||||
.alert {
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, .2);
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
|
||||
}
|
||||
.alert-success {
|
||||
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
|
||||
background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc));
|
||||
background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #b2dba1;
|
||||
}
|
||||
.alert-info {
|
||||
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
|
||||
background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0));
|
||||
background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #9acfea;
|
||||
}
|
||||
.alert-warning {
|
||||
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
|
||||
background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0));
|
||||
background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #f5e79e;
|
||||
}
|
||||
.alert-danger {
|
||||
background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
|
||||
background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3));
|
||||
background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #dca7a7;
|
||||
}
|
||||
.progress {
|
||||
background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
|
||||
background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5));
|
||||
background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.progress-bar {
|
||||
background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%);
|
||||
background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#286090));
|
||||
background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.progress-bar-success {
|
||||
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);
|
||||
background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44));
|
||||
background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.progress-bar-info {
|
||||
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
|
||||
background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5));
|
||||
background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.progress-bar-warning {
|
||||
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
|
||||
background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f));
|
||||
background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.progress-bar-danger {
|
||||
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);
|
||||
background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c));
|
||||
background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.progress-bar-striped {
|
||||
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
|
||||
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
|
||||
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
|
||||
}
|
||||
.list-group {
|
||||
border-radius: 4px;
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
|
||||
}
|
||||
.list-group-item.active,
|
||||
.list-group-item.active:hover,
|
||||
.list-group-item.active:focus {
|
||||
text-shadow: 0 -1px 0 #286090;
|
||||
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%);
|
||||
background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2b669a));
|
||||
background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #2b669a;
|
||||
}
|
||||
.list-group-item.active .badge,
|
||||
.list-group-item.active:hover .badge,
|
||||
.list-group-item.active:focus .badge {
|
||||
text-shadow: none;
|
||||
}
|
||||
.panel {
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
|
||||
}
|
||||
.panel-default > .panel-heading {
|
||||
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||
background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
|
||||
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.panel-primary > .panel-heading {
|
||||
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
|
||||
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.panel-success > .panel-heading {
|
||||
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
|
||||
background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6));
|
||||
background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.panel-info > .panel-heading {
|
||||
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
|
||||
background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3));
|
||||
background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.panel-warning > .panel-heading {
|
||||
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
|
||||
background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc));
|
||||
background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.panel-danger > .panel-heading {
|
||||
background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
|
||||
background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc));
|
||||
background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.well {
|
||||
background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
|
||||
background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5));
|
||||
background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #dcdcdc;
|
||||
-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
|
||||
box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
|
||||
}
|
||||
/*# sourceMappingURL=bootstrap-theme.css.map */
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,105 @@
|
||||
/*
|
||||
* Base structure
|
||||
*/
|
||||
|
||||
/* Move down content because we have a fixed navbar that is 50px tall */
|
||||
body {
|
||||
padding-top: 50px;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Global add-ons
|
||||
*/
|
||||
|
||||
.sub-header {
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
/*
|
||||
* Top navigation
|
||||
* Hide default border to remove 1px line.
|
||||
*/
|
||||
.navbar-fixed-top {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Sidebar
|
||||
*/
|
||||
|
||||
/* Hide for mobile, show later */
|
||||
.sidebar {
|
||||
display: none;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.sidebar {
|
||||
position: fixed;
|
||||
top: 51px;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1000;
|
||||
display: block;
|
||||
padding: 20px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
|
||||
background-color: #f5f5f5;
|
||||
border-right: 1px solid #eee;
|
||||
}
|
||||
}
|
||||
|
||||
/* Sidebar navigation */
|
||||
.nav-sidebar {
|
||||
margin-right: -21px; /* 20px padding + 1px border */
|
||||
margin-bottom: 20px;
|
||||
margin-left: -20px;
|
||||
}
|
||||
.nav-sidebar > li > a {
|
||||
padding-right: 20px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
.nav-sidebar > .active > a,
|
||||
.nav-sidebar > .active > a:hover,
|
||||
.nav-sidebar > .active > a:focus {
|
||||
color: #fff;
|
||||
background-color: #428bca;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Main content
|
||||
*/
|
||||
|
||||
.main {
|
||||
padding: 20px;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.main {
|
||||
padding-right: 40px;
|
||||
padding-left: 40px;
|
||||
}
|
||||
}
|
||||
.main .page-header {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Placeholder dashboard ideas
|
||||
*/
|
||||
|
||||
.placeholders {
|
||||
margin-bottom: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
.placeholders h4 {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.placeholder {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.placeholder img {
|
||||
display: inline-block;
|
||||
border-radius: 50%;
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
.col-centered{
|
||||
float: none;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.device-operation{
|
||||
width:100px;
|
||||
float:left;
|
||||
margin-right:10px;
|
||||
margin-bottom:5px;
|
||||
}
|
||||
.device-operation p{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.device-model-holder {
|
||||
padding:5px;
|
||||
}
|
||||
.device-model-holder img{
|
||||
display:block;
|
||||
margin:auto;
|
||||
}
|
||||
|
||||
.device-static-data {
|
||||
margin-left:10px;
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 62 KiB |
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 6.0 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 1.9 KiB |
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -0,0 +1,6 @@
|
||||
function identifierFormatter(value, row, index) {
|
||||
return [
|
||||
'<a class="like" href="/cdm/devices/'+value+'" title="Like">',
|
||||
value,
|
||||
'</a>'
|
||||
].join('');}
|
@ -0,0 +1,13 @@
|
||||
// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
|
||||
require('../../js/transition.js')
|
||||
require('../../js/alert.js')
|
||||
require('../../js/button.js')
|
||||
require('../../js/carousel.js')
|
||||
require('../../js/collapse.js')
|
||||
require('../../js/dropdown.js')
|
||||
require('../../js/modal.js')
|
||||
require('../../js/tooltip.js')
|
||||
require('../../js/popover.js')
|
||||
require('../../js/scrollspy.js')
|
||||
require('../../js/tab.js')
|
||||
require('../../js/affix.js')
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"console_name": "WSO2 CDM"
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
<%
|
||||
var dataConfi = require('/config/emm.js').config();
|
||||
var sso = require("/modules/sso.js").sso;
|
||||
var log = new Log();
|
||||
var keyStoreParams = {
|
||||
keyStoreName: dataConfi.ssoConfiguration.keyStoreName,
|
||||
keyStorePassword: dataConfi.ssoConfiguration.keyStorePassword,
|
||||
identityAlias: dataConfi.ssoConfiguration.identityAlias
|
||||
}
|
||||
sso.configure(dataConfi.ssoConfiguration.issuer, "emm", keyStoreParams, dataConfi.ssoConfiguration.identityProviderURL);
|
||||
sso.acs(function(loggedInUser) {
|
||||
session.put("LOGGED_IN_USER", loggedInUser);
|
||||
session.put("Loged", "true");
|
||||
var username = loggedInUser;
|
||||
var userModule = require('/modules/user.js').user;
|
||||
var db = common.getDatabase();
|
||||
var user = new userModule(db);
|
||||
var objUser = user.getUser({
|
||||
'userid': username,
|
||||
login: true
|
||||
});
|
||||
if (objUser != null) {
|
||||
var userFeed = {};
|
||||
userFeed.tenantId = stringify(objUser["tenantId"]);
|
||||
userFeed.username = objUser["username"];
|
||||
userFeed.email = objUser["email"];
|
||||
userFeed.firstName = objUser["firstName"];
|
||||
userFeed.lastName = objUser["lastName"];
|
||||
userFeed.mobile = objUser["mobile"];
|
||||
userFeed.tenantDomain = user.getTenantDomainFromID(stringify(objUser["tenantId"]));
|
||||
var parsedRoles = parse(objUser["roles"]);
|
||||
userFeed.roles = parsedRoles;
|
||||
var isEMMAdmin = false;
|
||||
var isAdmin = false;
|
||||
for (var i = 0; i < parsedRoles.length; i++) {
|
||||
if (parsedRoles[i] == 'Internal/emmadmin') {
|
||||
isEMMAdmin = true;
|
||||
break;
|
||||
}
|
||||
if (parsedRoles[i] == 'admin') {
|
||||
isAdmin = true;
|
||||
isEMMAdmin = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
userFeed.isEMMAdmin = isEMMAdmin;
|
||||
userFeed.isAdmin = isAdmin;
|
||||
session.put("emmConsoleUserLogin", "true");
|
||||
session.put("emmConsoleUser", userFeed);
|
||||
//var db = common.getDatabase();
|
||||
|
||||
var startupModule = require('/modules/startup.js').startup;
|
||||
var startup = new startupModule(db);
|
||||
startup.onUserLogin(userFeed);
|
||||
|
||||
var groupModule = require('/modules/group.js').group;
|
||||
var group = new groupModule(db);
|
||||
|
||||
if (!group.roleExists("Internal/emmadmin")) {
|
||||
var userList = new Array();
|
||||
group.addGroup({
|
||||
'name': 'Internal/emmadmin',
|
||||
'users': userList
|
||||
});
|
||||
}
|
||||
var appController = require('/controller/app.js');
|
||||
|
||||
if (isAdmin || isEMMAdmin) {
|
||||
response.sendRedirect('console/dashboard');
|
||||
} else {
|
||||
response.sendRedirect(appController.appInfo().server_url + 'users/devices?user=' + userFeed.username);
|
||||
}
|
||||
}
|
||||
}, function() {
|
||||
response.sendRedirect('/emm');
|
||||
}); %>
|
@ -0,0 +1,17 @@
|
||||
<%
|
||||
(function(){
|
||||
if (!session.get("emmConsoleUserLogin")) {
|
||||
var dataConfi = require('/config/emm.js').config();
|
||||
var sso = require("/modules/sso.js").sso;
|
||||
var keyStoreParams = {
|
||||
keyStoreName : dataConfi.ssoConfiguration.keyStoreName,
|
||||
keyStorePassword : dataConfi.ssoConfiguration.keyStorePassword,
|
||||
identityAlias : dataConfi.ssoConfiguration.identityAlias
|
||||
}
|
||||
sso.configure(dataConfi.ssoConfiguration.issuer, "emm", keyStoreParams, dataConfi.ssoConfiguration.identityProviderURL);
|
||||
sso.login();
|
||||
}else{
|
||||
response.sendRedirect("/emm");
|
||||
}
|
||||
}());
|
||||
%>
|
@ -0,0 +1,15 @@
|
||||
<%
|
||||
var user = session.get("emmConsoleUser");
|
||||
if (user === null) {
|
||||
response.sendRedirect('/emm');
|
||||
} else {
|
||||
var dataConfi = require('/config/emm.js').config();
|
||||
var sso = require("/modules/sso.js").sso;
|
||||
var keyStoreParams = {
|
||||
keyStoreName: dataConfi.ssoConfiguration.keyStoreName,
|
||||
keyStorePassword: dataConfi.ssoConfiguration.keyStorePassword,
|
||||
identityAlias: dataConfi.ssoConfiguration.identityAlias
|
||||
}
|
||||
sso.configure(dataConfi.ssoConfiguration.issuer, "emm", keyStoreParams, dataConfi.ssoConfiguration.identityProviderURL);
|
||||
sso.logout(user);
|
||||
} %>
|
@ -0,0 +1,43 @@
|
||||
[
|
||||
{
|
||||
"identifier": "8d748f0b-5781-4071",
|
||||
"name": "Dulitha's iPhone",
|
||||
"owner": "Dulitha",
|
||||
"ownership": "BYOD",
|
||||
"deviceType": "iPhone",
|
||||
"vendor": "Apple",
|
||||
"model": "iPhone 5",
|
||||
"osVersion": "8.0"
|
||||
},
|
||||
{
|
||||
"identifier": "8d748f0b-5781-4071",
|
||||
"name": "Dulitha's iPhone",
|
||||
"owner": "Dulitha",
|
||||
"ownership": "BYOD",
|
||||
"deviceType": "iPhone",
|
||||
"vendor": "Apple",
|
||||
"model": "iPhone 5",
|
||||
"osVersion": "8.0"
|
||||
},
|
||||
{
|
||||
"identifier": "8d748f0b-5781-4071",
|
||||
"name": "Dulitha's iPhone",
|
||||
"owner": "Dulitha",
|
||||
"ownership": "BYOD",
|
||||
"deviceType": "iPhone",
|
||||
"vendor": "Apple",
|
||||
"model": "iPhone 5",
|
||||
"osVersion": "8.0"
|
||||
},
|
||||
{
|
||||
"identifier": "8d748f0b-5781-4071",
|
||||
"name": "Dulitha's iPhone",
|
||||
"owner": "Dulitha",
|
||||
"ownership": "BYOD",
|
||||
"deviceType": "iPhone",
|
||||
"vendor": "Apple",
|
||||
"model": "iPhone 5",
|
||||
"osVersion": "8.0"
|
||||
}
|
||||
|
||||
]
|
@ -0,0 +1,6 @@
|
||||
[
|
||||
{
|
||||
"appName": "8d748f0b-5781-4071",
|
||||
"packageName": "Dulitha's iPhone"
|
||||
}
|
||||
]
|
@ -0,0 +1,3 @@
|
||||
<%
|
||||
// This will have the auth headers
|
||||
%>
|
@ -0,0 +1,3 @@
|
||||
<%
|
||||
// footer includes
|
||||
%>
|
@ -0,0 +1,24 @@
|
||||
<%
|
||||
// header includes
|
||||
var ui_config = require("/config/ui.json");
|
||||
%>
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#"><%=ui_config.console_name%></a>
|
||||
</div>
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li><a href="/cdm/dashboard">Dashboard</a></li>
|
||||
<li><a href="#">Configuration</a></li>
|
||||
<li><a href="#">Management</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
@ -0,0 +1,11 @@
|
||||
<!-- Bootstrap core JavaScript
|
||||
=== === === === === === === === === === === === === === === === == -->
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
<script src = "https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" > </script>
|
||||
<script src="/cdm/client/javascript/bootstrap.min.js"></script>
|
||||
<script src="/cdm/client/javascript/docs.min.js"></script>
|
||||
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
|
||||
<script src="/cdm/client/javascript/ie10-viewport-bug-workaround.js"></script>
|
||||
<script src="/cdm/client/javascript/ie10-viewport-bug-workaround.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.5.0/bootstrap-table.min.js"> </script>
|
||||
<script src="/cdm/client/javascript/main.js"></script>
|
@ -0,0 +1,27 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<link rel="icon" href="../../favicon.ico">
|
||||
|
||||
<title><%=title%></title>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="/cdm/client/css/bootstrap.min.css" rel="stylesheet"/>
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.5.0/bootstrap-table.min.css" rel="stylesheet"/>
|
||||
|
||||
<!-- Custom styles for this template -->
|
||||
<link href="/cdm/client/css/dashboard.css" rel="stylesheet">
|
||||
<link href="/cdm/client/css/main.css" rel="stylesheet">
|
||||
<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
|
||||
<!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
|
||||
|
||||
|
||||
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
@ -0,0 +1 @@
|
||||
//Init js to execute
|
@ -0,0 +1,20 @@
|
||||
{
|
||||
"welcomeFiles": ["pages/dashboard.jag"],
|
||||
"initScripts": ["init.js"],
|
||||
"urlMappings": [
|
||||
{
|
||||
"url": "/devices/*",
|
||||
"path": "/pages/device.jag"
|
||||
},
|
||||
{
|
||||
"url": "/dashboard",
|
||||
"path": "/pages/dashboard.jag"
|
||||
}
|
||||
],
|
||||
"errorPages": {
|
||||
"500": "/error500.jag",
|
||||
"404": "/error404.jag",
|
||||
"403": "/error403.jag"
|
||||
},
|
||||
"logLevel": "info"
|
||||
}
|
@ -0,0 +1,123 @@
|
||||
/*
|
||||
* *
|
||||
* * Copyright (c) 2005-2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
|
||||
* *
|
||||
* * 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.
|
||||
*
|
||||
*/
|
||||
|
||||
var sso = {};
|
||||
var ssoMod = require("sso");
|
||||
(function () {
|
||||
var carbon = require("carbon");
|
||||
var process = require("process");
|
||||
var getSSOSessions = function(){
|
||||
var sso_sessions = application.get('sso_sessions');
|
||||
|
||||
if (!sso_sessions) {
|
||||
application.put('sso_sessions', {});
|
||||
sso_sessions = application.get('sso_sessions');
|
||||
}
|
||||
return sso_sessions;
|
||||
}
|
||||
sso.configure = function(issuer, appName, keyStoreParams, address, transport, ssoService, responseSign){
|
||||
sso.issuer = issuer;
|
||||
sso.appName = appName;
|
||||
sso.relayState = "/"+appName;
|
||||
sso.transport = (transport? transport : "https");
|
||||
sso.ssoService = (ssoService? ssoService : "/samlsso");
|
||||
sso.responseSign = (responseSign? responseSign : true);
|
||||
sso.log = new Log("SSO Module");
|
||||
sso.address = carbon.server.address(sso.transport);
|
||||
sso.keyStoreProps = {
|
||||
KEY_STORE_NAME: process.getProperty('carbon.home') + keyStoreParams.keyStoreName,
|
||||
KEY_STORE_PASSWORD: keyStoreParams.keyStorePassword,
|
||||
IDP_ALIAS: keyStoreParams.identityAlias
|
||||
};
|
||||
}
|
||||
sso.login = function(){
|
||||
sso.sessionId = session.getId();
|
||||
var referer = request.getHeader("referer");
|
||||
sso.relayState = (referer ? referer : sso.relayState);
|
||||
sso.relayState = sso.relayState + request.getQueryString(); // append query string
|
||||
sso.encodedSAMLAuthRequest = ssoMod.client.getEncodedSAMLAuthRequest(sso.issuer);
|
||||
var postUrl = sso.address + sso.ssoService;
|
||||
print("<div><p>You are now being redirected to SSO Provider. If the redirection fails, please click on the button below.</p> <form method='post' action='"+postUrl+"'><p><input type='hidden' name='SAMLRequest' value='"+sso.encodedSAMLAuthRequest+"'/><input type='hidden' name='RelayState' value='"+sso.relayState+"'/><input type='hidden' name='SSOAuthSessionID' value='"+sso.sessionId+"'/><button type='submit'>Redirect manually</button></p></form></div><script type = 'text/javascript' >document.forms[0].submit();</script>");
|
||||
}
|
||||
sso.logout = function(user){
|
||||
var sso_sessions = getSSOSessions();
|
||||
sso.sessionId = session.getId();
|
||||
sso.sessionIndex = sso_sessions[sso.sessionId];
|
||||
|
||||
var referer = request.getHeader("referer");
|
||||
sso.relayState = (referer ? referer : sso.relayState);
|
||||
sso.relayState = sso.relayState + request.getQueryString(); // append query string
|
||||
sso.encodedSAMLLogoutRequest = ssoMod.client.getEncodedSAMLLogoutRequest(user, sso.sessionIndex , sso.issuer);
|
||||
sso.log.debug("Logout request recieved from session id ###: " + sso.sessionId );
|
||||
|
||||
var postUrl = sso.address + sso.ssoService;
|
||||
sso.log.info(sso.sessionId);
|
||||
print("<div><p>You are now redirected to Stratos Identity. If theredirection fails, please click the post button.</p> <form id='logoutForm' method='post' action='"+postUrl+"'> <p> <input type='hidden' name='SAMLRequest' value='"+sso.encodedSAMLLogoutRequest+"'/> <input type='hidden' name='RelayState' value='"+sso.relayState+"'/> <input type='hidden' name='SSOAuthSessionID' value='"+sso.sessionId+"'/> <button type='submit'>POST</button> </p> </form> </div> <script type = 'text/javascript' > document.forms[0].submit(); </script>");
|
||||
}
|
||||
sso.acs = function(loginCallback, logoutCallback){
|
||||
var sso_sessions = getSSOSessions();
|
||||
sso.sessionId = session.getId();
|
||||
var samlResponse = request.getParameter('SAMLResponse');
|
||||
var samlRequest = request.getParameter('SAMLRequest');
|
||||
var relayState = request.getParameter('RelayState');
|
||||
var samlRespObj;
|
||||
|
||||
if (samlResponse != null) {
|
||||
samlRespObj = ssoMod.client.getSamlObject(samlResponse);
|
||||
if(ssoMod.client.isLogoutResponse(samlRespObj)){
|
||||
logoutCallback();
|
||||
sso.log.debug('Session Id Invalidated :::' + sso.sessionId);
|
||||
// Invalidating the session after the callback
|
||||
session.invalidate();
|
||||
}else{
|
||||
sso.log.debug("Login request");
|
||||
// validating the signature
|
||||
if (sso.responseSign) {
|
||||
if (ssoMod.client.validateSignature(samlRespObj, sso.keyStoreProps)) {
|
||||
var sessionObj = ssoMod.client.decodeSAMLLoginResponse(samlRespObj, samlResponse, sso.sessionId);
|
||||
sso.log.debug("Saml object session ID :"+sessionObj.sessionId);
|
||||
if (sessionObj.sessionIndex != null || sessionObj.sessionIndex != 'undefined') {
|
||||
sso_sessions[sso_sessions[sessionObj.sessionIndex] = sessionObj.sessionId] = sessionObj.sessionIndex;
|
||||
sso.log.debug("Login successful");
|
||||
sso.log.debug('user is set :::' + sessionObj.loggedInUser);
|
||||
loginCallback(sessionObj.loggedInUser);
|
||||
}else{
|
||||
sso.log.error("Session index invalid");
|
||||
}
|
||||
}else{
|
||||
sso.log.error("Response Signing failed");
|
||||
}
|
||||
}else{
|
||||
sso.log.debug("Response Signing is disabled");
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
Executed for single logout requests
|
||||
*/
|
||||
if(samlRequest!= null){
|
||||
var index = ssoMod.client.decodeSAMLLogoutRequest(ssoMod.client.getSamlObject(samlRequest));
|
||||
sso.log.debug('BACKEND LOGOUT RECIEVED FROM STORE THE INDEX IS ######' + index);
|
||||
var jSessionId = getSSOSessions()[index];
|
||||
delete getSSOSessions()[index];
|
||||
sso.log.debug('Session Id Invalidated :::' + jSessionId);
|
||||
// Invalidating the session after the callback
|
||||
session.invalidate();
|
||||
}
|
||||
}
|
||||
})();
|
@ -0,0 +1,44 @@
|
||||
<!DOCTYPE html>
|
||||
<%
|
||||
var title="WSO2 CDM";
|
||||
%>
|
||||
<html lang="en">
|
||||
<%
|
||||
include("/includes/layout-header.jag")
|
||||
%>
|
||||
<body>
|
||||
<%
|
||||
include("/includes/header.jag");
|
||||
%>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-9 main col-centered">
|
||||
<h2 class="sub-header">Devices list</h2>
|
||||
<div class="row">
|
||||
<div class="col-md-1"><button type="button" class="btn btn-primary">Execute</button></div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="table-pagination" data-toggle="table" data-url="data2.json" data-query-params="queryParams" data-height="400" data-pagination="true" data-search="true">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-field="state" data-checkbox="true"></th>
|
||||
<th data-field="identifier" data-align="right" data-sortable="true" data-formatter="identifierFormatter">Identifier</th>
|
||||
<th data-field="name" data-align="center" data-sortable="true">Name</th>
|
||||
<th data-field="owner" data-align="center" data-sortable="true">Owner</th>
|
||||
<th data-field="ownership" data-align="center" data-sortable="true">Ownership</th>
|
||||
<th data-field="deviceType" data-align="center" data-sortable="true">Device Type</th>
|
||||
<th data-field="vendor" data-align="center" data-sortable="true">Vendor</th>
|
||||
<th data-field="model" data-align="center" data-sortable="true">Model</th>
|
||||
<th data-field="osVersion" data-align="center" data-sortable="true">OS Version</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%
|
||||
include("/includes/layout-footer.jag");
|
||||
%>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,69 @@
|
||||
<!DOCTYPE html>
|
||||
<%
|
||||
var title="WSO2 CDM";
|
||||
%>
|
||||
<html lang="en">
|
||||
<%
|
||||
include("/includes/layout-header.jag")
|
||||
%>
|
||||
<body>
|
||||
<%
|
||||
include("/includes/header.jag");
|
||||
%>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-9 main col-centered">
|
||||
<h2 class="sub-header">Dulitha's iPhone</h2>
|
||||
<div class="row">
|
||||
</div>
|
||||
<div class="row">
|
||||
<button class="device-operation btn btn-default">
|
||||
<img src="/cdm/client/img/operations/lock.png" />
|
||||
<p>Lock</p>
|
||||
</button>
|
||||
<button class="device-operation btn btn-default">
|
||||
<img src="/cdm/client/img/operations/lock.png" />
|
||||
<p>Lock</p>
|
||||
</button>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-3 device-model-holder well well-lg">
|
||||
<img src="/cdm/client/img/models/iphone.png" width="200"/>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="row">
|
||||
<div class="col-md-12 well well-lg device-static-data">
|
||||
<p>Model: <span>GT-I9500</span> </p>
|
||||
<p>IMSI : <span>GT-I9500</span> </p>
|
||||
<p>IMEI : <span>GT-I9500</span> </p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 well well-lg device-static-data">
|
||||
<p>Model: <span>GT-I9500</span> </p>
|
||||
<p>IMSI : <span>GT-I9500</span> </p>
|
||||
<p>IMEI : <span>GT-I9500</span> </p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 well well-lg device-static-data">
|
||||
<table id="table-pagination" data-toggle="table" data-url="/cdm/data3.json" data-query-params="queryParams" data-height="300" data-pagination="true" data-search="true">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-field="appName" data-align="right" data-sortable="true">App name</th>
|
||||
<th data-field="packageName" data-align="center" data-sortable="true">Package name</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%
|
||||
include("/includes/layout-footer.jag");
|
||||
%>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in new issue