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
8baade24
Commit
8baade24
authored
Mar 28, 2020
by
kevalbhatt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3685 :- UI Bulk import Business Metadata attribute assignment to entities
parent
c5464da3
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
66 additions
and
36 deletions
+66
-36
leftsidebar.scss
dashboardv3/public/css/scss/leftsidebar.scss
+1
-1
ImportLayoutView_tmpl.html
...dv3/public/js/templates/import/ImportLayoutView_tmpl.html
+2
-2
BusinessMetadataTreeLayoutView_tmpl.html
...ates/search/tree/BusinessMetadataTreeLayoutView_tmpl.html
+0
-2
EntityTreeLayoutView_tmpl.html
...c/js/templates/search/tree/EntityTreeLayoutView_tmpl.html
+6
-1
GlossaryTreeLayoutView_tmpl.html
...js/templates/search/tree/GlossaryTreeLayoutView_tmpl.html
+1
-1
UrlLinks.js
dashboardv3/public/js/utils/UrlLinks.js
+6
-0
ImportLayoutView.js
dashboardv3/public/js/views/import/ImportLayoutView.js
+25
-22
EntityTreeLayoutView.js
...ardv3/public/js/views/search/tree/EntityTreeLayoutView.js
+20
-3
GlossaryTreeLayoutView.js
...dv3/public/js/views/search/tree/GlossaryTreeLayoutView.js
+5
-4
No files found.
dashboardv3/public/css/scss/leftsidebar.scss
View file @
8baade24
...
...
@@ -427,7 +427,7 @@ span.tree-tooltip {
}
}
.
glossary-dro
pdown
{
.
tree-drou
pdown
{
left
:
-190px
!
important
;
span
a
{
...
...
dashboardv3/public/js/templates/
glossary/ImportGlossary
LayoutView_tmpl.html
→
dashboardv3/public/js/templates/
import/Import
LayoutView_tmpl.html
View file @
8baade24
...
...
@@ -14,4 +14,4 @@
* See the License for the specific language governing permissions and
* limitations under the License.
-->
<form
action=
{{importUrl}}
id=
"importGlossary"
class=
"dropzone single-file-center"
></form>
\ No newline at end of file
<form
id=
"importGlossary"
class=
"dropzone single-file-center"
></form>
\ No newline at end of file
dashboardv3/public/js/templates/search/tree/BusinessMetadataTreeLayoutView_tmpl.html
View file @
8baade24
...
...
@@ -25,8 +25,6 @@
<button
type=
"button"
class=
"typeRefresh drop-down-menu-view"
data-id=
"createBusinessMetadata"
title=
"Open Business Metadata"
>
<i
class=
"fa fa-external-link"
></i>
</button>
</ul>
</button>
</div>
</div>
<div
id=
"businessMetadataTree"
class=
"panel-collapse collapse jstree-with-action in"
>
...
...
dashboardv3/public/js/templates/search/tree/EntityTreeLayoutView_tmpl.html
View file @
8baade24
...
...
@@ -29,11 +29,16 @@
<div
class=
" btn-secondary dropdown-toggle"
type=
"button"
id=
"dropdownMenuButton"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
>
<i
class=
"fa fa-ellipsis-v"
></i>
</div>
<ul
class=
"dropdown-menu"
aria-labelledby=
"dropdownMenuButton"
>
<ul
class=
"dropdown-menu
tree-droupdown
"
aria-labelledby=
"dropdownMenuButton"
>
<li
data-id=
"groupOrFlatTreeView"
data-type=
"entity"
>
<i
class=
"fa fa-list-ul"
></i><span>
Show flat tree
</span>
</li>
<li
data-id=
"downloadBusinessMetadata"
><i
class=
"fa fa-download"
></i>
<span><a
href=
"{{importTmplUrl}}"
><span>
Download Import template
</span></a></span>
</li>
<li
data-id=
"importBusinessMetadata"
>
<i
class=
"fa fa-upload"
></i><a
href=
"javascript:void(0)"
><span>
Import Business Metadata
</span></a>
</li>
</ul>
</button>
</button>
</div>
</div>
<div
id=
"c_entity"
class=
"panel-collapse collapse jstree-with-action in"
>
...
...
dashboardv3/public/js/templates/search/tree/GlossaryTreeLayoutView_tmpl.html
View file @
8baade24
...
...
@@ -27,7 +27,7 @@
<div
class=
" btn-secondary dropdown-toggle"
type=
"button"
id=
"dropdownMenuButton"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
>
<i
class=
"fa fa-ellipsis-v"
></i>
</div>
<ul
class=
"dropdown-menu
glossary-dro
pdown"
aria-labelledby=
"dropdownMenuButton"
>
<ul
class=
"dropdown-menu
tree-drou
pdown"
aria-labelledby=
"dropdownMenuButton"
>
<li
data-id=
"createGlossary"
data-type=
"term"
>
<i
class=
"fa fa-plus"
></i><span>
Create Glossary
</span>
</li>
<li
data-id=
"downloadTemplate"
data-type=
"term"
><i
class=
"fa fa-download"
></i>
<span><a
href=
"{{importTmplUrl}}"
><span>
Download Import template
</span></a></span>
...
...
dashboardv3/public/js/utils/UrlLinks.js
View file @
8baade24
...
...
@@ -191,6 +191,12 @@ define(['require', 'utils/Enums', 'utils/Utils', 'underscore'], function(require
glossaryImportUrl
:
function
()
{
return
this
.
glossaryApiUrl
()
+
'/import'
;
},
businessMetadataImportTempUrl
:
function
()
{
return
this
.
entitiesApiUrl
()
+
'/businessmetadata/import/template'
;
},
businessMetadataImportUrl
:
function
()
{
return
this
.
entitiesApiUrl
()
+
'/businessmetadata/import'
;
},
categoryApiUrl
:
function
(
options
)
{
var
guid
=
options
&&
options
.
guid
,
list
=
options
&&
options
.
list
,
...
...
dashboardv3/public/js/views/
glossary/ImportGlossary
LayoutView.js
→
dashboardv3/public/js/views/
import/Import
LayoutView.js
View file @
8baade24
...
...
@@ -19,25 +19,19 @@
define
([
"require"
,
"backbone"
,
"hbs!tmpl/
glossary/ImportGlossary
LayoutView_tmpl"
,
"hbs!tmpl/
import/Import
LayoutView_tmpl"
,
"modules/Modal"
,
'utils/CommonViewFunction'
,
"utils/Utils"
,
"utils/UrlLinks"
,
"dropzone"
],
function
(
require
,
Backbone
,
Import
Glossary
LayoutViewTmpl
,
Modal
,
CommonViewFunction
,
Utils
,
UrlLinks
,
dropzone
)
{
var
Import
Glossary
LayoutView
=
Backbone
.
Marionette
.
LayoutView
.
extend
(
/** @lends Import
Glossary
LayoutView */
],
function
(
require
,
Backbone
,
ImportLayoutViewTmpl
,
Modal
,
CommonViewFunction
,
Utils
,
UrlLinks
,
dropzone
)
{
var
ImportLayoutView
=
Backbone
.
Marionette
.
LayoutView
.
extend
(
/** @lends ImportLayoutView */
{
_viewName
:
"Import
Glossary
LayoutView"
,
_viewName
:
"ImportLayoutView"
,
template
:
ImportGlossaryLayoutViewTmpl
,
templateHelpers
:
function
()
{
return
{
importUrl
:
UrlLinks
.
glossaryImportUrl
()
};
},
template
:
ImportLayoutViewTmpl
,
/** Layout sub regions */
regions
:
{},
...
...
@@ -50,14 +44,14 @@ define([
return
events
;
},
/**
* intialize a new Import
Glossary
LayoutView Layout
* intialize a new ImportLayoutView Layout
* @constructs
*/
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
"callback"
));
_
.
extend
(
this
,
_
.
pick
(
options
,
"callback"
,
"isGlossary"
));
var
that
=
this
;
this
.
modal
=
new
Modal
({
title
:
"Import Glossary
"
,
title
:
this
.
isGlossary
?
"Import Glossary"
:
"Import Business Metadata
"
,
content
:
this
,
cancelText
:
"Cancel"
,
okText
:
"upload"
,
...
...
@@ -88,7 +82,7 @@ define([
var
headers
=
{};
headers
[
CommonViewFunction
.
restCsrfCustomHeader
]
=
'""'
;
this
.
$
(
"#importGlossary"
).
dropzone
({
url
:
UrlLinks
.
glossary
ImportUrl
(),
url
:
that
.
isGlossary
?
UrlLinks
.
glossaryImportUrl
()
:
UrlLinks
.
businessMetadata
ImportUrl
(),
clickable
:
true
,
acceptedFiles
:
".csv,.xls,.xlsx"
,
autoProcessQueue
:
false
,
...
...
@@ -108,11 +102,19 @@ define([
this
.
addFile
(
file
);
},
success
:
function
(
file
,
response
)
{
that
.
modal
.
trigger
(
"cancel"
);
Utils
.
notifySuccess
({
content
:
"File: "
+
file
.
name
+
" added successfully"
});
that
.
callback
();
if
(
response
.
successImportInfoList
.
length
&&
response
.
failedImportInfoList
.
length
===
0
)
{
that
.
modal
.
trigger
(
"cancel"
);
Utils
.
notifySuccess
({
content
:
"File: "
+
file
.
name
+
" imported successfully"
});
}
else
if
(
response
.
failedImportInfoList
.
length
)
{
Utils
.
notifyError
({
content
:
response
.
failedImportInfoList
[
0
].
remarks
});
}
if
(
that
.
callback
)
{
that
.
callback
();
}
},
error
:
function
(
file
,
response
,
responseObj
)
{
Utils
.
defaultErrorHandler
(
null
,
responseObj
,
{
defaultErrorMessage
:
(
response
.
errorMessage
)
||
response
});
...
...
@@ -124,5 +126,5 @@ define([
}
}
);
return
Import
Glossary
LayoutView
;
return
ImportLayoutView
;
});
\ No newline at end of file
dashboardv3/public/js/views/search/tree/EntityTreeLayoutView.js
View file @
8baade24
...
...
@@ -43,11 +43,14 @@ define([
// Show/hide empty values in tree
showEmptyServiceType
:
'[data-id="showEmptyServiceType"]'
,
entityTreeLoader
:
'[data-id="entityTreeLoader"]'
entityTreeLoader
:
'[data-id="entityTreeLoader"]'
,
importBusinessMetadata
:
"[data-id='importBusinessMetadata']"
,
downloadBusinessMetadata
:
"[data-id='downloadBusinessMetadata']"
},
templateHelpers
:
function
()
{
return
{
apiBaseUrl
:
UrlLinks
.
apiBaseUrl
apiBaseUrl
:
UrlLinks
.
apiBaseUrl
,
importTmplUrl
:
UrlLinks
.
businessMetadataImportTempUrl
()
};
},
events
:
function
()
{
...
...
@@ -79,6 +82,13 @@ define([
that
.
ui
[
type
+
"SearchTree"
].
jstree
(
true
).
destroy
();
that
.
renderEntityTree
();
};
events
[
"click "
+
this
.
ui
.
importBusinessMetadata
]
=
function
(
e
)
{
e
.
stopPropagation
();
that
.
onClickImportBusinessMetadata
();
};
events
[
"click "
+
this
.
ui
.
downloadBusinessMetadata
]
=
function
(
e
)
{
e
.
stopPropagation
();
};
return
events
;
},
...
...
@@ -558,7 +568,14 @@ define([
renderTree
();
}
});
},
onClickImportBusinessMetadata
:
function
()
{
var
that
=
this
;
require
([
'views/import/ImportLayoutView'
],
function
(
ImportLayoutView
)
{
var
view
=
new
ImportLayoutView
({});
});
}
});
return
EntityTreeLayoutview
;
...
...
dashboardv3/public/js/views/search/tree/GlossaryTreeLayoutView.js
View file @
8baade24
...
...
@@ -711,12 +711,13 @@ define([
onClickImportGlossary
:
function
()
{
var
that
=
this
;
require
([
'views/
glossary/ImportGlossary
LayoutView'
],
function
(
Import
Glossary
LayoutView
)
{
var
view
=
new
Import
Glossary
LayoutView
({
'views/
import/Import
LayoutView'
],
function
(
ImportLayoutView
)
{
var
view
=
new
ImportLayoutView
({
callback
:
function
()
{
that
.
refresh
();
}
},
isGlossary
:
true
});
});
}
...
...
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