Add missing page files: eim-portal, r2-tracking, wes-ai to westech_r2 app
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
frappe.pages["eim-portal"].on_page_load = function(wrapper) {
|
||||||
|
wrapper.innerHTML = '<div style="display:flex;align-items:center;justify-content:center;height:60vh;font-family:sans-serif;"><div style="text-align:center;"><i class="fa fa-spinner fa-spin" style="font-size:24px;color:#2d7d46;"></i><p style="margin-top:12px;color:#555;">Redirecting to EIM Device Portal...</p></div></div>';
|
||||||
|
setTimeout(function() { window.location.href = "https://eim.diagalon.com"; }, 500);
|
||||||
|
};
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"creation": "2026-05-09 14:00:00",
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Page",
|
||||||
|
"idx": 0,
|
||||||
|
"modified": "2026-05-09 14:00:00",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Westech R2",
|
||||||
|
"name": "eim-portal",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"standard": "Yes",
|
||||||
|
"title": "EIM Device Portal"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import frappe
|
||||||
|
|
||||||
|
def get_context(context):
|
||||||
|
frappe.local.flags.redirect_location = "https://eim.diagalon.com"
|
||||||
|
raise frappe.Redirect
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
frappe.pages['eim-portal'].on_page_load = function(wrapper) {
|
||||||
|
var page = frappe.ui.make_app_page({
|
||||||
|
parent: wrapper,
|
||||||
|
title: 'EIM Device Portal',
|
||||||
|
single_column: true
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"content": null,
|
||||||
|
"creation": "2026-05-09 14:00:00",
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Page",
|
||||||
|
"idx": 0,
|
||||||
|
"modified": "2026-05-09 15:09:48.653878",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Westech R2",
|
||||||
|
"name": "eim-portal",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"page_name": "eim-portal",
|
||||||
|
"roles": [
|
||||||
|
{
|
||||||
|
"role": "All"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"script": null,
|
||||||
|
"standard": "Yes",
|
||||||
|
"style": null,
|
||||||
|
"system_page": 0,
|
||||||
|
"title": "EIM Device Portal"
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
frappe.pages["r2-tracking"].on_page_load = function(wrapper) {
|
||||||
|
wrapper.innerHTML = '<div style="display:flex;align-items:center;justify-content:center;height:60vh;font-family:sans-serif;"><div style="text-align:center;"><i class="fa fa-spinner fa-spin" style="font-size:24px;color:#1a6b8a;"></i><p style="margin-top:12px;color:#555;">Redirecting to R2 Data Tracking...</p></div></div>';
|
||||||
|
setTimeout(function() { window.location.href = "https://eim.diagalon.com/report/data-tracking-form"; }, 500);
|
||||||
|
};
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"creation": "2026-05-09 14:00:00",
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Page",
|
||||||
|
"idx": 0,
|
||||||
|
"modified": "2026-05-09 14:00:00",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Westech R2",
|
||||||
|
"name": "r2-tracking",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"standard": "Yes",
|
||||||
|
"title": "R2 Data Tracking"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import frappe
|
||||||
|
|
||||||
|
def get_context(context):
|
||||||
|
frappe.local.flags.redirect_location = "https://eim.diagalon.com/report/data-tracking-form"
|
||||||
|
raise frappe.Redirect
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
frappe.pages['r2-tracking'].on_page_load = function(wrapper) {
|
||||||
|
var page = frappe.ui.make_app_page({
|
||||||
|
parent: wrapper,
|
||||||
|
title: 'R2 Data Tracking',
|
||||||
|
single_column: true
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"content": null,
|
||||||
|
"creation": "2026-05-09 14:00:00",
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Page",
|
||||||
|
"idx": 0,
|
||||||
|
"modified": "2026-05-09 15:09:48.707863",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Westech R2",
|
||||||
|
"name": "r2-tracking",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"page_name": "r2-tracking",
|
||||||
|
"roles": [
|
||||||
|
{
|
||||||
|
"role": "All"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"script": null,
|
||||||
|
"standard": "Yes",
|
||||||
|
"style": null,
|
||||||
|
"system_page": 0,
|
||||||
|
"title": "R2 Data Tracking"
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
frappe.pages["wes-ai"].on_page_load = function(wrapper) {
|
||||||
|
wrapper.innerHTML = '<div style="display:flex;align-items:center;justify-content:center;height:60vh;font-family:sans-serif;"><div style="text-align:center;"><i class="fa fa-spinner fa-spin" style="font-size:24px;color:#5b3a8c;"></i><p style="margin-top:12px;color:#555;">Redirecting to Wes AI Assistant...</p></div></div>';
|
||||||
|
setTimeout(function() { window.location.href = "https://wes.advante.ch"; }, 500);
|
||||||
|
};
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"creation": "2026-05-09 14:00:00",
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Page",
|
||||||
|
"idx": 0,
|
||||||
|
"modified": "2026-05-09 14:00:00",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Westech R2",
|
||||||
|
"name": "wes-ai",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"standard": "Yes",
|
||||||
|
"title": "Wes AI Assistant"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import frappe
|
||||||
|
|
||||||
|
def get_context(context):
|
||||||
|
frappe.local.flags.redirect_location = "https://wes.advante.ch"
|
||||||
|
raise frappe.Redirect
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
frappe.pages["wes-ai"].on_page_load = function(wrapper) {
|
||||||
|
var page = frappe.ui.make_app_page({
|
||||||
|
parent: wrapper,
|
||||||
|
title: "Wes AI Assistant",
|
||||||
|
single_column: true
|
||||||
|
});
|
||||||
|
|
||||||
|
// Create iframe that embeds Wes AI
|
||||||
|
var $container = $(wrapper).find(".layout-main-section");
|
||||||
|
$container.css({
|
||||||
|
"position": "relative",
|
||||||
|
"overflow": "hidden"
|
||||||
|
});
|
||||||
|
|
||||||
|
// Determine Wes URL based on environment
|
||||||
|
var wes_url = "https://wes.advante.ch";
|
||||||
|
|
||||||
|
// On production VM, Wes runs locally
|
||||||
|
if (window.location.hostname === "erpnext.local" || window.location.hostname === "localhost") {
|
||||||
|
wes_url = "http://localhost:8082";
|
||||||
|
}
|
||||||
|
|
||||||
|
var $iframe = $('<iframe>', {
|
||||||
|
src: wes_url,
|
||||||
|
style: "width: 100%; height: calc(100vh - 120px); border: none; border-radius: 4px;",
|
||||||
|
id: "wes-ai-iframe"
|
||||||
|
});
|
||||||
|
|
||||||
|
$container.empty().append($iframe);
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user