Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
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
dataplatform
atlas
Commits
2fbfb557
Commit
2fbfb557
authored
4 years ago
by
kevalbhatt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3710 : [Business Metadata] Missing Business Metadata attribute info in list view
parent
6ece28fd
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
84 additions
and
12 deletions
+84
-12
business-metadata.scss
dashboardv3/public/css/scss/business-metadata.scss
+25
-0
BusinessMetadataAttrTableLayoutView.js
.../business_metadata/BusinessMetadataAttrTableLayoutView.js
+34
-1
BusinessMetadataAttributeItemView.js
...ws/business_metadata/BusinessMetadataAttributeItemView.js
+2
-2
BusinessMetadataTableLayoutView.js
...iews/business_metadata/BusinessMetadataTableLayoutView.js
+10
-4
EntityBusinessMetaDataView.js
...rdv3/public/js/views/entity/EntityBusinessMetaDataView.js
+13
-5
No files found.
dashboardv3/public/css/scss/business-metadata.scss
View file @
2fbfb557
...
...
@@ -172,4 +172,28 @@
.select2-results__option
[
aria-selected
=
true
]
{
display
:
none
;
}
}
.business-metadata-detail-attr
{
margin-bottom
:
0px
;
box-shadow
:
none
;
.panel-heading
{
color
:
#686868
!
important
;
font-size
:
13px
;
padding
:
0
;
.panel-title
{
font-size
:
14px
;
a
:hover
{
color
:
#686868
!
important
;
opacity
:
1
!
important
;
}
}
}
.btn-group
>
button
{
color
:
#686868
!
important
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
dashboardv3/public/js/views/business_metadata/BusinessMetadataAttrTableLayoutView.js
View file @
2fbfb557
...
...
@@ -163,7 +163,7 @@ define(['require',
editable
:
false
,
formatter
:
_
.
extend
({},
Backgrid
.
CellFormatter
.
prototype
,
{
fromRaw
:
function
(
rawValue
,
model
)
{
return
model
.
get
(
'name'
);
return
_
.
escape
(
model
.
get
(
'name'
)
);
}
})
},
...
...
@@ -177,6 +177,39 @@ define(['require',
}
})
},
searchWeight
:
{
label
:
"Search Weight"
,
cell
:
"String"
,
editable
:
false
},
enableMultipleValue
:
{
label
:
"Enable Multivalues"
,
cell
:
"html"
,
editable
:
false
,
formatter
:
_
.
extend
({},
Backgrid
.
CellFormatter
.
prototype
,
{
fromRaw
:
function
(
rawValue
,
model
)
{
var
enableMultipleValue
=
''
;
if
(
model
.
get
(
'typeName'
).
indexOf
(
'array<'
)
>
-
1
)
{
enableMultipleValue
=
'checked'
;
}
return
'<input type="checkbox" class="form-check-input multi-value-select" data-id="multiValueSelectStatus" '
+
enableMultipleValue
+
' disabled="disabled">'
;
}
})
},
maxStrLength
:
{
label
:
"Max Length"
,
cell
:
"html"
,
editable
:
false
,
formatter
:
_
.
extend
({},
Backgrid
.
CellFormatter
.
prototype
,
{
fromRaw
:
function
(
rawValue
,
model
)
{
var
maxString
=
"NA"
;
if
(
model
.
get
(
'typeName'
).
indexOf
(
'string'
)
>
-
1
)
{
maxString
=
model
.
get
(
'options'
).
maxStrLength
||
maxString
;
}
return
maxString
;
}
})
},
options
:
{
label
:
"Entity Type(s)"
,
cell
:
"html"
,
...
...
This diff is collapsed.
Click to expand it.
dashboardv3/public/js/views/business_metadata/BusinessMetadataAttributeItemView.js
View file @
2fbfb557
...
...
@@ -172,8 +172,8 @@ define(['require',
this
.
ui
.
entityTypeSelector
.
on
(
'select2:open'
,
function
(
e
)
{
// to make selected option disable in dropdown added remove-from-list class
$
(
'.select2-dropdown--below'
).
addClass
(
'remove-from-list'
);
});
if
(
this
.
model
.
get
(
"searchWeight"
)
&&
this
.
model
.
get
(
"searchWeight"
)
!=
-
1
)
{
searchWeightValue
=
this
.
model
.
get
(
"searchWeight"
);
if
(
this
.
model
.
get
(
"searchWeight"
))
{
searchWeightValue
=
this
.
model
.
get
(
"searchWeight"
)
===
-
1
?
0
:
this
.
model
.
get
(
"searchWeight"
)
;
}
if
(
this
.
model
.
get
(
"options"
))
{
stringLengthValue
=
this
.
model
.
get
(
"options"
).
maxStrLength
||
'50'
;
...
...
This diff is collapsed.
Click to expand it.
dashboardv3/public/js/views/business_metadata/BusinessMetadataTableLayoutView.js
View file @
2fbfb557
...
...
@@ -247,13 +247,15 @@ define(['require',
var
attrValues
=
''
,
attrTable
=
$
(
'table'
),
attrTableBody
=
$
(
'tbody'
),
attrTableHeading
=
"<thead><td style='display:table-cell'><b>Attribute</b></td><td style='display:table-cell'><b>Type</b></td><td style='display:table-cell'><b>Applicable Type(s)</b></td><td style='display:table-cell'><b>Action</b></td></thead>"
,
attrTableHeading
=
"<thead><td style='display:table-cell'><b>Attribute</b></td><td style='display:table-cell'><b>Type</b></td><td style='display:table-cell'><b>
Search Weight</b></td><td style='display:table-cell'><b>Enable Multivalues</b></td><td style='display:table-cell'><b>Max Length</b></td><td style='display:table-cell'><b>
Applicable Type(s)</b></td><td style='display:table-cell'><b>Action</b></td></thead>"
,
attrRow
=
''
,
attrTableDetails
=
''
;
if
(
model
.
attributes
&&
model
.
attributes
.
attributeDefs
.
length
)
{
_
.
each
(
model
.
attributes
.
attributeDefs
,
function
(
attrObj
)
{
var
applicableEntityTypes
=
''
,
typeName
=
attrObj
.
typeName
;
typeName
=
attrObj
.
typeName
,
multiSelect
=
''
,
maxString
=
'NA'
;
if
(
attrObj
.
options
&&
attrObj
.
options
.
applicableEntityTypes
)
{
var
entityTypes
=
JSON
.
parse
(
attrObj
.
options
.
applicableEntityTypes
);
_
.
each
(
entityTypes
,
function
(
values
)
{
...
...
@@ -262,8 +264,13 @@ define(['require',
}
if
(
typeName
.
includes
(
'array'
))
{
typeName
=
_
.
escape
(
typeName
);
multiSelect
=
'checked'
;
}
attrRow
+=
"<tr> <td style='display:table-cell'>"
+
_
.
escape
(
attrObj
.
name
)
+
"</td><td style='display:table-cell'>"
+
typeName
+
"</td><td style='display:table-cell'>"
+
applicableEntityTypes
+
"</td><td style='display:table-cell'> <div class='btn btn-action btn-sm' style='margin-left:0px;' data-id='attributeEdit' data-guid='"
+
model
.
get
(
'guid'
)
+
"' data-name ='"
+
_
.
escape
(
attrObj
.
name
)
+
"' data-action='attributeEdit' >Edit</div> </td></tr> "
;
if
(
typeName
.
includes
(
'string'
)
&&
attrObj
.
options
&&
attrObj
.
options
.
maxStrLength
)
{
maxString
=
attrObj
.
options
.
maxStrLength
;
}
attrRow
+=
"<tr> <td style='display:table-cell'>"
+
_
.
escape
(
attrObj
.
name
)
+
"</td><td style='display:table-cell'>"
+
typeName
+
"</td><td style='display:table-cell'>"
+
_
.
escape
(
attrObj
.
searchWeight
)
+
"</td><td style='display:table-cell'><input type='checkbox' class='form-check-input multi-value-select' "
+
multiSelect
+
" disabled='disabled'> </td><td style='display:table-cell'>"
+
maxString
+
"</td><td style='display:table-cell'>"
+
applicableEntityTypes
+
"</td><td style='display:table-cell'> <div class='btn btn-action btn-sm' style='margin-left:0px;' data-id='attributeEdit' data-guid='"
+
model
.
get
(
'guid'
)
+
"' data-name ='"
+
_
.
escape
(
attrObj
.
name
)
+
"' data-action='attributeEdit' >Edit</div> </td></tr> "
;
});
var
adminText
=
'<div class="row"><div class="col-sm-12 attr-details"><table style="padding: 50px;">'
+
attrTableHeading
+
attrRow
+
'</table></div></div>'
;
$
(
el
).
append
(
$
(
'<div>'
).
html
(
adminText
));
...
...
@@ -271,7 +278,6 @@ define(['require',
var
adminText
=
'<div class="row"><div class="col-sm-12 attr-details"><h5 class="text-center"> No attributes to show.</h5></div></div>'
;
$
(
el
).
append
(
$
(
'<div>'
).
html
(
adminText
));
}
}
},
name
:
{
...
...
This diff is collapsed.
Click to expand it.
dashboardv3/public/js/views/entity/EntityBusinessMetaDataView.js
View file @
2fbfb557
...
...
@@ -215,7 +215,8 @@ define([
this
.
collection
.
unshift
(
modelObj
);
},
renderBusinessMetadata
:
function
()
{
var
li
=
""
var
that
=
this
,
li
=
""
this
.
actualCollection
.
forEach
(
function
(
obj
)
{
var
attrLi
=
""
;
_
.
each
(
obj
.
attributes
,
function
(
val
,
key
)
{
...
...
@@ -236,13 +237,20 @@ define([
attrLi
+=
"<tr><td>"
+
_
.
escape
(
key
)
+
" ("
+
_
.
escape
(
val
.
typeName
)
+
")</td><td>"
+
_
.
escape
(
newVal
)
+
"</td></tr>"
;
}
});
li
+=
"<ul class='business-metadata-tree-parent'><li class='table'>"
+
_
.
escape
(
obj
.
get
(
"__internal_UI_businessMetadataName"
))
+
"</li>"
+
"<li class='business-metadata-tree-child entity-detail-table'>"
+
"<table class='table'>"
+
attrLi
+
"</table>"
+
"</li></ul>"
;
li
+=
that
.
associateAttributePanel
(
obj
,
attrLi
);
});
this
.
ui
.
businessMetadataTree
.
html
(
li
);
},
associateAttributePanel
:
function
(
obj
,
tableBody
)
{
return
'<div class="panel panel-default custom-panel expand_collapse_panel-icon no-border business-metadata-detail-attr">'
+
'<div class="panel-heading" data-toggle="collapse" href="#'
+
_
.
escape
(
obj
.
get
(
"__internal_UI_businessMetadataName"
))
+
'" aria-expanded="true" style="width: 70%;">'
+
'<h4 class="panel-title"> <a>'
+
_
.
escape
(
obj
.
get
(
"__internal_UI_businessMetadataName"
))
+
'</a></h4>'
+
'<div class="btn-group pull-left"> <button type="button" title="Collapse"><i class="ec-icon fa"></i></button></div>'
+
'</div>'
+
'<div id="'
+
_
.
escape
(
obj
.
get
(
"__internal_UI_businessMetadataName"
))
+
'" class="panel-collapse collapse in">'
+
'<div class="panel-body"><table class="table">'
+
tableBody
+
'</table></div>'
+
'</div></div>'
;
},
onRender
:
function
()
{
this
.
panelOpenClose
();
this
.
renderBusinessMetadata
();
...
...
This diff is collapsed.
Click to expand it.
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