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
3b75d56d
Commit
3b75d56d
authored
May 14, 2018
by
kevalbhatt
Committed by
Madhan Neethiraj
May 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2678: UI - term-to-term association attribute values are not saved
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
cbca591d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
69 additions
and
55 deletions
+69
-55
AssignTermLayoutView_tmpl.html
...blic/js/templates/glossary/AssignTermLayoutView_tmpl.html
+1
-1
CommonViewFunction.js
dashboardv2/public/js/utils/CommonViewFunction.js
+2
-6
AssignTermLayoutView.js
dashboardv2/public/js/views/glossary/AssignTermLayoutView.js
+1
-2
GlossaryDetailLayoutView.js
...rdv2/public/js/views/glossary/GlossaryDetailLayoutView.js
+19
-12
GlossaryLayoutView.js
dashboardv2/public/js/views/glossary/GlossaryLayoutView.js
+40
-30
TermRelationAttributeLayoutView.js
...blic/js/views/glossary/TermRelationAttributeLayoutView.js
+1
-1
TagDetailTableLayoutView.js
dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js
+5
-3
No files found.
dashboardv2/public/js/templates/glossary/AssignTermLayoutView_tmpl.html
View file @
3b75d56d
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
class=
"control-label col-sm-2"
for=
"name"
>
{{@key}}
</label>
<label
class=
"control-label col-sm-2"
for=
"name"
>
{{@key}}
</label>
<div
class=
"col-sm-10"
>
<div
class=
"col-sm-10"
>
<input
class=
"form-control"
name=
"{{@key}}"
value=
""
data-id=
"displayName"
placeholder=
"{{@key}}"
/>
<input
class=
"form-control"
name=
"{{@key}}"
data-id=
"displayName"
placeholder=
"{{@key}}"
/>
</div>
</div>
</div>
</div>
{{/each}}
{{/each}}
...
...
dashboardv2/public/js/utils/CommonViewFunction.js
View file @
3b75d56d
...
@@ -622,9 +622,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
...
@@ -622,9 +622,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
}
}
});
});
modal
.
on
(
'ok'
,
function
()
{
modal
.
on
(
'ok'
,
function
()
{
if
(
isGlossaryView
)
{
modal
.
$el
.
find
(
'button.ok'
).
attr
(
"disabled"
,
true
);
modal
.
$el
.
find
(
'button.ok'
).
attr
(
"disabled"
,
true
);
}
CommonViewFunction
.
createEditGlossaryCategoryTermSubmit
(
_
.
extend
({
"ref"
:
view
,
"modal"
:
modal
},
options
));
CommonViewFunction
.
createEditGlossaryCategoryTermSubmit
(
_
.
extend
({
"ref"
:
view
,
"modal"
:
modal
},
options
));
});
});
modal
.
on
(
'closeModal'
,
function
()
{
modal
.
on
(
'closeModal'
,
function
()
{
...
@@ -669,9 +667,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
...
@@ -669,9 +667,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
modal
.
trigger
(
'closeModal'
);
modal
.
trigger
(
'closeModal'
);
},
},
cust_error
:
function
()
{
cust_error
:
function
()
{
if
(
isGlossaryView
)
{
modal
.
$el
.
find
(
'button.ok'
).
attr
(
"disabled"
,
false
);
modal
.
$el
.
find
(
'button.ok'
).
attr
(
"disabled"
,
false
);
}
}
}
}
}
if
(
model
)
{
if
(
model
)
{
...
...
dashboardv2/public/js/views/glossary/AssignTermLayoutView.js
View file @
3b75d56d
...
@@ -47,7 +47,6 @@ define(['require',
...
@@ -47,7 +47,6 @@ define(['require',
/** ui selector cache */
/** ui selector cache */
ui
:
{
ui
:
{
termAttributeForm
:
'[data-id="termAttributeForm"]'
,
wizard
:
'[data-id="wizard"]'
wizard
:
'[data-id="wizard"]'
},
},
/** ui events hash */
/** ui events hash */
...
@@ -178,7 +177,7 @@ define(['require',
...
@@ -178,7 +177,7 @@ define(['require',
}
}
model
.
assignCategoryToTerm
(
_
.
extend
(
ajaxOptions
,
{
data
:
JSON
.
stringify
(
data
),
guid
:
data
.
guid
}));
model
.
assignCategoryToTerm
(
_
.
extend
(
ajaxOptions
,
{
data
:
JSON
.
stringify
(
data
),
guid
:
data
.
guid
}));
}
else
if
(
this
.
isAttributeRelationView
)
{
}
else
if
(
this
.
isAttributeRelationView
)
{
termAttributeFormData
=
this
.
ui
.
termAttributeForm
.
serializeArray
().
reduce
(
function
(
obj
,
item
)
{
termAttributeFormData
=
this
.
$
(
'[data-id="termAttributeForm"]'
)
.
serializeArray
().
reduce
(
function
(
obj
,
item
)
{
obj
[
item
.
name
]
=
item
.
value
;
obj
[
item
.
name
]
=
item
.
value
;
return
obj
;
return
obj
;
},
{}),
},
{}),
...
...
dashboardv2/public/js/views/glossary/GlossaryDetailLayoutView.js
View file @
3b75d56d
...
@@ -78,12 +78,13 @@ define(['require',
...
@@ -78,12 +78,13 @@ define(['require',
this
.
onClickRemoveAssociationBtn
(
e
);
this
.
onClickRemoveAssociationBtn
(
e
);
}
else
{
}
else
{
var
guid
=
$
(
e
.
currentTarget
).
data
(
'guid'
),
var
guid
=
$
(
e
.
currentTarget
).
data
(
'guid'
),
gId
=
this
.
data
.
anchor
&&
this
.
data
.
anchor
.
glossaryGuid
,
categoryObj
=
_
.
find
(
this
.
data
.
categories
,
{
"categoryGuid"
:
guid
});
categoryObj
=
_
.
find
(
this
.
data
.
categories
,
{
"categoryGuid"
:
guid
});
this
.
glossary
.
selectedItem
=
{
"type"
:
"GlossaryCategory"
,
"guid"
:
guid
,
"model"
:
categoryObj
};
this
.
glossary
.
selectedItem
=
{
"type"
:
"GlossaryCategory"
,
"guid"
:
guid
,
"model"
:
categoryObj
};
Utils
.
setUrl
({
Utils
.
setUrl
({
url
:
'#!/glossary/'
+
guid
,
url
:
'#!/glossary/'
+
guid
,
mergeBrowserUrl
:
false
,
mergeBrowserUrl
:
false
,
urlParams
:
{
gType
:
"category"
,
viewType
:
"category"
,
fromView
:
"glossary"
},
urlParams
:
{
gType
:
"category"
,
viewType
:
"category"
,
fromView
:
"glossary"
,
gId
:
gId
},
trigger
:
true
,
trigger
:
true
,
updateTabState
:
true
updateTabState
:
true
});
});
...
@@ -94,12 +95,13 @@ define(['require',
...
@@ -94,12 +95,13 @@ define(['require',
this
.
onClickRemoveAssociationBtn
(
e
);
this
.
onClickRemoveAssociationBtn
(
e
);
}
else
{
}
else
{
var
guid
=
$
(
e
.
currentTarget
).
data
(
'guid'
),
var
guid
=
$
(
e
.
currentTarget
).
data
(
'guid'
),
gId
=
this
.
data
.
anchor
&&
this
.
data
.
anchor
.
glossaryGuid
,
termObj
=
_
.
find
(
this
.
data
.
terms
,
{
"termGuid"
:
guid
});
termObj
=
_
.
find
(
this
.
data
.
terms
,
{
"termGuid"
:
guid
});
this
.
glossary
.
selectedItem
=
{
"type"
:
"GlossaryTerm"
,
"guid"
:
guid
,
"model"
:
termObj
};
this
.
glossary
.
selectedItem
=
{
"type"
:
"GlossaryTerm"
,
"guid"
:
guid
,
"model"
:
termObj
};
Utils
.
setUrl
({
Utils
.
setUrl
({
url
:
'#!/glossary/'
+
guid
,
url
:
'#!/glossary/'
+
guid
,
mergeBrowserUrl
:
false
,
mergeBrowserUrl
:
false
,
urlParams
:
{
gType
:
"term"
,
viewType
:
"term"
,
fromView
:
"glossary"
},
urlParams
:
{
gType
:
"term"
,
viewType
:
"term"
,
fromView
:
"glossary"
,
gId
:
gId
},
trigger
:
true
,
trigger
:
true
,
updateTabState
:
true
updateTabState
:
true
});
});
...
@@ -427,15 +429,18 @@ define(['require',
...
@@ -427,15 +429,18 @@ define(['require',
renderTagTableLayoutView
:
function
(
options
)
{
renderTagTableLayoutView
:
function
(
options
)
{
var
that
=
this
;
var
that
=
this
;
require
([
'views/tag/TagDetailTableLayoutView'
],
function
(
TagDetailTableLayoutView
)
{
require
([
'views/tag/TagDetailTableLayoutView'
],
function
(
TagDetailTableLayoutView
)
{
that
.
RTagTableLayoutView
.
show
(
new
TagDetailTableLayoutView
(
_
.
extend
({},
options
,
{
if
(
that
.
RTagTableLayoutView
)
{
"entityName"
:
that
.
ui
.
title
.
text
(),
that
.
RTagTableLayoutView
.
show
(
new
TagDetailTableLayoutView
(
_
.
extend
({},
options
,
{
"fetchCollection"
:
that
.
getData
.
bind
(
that
),
"entityName"
:
that
.
ui
.
title
.
text
(),
"entity"
:
that
.
data
"fetchCollection"
:
that
.
getData
.
bind
(
that
),
})));
"entity"
:
that
.
data
})));
}
});
});
},
},
renderSearchResultLayoutView
:
function
(
options
)
{
renderSearchResultLayoutView
:
function
(
options
)
{
var
that
=
this
;
var
that
=
this
;
require
([
'views/search/SearchResultLayoutView'
],
function
(
SearchResultLayoutView
)
{
require
([
'views/search/SearchResultLayoutView'
],
function
(
SearchResultLayoutView
)
{
var
value
=
{
var
value
=
{
'tag'
:
"PII"
,
'tag'
:
"PII"
,
...
@@ -452,11 +457,13 @@ define(['require',
...
@@ -452,11 +457,13 @@ define(['require',
renderRelationLayoutView
:
function
(
options
)
{
renderRelationLayoutView
:
function
(
options
)
{
var
that
=
this
;
var
that
=
this
;
require
([
'views/glossary/TermRelationAttributeLayoutView'
],
function
(
TermRelationAttributeLayoutView
)
{
require
([
'views/glossary/TermRelationAttributeLayoutView'
],
function
(
TermRelationAttributeLayoutView
)
{
that
.
RRelationLayoutView
.
show
(
new
TermRelationAttributeLayoutView
(
_
.
extend
({},
options
,
{
if
(
that
.
RRelationLayoutView
)
{
"entityName"
:
that
.
ui
.
title
.
text
(),
that
.
RRelationLayoutView
.
show
(
new
TermRelationAttributeLayoutView
(
_
.
extend
({},
options
,
{
"fetchCollection"
:
that
.
getData
.
bind
(
that
),
"entityName"
:
that
.
ui
.
title
.
text
(),
"data"
:
that
.
data
"fetchCollection"
:
that
.
getData
.
bind
(
that
),
})));
"data"
:
that
.
data
})));
}
});
});
},
},
});
});
...
...
dashboardv2/public/js/views/glossary/GlossaryLayoutView.js
View file @
3b75d56d
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/glossary/TermRelationAttributeLayoutView.js
View file @
3b75d56d
...
@@ -231,7 +231,7 @@ define(['require',
...
@@ -231,7 +231,7 @@ define(['require',
getTerms
:
function
(
key
)
{
getTerms
:
function
(
key
)
{
var
terms
=
_
.
map
(
that
.
data
[
key
],
function
(
obj
)
{
var
terms
=
_
.
map
(
that
.
data
[
key
],
function
(
obj
)
{
var
name
=
_
.
escape
(
obj
.
displayText
);
var
name
=
_
.
escape
(
obj
.
displayText
);
return
'<span class="btn btn-action btn-sm btn-icon btn-blue" title='
+
_
.
escape
(
name
)
+
' data-id="termClick"><span>'
+
name
+
'</span><i class="fa fa-close" data-id="deleteAttribute" data-attributename="'
+
key
+
'" data-termguid="'
+
obj
.
termGuid
+
'" data-type="term" title="Remove Term"></i></span>'
;
return
'<span
data-guid="'
+
obj
.
termGuid
+
'"
class="btn btn-action btn-sm btn-icon btn-blue" title='
+
_
.
escape
(
name
)
+
' data-id="termClick"><span>'
+
name
+
'</span><i class="fa fa-close" data-id="deleteAttribute" data-attributename="'
+
key
+
'" data-termguid="'
+
obj
.
termGuid
+
'" data-type="term" title="Remove Term"></i></span>'
;
}).
join
(
""
),
}).
join
(
""
),
attributeButtons
=
""
;
attributeButtons
=
""
;
if
(
terms
.
length
)
{
if
(
terms
.
length
)
{
...
...
dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js
View file @
3b75d56d
...
@@ -102,9 +102,11 @@ define(['require',
...
@@ -102,9 +102,11 @@ define(['require',
var
that
=
this
;
var
that
=
this
;
require
([
'utils/TableLayout'
],
function
(
TableLayout
)
{
require
([
'utils/TableLayout'
],
function
(
TableLayout
)
{
var
cols
=
new
Backgrid
.
Columns
(
that
.
getSchemaTableColumns
());
var
cols
=
new
Backgrid
.
Columns
(
that
.
getSchemaTableColumns
());
that
.
RTagTableLayoutView
.
show
(
new
TableLayout
(
_
.
extend
({},
that
.
commonTableOptions
,
{
if
(
that
.
RTagTableLayoutView
)
{
columns
:
cols
that
.
RTagTableLayoutView
.
show
(
new
TableLayout
(
_
.
extend
({},
that
.
commonTableOptions
,
{
})));
columns
:
cols
})));
}
});
});
},
},
getSchemaTableColumns
:
function
(
options
)
{
getSchemaTableColumns
:
function
(
options
)
{
...
...
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