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
6148b22a
Commit
6148b22a
authored
Jun 01, 2016
by
Suma Shivaprasad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-843 Atlas UI: Feature to search terms in left navigation. (Kalyanikashikar via sumasai)
parent
a05f752d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
90 additions
and
31 deletions
+90
-31
BusinessCatalogLayoutView_tmpl.html
...ates/business_catalog/BusinessCatalogLayoutView_tmpl.html
+5
-2
Utils.js
dashboardv2/public/js/utils/Utils.js
+8
-3
BusinessCatalogLayoutView.js
...ic/js/views/business_catalog/BusinessCatalogLayoutView.js
+76
-26
release-log.txt
release-log.txt
+1
-0
No files found.
dashboardv2/public/js/templates/business_catalog/BusinessCatalogLayoutView_tmpl.html
View file @
6148b22a
...
@@ -14,6 +14,9 @@
...
@@ -14,6 +14,9 @@
* See the License for the specific language governing permissions and
* See the License for the specific language governing permissions and
* limitations under the License.
* limitations under the License.
-->
-->
<div
class=
"form-group"
>
<select
type=
"text"
class=
"form-control"
data-id=
"searchTermInput"
placeholder=
"Search term"
></select>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<button
class=
"btn btn-taxanomyBack btn-atlas"
data-id=
"backTaxanomy"
><i
class=
"fa fa-chevron-left"
></i>
Back
</button>
<button
class=
"btn btn-taxanomyBack btn-atlas"
data-id=
"backTaxanomy"
><i
class=
"fa fa-chevron-left"
></i>
Back
</button>
</div>
</div>
...
@@ -21,8 +24,8 @@
...
@@ -21,8 +24,8 @@
<ul
class=
"taxonomyTree"
>
<ul
class=
"taxonomyTree"
>
<div
class=
"contentLoading"
></div>
<div
class=
"contentLoading"
></div>
<li
class=
"children parent"
data-id=
"Parent"
></li>
<li
class=
"children parent"
data-id=
"Parent"
></li>
<li
class=
"chil
eds parentChile
d"
>
<li
class=
"chil
ds parentChil
d"
>
<ul
data-id=
"chil
e
dList"
>
<ul
data-id=
"childList"
>
</ul>
</ul>
</li>
</li>
</ul>
</ul>
...
...
dashboardv2/public/js/utils/Utils.js
View file @
6148b22a
...
@@ -75,11 +75,18 @@ define(['require', 'utils/Globals'], function(require, Globals) {
...
@@ -75,11 +75,18 @@ define(['require', 'utils/Globals'], function(require, Globals) {
});
});
};
};
Utils
.
defaultErrorHandler
=
function
(
model
,
error
)
{
Utils
.
defaultErrorHandler
=
function
(
model
,
error
)
{
/*require(['views/common/ErrorView', 'App'], function(vError, App) {*/
if
(
error
.
status
==
401
)
{
if
(
error
.
status
==
401
)
{
window
.
location
=
'login.jsp'
window
.
location
=
'login.jsp'
}
else
if
(
error
.
status
==
419
)
{
}
else
if
(
error
.
status
==
419
)
{
window
.
location
=
'login.jsp'
window
.
location
=
'login.jsp'
}
else
if
(
error
.
status
==
403
)
{
var
message
=
"You are not authorized"
;
if
(
error
.
statusText
)
{
message
=
JSON
.
parse
(
error
.
statusText
).
AuthorizationError
;
}
Utils
.
notifyError
({
content
:
message
});
}
else
if
(
error
.
status
==
"0"
)
{
}
else
if
(
error
.
status
==
"0"
)
{
var
diffTime
=
(
new
Date
().
getTime
()
-
prevNetworkErrorTime
);
var
diffTime
=
(
new
Date
().
getTime
()
-
prevNetworkErrorTime
);
if
(
diffTime
>
3000
)
{
if
(
diffTime
>
3000
)
{
...
@@ -90,8 +97,6 @@ define(['require', 'utils/Globals'], function(require, Globals) {
...
@@ -90,8 +97,6 @@ define(['require', 'utils/Globals'], function(require, Globals) {
});
});
}
}
}
}
/*});*/
};
};
Utils
.
localStorage
=
{
Utils
.
localStorage
=
{
...
...
dashboardv2/public/js/views/business_catalog/BusinessCatalogLayoutView.js
View file @
6148b22a
...
@@ -37,10 +37,11 @@ define(['require',
...
@@ -37,10 +37,11 @@ define(['require',
/** ui selector cache */
/** ui selector cache */
ui
:
{
ui
:
{
Parent
:
'[data-id="Parent"]'
,
Parent
:
'[data-id="Parent"]'
,
chil
edList
:
'[data-id="chile
dList"]'
,
chil
dList
:
'[data-id="chil
dList"]'
,
liClick
:
'li a[data-href]'
,
liClick
:
'li a[data-href]'
,
backTaxanomy
:
'[data-id="backTaxanomy"]'
,
backTaxanomy
:
'[data-id="backTaxanomy"]'
,
expandArrow
:
'[data-id="expandArrow"]'
expandArrow
:
'[data-id="expandArrow"]'
,
searchTermInput
:
'[data-id="searchTermInput"]'
},
},
/** ui events hash */
/** ui events hash */
events
:
function
()
{
events
:
function
()
{
...
@@ -56,6 +57,11 @@ define(['require',
...
@@ -56,6 +57,11 @@ define(['require',
};
};
events
[
'click '
+
this
.
ui
.
backTaxanomy
]
=
'backButtonTaxanomy'
;
events
[
'click '
+
this
.
ui
.
backTaxanomy
]
=
'backButtonTaxanomy'
;
events
[
'click '
+
this
.
ui
.
expandArrow
]
=
'changeArrowState'
;
events
[
'click '
+
this
.
ui
.
expandArrow
]
=
'changeArrowState'
;
events
[
"change "
+
this
.
ui
.
searchTermInput
]
=
function
()
{
this
.
singleClick
=
false
;
var
termUrl
=
this
.
termCollection
.
url
.
split
(
"/"
,
5
).
join
(
"/"
)
+
"/"
+
this
.
ui
.
searchTermInput
.
val
().
split
(
"."
).
join
(
"/terms/"
);
this
.
forwardClick
(
undefined
,
true
,
termUrl
);
};
return
events
;
return
events
;
},
},
/**
/**
...
@@ -65,7 +71,9 @@ define(['require',
...
@@ -65,7 +71,9 @@ define(['require',
initialize
:
function
(
options
)
{
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'globalVent'
,
'url'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'globalVent'
,
'url'
));
this
.
parentCollection
=
new
VCatalogList
();
this
.
parentCollection
=
new
VCatalogList
();
this
.
chiledCollection
=
new
VCatalogList
();
this
.
childCollection
=
new
VCatalogList
();
this
.
taxanomy
=
new
VCatalogList
();
this
.
termCollection
=
new
VCatalogList
();
this
.
dblClick
=
false
;
this
.
dblClick
=
false
;
this
.
singleClick
=
false
;
this
.
singleClick
=
false
;
},
},
...
@@ -75,11 +83,17 @@ define(['require',
...
@@ -75,11 +83,17 @@ define(['require',
this
.
dblClick
=
false
;
this
.
dblClick
=
false
;
this
.
generateTree
(
true
);
this
.
generateTree
(
true
);
},
this
);
},
this
);
this
.
listenTo
(
this
.
chil
e
dCollection
,
'reset'
,
function
()
{
this
.
listenTo
(
this
.
childCollection
,
'reset'
,
function
()
{
this
.
dblClick
=
false
;
this
.
dblClick
=
false
;
this
.
generateTree
();
this
.
generateTree
();
},
this
);
},
this
);
this
.
listenTo
(
this
.
chiledCollection
,
'error'
,
function
(
model
,
response
)
{
this
.
listenTo
(
this
.
taxanomy
,
'reset'
,
function
()
{
this
.
searchResult
();
},
this
);
this
.
listenTo
(
this
.
termCollection
,
'reset'
,
function
()
{
this
.
termSearchData
();
},
this
);
this
.
listenTo
(
this
.
childCollection
,
'error'
,
function
(
model
,
response
)
{
if
(
response
&&
response
.
responseJSON
&&
response
.
responseJSON
.
message
)
{
if
(
response
&&
response
.
responseJSON
&&
response
.
responseJSON
.
message
)
{
Utils
.
notifyError
({
Utils
.
notifyError
({
content
:
response
.
responseJSON
.
message
content
:
response
.
responseJSON
.
message
...
@@ -102,7 +116,9 @@ define(['require',
...
@@ -102,7 +116,9 @@ define(['require',
var
that
=
this
;
var
that
=
this
;
this
.
bindEvents
();
this
.
bindEvents
();
that
.
ui
.
backTaxanomy
.
hide
();
that
.
ui
.
backTaxanomy
.
hide
();
this
.
fetchCollection
(
this
.
url
,
true
);
this
.
fetchCollection
(
this
.
url
,
true
);
$
(
'body'
).
on
(
"click"
,
'.termPopoverList li'
,
function
(
e
)
{
$
(
'body'
).
on
(
"click"
,
'.termPopoverList li'
,
function
(
e
)
{
that
[
$
(
this
).
find
(
"a"
).
data
(
'fn'
)](
e
);
that
[
$
(
this
).
find
(
"a"
).
data
(
'fn'
)](
e
);
});
});
...
@@ -114,6 +130,7 @@ define(['require',
...
@@ -114,6 +130,7 @@ define(['require',
that
.
$
(
'.termPopover'
).
popover
(
'hide'
);
that
.
$
(
'.termPopover'
).
popover
(
'hide'
);
}
}
});
});
this
.
fetchTaxanomyCollections
();
},
},
manualRender
:
function
(
url
,
isParent
,
back
)
{
manualRender
:
function
(
url
,
isParent
,
back
)
{
if
(
back
)
{
if
(
back
)
{
...
@@ -143,16 +160,16 @@ define(['require',
...
@@ -143,16 +160,16 @@ define(['require',
scope
.
removeClass
(
'fa-chevron-down'
);
scope
.
removeClass
(
'fa-chevron-down'
);
scope
.
addClass
(
'fa-chevron-right'
);
scope
.
addClass
(
'fa-chevron-right'
);
this
.
addActiveClass
(
scope
[
0
]);
this
.
addActiveClass
(
scope
[
0
]);
this
.
ui
.
chil
e
dList
.
hide
();
this
.
ui
.
childList
.
hide
();
}
else
{
}
else
{
if
(
e
&&
$
(
e
.
currentTarget
).
parents
(
'li.parentChil
e
d'
).
length
)
{
if
(
e
&&
$
(
e
.
currentTarget
).
parents
(
'li.parentChild'
).
length
)
{
scope
.
parent
(
'li'
).
find
(
'.tools .taxanomyloader'
).
show
();
scope
.
parent
(
'li'
).
find
(
'.tools .taxanomyloader'
).
show
();
this
.
forwardClick
(
e
,
true
);
this
.
forwardClick
(
e
,
true
);
}
else
{
}
else
{
scope
.
addClass
(
'fa-chevron-down'
);
scope
.
addClass
(
'fa-chevron-down'
);
scope
.
removeClass
(
'fa-chevron-right'
);
scope
.
removeClass
(
'fa-chevron-right'
);
this
.
singleClick
=
false
;
this
.
singleClick
=
false
;
this
.
ui
.
chil
e
dList
.
show
();
this
.
ui
.
childList
.
show
();
}
}
}
}
...
@@ -177,9 +194,9 @@ define(['require',
...
@@ -177,9 +194,9 @@ define(['require',
this
.
parentCollection
.
fullCollection
.
reset
(
undefined
,
{
silent
:
true
});
this
.
parentCollection
.
fullCollection
.
reset
(
undefined
,
{
silent
:
true
});
this
.
parentCollection
.
fetch
({
reset
:
true
});
this
.
parentCollection
.
fetch
({
reset
:
true
});
}
else
{
}
else
{
this
.
chil
e
dCollection
.
url
=
this
.
url
+
"?hierarchy/path:."
;
this
.
childCollection
.
url
=
this
.
url
+
"?hierarchy/path:."
;
this
.
chil
e
dCollection
.
fullCollection
.
reset
(
undefined
,
{
silent
:
true
});
this
.
childCollection
.
fullCollection
.
reset
(
undefined
,
{
silent
:
true
});
this
.
chil
e
dCollection
.
fetch
({
reset
:
true
});
this
.
childCollection
.
fetch
({
reset
:
true
});
}
}
},
},
forwardClick
:
function
(
e
,
forward
,
url
)
{
forwardClick
:
function
(
e
,
forward
,
url
)
{
...
@@ -190,22 +207,29 @@ define(['require',
...
@@ -190,22 +207,29 @@ define(['require',
if
(
url
)
{
if
(
url
)
{
hrefUrl
=
url
;
hrefUrl
=
url
;
}
}
if
(
!
e
&&
!
url
)
{
var
dataHref
=
this
.
ui
.
Parent
.
find
(
'a'
).
data
(
'href'
);
if
(
dataHref
)
{
hrefUrl
=
dataHref
;
}
}
if
(
forward
)
{
if
(
forward
)
{
this
.
dblClick
=
true
;
this
.
dblClick
=
true
;
this
.
ui
.
chil
e
dList
.
show
();
this
.
ui
.
childList
.
show
();
this
.
fetchCollection
(
hrefUrl
,
true
);
this
.
fetchCollection
(
hrefUrl
,
true
);
}
else
{
}
else
{
this
.
singleClick
=
true
;
this
.
singleClick
=
true
;
}
}
Utils
.
setUrl
({
if
(
hrefUrl
.
length
>
1
)
{
url
:
'#!/taxonomy/detailCatalog'
+
hrefUrl
,
Utils
.
setUrl
({
mergeBrowserUrl
:
false
,
url
:
'#!/taxonomy/detailCatalog'
+
hrefUrl
,
updateTabState
:
function
()
{
mergeBrowserUrl
:
false
,
return
{
taxonomyUrl
:
this
.
url
,
stateChanged
:
false
};
updateTabState
:
function
()
{
},
return
{
taxonomyUrl
:
this
.
url
,
stateChanged
:
false
};
trigger
:
true
},
});
trigger
:
true
});
}
if
(
e
)
{
if
(
e
)
{
this
.
addActiveClass
(
e
);
this
.
addActiveClass
(
e
);
}
}
...
@@ -216,7 +240,7 @@ define(['require',
...
@@ -216,7 +240,7 @@ define(['require',
},
},
generateTree
:
function
(
isParent
)
{
generateTree
:
function
(
isParent
)
{
var
parentLi
=
""
,
var
parentLi
=
""
,
chil
e
dLi
=
""
,
childLi
=
""
,
that
=
this
;
that
=
this
;
function
createTaxonomy
(
url
)
{
function
createTaxonomy
(
url
)
{
...
@@ -246,18 +270,18 @@ define(['require',
...
@@ -246,18 +270,18 @@ define(['require',
var
hrefUrl
=
"/api"
+
href
.
split
(
"/api"
)[
1
];
var
hrefUrl
=
"/api"
+
href
.
split
(
"/api"
)[
1
];
that
.
fetchCollection
(
hrefUrl
);
that
.
fetchCollection
(
hrefUrl
);
}
}
that
.
ui
.
chil
e
dList
.
html
(
''
);
that
.
ui
.
childList
.
html
(
''
);
that
.
ui
.
Parent
.
addClass
(
'active'
);
that
.
ui
.
Parent
.
addClass
(
'active'
);
that
.
ui
.
Parent
.
html
(
parentLi
);
that
.
ui
.
Parent
.
html
(
parentLi
);
}
}
function
createTerm
()
{
function
createTerm
()
{
_
.
each
(
that
.
chil
e
dCollection
.
fullCollection
.
models
,
function
(
model
,
key
)
{
_
.
each
(
that
.
childCollection
.
fullCollection
.
models
,
function
(
model
,
key
)
{
var
name
=
Utils
.
checkTagOrTerm
(
model
.
get
(
'name'
));
var
name
=
Utils
.
checkTagOrTerm
(
model
.
get
(
'name'
));
var
hrefUrl
=
"/api"
+
model
.
get
(
'href'
).
split
(
"/api"
)[
1
]
var
hrefUrl
=
"/api"
+
model
.
get
(
'href'
).
split
(
"/api"
)[
1
]
chil
e
dLi
+=
'<li class="children"><div class="tools"><i class="fa fa-refresh fa-spin-custom taxanomyloader"></i><i class="fa fa-ellipsis-h termPopover" ></i></div><i class="fa fa-chevron-right toggleArrow" data-id="expandArrow" data-href="'
+
hrefUrl
+
'"></i><a href="javascript:void(0)" data-href="'
+
hrefUrl
+
'" data-name="`'
+
model
.
get
(
'name'
)
+
'`">'
+
name
.
name
+
'</a></li>'
;
childLi
+=
'<li class="children"><div class="tools"><i class="fa fa-refresh fa-spin-custom taxanomyloader"></i><i class="fa fa-ellipsis-h termPopover" ></i></div><i class="fa fa-chevron-right toggleArrow" data-id="expandArrow" data-href="'
+
hrefUrl
+
'"></i><a href="javascript:void(0)" data-href="'
+
hrefUrl
+
'" data-name="`'
+
model
.
get
(
'name'
)
+
'`">'
+
name
.
name
+
'</a></li>'
;
});
});
that
.
ui
.
chil
edList
.
html
(
chile
dLi
);
that
.
ui
.
chil
dList
.
html
(
chil
dLi
);
}
}
if
(
isParent
)
{
if
(
isParent
)
{
...
@@ -422,6 +446,32 @@ define(['require',
...
@@ -422,6 +446,32 @@ define(['require',
}
}
});
});
}
}
},
fetchTaxanomyCollections
:
function
()
{
this
.
taxanomy
.
fetch
({
reset
:
true
});
},
searchResult
:
function
()
{
var
that
=
this
;
_
.
each
(
this
.
taxanomy
.
models
,
function
(
model
,
key
)
{
var
name
=
model
.
get
(
'name'
);
that
.
termCollection
.
url
=
"/api/atlas/v1/taxonomies/"
+
name
+
"/terms"
;
});
this
.
termCollection
.
fetch
({
reset
:
true
});
},
termSearchData
:
function
()
{
var
that
=
this
;
var
str
=
'<option></option>'
;
for
(
var
j
=
0
;
j
<
this
.
termCollection
.
models
.
length
;
j
++
)
{
var
terms
=
this
.
termCollection
.
models
[
j
].
attributes
.
name
;
str
+=
'<option>'
+
terms
+
'</option>'
;
this
.
ui
.
searchTermInput
.
html
(
str
);
}
// this.ui.searchTermInput.setAttribute('data-href' : that.termCollection.url);
this
.
ui
.
searchTermInput
.
select2
({
placeholder
:
"Search Term"
,
allowClear
:
true
});
}
}
});
});
return
BusinessCatalogLayoutView
;
return
BusinessCatalogLayoutView
;
...
...
release-log.txt
View file @
6148b22a
...
@@ -22,6 +22,7 @@ ATLAS-409 Atlas will not import avro tables with schema read from a file (dosset
...
@@ -22,6 +22,7 @@ ATLAS-409 Atlas will not import avro tables with schema read from a file (dosset
ATLAS-379 Create sqoop and falcon metadata addons (venkatnrangan,bvellanki,sowmyaramesh via shwethags)
ATLAS-379 Create sqoop and falcon metadata addons (venkatnrangan,bvellanki,sowmyaramesh via shwethags)
ALL CHANGES:
ALL CHANGES:
ATLAS-843 Atlas UI: Feature to search terms in left navigation. (Kalyanikashikar via sumasai)
ATLAS-731 Remove dashboard module in Atlas, replaced by dashboardv2 (kevalbhatt18 via sumasai)
ATLAS-731 Remove dashboard module in Atlas, replaced by dashboardv2 (kevalbhatt18 via sumasai)
ATLAS-664 UI: Add Support for Versioning / History (Kalyanikashikar via yhemanth)
ATLAS-664 UI: Add Support for Versioning / History (Kalyanikashikar via yhemanth)
ATLAS-833 Make default build profile for External HBase and Solr (tbeerbower via yhemanth)
ATLAS-833 Make default build profile for External HBase and Solr (tbeerbower via yhemanth)
...
...
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