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
072a73e0
Commit
072a73e0
authored
Jul 12, 2016
by
Shwetha GS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-949 UI improvement for modal and tag styling in table (Kalyanikashikar via shwethags)
parent
2ad344f0
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
266 additions
and
172 deletions
+266
-172
main.scss
dashboardv2/public/css/scss/main.scss
+2
-4
tag.scss
dashboardv2/public/css/scss/tag.scss
+52
-2
tree.scss
dashboardv2/public/css/scss/tree.scss
+4
-0
BaseCollection.js
dashboardv2/public/js/collection/BaseCollection.js
+5
-15
VCatalogList.js
dashboardv2/public/js/collection/VCatalogList.js
+0
-1
BusinessCatalogDetailLayoutView_tmpl.html
...usiness_catalog/BusinessCatalogDetailLayoutView_tmpl.html
+3
-3
TreeLayoutView_tmpl.html
...ic/js/templates/business_catalog/TreeLayoutView_tmpl.html
+1
-0
DetailPageLayoutView_tmpl.html
...c/js/templates/detail_page/DetailPageLayoutView_tmpl.html
+4
-4
SearchDetailLayoutView_tmpl.html
...blic/js/templates/search/SearchDetailLayoutView_tmpl.html
+1
-1
addTagModalView_tmpl.html
...boardv2/public/js/templates/tag/addTagModalView_tmpl.html
+14
-13
CommonViewFunction.js
dashboardv2/public/js/utils/CommonViewFunction.js
+19
-43
Messages.js
dashboardv2/public/js/utils/Messages.js
+4
-2
Utils.js
dashboardv2/public/js/utils/Utils.js
+1
-1
BusinessCatalogDetailLayoutView.js
...views/business_catalog/BusinessCatalogDetailLayoutView.js
+1
-2
TreeLayoutView.js
...oardv2/public/js/views/business_catalog/TreeLayoutView.js
+14
-4
DetailPageLayoutView.js
...ardv2/public/js/views/detail_page/DetailPageLayoutView.js
+23
-8
LineageLayoutView.js
dashboardv2/public/js/views/graph/LineageLayoutView.js
+0
-1
SchemaLayoutView.js
dashboardv2/public/js/views/schema/SchemaLayoutView.js
+36
-28
SearchResultLayoutView.js
dashboardv2/public/js/views/search/SearchResultLayoutView.js
+53
-28
TagDetailTableLayoutView.js
dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js
+20
-5
addTagModalView.js
dashboardv2/public/js/views/tag/addTagModalView.js
+8
-7
release-log.txt
release-log.txt
+1
-0
No files found.
dashboardv2/public/css/scss/main.scss
View file @
072a73e0
...
...
@@ -305,10 +305,8 @@ ul {
}
@media
(
min-width
:
768px
)
{
.col-sm-offset-1
{
margin
:
4%
4%
0
;
}
.col-sm-10
{
.col-sm-custom
{
width
:
92%
;
margin
:
36px
36px
0px
;
}
}
dashboardv2/public/css/scss/tag.scss
View file @
072a73e0
...
...
@@ -117,7 +117,6 @@
.inputTag
{
display
:
inline-block
;
padding
:
2px
10px
;
border
:
1px
$tag_color
solid
;
color
:
$tag_color
;
font-size
:
14px
;
...
...
@@ -128,11 +127,42 @@
cursor
:
pointer
;
background-color
:
$white
;
white-space
:
nowrap
;
overflow
:
hidden
;
&
:hover
{
color
:
$tag_color
;
}
i
.fa
{
position
:
relative
;
right
:
-
5px
;
padding
:
5px
;
cursor
:
pointer
;
&
:hover
{
color
:
$white
;
background-color
:
$tag_color
;
}
}
>
.inputValue
{
padding
:
5px
;
&
:hover
{
color
:
$white
;
background-color
:
$tag_color
;
}
}
}
.inputTagAdd
{
display
:
inline-block
;
border
:
1px
#4A90E2
solid
;
color
:
#4A90E2
;
font-size
:
14px
;
border-radius
:
4px
;
margin-right
:
3px
;
margin-bottom
:
3px
;
float
:
left
;
cursor
:
pointer
;
background-color
:
#fff
;
white-space
:
nowrap
;
overflow
:
hidden
;
padding
:
2px
6px
;
&
:hover
{
color
:
$white
;
background-color
:
$tag_color
;
...
...
@@ -289,3 +319,23 @@ form-control .tagInpput {
.multiSelect
{
float
:
right
;
}
.popover.popoverTag
{
display
:
block
;
}
.popoverContainer
.inputTag
{
display
:
block
;
float
:
none
;
margin-top
:
10px
;
}
.popoverContainer
.inputTag
>
.inputValue
{
padding
:
2px
5px
;
display
:
inline-block
;
width
:
100px
;
}
.tagAttributeLabel
{
color
:
$color_star_dust_approx
;
}
dashboardv2/public/css/scss/tree.scss
View file @
072a73e0
...
...
@@ -195,3 +195,7 @@
}
}
}
.popoverTerm
{
margin-top
:
25px
!
important
;
}
dashboardv2/public/js/collection/BaseCollection.js
View file @
072a73e0
...
...
@@ -36,27 +36,17 @@ define(['require',
initialize
:
function
()
{},
bindErrorEvents
:
function
()
{
this
.
bind
(
"error"
,
Utils
.
defaultErrorHandler
);
},
bind
Loader
:
function
(
element
)
{
bind
Request
:
function
(
)
{
this
.
bind
(
'request'
,
function
(
model
,
ajaxObj
,
collectionObj
)
{
this
.
ajaxStart
(
collectionObj
.
$el
);
this
.
ajaxStart
(
model
,
ajaxObj
,
collectionObj
);
},
this
);
this
.
bind
(
'sync'
,
function
(
model
,
ajaxObj
,
collectionObj
)
{
this
.
ajaxComplete
(
collectionObj
.
$el
);
this
.
ajaxComplete
(
model
,
ajaxObj
,
collectionObj
);
},
this
);
},
ajaxStart
:
function
(
element
)
{
//start spinner
if
(
element
)
{
element
.
prepend
(
"<div class='loading'></div>"
);
}
},
ajaxComplete
:
function
(
element
)
{
if
(
element
)
{
element
.
find
(
'loading'
).
remove
();
}
},
ajaxStart
:
function
(
model
,
ajaxObj
,
collectionObj
)
{},
ajaxComplete
:
function
(
model
,
ajaxObj
,
collectionObj
)
{},
/**
* state required for the PageableCollection
*/
...
...
dashboardv2/public/js/collection/VCatalogList.js
View file @
072a73e0
...
...
@@ -33,7 +33,6 @@ define(['require',
this
.
modelName
=
'VCatalog'
;
this
.
modelAttrName
=
''
;
this
.
bindErrorEvents
();
this
.
bindLoader
();
},
fetch
:
function
(
options
)
{
//Call Backbone's fetch
...
...
dashboardv2/public/js/templates/business_catalog/BusinessCatalogDetailLayoutView_tmpl.html
View file @
072a73e0
...
...
@@ -32,7 +32,7 @@
</div>
<div
class=
"container-fluid gray-bg"
>
<div
class=
"row"
>
<div
class=
"col-sm-
10 col-sm-offset-1
"
>
<div
class=
"col-sm-
custom
"
>
<div
class=
"atlast-tabbable"
>
<ul
class=
"nav nav-tabs"
role=
"tablist"
>
<li
role=
"presentation"
class=
"tab active"
><a
href=
"#tab-details"
aria-controls=
"tab-details"
role=
"tab"
data-toggle=
"tab"
>
Properties
</a></li>
...
...
@@ -47,7 +47,7 @@
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-
10 col-sm-offset-1
"
>
<div
class=
"col-sm-
custom
"
>
<div
class=
"atlast-tabbable"
>
<div
class=
"panel panel-default lineageLayout"
style=
"display:none"
>
<div
id=
"r_lineageLayoutView"
></div>
...
...
@@ -57,7 +57,7 @@
</div>
</div>
<!-- <div class="row">
<div class="col-sm-
10 col-sm-offset-1
">
<div class="col-sm-
custom
">
<h2>Comments</h2>
<textarea class="form-control comment-input" rows="5" placeholder="Add a Comment"></textarea>
<button class="btn-atlas">Comment</button>
...
...
dashboardv2/public/js/templates/business_catalog/TreeLayoutView_tmpl.html
View file @
072a73e0
...
...
@@ -15,6 +15,7 @@
* limitations under the License.
-->
<div
class=
"clearfix add-seperator"
>
<p
data-id=
"descriptionAssign"
style=
"display:none"
>
Assign a term to this asset
</p>
<button
class=
"btn btn-atlasAction btn-atlas pull-left"
data-id=
"backTaxanomy"
><i
class=
"fa fa-chevron-left"
></i>
Back
</button>
<button
class=
"btn btn-atlasAction btn-atlas pull-right"
onclick=
"this.blur();"
title=
"Refresh"
data-id=
"refreshTaxanomy"
><i
class=
"fa fa-refresh"
></i></button>
</div>
...
...
dashboardv2/public/js/templates/detail_page/DetailPageLayoutView_tmpl.html
View file @
072a73e0
...
...
@@ -16,7 +16,7 @@
-->
<div
class=
"page-title clearfix"
>
<div
class=
"row"
>
<a
href=
"javascript:void(0);"
class=
"backButton"
data-id=
"backButton"
><i
class=
"fa fa-chevron-left"
></i>
Back To Result
</a>
<a
href=
"javascript:void(0);"
class=
"backButton"
data-id=
"backButton"
><i
class=
"fa fa-chevron-left"
></i>
Back To Result
s
</a>
</div>
<h1><span
data-id=
"title"
></span>
<!-- <small>Bookmark</small> <button data-id="editButton" class="btn btn-default pull-right editbutton" id="editText"><i class="fa fa-pencil"></i></button> -->
</h1>
<div
data-id=
"editBox"
style=
"margin-bottom:10px;"
>
...
...
@@ -44,7 +44,7 @@
</div>
<div
class=
"container-fluid gray-bg"
>
<div
class=
"row"
>
<div
class=
"col-sm-
10 col-sm-offset-1
"
>
<div
class=
"col-sm-
custom
"
>
<div
class=
"atlast-tabbable"
>
<h4
class=
"lineageLabel"
>
LINEAGE
</h4>
<div
class=
"panel panel-default lineageLayout"
>
...
...
@@ -54,7 +54,7 @@
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-
10 col-sm-offset-1
"
>
<div
class=
"col-sm-
custom
"
>
<div
class=
"atlast-tabbable"
>
<h4
class=
"detailLabel"
>
DETAILS
</h4>
<ul
class=
"nav nav-tabs"
role=
"tablist"
>
...
...
@@ -87,7 +87,7 @@
</div>
</div>
<div>
<!-- div class="col-sm-
10 col-sm-offset-1
">
<!-- div class="col-sm-
custom
">
<h2>Comments</h2>
<textarea class="form-control comment-input" rows="5" placeholder="Add a Comment"></textarea>
<button class="btn-atlas">Comment</button>
...
...
dashboardv2/public/js/templates/search/SearchDetailLayoutView_tmpl.html
View file @
072a73e0
...
...
@@ -16,7 +16,7 @@
-->
<div
class=
"container-fluid gray-bg"
>
<div
class=
"row"
>
<div
class=
"col-sm-
10 col-sm-offset-1
"
>
<div
class=
"col-sm-
custom
"
>
<div
class=
"atlast-tabbable"
>
<div
id=
"r_searchResultLayoutView"
></div>
</div>
...
...
dashboardv2/public/js/templates/tag/addTagModalView_tmpl.html
View file @
072a73e0
...
...
@@ -14,16 +14,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
-->
<div
class=
"
row
"
>
<div
name=
"tagDefinitionform"
class=
"css-form
"
>
<div
class=
"form-group"
>
<label
class=
"control-label col-sm-4"
>
Tag definition
</label
>
<div
class=
"col-sm-8 input-spacing"
>
<select
class=
"form-control"
data-id=
"addTagOptions"
required
>
</select
>
</div>
</div
>
</div
>
</div>
<div
class=
"row form-group modalHeight"
data-id=
"tagAttribute"
style=
"display:none"
>
</div>
<div
class=
"
form-horizontal
"
>
<div
class=
"form-group
"
>
<!-- <label class="control-label col-sm-4">Tag definition</label> --
>
<div
class=
"col-sm-12"
>
<select
class=
"form-control row-margin-bottom"
data-id=
"addTagOptions"
required
>
</select
>
</div
>
</div>
<div
class=
"row modalHeight"
>
<div
class=
"col-sm-12"
data-id=
"tagAttribute"
style=
"display:none"
>
</div>
</div
>
</div>
\ No newline at end of file
dashboardv2/public/js/utils/CommonViewFunction.js
View file @
072a73e0
...
...
@@ -20,33 +20,11 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Glob
'use strict'
;
var
CommonViewFunction
=
{};
CommonViewFunction
.
deleteTagModel
=
function
(
tagName
,
AssignTerm
)
{
var
msg
=
""
,
titleMessage
=
""
,
deleteText
=
""
;
if
(
tagName
&&
AssignTerm
!=
"assignTerm"
)
{
var
tagOrTerm
=
Utils
.
checkTagOrTerm
(
tagName
);
if
(
tagOrTerm
.
term
)
{
msg
=
"<div class='ellipsis'>Delete: "
+
"<b>"
+
tagName
+
"?</b></div>"
+
"<p class='termNote'>Assets map to this term will be unclassified</p>"
;
titleMessage
=
Messages
.
deleteTerm
;
deleteText
=
"Delete"
;
}
else
{
msg
=
"<div class='ellipsis'>Delete: "
+
"<b>"
+
tagName
+
"?</b></div>"
;
var
titleMessage
=
Messages
.
deleteTag
;
deleteText
=
"Delete"
;
}
}
if
(
AssignTerm
==
"assignTerm"
)
{
msg
=
"<div class='ellipsis'>Remove: "
+
"<b>"
+
tagName
+
"?</b></div>"
+
"<p class='termNote'>Assets map to this term will be unclassified</p>"
;
titleMessage
=
Messages
.
RemoveTerm
;
deleteText
=
"Remove"
;
}
CommonViewFunction
.
deleteTagModel
=
function
(
options
)
{
var
modal
=
new
Modal
({
title
:
titleMessage
,
okText
:
delete
Text
,
htmlContent
:
msg
,
title
:
options
.
titleMessage
,
okText
:
options
.
button
Text
,
htmlContent
:
options
.
msg
,
cancelText
:
"Cancel"
,
allowCancel
:
true
,
okCloses
:
true
,
...
...
@@ -58,24 +36,22 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Glob
require
([
'models/VTag'
],
function
(
VTag
)
{
var
tagModel
=
new
VTag
();
if
(
options
&&
options
.
guid
&&
options
.
tagName
)
{
tagModel
.
deleteTag
(
options
.
guid
,
options
.
tagName
,
{
beforeSend
:
function
()
{},
success
:
function
(
data
)
{
var
msg
=
"Tag "
+
name
.
name
+
Messages
.
delet
eSuccessMessage
;
var
msg
=
"Tag "
+
name
.
name
+
Messages
.
remov
eSuccessMessage
;
if
(
data
.
traitName
)
{
var
tagOrTerm
=
Utils
.
checkTagOrTerm
(
data
.
traitName
);
if
(
tagOrTerm
.
term
)
{
msg
=
"Term "
+
data
.
traitName
+
Messages
.
delet
eSuccessMessage
;
msg
=
"Term "
+
data
.
traitName
+
Messages
.
remov
eSuccessMessage
;
}
else
{
msg
=
"Tag "
+
data
.
traitName
+
Messages
.
delet
eSuccessMessage
;
msg
=
"Tag "
+
data
.
traitName
+
Messages
.
remov
eSuccessMessage
;
}
}
else
{
var
tagOrTerm
=
Utils
.
checkTagOrTerm
(
options
.
tagName
);
if
(
tagOrTerm
.
term
)
{
msg
=
"Term "
+
data
.
traitName
+
Messages
.
delet
eSuccessMessage
;
msg
=
"Term "
+
data
.
traitName
+
Messages
.
remov
eSuccessMessage
;
}
else
{
msg
=
"Tag "
+
data
.
traitName
+
Messages
.
delet
eSuccessMessage
;
msg
=
"Tag "
+
data
.
traitName
+
Messages
.
remov
eSuccessMessage
;
}
}
Utils
.
notifySuccess
({
...
...
@@ -325,7 +301,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Glob
dropdown
:
function
()
{
return
'<div class=
\
"dropdown
\
">'
+
'<a href=
\
"javascript:void(0);
\
" class=
\
"'
+
this
.
namespace
+
'-toggle
\
" data-toggle=
\
"dropdown
\
"><i class=
\
"'
+
this
.
dropicon
+
'
\
"</i></a>'
+
'<ul class=
\
"'
+
this
.
namespace
+
'-menu dropdown-menu popover bottom arrowPosition
\
" ><div class="arrow"></div></ul>'
+
'<ul class=
\
"'
+
this
.
namespace
+
'-menu dropdown-menu popover
popoverTerm
bottom arrowPosition
\
" ><div class="arrow"></div></ul>'
+
'</div>'
;
},
dropdownContent
:
function
(
a
)
{
...
...
@@ -355,7 +331,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Glob
var
tagName
=
Utils
.
checkTagOrTerm
(
traits
[
key
].
$typeName$
);
if
(
tagName
.
term
)
{
terms
.
push
({
deleteHtml
:
'<a class="pull-left" title="
Delete Term"><i class="fa fa-trash" data-id="tagClick
" data-name="'
+
traits
[
key
].
$typeName$
+
'" data-guid="'
+
model
.
get
(
'$id$'
).
id
+
'" ></i></a>'
,
deleteHtml
:
'<a class="pull-left" title="
Remove Term"><i class="fa fa-trash" data-id="tagClick" data-assetname="'
+
model
.
get
(
"name"
)
+
'
" data-name="'
+
traits
[
key
].
$typeName$
+
'" data-guid="'
+
model
.
get
(
'$id$'
).
id
+
'" ></i></a>'
,
url
:
traits
[
key
].
$typeName$
.
split
(
"."
).
join
(
"/"
),
name
:
tagName
.
fullName
});
...
...
@@ -387,29 +363,29 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Glob
var
traits
=
model
.
get
(
'$traits$'
),
atags
=
""
,
addTag
=
""
,
popTag
=
""
,
count
=
0
;
_
.
keys
(
model
.
get
(
'$traits$'
)).
map
(
function
(
key
)
{
var
tagName
=
Utils
.
checkTagOrTerm
(
traits
[
key
].
$typeName$
),
className
=
"inputTag"
;
if
(
!
tagName
.
term
)
{
if
(
count
>=
1
)
{
className
+=
" hide"
;
popTag
+=
'<a class="'
+
className
+
'" data-id="tagClick"><span class="inputValue">'
+
traits
[
key
].
$typeName$
+
'</span><i class="fa fa-times" data-id="delete" data-assetname="'
+
model
.
get
(
"name"
)
+
'"data-name="'
+
tagName
.
name
+
'" data-guid="'
+
model
.
get
(
'$id$'
).
id
+
'" ></i></a>'
;
}
else
{
atags
+=
'<a class="'
+
className
+
'" data-id="tagClick"><span class="inputValue">'
+
traits
[
key
].
$typeName$
+
'</span><i class="fa fa-times" data-id="delete" data-assetname="'
+
model
.
get
(
"name"
)
+
'" data-name="'
+
tagName
.
name
+
'" data-guid="'
+
model
.
get
(
'$id$'
).
id
+
'" ></i></a>'
;
}
++
count
;
atags
+=
'<a class="'
+
className
+
'" data-id="tagClick">'
+
traits
[
key
].
$typeName$
+
'<i class="fa fa-times" data-id="delete" data-name="'
+
tagName
.
name
+
'" data-guid="'
+
model
.
get
(
'$id$'
).
id
+
'" ></i></a>'
;
}
});
if
(
model
.
get
(
'$id$'
))
{
addTag
+=
'<a href="javascript:void(0)" data-id="addTag" class="inputTag
" data-guid="'
+
model
.
get
(
'$id$'
).
id
+
'" ><i style="right:0"
class="fa fa-plus"></i></a>'
;
addTag
+=
'<a href="javascript:void(0)" data-id="addTag" class="inputTag
Add" data-guid="'
+
model
.
get
(
'$id$'
).
id
+
'" ><i
class="fa fa-plus"></i></a>'
;
}
else
{
addTag
+=
'<a href="javascript:void(0)" data-id="addTag" class="inputTag"><i style="right:0" class="fa fa-plus"></i></a>'
;
addTag
+=
'<a href="javascript:void(0)" data-id="addTag" class="inputTag
Add
"><i style="right:0" class="fa fa-plus"></i></a>'
;
}
if
(
count
>
1
)
{
addTag
+=
'<
a href="javascript:void(0)" data-id="showMoreLess" class="inputTag inputTagGreen"><span>Show More </span><i class="fa fa-angle-right"></i></a
>'
addTag
+=
'<
div data-id="showMoreLess" class="inputTagAdd tagDetailPopover"><i class="fa fa-ellipsis-h" aria-hidden="true"></i></div
>'
}
return
'<div class="tagList">'
+
atags
+
addTag
+
'</div>'
;
return
'<div class="tagList">'
+
atags
+
addTag
+
'<div class="popover popoverTag bottom" style="display:none"><div class="arrow"></div><div class="popover-content popoverContainer">'
+
popTag
+
'</div></div></div>'
;
}
CommonViewFunction
.
saveTermToAsset
=
function
(
options
)
{
require
([
'models/VCatalog'
],
function
(
Vcatalog
)
{
...
...
dashboardv2/public/js/utils/Messages.js
View file @
072a73e0
...
...
@@ -24,10 +24,12 @@ define(['require'], function(require) {
addErrorMessage
:
" could not be Created"
,
addTermToEntitySuccessMessage
:
" has been added to entity"
,
deleteTerm
:
"Delete Term"
,
deleteTag
:
"Delet
e Tag"
,
RemoveTerm
:
"Remove Term Assignment
"
,
removeTag
:
"Remov
e Tag"
,
removeTerm
:
"Remove Term
"
,
deleteSuccessMessage
:
" has been deleted successfully"
,
deleteErrorMessage
:
" could not be deleted"
,
removeSuccessMessage
:
" has been removed successfully"
,
removeErrorMessage
:
" could not be removed"
,
addAttributeSuccessMessage
:
"Tag attribute is added successfully"
,
updateTagDescriptionMessage
:
"Tag description is updated successfully"
,
updateTermDescriptionMessage
:
"Term description is updated successfully"
,
...
...
dashboardv2/public/js/utils/Utils.js
View file @
072a73e0
...
...
@@ -87,7 +87,7 @@ define(['require', 'utils/Globals'], function(require, Globals) {
Utils
.
notifyError
({
content
:
message
});
}
else
if
(
error
.
status
==
"0"
)
{
}
else
if
(
error
.
status
==
"0"
&&
error
.
statusText
!=
"abort"
)
{
var
diffTime
=
(
new
Date
().
getTime
()
-
prevNetworkErrorTime
);
if
(
diffTime
>
3000
)
{
prevNetworkErrorTime
=
new
Date
().
getTime
();
...
...
dashboardv2/public/js/views/business_catalog/BusinessCatalogDetailLayoutView.js
View file @
072a73e0
...
...
@@ -152,7 +152,7 @@ define(['require',
addTagToTerms
:
function
(
tagObject
)
{
var
tagData
=
""
;
_
.
each
(
tagObject
,
function
(
val
)
{
tagData
+=
'<span class="inputTag">
'
+
val
+
'
<i class="fa fa-close" data-id="deleteTag"></i></span>'
;
tagData
+=
'<span class="inputTag">
<span class="inputValue">'
+
val
+
'</span>
<i class="fa fa-close" data-id="deleteTag"></i></span>'
;
});
this
.
$
(
'.addTag-dropdown'
).
before
(
tagData
);
},
...
...
@@ -167,7 +167,6 @@ define(['require',
};
this
.
entityModel
.
saveEntity
(
this
.
id
,
{
data
:
JSON
.
stringify
(
json
),
beforeSend
:
function
()
{},
success
:
function
(
data
)
{
that
.
collection
.
fetch
({
reset
:
true
});
},
...
...
dashboardv2/public/js/views/business_catalog/TreeLayoutView.js
View file @
072a73e0
...
...
@@ -43,7 +43,8 @@ define(['require',
backTaxanomy
:
'[data-id="backTaxanomy"]'
,
expandArrow
:
'[data-id="expandArrow"]'
,
searchTermInput
:
'[data-id="searchTermInput"]'
,
refreshTaxanomy
:
'[data-id="refreshTaxanomy"]'
refreshTaxanomy
:
'[data-id="refreshTaxanomy"]'
,
descriptionAssign
:
'[data-id="descriptionAssign"]'
,
},
/** ui events hash */
events
:
function
()
{
...
...
@@ -150,6 +151,11 @@ define(['require',
}
});
this
.
fetchTaxanomyCollections
();
if
(
!
this
.
viewBased
)
{
this
.
ui
.
descriptionAssign
.
show
();
}
else
{
this
.
ui
.
descriptionAssign
.
hide
();
}
},
backButtonTaxanomy
:
function
(
e
)
{
var
that
=
this
;
...
...
@@ -495,7 +501,6 @@ define(['require',
that
.
create
=
true
;
that
.
fetchTaxanomyCollections
();
that
.
fetchCollection
(
url
,
true
);
//that.fetchCollection(that.url);
Utils
.
notifySuccess
({
content
:
"Term "
+
view
.
ui
.
termName
.
val
()
+
Messages
.
addSuccessMessage
});
...
...
@@ -512,8 +517,14 @@ define(['require',
},
deleteTerm
:
function
(
e
)
{
var
termName
=
this
.
$
(
'.taxonomyTree'
).
find
(
'li.active a'
).
data
(
"name"
),
assetName
=
$
(
e
.
target
).
data
(
"assetname"
),
that
=
this
,
modal
=
CommonViewFunction
.
deleteTagModel
(
termName
);
modal
=
CommonViewFunction
.
deleteTagModel
({
msg
:
"<div class='ellipsis'>Delete: "
+
"<b>"
+
termName
+
"?</b></div>"
+
"<p class='termNote'>Assets mapped to this term will be unclassified.</p>"
,
titleMessage
:
Messages
.
deleteTerm
,
buttonText
:
"Delete"
});
modal
.
on
(
'ok'
,
function
()
{
that
.
deleteTermData
(
e
);
});
...
...
@@ -529,7 +540,6 @@ define(['require',
url
=
that
.
$
(
'.taxonomyTree'
).
find
(
'li.active a'
).
data
(
'href'
);
var
termName
=
that
.
$
(
'.taxonomyTree'
).
find
(
'li.active a'
).
text
();
termModel
.
deleteTerm
(
url
,
{
beforeSend
:
function
()
{},
success
:
function
(
data
)
{
Utils
.
notifySuccess
({
content
:
"Term "
+
termName
+
Messages
.
deleteSuccessMessage
...
...
dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
View file @
072a73e0
...
...
@@ -23,8 +23,9 @@ define(['require',
'collection/VTagList'
,
'models/VEntity'
,
'utils/CommonViewFunction'
,
'utils/Globals'
],
function
(
require
,
Backbone
,
DetailPageLayoutViewTmpl
,
Utils
,
VTagList
,
VEntity
,
CommonViewFunction
,
Globals
)
{
'utils/Globals'
,
'utils/Messages'
],
function
(
require
,
Backbone
,
DetailPageLayoutViewTmpl
,
Utils
,
VTagList
,
VEntity
,
CommonViewFunction
,
Globals
,
Messages
)
{
'use strict'
;
var
DetailPageLayoutView
=
Backbone
.
Marionette
.
LayoutView
.
extend
(
...
...
@@ -188,8 +189,21 @@ define(['require',
},
onClickTagCross
:
function
(
e
)
{
var
tagName
=
$
(
e
.
currentTarget
).
parent
().
text
(),
that
=
this
,
modal
=
CommonViewFunction
.
deleteTagModel
(
tagName
);
that
=
this
;
var
tagOrTerm
=
Utils
.
checkTagOrTerm
(
tagName
);
if
(
tagOrTerm
.
term
)
{
var
modal
=
CommonViewFunction
.
deleteTagModel
({
msg
:
"<div class='ellipsis'>Remove: "
+
"<b>"
+
tagName
+
"</b> assignment from"
+
" "
+
"<b>"
+
this
.
name
+
"?</b></div>"
,
titleMessage
:
Messages
.
removeTerm
,
buttonText
:
"Remove"
});
}
else
{
var
modal
=
CommonViewFunction
.
deleteTagModel
({
msg
:
"<div class='ellipsis'>Remove: "
+
"<b>"
+
tagName
+
"</b> assignment from"
+
" "
+
"<b>"
+
this
.
name
+
"?</b></div>"
,
titleMessage
:
Messages
.
removeTag
,
buttonText
:
"Remove"
});
}
modal
.
on
(
'ok'
,
function
()
{
that
.
deleteTagData
(
e
);
});
...
...
@@ -216,10 +230,10 @@ define(['require',
_
.
each
(
tagObject
,
function
(
val
)
{
var
isTerm
=
Utils
.
checkTagOrTerm
(
val
);
if
(
!
isTerm
.
term
)
{
tagData
+=
'<span class="inputTag" data-id="tagClick">
'
+
val
+
'
<i class="fa fa-close" data-id="deleteTag"></i></span>'
;
tagData
+=
'<span class="inputTag" data-id="tagClick">
<span class="inputValue">'
+
val
+
'</span>
<i class="fa fa-close" data-id="deleteTag"></i></span>'
;
}
if
(
isTerm
.
term
)
{
termData
+=
'<span class="inputTag term" data-id="tagClick" data-href="'
+
val
+
'">
'
+
val
+
'
<i class="fa fa-close" data-id="deleteTag"></i></span>'
;
termData
+=
'<span class="inputTag term" data-id="tagClick" data-href="'
+
val
+
'">
<span class="inputValue">'
+
val
+
'</span>
<i class="fa fa-close" data-id="deleteTag"></i></span>'
;
}
});
...
...
@@ -239,7 +253,6 @@ define(['require',
};
this
.
entityModel
.
saveEntity
(
this
.
id
,
{
data
:
JSON
.
stringify
(
json
),
beforeSend
:
function
()
{},
success
:
function
(
data
)
{
that
.
fetchCollection
();
},
...
...
@@ -295,7 +308,8 @@ define(['require',
that
.
RTagTableLayoutView
.
show
(
new
TagDetailTableLayoutView
({
globalVent
:
that
.
globalVent
,
collection
:
that
.
collection
,
guid
:
tagGuid
guid
:
tagGuid
,
assetName
:
that
.
name
}));
});
},
...
...
@@ -333,6 +347,7 @@ define(['require',
globalVent
:
that
.
globalVent
,
collection
:
that
.
collection
,
guid
:
tagGuid
,
assetName
:
that
.
name
,
term
:
true
}));
});
...
...
dashboardv2/public/js/views/graph/LineageLayoutView.js
View file @
072a73e0
...
...
@@ -154,7 +154,6 @@ define(['require',
function
fetchLoadProcess
(
id
)
{
++
that
.
fetchList
;
that
.
entityModel
.
getEntity
(
id
,
{
beforeSend
:
function
()
{},
success
:
function
(
data
)
{
addValueInObject
(
data
);
},
...
...
dashboardv2/public/js/views/schema/SchemaLayoutView.js
View file @
072a73e0
...
...
@@ -21,8 +21,9 @@ define(['require',
'hbs!tmpl/schema/SchemaTableLayoutView_tmpl'
,
'collection/VSchemaList'
,
'utils/Utils'
,
'utils/CommonViewFunction'
],
function
(
require
,
Backbone
,
SchemaTableLayoutViewTmpl
,
VSchemaList
,
Utils
,
CommonViewFunction
)
{
'utils/CommonViewFunction'
,
'utils/Messages'
],
function
(
require
,
Backbone
,
SchemaTableLayoutViewTmpl
,
VSchemaList
,
Utils
,
CommonViewFunction
,
Messages
)
{
'use strict'
;
var
SchemaTableLayoutView
=
Backbone
.
Marionette
.
LayoutView
.
extend
(
...
...
@@ -47,7 +48,6 @@ define(['require',
/** ui events hash */
events
:
function
()
{
var
events
=
{};
events
[
"click "
+
this
.
ui
.
addTag
]
=
'addTagModalView'
;
events
[
"click "
+
this
.
ui
.
addTerm
]
=
'checkedValue'
;
events
[
"click "
+
this
.
ui
.
tagClick
]
=
function
(
e
)
{
...
...
@@ -63,13 +63,12 @@ define(['require',
}
};
events
[
"click "
+
this
.
ui
.
showMoreLess
]
=
function
(
e
)
{
$
(
e
.
currentTarget
).
find
(
'i'
).
toggleClass
(
'fa fa-angle-right fa fa-angle-up'
);
$
(
e
.
currentTarget
).
parents
(
'.searchTag'
).
find
(
'a'
).
toggleClass
(
'hide show'
);
if
(
$
(
e
.
currentTarget
).
find
(
'i'
).
hasClass
(
'fa-angle-right'
))
{
$
(
e
.
currentTarget
).
find
(
'span'
).
text
(
'Show More'
);
}
else
{
$
(
e
.
currentTarget
).
find
(
'span'
).
text
(
'Show less'
);
}
this
.
$
(
'.popover.popoverTag'
).
hide
();
$
(
e
.
currentTarget
).
parent
().
find
(
"div.popover"
).
show
();
var
positionContent
=
$
(
e
.
currentTarget
).
position
();
positionContent
.
top
=
positionContent
.
top
+
26
;
positionContent
.
left
=
positionContent
.
left
-
41
;
$
(
e
.
currentTarget
).
parent
().
find
(
"div.popover"
).
css
(
positionContent
);
};
events
[
"click "
+
this
.
ui
.
showMoreLessTerm
]
=
function
(
e
)
{
$
(
e
.
currentTarget
).
find
(
'i'
).
toggleClass
(
'fa fa-angle-right fa fa-angle-up'
);
...
...
@@ -138,8 +137,18 @@ define(['require',
},
this
);
},
onRender
:
function
()
{
var
that
=
this
;
this
.
schemaCollection
.
fetch
({
reset
:
true
});
this
.
renderTableLayoutView
();
$
(
'body'
).
click
(
function
(
e
)
{
var
iconEvnt
=
e
.
target
.
nodeName
;
if
(
that
.
$
(
'.popoverContainer'
).
length
)
{
if
(
$
(
e
.
target
).
hasClass
(
'tagDetailPopover'
)
||
iconEvnt
==
"I"
)
{
return
;
}
that
.
$
(
'.popover.popoverTag'
).
hide
();
}
});
},
fetchCollection
:
function
()
{
this
.
$
(
'.fontLoader'
).
show
();
...
...
@@ -153,25 +162,9 @@ define(['require',
sortKey
:
"position"
,
comparator
:
function
(
item
)
{
return
item
.
get
(
this
.
sortKey
)
||
999
;
},
setPositions
:
function
()
{
_
.
each
(
this
.
models
,
function
(
model
,
index
)
{
if
(
model
.
get
(
'name'
)
==
"name"
)
{
model
.
set
(
"position"
,
2
,
{
silent
:
true
});
model
.
set
(
"label"
,
"Name"
);
}
else
if
(
model
.
get
(
'name'
)
==
"description"
)
{
model
.
set
(
"position"
,
3
,
{
silent
:
true
});
model
.
set
(
"label"
,
"Description"
);
}
else
if
(
model
.
get
(
'name'
)
==
"owner"
)
{
model
.
set
(
"position"
,
4
,
{
silent
:
true
});
model
.
set
(
"label"
,
"Owner"
);
}
});
return
this
;
}
});
var
columns
=
new
columnCollection
(
that
.
getSchemaTableColumns
());
columns
.
setPositions
().
sort
();
that
.
RTagLayoutView
.
show
(
new
TableLayout
(
_
.
extend
({},
that
.
commonTableOptions
,
{
globalVent
:
that
.
globalVent
,
columns
:
columns
...
...
@@ -323,8 +316,23 @@ define(['require',
},
onClickTagCross
:
function
(
e
)
{
var
tagName
=
$
(
e
.
target
).
data
(
"name"
),
that
=
this
,
modal
=
CommonViewFunction
.
deleteTagModel
(
tagName
,
"assignTerm"
);
assetName
=
$
(
e
.
target
).
data
(
"assetname"
),
that
=
this
;
var
tagOrTerm
=
Utils
.
checkTagOrTerm
(
tagName
);
if
(
tagOrTerm
.
term
)
{
var
modal
=
CommonViewFunction
.
deleteTagModel
({
msg
:
"<div class='ellipsis'>Remove: "
+
"<b>"
+
tagName
+
"</b> assignment from"
+
" "
+
"<b>"
+
assetName
+
"?</b></div>"
,
titleMessage
:
Messages
.
removeTerm
,
buttonText
:
"Remove"
});
}
else
{
var
modal
=
CommonViewFunction
.
deleteTagModel
({
msg
:
"<div class='ellipsis'>Remove: "
+
"<b>"
+
tagName
+
"</b> assignment from"
+
" "
+
"<b>"
+
assetName
+
"?</b></div>"
,
titleMessage
:
Messages
.
removeTag
,
buttonText
:
"Remove"
});
}
modal
.
on
(
'ok'
,
function
()
{
that
.
deleteTagData
(
e
);
});
...
...
dashboardv2/public/js/views/search/SearchResultLayoutView.js
View file @
072a73e0
...
...
@@ -24,8 +24,9 @@ define(['require',
'utils/Utils'
,
'utils/Globals'
,
'collection/VSearchList'
,
'utils/CommonViewFunction'
],
function
(
require
,
Backbone
,
SearchResultLayoutViewTmpl
,
Modal
,
VEntity
,
Utils
,
Globals
,
VSearchList
,
CommonViewFunction
)
{
'utils/CommonViewFunction'
,
'utils/Messages'
],
function
(
require
,
Backbone
,
SearchResultLayoutViewTmpl
,
Modal
,
VEntity
,
Utils
,
Globals
,
VSearchList
,
CommonViewFunction
,
Messages
)
{
'use strict'
;
var
SearchResultLayoutView
=
Backbone
.
Marionette
.
LayoutView
.
extend
(
...
...
@@ -80,13 +81,12 @@ define(['require',
events
[
"click "
+
this
.
ui
.
addTag
]
=
'addTagModalView'
;
events
[
"click "
+
this
.
ui
.
addTerm
]
=
'checkedValue'
;
events
[
"click "
+
this
.
ui
.
showMoreLess
]
=
function
(
e
)
{
$
(
e
.
currentTarget
).
find
(
'i'
).
toggleClass
(
'fa fa-angle-right fa fa-angle-up'
);
$
(
e
.
currentTarget
).
parents
(
'.searchTag'
).
find
(
'a'
).
toggleClass
(
'hide show'
);
if
(
$
(
e
.
currentTarget
).
find
(
'i'
).
hasClass
(
'fa-angle-right'
))
{
$
(
e
.
currentTarget
).
find
(
'span'
).
text
(
'Show More'
);
}
else
{
$
(
e
.
currentTarget
).
find
(
'span'
).
text
(
'Show less'
);
}
$
(
e
.
currentTarget
).
parents
(
'tr'
).
siblings
().
find
(
"div.popover.popoverTag"
).
hide
();
$
(
e
.
currentTarget
).
parent
().
find
(
"div.popover"
).
toggle
();
var
positionContent
=
$
(
e
.
currentTarget
).
position
();
positionContent
.
top
=
positionContent
.
top
+
26
;
positionContent
.
left
=
positionContent
.
left
-
67
;
$
(
e
.
currentTarget
).
parent
().
find
(
"div.popover"
).
css
(
positionContent
);
};
events
[
"click "
+
this
.
ui
.
showMoreLessTerm
]
=
function
(
e
)
{
$
(
e
.
currentTarget
).
find
(
'i'
).
toggleClass
(
'fa fa-angle-right fa fa-angle-up'
);
...
...
@@ -127,6 +127,7 @@ define(['require',
this
.
arr
=
[];
},
bindEvents
:
function
()
{
var
that
=
this
;
this
.
listenTo
(
this
.
searchCollection
,
'backgrid:selected'
,
function
(
model
,
checked
)
{
if
(
checked
===
true
)
{
model
.
set
(
"isEnable"
,
true
);
...
...
@@ -136,7 +137,6 @@ define(['require',
this
.
$
(
'.searchResult'
).
find
(
".inputAssignTag.multiSelect"
).
hide
();
}
this
.
arr
=
[];
var
that
=
this
;
this
.
searchCollection
.
find
(
function
(
item
)
{
if
(
item
.
get
(
'isEnable'
))
{
var
term
=
[];
...
...
@@ -147,19 +147,6 @@ define(['require',
}
});
});
this
.
listenTo
(
this
.
vent
,
"show:searchResult"
,
function
(
value
)
{
this
.
fetchCollection
(
value
);
this
.
REntityTableLayoutView
.
reset
();
},
this
);
this
.
listenTo
(
this
.
searchCollection
,
"reset"
,
function
(
value
)
{
if
(
this
.
searchCollection
.
toJSON
().
length
==
0
)
{
this
.
checkTableFetch
();
}
this
.
renderTableLayoutView
();
var
resultData
=
this
.
searchCollection
.
fullCollection
.
length
+
' result for <b>'
+
this
.
searchCollection
.
queryParams
.
query
+
'</b>'
var
multiAssignData
=
'<a href="javascript:void(0)" class="inputAssignTag multiSelect" style="display:none" data-id="addTerm"><i class="fa fa-folder-o">'
+
" "
+
'Assign Term</i></a>'
this
.
$
(
'.searchResult'
).
html
(
resultData
+
multiAssignData
);
},
this
);
this
.
listenTo
(
this
.
searchCollection
,
"error"
,
function
(
value
,
responseData
)
{
this
.
$
(
'.fontLoader'
).
hide
();
var
message
=
"Invalid expression"
;
...
...
@@ -176,7 +163,8 @@ define(['require',
},
onRender
:
function
()
{
//this.renderTableLayoutView();
var
value
=
{};
var
value
=
{},
that
=
this
;
if
(
this
.
value
)
{
value
=
this
.
value
;
}
else
{
...
...
@@ -187,18 +175,43 @@ define(['require',
};
}
this
.
fetchCollection
(
value
);
$
(
'body'
).
click
(
function
(
e
)
{
var
iconEvnt
=
e
.
target
.
nodeName
;
if
(
that
.
$
(
'.popoverContainer'
).
length
)
{
if
(
$
(
e
.
target
).
hasClass
(
'tagDetailPopover'
)
||
iconEvnt
==
"I"
)
{
return
;
}
that
.
$
(
'.popover.popoverTag'
).
hide
();
}
});
},
fetchCollection
:
function
(
value
)
{
var
that
=
this
;
this
.
$
(
'.fontLoader'
).
show
();
this
.
$
(
'.searchTable'
).
hide
();
this
.
$
(
'.searchResult'
).
html
(
''
);
if
(
Globals
.
searchApiCallRef
)
{
Globals
.
searchApiCallRef
.
abort
();
}
if
(
value
)
{
if
(
value
.
searchType
)
{
this
.
searchCollection
.
url
=
"/api/atlas/discovery/search/"
+
value
.
searchType
;
}
_
.
extend
(
this
.
searchCollection
.
queryParams
,
{
'query'
:
value
.
query
});
}
this
.
searchCollection
.
fetch
({
reset
:
true
});
Globals
.
searchApiCallRef
=
this
.
searchCollection
.
fetch
({
success
:
function
()
{
Globals
.
searchApiCallRef
=
undefined
;
if
(
that
.
searchCollection
.
toJSON
().
length
==
0
)
{
that
.
checkTableFetch
();
}
that
.
renderTableLayoutView
();
var
resultData
=
that
.
searchCollection
.
fullCollection
.
length
+
' results for <b>'
+
that
.
searchCollection
.
queryParams
.
query
+
'</b>'
var
multiAssignData
=
'<a href="javascript:void(0)" class="inputAssignTag multiSelect" style="display:none" data-id="addTerm"><i class="fa fa-folder-o">'
+
" "
+
'Assign Term</i></a>'
that
.
$
(
'.searchResult'
).
html
(
resultData
+
multiAssignData
);
},
silent
:
true
});
},
renderTableLayoutView
:
function
()
{
var
that
=
this
,
...
...
@@ -389,7 +402,6 @@ define(['require',
var
guid
=
model
.
toJSON
().
instanceInfo
.
guid
;
++
that
.
fetchList
;
model
.
getEntity
(
guid
,
{
beforeSend
:
function
()
{},
success
:
function
(
data
)
{
if
(
data
.
definition
)
{
if
(
data
.
definition
.
id
&&
data
.
definition
.
id
.
state
)
{
...
...
@@ -416,7 +428,6 @@ define(['require',
var
guid
=
model
.
toJSON
().
guid
;
++
that
.
fetchList
;
model
.
getEntity
(
guid
,
{
beforeSend
:
function
()
{},
success
:
function
(
data
)
{
if
(
data
.
definition
)
{
if
(
data
.
definition
.
id
&&
data
.
definition
.
id
.
state
)
{
...
...
@@ -491,8 +502,22 @@ define(['require',
onClickTagCross
:
function
(
e
)
{
var
tagName
=
$
(
e
.
target
).
data
(
"name"
),
guid
=
$
(
e
.
target
).
data
(
"guid"
),
assetName
=
$
(
e
.
target
).
data
(
"assetname"
),
that
=
this
,
modal
=
CommonViewFunction
.
deleteTagModel
(
tagName
,
"assignTerm"
);
tagOrTerm
=
Utils
.
checkTagOrTerm
(
tagName
);
if
(
tagOrTerm
.
term
)
{
var
modal
=
CommonViewFunction
.
deleteTagModel
({
msg
:
"<div class='ellipsis'>Remove: "
+
"<b>"
+
tagName
+
"</b> assignment from"
+
" "
+
"<b>"
+
assetName
+
" ?</b></div>"
,
titleMessage
:
Messages
.
removeTerm
,
buttonText
:
"Remove"
});
}
else
{
var
modal
=
CommonViewFunction
.
deleteTagModel
({
msg
:
"<div class='ellipsis'>Remove: "
+
"<b>"
+
tagName
+
"</b> assignment from"
+
" "
+
"<b>"
+
assetName
+
" ?</b></div>"
,
titleMessage
:
Messages
.
removeTag
,
buttonText
:
"Remove"
});
}
modal
.
on
(
'ok'
,
function
()
{
that
.
deleteTagData
(
e
);
});
...
...
dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js
View file @
072a73e0
...
...
@@ -21,8 +21,9 @@ define(['require',
'hbs!tmpl/tag/TagDetailTableLayoutView_tmpl'
,
'utils/CommonViewFunction'
,
'utils/Utils'
,
'collection/VTagList'
],
function
(
require
,
Backbone
,
TagDetailTableLayoutView_tmpl
,
CommonViewFunction
,
Utils
,
VTagList
)
{
'collection/VTagList'
,
'utils/Messages'
],
function
(
require
,
Backbone
,
TagDetailTableLayoutView_tmpl
,
CommonViewFunction
,
Utils
,
VTagList
,
Messages
)
{
'use strict'
;
var
TagDetailTableLayoutView
=
Backbone
.
Marionette
.
LayoutView
.
extend
(
...
...
@@ -59,7 +60,7 @@ define(['require',
* @constructs
*/
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'globalVent'
,
'collection'
,
'guid'
,
'term'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'globalVent'
,
'collection'
,
'guid'
,
'term'
,
'assetName'
));
this
.
collectionObject
=
this
.
collection
.
toJSON
();
this
.
tagTermCollection
=
new
VTagList
();
var
tagorterm
=
_
.
toArray
(
this
.
collectionObject
[
0
].
traits
),
...
...
@@ -175,8 +176,22 @@ define(['require',
},
deleteTagDataModal
:
function
(
e
)
{
var
tagName
=
$
(
e
.
currentTarget
).
data
(
"name"
),
that
=
this
,
modal
=
CommonViewFunction
.
deleteTagModel
(
tagName
);
that
=
this
;
if
(
that
.
term
)
{
var
modal
=
CommonViewFunction
.
deleteTagModel
({
msg
:
"<div class='ellipsis'>Remove: "
+
"<b>"
+
tagName
+
"</b> assignment from"
+
" "
+
"<b>"
+
this
.
assetName
+
"?</b></div>"
,
titleMessage
:
Messages
.
removeTerm
,
buttonText
:
"Remove"
,
});
}
else
{
var
modal
=
CommonViewFunction
.
deleteTagModel
({
msg
:
"<div class='ellipsis'>Remove: "
+
"<b>"
+
tagName
+
"</b> assignment from"
+
" "
+
"<b>"
+
this
.
assetName
+
"?</b></div>"
,
titleMessage
:
Messages
.
removeTag
,
buttonText
:
"Remove"
,
});
}
modal
.
on
(
'ok'
,
function
()
{
that
.
deleteTagData
(
e
);
});
...
...
dashboardv2/public/js/views/tag/addTagModalView.js
View file @
072a73e0
...
...
@@ -51,7 +51,7 @@ define(['require',
this
.
modal
=
new
Modal
({
title
:
'Add Tag'
,
content
:
this
,
okText
:
'
Save
'
,
okText
:
'
Add
'
,
cancelText
:
"Cancel"
,
allowCancel
:
true
,
}).
open
();
...
...
@@ -79,7 +79,7 @@ define(['require',
},
this
);
},
tagsCollection
:
function
()
{
var
str
=
'<option selected="selected" disabled="disabled">-- Select
Tag
--</option>'
;
var
str
=
'<option selected="selected" disabled="disabled">-- Select
a tag from the dropdown list
--</option>'
;
_
.
each
(
this
.
collection
.
fullCollection
.
models
,
function
(
obj
,
key
)
{
var
tagOrTerm
=
Utils
.
checkTagOrTerm
(
obj
.
get
(
'tags'
));
if
(
!
tagOrTerm
.
term
)
{
...
...
@@ -106,13 +106,15 @@ define(['require',
},
subAttributeData
:
function
()
{
if
(
this
.
commonCollection
.
models
[
0
]
&&
this
.
commonCollection
.
models
[
0
].
attributes
&&
this
.
commonCollection
.
models
[
0
].
attributes
.
traitTypes
[
0
].
attributeDefinitions
)
{
var
strAttribute
=
'<p>Tag Attributes(optional)</p>'
+
'<p class="tagAttributeLabel">Add attribute values for this tag</p>'
;
for
(
var
i
=
0
;
i
<
this
.
commonCollection
.
models
[
0
].
attributes
.
traitTypes
[
0
].
attributeDefinitions
.
length
;
i
++
)
{
var
attribute
=
this
.
commonCollection
.
models
[
0
].
attributes
.
traitTypes
[
0
].
attributeDefinitions
;
this
.
ui
.
tagAttribute
.
show
();
this
.
strAttribute
=
'<label class="control-label col-sm-4 ng-binding
">'
+
attribute
[
i
].
name
+
'</label>'
+
'<div class="col-sm-
8 input-spacing
">'
+
'<input type="text" class="form-control attributeInputVal attrName" data-key="'
+
attribute
[
i
].
name
+
'" ></input></div>'
;
this
.
ui
.
tagAttribute
.
append
(
this
.
strAttribute
);
strAttribute
+=
'<div class="form-group"><label class="control-label col-sm-2
">'
+
attribute
[
i
].
name
+
'</label>'
+
'<div class="col-sm-
10
">'
+
'<input type="text" class="form-control attributeInputVal attrName" data-key="'
+
attribute
[
i
].
name
+
'" ></input></div>
</div>
'
;
this
.
ui
.
tagAttribute
.
html
(
strAttribute
);
}
if
(
this
.
commonCollection
.
models
[
0
].
attributes
.
traitTypes
[
0
].
superTypes
.
length
>
0
)
{
for
(
var
j
=
0
;
j
<
this
.
commonCollection
.
models
[
0
].
attributes
.
traitTypes
[
0
].
superTypes
.
length
;
j
++
)
{
...
...
@@ -139,7 +141,6 @@ define(['require',
};
that
.
entityModel
.
saveEntity
(
that
.
guid
,
{
data
:
JSON
.
stringify
(
json
),
beforeSend
:
function
()
{},
success
:
function
(
data
)
{
Utils
.
notifySuccess
({
content
:
"Tag "
+
tagName
+
" has been added to entity"
...
...
release-log.txt
View file @
072a73e0
...
...
@@ -6,6 +6,7 @@ INCOMPATIBLE CHANGES:
ALL CHANGES:
ATLAS-949 UI improvement for modal and tag styling in table (Kalyanikashikar via shwethags)
ATLAS-936 Update atlas website for 0.7 release (shwethags)
ATLAS-995 Atlas to setup ldap authentication type as either LDAP / AD or None (nixonrodrigues via shwethags)
ATLAS-902 Atlas throws exception due to null definition in Hive create table statement (svimal2106 via shwethags)
...
...
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