Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0f7c5f3

Browse files
Merge pull request#1723 from iamfaran/fix/environment-type
[FIX] Make env type optional in frontend
2 parents6816dcb +ac2cc48 commit0f7c5f3

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

‎client/packages/lowcoder/src/pages/setting/environments/EnvironmentsList.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ const EnvironmentsList: React.FC = () => {
8282
// Calculate environment type statistics
8383
constenvironmentStats=React.useMemo(()=>{
8484
conststats=environments.reduce((acc,env)=>{
85-
consttype=env.environmentType.toUpperCase();
85+
consttype=env.environmentType?.toUpperCase()||'TEST';
8686
acc[type]=(acc[type]||0)+1;
8787
returnacc;
8888
},{}asRecord<string,number>);
@@ -145,7 +145,7 @@ const EnvironmentsList: React.FC = () => {
145145
(env.environmentName||"").toLowerCase().includes(searchLower)||
146146
(env.environmentFrontendUrl||"").toLowerCase().includes(searchLower)||
147147
env.environmentId.toLowerCase().includes(searchLower)||
148-
env.environmentType.toLowerCase().includes(searchLower)
148+
(env.environmentType||"").toLowerCase().includes(searchLower)
149149
);
150150
}).sort((a,b)=>{
151151
// Sort by license status: licensed environments first

‎client/packages/lowcoder/src/pages/setting/environments/components/EnvironmentsTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ const EnvironmentsTable: React.FC<EnvironmentsTableProps> = ({
152152
<divstyle={{display:'flex',alignItems:'center',gap:'12px'}}>
153153
<Avatar
154154
style={{
155-
backgroundColor:getAvatarColor(env.environmentType),
155+
backgroundColor:getAvatarColor(env.environmentType||'TEST'),
156156
display:'flex',
157157
alignItems:'center',
158158
justifyContent:'center'

‎client/packages/lowcoder/src/pages/setting/environments/types/environment.types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export interface Environment {
66
environmentName?:string;
77
environmentDescription?:string;
88
environmentIcon?:string;
9-
environmentType:string;
9+
environmentType?:string;
1010
environmentApiServiceUrl?:string;
1111
environmentNodeServiceUrl?:string;
1212
environmentFrontendUrl?:string;

‎client/packages/lowcoder/src/pages/setting/environments/utils/environmentUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,6 @@ export const getEnvironmentHeaderGradient = (envType: string | undefined): strin
6666
*@returns Formatted environment type string
6767
*/
6868
exportconstformatEnvironmentType=(envType:string|undefined):string=>{
69-
if(!envType)return'UNKNOWN';
69+
if(!envType)return'TEST';
7070
returnenvType.toUpperCase();
7171
};

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp