Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
amundsen_dev
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
Surendar Reddy Mangannagari
amundsen_dev
Commits
8f0cf22c
Unverified
Commit
8f0cf22c
authored
Aug 05, 2020
by
Marcos Iglesias
Committed by
GitHub
Aug 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removes unnecessary ESLint rule; fixes no-use-before-define issues and removes ESLint rule (#537)
parent
82d843e9
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
63 deletions
+58
-63
index.spec.tsx
...tion/static/js/components/BrowsePage/tests/index.spec.tsx
+2
-7
sagas.ts
amundsen_application/static/js/ducks/search/filters/sagas.ts
+12
-12
reducer.ts
...dsen_application/static/js/ducks/tableMetadata/reducer.ts
+37
-35
utilMethods.ts
amundsen_application/static/js/ducks/utilMethods.ts
+7
-7
package.json
amundsen_application/static/package.json
+0
-2
No files found.
amundsen_application/static/js/components/BrowsePage/tests/index.spec.tsx
View file @
8f0cf22c
...
...
@@ -11,17 +11,12 @@ import { BrowsePage } from '..';
describe
(
'BrowsePage'
,
()
=>
{
const
setup
=
()
=>
{
const
wrapper
=
shallow
<
BrowsePage
>
(<
BrowsePage
/>);
return
{
props
,
wrapper
};
return
shallow
<
BrowsePage
>
(<
BrowsePage
/>);
};
let
props
;
let
wrapper
;
beforeAll
(()
=>
{
const
setupResult
=
setup
();
props
=
setupResult
.
props
;
wrapper
=
setupResult
.
wrapper
;
wrapper
=
setup
();
});
describe
(
'render'
,
()
=>
{
...
...
amundsen_application/static/js/ducks/search/filters/sagas.ts
View file @
8f0cf22c
...
...
@@ -9,18 +9,6 @@ import { filterFromObj } from 'ducks/utilMethods';
import
{
UpdateSearchFilter
,
UpdateFilterRequest
}
from
'./reducer'
;
/**
* Listens to actions triggers by user updates to the filter state..
*/
export
function
*
filterWatcher
():
SagaIterator
{
/*
TODO: If we want to minimize api calls on checkbox quick-select,
we will have to debounce and accumulate filter updates elsewhere.
To be revisited when we have more checkbox filters
*/
yield
takeEvery
(
UpdateSearchFilter
.
REQUEST
,
filterWorker
);
}
/*
* Generates new filter shape from action payload.
* Then executes a search on current resource based with new filters and current search state values.
...
...
@@ -50,3 +38,15 @@ export function* filterWorker(action: UpdateFilterRequest): SagaIterator {
})
);
}
/**
* Listens to actions triggers by user updates to the filter state..
*/
export
function
*
filterWatcher
():
SagaIterator
{
/*
TODO: If we want to minimize api calls on checkbox quick-select,
we will have to debounce and accumulate filter updates elsewhere.
To be revisited when we have more checkbox filters
*/
yield
takeEvery
(
UpdateSearchFilter
.
REQUEST
,
filterWorker
);
}
amundsen_application/static/js/ducks/tableMetadata/reducer.ts
View file @
8f0cf22c
...
...
@@ -38,6 +38,41 @@ import tableOwnersReducer, {
TableOwnerReducerState
,
}
from
'./owners/reducer'
;
export
const
initialPreviewState
=
{
data
:
{},
status
:
null
,
};
export
const
initialTableDataState
:
TableMetadata
=
{
badges
:
[],
cluster
:
''
,
columns
:
[],
database
:
''
,
is_editable
:
false
,
is_view
:
false
,
key
:
''
,
last_updated_timestamp
:
0
,
schema
:
''
,
name
:
''
,
description
:
''
,
table_writer
:
{
application_url
:
''
,
description
:
''
,
id
:
''
,
name
:
''
},
partition
:
{
is_partitioned
:
false
},
table_readers
:
[],
source
:
{
source
:
''
,
source_type
:
''
},
resource_reports
:
[],
watermarks
:
[],
programmatic_descriptions
:
{},
};
export
const
initialState
:
TableMetadataReducerState
=
{
isLoading
:
true
,
lastIndexed
:
null
,
preview
:
initialPreviewState
,
statusCode
:
null
,
tableData
:
initialTableDataState
,
tableOwners
:
initialOwnersState
,
};
/* ACTIONS */
export
function
getTableData
(
key
:
string
,
...
...
@@ -53,6 +88,7 @@ export function getTableData(
type
:
GetTableData
.
REQUEST
,
};
}
export
function
getTableDataFailure
():
GetTableDataResponse
{
return
{
type
:
GetTableData
.
FAILURE
,
...
...
@@ -64,6 +100,7 @@ export function getTableDataFailure(): GetTableDataResponse {
},
};
}
export
function
getTableDataSuccess
(
data
:
TableMetadata
,
owners
:
OwnerDict
,
...
...
@@ -259,41 +296,6 @@ export interface TableMetadataReducerState {
tableOwners
:
TableOwnerReducerState
;
}
export
const
initialPreviewState
=
{
data
:
{},
status
:
null
,
};
export
const
initialTableDataState
:
TableMetadata
=
{
badges
:
[],
cluster
:
''
,
columns
:
[],
database
:
''
,
is_editable
:
false
,
is_view
:
false
,
key
:
''
,
last_updated_timestamp
:
0
,
schema
:
''
,
name
:
''
,
description
:
''
,
table_writer
:
{
application_url
:
''
,
description
:
''
,
id
:
''
,
name
:
''
},
partition
:
{
is_partitioned
:
false
},
table_readers
:
[],
source
:
{
source
:
''
,
source_type
:
''
},
resource_reports
:
[],
watermarks
:
[],
programmatic_descriptions
:
{},
};
export
const
initialState
:
TableMetadataReducerState
=
{
isLoading
:
true
,
lastIndexed
:
null
,
preview
:
initialPreviewState
,
statusCode
:
null
,
tableData
:
initialTableDataState
,
tableOwners
:
initialOwnersState
,
};
export
default
function
reducer
(
state
:
TableMetadataReducerState
=
initialState
,
action
...
...
amundsen_application/static/js/ducks/utilMethods.ts
View file @
8f0cf22c
...
...
@@ -33,6 +33,13 @@ export function filterFromObj(
},
{});
}
export
function
logAction
(
declaredProps
:
ActionLogParams
)
{
const
inferredProps
=
{
location
:
window
.
location
.
pathname
,
};
postActionLog
({
...
inferredProps
,
...
declaredProps
});
}
export
function
logClick
(
event
:
React
.
MouseEvent
<
HTMLElement
>
,
declaredProps
?:
ActionLogParams
...
...
@@ -61,10 +68,3 @@ export function logClick(
logAction
({
...
inferredProps
,
...
declaredProps
});
}
export
function
logAction
(
declaredProps
:
ActionLogParams
)
{
const
inferredProps
=
{
location
:
window
.
location
.
pathname
,
};
postActionLog
({
...
inferredProps
,
...
declaredProps
});
}
amundsen_application/static/package.json
View file @
8f0cf22c
...
...
@@ -282,7 +282,6 @@
"@typescript-eslint/naming-convention"
:
"warn"
,
"@typescript-eslint/no-unused-expressions"
:
"warn"
,
"@typescript-eslint/no-unused-vars"
:
"warn"
,
"@typescript-eslint/no-use-before-define"
:
"warn"
,
"@typescript-eslint/member-delimiter-style"
:
[
"off"
,
{
...
...
@@ -323,7 +322,6 @@
}
}
],
"@typescript-eslint/indent"
:
"off"
,
"array-callback-return"
:
"warn"
,
"camelcase"
:
"off"
,
"class-methods-use-this"
:
"off"
,
...
...
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