summaryrefslogtreecommitdiffstats
path: root/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-sample/notebookFrameController.js
diff options
context:
space:
mode:
authorshentao <shentao@chinamobile.com>2017-09-01 11:57:47 +0800
committershentao <shentao@chinamobile.com>2017-09-01 11:57:58 +0800
commit57dbba269d19bc59fad89160200bb2dbcccb9003 (patch)
treed466041ceffa2161124ca79a48b3e077777c74b8 /usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-sample/notebookFrameController.js
parent4ff32341a0af1972b44a7410e76e9b231131e7ab (diff)
Upload Monitor function code
Change-Id: I33ad76221b4cb771a298ff240245fc24be664efb Issue-Id: USECASEUI-6 Signed-off-by: shentao <shentao@chinamobile.com>
Diffstat (limited to 'usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-sample/notebookFrameController.js')
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-sample/notebookFrameController.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-sample/notebookFrameController.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-sample/notebookFrameController.js
new file mode 100644
index 00000000..95489918
--- /dev/null
+++ b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-sample/notebookFrameController.js
@@ -0,0 +1,24 @@
+appDS2.controller('notebookFrameController', function ($scope,$location,$window,$http,$routeParams) {
+ var nid = $window.location.search.substr($window.location.search.indexOf("=")+1);
+ $scope.additionalqueryParams={};
+ if ($window.location.search.substr($window.location.search.indexOf("=")+1)) {
+ $scope.queryParams = $window.location.search;
+ if($window.location.search.substring(0, $window.location.search.length-1).indexOf("&")!=-1) {
+ $scope.notebookparam = $window.location.search.substring($window.location.search.indexOf("?")+1,$window.location.search.indexOf("&"));
+ $scope.additionalqueryParams = JSON.parse('{"' + decodeURI($scope.queryParams.substr($scope.queryParams.indexOf("&")+1).replace(/&/g, "\",\"").replace(/=/g,"\":\"")) + '"}');
+ }
+ else {
+ $scope.notebookparam1 = $window.location.search.substr($window.location.search.indexOf("?")+1);
+ $scope.notebookparam = $scope.notebookparam1.substring(0, $scope.notebookparam1.length - 1);
+ }
+ $scope.notebookvalue = $scope.notebookparam.substr($scope.notebookparam.indexOf("=")+1);
+ }
+ else {
+ $scope.notebookvalue = '833c0a69ec1433fbb2f8752af733cf0e';
+ }
+ $http({method:'POST', url:'rNotebookFE/authCr', data: $scope.notebookvalue, params:{'qparams' : $scope.additionalqueryParams}, transformResponse: [function (data) {
+ // Do whatever you want!
+ document.getElementById('itestframe').src = data;
+ return data;
+ }]})
+});