def __init__(self): self.settings = serverTools.getCMSSettings() if self.settings == None: self.settings = cmsSettings.Settings() serverTools.setCMSSettings(self.settings) self.logger = serverTools.getLogger() self.timezoneoffset = None
def __init__(self): self.settings = serverTools.getCMSSettings() if self.settings == None: self.settings = cmsSettings.Settings() serverTools.setCMSSettings(self.settings) self.logger = serverTools.getLogger() self.max_node_id_limit = 32
def __init__(self): self.settings = serverTools.getCMSSettings() if self.settings == None: self.settings = cmsSettings.Settings() serverTools.setCMSSettings(self.settings) self.logger = serverTools.getLogger() self.max_node_id_limit = 32
def __init__(self): self.settings = serverTools.getCMSSettings() if self.settings == None: self.settings = cmsSettings.Settings() serverTools.setCMSSettings(self.settings) self.logger = serverTools.getLogger() self.csvdownloadlimit_mb = 10 # 5 years of daily data self.max_npoints_returned = 1825 // Load different storage engines require "Modules/feed/engine/MysqlTimeSeries.php"; require "Modules/feed/engine/Timestore.php"; require "Modules/feed/engine/PHPTimestore.php"; require "Modules/feed/engine/Histogram.php"; require "Modules/feed/engine/PHPTimeSeries.php"; require "Modules/feed/engine/GraphiteTimeSeries.php"; // Development engines require "Modules/feed/engine/PHPFina.php"; require "Modules/feed/engine/PHPFiwa.php"; // Backwards compatibility if (!isset($settings)) $settings= array(); if (!isset($settings['timestore'])) { global $timestore_adminkey; $settings['timestore'] = array('adminkey'=>$timestore_adminkey); }
def __init__(self): self.settings = serverTools.getCMSSettings() self.logger = serverTools.getLogger()
# -*- coding: utf-8 -*- from flask import render_template, session, request, jsonify, redirect, url_for from flask.ext.api import status import json import hashlib import ast from ironworks import serverTools from ironworks.noneditable import * from modules_lib.pyEMONCMS import cmsSettings from modules_lib.pyEMONCMS.models.user import user_model from modules_lib.pyEMONCMS.models.input import input_model from modules_lib.pyEMONCMS.models.node import node_model cms = serverTools.getCMSSettings() app = serverTools.getApp() logger = serverTools.getLogger() def login(username, password, dbConn): # Using prepared Statements means that SQL injection is not possible. c = dbConn.cursor() if c.execute( """SELECT user_k, username, password FROM users WHERE username = %s LIMIT 1""", (username)) is not None: result = c.fetchone() try: username = result[1] db_password = result[2] except: logger.log("Failed login for Admin. User does not exits", "WARNING")
# -*- coding: utf-8 -*- from flask import render_template, session, request, jsonify, redirect, url_for from flask.ext.api import status import json import hashlib import ast from ironworks import serverTools from ironworks.noneditable import * from modules_lib.pyEMONCMS import cmsSettings from modules_lib.pyEMONCMS.models.user import user_model from modules_lib.pyEMONCMS.models.input import input_model from modules_lib.pyEMONCMS.models.node import node_model cms = serverTools.getCMSSettings() app = serverTools.getApp() logger = serverTools.getLogger() def login(username, password, dbConn): # Using prepared Statements means that SQL injection is not possible. c = dbConn.cursor() if c.execute("""SELECT user_k, username, password FROM users WHERE username = %s LIMIT 1""", (username)) is not None: result = c.fetchone() try: username = result[1] db_password = result[2] except: logger.log("Failed login for Admin. User does not exits", "WARNING") if db_password == password: # Check if the password in the database matches the password the user submitted. # Password is correct! session['user'] = username
def __init__(self): self.feed = None self.timestore_adminkey = None self.result = False self.logger = serverTools.getLogger() self.settings = serverTools.getCMSSettings()