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
Apr 01, 2020
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
Show 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
...
@@ -173,3 +173,27 @@
...
@@ -173,3 +173,27 @@
display
:
none
;
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
dashboardv3/public/js/views/business_metadata/BusinessMetadataAttrTableLayoutView.js
View file @
2fbfb557
...
@@ -163,7 +163,7 @@ define(['require',
...
@@ -163,7 +163,7 @@ define(['require',
editable
:
false
,
editable
:
false
,
formatter
:
_
.
extend
({},
Backgrid
.
CellFormatter
.
prototype
,
{
formatter
:
_
.
extend
({},
Backgrid
.
CellFormatter
.
prototype
,
{
fromRaw
:
function
(
rawValue
,
model
)
{
fromRaw
:
function
(
rawValue
,
model
)
{
return
model
.
get
(
'name'
);
return
_
.
escape
(
model
.
get
(
'name'
)
);
}
}
})
})
},
},
...
@@ -177,6 +177,39 @@ define(['require',
...
@@ -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
:
{
options
:
{
label
:
"Entity Type(s)"
,
label
:
"Entity Type(s)"
,
cell
:
"html"
,
cell
:
"html"
,
...
...
dashboardv3/public/js/views/business_metadata/BusinessMetadataAttributeItemView.js
View file @
2fbfb557
...
@@ -172,8 +172,8 @@ define(['require',
...
@@ -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
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'
);
$
(
'.select2-dropdown--below'
).
addClass
(
'remove-from-list'
);
});
});
if
(
this
.
model
.
get
(
"searchWeight"
)
&&
this
.
model
.
get
(
"searchWeight"
)
!=
-
1
)
{
if
(
this
.
model
.
get
(
"searchWeight"
))
{
searchWeightValue
=
this
.
model
.
get
(
"searchWeight"
);
searchWeightValue
=
this
.
model
.
get
(
"searchWeight"
)
===
-
1
?
0
:
this
.
model
.
get
(
"searchWeight"
)
;
}
}
if
(
this
.
model
.
get
(
"options"
))
{
if
(
this
.
model
.
get
(
"options"
))
{
stringLengthValue
=
this
.
model
.
get
(
"options"
).
maxStrLength
||
'50'
;
stringLengthValue
=
this
.
model
.
get
(
"options"
).
maxStrLength
||
'50'
;
...
...
dashboardv3/public/js/views/business_metadata/BusinessMetadataTableLayoutView.js
View file @
2fbfb557
...
@@ -247,13 +247,15 @@ define(['require',
...
@@ -247,13 +247,15 @@ define(['require',
var
attrValues
=
''
,
var
attrValues
=
''
,
attrTable
=
$
(
'table'
),
attrTable
=
$
(
'table'
),
attrTableBody
=
$
(
'tbody'
),
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
=
''
,
attrRow
=
''
,
attrTableDetails
=
''
;
attrTableDetails
=
''
;
if
(
model
.
attributes
&&
model
.
attributes
.
attributeDefs
.
length
)
{
if
(
model
.
attributes
&&
model
.
attributes
.
attributeDefs
.
length
)
{
_
.
each
(
model
.
attributes
.
attributeDefs
,
function
(
attrObj
)
{
_
.
each
(
model
.
attributes
.
attributeDefs
,
function
(
attrObj
)
{
var
applicableEntityTypes
=
''
,
var
applicableEntityTypes
=
''
,
typeName
=
attrObj
.
typeName
;
typeName
=
attrObj
.
typeName
,
multiSelect
=
''
,
maxString
=
'NA'
;
if
(
attrObj
.
options
&&
attrObj
.
options
.
applicableEntityTypes
)
{
if
(
attrObj
.
options
&&
attrObj
.
options
.
applicableEntityTypes
)
{
var
entityTypes
=
JSON
.
parse
(
attrObj
.
options
.
applicableEntityTypes
);
var
entityTypes
=
JSON
.
parse
(
attrObj
.
options
.
applicableEntityTypes
);
_
.
each
(
entityTypes
,
function
(
values
)
{
_
.
each
(
entityTypes
,
function
(
values
)
{
...
@@ -262,8 +264,13 @@ define(['require',
...
@@ -262,8 +264,13 @@ define(['require',
}
}
if
(
typeName
.
includes
(
'array'
))
{
if
(
typeName
.
includes
(
'array'
))
{
typeName
=
_
.
escape
(
typeName
);
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>'
;
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
));
$
(
el
).
append
(
$
(
'<div>'
).
html
(
adminText
));
...
@@ -271,7 +278,6 @@ define(['require',
...
@@ -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>'
;
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
));
$
(
el
).
append
(
$
(
'<div>'
).
html
(
adminText
));
}
}
}
}
},
},
name
:
{
name
:
{
...
...
dashboardv3/public/js/views/entity/EntityBusinessMetaDataView.js
View file @
2fbfb557
...
@@ -215,7 +215,8 @@ define([
...
@@ -215,7 +215,8 @@ define([
this
.
collection
.
unshift
(
modelObj
);
this
.
collection
.
unshift
(
modelObj
);
},
},
renderBusinessMetadata
:
function
()
{
renderBusinessMetadata
:
function
()
{
var
li
=
""
var
that
=
this
,
li
=
""
this
.
actualCollection
.
forEach
(
function
(
obj
)
{
this
.
actualCollection
.
forEach
(
function
(
obj
)
{
var
attrLi
=
""
;
var
attrLi
=
""
;
_
.
each
(
obj
.
attributes
,
function
(
val
,
key
)
{
_
.
each
(
obj
.
attributes
,
function
(
val
,
key
)
{
...
@@ -236,13 +237,20 @@ define([
...
@@ -236,13 +237,20 @@ define([
attrLi
+=
"<tr><td>"
+
_
.
escape
(
key
)
+
" ("
+
_
.
escape
(
val
.
typeName
)
+
")</td><td>"
+
_
.
escape
(
newVal
)
+
"</td></tr>"
;
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
+=
that
.
associateAttributePanel
(
obj
,
attrLi
);
"<li class='business-metadata-tree-child entity-detail-table'>"
+
"<table class='table'>"
+
attrLi
+
"</table>"
+
"</li></ul>"
;
});
});
this
.
ui
.
businessMetadataTree
.
html
(
li
);
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
()
{
onRender
:
function
()
{
this
.
panelOpenClose
();
this
.
panelOpenClose
();
this
.
renderBusinessMetadata
();
this
.
renderBusinessMetadata
();
...
...
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