qill 2 gadi atpakaļ
vecāks
revīzija
fc844a3e8b
1 mainītis faili ar 8 papildinājumiem un 8 dzēšanām
  1. 8 8
      app/run.py

+ 8 - 8
app/run.py

@@ -15,7 +15,7 @@ app.config.from_object('config')
 CORS(app, resources=r'/*')
 
 
-@app.route('/manage', methods=['POST'])
+@app.route('/jpt/manage', methods=['POST'])
 def manage():
     set_config = request.get_data()
     if set_config is None or set_config == "":
@@ -30,7 +30,7 @@ def manage():
     return filename
 
 
-@app.route('/managelist/item=<key_value>')
+@app.route('/jpt/managelist/item=<key_value>')
 def managelist(key_value):
     files = os.listdir('./')
     res = []
@@ -42,7 +42,7 @@ def managelist(key_value):
     dic['sourcelist'] = res
     return json.dumps(res)
 
-@app.route('/show/hive/databases/item=<key_value>')
+@app.route('/jpt/show/hive/databases/item=<key_value>')
 def show_databases(key_value):
     #connection = hive.Connection(host="192.168.2.104", port=7001)
     manager, sourcename = tuple(key_value.split(';'))
@@ -61,7 +61,7 @@ def show_databases(key_value):
     return json.dumps(res)
 
 
-@app.route('/show/hive/tables/item=<key_value>')
+@app.route('/jpt/show/hive/tables/item=<key_value>')
 def show_tables(key_value):
     manager, sourcename ,database = tuple(key_value.split(';'))
     config = ConfigLoader(manager, sourcename).read_config()
@@ -76,7 +76,7 @@ def show_tables(key_value):
     return json.dumps(res)
 
 
-@app.route('/show/hive/results/item=<key_value>')
+@app.route('/jpt/show/hive/results/item=<key_value>')
 def show_results(key_value):
     manager, sourcename, database, table = tuple(key_value.split(';'))
     config = ConfigLoader(manager, sourcename).read_config()
@@ -102,7 +102,7 @@ def show_results(key_value):
         return resp
 
 
-@app.route('/show/mysql/databases/item=<key_value>')
+@app.route('/jpt/show/mysql/databases/item=<key_value>')
 def show_mysql_databases(key_value):
     manager, sourcename = tuple(key_value.split(';'))
     config = ConfigLoader(manager, sourcename)
@@ -111,7 +111,7 @@ def show_mysql_databases(key_value):
     return mysqlcli.LinkMysql(query)
 
 
-@app.route('/show/mysql/tables/item=<key_value>')
+@app.route('/jpt/show/mysql/tables/item=<key_value>')
 def show_mysql_tables(key_value):
     manager, sourcename, database = tuple(key_value.split(';'))
     config = ConfigLoader(manager, sourcename)
@@ -120,7 +120,7 @@ def show_mysql_tables(key_value):
     return mysqlcli.LinkMysql(query, database=database)
 
 
-@app.route('/show/mysql/results/item=<key_value>')
+@app.route('/jpt/show/mysql/results/item=<key_value>')
 def show_mysql_results(key_value):  # put application's code here
     manager, sourcename, database, table = tuple(key_value.split(';'))
     config = ConfigLoader(manager, sourcename)