Simon Hunt

CORD Subscriber GUI -- Minor tweaks.

Change-Id: I0cfcb4702366170d433b4d9b45d36b59a24597df
/*
* Copyright 2015 Open Networking Laboratory
*
* 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.
*
*/
package org.onosproject.cord.gui;
/**
* In memory cache of the model of the subscriber's account.
*/
public class CordModelCache {
}
......@@ -59,4 +59,12 @@ public class CordWebResource {
return fakeData("users", suffix);
}
@GET
@Produces(MediaType.APPLICATION_JSON)
@Path("dashboard")
public Response dashboard() {
// TODO:
return Response.ok().build();
}
}
......
......@@ -44,7 +44,7 @@ public class BundleFactory {
new DefaultBundleDescriptor(FAMILY_ID, FAMILY_DISPLAY_NAME,
XosFunctionDescriptor.INTERNET,
XosFunctionDescriptor.FIREWALL,
XosFunctionDescriptor.URL_FILTERING);
XosFunctionDescriptor.URL_FILTER);
/**
* Returns the list of available bundles.
......
......@@ -38,9 +38,9 @@ public enum XosFunctionDescriptor {
/**
* URL Filtering function (parental controls).
*/
URL_FILTERING("url_filtering",
"Parental Control",
"Variable levels of URL filtering.");
URL_FILTER("url_filter",
"Parental Control",
"Variable levels of URL filtering.");
private final String id;
private final String displayName;
......
......@@ -16,5 +16,9 @@
"params": {}
}
]
}
},
"bundles": [
{ "id": "basic", "name": "Basic Bundle" },
{ "id": "family", "name": "Family Bundle" }
]
}
......
......@@ -16,7 +16,7 @@
"params": {}
},
{
"id": "url_filtering",
"id": "url_filter",
"name": "Parental Control",
"desc": "Variable levels of URL filtering",
"params": {
......@@ -25,5 +25,9 @@
}
}
]
}
},
"bundles": [
{ "id": "basic", "name": "Basic Bundle" },
{ "id": "family", "name": "Family Bundle" }
]
}
......
......@@ -5,7 +5,7 @@
"name": "Mom's MacBook",
"mac": "01:02:03:04:05:06",
"profile": {
"url_filtering": {
"url_filter": {
"level": "R"
}
}
......@@ -15,7 +15,7 @@
"name": "Dad's iPad",
"mac": "01:02:03:04:05:77",
"profile": {
"url_filtering": {
"url_filter": {
"level": "R"
}
}
......@@ -25,7 +25,7 @@
"name": "Dick's laptop",
"mac": "01:02:03:04:05:88",
"profile": {
"url_filtering": {
"url_filter": {
"level": "PG-13"
}
}
......@@ -35,7 +35,7 @@
"name": "Jane's laptop",
"mac": "01:02:03:04:05:99",
"profile": {
"url_filtering": {
"url_filter": {
"level": "PG"
}
}
......
......@@ -43,7 +43,7 @@ public class BundleFactoryTest {
Set<XosFunctionDescriptor> funcs = bundle.functions();
assertTrue("missing internet", funcs.contains(INTERNET));
assertTrue("missing firewall", funcs.contains(FIREWALL));
assertFalse("unexpected url-f", funcs.contains(URL_FILTERING));
assertFalse("unexpected url-f", funcs.contains(URL_FILTER));
}
@Test
......@@ -54,7 +54,7 @@ public class BundleFactoryTest {
Set<XosFunctionDescriptor> funcs = bundle.functions();
assertTrue("missing internet", funcs.contains(INTERNET));
assertTrue("missing firewall", funcs.contains(FIREWALL));
assertTrue("missing url-f", funcs.contains(URL_FILTERING));
assertTrue("missing url-f", funcs.contains(URL_FILTER));
}
}
......
......@@ -49,8 +49,8 @@ public class XosFunctionDescriptorTest {
@Test
public void urlFiltering() {
assertEquals("wrong id", "url_filtering", URL_FILTERING.id());
assertEquals("wrong display", "Parental Control", URL_FILTERING.displayName());
assertTrue("wrong desc", URL_FILTERING.description().startsWith("Variable"));
assertEquals("wrong id", "url_filtering", URL_FILTER.id());
assertEquals("wrong display", "Parental Control", URL_FILTER.displayName());
assertTrue("wrong desc", URL_FILTER.description().startsWith("Variable"));
}
}
......