diff --git a/admin/app/config.highcharts.js b/admin/app/config.highcharts.js
deleted file mode 100644
index ec762bee..00000000
--- a/admin/app/config.highcharts.js
+++ /dev/null
@@ -1,63 +0,0 @@
-Highcharts.theme = {
- // colors:['#01A4CD','#25C43F','#E07326','#E0F300','#0CD7E8','#34EB7E','#FFAC62','#FFF570','#39FACA','#87E6FF'], //skin1-g
- // colors:['#049FDC','#43C166','#E96D46','#E9F200','#1DD4F0','#55EAA0','#FFA788','#FFF494','#5BFADB','#A5E4FF'], //skin2-g
- //colors:['#01A6D7','#29C659','#E1763B','#E1F300','#0ED8ED','#38EC94','#FFAE7B','#FFF588','#3EFBD5','#8BE6FF'], //skin3-g
- colors : ['#1abc9c', '#f1c40f', '#2ecc71', '#e67e22', '#3498db', '#e74c3c', '#9b59b6', '#95a5a6', '#34495e'], //flat colors
- // colors: ['#4572A7','#AA4643','#89A54E','#80699B','#3D96AE','#DB843D','#92A8CD','#A47D7C','#B5CA92'], //default
- // colors:['#50B432', '#ED561B', '#DDDF00', '#24CBE5', '#64E572', '#FF9655', '#FFF263','#6AF9C4'],
- tooltip : {
- headerFormat: '{point.key}
',
- pointFormat: '{series.name}: | ' +
- '{point.y} |
',
- footerFormat: '
',
- shared: true,
- useHTML: true,
- valueDecimals: 3,
-
- // dateTimeLabelFormats:{
- // minute:'%Y-%m-%d %H:%M',
- // hour : '%Y-%m-%d %H:%M',
- // day : '%Y-%m-%d',
- // month : '%Y-%m',
- // year : '%Y'
- // },
-
- // formatter:function (){
- // return ''+Highcharts.dateFormat('%y-%m-%d %H:%M',new Date(this.x))
- // + '~' + Highcharts.dateFormat('%H:%M',new Date(this.x+1000*60*30))
- // + ':
'+
- // this.series.name + ':'+
- // this.y.toFixed(3) +'';
- // },
- },
- chart:{
- height:300
- },
- yAxis : {
- //min : 0,
- //startOnTick : false,
- title : {
- text : null
- },
- //showLastLabel:true,
- },
- title:{
- text:null
- },
- legend:{
- enabled:true,
- //maxHeight:60,
- //labelFormatter:function(){return this.name.substring(0,50);}
- }
-};
-Highcharts.setOptions(Highcharts.theme);
-Highcharts.setOptions({
- global : {
- useUTC : false,
- //timezoneOffset: -480,
- },
- credits : {
- enabled : false
- },
-
-});
\ No newline at end of file
diff --git a/admin/app/controllers/charts/multibarchart.js b/admin/app/controllers/charts/multibarchart.js
deleted file mode 100644
index 16594f15..00000000
--- a/admin/app/controllers/charts/multibarchart.js
+++ /dev/null
@@ -1,101 +0,0 @@
-'use strict';
-
-app.controller('MultiBarChartController', function($scope,highchartsNG) {
-
- $scope.$on('handleBroadcastLineOptionChanged', function(event, data) {
- if(angular.isDefined(data.load)){
- $scope.multiConfig.loading=true;
- }else{
- $scope.multiConfig.series=data.equipment;
- $scope.multiConfig.loading=false;
- }
- });
-
-
- $scope.mouseEvent = function(chart) {
- angular.element('.chart').bind('mousedown.hc touchstart.hc', function(eStart) {
- eStart = chart.pointer.normalize(eStart);
-
- var posX = eStart.pageX,
- posY = eStart.pageY,
- alpha = chart.options.chart.options3d.alpha,
- beta = chart.options.chart.options3d.beta,
- newAlpha,
- newBeta,
- sensitivity = 5; // lower is more sensitive
-
- angular.element(document).bind({
- 'mousemove.hc touchdrag.hc': function(e) {
- // Run beta
- newBeta = beta + (posX - e.pageX) / sensitivity;
- chart.options.chart.options3d.beta = newBeta;
-
- // Run alpha
- newAlpha = alpha + (e.pageY - posY) / sensitivity;
- chart.options.chart.options3d.alpha = newAlpha;
-
- chart.redraw(false);
- },
- 'mouseup touchend': function() {
- angular.element(document).unbind('.hc');
- }
- });
- });
- };
- $scope.multiConfig = {
-
- options: {
- chart: {
- type: 'column',
- options3d: {
- enabled: true,
- alpha: 10,
- beta: 15,
- depth: 70
- }
-
- },
- plotOptions: {
- column: {
- depth: 25
- }
- },
-
- navigator: {
- xAxis: {
- type: 'datetime',
- labels: {
- formatter: function() {
- var dateStr = Highcharts.dateFormat('%m-%d', this.value);
- return dateStr;
- },
- },
- },
- },
- xAxis: {
- startOnTick: false,
- type: 'datetime',
- labels: {
- formatter: function() {
- var dateStr = Highcharts.dateFormat('%m-%d', this.value);
- return dateStr;
- },
- },
- crosshair: null
- },
-
- },
- loading:true,
- series: [],
- //noData:'No data to display',
-
- func: function(chart) {
- $scope.mouseEvent(chart);
- }
-
- };
-
-
-
-
-});
\ No newline at end of file
diff --git a/admin/app/controllers/charts/piechart.js b/admin/app/controllers/charts/piechart.js
deleted file mode 100644
index d0b9a8bd..00000000
--- a/admin/app/controllers/charts/piechart.js
+++ /dev/null
@@ -1,61 +0,0 @@
-'use strict';
-
-app.controller('PieChartController', function($scope,highchartsNG) {
-
- $scope.$on('handleBroadcastLineOptionChanged', function(event, data) {
- if(angular.isDefined(data.load)){
- $scope.pieConfig.loading=true;
- }else{
- $scope.pieConfig.series[0].data=data.equipment_percentage;
- $scope.pieConfig.loading=false;
- }
- });
-
-
- $scope.pieConfig = {
- options: {
- chart: {
- type: 'pie',
- options3d: {
- enabled: true,
- alpha: 45
- }
-
- },
- tooltip: {
- pointFormat: ' {point.percentage:.1f}%'
- },
- plotOptions: {
- pie: {
- innerSize: 100,
- depth: 45,
- //allowPointSelect: true,
- cursor: 'pointer',
- dataLabels: {
- enabled: true,
- format: '{point.name}: {point.percentage:.1f} %',
- style: {
- color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
- }
- }
- }
- },
- },
- series: [{
- name: 'Percentage',
- colorByPoint: true,
- data: []
- }],
-
- //noData:'No data to display',
- loading:true,
-
- title: {
- text: null
- },
- //useHighStocks: true
-
- };
-
-
-});
\ No newline at end of file
diff --git a/admin/app/controllers/charts/singlebarchart.js b/admin/app/controllers/charts/singlebarchart.js
deleted file mode 100644
index ec1d23a2..00000000
--- a/admin/app/controllers/charts/singlebarchart.js
+++ /dev/null
@@ -1,125 +0,0 @@
-'use strict';
-
-app.controller('SingleBarChartController', function($scope,highchartsNG) {
-
- $scope.$on('handleBroadcastLineOptionChanged', function(event, data) {
- if(angular.isDefined(data.load)){
- $scope.singleConfig.loading=true;
- $scope.dynamic=[];
- }else{
- $scope.singleConfig.series=data.line;
- $scope.singleConfig.loading=false;
- if(angular.isDefined(data.category)){
-
- angular.forEach(data.category,function(item,key){
- item.chart=$scope.getChartConfig(item);
- });
- $scope.dynamic=data.category;
- }
-
- }
-
-
- });
-
- $scope.getChartConfig=function(item){
- var newchart=angular.copy($scope.singleConfig);
- newchart.series=item.metadata;
- return newchart;
- };
-
- $scope.singleConfig = {
- options: {
- chart: {
- type: 'column',
- options3d: {
- enabled: true,
- alpha: 10,
- beta: 15,
- depth: 70
- }
-
- },
-
- legend: {
- enabled: false
- },
-
- plotOptions: {
- column: {
- depth: 25
- }
- },
- navigator: {
- xAxis: {
- type: 'datetime',
- labels: {
- formatter: function() {
- var dateStr = Highcharts.dateFormat('%m-%d', this.value);
- return dateStr;
- },
- },
- },
- },
- xAxis: {
- startOnTick: false,
- type: 'datetime',
- labels: {
- formatter: function() {
- var dateStr = Highcharts.dateFormat('%m-%d', this.value);
- return dateStr;
- },
- },
- crosshair: null
- },
-
-
- },
- loading:true,
-
- series: [],
- //noData: 'No data to display',
-
- func: function(chart) {
- $scope.mouseEvent(chart);
- }
-
-
- };
-
-
-
- $scope.mouseEvent = function(chart) {
- angular.element('.chart').bind('mousedown.hc touchstart.hc', function(eStart) {
- eStart = chart.pointer.normalize(eStart);
-
- var posX = eStart.pageX,
- posY = eStart.pageY,
- alpha = chart.options.chart.options3d.alpha,
- beta = chart.options.chart.options3d.beta,
- newAlpha,
- newBeta,
- sensitivity = 5; // lower is more sensitive
-
- angular.element(document).bind({
- 'mousemove.hc touchdrag.hc': function(e) {
- // Run beta
- newBeta = beta + (posX - e.pageX) / sensitivity;
- chart.options.chart.options3d.beta = newBeta;
-
- // Run alpha
- newAlpha = alpha + (e.pageY - posY) / sensitivity;
- chart.options.chart.options3d.alpha = newAlpha;
-
- chart.redraw(false);
- },
- 'mouseup touchend': function() {
- angular.element(document).unbind('.hc');
- }
- });
- });
- };
-
-
-
-});
\ No newline at end of file
diff --git a/admin/app/controllers/main.controller.js b/admin/app/controllers/main.controller.js
index b8aa456f..291b6627 100644
--- a/admin/app/controllers/main.controller.js
+++ b/admin/app/controllers/main.controller.js
@@ -53,8 +53,6 @@ app.controller('MainController', [
};
$rootScope.isAdminCookie=function(){
- // var admin_uuid="dfa793a3-1a1d-49be-ad46-99f4196079de";
- // var cur_cookie="dfa793a3-1a1d-49be-ad46-99f4196079de";
var currentUser = undefined;
if ($window.localStorage.getItem("currentUser")){
currentUser = JSON.parse($window.localStorage.getItem("currentUser"));
@@ -64,11 +62,6 @@ app.controller('MainController', [
}else{
return false;
}
- // if(cur_cookie==admin_uuid){
- // return true;
- // }else{
- // return false;
- // }
}
}
]);