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
a2c3faad
Commit
a2c3faad
authored
Aug 31, 2016
by
Keval Bhatt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-1140 All the tag's attributes are not seen while applying a tag to entity (kevalbhatt)
parent
0023236f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
18 deletions
+60
-18
override.scss
dashboardv2/public/css/scss/override.scss
+2
-0
addTagModalView_tmpl.html
...boardv2/public/js/templates/tag/addTagModalView_tmpl.html
+9
-1
addTagModalView.js
dashboardv2/public/js/views/tag/addTagModalView.js
+48
-17
release-log.txt
release-log.txt
+1
-0
No files found.
dashboardv2/public/css/scss/override.scss
View file @
a2c3faad
...
@@ -45,6 +45,8 @@
...
@@ -45,6 +45,8 @@
.modal-body
{
.modal-body
{
position
:
relative
;
position
:
relative
;
padding
:
15px
;
padding
:
15px
;
max-height
:
400px
;
overflow
:
auto
;
}
}
.cancel
{
.cancel
{
...
...
dashboardv2/public/js/templates/tag/addTagModalView_tmpl.html
View file @
a2c3faad
...
@@ -20,7 +20,15 @@
...
@@ -20,7 +20,15 @@
</select>
</select>
</div>
</div>
<div
class=
"row modalHeight"
>
<div
class=
"row modalHeight"
>
<div
class=
"col-sm-12"
data-id=
"tagAttribute"
style=
"display:none"
>
<div
class=
"col-sm-12"
>
<div
class=
"attrLoader"
style=
"margin-left:45%;display:none"
>
<i
class=
"fa fa-refresh fa-spin-custom"
></i>
</div>
</div>
<div
class=
"col-sm-12"
style=
"display:none"
>
<p>
Tag Attributes(optional)
</p>
<p
class=
"tagAttributeLabel"
>
Add attribute values for this tag
</p>
<div
data-id=
"tagAttribute"
></div>
</div>
</div>
</div>
</div>
</div>
</div>
dashboardv2/public/js/views/tag/addTagModalView.js
View file @
a2c3faad
...
@@ -48,6 +48,7 @@ define(['require',
...
@@ -48,6 +48,7 @@ define(['require',
_
.
extend
(
this
,
_
.
pick
(
options
,
'vent'
,
'modalCollection'
,
'guid'
,
'callback'
,
'multiple'
,
'showLoader'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'vent'
,
'modalCollection'
,
'guid'
,
'callback'
,
'multiple'
,
'showLoader'
));
this
.
collection
=
new
VTagList
();
this
.
collection
=
new
VTagList
();
this
.
commonCollection
=
new
VCommonList
();
this
.
commonCollection
=
new
VCommonList
();
this
.
asyncAttrFetchCounter
=
0
;
this
.
modal
=
new
Modal
({
this
.
modal
=
new
Modal
({
title
:
'Add Tag'
,
title
:
'Add Tag'
,
content
:
this
,
content
:
this
,
...
@@ -56,6 +57,14 @@ define(['require',
...
@@ -56,6 +57,14 @@ define(['require',
allowCancel
:
true
,
allowCancel
:
true
,
}).
open
();
}).
open
();
this
.
on
(
'ok'
,
function
()
{
this
.
on
(
'ok'
,
function
()
{
var
tagName
=
this
.
ui
.
addTagOptions
.
val
();
var
tagAttributes
=
{};
var
tagAttributeNames
=
this
.
$
(
".attrName"
);
tagAttributeNames
.
each
(
function
(
i
,
item
)
{
var
selection
=
$
(
item
).
data
(
"key"
);
tagAttributes
[
selection
]
=
$
(
item
).
val
();
});
if
(
that
.
multiple
)
{
if
(
that
.
multiple
)
{
that
.
asyncFetchCounter
=
0
;
that
.
asyncFetchCounter
=
0
;
for
(
var
i
=
0
;
i
<
that
.
multiple
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
that
.
multiple
.
length
;
i
++
)
{
...
@@ -63,7 +72,8 @@ define(['require',
...
@@ -63,7 +72,8 @@ define(['require',
that
.
showLoader
();
that
.
showLoader
();
}
}
var
obj
=
{
var
obj
=
{
tagName
:
this
.
ui
.
addTagOptions
.
val
(),
tagName
:
tagName
,
tagAttributes
:
tagAttributes
,
guid
:
that
.
multiple
[
i
].
id
.
id
guid
:
that
.
multiple
[
i
].
id
.
id
}
}
that
.
saveTagData
(
obj
);
that
.
saveTagData
(
obj
);
...
@@ -71,7 +81,8 @@ define(['require',
...
@@ -71,7 +81,8 @@ define(['require',
}
else
{
}
else
{
that
.
asyncFetchCounter
=
0
;
that
.
asyncFetchCounter
=
0
;
that
.
saveTagData
({
that
.
saveTagData
({
tagName
:
that
.
ui
.
addTagOptions
.
val
(),
tagName
:
tagName
,
tagAttributes
:
tagAttributes
,
guid
:
that
.
guid
guid
:
that
.
guid
});
});
}
}
...
@@ -91,8 +102,13 @@ define(['require',
...
@@ -91,8 +102,13 @@ define(['require',
this
.
tagsCollection
();
this
.
tagsCollection
();
},
this
);
},
this
);
this
.
listenTo
(
this
.
commonCollection
,
'reset'
,
function
()
{
this
.
listenTo
(
this
.
commonCollection
,
'reset'
,
function
()
{
--
this
.
asyncAttrFetchCounter
this
.
subAttributeData
();
this
.
subAttributeData
();
},
this
);
},
this
);
this
.
listenTo
(
this
.
commonCollection
,
'error'
,
function
()
{
--
this
.
asyncAttrFetchCounter
this
.
$
(
'.attrLoader'
).
hide
();
},
this
);
},
},
tagsCollection
:
function
()
{
tagsCollection
:
function
()
{
this
.
collection
.
fullCollection
.
comparator
=
function
(
model
)
{
this
.
collection
.
fullCollection
.
comparator
=
function
(
model
)
{
...
@@ -114,45 +130,60 @@ define(['require',
...
@@ -114,45 +130,60 @@ define(['require',
var
saveBtn
=
this
.
modal
.
$el
.
find
(
'.btn-success'
);
var
saveBtn
=
this
.
modal
.
$el
.
find
(
'.btn-success'
);
saveBtn
.
prop
(
"disabled"
,
false
);
saveBtn
.
prop
(
"disabled"
,
false
);
var
tagname
=
this
.
ui
.
addTagOptions
.
val
();
var
tagname
=
this
.
ui
.
addTagOptions
.
val
();
this
.
hideAttributeBox
();
this
.
fetchTagSubData
(
tagname
);
this
.
fetchTagSubData
(
tagname
);
},
},
fetchTagSubData
:
function
(
tagname
)
{
fetchTagSubData
:
function
(
tagname
)
{
this
.
commonCollection
.
url
=
"/api/atlas/types/"
+
tagname
;
this
.
commonCollection
.
url
=
"/api/atlas/types/"
+
tagname
;
this
.
commonCollection
.
modelAttrName
=
'definition'
;
this
.
commonCollection
.
modelAttrName
=
'definition'
;
++
this
.
asyncAttrFetchCounter
this
.
commonCollection
.
fetch
({
reset
:
true
});
this
.
commonCollection
.
fetch
({
reset
:
true
});
},
},
showAttributeBox
:
function
()
{
if
(
this
.
asyncAttrFetchCounter
===
0
)
{
this
.
$
(
'.attrLoader'
).
hide
();
if
(
this
.
ui
.
tagAttribute
.
children
().
length
!==
0
)
{
this
.
ui
.
tagAttribute
.
parent
().
show
();
}
}
},
hideAttributeBox
:
function
()
{
this
.
ui
.
tagAttribute
.
children
().
empty
();
this
.
ui
.
tagAttribute
.
parent
().
hide
();
this
.
$
(
'.attrLoader'
).
show
();
},
subAttributeData
:
function
()
{
subAttributeData
:
function
()
{
if
(
this
.
commonCollection
.
models
[
0
]
&&
this
.
commonCollection
.
models
[
0
].
attributes
&&
this
.
commonCollection
.
models
[
0
].
attributes
.
traitTypes
[
0
].
attributeDefinitions
)
{
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
++
)
{
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
;
var
attribute
=
this
.
commonCollection
.
models
[
0
].
attributes
.
traitTypes
[
0
].
attributeDefinitions
;
this
.
ui
.
tagAttribute
.
show
();
var
strAttribute
=
'<div class="form-group"><label>'
+
attribute
[
i
].
name
+
'</label>'
+
strAttribute
+=
'<div class="form-group"><label>'
+
attribute
[
i
].
name
+
'</label>'
+
'<input type="text" class="form-control attributeInputVal attrName" data-key="'
+
attribute
[
i
].
name
+
'" ></input></div>'
;
'<input type="text" class="form-control attributeInputVal attrName" data-key="'
+
attribute
[
i
].
name
+
'" ></input></div>'
;
this
.
ui
.
tagAttribute
.
html
(
strAttribute
);
this
.
ui
.
tagAttribute
.
append
(
strAttribute
);
}
}
if
(
this
.
commonCollection
.
models
[
0
].
attributes
.
traitTypes
[
0
].
superTypes
.
length
>
0
)
{
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
++
)
{
for
(
var
j
=
0
;
j
<
this
.
commonCollection
.
models
[
0
].
attributes
.
traitTypes
[
0
].
superTypes
.
length
;
j
++
)
{
var
superTypeAttr
=
this
.
commonCollection
.
models
[
0
].
attributes
.
traitTypes
[
0
].
superTypes
[
j
];
var
superTypeAttr
=
this
.
commonCollection
.
models
[
0
].
attributes
.
traitTypes
[
0
].
superTypes
[
j
];
this
.
fetchTagSubData
(
superTypeAttr
);
this
.
fetchTagSubData
(
superTypeAttr
);
}
}
}
else
{
this
.
showAttributeBox
();
}
}
}
else
{
this
.
showAttributeBox
();
}
}
},
},
saveTagData
:
function
(
options
)
{
saveTagData
:
function
(
options
)
{
var
that
=
this
,
var
that
=
this
;
values
=
{};
++
this
.
asyncFetchCounter
;
++
this
.
asyncFetchCounter
;
this
.
entityModel
=
new
VEntity
();
this
.
entityModel
=
new
VEntity
();
var
name
=
options
.
tagName
;
var
tagName
=
options
.
tagName
,
var
tagName
=
this
.
ui
.
addTagOptions
.
val
();
tagAttributes
=
options
.
tagAttributes
,
var
json
=
{
json
=
{
"jsonClass"
:
"org.apache.atlas.typesystem.json.InstanceSerialization$_Struct"
,
"jsonClass"
:
"org.apache.atlas.typesystem.json.InstanceSerialization$_Struct"
,
"typeName"
:
n
ame
,
"typeName"
:
tagN
ame
,
"values"
:
valu
es
"values"
:
tagAttribut
es
};
};
th
at
.
entityModel
.
saveEntity
(
options
.
guid
,
{
th
is
.
entityModel
.
saveEntity
(
options
.
guid
,
{
data
:
JSON
.
stringify
(
json
),
data
:
JSON
.
stringify
(
json
),
success
:
function
(
data
)
{
success
:
function
(
data
)
{
Utils
.
notifySuccess
({
Utils
.
notifySuccess
({
...
...
release-log.txt
View file @
a2c3faad
...
@@ -10,6 +10,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al
...
@@ -10,6 +10,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al
ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai)
ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai)
ALL CHANGES:
ALL CHANGES:
ATLAS-1140 All the tag's attributes are not seen while applying a tag to entity (kevalbhatt)
ATLAS-1141 UI-Issue - Tag with spaces, when searched, then it is wrongly set in search textbox. (Kalyanikashikar via kevalbhatt)
ATLAS-1141 UI-Issue - Tag with spaces, when searched, then it is wrongly set in search textbox. (Kalyanikashikar via kevalbhatt)
ATLAS-1129 Remove notification failed logs on retry and add sleep between retries (svimal2106 via sumasai)
ATLAS-1129 Remove notification failed logs on retry and add sleep between retries (svimal2106 via sumasai)
ATLAS-1126 Fix NPE in getSchema calls (sumasai)
ATLAS-1126 Fix NPE in getSchema calls (sumasai)
...
...
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