Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AmendsenProject
Project
Project
Details
Activity
Releases
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
Shaik Janipasha
AmendsenProject
Commits
0bd3573e
Unverified
Commit
0bd3573e
authored
Jul 27, 2020
by
Tamika Tannis
Committed by
GitHub
Jul 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: Apply column description length configuration (#522)
* Apply column description length configuration * Lint fix
parent
8f11e7c9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
10 deletions
+19
-10
index.tsx
...static/js/components/TableDetail/ColumnListItem/index.tsx
+2
-1
index.tsx
...en_application/static/js/components/TableDetail/index.tsx
+9
-9
config-utils.ts
amundsen_application/static/js/config/config-utils.ts
+8
-0
No files found.
amundsen_application/static/js/components/TableDetail/ColumnListItem/index.tsx
View file @
0bd3573e
...
...
@@ -8,7 +8,7 @@ import { connect } from 'react-redux';
import
ColumnDescEditableText
from
'components/TableDetail/ColumnDescEditableText'
;
import
ColumnStats
from
'components/TableDetail/ColumnStats'
;
import
{
notificationsEnabled
}
from
'config/config-utils'
;
import
{
notificationsEnabled
,
getMaxLength
}
from
'config/config-utils'
;
import
{
openRequestDescriptionDialog
}
from
'ducks/notification/reducer'
;
import
{
OpenRequestAction
}
from
'ducks/notification/types'
;
import
{
logClick
}
from
'ducks/utilMethods'
;
...
...
@@ -181,6 +181,7 @@ export class ColumnListItem extends React.Component<
<
ColumnDescEditableText
columnIndex=
{
this
.
props
.
index
}
editable=
{
metadata
.
is_editable
}
maxLength=
{
getMaxLength
(
'columnDescLength'
)
}
value=
{
metadata
.
description
}
/>
</
EditableSection
>
...
...
amundsen_application/static/js/components/TableDetail/index.tsx
View file @
0bd3573e
...
...
@@ -11,7 +11,14 @@ import { GlobalState } from 'ducks/rootReducer';
import
{
getTableData
}
from
'ducks/tableMetadata/reducer'
;
import
{
GetTableDataRequest
}
from
'ducks/tableMetadata/types'
;
import
AppConfig
from
'config/config'
;
import
{
getMaxLength
,
getSourceIconClass
,
indexDashboardsEnabled
,
issueTrackingEnabled
,
notificationsEnabled
,
}
from
'config/config-utils'
;
import
BadgeList
from
'components/common/BadgeList'
;
import
BookmarkIcon
from
'components/common/Bookmark/BookmarkIcon'
;
import
Breadcrumb
from
'components/common/Breadcrumb'
;
...
...
@@ -38,13 +45,6 @@ import { ResourceType, TableMetadata } from 'interfaces';
import
EditableSection
from
'components/common/EditableSection'
;
import
{
getSourceIconClass
,
indexDashboardsEnabled
,
issueTrackingEnabled
,
notificationsEnabled
,
}
from
'config/config-utils'
;
import
{
formatDateTimeShort
}
from
'utils/dateUtils'
;
import
{
getLoggingParams
}
from
'utils/logUtils'
;
...
...
@@ -246,7 +246,7 @@ export class TableDetail extends React.Component<
editUrl=
{
editUrl
}
>
<
TableDescEditableText
maxLength=
{
AppConfig
.
editableText
.
tableDescLength
}
maxLength=
{
getMaxLength
(
'tableDescLength'
)
}
value=
{
data
.
description
}
editable=
{
data
.
is_editable
}
/>
...
...
amundsen_application/static/js/config/config-utils.ts
View file @
0bd3573e
...
...
@@ -170,3 +170,11 @@ export function generateExploreUrl(tableData: TableMetadata): string {
tableData
.
name
);
}
/**
* Gets the max length for items with a configurable max length.
* Currently only applied to `editableText`, but method can be extended for future cases
*/
export
function
getMaxLength
(
key
:
string
)
{
return
AppConfig
.
editableText
[
key
];
}
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