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
6679c8ee
Commit
6679c8ee
authored
Jan 24, 2017
by
kevalbhatt
Committed by
Madhan Neethiraj
Jan 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-1486: UI updates to handle errors from V2 APIs
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
143c0f81
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
81 additions
and
139 deletions
+81
-139
BaseCollection.js
dashboardv2/public/js/collection/BaseCollection.js
+1
-13
VCatalogList.js
dashboardv2/public/js/collection/VCatalogList.js
+0
-1
VCommonList.js
dashboardv2/public/js/collection/VCommonList.js
+0
-1
VEntityList.js
dashboardv2/public/js/collection/VEntityList.js
+0
-1
VLineageList.js
dashboardv2/public/js/collection/VLineageList.js
+0
-1
VSchemaList.js
dashboardv2/public/js/collection/VSchemaList.js
+0
-1
VSearchList.js
dashboardv2/public/js/collection/VSearchList.js
+0
-1
VTagList.js
dashboardv2/public/js/collection/VTagList.js
+0
-1
BaseModel.js
dashboardv2/public/js/models/BaseModel.js
+4
-8
VCatalog.js
dashboardv2/public/js/models/VCatalog.js
+0
-1
VCommon.js
dashboardv2/public/js/models/VCommon.js
+0
-1
VEntity.js
dashboardv2/public/js/models/VEntity.js
+0
-1
VLineage.js
dashboardv2/public/js/models/VLineage.js
+0
-1
VSchema.js
dashboardv2/public/js/models/VSchema.js
+0
-1
VSearch.js
dashboardv2/public/js/models/VSearch.js
+0
-1
VTag.js
dashboardv2/public/js/models/VTag.js
+0
-1
CommonViewFunction.js
dashboardv2/public/js/utils/CommonViewFunction.js
+5
-14
Messages.js
dashboardv2/public/js/utils/Messages.js
+2
-1
Overrides.js
dashboardv2/public/js/utils/Overrides.js
+19
-1
Utils.js
dashboardv2/public/js/utils/Utils.js
+36
-32
BusinessCatalogDetailLayoutView.js
...views/business_catalog/BusinessCatalogDetailLayoutView.js
+0
-8
TreeLayoutView.js
...oardv2/public/js/views/business_catalog/TreeLayoutView.js
+6
-19
aboutAtlas.js
dashboardv2/public/js/views/common/aboutAtlas.js
+0
-1
CreateEntityLayoutView.js
dashboardv2/public/js/views/entity/CreateEntityLayoutView.js
+0
-7
LineageLayoutView.js
dashboardv2/public/js/views/graph/LineageLayoutView.js
+2
-1
SearchResultLayoutView.js
dashboardv2/public/js/views/search/SearchResultLayoutView.js
+0
-1
CreateTagLayoutView.js
dashboardv2/public/js/views/tag/CreateTagLayoutView.js
+0
-1
TagAttributeDetailLayoutView.js
...ardv2/public/js/views/tag/TagAttributeDetailLayoutView.js
+0
-7
TagLayoutView.js
dashboardv2/public/js/views/tag/TagLayoutView.js
+0
-7
addTagModalView.js
dashboardv2/public/js/views/tag/addTagModalView.js
+4
-4
release-log.txt
release-log.txt
+2
-0
No files found.
dashboardv2/public/js/collection/BaseCollection.js
View file @
6679c8ee
...
@@ -36,19 +36,6 @@ define(['require',
...
@@ -36,19 +36,6 @@ define(['require',
initialize
:
function
()
{
initialize
:
function
()
{
this
.
sort_key
=
'id'
;
this
.
sort_key
=
'id'
;
},
},
bindErrorEvents
:
function
()
{
this
.
bind
(
"error"
,
Utils
.
defaultErrorHandler
);
},
bindRequest
:
function
()
{
this
.
bind
(
'request'
,
function
(
model
,
ajaxObj
,
collectionObj
)
{
this
.
ajaxStart
(
model
,
ajaxObj
,
collectionObj
);
},
this
);
this
.
bind
(
'sync'
,
function
(
model
,
ajaxObj
,
collectionObj
)
{
this
.
ajaxComplete
(
model
,
ajaxObj
,
collectionObj
);
},
this
);
},
ajaxStart
:
function
(
model
,
ajaxObj
,
collectionObj
)
{},
ajaxComplete
:
function
(
model
,
ajaxObj
,
collectionObj
)
{},
comparator
:
function
(
key
,
value
)
{
comparator
:
function
(
key
,
value
)
{
key
=
key
.
get
(
this
.
sort_key
);
key
=
key
.
get
(
this
.
sort_key
);
value
=
value
.
get
(
this
.
sort_key
);
value
=
value
.
get
(
this
.
sort_key
);
...
@@ -140,6 +127,7 @@ define(['require',
...
@@ -140,6 +127,7 @@ define(['require',
return
retCols
;
return
retCols
;
},
},
nonCrudOperation
:
function
(
url
,
requestMethod
,
options
)
{
nonCrudOperation
:
function
(
url
,
requestMethod
,
options
)
{
var
that
=
this
;
options
[
'beforeSend'
]
=
CommonViewFunction
.
addRestCsrfCustomHeader
;
options
[
'beforeSend'
]
=
CommonViewFunction
.
addRestCsrfCustomHeader
;
return
Backbone
.
sync
.
call
(
this
,
null
,
this
,
_
.
extend
({
return
Backbone
.
sync
.
call
(
this
,
null
,
this
,
_
.
extend
({
url
:
url
,
url
:
url
,
...
...
dashboardv2/public/js/collection/VCatalogList.js
View file @
6679c8ee
...
@@ -33,7 +33,6 @@ define(['require',
...
@@ -33,7 +33,6 @@ define(['require',
initialize
:
function
()
{
initialize
:
function
()
{
this
.
modelName
=
'VCatalog'
;
this
.
modelName
=
'VCatalog'
;
this
.
modelAttrName
=
''
;
this
.
modelAttrName
=
''
;
this
.
bindErrorEvents
();
},
},
fetch
:
function
(
options
)
{
fetch
:
function
(
options
)
{
//Call Backbone's fetch
//Call Backbone's fetch
...
...
dashboardv2/public/js/collection/VCommonList.js
View file @
6679c8ee
...
@@ -33,7 +33,6 @@ define(['require',
...
@@ -33,7 +33,6 @@ define(['require',
initialize
:
function
()
{
initialize
:
function
()
{
this
.
modelName
=
'VCommon'
;
this
.
modelName
=
'VCommon'
;
this
.
modelAttrName
=
''
;
this
.
modelAttrName
=
''
;
this
.
bindErrorEvents
();
},
},
},
},
//Static Class Members
//Static Class Members
...
...
dashboardv2/public/js/collection/VEntityList.js
View file @
6679c8ee
...
@@ -33,7 +33,6 @@ define(['require',
...
@@ -33,7 +33,6 @@ define(['require',
initialize
:
function
()
{
initialize
:
function
()
{
this
.
modelName
=
'VEntity'
;
this
.
modelName
=
'VEntity'
;
this
.
modelAttrName
=
''
;
this
.
modelAttrName
=
''
;
this
.
bindErrorEvents
();
},
},
parseRecords
:
function
(
resp
,
options
)
{
parseRecords
:
function
(
resp
,
options
)
{
try
{
try
{
...
...
dashboardv2/public/js/collection/VLineageList.js
View file @
6679c8ee
...
@@ -33,7 +33,6 @@ define(['require',
...
@@ -33,7 +33,6 @@ define(['require',
initialize
:
function
()
{
initialize
:
function
()
{
this
.
modelName
=
'VLineage'
;
this
.
modelName
=
'VLineage'
;
this
.
modelAttrName
=
'results'
;
this
.
modelAttrName
=
'results'
;
this
.
bindErrorEvents
();
},
},
getLineage
:
function
(
id
,
options
)
{
getLineage
:
function
(
id
,
options
)
{
var
url
=
UrlLinks
.
lineageApiUrl
(
id
);
var
url
=
UrlLinks
.
lineageApiUrl
(
id
);
...
...
dashboardv2/public/js/collection/VSchemaList.js
View file @
6679c8ee
...
@@ -31,7 +31,6 @@ define(['require',
...
@@ -31,7 +31,6 @@ define(['require',
initialize
:
function
()
{
initialize
:
function
()
{
this
.
modelName
=
'VSchema'
;
this
.
modelName
=
'VSchema'
;
this
.
modelAttrName
=
'results'
;
this
.
modelAttrName
=
'results'
;
this
.
bindErrorEvents
();
},
},
parseRecords
:
function
(
resp
,
options
)
{
parseRecords
:
function
(
resp
,
options
)
{
try
{
try
{
...
...
dashboardv2/public/js/collection/VSearchList.js
View file @
6679c8ee
...
@@ -33,7 +33,6 @@ define(['require',
...
@@ -33,7 +33,6 @@ define(['require',
initialize
:
function
()
{
initialize
:
function
()
{
this
.
modelName
=
'VSearch'
;
this
.
modelName
=
'VSearch'
;
this
.
modelAttrName
=
'results'
;
this
.
modelAttrName
=
'results'
;
this
.
bindErrorEvents
();
},
},
parseRecords
:
function
(
resp
,
options
)
{
parseRecords
:
function
(
resp
,
options
)
{
this
.
responseData
=
{
this
.
responseData
=
{
...
...
dashboardv2/public/js/collection/VTagList.js
View file @
6679c8ee
...
@@ -31,7 +31,6 @@ define(['require',
...
@@ -31,7 +31,6 @@ define(['require',
initialize
:
function
()
{
initialize
:
function
()
{
this
.
modelName
=
'VTag'
;
this
.
modelName
=
'VTag'
;
this
.
modelAttrName
=
'list'
;
this
.
modelAttrName
=
'list'
;
this
.
bindErrorEvents
();
},
},
parseRecords
:
function
(
resp
,
options
)
{
parseRecords
:
function
(
resp
,
options
)
{
try
{
try
{
...
...
dashboardv2/public/js/models/BaseModel.js
View file @
6679c8ee
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
* limitations under the License.
* limitations under the License.
*/
*/
define
([
'require'
,
'utils/Utils'
,
'backbone'
,
'utils/CommonViewFunction'
],
function
(
require
,
Utils
,
Backbone
,
CommonViewFunction
)
{
define
([
'require'
,
'utils/Utils'
,
'backbone'
,
'utils/CommonViewFunction'
],
function
(
require
,
Utils
,
Backbone
,
CommonViewFunction
)
{
'use strict'
;
'use strict'
;
var
BaseModel
=
Backbone
.
Model
.
extend
(
var
BaseModel
=
Backbone
.
Model
.
extend
(
...
@@ -27,12 +27,7 @@ define(['require', 'utils/Utils', 'backbone','utils/CommonViewFunction'], functi
...
@@ -27,12 +27,7 @@ define(['require', 'utils/Utils', 'backbone','utils/CommonViewFunction'], functi
* @augments Backbone.Model
* @augments Backbone.Model
* @constructs
* @constructs
*/
*/
initialize
:
function
()
{
initialize
:
function
()
{},
},
bindErrorEvents
:
function
()
{
this
.
bind
(
"error"
,
Utils
.
defaultErrorHandler
);
},
/**
/**
* toString for a model. Every model should implement this function.
* toString for a model. Every model should implement this function.
*/
*/
...
@@ -60,7 +55,8 @@ define(['require', 'utils/Utils', 'backbone','utils/CommonViewFunction'], functi
...
@@ -60,7 +55,8 @@ define(['require', 'utils/Utils', 'backbone','utils/CommonViewFunction'], functi
* @return {[type]} [description]
* @return {[type]} [description]
*/
*/
nonCrudOperation
:
function
(
url
,
requestMethod
,
options
)
{
nonCrudOperation
:
function
(
url
,
requestMethod
,
options
)
{
options
[
'beforeSend'
]
=
CommonViewFunction
.
addRestCsrfCustomHeader
;
var
that
=
this
;
options
[
'beforeSend'
]
=
CommonViewFunction
.
addRestCsrfCustomHeader
;
return
Backbone
.
sync
.
call
(
this
,
null
,
this
,
_
.
extend
({
return
Backbone
.
sync
.
call
(
this
,
null
,
this
,
_
.
extend
({
url
:
url
,
url
:
url
,
type
:
requestMethod
type
:
requestMethod
...
...
dashboardv2/public/js/models/VCatalog.js
View file @
6679c8ee
...
@@ -33,7 +33,6 @@ define(['require',
...
@@ -33,7 +33,6 @@ define(['require',
initialize
:
function
()
{
initialize
:
function
()
{
this
.
modelName
=
'VCatalog'
;
this
.
modelName
=
'VCatalog'
;
this
.
bindErrorEvents
();
},
},
toString
:
function
()
{
toString
:
function
()
{
return
this
.
get
(
'name'
);
return
this
.
get
(
'name'
);
...
...
dashboardv2/public/js/models/VCommon.js
View file @
6679c8ee
...
@@ -33,7 +33,6 @@ define(['require',
...
@@ -33,7 +33,6 @@ define(['require',
initialize
:
function
()
{
initialize
:
function
()
{
this
.
modelName
=
'VCommon'
;
this
.
modelName
=
'VCommon'
;
this
.
bindErrorEvents
();
},
},
toString
:
function
()
{
toString
:
function
()
{
return
this
.
get
(
'name'
);
return
this
.
get
(
'name'
);
...
...
dashboardv2/public/js/models/VEntity.js
View file @
6679c8ee
...
@@ -34,7 +34,6 @@ define(['require',
...
@@ -34,7 +34,6 @@ define(['require',
initialize
:
function
()
{
initialize
:
function
()
{
this
.
modelName
=
'VEntity'
;
this
.
modelName
=
'VEntity'
;
this
.
bindErrorEvents
();
},
},
toString
:
function
()
{
toString
:
function
()
{
return
this
.
get
(
'name'
);
return
this
.
get
(
'name'
);
...
...
dashboardv2/public/js/models/VLineage.js
View file @
6679c8ee
...
@@ -34,7 +34,6 @@ define(['require',
...
@@ -34,7 +34,6 @@ define(['require',
initialize
:
function
()
{
initialize
:
function
()
{
this
.
modelName
=
'VLineage'
;
this
.
modelName
=
'VLineage'
;
this
.
bindErrorEvents
();
},
},
toString
:
function
()
{
toString
:
function
()
{
return
this
.
get
(
'id'
);
return
this
.
get
(
'id'
);
...
...
dashboardv2/public/js/models/VSchema.js
View file @
6679c8ee
...
@@ -33,7 +33,6 @@ define(['require',
...
@@ -33,7 +33,6 @@ define(['require',
initialize
:
function
()
{
initialize
:
function
()
{
this
.
modelName
=
'VSchema'
;
this
.
modelName
=
'VSchema'
;
this
.
bindErrorEvents
();
},
},
toString
:
function
()
{
toString
:
function
()
{
return
this
.
get
(
'id'
);
return
this
.
get
(
'id'
);
...
...
dashboardv2/public/js/models/VSearch.js
View file @
6679c8ee
...
@@ -33,7 +33,6 @@ define(['require',
...
@@ -33,7 +33,6 @@ define(['require',
initialize
:
function
()
{
initialize
:
function
()
{
this
.
modelName
=
'VSearch'
;
this
.
modelName
=
'VSearch'
;
this
.
bindErrorEvents
();
},
},
toString
:
function
()
{
toString
:
function
()
{
return
this
.
get
(
'name'
);
return
this
.
get
(
'name'
);
...
...
dashboardv2/public/js/models/VTag.js
View file @
6679c8ee
...
@@ -33,7 +33,6 @@ define(['require',
...
@@ -33,7 +33,6 @@ define(['require',
initialize
:
function
()
{
initialize
:
function
()
{
this
.
modelName
=
'VTag'
;
this
.
modelName
=
'VTag'
;
this
.
bindErrorEvents
();
},
},
toString
:
function
()
{
toString
:
function
()
{
return
this
.
get
(
'name'
);
return
this
.
get
(
'name'
);
...
...
dashboardv2/public/js/utils/CommonViewFunction.js
View file @
6679c8ee
...
@@ -37,6 +37,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
...
@@ -37,6 +37,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
var
tagModel
=
new
VTag
();
var
tagModel
=
new
VTag
();
if
(
options
&&
options
.
guid
&&
options
.
tagName
)
{
if
(
options
&&
options
.
guid
&&
options
.
tagName
)
{
tagModel
.
deleteTag
(
options
.
guid
,
options
.
tagName
,
{
tagModel
.
deleteTag
(
options
.
guid
,
options
.
tagName
,
{
skipDefaultError
:
true
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
var
msg
=
"Tag "
+
name
.
name
+
Messages
.
removeSuccessMessage
;
var
msg
=
"Tag "
+
name
.
name
+
Messages
.
removeSuccessMessage
;
if
(
options
.
tagOrTerm
===
"term"
)
{
if
(
options
.
tagOrTerm
===
"term"
)
{
...
@@ -55,16 +56,15 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
...
@@ -55,16 +56,15 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
}
}
},
},
error
:
function
(
error
,
data
,
status
)
{
cust_error
:
function
(
model
,
response
)
{
var
message
=
options
.
tagName
+
Messages
.
deleteErrorMessage
;
var
message
=
options
.
tagName
+
Messages
.
deleteErrorMessage
;
if
(
data
.
error
)
{
if
(
response
&&
response
.
responseJSON
)
{
message
=
data
.
error
;
message
=
response
.
responseJSON
.
errorMessage
;
}
}
Utils
.
notifyError
({
Utils
.
notifyError
({
content
:
message
content
:
message
});
});
},
}
complete
:
function
()
{}
});
});
}
}
});
});
...
@@ -106,7 +106,6 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
...
@@ -106,7 +106,6 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
scope
.
$
(
'td div[data-id="'
+
id
+
'"]'
).
append
(
deleteButton
);
scope
.
$
(
'td div[data-id="'
+
id
+
'"]'
).
append
(
deleteButton
);
}
}
},
},
error
:
function
(
error
,
data
,
status
)
{},
complete
:
function
()
{
complete
:
function
()
{
if
(
searchTable
)
{
if
(
searchTable
)
{
--
scope
.
fetchList
;
--
scope
.
fetchList
;
...
@@ -377,14 +376,6 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
...
@@ -377,14 +376,6 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
options
.
collection
.
fetch
({
reset
:
true
});
options
.
collection
.
fetch
({
reset
:
true
});
}
}
},
},
error
:
function
(
error
,
data
,
status
)
{
if
(
data
&&
data
.
responseText
)
{
var
data
=
JSON
.
parse
(
data
.
responseText
);
Utils
.
notifyError
({
content
:
data
.
message
||
data
.
msgDesc
});
}
},
complete
:
function
()
{
complete
:
function
()
{
--
that
.
asyncFetchCounter
--
that
.
asyncFetchCounter
if
(
that
.
callback
&&
that
.
asyncFetchCounter
===
0
)
{
if
(
that
.
callback
&&
that
.
asyncFetchCounter
===
0
)
{
...
...
dashboardv2/public/js/utils/Messages.js
View file @
6679c8ee
...
@@ -20,6 +20,7 @@ define(['require'], function(require) {
...
@@ -20,6 +20,7 @@ define(['require'], function(require) {
'use strict'
;
'use strict'
;
var
Messages
=
{
var
Messages
=
{
defaultErrorMessage
:
"Something went wrong"
,
addSuccessMessage
:
" has been created successfully"
,
addSuccessMessage
:
" has been created successfully"
,
addErrorMessage
:
" could not be Created"
,
addErrorMessage
:
" could not be Created"
,
addTermToEntitySuccessMessage
:
" has been added to entity"
,
addTermToEntitySuccessMessage
:
" has been added to entity"
,
...
@@ -34,7 +35,7 @@ define(['require'], function(require) {
...
@@ -34,7 +35,7 @@ define(['require'], function(require) {
updateTagDescriptionMessage
:
"Tag description is updated successfully"
,
updateTagDescriptionMessage
:
"Tag description is updated successfully"
,
updateTermDescriptionMessage
:
"Term description is updated successfully"
,
updateTermDescriptionMessage
:
"Term description is updated successfully"
,
editSuccessMessage
:
" has been updated successfully"
,
editSuccessMessage
:
" has been updated successfully"
,
assignDeletedEntity
:
" entity is deleted,
Tag cannot be assign
"
assignDeletedEntity
:
" entity is deleted,
tag cannot be assigned
"
};
};
return
Messages
;
return
Messages
;
});
});
dashboardv2/public/js/utils/Overrides.js
View file @
6679c8ee
...
@@ -16,13 +16,31 @@
...
@@ -16,13 +16,31 @@
* limitations under the License.
* limitations under the License.
*/
*/
define
([
'require'
,
'
marionette'
,
'backgrid'
,
'asBreadcrumbs'
,
'jquery-placeholder'
],
function
(
require
)
{
define
([
'require'
,
'
utils/Utils'
,
'marionette'
,
'backgrid'
,
'asBreadcrumbs'
,
'jquery-placeholder'
],
function
(
require
,
Utils
)
{
'use strict'
;
'use strict'
;
Backbone
.
$
.
ajaxSetup
({
Backbone
.
$
.
ajaxSetup
({
cache
:
false
cache
:
false
});
});
var
oldBackboneSync
=
Backbone
.
sync
;
Backbone
.
sync
=
function
(
method
,
model
,
options
)
{
var
that
=
this
;
return
oldBackboneSync
.
apply
(
this
,
[
method
,
model
,
_
.
extend
(
options
,
{
error
:
function
(
response
)
{
if
(
!
options
.
skipDefaultError
)
{
Utils
.
defaultErrorHandler
(
that
,
response
);
}
that
.
trigger
(
"error"
,
that
,
response
);
if
(
options
.
cust_error
)
{
options
.
cust_error
(
that
,
response
);
}
}
})
]);
}
// For placeholder support
// For placeholder support
if
(
!
(
'placeholder'
in
HTMLInputElement
.
prototype
))
{
if
(
!
(
'placeholder'
in
HTMLInputElement
.
prototype
))
{
var
originalRender
=
Backbone
.
Marionette
.
LayoutView
.
prototype
.
render
;
var
originalRender
=
Backbone
.
Marionette
.
LayoutView
.
prototype
.
render
;
...
...
dashboardv2/public/js/utils/Utils.js
View file @
6679c8ee
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
* limitations under the License.
* limitations under the License.
*/
*/
define
([
'require'
,
'utils/Globals'
,
'pnotify'
],
function
(
require
,
Globals
,
pnotify
)
{
define
([
'require'
,
'utils/Globals'
,
'pnotify'
,
'utils/Messages'
],
function
(
require
,
Globals
,
pnotify
,
Messages
)
{
'use strict'
;
'use strict'
;
var
Utils
=
{};
var
Utils
=
{};
...
@@ -79,43 +79,47 @@ define(['require', 'utils/Globals', 'pnotify'], function(require, Globals, pnoti
...
@@ -79,43 +79,47 @@ define(['require', 'utils/Globals', 'pnotify'], function(require, Globals, pnoti
});
});
};
};
Utils
.
defaultErrorHandler
=
function
(
model
,
error
)
{
Utils
.
defaultErrorHandler
=
function
(
model
,
error
)
{
if
(
error
.
status
==
401
)
{
if
(
error
&&
error
.
status
)
{
if
(
error
.
statusText
)
{
if
(
error
.
status
==
401
)
{
var
redirectURL
;
window
.
location
=
'login.jsp'
try
{
}
else
if
(
error
.
status
==
419
)
{
redirectURL
=
JSON
.
parse
(
error
.
statusText
).
knoxssoredirectURL
;
window
.
location
=
'login.jsp'
}
catch
(
err
){
}
else
if
(
error
.
status
==
403
)
{
}
var
message
=
"You are not authorized"
;
if
(
redirectURL
!=
undefined
&&
redirectURL
!=
''
){
if
(
error
.
statusText
)
{
window
.
location
.
replace
(
decodeURIComponent
(
redirectURL
));
message
=
JSON
.
parse
(
error
.
statusText
).
AuthorizationError
;
}
else
{
}
window
.
location
=
'login.jsp'
;
Utils
.
notifyError
({
}
content
:
message
});
}
else
if
(
error
.
status
==
"0"
&&
error
.
statusText
!=
"abort"
)
{
var
diffTime
=
(
new
Date
().
getTime
()
-
prevNetworkErrorTime
);
if
(
diffTime
>
3000
)
{
prevNetworkErrorTime
=
new
Date
().
getTime
();
Utils
.
notifyError
({
content
:
"Network Connection Failure : "
+
"It seems you are not connected to the internet. Please check your internet connection and try again"
});
}
}
else
{
}
else
{
window
.
location
=
'login.jsp'
;
Utils
.
serverErrorHandler
(
model
,
error
)
}
}
else
if
(
error
.
status
==
419
)
{
window
.
location
=
'login.jsp'
}
else
if
(
error
.
status
==
403
)
{
var
message
=
"You are not authorized"
;
if
(
error
.
statusText
)
{
message
=
JSON
.
parse
(
error
.
statusText
).
AuthorizationError
;
}
}
}
else
{
Utils
.
serverErrorHandler
(
model
,
error
)
}
};
Utils
.
serverErrorHandler
=
function
(
model
,
response
)
{
var
responseJSON
=
response
?
response
.
responseJSON
:
response
;
if
(
response
&&
responseJSON
&&
(
responseJSON
.
errorMessage
||
responseJSON
.
message
||
responseJSON
.
error
))
{
Utils
.
notifyError
({
Utils
.
notifyError
({
content
:
message
content
:
responseJSON
.
errorMessage
||
responseJSON
.
message
||
responseJSON
.
error
});
}
else
{
Utils
.
notifyError
({
content
:
Messages
.
defaultErrorMessage
});
});
}
else
if
(
error
.
status
==
"0"
&&
error
.
statusText
!=
"abort"
)
{
var
diffTime
=
(
new
Date
().
getTime
()
-
prevNetworkErrorTime
);
if
(
diffTime
>
3000
)
{
prevNetworkErrorTime
=
new
Date
().
getTime
();
Utils
.
notifyError
({
content
:
"Network Connection Failure : "
+
"It seems you are not connected to the internet. Please check your internet connection and try again"
});
}
}
}
};
};
Utils
.
localStorage
=
{
Utils
.
localStorage
=
{
checkLocalStorage
:
function
(
key
,
value
)
{
checkLocalStorage
:
function
(
key
,
value
)
{
if
(
typeof
(
Storage
)
!==
"undefined"
)
{
if
(
typeof
(
Storage
)
!==
"undefined"
)
{
...
...
dashboardv2/public/js/views/business_catalog/BusinessCatalogDetailLayoutView.js
View file @
6679c8ee
...
@@ -158,14 +158,6 @@ define(['require',
...
@@ -158,14 +158,6 @@ define(['require',
Utils
.
notifySuccess
({
Utils
.
notifySuccess
({
content
:
message
content
:
message
});
});
},
error
:
function
(
model
,
response
)
{
if
(
response
.
responseJSON
&&
response
.
responseJSON
.
error
)
{
that
.
collection
.
fetch
({
reset
:
true
});
Utils
.
notifyError
({
content
:
response
.
responseJSON
.
error
});
}
}
}
});
});
}
}
...
...
dashboardv2/public/js/views/business_catalog/TreeLayoutView.js
View file @
6679c8ee
...
@@ -119,19 +119,9 @@ define(['require',
...
@@ -119,19 +119,9 @@ define(['require',
this
.
termSearchData
();
this
.
termSearchData
();
},
this
);
},
this
);
this
.
listenTo
(
this
.
childCollection
,
'error'
,
function
(
model
,
response
)
{
this
.
listenTo
(
this
.
childCollection
,
'error'
,
function
(
model
,
response
)
{
if
(
response
&&
response
.
responseJSON
&&
response
.
responseJSON
.
message
)
{
Utils
.
notifyError
({
content
:
response
.
responseJSON
.
message
});
}
this
.
hideLoader
();
this
.
hideLoader
();
},
this
);
},
this
);
this
.
listenTo
(
this
.
parentCollection
,
'error'
,
function
(
model
,
response
)
{
this
.
listenTo
(
this
.
parentCollection
,
'error'
,
function
(
model
,
response
)
{
if
(
response
&&
response
.
responseJSON
&&
response
.
responseJSON
.
message
)
{
Utils
.
notifyError
({
content
:
response
.
responseJSON
.
message
});
}
this
.
hideLoader
();
this
.
hideLoader
();
},
this
);
},
this
);
},
},
...
@@ -515,11 +505,6 @@ define(['require',
...
@@ -515,11 +505,6 @@ define(['require',
content
:
"Term "
+
view
.
ui
.
termName
.
val
()
+
Messages
.
addSuccessMessage
content
:
"Term "
+
view
.
ui
.
termName
.
val
()
+
Messages
.
addSuccessMessage
});
});
},
},
error
:
function
(
model
,
response
)
{
Utils
.
notifyError
({
content
:
"Term "
+
view
.
ui
.
termName
.
val
()
+
Messages
.
addErrorMessage
});
},
complete
:
function
()
{
complete
:
function
()
{
that
.
hideLoader
();
that
.
hideLoader
();
}
}
...
@@ -550,6 +535,7 @@ define(['require',
...
@@ -550,6 +535,7 @@ define(['require',
url
=
that
.
$
(
'.taxonomyTree'
).
find
(
'li.active a'
).
data
(
'href'
);
url
=
that
.
$
(
'.taxonomyTree'
).
find
(
'li.active a'
).
data
(
'href'
);
var
termName
=
that
.
$
(
'.taxonomyTree'
).
find
(
'li.active a'
).
text
();
var
termName
=
that
.
$
(
'.taxonomyTree'
).
find
(
'li.active a'
).
text
();
termModel
.
deleteTerm
(
url
,
{
termModel
.
deleteTerm
(
url
,
{
skipDefaultError
:
true
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
Utils
.
notifySuccess
({
Utils
.
notifySuccess
({
content
:
"Term "
+
termName
+
Messages
.
deleteSuccessMessage
content
:
"Term "
+
termName
+
Messages
.
deleteSuccessMessage
...
@@ -567,10 +553,10 @@ define(['require',
...
@@ -567,10 +553,10 @@ define(['require',
}
}
that
.
fetchCollection
(
termURL
,
true
);
that
.
fetchCollection
(
termURL
,
true
);
},
},
error
:
function
(
error
,
data
,
status
)
{
cust_error
:
function
(
model
,
response
)
{
var
message
=
"Term "
+
termName
+
Messages
.
deleteErrorMessage
;
var
message
=
"Term "
+
termName
+
Messages
.
deleteErrorMessage
;
if
(
data
.
error
)
{
if
(
response
&&
response
.
responseJSON
)
{
message
=
data
.
error
;
message
=
response
.
responseJSON
.
errorMessage
;
}
}
Utils
.
notifyError
({
Utils
.
notifyError
({
content
:
message
content
:
message
...
@@ -652,13 +638,14 @@ define(['require',
...
@@ -652,13 +638,14 @@ define(['require',
view
.
model
.
url
=
url
+
"/"
+
view
.
ui
.
termName
.
val
();
view
.
model
.
url
=
url
+
"/"
+
view
.
ui
.
termName
.
val
();
this
.
showLoader
();
this
.
showLoader
();
view
.
model
.
set
({
description
:
view
.
ui
.
termDetail
.
val
()
}).
save
(
null
,
{
view
.
model
.
set
({
description
:
view
.
ui
.
termDetail
.
val
()
}).
save
(
null
,
{
skipDefaultError
:
true
,
success
:
function
(
model
,
response
)
{
success
:
function
(
model
,
response
)
{
that
.
fetchCollection
(
view
.
model
.
url
,
true
);
that
.
fetchCollection
(
view
.
model
.
url
,
true
);
Utils
.
notifySuccess
({
Utils
.
notifySuccess
({
content
:
"Default taxonomy "
+
view
.
ui
.
termName
.
val
()
+
Messages
.
addSuccessMessage
content
:
"Default taxonomy "
+
view
.
ui
.
termName
.
val
()
+
Messages
.
addSuccessMessage
});
});
},
},
error
:
function
(
error
,
data
,
status
)
{
cust_error
:
function
(
model
,
response
)
{
Utils
.
notifyError
({
Utils
.
notifyError
({
content
:
"Default taxonomy "
+
view
.
ui
.
termName
.
val
()
+
Messages
.
addErrorMessage
content
:
"Default taxonomy "
+
view
.
ui
.
termName
.
val
()
+
Messages
.
addErrorMessage
});
});
...
...
dashboardv2/public/js/views/common/aboutAtlas.js
View file @
6679c8ee
...
@@ -56,7 +56,6 @@ define(['require',
...
@@ -56,7 +56,6 @@ define(['require',
var
str
=
"<b>Version : </b>"
+
data
.
Version
;
var
str
=
"<b>Version : </b>"
+
data
.
Version
;
that
.
ui
.
atlasVersion
.
html
(
str
);
that
.
ui
.
atlasVersion
.
html
(
str
);
},
},
error
:
function
(
error
,
data
,
status
)
{},
complete
:
function
()
{}
complete
:
function
()
{}
});
});
},
},
...
...
dashboardv2/public/js/views/entity/CreateEntityLayoutView.js
View file @
6679c8ee
...
@@ -516,13 +516,6 @@ define(['require',
...
@@ -516,13 +516,6 @@ define(['require',
content
:
"entity "
+
Messages
[
that
.
guid
?
'editSuccessMessage'
:
'addSuccessMessage'
]
content
:
"entity "
+
Messages
[
that
.
guid
?
'editSuccessMessage'
:
'addSuccessMessage'
]
});
});
},
},
error
:
function
(
response
)
{
if
(
response
.
responseJSON
)
{
Utils
.
notifyError
({
content
:
response
.
responseJSON
.
error
||
response
.
responseJSON
.
errorMessage
});
}
},
complete
:
function
()
{
complete
:
function
()
{
that
.
hideLoader
();
that
.
hideLoader
();
}
}
...
...
dashboardv2/public/js/views/graph/LineageLayoutView.js
View file @
6679c8ee
...
@@ -92,6 +92,7 @@ define(['require',
...
@@ -92,6 +92,7 @@ define(['require',
var
that
=
this
;
var
that
=
this
;
this
.
fromToObj
=
{};
this
.
fromToObj
=
{};
this
.
collection
.
getLineage
(
this
.
guid
,
{
this
.
collection
.
getLineage
(
this
.
guid
,
{
skipDefaultError
:
true
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
relations
.
length
)
{
if
(
data
.
relations
.
length
)
{
that
.
generateData
(
data
.
relations
,
data
.
guidEntityMap
);
that
.
generateData
(
data
.
relations
,
data
.
guidEntityMap
);
...
@@ -99,7 +100,7 @@ define(['require',
...
@@ -99,7 +100,7 @@ define(['require',
that
.
noLineage
();
that
.
noLineage
();
}
}
},
},
error
:
function
(
error
,
data
,
status
)
{
cust_error
:
function
(
model
,
response
)
{
that
.
noLineage
();
that
.
noLineage
();
},
},
complete
:
function
()
{}
complete
:
function
()
{}
...
...
dashboardv2/public/js/views/search/SearchResultLayoutView.js
View file @
6679c8ee
...
@@ -362,7 +362,6 @@ define(['require',
...
@@ -362,7 +362,6 @@ define(['require',
}
}
}
}
},
},
error
:
function
(
error
,
data
,
status
)
{},
complete
:
function
()
{
complete
:
function
()
{
--
that
.
asyncFetchCounter
;
--
that
.
asyncFetchCounter
;
if
(
that
.
asyncFetchCounter
===
0
)
{
if
(
that
.
asyncFetchCounter
===
0
)
{
...
...
dashboardv2/public/js/views/tag/CreateTagLayoutView.js
View file @
6679c8ee
...
@@ -101,7 +101,6 @@ define(['require',
...
@@ -101,7 +101,6 @@ define(['require',
str
+=
'<option>'
+
_
.
escape
(
val
.
get
(
"name"
))
+
'</option>'
;
str
+=
'<option>'
+
_
.
escape
(
val
.
get
(
"name"
))
+
'</option>'
;
});
});
that
.
ui
.
parentTag
.
html
(
str
);
that
.
ui
.
parentTag
.
html
(
str
);
console
.
log
(
platform
);
// IE9 support
// IE9 support
if
(
platform
.
name
===
"IE"
)
{
if
(
platform
.
name
===
"IE"
)
{
that
.
ui
.
parentTag
.
select2
({
that
.
ui
.
parentTag
.
select2
({
...
...
dashboardv2/public/js/views/tag/TagAttributeDetailLayoutView.js
View file @
6679c8ee
...
@@ -147,13 +147,6 @@ define(['require',
...
@@ -147,13 +147,6 @@ define(['require',
content
:
message
content
:
message
});
});
that
.
modal
.
close
();
that
.
modal
.
close
();
},
error
:
function
(
model
,
response
)
{
if
(
response
.
responseJSON
&&
response
.
responseJSON
.
error
)
{
Utils
.
notifyError
({
content
:
response
.
responseJSON
.
error
});
}
}
}
});
});
},
},
...
...
dashboardv2/public/js/views/tag/TagLayoutView.js
View file @
6679c8ee
...
@@ -251,13 +251,6 @@ define(['require',
...
@@ -251,13 +251,6 @@ define(['require',
content
:
"Tag "
+
that
.
name
+
Messages
.
addSuccessMessage
content
:
"Tag "
+
that
.
name
+
Messages
.
addSuccessMessage
});
});
modal
.
trigger
(
'cancel'
);
modal
.
trigger
(
'cancel'
);
},
error
:
function
(
model
,
response
)
{
if
(
response
.
responseJSON
&&
response
.
responseJSON
.
error
)
{
Utils
.
notifyError
({
content
:
response
.
responseJSON
.
error
});
}
}
}
});
});
},
},
...
...
dashboardv2/public/js/views/tag/addTagModalView.js
View file @
6679c8ee
...
@@ -207,6 +207,7 @@ define(['require',
...
@@ -207,6 +207,7 @@ define(['require',
"attributes"
:
tagAttributes
"attributes"
:
tagAttributes
}];
}];
this
.
entityModel
.
saveEntity
(
options
.
guid
,
{
this
.
entityModel
.
saveEntity
(
options
.
guid
,
{
skipDefaultError
:
true
,
data
:
JSON
.
stringify
(
json
),
data
:
JSON
.
stringify
(
json
),
success
:
function
(
data
)
{
success
:
function
(
data
)
{
Utils
.
notifySuccess
({
Utils
.
notifySuccess
({
...
@@ -216,11 +217,10 @@ define(['require',
...
@@ -216,11 +217,10 @@ define(['require',
options
.
modalCollection
.
fetch
({
reset
:
true
});
options
.
modalCollection
.
fetch
({
reset
:
true
});
}
}
},
},
error
:
function
(
error
,
data
,
status
)
{
cust_error
:
function
(
model
,
response
)
{
var
message
=
"Tag "
+
tagName
+
" could not be added"
;
var
message
=
"Tag "
+
tagName
+
" could not be added"
;
if
(
error
&&
error
.
responseText
)
{
if
(
response
&&
response
.
responseJSON
)
{
var
data
=
JSON
.
parse
(
error
.
responseText
);
message
=
response
.
responseJSON
.
errorMessage
;
message
=
data
.
error
;
}
}
Utils
.
notifyError
({
Utils
.
notifyError
({
content
:
message
content
:
message
...
...
release-log.txt
View file @
6679c8ee
...
@@ -9,6 +9,8 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al
...
@@ -9,6 +9,8 @@ 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-1486 UI updates to handle errors from V2 APIs (Kalyanikashikar via mneethiraj)
ATLAS-1436 Metrics collection using gremlin (apoorvnaik via mneethiraj)
ATLAS-1489 Show create/edit entity button based on role (Kalyanikashikar via kevalbhatt)
ATLAS-1489 Show create/edit entity button based on role (Kalyanikashikar via kevalbhatt)
ATLAS-1478 REST API to add classification to multiple entities (svimal2106 via mneethiraj)
ATLAS-1478 REST API to add classification to multiple entities (svimal2106 via mneethiraj)
ATLAS-1490 added methods to get sub-types of entity and classification types (mneethiraj)
ATLAS-1490 added methods to get sub-types of entity and classification types (mneethiraj)
...
...
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