Skip to content

Commit 82f6511

Browse files
committed
[FIX] Init routes & commons JS error
1 parent bd5bd95 commit 82f6511

File tree

3 files changed

+6
-79
lines changed

3 files changed

+6
-79
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from flask import Blueprint
22

3-
from app.blueprints.rest.v2.auth import auth_bp
3+
from app.blueprints.rest.v2.auth import auth_blueprint
44
from app.blueprints.rest.v2.alerts import alerts_bp
55
from app.blueprints.rest.v2.dashboard import dashboard_bp
66

@@ -10,6 +10,6 @@
1010

1111

1212
# Register child blueprints
13-
rest_v2_bp.register_blueprint(auth_bp)
13+
rest_v2_bp.register_blueprint(auth_blueprint)
1414
rest_v2_bp.register_blueprint(alerts_bp)
1515
rest_v2_bp.register_blueprint(dashboard_bp)

source/app/blueprints/rest/v2/auth/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@
3636
from app.schema.marshables import UserSchema
3737

3838

39-
auth_bp = Blueprint('auth', __name__, url_prefix='/auth')
39+
auth_blueprint = Blueprint('auth', __name__, url_prefix='/auth')
4040

4141

42-
@auth_bp.post('/login')
42+
@auth_blueprint.post('/login')
4343
def login():
4444
"""
4545
Login endpoint. Handles taking user/pass combo and authenticating a local session or returning an error.
@@ -67,7 +67,7 @@ def login():
6767
return response_api_success(data=authed_user)
6868

6969

70-
@auth_bp.get('/logout')
70+
@auth_blueprint.get('/logout')
7171
def logout():
7272
"""
7373
Logout function. Erase its session and redirect to index i.e login
@@ -106,7 +106,7 @@ def logout():
106106
return redirect(not_authenticated_redirection_url('/'))
107107

108108

109-
@auth_bp.route('/whoami', methods=['GET'])
109+
@auth_blueprint.route('/whoami', methods=['GET'])
110110
def whoami():
111111
"""
112112
Returns information about the currently authenticated user.

ui/src/pages/common.js

Lines changed: 0 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,79 +1166,6 @@ function load_menu_mod_options(data_type, table, deletion_fn, additionalOptions
11661166
if (data.data != null) {
11671167
jsdata = data.data;
11681168

1169-
actionOptions.items.push({
1170-
type: 'option',
1171-
title: 'Share',
1172-
multi: false,
1173-
iconClass: 'fas fa-share',
1174-
action: function(rows) {
1175-
let row = rows[0];
1176-
copy_object_link(get_row_id(row));
1177-
}
1178-
});
1179-
1180-
actionOptions.items.push({
1181-
type: 'option',
1182-
title: 'Comment',
1183-
multi: false,
1184-
iconClass: 'fas fa-comments',
1185-
action: function(rows) {
1186-
let row = rows[0];
1187-
if (data_type in datatype_map) {
1188-
comment_element(get_row_id(row), datatype_map[data_type]);
1189-
}
1190-
}
1191-
});
1192-
1193-
actionOptions.items.push({
1194-
type: 'option',
1195-
title: 'Markdown Link',
1196-
multi: false,
1197-
iconClass: 'fa-brands fa-markdown',
1198-
action: function(rows) {
1199-
let row = rows[0];
1200-
copy_object_link_md(data_type, get_row_id(row));
1201-
}
1202-
});
1203-
1204-
actionOptions.items.push({
1205-
type: 'option',
1206-
title: 'Copy',
1207-
multi: false,
1208-
iconClass: 'fa-regular fa-copy',
1209-
action: function(rows) {
1210-
let row = rows[0];
1211-
copy_text_clipboard(get_row_value(row));
1212-
}
1213-
});
1214-
1215-
additionalOptions.forEach(option => {
1216-
actionOptions.items.push(option);
1217-
});
1218-
1219-
actionOptions.items.push({
1220-
type: 'divider'
1221-
});
1222-
1223-
jdata_menu_options = jsdata;
1224-
1225-
for (let option in jsdata) {
1226-
let opt = jsdata[option];
1227-
1228-
actionOptions.items.push({
1229-
type: 'option',
1230-
title: opt.manual_hook_ui_name,
1231-
multi: true,
1232-
multiTitle: opt.manual_hook_ui_name,
1233-
iconClass: 'fas fa-rocket',
1234-
contextMenuClasses: ['text-dark'],
1235-
action: function(rows, de, ke) {
1236-
init_module_processing_wrap(rows, data_type, de[0].outerText);
1237-
},
1238-
});
1239-
}
1240-
});
1241-
12421169
actionOptions.items.push({
12431170
type: 'option',
12441171
title: 'Comment',

0 commit comments

Comments
 (0)