From: Ciro Scognamiglio Date: Mon, 16 Feb 2015 14:46:13 +0000 (+0100) Subject: Testbed/Facility selection X-Git-Tag: myslice-1.3~58^2~12 X-Git-Url: http://git.onelab.eu/?p=myslice.git;a=commitdiff_plain;h=7be53c6362c016ae34052a8a751ca11a975b0bd0 Testbed/Facility selection --- diff --git a/plugins/testbeds/static/js/testbeds.js b/plugins/testbeds/static/js/testbeds.js index e628a679..1050f548 100644 --- a/plugins/testbeds/static/js/testbeds.js +++ b/plugins/testbeds/static/js/testbeds.js @@ -58,30 +58,34 @@ { var selected, prev_selected, num, num_selected, num_prev_selected, filter; - prev_selected = $.map($scope.facility_names, function(x, i) { - return $scope.is_facility_active(x) ? x : null; - }); + // prev_selected = $.map($scope.facility_names, function(x, i) { + // return $scope.is_facility_active(x) ? x : null; + // }); $scope.set_facility_active(facility, ! $scope.is_facility_active(facility)); - - selected = $.map($scope.facility_names, function(x, i) { - return $scope.is_facility_active(x) ? x : null; + + $.each($scope.testbed_names[facility], function(j, testbed_name) { + $scope.select_testbed(facility, testbed_name); }); - - num = $scope.facility_names.length; - prev_num_selected = prev_selected.length; - num_selected = selected.length; - - if ((prev_num_selected != 0) && (prev_num_selected != num)) { - // Remove previous filter - filter = ['facility_name', 'included', prev_selected]; - manifold.raise_event($scope.instance.options.query_uuid, FILTER_REMOVED, filter); - } - - if (num_selected != num) { - filter = ['facility_name', 'included', selected]; - manifold.raise_event($scope.instance.options.query_uuid, FILTER_ADDED, filter); - } + console.log($scope); + // selected = $.map($scope.facility_names, function(x, i) { + // return $scope.is_facility_active(x) ? x : null; + // }); + + // num = $scope.facility_names.length; + // prev_num_selected = prev_selected.length; + // num_selected = selected.length; + + // if ((prev_num_selected != 0) && (prev_num_selected != num)) { + // // Remove previous filter + // filter = ['facility_name', 'included', prev_selected]; + // manifold.raise_event($scope.instance.options.query_uuid, FILTER_REMOVED, filter); + // } +// + // if (num_selected != num) { + // filter = ['facility_name', 'included', selected]; + // manifold.raise_event($scope.instance.options.query_uuid, FILTER_ADDED, filter); + // } }; $scope.select_testbed = function(facility, testbed) @@ -240,7 +244,7 @@ _get_scope : function() { - return angular.element('[ng-controller=TestbedsCtrl]').scope() + return angular.element('[ng-controller=TestbedsCtrl]').scope(); }, /* diff --git a/plugins/testbeds/templates/testbeds.html b/plugins/testbeds/templates/testbeds.html index 296e5efb..6ee26f2a 100644 --- a/plugins/testbeds/templates/testbeds.html +++ b/plugins/testbeds/templates/testbeds.html @@ -1,34 +1,27 @@ -
- -
Facilities
- -
- - {[{ facility_name }]} - -
- -   {[{testbed_name}]} - -
-
- - + diff --git a/portal/static/css/onelab.css b/portal/static/css/onelab.css index 27c6b47a..ef5d3e39 100644 --- a/portal/static/css/onelab.css +++ b/portal/static/css/onelab.css @@ -82,6 +82,10 @@ span.version { font-size:8pt; color:#888888; } +input[type=checkbox] { + min-width:5px !important; + margin-left:0 !important; +} input[type=text], input[type=password], input[type=email], input[type=tel], input[type=number], select, option { min-width:260px; padding:6px; @@ -378,45 +382,52 @@ div.container-resource, div.container-slice { div#slice-view { margin:0; } -div.list-group-item { - border:0; - -moz-border-radius: 0; - border-radius: 0; - background-color:white; - font-weight:bold; - padding-left:0; +div.sl-filter-facilities { + padding:0 5px; } -a.list-group-item { - -moz-border-radius: 0; - border-radius: 0; - border:0; - background-color:white; - padding:3px 2px 3px 10px; - border-left:2pt white solid; +div.sl-filter-facilities h4 { + margin-bottom:15px; + +} +img.sl-image { + margin:0 5px 5px 0; + padding:0; + vertical-align:middle; +} +a.sl-facility { + color:gray; + text-decoration:none; +} +a.sl-facility:hover { + color:#342961; } -a.list-group-item.active, a.list-group-item.active:hover, a.list-group-item.active:focus { - -moz-border-radius: 0; - border-radius: 0; - font-weight: bold; +a.sl-facility.active { color:black; - background-color:#F5F5F5; - border-left:2pt blue solid; + text-decoration:none; } - -a.list-group-item:hover { - -moz-border-radius: 0; - border-radius: 0; - border-left:2pt blue solid; +a.sl-facility::before { + content: " "; } -a.list-group-item p.list-group-item-text { - -moz-border-radius: 0; - border-radius: 0; - font-size:9pt; - font-style:italic; - font-weight: normal; - color: black !important; +div.sl-facilities { + border-bottom:#CCCCCC 1px solid; + padding-bottom:15px; + margin-bottom:15px; +} +div.sl-facilities:last-child { + border:0; +} +a.sl-testbed { + color:gray; + text-decoration:none; + margin-left:25px; + margin-bottom:5px; +} +a.sl-testbed:hover { + color:#342961; +} +a.sl-testbed.active { + color:black; } - span.sl-resources { font-size:9pt; color:gray; diff --git a/portal/static/icons/IoTLab.png b/portal/static/icons/IoTLab.png new file mode 100644 index 00000000..56a8e564 Binary files /dev/null and b/portal/static/icons/IoTLab.png differ diff --git a/portal/static/icons/PlanetLab.png b/portal/static/icons/PlanetLab.png new file mode 100644 index 00000000..a74082a9 Binary files /dev/null and b/portal/static/icons/PlanetLab.png differ diff --git a/portal/static/icons/Wireless.png b/portal/static/icons/Wireless.png new file mode 100644 index 00000000..4db0aa37 Binary files /dev/null and b/portal/static/icons/Wireless.png differ