More url
This commit is contained in:
@@ -156,7 +156,7 @@ class OfficeDashboardService(BaseService):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def get_office_product_detail(filters):
|
def get_office_product_detail(filters):
|
||||||
product_id = filters.get('product_id')
|
product_id = filters.get('product_id')
|
||||||
product_data=[]
|
product_data = []
|
||||||
products = Products.get_product_by_product_id(product_id)
|
products = Products.get_product_by_product_id(product_id)
|
||||||
if products:
|
if products:
|
||||||
product_data = {
|
product_data = {
|
||||||
@@ -169,10 +169,10 @@ class OfficeDashboardService(BaseService):
|
|||||||
'added': products.added.isoformat() if products.added else None,
|
'added': products.added.isoformat() if products.added else None,
|
||||||
'updated': products.updated.isoformat() if products.updated else None,
|
'updated': products.updated.isoformat() if products.updated else None,
|
||||||
'banner': products.banner,
|
'banner': products.banner,
|
||||||
}
|
}
|
||||||
|
|
||||||
product_details= []
|
product_details = []
|
||||||
productDetails =ProductsDetails.get_product_details_with_product_id(product_id)
|
productDetails = ProductsDetails.get_product_details_with_product_id(product_id)
|
||||||
if productDetails:
|
if productDetails:
|
||||||
product_details = {
|
product_details = {
|
||||||
'product_detail_id': productDetails.id,
|
'product_detail_id': productDetails.id,
|
||||||
@@ -192,7 +192,7 @@ class OfficeDashboardService(BaseService):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def get_office_product_update(filters):
|
def get_office_product_update(filters):
|
||||||
product_id = filters.get('product_id')
|
product_id = filters.get('product_id')
|
||||||
product_data=[]
|
product_data = []
|
||||||
products = Products.get_product_by_product_id(product_id)
|
products = Products.get_product_by_product_id(product_id)
|
||||||
if products:
|
if products:
|
||||||
product_data = {
|
product_data = {
|
||||||
@@ -205,10 +205,10 @@ class OfficeDashboardService(BaseService):
|
|||||||
'added': products.added.isoformat() if products.added else None,
|
'added': products.added.isoformat() if products.added else None,
|
||||||
'updated': products.updated.isoformat() if products.updated else None,
|
'updated': products.updated.isoformat() if products.updated else None,
|
||||||
'banner': products.banner,
|
'banner': products.banner,
|
||||||
}
|
}
|
||||||
|
|
||||||
product_details= []
|
product_details = []
|
||||||
productDetails =ProductsDetails.get_product_details_with_product_id(product_id)
|
productDetails = ProductsDetails.get_product_details_with_product_id(product_id)
|
||||||
if productDetails:
|
if productDetails:
|
||||||
product_details = {
|
product_details = {
|
||||||
'product_detail_id': productDetails.id,
|
'product_detail_id': productDetails.id,
|
||||||
@@ -378,13 +378,11 @@ class OfficeDashboardService(BaseService):
|
|||||||
subscription_uid = filters.get('subscription_uid')
|
subscription_uid = filters.get('subscription_uid')
|
||||||
|
|
||||||
member_sub = []
|
member_sub = []
|
||||||
flavor=''
|
flavor = ''
|
||||||
template_name=''
|
template_name = ''
|
||||||
product_templates_data = []
|
product_templates_data = []
|
||||||
templates_data = []
|
templates_data = []
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
membersSubResult = MembersProducts.get_member_product_by_subscription_uid(subscription_uid)
|
membersSubResult = MembersProducts.get_member_product_by_subscription_uid(subscription_uid)
|
||||||
if membersSubResult:
|
if membersSubResult:
|
||||||
if membersSubResult.product_template:
|
if membersSubResult.product_template:
|
||||||
@@ -448,7 +446,6 @@ class OfficeDashboardService(BaseService):
|
|||||||
logger.error(f"An error occurred while getting dashboard data: {str(e)}", exc_info=True)
|
logger.error(f"An error occurred while getting dashboard data: {str(e)}", exc_info=True)
|
||||||
return jsonify({"message": "Internal Server Error"}), 500
|
return jsonify({"message": "Internal Server Error"}), 500
|
||||||
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_office_sidebar(filters):
|
def get_office_sidebar(filters):
|
||||||
try:
|
try:
|
||||||
@@ -486,15 +483,15 @@ class OfficeDashboardService(BaseService):
|
|||||||
"added": subs.added,
|
"added": subs.added,
|
||||||
})
|
})
|
||||||
|
|
||||||
recentLogin = Members.get_recent_member_login(10)
|
recentLogin = Members.get_recent_member_login(10)
|
||||||
if recentLogin:
|
if recentLogin:
|
||||||
recent_login_data = []
|
recent_login_data = []
|
||||||
for subs in recentLogin:
|
for subs in recentLogin:
|
||||||
recent_login_data.append({
|
recent_login_data.append({
|
||||||
'member_id': subs.id,
|
'member_id': subs.id,
|
||||||
'firstname' : subs.firstname,
|
'firstname': subs.firstname,
|
||||||
'lastname' : subs.lastname,
|
'lastname': subs.lastname,
|
||||||
'username' : subs.username,
|
'username': subs.username,
|
||||||
'member_uid': subs.uid,
|
'member_uid': subs.uid,
|
||||||
"added": subs.added,
|
"added": subs.added,
|
||||||
})
|
})
|
||||||
@@ -515,7 +512,7 @@ class OfficeDashboardService(BaseService):
|
|||||||
"stuck": 0,
|
"stuck": 0,
|
||||||
"completed": 0
|
"completed": 0
|
||||||
}
|
}
|
||||||
system_url =[
|
system_url = [
|
||||||
{
|
{
|
||||||
"name": "AirPlay System",
|
"name": "AirPlay System",
|
||||||
"url": "http://10.10.10.121:8080/"
|
"url": "http://10.10.10.121:8080/"
|
||||||
@@ -526,15 +523,26 @@ class OfficeDashboardService(BaseService):
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Ansible",
|
"name": "Ansible",
|
||||||
"url": "172.16.4.90:3000"
|
"url": "http://172.16.4.90:3000"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Int HaProxy",
|
"name": "Int HaProxy",
|
||||||
"url": "http://172.16.4.99:5555/"
|
"url": "http://172.16.4.99:5555/"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "Provision Server",
|
||||||
|
"url": "http://10.13.3.15:8094"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Event Manager",
|
||||||
|
"url": "http:;//10.13.3.15:5005"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Socket Server",
|
||||||
|
"url": "http:;//10.13.3.15:5006"
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
response_data = {
|
response_data = {
|
||||||
'system_url': system_url,
|
'system_url': system_url,
|
||||||
'recent_payment_summary': recent_payment_summary,
|
'recent_payment_summary': recent_payment_summary,
|
||||||
@@ -629,7 +637,7 @@ class OfficeDashboardService(BaseService):
|
|||||||
if limit < 1 or limit > 100:
|
if limit < 1 or limit > 100:
|
||||||
limit = 20
|
limit = 20
|
||||||
|
|
||||||
membersList, total_count = Members.get_all_member(None,None,1,30)
|
membersList, total_count = Members.get_all_member(None, None, 1, 30)
|
||||||
# Convert loans to dictionary format
|
# Convert loans to dictionary format
|
||||||
member_data = []
|
member_data = []
|
||||||
for member in membersList:
|
for member in membersList:
|
||||||
@@ -645,8 +653,6 @@ class OfficeDashboardService(BaseService):
|
|||||||
"added": member.added,
|
"added": member.added,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
response_data = {
|
response_data = {
|
||||||
'members': member_data,
|
'members': member_data,
|
||||||
'count': 30,
|
'count': 30,
|
||||||
|
|||||||
Reference in New Issue
Block a user