forked from opensearch-project/OpenSearch-Dashboards
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[D&D] Fix scss lint and available fields (opensearch-project#1927)
* fix(Lint): fixes scss linting issues Signed-off-by: Ashwin Pc <ashwinpc@amazon.com> * fix: Filter field types correctly Signed-off-by: Ashwin Pc <ashwinpc@amazon.com> * fix: minor Signed-off-by: Ashwin Pc <ashwinpc@amazon.com>
- Loading branch information
Showing
8 changed files
with
75 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
@mixin scrollNavParent ($template-row: none) { | ||
display: grid; | ||
min-height: 0; | ||
@mixin scrollNavParent($template-row: none) { | ||
display: grid; | ||
min-height: 0; | ||
|
||
@if $template-row != 'none' { | ||
grid-template-rows: $template-row; | ||
} | ||
} | ||
@if $template-row != "none" { | ||
grid-template-rows: $template-row; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
@import '@elastic/eui/src/global_styling/variables/header'; | ||
@import '@elastic/eui/src/global_styling/variables/form'; | ||
@import "@elastic/eui/src/global_styling/variables/header"; | ||
@import "@elastic/eui/src/global_styling/variables/form"; | ||
|
||
$osdHeaderOffset: $euiHeaderHeightCompensation * 2; | ||
$wizSideNavWidth: 470px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/plugins/wizard/public/application/components/data_tab/utils/get_available_fields.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { | ||
FieldTypes, | ||
IndexPatternField, | ||
isNestedField, | ||
propFilter, | ||
} from '../../../../../../data/common'; | ||
|
||
const filterByType = propFilter('type'); | ||
|
||
export const getAvailableFields = ( | ||
fields: IndexPatternField[], | ||
filterFieldTypes: FieldTypes = '*' | ||
) => { | ||
const filteredFields = fields.filter((field: IndexPatternField) => { | ||
if (!field.aggregatable || isNestedField(field) || field.scripted) { | ||
return false; | ||
} | ||
|
||
return filterByType([field], filterFieldTypes).length !== 0; | ||
}); | ||
|
||
return filteredFields; | ||
}; |
6 changes: 6 additions & 0 deletions
6
src/plugins/wizard/public/application/components/data_tab/utils/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
export { getAvailableFields } from './get_available_fields'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/plugins/wizard/public/application/components/top_nav.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
.wizTopNav { | ||
grid-area: topNav; | ||
border-bottom: $euiBorderThin; | ||
} | ||
grid-area: topNav; | ||
border-bottom: $euiBorderThin; | ||
} |