def get(self): userid = self.get_argument("userid") d_user = get_user_by_userid(userid) genders = get_dmm_from_dm('04') depts = get_dmm_from_dm('01') proj_groups = get_dmm_from_dm('18') self.render("./user_edit.html", userid=d_user['userid'], loginname=d_user['loginname'], wkno=d_user['wkno'], username=d_user['username'], password=d_user['password'], gender=d_user['gender'], email=d_user['email'], phone=d_user['phone'], proj_group=d_user['project_group'], dept=d_user['dept'], expire_date=d_user['expire_date'], status=d_user['status'], image_path=d_user['image_path'], image_name=d_user['image_name'], user_image=d_user['image_path'] + '/' + d_user['image_name'], sys_roles=get_sys_roles(userid), user_roles=get_user_roles(userid), genders=genders, depts=depts, proj_groups=proj_groups)
def get(self): port_id = self.get_argument("port_id") d_port = get_port_by_portid(port_id) self.render("./port_edit.html", p_port=d_port, dm_proj_type=get_dmm_from_dm('05'), dm_mapping_type=get_dmm_from_dm('35'))
def get(self): self.render( "./sync_query.html", dm_proj_type=get_dmm_from_dm('05'), dm_sync_ywlx=get_dmm_from_dm('08'), dm_sync_data_type=get_dmm_from_dm('09'), )
def get(self): self.render( "./db_inst_para.html", index_types=get_dmm_from_dm('23'), index_val_types=get_dmm_from_dm('24'), index_db_types=get_dmm_from_dm('02'), )
def get(self): sync_id = self.get_argument("sync_id") d_sync = get_sync_by_syncid(sync_id) self.render( "./sync_clone.html", sync_server=get_sync_server(), db_server=get_sync_db_server(), dm_db_type=get_dmm_from_dm('02'), dm_sync_ywlx=get_dmm_from_dm('08'), dm_sync_data_type=get_dmm_from_dm('09'), dm_sync_time_type=get_dmm_from_dm('10'), server_id=d_sync['server_id'], sour_db_server=d_sync['sour_db_server'], desc_db_server=d_sync['desc_db_server'], sync_tag=d_sync['sync_tag'] + '_clone', sync_ywlx=d_sync['sync_ywlx'], sync_data_type=d_sync['sync_data_type'], script_base=d_sync['script_base'], script_name=d_sync['script_name'], run_time=d_sync['run_time'], task_desc=d_sync['task_desc'] + '_clone', python3_home=d_sync['python3_home'], sync_schema=d_sync['sync_schema'], sync_schema_dest=d_sync['sync_schema_dest'], sync_tables=d_sync['sync_tables'], sync_batch_size=d_sync['sync_batch_size'], sync_batch_size_incr=d_sync['sync_batch_size_incr'], sync_gap=d_sync['sync_gap'], sync_col_name=d_sync['sync_col_name'], sync_col_val=d_sync['sync_col_val'], sync_time_type=d_sync['sync_time_type'], sync_repair_day=d_sync['sync_repair_day'], api_server=d_sync['api_server'], status=d_sync['status'], )
def get(self): sync_tag = self.get_argument("sync_tag") d_sync = get_minio_by_minioid(sync_tag) self.render("./minio_edit.html", sync_tag = d_sync['sync_tag'], task_desc = d_sync['comments'], sync_server = d_sync['server_id'], sync_type = d_sync['sync_type'], sync_dir = d_sync['sync_path'], sync_service = d_sync['sync_service'], minio_server = d_sync['minio_server'], minio_user = d_sync['minio_user'], minio_pass = d_sync['minio_pass'], python3_home = d_sync['python3_home'], script_base = d_sync['script_path'], script_name = d_sync['script_file'], run_time = d_sync['run_time'], api_server = d_sync['api_server'], status = d_sync['status'], minio_bucket = d_sync['minio_bucket'], minio_dpath = d_sync['minio_dpath'], minio_incr = d_sync['minio_incr'], minio_incr_type= d_sync['minio_incr_type'], dm_sync_server = get_sync_server(), dm_sync_type = get_dmm_from_dm('34'), dm_sync_time_type=get_dmm_from_dm('10') )
def get(self): archive_id = self.get_argument("archive_id") d_archive = get_archive_by_archiveid(archive_id) self.render( "./archive_clone.html", dm_db_type=get_dmm_from_dm('02'), dm_archive_server=get_sync_server(), dm_archive_type=get_dmm_from_dm('09'), dm_archive_time_type=get_dmm_from_dm('20'), dm_archive_rentition=get_dmm_from_dm('21'), dm_archive_instance=get_sync_db_server_by_type( d_archive['archive_db_type'])['message'], archive_id=archive_id, archive_tag=d_archive['archive_tag'] + '_clone', task_desc=d_archive['comments'] + '_clone', archive_server=d_archive['server_id'], archive_db_type=d_archive['archive_db_type'], sour_db_id=d_archive['sour_db_id'], sour_schema=d_archive['sour_schema'], sour_table=d_archive['sour_table'], archive_time_col=d_archive['archive_time_col'], archive_rentition=d_archive['archive_rentition'], rentition_time=d_archive['rentition_time'], rentition_time_type=d_archive['rentition_time_type'], if_cover=d_archive['if_cover'], dest_db_id=d_archive['dest_db_id'], dest_schema=d_archive['dest_schema'], script_path=d_archive['script_path'], script_name=d_archive['script_file'], run_time=d_archive['run_time'], python3_home=d_archive['python3_home'], batch_size=d_archive['batch_size'], api_server=d_archive['api_server'], status=d_archive['status'], )
def get(self): self.render("./backup_log_analyze.html", dm_env_type=get_dmm_from_dm('03'), dm_db_type=get_dmm_from_dm('02'), db_backup_tags=get_db_backup_tags(), begin_date=get_day_nday_ago(now(), 15), end_date=get_day_nday_ago(now(), 0))
def get(self): self.render( "./monitor_index.html", index_types=get_dmm_from_dm('23'), index_val_types=get_dmm_from_dm('24'), index_db_types=get_dmm_from_dm('02'), )
def get(self): logon_name = str(self.get_secure_cookie("username"), encoding="utf-8") self.render( "./sql_release.html", dss=get_dss_sql_release(logon_name), vers=get_dmm_from_dm('12'), orders=get_dmm_from_dm('13'), )
def get(self): self.render("./ds_add.html", dm_proj_type=get_dmm_from_dm('05'), dm_db_type=get_dmm_from_dm('02'), dm_inst_type=get_dmm_from_dm('07'), dm_env_type=get_dmm_from_dm('03'), dm_ds_proxy=get_dmm_from_dm('26') )
def get(self): self.render("./sync_add.html", sync_server=get_sync_server(), db_server=get_sync_db_server(), dm_db_type=get_dmm_from_dm('02'), dm_sync_ywlx=get_dmm_from_dm('08'), dm_sync_data_type=get_dmm_from_dm2('09', '1,2,3,4'), dm_sync_time_type=get_dmm_from_dm('10'))
def get(self): logon_name = str(self.get_secure_cookie("username"), encoding="utf-8") userid = str(self.get_secure_cookie("userid"), encoding="utf-8") self.render("./order_query.html", order_dss=get_dss_order(logon_name), vers=get_dmm_from_dm('12'), order_types=get_dmm_from_dm('17'), order_handles=get_users_from_proj(userid), order_status=get_dmm_from_dm('19'))
def get(self): self.render( "./archive_add.html", archive_server=get_sync_server(), dm_db_type=get_dmm_from_dm('02'), dm_archive_type=get_dmm_from_dm('09'), dm_archive_time_type=get_dmm_from_dm('20'), dm_archive_rentition=get_dmm_from_dm('21'), )
def get(self): self.render( "./db_inst_create.html", dm_inst_type=get_dmm_from_dm('02'), dm_inst_env=get_dmm_from_dm('03'), dm_db_server=get_gather_server(), dm_inst_ver=get_dmm_from_dm('27'), dm_inst_cfg=get_sys_dmlx_from_dm('30'), )
def get(self): roles = get_roles() gender = get_dmm_from_dm('04') dept = get_dmm_from_dm('01') proj_group = get_dmm_from_dm('18') self.render("./user_add.html", roles=roles, gender=gender, dept=dept, proj_group=proj_group)
def get(self): self.render("./sync_bigdata_add.html", sync_server=get_sync_server(), db_server=get_datax_sync_db_server(), dm_db_type=get_dmm_from_dm('02'), dm_sync_ywlx=get_dmm_from_dm('08'), dm_sync_data_type=get_dmm_from_dm2('09', '5,6'), dm_sync_time_type=get_dmm_from_dm('10'), dm_sync_zk_host=get_dmm_from_dm('15'), dm_sync_hbase_thrift=get_dmm_from_dm('16'))
def get(self): self.render( "./slow_change.html", dm_env_type=get_dmm_from_dm('03'), dm_inst_names=get_inst_names(''), dm_db_server=get_gather_server(), )
def get(self): transfer_id = self.get_argument("transferid") d_transfer = get_transfer_by_transferid(transfer_id) self.render( "./transfer_edit.html", transfer_server=get_sync_server(), dm_transfer_type=get_dmm_from_dm('09'), db_server=get_sync_db_server(), transfer_id=transfer_id, transfer_tag=d_transfer['transfer_tag'], transfer_db_type=d_transfer['transfer_type'], task_desc=d_transfer['task_desc'], server_id=d_transfer['server_id'], sour_db_id=d_transfer['sour_db_id'], sour_schema=d_transfer['sour_schema'], sour_table=d_transfer['sour_table'], sour_where=d_transfer['sour_where'], dest_db_id=d_transfer['dest_db_id'], dest_schema=d_transfer['dest_schema'], script_path=d_transfer['script_path'], script_name=d_transfer['script_file'], python3_home=d_transfer['python3_home'], batch_size=d_transfer['batch_size'], api_server=d_transfer['api_server'], status=d_transfer['status'], )
def get(self): self.render( "./backup_add.html", backup_server=get_backup_server(), db_server=get_db_backup_server(), dm_db_type=get_dmm_from_dm('02'), )
def get(self): self.render( "./transfer_add.html", sync_server=get_sync_server(), db_server=get_sync_db_server(), dm_transfer_type=get_dmm_from_dm('09'), )
def get(self): server_id = self.get_argument("serverid") d_server = get_server_by_serverid(server_id) markets = get_dmm_from_dm('05') self.render("./server_edit.html", markets=markets, dm_server_type=get_dmm_from_dm('06'), server_id=d_server['server_id'], market_id=d_server['market_id'], server_desc=d_server['server_desc'], server_type=d_server['server_type'], server_ip=d_server['server_ip'], server_port=d_server['server_port'], server_user=d_server['server_user'], server_pass=d_server['server_pass'], server_os=d_server['server_os'], server_cpu=d_server['server_cpu'], server_mem=d_server['server_mem'], status=d_server['status'])
def get(self): username = str(self.get_secure_cookie("username"), encoding="utf-8") userid = str(self.get_secure_cookie("userid"), encoding="utf-8") d_user = get_user_by_loginame(username) genders = get_dmm_from_dm('04') depts = get_dmm_from_dm('01') proj_groups = get_dmm_from_dm('18') print('index->userid=', userid) if username: self.render("index.html", china_rq=china_rq(), china_week=china_week(), china_time=china_time(), welcome=welcome(d_user['username']), userid=d_user['userid'], loginname=d_user['loginname'], wkno=d_user['wkno'], username=d_user['username'], password=d_user['password'], gender=d_user['gender'], email=d_user['email'], phone=d_user['phone'], proj_group=d_user['project_group'], dept=d_user['dept'], expire_date=d_user['expire_date'], status=d_user['status'], file_path=d_user['file_path'], file_name=d_user['file_name'], user_image=d_user['file_path'] + '/' + d_user['file_name'], user_roles=get_user_roles(userid), genders=genders, depts=depts, d_user=d_user, proj_groups=proj_groups, view_url=self.get_secure_cookie("view_url")) else: self.render("page-404.html")
def get(self): dsid=self.get_argument("dsid") d_ds =get_ds_by_dsid(dsid) self.render("./ds_clone.html", market_id = d_ds['market_id'], inst_type = d_ds['inst_type'], db_type = d_ds['db_type'], db_env = d_ds['db_env'], dm_db_type = get_dmm_from_dm('02'), dm_db_env = get_dmm_from_dm('03'), dm_inst_type = get_dmm_from_dm('07'), dm_proj_type = get_dmm_from_dm('05'), dm_ds_proxy = get_dmm_from_dm('26'), db_desc = d_ds['db_desc'], ip = d_ds['ip'], port = d_ds['port'], service = d_ds['service'], user = d_ds['user'], password = d_ds['password'], status = d_ds['status'], proxy_status = d_ds['proxy_status'], proxy_server = d_ds['proxy_server'], )
def get(self): backup_id = self.get_argument("backupid") d_backup = get_backup_by_backupid(backup_id) markets = get_dmm_from_dm('05') self.render("./backup_edit.html", backup_id=d_backup['backup_id'], server_id=d_backup['server_id'], db_id=d_backup['db_id'], db_type=d_backup['db_type'], backup_tag=d_backup['backup_tag'], backup_expire=d_backup['backup_expire'], backup_base=d_backup['backup_base'], script_base=d_backup['script_base'], script_name=d_backup['script_name'], cmd_name=d_backup['cmd_name'], run_time=d_backup['run_time'], comments=d_backup['comments'], python3_home=d_backup['python3_home'], backup_databases=d_backup['backup_databases'], api_server=d_backup['api_server'], status=d_backup['status'], backup_server=get_backup_server(), db_server=get_db_backup_server(), dm_db_type=get_dmm_from_dm('02'))
def get(self): sync_id = self.get_argument("sync_id") d_sync = query_datax_by_id(sync_id) self.render( "./sync_bigdata_clone.html", sync_id=sync_id, sync_server=get_sync_server(), db_server=get_datax_sync_db_server(), dm_db_type=get_dmm_from_dm('02'), dm_sync_ywlx=get_dmm_from_dm('08'), dm_sync_data_type=get_dmm_from_dm('09'), dm_sync_time_type=get_dmm_from_dm('10'), dm_sync_zk_host=get_dmm_from_dm('15'), dm_sync_hbase_thrift=get_dmm_from_dm('16'), sync_tag=d_sync['sync_tag'].split('_v')[0] + '_v' + str(int(d_sync['sync_tag'].split('_v')[1]) + 1), server_id=d_sync['server_id'], sour_db_server=d_sync['sour_db_id'], sync_schema=d_sync['sync_schema'], sync_table=d_sync['sync_table'], sync_columns=d_sync['sync_columns'], sync_incr_col=d_sync['sync_incr_col'], zk_hosts=d_sync['zk_hosts'], hbase_thrift=d_sync['hbase_thrift'], sync_hbase_table=d_sync['sync_hbase_table'], sync_hbase_rowkey=d_sync['sync_hbase_rowkey_sour'], sync_hbase_rowkey_s=d_sync['sync_hbase_rowkey_separator'], es_service=d_sync['es_service'], es_index_name=d_sync['es_index_name'], es_type_name=d_sync['es_type_name'], sync_ywlx=d_sync['sync_ywlx'], sync_type=d_sync['sync_type'], script_path=d_sync['script_path'], run_time=d_sync['run_time'], comments=d_sync['comments'].split('_v')[0] + '_v' + str(int(d_sync['sync_tag'].split('_v')[1]) + 1), datax_home=d_sync['datax_home'], sync_time_type=d_sync['sync_time_type'], sync_gap=d_sync['sync_gap'], api_server=d_sync['api_server'], status=d_sync['status'], python3_home=d_sync['python3_home'], )
def post(self): result = get_dmm_from_dm('19') self.write({"message": result})
def post(self): self.set_header("Content-Type", "application/json; charset=UTF-8") dm = self.get_argument("dm") v_list = get_dmm_from_dm(dm) v_json = json.dumps(v_list) self.write(v_json)
def get(self): logon_name = str(self.get_secure_cookie("username"), encoding="utf-8") self.render("./sql_run.html", run_dss=get_dss_sql_run(logon_name), vers=get_dmm_from_dm('12'))
def get(self): self.render( "./monitor_templete.html", monitor_indexes=get_monitor_indexes(), templete_types=get_dmm_from_dm('23'), )