Skip to content

Commit e2b45a9

Browse files
committed
Merge branch 'staging' into production
2 parents c6e45c3 + bf82564 commit e2b45a9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+3421
-2
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@ __pycache__
66
tags
77
node_modules
88
bloomstack_core/docs/current
9+
*.min.js
10+
*.map.js
11+
*.js.map
12+

bloomstack_core/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# -*- coding: utf-8 -*-
22
from __future__ import unicode_literals
33

4-
__version__ = '2.0.3'
4+
__version__ = '2.0.4'

bloomstack_core/bloomstack_core/doctype/cubejs/__init__.py

Whitespace-only changes.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Copyright (c) 2020, Bloom Stack, Inc and contributors
2+
// For license information, please see license.txt
3+
4+
frappe.ui.form.on("Cubejs", {
5+
after_save: function(frm) {
6+
frappe.call({
7+
method:
8+
"bloomstack_core.bloomstack_core.page.admin_insights.admin_insights.get_cubejs_host",
9+
callback: (r) => {
10+
const dataUrl = `${r.message.cube_js_host}/api/restart`;
11+
$.ajax({
12+
url: dataUrl,
13+
cache: false,
14+
success: function (html) {
15+
alert("Server restarted successfully....");
16+
}
17+
});
18+
},
19+
});
20+
21+
}
22+
});
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
{
2+
"creation": "2020-11-18 02:43:07.039639",
3+
"doctype": "DocType",
4+
"editable_grid": 1,
5+
"engine": "InnoDB",
6+
"field_order": [
7+
"cube_js_name",
8+
"cube_js_host",
9+
"cube_js_secret",
10+
"cubejs_db_host",
11+
"cubejs_db_name",
12+
"cubejs_db_user",
13+
"cubejs_db_password",
14+
"cubejs_web_sockets",
15+
"cubejs_db_type"
16+
],
17+
"fields": [
18+
{
19+
"fieldname": "cube_js_host",
20+
"fieldtype": "Data",
21+
"label": "Cube Js Host"
22+
},
23+
{
24+
"fieldname": "cube_js_secret",
25+
"fieldtype": "Data",
26+
"label": "Cube Js Secret"
27+
},
28+
{
29+
"fieldname": "cube_js_name",
30+
"fieldtype": "Data",
31+
"label": "Cube Js Name",
32+
"set_only_once": 1,
33+
"unique": 1
34+
},
35+
{
36+
"fieldname": "cubejs_db_host",
37+
"fieldtype": "Data",
38+
"label": "Cubejs Db Host"
39+
},
40+
{
41+
"fieldname": "cubejs_db_name",
42+
"fieldtype": "Data",
43+
"label": "Cubejs Db Name"
44+
},
45+
{
46+
"fieldname": "cubejs_db_user",
47+
"fieldtype": "Data",
48+
"label": "Cubejs Db User"
49+
},
50+
{
51+
"fieldname": "cubejs_db_password",
52+
"fieldtype": "Data",
53+
"label": "Cubejs Db Password"
54+
},
55+
{
56+
"fieldname": "cubejs_web_sockets",
57+
"fieldtype": "Data",
58+
"label": "Cubejs Web Sockets"
59+
},
60+
{
61+
"fieldname": "cubejs_db_type",
62+
"fieldtype": "Data",
63+
"label": "Cubejs Db Type"
64+
}
65+
],
66+
"modified": "2020-11-19 00:22:41.585206",
67+
"modified_by": "Administrator",
68+
"module": "Bloomstack Core",
69+
"name": "Cubejs",
70+
"owner": "Administrator",
71+
"permissions": [
72+
{
73+
"create": 1,
74+
"delete": 1,
75+
"email": 1,
76+
"export": 1,
77+
"print": 1,
78+
"read": 1,
79+
"report": 1,
80+
"role": "System Manager",
81+
"share": 1,
82+
"write": 1
83+
}
84+
],
85+
"quick_entry": 1,
86+
"show_name_in_global_search": 1,
87+
"sort_field": "modified",
88+
"sort_order": "DESC",
89+
"title_field": "cube_js_name",
90+
"track_changes": 1
91+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright (c) 2020, Bloom Stack, Inc and contributors
3+
# For license information, please see license.txt
4+
5+
from __future__ import unicode_literals
6+
# import frappe
7+
from frappe.model.document import Document
8+
9+
class Cubejs(Document):
10+
pass
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright (c) 2020, Bloom Stack, Inc and Contributors
3+
# See license.txt
4+
from __future__ import unicode_literals
5+
6+
# import frappe
7+
import unittest
8+
9+
class TestCubejs(unittest.TestCase):
10+
pass

bloomstack_core/bloomstack_core/page/admin_insights/__init__.py

Whitespace-only changes.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
frappe.pages["admin_insights"].on_page_load = function(wrapper) {
2+
new frappe.views.InsightsFactory().make("admin_insights");
3+
// var page = frappe.ui.make_app_page({
4+
// parent: wrapper,
5+
// title: 'Admin Insights',
6+
// single_column: true
7+
// });
8+
};
9+
10+
frappe.views.InsightsFactory = class InsightsFactory extends frappe.views.Factory {
11+
make(page_name) {
12+
const assets = [
13+
"assets/bloomstack_core/js/min/admin_insights.min.js"
14+
];
15+
frappe.call({
16+
method:
17+
"bloomstack_core.bloomstack_core.page.admin_insights.admin_insights.get_cubejs_host",
18+
callback: (r) => {
19+
frappe.require(assets, () => {
20+
const sayWhat = new bloomstack_core.admin_insights({
21+
parent: this.make_page(true, page_name),
22+
CubeJsHost: r.message.cube_js_host,
23+
CubeJsSecret: r.message.cube_js_secret
24+
});
25+
});
26+
},
27+
});
28+
29+
}
30+
};
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"content": null,
3+
"creation": "2020-08-31 00:50:43.145249",
4+
"docstatus": 0,
5+
"doctype": "Page",
6+
"idx": 0,
7+
"modified": "2020-08-31 00:50:43.145249",
8+
"modified_by": "Administrator",
9+
"module": "Bloomstack Core",
10+
"name": "admin_insights",
11+
"owner": "Administrator",
12+
"page_name": "admin_insights",
13+
"roles": [],
14+
"script": null,
15+
"standard": "Yes",
16+
"style": null,
17+
"system_page": 0,
18+
"title": "Admin Insights"
19+
}

0 commit comments

Comments
 (0)