[ONOS-3851] Add skeletal code of Web GUI for Control Plane Manager

Change-Id: I0df9c55daec0b6d9a630aa954808e6c310ba861c
diff --git a/apps/cpman/app/src/main/resources/app/view/cpman/cpman.js b/apps/cpman/app/src/main/resources/app/view/cpman/cpman.js
new file mode 100644
index 0000000..b2299a63
--- /dev/null
+++ b/apps/cpman/app/src/main/resources/app/view/cpman/cpman.js
@@ -0,0 +1,87 @@
+/*
+ * Copyright 2016 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.
+ */
+
+/*
+ ONOS GUI -- Control Plane Manager View Module
+ */
+(function () {
+    'use strict';
+
+    // injected refs
+    var $log, $scope, wss, ks;
+
+    // constants
+    var dataReq = 'cpmanDataRequest',
+        dataResp = 'cpmanDataResponse';
+
+    function addKeyBindings() {
+        var map = {
+            space: [getData, 'Fetch data from server'],
+
+            _helpFormat: [
+                ['space']
+            ]
+        };
+
+        ks.keyBindings(map);
+    }
+
+    function getData() {
+        wss.sendEvent(dataReq);
+    }
+
+    function respDataCb(data) {
+        $scope.data = data;
+        $scope.$apply();
+    }
+
+
+    angular.module('ovCpman', [])
+        .controller('OvCpmanCtrl',
+        ['$log', '$scope', 'WebSocketService', 'KeyService',
+
+        function (_$log_, _$scope_, _wss_, _ks_) {
+            $log = _$log_;
+            $scope = _$scope_;
+            wss = _wss_;
+            ks = _ks_;
+
+            var handlers = {};
+            $scope.data = {};
+
+            // data response handler
+            handlers[dataResp] = respDataCb;
+            wss.bindHandlers(handlers);
+
+            addKeyBindings();
+
+            // custom click handler
+            $scope.getData = getData;
+
+            // get data the first time...
+            getData();
+
+            // cleanup
+            $scope.$on('$destroy', function () {
+                wss.unbindHandlers(handlers);
+                ks.unbindKeys();
+                $log.log('OvCpmanCtrl has been destroyed');
+            });
+
+            $log.log('OvCpmanCtrl has been created');
+        }]);
+
+}());