Skip to content

Commit

Permalink
Minor fixes (#239)
Browse files Browse the repository at this point in the history
* fix: change default platform username

* feat: platform_version in app panel

* update license

* non existent .env file fixed

* update current released version

* refactor: remove unused __init__.py from root

* add: footer changes

---------

Co-authored-by: deepakdinesh1123 <[email protected]>
Co-authored-by: NikhilZelthy <[email protected]>
  • Loading branch information
3 people authored May 21, 2024
1 parent cb2f1e0 commit 7eccd1e
Show file tree
Hide file tree
Showing 15 changed files with 44 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ tasks:
printf "\n${GREEN}Platform URL :${NC}\n"
printf "${GREEN}%s${NC}\n" "$platform_domain_url/platform"
printf "\n${GREEN}username: platform_admin@zelthy.com ${NC}"
printf "\n${GREEN}username: platform_admin@zango.dev ${NC}"
printf "\n${GREEN}password: Zango@123 ${NC}\n"
printf "\n${GREEN}App URLs :${NC}\n"
Expand Down
Empty file removed __init__.py
Empty file.
10 changes: 5 additions & 5 deletions backend/LICENSE
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
Copyright (c) Healthlane Technologies Pvt. Ltd. ("Zelthy")
Copyright (c) Healthlane Technologies Pvt. Ltd. ("Zango")

Parts of Zelthy's software are licensed as follows:
Parts of Zango's software are licensed as follows:

* All content residing under the "docs/" directory of this repository is licensed under
"Creative Commons: CC BY-SA 4.0 license".
* All content that resides under the "ee/" directory of this repository, if that
directory exists, is licensed under the license defined in "enterprise/LICENSE".
* All client-side JavaScript (when served directly or after being compiled, arranged,
augmented, or combined), is licensed under the "MIT Expat" license.
* All third party components incorporated into Zelthy are licensed under
* All third party components incorporated into Zango are licensed under
the original license provided by the owner of the applicable component.
* Content outside of the above mentioned directories or restrictions above [Zelthy
Developer's Edition ("Zelthy DE")] is available under the "Apache Version 2.0, January 2004"
* Content outside of the above mentioned directories or restrictions above [Zango
Developer's Edition ("Zango DE")] is available under the "Apache Version 2.0, January 2004"
license as defined below.


Expand Down
2 changes: 2 additions & 0 deletions backend/src/zango/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
from zango.core import internal_requests

__version__ = "0.1.2"
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
<div id="root"></div>
<script>
var csrf_token = "{{ csrf_token }}";
var platform_version = "{{ platform_version }}";
</script>
<script src="{% static 'app_panel/js/build.v1.1.1.min.js' %}"></script>
<script src="{% static 'app_panel/js/build.v1.1.2.min.js' %}"></script>
<script src="{% static 'js/jquery/3.7.1/jquery.min.js' %}"></script>
{% include 'session_security/all.html' %}
</body>
Expand Down
10 changes: 7 additions & 3 deletions backend/src/zango/apps/shared/tenancy/views.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import os
from zango.core.generic_views.base import ZangoSessionPlatformTemplateView
from zango.apps.permissions.models import PolicyModel
from zango.apps.appauth.models import AppUserModel, UserRoleModel


class AppPanelView(ZangoSessionPlatformTemplateView):
Expand All @@ -10,3 +7,10 @@ class AppPanelView(ZangoSessionPlatformTemplateView):
"""

template_name = "app_panel.html"

def get_context_data(self, **kwargs):
import zango

context = super().get_context_data(**kwargs)
context["platform_version"] = zango.__version__
return context

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions backend/src/zango/cli/start_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ def create_project(
"REDIS_PORT": redis_port,
"PROJECT_NAME": project_name,
}
if not os.path.exists(".env"):
open(".env", "w").close()
fcontent = open(".env", "r").read()
with open(f".env", "a+") as f:
for key, value in env_keys.items():
Expand Down
2 changes: 1 addition & 1 deletion deploy/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ To begin using Zango through Docker installation, ensure that Docker and Docker
- `--project_name`: Modifies the name of the project (Default: `zango_project`).
- `--project_dir`: Specifies the directory for project creation (Default: `zproject`).
- `--build_core`: Builds the Zango library (Default: `False`).
- `--platform_username`: The user email of the platform user (Default: `platform_admin@zelthy.com`).
- `--platform_username`: The user email of the platform user (Default: `platform_admin@zango.dev`).
- `--platform_user_password`: The password for the platform user (Default: `Zango@123`).

5. Docker is started as a non root user, run the below commands to export the host UID and GID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ To begin using Zango through Docker installation, ensure that Docker and Docker
- `--project_name`: Modifies the name of the project (Default: `zango_project`).
- `--project_dir`: Specifies the directory for project creation (Default: `zproject`).
- `--build_core`: Builds the Zango library (Default: `False`).
- `--platform_username`: The user email of the platform user (Default: `platform_admin@zelthy.com`).
- `--platform_username`: The user email of the platform user (Default: `platform_admin@zango.dev`).
- `--platform_user_password`: The password for the platform user (Default: `Zango@123`).

5. Navigate to ``project_dir`` to start the project.
Expand Down
1 change: 1 addition & 0 deletions frontend/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<title>Zelthy 3</title>
<script>
var csrf_token = "yuI1ywJIbp9lxLNMpcOUtvitM1h5uhH7uK6Hu0AT9gXTk13xNdFDnNza2FYhuCIM";
var platform_version = "4"
</script>
<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/metadata.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"buildMajor":1,"buildMinor":1,"buildPatch":1,"buildTag":""}
{"buildMajor":1,"buildMinor":1,"buildPatch":2,"buildTag":""}
11 changes: 7 additions & 4 deletions frontend/src/pages/platform/components/Layout/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import debounce from 'just-debounce-it';
import { useLayoutEffect, useRef } from 'react';
import { Link } from 'react-router-dom';
import { ReactComponent as ZelthyIcon } from '../../../../assets/images/svg/zelthy-icon.svg';
import { useWindowSizeHeight } from '../../../../utils/helper';
import {
getPlatformVersion,
useWindowSizeHeight,
} from '../../../../utils/helper';
import NavSearchForm from './NavSearchForm';
import ProfileMenu from './ProfileMenu';

Expand Down Expand Up @@ -55,7 +58,7 @@ export default function Layout({ children }) {
className="flex items-center justify-center gap-[8px] border-t-[1px] border-[#DDE2E5] p-[8px]"
>
<span className="font-lato text-[11px] leading-[16px] text-[#495057]">
V 3.0
V {getPlatformVersion()}
</span>
<span className="font-lato text-[12px] font-bold leading-[16px] text-[#C7CED3]">
Expand All @@ -67,13 +70,13 @@ export default function Layout({ children }) {
</span>
<a
href="https://docs.zelthy.com/"
href="https://www.zango.dev/docs/"
alt="#"
target={'_blank'}
className="m-0 inline-flex p-0"
>
<span className="font-lato text-[11px] leading-[16px] text-[#495057]">
Documents
Docs
</span>
</a>

Expand Down
11 changes: 11 additions & 0 deletions frontend/src/utils/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,3 +216,14 @@ export const getCookie = () => {

return csrfToken;
};

export const getPlatformVersion = () => {
let platformVersion = '';

/*eslint-disable */
if (platform_version !== 'undefined') {
platformVersion = platform_version;
}

return platformVersion;
};
2 changes: 1 addition & 1 deletion setup_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def rebuild_core(project_dir):
)
parser.add_argument(
"--platform_username",
default="platform_admin@zelthy.com",
default="platform_admin@zango.dev",
help="The platform username",
)
parser.add_argument(
Expand Down

0 comments on commit 7eccd1e

Please sign in to comment.