Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dinky
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangpeng
dinky
Commits
21772f10
Unverified
Commit
21772f10
authored
Oct 18, 2023
by
ZackYoung
Committed by
GitHub
Oct 18, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add_common_sql_config (#2400)
parent
9f994585
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
285 additions
and
128 deletions
+285
-128
pages.ts
dinky-web/src/locales/en-US/pages.ts
+2
-0
pages.ts
dinky-web/src/locales/zh-CN/pages.ts
+2
-0
index.tsx
...taStudio/RightContainer/ExecuteConfig/CommonSql/index.tsx
+111
-0
index.tsx
...ataStudio/RightContainer/ExecuteConfig/FlinkSql/index.tsx
+112
-0
index.tsx
...c/pages/DataStudio/RightContainer/ExecuteConfig/index.tsx
+19
-87
model.ts
dinky-web/src/pages/DataStudio/model.ts
+3
-0
route.tsx
dinky-web/src/pages/DataStudio/route.tsx
+4
-2
function.tsx
dinky-web/src/pages/DevOps/function.tsx
+32
-39
No files found.
dinky-web/src/locales/en-US/pages.ts
View file @
21772f10
...
...
@@ -353,6 +353,8 @@ export default {
'pages.datastudio.label.execConfig.changelog'
:
'Print ChangeLog'
,
'pages.datastudio.label.execConfig.changelog.tip'
:
'Open the print stream, it will run synchronously and return the ChangeLog containing op information, it is not enabled by default and returns the final result Table'
,
'pages.datastudio.label.execConfig.selectDatabase'
:
'Select Database'
,
'pages.datastudio.label.execConfig.selectDatabase.tip'
:
'Select the database to be used'
,
'pages.datastudio.label.execConfig.maxrow'
:
'Maximum number of rows'
,
'pages.datastudio.label.execConfig.maxrow.tip'
:
'The maximum number of rows of preview data'
,
'pages.datastudio.label.execConfig.preview.result'
:
'Preview Result'
,
...
...
dinky-web/src/locales/zh-CN/pages.ts
View file @
21772f10
...
...
@@ -341,6 +341,8 @@ export default {
'pages.datastudio.label.execConfig.changelog'
:
'打印流'
,
'pages.datastudio.label.execConfig.changelog.tip'
:
'开启打印流,将同步运行并返回含有 op 信息的 ChangeLog,默认不开启且返回最终结果 Table'
,
'pages.datastudio.label.execConfig.selectDatabase'
:
'选择数据源'
,
'pages.datastudio.label.execConfig.selectDatabase.tip'
:
'选择 Sql 语句执行的数据源'
,
'pages.datastudio.label.execConfig.maxrow'
:
'最大行数'
,
'pages.datastudio.label.execConfig.maxrow.tip'
:
'预览数据的最大行数'
,
'pages.datastudio.label.execConfig.preview.result'
:
'预览结果'
,
...
...
dinky-web/src/pages/DataStudio/RightContainer/ExecuteConfig/CommonSql/index.tsx
0 → 100644
View file @
21772f10
/*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
import
{
getCurrentData
}
from
'@/pages/DataStudio/function'
;
import
{
StateType
,
STUDIO_MODEL
}
from
'@/pages/DataStudio/model'
;
import
{
SWITCH_OPTIONS
}
from
'@/services/constants'
;
import
{
l
}
from
'@/utils/intl'
;
import
{
InfoCircleOutlined
}
from
'@ant-design/icons'
;
import
{
ProForm
,
ProFormDigit
,
ProFormGroup
,
ProFormSelect
,
ProFormSwitch
}
from
'@ant-design/pro-components'
;
import
{
useForm
}
from
'antd/es/form/Form'
;
import
{
connect
}
from
'umi'
;
import
{
DataSources
}
from
"@/types/RegCenter/data"
;
import
{
TagAlignLeft
}
from
"@/components/StyledComponents"
;
import
{
Tag
}
from
"antd"
;
import
React
from
"react"
;
const
ExecuteConfigCommonSql
=
(
props
:
any
)
=>
{
const
{
dispatch
,
tabs
:
{
panes
,
activeKey
},
databaseData
}
=
props
;
const
[
form
]
=
useForm
();
const
current
=
getCurrentData
(
panes
,
activeKey
);
const
data
:
Record
<
number
,
React
.
ReactNode
>
=
{};
const
databaseDataList
=
databaseData
as
DataSources
.
DataSource
[];
databaseDataList
.
filter
(
x
=>
x
.
type
.
toLowerCase
()
===
current
?.
dialect
.
toLowerCase
()).
forEach
((
item
:
DataSources
.
DataSource
)
=>
{
data
[
item
.
id
]
=
(
<
TagAlignLeft
><
Tag
key=
{
item
.
id
}
color=
{
item
.
enabled
?
'processing'
:
'error'
}
>
{
item
.
type
}
</
Tag
>
{
item
.
name
}
</
TagAlignLeft
>
)
});
form
.
setFieldsValue
({...
current
,
databaseId
:
String
(
current
?.
databaseId
??
""
)});
const
onValuesChange
=
(
change
:
any
,
all
:
any
)
=>
{
for
(
let
i
=
0
;
i
<
panes
.
length
;
i
++
)
{
if
(
panes
[
i
].
key
===
activeKey
)
{
for
(
const
key
in
change
)
{
if
(
key
===
'databaseId'
)
{
panes
[
i
].
params
.
taskData
[
key
]
=
Number
(
all
[
key
]);
continue
;
}
panes
[
i
].
params
.
taskData
[
key
]
=
all
[
key
];
}
break
;
}
}
dispatch
({
type
:
STUDIO_MODEL
.
saveTabs
,
payload
:
{...
props
.
tabs
}
});
};
return
(
<>
<
ProForm
initialValues=
{
{
maxRowNum
:
100
}
}
style=
{
{
padding
:
'10px'
}
}
form=
{
form
}
submitter=
{
false
}
layout=
'vertical'
onValuesChange=
{
onValuesChange
}
>
<
ProFormGroup
>
<
ProFormSelect
width=
{
'lg'
}
name=
{
'databaseId'
}
label=
{
l
(
'pages.datastudio.label.execConfig.selectDatabase'
)
}
valueEnum=
{
data
}
initialValue=
{
1
}
placeholder=
"Please select a country"
rules=
{
[{
required
:
true
,
message
:
'Please select your country!'
}]
}
/>
</
ProFormGroup
>
<
ProFormGroup
>
<
ProFormDigit
width=
{
'xs'
}
label=
{
l
(
'pages.datastudio.label.execConfig.maxrow'
)
}
name=
'maxRowNum'
tooltip=
{
l
(
'pages.datastudio.label.execConfig.maxrow.tip'
)
}
min=
{
1
}
max=
{
9999
}
/>
</
ProFormGroup
>
</
ProForm
>
</>
);
};
export
default
connect
(({
Studio
}:
{
Studio
:
StateType
})
=>
({
tabs
:
Studio
.
tabs
,
databaseData
:
Studio
.
database
.
dbData
}))(
ExecuteConfigCommonSql
);
dinky-web/src/pages/DataStudio/RightContainer/ExecuteConfig/FlinkSql/index.tsx
0 → 100644
View file @
21772f10
/*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
import
{
getCurrentData
}
from
'@/pages/DataStudio/function'
;
import
{
StateType
,
STUDIO_MODEL
}
from
'@/pages/DataStudio/model'
;
import
{
SWITCH_OPTIONS
}
from
'@/services/constants'
;
import
{
l
}
from
'@/utils/intl'
;
import
{
InfoCircleOutlined
}
from
'@ant-design/icons'
;
import
{
ProForm
,
ProFormDigit
,
ProFormGroup
,
ProFormSwitch
}
from
'@ant-design/pro-components'
;
import
{
useForm
}
from
'antd/es/form/Form'
;
import
{
connect
}
from
'umi'
;
const
ExecuteConfigFlinkSql
=
(
props
:
any
)
=>
{
const
{
dispatch
,
tabs
:
{
panes
,
activeKey
}
}
=
props
;
const
[
form
]
=
useForm
();
const
current
=
getCurrentData
(
panes
,
activeKey
);
form
.
setFieldsValue
(
current
);
const
onValuesChange
=
(
change
:
any
,
all
:
any
)
=>
{
for
(
let
i
=
0
;
i
<
panes
.
length
;
i
++
)
{
if
(
panes
[
i
].
key
===
activeKey
)
{
for
(
const
key
in
change
)
{
panes
[
i
].
params
.
taskData
[
key
]
=
all
[
key
];
}
break
;
}
}
dispatch
({
type
:
STUDIO_MODEL
.
saveTabs
,
payload
:
{
...
props
.
tabs
}
});
};
return
(
<>
<
ProForm
initialValues=
{
{
maxRowNum
:
100
}
}
style=
{
{
padding
:
'10px'
}
}
form=
{
form
}
submitter=
{
false
}
layout=
'vertical'
onValuesChange=
{
onValuesChange
}
>
<
ProFormGroup
>
<
ProFormSwitch
label=
{
l
(
'pages.datastudio.label.execConfig.preview.result'
)
}
name=
'useResult'
tooltip=
{
{
title
:
l
(
'pages.datastudio.label.execConfig.preview.result.tip'
),
icon
:
<
InfoCircleOutlined
/>
}
}
{
...
SWITCH_OPTIONS
()}
/>
<
ProFormSwitch
label=
{
l
(
'pages.datastudio.label.execConfig.changelog'
)
}
name=
'useChangeLog'
tooltip=
{
{
title
:
l
(
'pages.datastudio.label.execConfig.changelog.tip'
),
icon
:
<
InfoCircleOutlined
/>
}
}
{
...
SWITCH_OPTIONS
()}
/>
</
ProFormGroup
>
<
ProFormGroup
>
<
ProFormSwitch
label=
{
l
(
'pages.datastudio.label.execConfig.autostop'
)
}
name=
'useAutoCancel'
tooltip=
{
{
title
:
l
(
'pages.datastudio.label.execConfig.autostop.tip'
),
icon
:
<
InfoCircleOutlined
/>
}
}
{
...
SWITCH_OPTIONS
()}
/>
<
ProFormDigit
width=
{
'xs'
}
label=
{
l
(
'pages.datastudio.label.execConfig.maxrow'
)
}
name=
'maxRowNum'
tooltip=
{
l
(
'pages.datastudio.label.execConfig.maxrow.tip'
)
}
min=
{
1
}
max=
{
9999
}
/>
</
ProFormGroup
>
</
ProForm
>
</>
);
};
export
default
connect
(({
Studio
}:
{
Studio
:
StateType
})
=>
({
tabs
:
Studio
.
tabs
}))(
ExecuteConfigFlinkSql
);
dinky-web/src/pages/DataStudio/RightContainer/ExecuteConfig/index.tsx
View file @
21772f10
...
...
@@ -17,96 +17,28 @@
*
*/
import
{
getCurrentData
}
from
'@/pages/DataStudio/function'
;
import
{
StateType
,
STUDIO_MODEL
}
from
'@/pages/DataStudio/model'
;
import
{
SWITCH_OPTIONS
}
from
'@/services/constants'
;
import
{
l
}
from
'@/utils/intl'
;
import
{
InfoCircleOutlined
}
from
'@ant-design/icons'
;
import
{
ProForm
,
ProFormDigit
,
ProFormGroup
,
ProFormSwitch
}
from
'@ant-design/pro-components'
;
import
{
useForm
}
from
'antd/es/form/Form'
;
import
{
connect
}
from
'umi'
;
import
{
getCurrentTab
}
from
'@/pages/DataStudio/function'
;
import
{
StateType
,
TabsPageSubType
}
from
'@/pages/DataStudio/model'
;
import
{
connect
}
from
'umi'
;
import
ExecuteConfigFlinkSql
from
"@/pages/DataStudio/RightContainer/ExecuteConfig/FlinkSql"
;
import
ExecuteConfigCommonSql
from
"@/pages/DataStudio/RightContainer/ExecuteConfig/CommonSql"
;
const
ExecuteConfig
=
(
props
:
any
)
=>
{
const
{
dispatch
,
tabs
:
{
panes
,
activeKey
}
}
=
props
;
const
[
form
]
=
useForm
();
const
current
=
getCurrentData
(
panes
,
activeKey
);
form
.
setFieldsValue
(
current
);
const
onValuesChange
=
(
change
:
any
,
all
:
any
)
=>
{
for
(
let
i
=
0
;
i
<
panes
.
length
;
i
++
)
{
if
(
panes
[
i
].
key
===
activeKey
)
{
for
(
const
key
in
change
)
{
panes
[
i
].
params
.
taskData
[
key
]
=
all
[
key
];
const
{
tabs
:
{
panes
,
activeKey
}
}
=
props
;
const
current
=
getCurrentTab
(
panes
,
activeKey
);
{
if
(
current
?.
subType
===
TabsPageSubType
.
flinkSql
)
{
return
<
ExecuteConfigFlinkSql
/>;
}
else
{
return
<
ExecuteConfigCommonSql
/>;
}
break
;
}
}
dispatch
({
type
:
STUDIO_MODEL
.
saveTabs
,
payload
:
{
...
props
.
tabs
}
});
};
return
(
<>
<
ProForm
initialValues=
{
{
maxRowNum
:
100
}
}
style=
{
{
padding
:
'10px'
}
}
form=
{
form
}
submitter=
{
false
}
layout=
'vertical'
onValuesChange=
{
onValuesChange
}
>
<
ProFormGroup
>
<
ProFormSwitch
label=
{
l
(
'pages.datastudio.label.execConfig.preview.result'
)
}
name=
'useResult'
tooltip=
{
{
title
:
l
(
'pages.datastudio.label.execConfig.preview.result.tip'
),
icon
:
<
InfoCircleOutlined
/>
}
}
{
...
SWITCH_OPTIONS
()}
/>
<
ProFormSwitch
label=
{
l
(
'pages.datastudio.label.execConfig.changelog'
)
}
name=
'useChangeLog'
tooltip=
{
{
title
:
l
(
'pages.datastudio.label.execConfig.changelog.tip'
),
icon
:
<
InfoCircleOutlined
/>
}
}
{
...
SWITCH_OPTIONS
()}
/>
</
ProFormGroup
>
<
ProFormGroup
>
<
ProFormSwitch
label=
{
l
(
'pages.datastudio.label.execConfig.autostop'
)
}
name=
'useAutoCancel'
tooltip=
{
{
title
:
l
(
'pages.datastudio.label.execConfig.autostop.tip'
),
icon
:
<
InfoCircleOutlined
/>
}
}
{
...
SWITCH_OPTIONS
()}
/>
<
ProFormDigit
width=
{
'xs'
}
label=
{
l
(
'pages.datastudio.label.execConfig.maxrow'
)
}
name=
'maxRowNum'
tooltip=
{
l
(
'pages.datastudio.label.execConfig.maxrow.tip'
)
}
min=
{
1
}
max=
{
9999
}
/>
</
ProFormGroup
>
</
ProForm
>
</>
);
};
}
export
default
connect
(({
Studio
}:
{
Studio
:
StateType
})
=>
({
tabs
:
Studio
.
tabs
export
default
connect
(({
Studio
}:
{
Studio
:
StateType
})
=>
({
tabs
:
Studio
.
tabs
}))(
ExecuteConfig
);
dinky-web/src/pages/DataStudio/model.ts
View file @
21772f10
...
...
@@ -103,7 +103,10 @@ export type TaskDataBaseType = {
id
:
number
;
name
:
string
;
statement
:
string
;
dialect
:
string
;
step
:
number
;
// Only common sql has(只有普通sql才有)
databaseId
?:
number
;
};
export
type
TaskDataType
=
TaskDataBaseType
&
Record
<
string
,
any
>
;
...
...
dinky-web/src/pages/DataStudio/route.tsx
View file @
21772f10
...
...
@@ -57,6 +57,7 @@ import {
}
from
'@ant-design/icons'
;
import
{
DiffEditor
}
from
'@monaco-editor/react'
;
import
{
ReactNode
}
from
'react'
;
import
{
isSql
}
from
"@/pages/DataStudio/HeaderContainer/service"
;
export
const
LeftSide
=
[
{
...
...
@@ -97,7 +98,7 @@ export const RightSide: TabProp[] = [
icon
:
<
PlayCircleOutlined
/>,
label
:
l
(
'menu.datastudio.executeConfig'
),
children
:
<
ExecuteConfig
/>,
isShow
:
(
type
,
subType
)
=>
type
===
TabsPageType
.
project
&&
TabsPageSubType
.
flinkSql
===
subType
isShow
:
(
type
,
subType
)
=>
type
===
TabsPageType
.
project
&&
TabsPageSubType
.
flinkSql
===
subType
||
isSql
(
subType
??
""
)
},
{
auth
:
'/datastudio/right/savePoint'
,
...
...
@@ -301,4 +302,4 @@ export type TabProp = {
children
:
ReactNode
;
isShow
?:
(
type
:
TabsPageType
,
subType
?:
TabsPageSubType
)
=>
boolean
;
auth
?:
string
;
};
};
\ No newline at end of file
dinky-web/src/pages/DevOps/function.tsx
View file @
21772f10
...
...
@@ -15,8 +15,8 @@
* limitations under the License.
*/
import
{
JOB_LIFE_CYCLE
,
JOB_STATUS
}
from
'@/pages/DevOps/constants'
;
import
{
l
}
from
'@/utils/intl'
;
import
{
JOB_LIFE_CYCLE
,
JOB_STATUS
}
from
'@/pages/DevOps/constants'
;
import
{
l
}
from
'@/utils/intl'
;
/**
* Generates an array of options for the life cycle filter.
...
...
@@ -24,18 +24,11 @@ import { l } from '@/utils/intl';
* @returns {Array} - An array of objects representing the life cycle filter options.
*/
export
const
LIFECYCLE_FILTER
=
()
=>
{
return
[
{
text
:
l
(
'global.table.lifecycle.dev'
),
value
:
JOB_LIFE_CYCLE
.
DEVELOP
},
{
text
:
l
(
'global.table.lifecycle.publish'
),
value
:
JOB_LIFE_CYCLE
.
RELEASE
},
{
text
:
l
(
'global.table.lifecycle.online'
),
value
:
JOB_LIFE_CYCLE
.
ONLINE
},
{
text
:
l
(
'global.table.lifecycle.unknown'
),
value
:
JOB_LIFE_CYCLE
.
UNKNOWN
}
];
return
[
{
text
:
l
(
'global.table.lifecycle.dev'
),
value
:
JOB_LIFE_CYCLE
.
DEVELOP
},
{
text
:
l
(
'global.table.lifecycle.online'
),
value
:
JOB_LIFE_CYCLE
.
ONLINE
},
{
text
:
l
(
'global.table.lifecycle.unknown'
),
value
:
JOB_LIFE_CYCLE
.
UNKNOWN
}
];
};
/**
...
...
@@ -44,19 +37,19 @@ export const LIFECYCLE_FILTER = () => {
* @returns {Array} - An array of objects representing the job status filter options.
*/
export
const
JOB_STATUS_FILTER
=
()
=>
{
return
[
{
text
:
JOB_STATUS
.
FINISHED
,
value
:
JOB_STATUS
.
FINISHED
},
{
text
:
JOB_STATUS
.
RUNNING
,
value
:
JOB_STATUS
.
RUNNING
},
{
text
:
JOB_STATUS
.
FAILED
,
value
:
JOB_STATUS
.
FAILED
},
{
text
:
JOB_STATUS
.
CANCELED
,
value
:
JOB_STATUS
.
CANCELED
},
{
text
:
JOB_STATUS
.
INITIALIZING
,
value
:
JOB_STATUS
.
INITIALIZING
},
{
text
:
JOB_STATUS
.
RESTARTING
,
value
:
JOB_STATUS
.
RESTARTING
},
{
text
:
JOB_STATUS
.
CREATED
,
value
:
JOB_STATUS
.
CREATED
},
{
text
:
JOB_STATUS
.
FAILING
,
value
:
JOB_STATUS
.
FAILING
},
{
text
:
JOB_STATUS
.
SUSPENDED
,
value
:
JOB_STATUS
.
SUSPENDED
},
{
text
:
JOB_STATUS
.
CANCELLING
,
value
:
JOB_STATUS
.
CANCELLING
},
{
text
:
JOB_STATUS
.
UNKNOWN
,
value
:
JOB_STATUS
.
UNKNOWN
}
];
return
[
{
text
:
JOB_STATUS
.
FINISHED
,
value
:
JOB_STATUS
.
FINISHED
},
{
text
:
JOB_STATUS
.
RUNNING
,
value
:
JOB_STATUS
.
RUNNING
},
{
text
:
JOB_STATUS
.
FAILED
,
value
:
JOB_STATUS
.
FAILED
},
{
text
:
JOB_STATUS
.
CANCELED
,
value
:
JOB_STATUS
.
CANCELED
},
{
text
:
JOB_STATUS
.
INITIALIZING
,
value
:
JOB_STATUS
.
INITIALIZING
},
{
text
:
JOB_STATUS
.
RESTARTING
,
value
:
JOB_STATUS
.
RESTARTING
},
{
text
:
JOB_STATUS
.
CREATED
,
value
:
JOB_STATUS
.
CREATED
},
{
text
:
JOB_STATUS
.
FAILING
,
value
:
JOB_STATUS
.
FAILING
},
{
text
:
JOB_STATUS
.
SUSPENDED
,
value
:
JOB_STATUS
.
SUSPENDED
},
{
text
:
JOB_STATUS
.
CANCELLING
,
value
:
JOB_STATUS
.
CANCELLING
},
{
text
:
JOB_STATUS
.
UNKNOWN
,
value
:
JOB_STATUS
.
UNKNOWN
}
];
};
/**
...
...
@@ -66,16 +59,16 @@ export const JOB_STATUS_FILTER = () => {
* @returns {boolean} - True if the job status indicates that the job is done, false otherwise.
*/
export
function
isStatusDone
(
type
:
string
)
{
if
(
!
type
)
{
return
true
;
}
switch
(
type
)
{
case
JOB_STATUS
.
FAILED
:
case
JOB_STATUS
.
CANCELED
:
case
JOB_STATUS
.
FINISHED
:
case
JOB_STATUS
.
UNKNOWN
:
return
true
;
default
:
return
false
;
}
if
(
!
type
)
{
return
true
;
}
switch
(
type
)
{
case
JOB_STATUS
.
FAILED
:
case
JOB_STATUS
.
CANCELED
:
case
JOB_STATUS
.
FINISHED
:
case
JOB_STATUS
.
UNKNOWN
:
return
true
;
default
:
return
false
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment