diff --git a/backend/app/controllers/app.py b/backend/app/controllers/app.py index cc8e133a..c32dad83 100644 --- a/backend/app/controllers/app.py +++ b/backend/app/controllers/app.py @@ -15,7 +15,7 @@ def add(): _ = getI18n("controllers") name = request.json.get('app_name') - tenant_id = request.json.get('app_tenant_id') + tenant_id = session['tenant_id'] app_id = request.json.get('app_id') default_source_branch = request.json.get('app_default_source_branch') default_target_branch = request.json.get('app_default_target_branch') @@ -50,11 +50,11 @@ def add(): @json_response def getAll(): _ = getI18n("controllers") - owner = session['username'] + tenantID = session['tenant_id'] appID = request.args.get('app_id') try: - apps = Application.get_all_application(owner, appID) + apps = Application.get_all_application(tenantID, appID) return {'apps': apps} except Exception as e: diff --git a/backend/app/controllers/requirement.py b/backend/app/controllers/requirement.py index 8305799c..fe8e10a8 100644 --- a/backend/app/controllers/requirement.py +++ b/backend/app/controllers/requirement.py @@ -1,4 +1,4 @@ -from flask import Blueprint, request, session +from flask import Blueprint, request, session, json from app.controllers.common import json_response from app.models.task import getEmptyTaskInfo from app.pkgs.tools.i18b import getI18n @@ -18,10 +18,11 @@ def clear_up(): print("clear_up failed:"+str(e)) session[session["username"]] = getEmptyTaskInfo() - tenant_name = "DevOpsGPT" + tenant_name = "-" if GRADE != "base": tenant = Tenant.get_tenant_baseinfo_by_id(session["tenant_id"]) - tenant_name = tenant["name"] + if tenant: + tenant_name = tenant["name"] return {"username": session["username"], "tenant_name": tenant_name, "tenant_id": session["tenant_id"], "info": session[session["username"]]} @@ -40,7 +41,7 @@ def setup_app(): if GRADE != "base" and not Tenant.check_quota(tenantID): raise Exception(_("You have exceeded your quota limit, please check your business bill.")) - requirement = Requirement.create_requirement(tenantID, "New requirement", "New", appID, 1, sourceBranch, featureBranch, REQUIREMENT_STATUS_NotStarted, 0, 0) + requirement = Requirement.create_requirement(tenantID, "New requirement", "New", appID, username, sourceBranch, featureBranch, REQUIREMENT_STATUS_NotStarted, 0, 0) session[username]['memory']['task_info'] = { "app_id": appID, @@ -86,4 +87,19 @@ def get_one(): if GRADE != "base": requirement["memory"] = RequirementMemory.get_all_requirement_memories(requirementID, 1) - return requirement \ No newline at end of file + return requirement + +@bp.route('/update', methods=['POST']) +@json_response +def update(): + _ = getI18n("controllers") + data = request.json + requirement_id = data['requirement_id'] + update_data = data['data'] + + requirement = Requirement.update_requirement(requirement_id, **update_data) + + if requirement.requirement_id: + return Requirement.get_requirement_by_id(requirement.requirement_id) + else: + raise Exception(_("Failed to set up app.")) \ No newline at end of file diff --git a/backend/app/controllers/setting.py b/backend/app/controllers/setting.py index 600126d4..6df83b7b 100644 --- a/backend/app/controllers/setting.py +++ b/backend/app/controllers/setting.py @@ -13,7 +13,7 @@ @json_response def get_git_config_list(): _ = getI18n("controllers") - tenantID = session['tenant_id'] + tenantID = request.args.get('tenant_id') gitList, success = getGitConfigList(tenantID, 0) if not success: @@ -25,7 +25,7 @@ def get_git_config_list(): @json_response def get_ci_config_list(): _ = getI18n("controllers") - tenantID = session['tenant_id'] + tenantID = request.args.get('tenant_id') gitList, success = getCIConfigList(tenantID, 0) if not success: @@ -37,7 +37,7 @@ def get_ci_config_list(): @json_response def get_cd_config_list(): _ = getI18n("controllers") - tenantID = session['tenant_id'] + tenantID = request.args.get('tenant_id') gitList, success = getCDConfigList(tenantID, 0) if not success: @@ -50,7 +50,7 @@ def get_cd_config_list(): def get_llm_config_list(): _ = getI18n("controllers") raise Exception(_("Failed to get git config list.")) - tenantID = session['tenant_id'] + tenantID = request.args.get('tenant_id') gitList, success = getLLMConfigList(tenantID, 0) if not success: @@ -70,7 +70,7 @@ def edit_git(): git_config_id = request.json.get('git_config_id') name = request.json.get('git_name') creater = session['username'] - tenant_id = session['tenant_id'] + tenant_id = request.json.get('tenant_id') try: if git_config_id: @@ -94,7 +94,7 @@ def edit_ci(): ci_config_id = request.json.get('ci_config_id') name = request.json.get('ci_name') creater = session['username'] - tenant_id = session['tenant_id'] + tenant_id = request.json.get('tenant_id') try: if ci_config_id: @@ -118,7 +118,7 @@ def edit_cd(): cd_provider = request.json.get('cd_provider') name = request.json.get('cd_name') creater = session['username'] - tenant_id = session['tenant_id'] + tenant_id = request.json.get('tenant_id') try: if cd_config_id: diff --git a/backend/app/controllers/user.py b/backend/app/controllers/user.py index d2448356..1ba1fa51 100644 --- a/backend/app/controllers/user.py +++ b/backend/app/controllers/user.py @@ -49,15 +49,19 @@ def login(): if GRADE == "base": ok = User.checkPassword(username, password) session['tenant_id'] = 0 + session['user_id'] = 1 + session['username'] = username else: ok = UserPro.checkPassword(username, password) if ok: userinfo = UserPro.get_user_by_name(username) session['language'] = userinfo["zone_language"] + session['tenant_id'] = userinfo["current_tenant"] + session['user_id'] = userinfo["user_id"] + session['username'] = username if ok: - session['username'] = username return {'message': _('Login successful.')} else: raise Exception(_("Invalid username or password")) diff --git a/backend/app/models/application.py b/backend/app/models/application.py index 3dac8a4e..9890a845 100644 --- a/backend/app/models/application.py +++ b/backend/app/models/application.py @@ -33,10 +33,12 @@ def create(tenant_id, creater, name, description, default_source_branch, default return app @staticmethod - def get_all_application(owner, appID): + def get_all_application(tenant_id, appID): applications = Application.query.order_by(Application.app_id.desc()).all() if appID: applications = Application.query.filter_by(app_id=appID).all() + if tenant_id: + applications = Application.query.filter_by(tenant_id=tenant_id).all() application_list = [] diff --git a/backend/app/models/requirement.py b/backend/app/models/requirement.py index c5011a9e..56fe8729 100644 --- a/backend/app/models/requirement.py +++ b/backend/app/models/requirement.py @@ -1,3 +1,4 @@ +from datetime import datetime from app.extensions import db from app.models.application import Application @@ -7,7 +8,7 @@ class Requirement(db.Model): requirement_name = db.Column(db.String(255), nullable=False) original_requirement = db.Column(db.String(1000)) app_id = db.Column(db.Integer, nullable=False) - user_id = db.Column(db.Integer, nullable=False) + username = db.Column(db.String(100)) default_source_branch = db.Column(db.String(255)) default_target_branch = db.Column(db.String(255)) status = db.Column(db.String(20)) @@ -17,13 +18,13 @@ class Requirement(db.Model): updated_at = db.Column(db.TIMESTAMP, default=db.func.current_timestamp(), onupdate=db.func.current_timestamp()) @staticmethod - def create_requirement(tenant_id, requirement_name, original_requirement, app_id, user_id, default_source_branch, default_target_branch, status, satisfaction_rating=None, completion_rating=None): + def create_requirement(tenant_id, requirement_name, original_requirement, app_id, username, default_source_branch, default_target_branch, status, satisfaction_rating=None, completion_rating=None): requirement = Requirement( tenant_id=tenant_id, requirement_name=requirement_name, original_requirement=original_requirement, app_id=app_id, - user_id=user_id, + username=username, status=status, default_source_branch=default_source_branch, default_target_branch=default_target_branch, @@ -45,7 +46,7 @@ def get_all_requirements(tenantID=None): 'requirement_name': req.requirement_name, 'original_requirement': req.original_requirement, 'app_id': req.app_id, - 'user_id': req.user_id, + 'username': req.username, 'default_source_branch': req.default_source_branch, 'default_target_branch': req.default_target_branch, 'status': req.status, @@ -67,7 +68,7 @@ def get_requirement_by_id(requirement_id): 'requirement_name': req.requirement_name, 'original_requirement': req.original_requirement, 'app_id': req.app_id, - 'user_id': req.user_id, + 'username': req.username, 'default_source_branch': req.default_source_branch, 'default_target_branch': req.default_target_branch, 'status': req.status, @@ -81,31 +82,16 @@ def get_requirement_by_id(requirement_id): return None @staticmethod - def update_requirement(requirement_id, requirement_name=None, original_requirement=None, app_id=None, user_id=None, status=None, satisfaction_rating=None, completion_rating=None): + def update_requirement(requirement_id, **kwargs): requirement = Requirement.query.get(requirement_id) - if requirement: - if requirement_name is not None: - requirement.requirement_name = requirement_name - if original_requirement is not None: - requirement.original_requirement = original_requirement - if app_id is not None: - requirement.app_id = app_id - if user_id is not None: - requirement.user_id = user_id - if status is not None: - requirement.status = status - if satisfaction_rating is not None: - requirement.satisfaction_rating = satisfaction_rating - if completion_rating is not None: - requirement.completion_rating = completion_rating - + for key, value in kwargs.items(): + setattr(requirement, key, value) + requirement.updated_at = datetime.utcnow() db.session.commit() return requirement - return None - @staticmethod def delete_requirement(requirement_id): requirement = Requirement.query.get(requirement_id) diff --git a/backend/app/pkgs/tools/i18b.py b/backend/app/pkgs/tools/i18b.py index 2aa9c600..1a0665cc 100644 --- a/backend/app/pkgs/tools/i18b.py +++ b/backend/app/pkgs/tools/i18b.py @@ -166,4 +166,7 @@ def getFrontendText(): "app_cd_config": _("Associated CD Config"), "app_ci_config": _("Associated CI Config"), "app_git_config": _("Associated Git Config"), + "my_role": _("My Role"), + "others_1": _("The tenant does not exist or is abnormal"), + "others_2": _("Insufficient authority."), } \ No newline at end of file diff --git a/backend/run.py b/backend/run.py index d53aff4d..2d90fe41 100644 --- a/backend/run.py +++ b/backend/run.py @@ -1,12 +1,11 @@ from app.extensions import db import datetime from app.controllers import register_controllers -from flask import Flask, request, session, abort +from flask import Flask, request, session from flask_cors import CORS from app.models.task import getEmptyTaskInfo from app.models.tenant_pro import Tenant from app.models.tenant_user_pro import TenantUser -from app.models.user_pro import UserPro from config import APP_SECRET_KEY, BACKEND_DEBUG, BACKEND_HOST, BACKEND_PORT, AICODER_ALLOWED_ORIGIN, AUTO_LOGIN, GRADE app = Flask(__name__) @@ -16,13 +15,14 @@ @app.before_request def require_login(): - if AUTO_LOGIN: + if AUTO_LOGIN and GRADE == "base": if "username" not in session: session['username'] = "demo_user" + session['user_id'] = 1 session['tenant_id'] = 0 session[session["username"]] = getEmptyTaskInfo() - path = request.path + path = request.path if path == '/user/language' or path == '/user/login' or path == '/user/logout' or path == '/user/change_language' or path == '/user/register': pass elif 'username' not in session: @@ -35,35 +35,24 @@ def require_login(): print(f"req_user: {user}") print(f"req_path: {path}") print(f"req_args: {args}") + if GRADE != "base": - current_path = request.args.get('url_path') - if (current_path == "/tenant.html" or current_path == "/tenant_new.html") and path=="/requirement/clear_up": - pass - elif path =="/tenant/create" or path=="/tenant/get_all" or path=="/tenant/use_tenant": - pass - else: - success, msg, code = check_tenant_membership_and_permissions() - if not success: - return {'success': False, 'error': msg, 'code': code} - -def check_tenant_membership_and_permissions(): - username = session["username"] - user = UserPro.get_user_by_name(username) - tenant_id = session['tenant_id'] - success, msg = Tenant.check_tenant(tenant_id) - print("check_tenant_membership_and_permissions:") - print(tenant_id) - print(msg) - print(success) - if not success: - return success, msg, 404 - - success, msg = TenantUser.check_role(user["user_id"], tenant_id, request.path) - if not success: - return success, msg, 403 - - return success, msg, 200 + try: + tenant_id = session['tenant_id'] + if not tenant_id: + tenant_id = request.args.get('tenant_id') + except Exception as e: + tenant_id = 0 + # If not on the company management page, determine the company status + if not path.startswith("/tenant/") and path != "/requirement/clear_up": + success, msg = Tenant.check_tenant(tenant_id) + if not success: + return {'success': False, 'error': msg, 'code': 404} + # authority check + success, msg = TenantUser.check_role(session['user_id'], tenant_id, path) + if not success: + return {'success': False, 'error': msg, 'code': 403} @app.after_request def after_request(response): diff --git a/db/database.db b/db/database.db index 39991dee..154f2d62 100644 Binary files a/db/database.db and b/db/database.db differ diff --git a/frontend/app.html b/frontend/app.html index a9626a21..f7375a74 100644 --- a/frontend/app.html +++ b/frontend/app.html @@ -7,14 +7,9 @@ - - - - - @@ -33,39 +28,36 @@ -
- +
+
+
- - - - - - - - - - - - - - - - -
+
+ +
+
+ +
+ @
-
-
+
+
@@ -119,28 +111,6 @@ - - -
- @
- diff --git a/frontend/index.html b/frontend/index.html index 491e4112..f663ad68 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -31,10 +31,10 @@ diff --git a/frontend/requirement.html b/frontend/requirement.html index 6a14dd44..d5f90ac8 100644 --- a/frontend/requirement.html +++ b/frontend/requirement.html @@ -7,14 +7,8 @@ - - - - - - @@ -32,28 +26,33 @@ -
- - - - +
+
+
- +
- - diff --git a/frontend/setting.html b/frontend/setting.html index eb357f2f..1cf47974 100644 --- a/frontend/setting.html +++ b/frontend/setting.html @@ -32,10 +32,10 @@ @@ -60,13 +60,18 @@

LLM

-

Git

+
+

+ Git +

+ +
@@ -84,7 +89,12 @@

Git
-

CI

+
+

+ CI +

+ +

@@ -100,7 +110,12 @@

CI
-

CD

+
+

+ CD +

+ +

diff --git a/frontend/static/css/style.css b/frontend/static/css/style.css index 2616447f..3d433f26 100644 --- a/frontend/static/css/style.css +++ b/frontend/static/css/style.css @@ -88,6 +88,50 @@ pre { font-size: 13px !important; } +.font-size-20 { + font-size: 20px !important; +} + +.font-size-19 { + font-size: 19px !important; +} + +.font-size-16 { + font-size: 16px !important; +} + +.font-size-15 { + font-size: 15px !important; +} + +.padding-right-16 { + padding-right: 16px; +} + +.padding-left-20 { + padding-left: 20px; +} + +.padding-bottom-0 { + padding-bottom: 0px !important; +} + +.padding-15-0 { + padding: 15px 0px !important; +} + +.line-height-24 { + line-height: 24px !important; +} + +.border-bottom-1 { + border-bottom: solid 1px #dddddd !important; +} + +.background-color-deep-green { + background-color: #1f883d !important; +} + .marigin-top-4 { margin-top: 4px; } @@ -112,10 +156,24 @@ pre { top: 50%; left: 50%; transform: translate(-50%, -50%); - opacity: 0.05; + opacity: 0.03; pointer-events: none; z-index: 9999; font-size: 36px; color: #000; background-repeat: repeat; +} + +.font-color-gray { + color: #767676 !important; +} + +.form-message { + color: #d83f3f; + text-align: right; + margin-bottom: 10px; +} + +.float-right{ + float: right !important; } \ No newline at end of file diff --git a/frontend/static/js/app.js b/frontend/static/js/app.js index 83c78833..33920ded 100644 --- a/frontend/static/js/app.js +++ b/frontend/static/js/app.js @@ -11,7 +11,7 @@ $(document).ready(function () { }); $("#add-application").click(function () { - cleanUp() + cleanUpApp() rendSelect() $('#app-edit').modal('show'); }); @@ -155,20 +155,8 @@ function removeSubservice(idx){ $("#subservice_"+idx).remove() } -function cleanUp() { - $('.subservice').remove(); - $("#app_id").val('') - $("#app_default_source_branch").val('') - $("#app_default_target_branch").val('') - $("#app_description").val('') - $("#app_name").val('') - $("#app_git_config").empty(); - $("#app_ci_config").empty(); - $("#app_cd_config").empty(); -} - function showApp(appID) { - cleanUp() + cleanUpApp() rendSelect() $('#app-edit').modal('show'); @@ -198,7 +186,10 @@ function showApp(appID) { }); libsStr = libsStr.replace(/,$/, ''); str = ` - - - - - ` + str+= ` +
+
+ `+app["name"]+` +
`+app["description"]+`
+
`+globalFrontendText['app_base_branch']+`: `+app["default_source_branch"]+` `+globalFrontendText['app_feat_branch']+`: `+app["default_target_branch"]+`
+ ` services.forEach(function (service, element_index, element_array) { - if (element_index==0) { - str += ` -
- - - - ` - } else { - str += ` - - - - - ` - } + str += ` +
+ `+service["name"]+` + `+service["language"]+` + `+service["framework"]+` + `+service["role"]+` +
+ ` }); + str += ` ` $("#app_list").html(str) }); } @@ -373,4 +359,16 @@ function rendSelect() { var newOption = $("").attr("value", gc.cd_config_id).text(gc.name); $("#app_cd_config").append(newOption); }) +} + +function cleanUpApp() { + $('.subservice').remove(); + $("#app_id").val('') + $("#app_default_source_branch").val('') + $("#app_default_target_branch").val('') + $("#app_description").val('') + $("#app_name").val('') + $("#app_git_config").empty(); + $("#app_ci_config").empty(); + $("#app_cd_config").empty(); } \ No newline at end of file diff --git a/frontend/static/js/coder.js b/frontend/static/js/coder.js index af192ffb..f98fe6fd 100644 --- a/frontend/static/js/coder.js +++ b/frontend/static/js/coder.js @@ -449,7 +449,7 @@ function language() { myAlertPure("Error 错误", "The back-end service interface cannot be accessed. Please check the terminal service log and browser console. (Usually the back-end service is not started, Or exists Cross-domain problem? )

无法访问后端服务接口,请检查终端服务日志以及浏览器控制台报错信息。(通常是后端服务没有启动,或存在 跨域问题?)") } - sendAjaxRequest('/user/language', 'GET', "", successCallback, errorCallback, true, false) + sendAjaxRequest('/user/language', 'GET', "", successCallback, errorCallback, false, false) } function openUrl(newurl){ @@ -1519,4 +1519,11 @@ function getTaskID() { var taskId = params.get('task_id'); return taskId +} + +function getTenantID() { + var queryString = window.location.search; + var params = new URLSearchParams(queryString); + var tenant_id = params.get('tenant_id'); + return tenant_id } \ No newline at end of file diff --git a/frontend/static/js/requirement.js b/frontend/static/js/requirement.js index 2c3dbbf8..d6000c79 100644 --- a/frontend/static/js/requirement.js +++ b/frontend/static/js/requirement.js @@ -16,17 +16,31 @@ function getRequirementList() { var str = "" requirements.forEach(function (requirement, element_index, element_array) { - str += ` - - - - - - + str += ` + + + + ` $("#app_list").html(str) }); + + $('.ui.rating').rating({ + maxRating: 5, + onRate(newValue){ + rid = $(this).attr('rid') + rkey = $(this).attr('rkey') + data = {} + data[rkey] = newValue + updateRequirment(rid, data) + } + }); } sendAjaxRequest('/requirement/get', 'GET', requestData, successCallback, alertErrorCallback, true, false) @@ -34,4 +48,16 @@ function getRequirementList() { function showRequirement(requirement_id) { window.location.href = "/index.html?task_id="+requirement_id +} + +function updateRequirment(requirement_id, data) { + var requestData = JSON.stringify({ 'requirement_id': requirement_id, data }) + + successCallback = function(data) { + } + + errorCallback = function(data) { + } + + sendAjaxRequest('/requirement/update', 'POST', requestData, successCallback, errorCallback, true, false) } \ No newline at end of file diff --git a/frontend/static/js/setting.js b/frontend/static/js/setting.js index 2f27ee64..c217d5f7 100644 --- a/frontend/static/js/setting.js +++ b/frontend/static/js/setting.js @@ -20,6 +20,7 @@ function hideModal(md) { function editGit() { var requestData = { + 'tenant_id': getTenantID(), 'git_provider': $("#git_provider").val(), 'git_name': $("#git_name").val(), 'git_url': $("#git_url").val(), @@ -52,6 +53,7 @@ function showGitConfig(idx) { function editCI() { var requestData = { + 'tenant_id': getTenantID(), 'ci_name': $("#ci_name").val(), 'ci_provider': $("#ci_provider").val(), 'ci_api_url': $("#ci_api_url").val(), @@ -80,6 +82,7 @@ function showCIConfig(idx) { function editCD() { var requestData = { + 'tenant_id': getTenantID(), 'cd_name': $("#cd_name").val(), 'cd_provider': $("#cd_provider").val(), 'ACCESS_KEY': $("#ACCESS_KEY").val(), @@ -108,7 +111,7 @@ function showCDConfig(idx) { function getGitConfigList() { - requestData = '' + requestData = {'tenant_id': getTenantID()} successCallback = function(data) { gitconfigs = data.data @@ -132,7 +135,7 @@ function getGitConfigList() { } function getCIConfigList() { - requestData = '' + requestData = {'tenant_id': getTenantID()} successCallback = function(data) { ciconfigs = data.data @@ -154,7 +157,7 @@ function getCIConfigList() { } function getCDConfigList() { - requestData = '' + requestData = {'tenant_id': getTenantID()} successCallback = function(data) { cdconfigs = data.data diff --git a/frontend/static/js/tenant.js b/frontend/static/js/tenant.js index 54bdf304..f6dbb194 100644 --- a/frontend/static/js/tenant.js +++ b/frontend/static/js/tenant.js @@ -52,14 +52,13 @@ function getTenantList() { tenants.forEach(function (tenant, element_index, element_array) { str += ` + - - + - - + ` $("#tenant_list").html(str) }); @@ -155,13 +154,6 @@ function invite() { sendAjaxRequest('/tenant/invite', "POST", requestData, successCallback, errorCallback, true, false) } -function getTenantID() { - var queryString = window.location.search; - var params = new URLSearchParams(queryString); - var tenant_id = params.get('tenant_id'); - return tenant_id -} - function getBillings(tenant_id) { var requestData = { 'tenant_id': tenant_id } diff --git a/frontend/tenant.html b/frontend/tenant.html index 0d34d3ae..c06749ea 100644 --- a/frontend/tenant.html +++ b/frontend/tenant.html @@ -32,32 +32,37 @@ -
- - - - +
+
`+app["name"]+``+app["description"]+``+app["default_source_branch"]+``+app["default_target_branch"]+``+service["name"]+``+service["role"]+``+service["language"]+``+service["framework"]+`
`+service["name"]+``+service["role"]+``+service["language"]+``+service["framework"]+`
`+requirement["requirement_id"]+``+requirement["requirement_name"]+``+requirement["status"]+``+requirement["user_id"]+``+requirement["completion_rating"]+``+requirement["satisfaction_rating"]+`
`+requirement["requirement_name"]+``+requirement["status"]+` +
`+requirement["created_at"]+`
+
+ + `+requirement["username"]+` +
`+tenant["name"]+`
`+tenant["current_user_role"]+` `+tenant["status"]+``+tenant["member_count"]+` (`+tenant["current_user_role"]+`)`+tenant["description"]+``+tenant["member_count"]+` `+tenant["billing_type"]+` `+tenant["billing_quota"]+``+tenant["created_at"]+` `+tenant["billing_end"]+``+globalFrontendText["enter"]+` | `+globalFrontendText["show_tenant"]+` | `+globalFrontendText["configuration"]+``+globalFrontendText["enter"]+` | `+globalFrontendText["show_tenant"]+` | `+globalFrontendText["configuration"]+`
+ - - diff --git a/frontend/tenant_detail.html b/frontend/tenant_detail.html index fbe0be11..96e53ef5 100644 --- a/frontend/tenant_detail.html +++ b/frontend/tenant_detail.html @@ -32,10 +32,10 @@ @@ -43,7 +43,7 @@ diff --git a/frontend/tenant_new.html b/frontend/tenant_new.html index 850acdbd..98f65549 100644 --- a/frontend/tenant_new.html +++ b/frontend/tenant_new.html @@ -32,10 +32,10 @@ @@ -43,7 +43,7 @@ @@ -351,7 +351,7 @@
- +
diff --git a/frontend/user_login.html b/frontend/user_login.html index 095bbb14..b188b315 100644 --- a/frontend/user_login.html +++ b/frontend/user_login.html @@ -26,21 +26,16 @@ - - - -
+
@@ -54,7 +49,7 @@
- +
diff --git a/frontend/user_register.html b/frontend/user_register.html index c0bb1cf6..51fb6159 100644 --- a/frontend/user_register.html +++ b/frontend/user_register.html @@ -26,21 +26,16 @@
- - - -
+
@@ -62,8 +57,8 @@
- - +
+
diff --git a/i18n/en/LC_MESSAGES/frontend.mo b/i18n/en/LC_MESSAGES/frontend.mo index f6b3d5cc..baacd75f 100644 Binary files a/i18n/en/LC_MESSAGES/frontend.mo and b/i18n/en/LC_MESSAGES/frontend.mo differ diff --git a/i18n/en_frontend.po b/i18n/en_frontend.po index ea9f655f..8ba62dcf 100644 --- a/i18n/en_frontend.po +++ b/i18n/en_frontend.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-09-01 17:29+0800\n" +"POT-Creation-Date: 2023-09-02 12:45+0800\n" "PO-Revision-Date: 2023-07-17 18:37+0800\n" "Last-Translator: booboo \n" "Language-Team: Language i18n/en\n" @@ -569,12 +569,32 @@ msgstr "" #: backend/app/pkgs/tools/i18b.py:166 msgid "Associated CD Config" -msgstr "Associated CD Config (Company administrator Added in Company configuration page)" +msgstr "" +"Associated CD Config (Company administrator Added in Company configuration " +"page)" #: backend/app/pkgs/tools/i18b.py:167 msgid "Associated CI Config" -msgstr "Associated CI Config (Company administrator Added in Company configuration page)" +msgstr "" +"Associated CI Config (Company administrator Added in Company configuration " +"page)" #: backend/app/pkgs/tools/i18b.py:168 msgid "Associated Git Config" -msgstr "Associated Git Config (Company administrator Added in Company configuration page)" +msgstr "" +"Associated Git Config (Company administrator Added in Company configuration " +"page)" + +#: backend/app/pkgs/tools/i18b.py:169 +msgid "My Role" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:170 +msgid "The tenant does not exist or is abnormal" +msgstr "" +"The company does not exist or is abnormal. Please select another company.." + +#: backend/app/pkgs/tools/i18b.py:171 +msgid "Insufficient authority." +msgstr "" diff --git a/i18n/en_frontend.po~ b/i18n/en_frontend.po~ index 1e7b6ead..55a62b4e 100644 --- a/i18n/en_frontend.po~ +++ b/i18n/en_frontend.po~ @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-09-01 15:46+0800\n" +"POT-Creation-Date: 2023-09-02 11:45+0800\n" "PO-Revision-Date: 2023-07-17 18:37+0800\n" "Last-Translator: booboo \n" "Language-Team: Language i18n/en\n" @@ -562,3 +562,33 @@ msgstr "" #: backend/app/pkgs/tools/i18b.py:164 msgid "Configuration" msgstr "" + +#: backend/app/pkgs/tools/i18b.py:165 +msgid "Config name" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:166 +msgid "Associated CD Config" +msgstr "" +"Associated CD Config (Company administrator Added in Company configuration " +"page)" + +#: backend/app/pkgs/tools/i18b.py:167 +msgid "Associated CI Config" +msgstr "" +"Associated CI Config (Company administrator Added in Company configuration " +"page)" + +#: backend/app/pkgs/tools/i18b.py:168 +msgid "Associated Git Config" +msgstr "" +"Associated Git Config (Company administrator Added in Company configuration " +"page)" + +#: backend/app/pkgs/tools/i18b.py:169 +msgid "My Role" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:170 +msgid "The tenant does not exist or is abnormal" +msgstr "The company does not exist or is abnormal. Please select another company.." diff --git a/i18n/frontend.pot b/i18n/frontend.pot index 580eba16..ed5bfa15 100644 --- a/i18n/frontend.pot +++ b/i18n/frontend.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-09-01 17:29+0800\n" +"POT-Creation-Date: 2023-09-02 12:45+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -579,3 +579,15 @@ msgstr "" #: backend/app/pkgs/tools/i18b.py:168 msgid "Associated Git Config" msgstr "" + +#: backend/app/pkgs/tools/i18b.py:169 +msgid "My Role" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:170 +msgid "The tenant does not exist or is abnormal" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:171 +msgid "Insufficient authority." +msgstr "" diff --git a/i18n/zh/LC_MESSAGES/frontend.mo b/i18n/zh/LC_MESSAGES/frontend.mo index 28f29aff..9b03618b 100644 Binary files a/i18n/zh/LC_MESSAGES/frontend.mo and b/i18n/zh/LC_MESSAGES/frontend.mo differ diff --git a/i18n/zh_frontend.po b/i18n/zh_frontend.po index ec56ac6b..0e5002e4 100644 --- a/i18n/zh_frontend.po +++ b/i18n/zh_frontend.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-09-01 17:29+0800\n" +"POT-Creation-Date: 2023-09-02 12:45+0800\n" "PO-Revision-Date: 2023-07-17 18:36+0800\n" "Last-Translator: booboo \n" "Language-Team: Language i18n/zh\n" @@ -580,5 +580,17 @@ msgstr "关联 CI 配置(企业管理员在企业配置中添加)" msgid "Associated Git Config" msgstr "关联 Git 配置(企业管理员在企业配置中添加)" +#: backend/app/pkgs/tools/i18b.py:169 +msgid "My Role" +msgstr "我的角色" + +#: backend/app/pkgs/tools/i18b.py:170 +msgid "The tenant does not exist or is abnormal" +msgstr "当前企业不存在或状态异常,请选择其他企业。." + +#: backend/app/pkgs/tools/i18b.py:171 +msgid "Insufficient authority." +msgstr "没有操作权限。" + #~ msgid "Phone" #~ msgstr "手机号" diff --git a/i18n/zh_frontend.po~ b/i18n/zh_frontend.po~ index 499b604f..1be598df 100644 --- a/i18n/zh_frontend.po~ +++ b/i18n/zh_frontend.po~ @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-09-01 15:46+0800\n" +"POT-Creation-Date: 2023-09-02 11:45+0800\n" "PO-Revision-Date: 2023-07-17 18:36+0800\n" "Last-Translator: booboo \n" "Language-Team: Language i18n/zh\n" @@ -564,5 +564,29 @@ msgstr "" msgid "Configuration" msgstr "配置" +#: backend/app/pkgs/tools/i18b.py:165 +msgid "Config name" +msgstr "配置名称" + +#: backend/app/pkgs/tools/i18b.py:166 +msgid "Associated CD Config" +msgstr "关联 CD 配置(企业管理员在企业配置中添加)" + +#: backend/app/pkgs/tools/i18b.py:167 +msgid "Associated CI Config" +msgstr "关联 CI 配置(企业管理员在企业配置中添加)" + +#: backend/app/pkgs/tools/i18b.py:168 +msgid "Associated Git Config" +msgstr "关联 Git 配置(企业管理员在企业配置中添加)" + +#: backend/app/pkgs/tools/i18b.py:169 +msgid "My Role" +msgstr "我的角色" + +#: backend/app/pkgs/tools/i18b.py:170 +msgid "The tenant does not exist or is abnormal" +msgstr "当前企业不存在或状态异常,请选择其他企业。." + #~ msgid "Phone" #~ msgstr "手机号"