CORD Subscriber GUI -- Added sample JSON for driving the GUI, based on current assumptions.
Change-Id: I5286b54d1336415701250f0dc800637bf707b2c0
diff --git a/apps/demo/cord-gui/src/main/resources/org/onosproject/cord/gui/local/bundle-0.json b/apps/demo/cord-gui/src/main/resources/org/onosproject/cord/gui/local/bundle-0.json
new file mode 100644
index 0000000..02adf55
--- /dev/null
+++ b/apps/demo/cord-gui/src/main/resources/org/onosproject/cord/gui/local/bundle-0.json
@@ -0,0 +1,19 @@
+{
+ "bundle": {
+ "name": "Basic Bundle",
+ "functions": [
+ {
+ "id": "internet",
+ "name": "Internet",
+ "active": true,
+ "editable": false
+ },
+ {
+ "id": "firewall",
+ "name": "Firewall",
+ "active": true,
+ "editable": true
+ }
+ ]
+ }
+}
diff --git a/apps/demo/cord-gui/src/main/resources/org/onosproject/cord/gui/local/bundle-1.json b/apps/demo/cord-gui/src/main/resources/org/onosproject/cord/gui/local/bundle-1.json
new file mode 100644
index 0000000..d8809e7
--- /dev/null
+++ b/apps/demo/cord-gui/src/main/resources/org/onosproject/cord/gui/local/bundle-1.json
@@ -0,0 +1,27 @@
+{
+ "bundle": {
+ "name": "Family Bundle",
+ "functions": [
+ {
+ "id": "internet",
+ "name": "Internet",
+ "active": true,
+ "editable": false
+ },
+ {
+ "id": "firewall",
+ "name": "Firewall",
+ "active": true,
+ "editable": true
+ },
+ {
+ "id": "url_filter",
+ "name": "Parental Control",
+ "level": "PG",
+ "levels": [ "PG", "PG-13", "R" ],
+ "active": true,
+ "editable": true
+ }
+ ]
+ }
+}
diff --git a/apps/demo/cord-gui/src/main/resources/org/onosproject/cord/gui/local/dashboard-0.json b/apps/demo/cord-gui/src/main/resources/org/onosproject/cord/gui/local/dashboard-0.json
new file mode 100644
index 0000000..257c933
--- /dev/null
+++ b/apps/demo/cord-gui/src/main/resources/org/onosproject/cord/gui/local/dashboard-0.json
@@ -0,0 +1,23 @@
+{
+ "bundle": {
+ "name": "Basic Bundle",
+ "functions": [
+ {
+ "id": "internet",
+ "name": "Internet",
+ "active": true
+ },
+ {
+ "id": "firewall",
+ "name": "Firewall",
+ "active": true
+ }
+ ]
+ },
+ "users": [
+ { "id": 1, "name": "Mom", "role": "Admin" },
+ { "id": 2, "name": "Dad", "role": "Admin" },
+ { "id": 3, "name": "Dick", "role": "User" },
+ { "id": 4, "name": "Jane", "role": "User" }
+ ]
+}
diff --git a/apps/demo/cord-gui/src/main/resources/org/onosproject/cord/gui/local/dashboard-1.json b/apps/demo/cord-gui/src/main/resources/org/onosproject/cord/gui/local/dashboard-1.json
index 14a916f..a3b76a7f 100644
--- a/apps/demo/cord-gui/src/main/resources/org/onosproject/cord/gui/local/dashboard-1.json
+++ b/apps/demo/cord-gui/src/main/resources/org/onosproject/cord/gui/local/dashboard-1.json
@@ -1,16 +1,29 @@
{
"bundle": {
"name": "Family Bundle",
- "services": [
- "Internet",
- "Firewall",
- "URL Filtering"
+ "functions": [
+ {
+ "id": "internet",
+ "name": "Internet",
+ "active": true
+ },
+ {
+ "id": "firewall",
+ "name": "Firewall",
+ "active": true
+ },
+ {
+ "id": "url_filter",
+ "name": "Parental Control",
+ "level": "PG",
+ "active": true
+ }
]
},
"users": [
- { "name": "Dad", "role": "Admin" },
- { "name": "Mom", "role": "Admin" },
- { "name": "Dick", "role": "User" },
- { "name": "Jane", "role": "User" }
+ { "id": 1, "name": "Mom", "role": "Admin" },
+ { "id": 2, "name": "Dad", "role": "Admin" },
+ { "id": 3, "name": "Dick", "role": "User" },
+ { "id": 4, "name": "Jane", "role": "User" }
]
}
diff --git a/apps/demo/cord-gui/src/main/resources/org/onosproject/cord/gui/local/users-0.json b/apps/demo/cord-gui/src/main/resources/org/onosproject/cord/gui/local/users-0.json
new file mode 100644
index 0000000..b268efd
--- /dev/null
+++ b/apps/demo/cord-gui/src/main/resources/org/onosproject/cord/gui/local/users-0.json
@@ -0,0 +1,28 @@
+{
+ "users": [
+ {
+ "id": 1,
+ "name": "Mom",
+ "role": { "id": "admin", "name": "Admin"},
+ "profile": { }
+ },
+ {
+ "id": 2,
+ "name": "Dad",
+ "role": { "id": "admin", "name": "Admin"}
+ "profile": { }
+ },
+ {
+ "id": 3,
+ "name": "Dick",
+ "role": { "id": "user", "name": "User"}
+ "profile": { }
+ },
+ {
+ "id": 4,
+ "name": "Jane",
+ "role": { "id": "user", "name": "User"}
+ "profile": { }
+ }
+ ]
+}
diff --git a/apps/demo/cord-gui/src/main/resources/org/onosproject/cord/gui/local/users-1.json b/apps/demo/cord-gui/src/main/resources/org/onosproject/cord/gui/local/users-1.json
new file mode 100644
index 0000000..7771f22
--- /dev/null
+++ b/apps/demo/cord-gui/src/main/resources/org/onosproject/cord/gui/local/users-1.json
@@ -0,0 +1,45 @@
+{
+ "users": [
+ {
+ "id": 1,
+ "name": "Mom",
+ "role": { "id": "admin", "name": "Admin"},
+ "profile": {
+ "url_filter": {
+ "enabled": false
+ }
+ }
+ },
+ {
+ "id": 2,
+ "name": "Dad",
+ "role": { "id": "admin", "name": "Admin"},
+ "profile": {
+ "url_filter": {
+ "enabled": false
+ }
+ }
+ },
+ {
+ "id": 3,
+ "name": "Dick",
+ "role": { "id": "user", "name": "User"},
+ "profile": {
+ "url_filter": {
+ "enabled": false
+ }
+ }
+ },
+ {
+ "id": 4,
+ "name": "Jane",
+ "role": { "id": "user", "name": "User"},
+ "profile": {
+ "url_filter": {
+ "enabled": false,
+ "level": "PG"
+ }
+ }
+ }
+ ]
+}