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
b0c85dd9
Commit
b0c85dd9
authored
Feb 20, 2020
by
kevalbhatt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3629 : UI: skipDefaultError handler improvement
parent
cd177f83
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
86 additions
and
151 deletions
+86
-151
main.js
dashboardv2/public/js/main.js
+0
-5
CommonViewFunction.js
dashboardv2/public/js/utils/CommonViewFunction.js
+1
-8
Overrides.js
dashboardv2/public/js/utils/Overrides.js
+1
-3
Utils.js
dashboardv2/public/js/utils/Utils.js
+21
-22
LineageLayoutView.js
dashboardv2/public/js/views/graph/LineageLayoutView.js
+0
-1
ProfileColumnLayoutView.js
...oardv2/public/js/views/profile/ProfileColumnLayoutView.js
+0
-1
ProfileTableLayoutView.js
...boardv2/public/js/views/profile/ProfileTableLayoutView.js
+0
-1
SearchLayoutView.js
dashboardv2/public/js/views/search/SearchLayoutView.js
+0
-2
Statistics.js
dashboardv2/public/js/views/site/Statistics.js
+0
-1
AddTagModalView.js
dashboardv2/public/js/views/tag/AddTagModalView.js
+1
-8
main.js
dashboardv3/public/js/main.js
+0
-6
CommonViewFunction.js
dashboardv3/public/js/utils/CommonViewFunction.js
+1
-8
Overrides.js
dashboardv3/public/js/utils/Overrides.js
+1
-3
Utils.js
dashboardv3/public/js/utils/Utils.js
+21
-22
PurgeAuditTableLayoutView.js
...ublic/js/views/administrator/PurgeAuditTableLayoutView.js
+0
-1
LineageLayoutView.js
dashboardv3/public/js/views/graph/LineageLayoutView.js
+0
-1
NameSpaceAttrTableLayoutView.js
...ublic/js/views/name_space/NameSpaceAttrTableLayoutView.js
+38
-38
NameSpaceContainerLayoutView.js
...ublic/js/views/name_space/NameSpaceContainerLayoutView.js
+0
-1
ProfileColumnLayoutView.js
...oardv3/public/js/views/profile/ProfileColumnLayoutView.js
+0
-1
ProfileTableLayoutView.js
...boardv3/public/js/views/profile/ProfileTableLayoutView.js
+0
-1
ClassificationTreeLayoutView.js
...blic/js/views/search/tree/ClassificationTreeLayoutView.js
+0
-3
EntityTreeLayoutView.js
...ardv3/public/js/views/search/tree/EntityTreeLayoutView.js
+0
-4
NameSpaceTreeLayoutView.js
...v3/public/js/views/search/tree/NameSpaceTreeLayoutView.js
+0
-1
Statistics.js
dashboardv3/public/js/views/site/Statistics.js
+0
-1
AddTagModalView.js
dashboardv3/public/js/views/tag/AddTagModalView.js
+1
-8
No files found.
dashboardv2/public/js/main.js
View file @
b0c85dd9
...
...
@@ -258,7 +258,6 @@ require(['App',
}
});
this
.
entityDefCollection
.
fetch
({
skipDefaultError
:
true
,
complete
:
function
()
{
that
.
entityDefCollection
.
fullCollection
.
comparator
=
function
(
model
)
{
return
model
.
get
(
'name'
).
toLowerCase
();
...
...
@@ -269,7 +268,6 @@ require(['App',
}
});
this
.
typeHeaders
.
fetch
({
skipDefaultError
:
true
,
complete
:
function
()
{
that
.
typeHeaders
.
fullCollection
.
comparator
=
function
(
model
)
{
return
model
.
get
(
'name'
).
toLowerCase
();
...
...
@@ -280,7 +278,6 @@ require(['App',
}
});
this
.
enumDefCollection
.
fetch
({
skipDefaultError
:
true
,
complete
:
function
()
{
that
.
enumDefCollection
.
fullCollection
.
comparator
=
function
(
model
)
{
return
model
.
get
(
'name'
).
toLowerCase
();
...
...
@@ -291,7 +288,6 @@ require(['App',
}
});
this
.
classificationDefCollection
.
fetch
({
skipDefaultError
:
true
,
complete
:
function
()
{
that
.
classificationDefCollection
.
fullCollection
.
comparator
=
function
(
model
)
{
return
model
.
get
(
'name'
).
toLowerCase
();
...
...
@@ -303,7 +299,6 @@ require(['App',
});
this
.
metricCollection
.
fetch
({
skipDefaultError
:
true
,
complete
:
function
()
{
--
that
.
asyncFetchCounter
;
startApp
();
...
...
dashboardv2/public/js/utils/CommonViewFunction.js
View file @
b0c85dd9
...
...
@@ -34,7 +34,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
options
.
showLoader
();
}
tagModel
.
deleteAssociation
(
options
.
guid
,
options
.
tagName
,
options
.
associatedGuid
,
{
skipDefaultError
:
tru
e
,
defaultErrorMessage
:
options
.
tagName
+
Messages
.
deleteErrorMessag
e
,
success
:
function
(
data
)
{
Utils
.
notifySuccess
({
content
:
"Classification "
+
options
.
tagName
+
Messages
.
getAbbreviationMsg
(
false
,
'removeSuccessMessage'
)
...
...
@@ -48,16 +48,9 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
},
cust_error
:
function
(
model
,
response
)
{
var
message
=
options
.
tagName
+
Messages
.
deleteErrorMessage
;
if
(
response
&&
response
.
responseJSON
)
{
message
=
response
.
responseJSON
.
errorMessage
;
}
if
(
options
.
hideLoader
)
{
options
.
hideLoader
();
}
Utils
.
notifyError
({
content
:
message
});
}
});
},
...
...
dashboardv2/public/js/utils/Overrides.js
View file @
b0c85dd9
...
...
@@ -37,9 +37,7 @@ define(['require', 'utils/Utils', 'marionette', 'backgrid', 'asBreadcrumbs', 'jq
return
oldBackboneSync
.
apply
(
this
,
[
method
,
model
,
_
.
extend
(
options
,
{
error
:
function
(
response
)
{
if
(
!
options
.
skipDefaultError
)
{
Utils
.
defaultErrorHandler
(
that
,
response
);
}
Utils
.
defaultErrorHandler
(
that
,
response
,
options
);
that
.
trigger
(
"error"
,
that
,
response
);
if
(
options
.
cust_error
)
{
options
.
cust_error
(
that
,
response
);
...
...
dashboardv2/public/js/utils/Utils.js
View file @
b0c85dd9
...
...
@@ -218,22 +218,20 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums',
}
});
}
Utils
.
defaultErrorHandler
=
function
(
model
,
error
)
{
Utils
.
defaultErrorHandler
=
function
(
model
,
error
,
options
)
{
var
skipDefaultError
=
null
,
defaultErrorMessage
=
null
;
if
(
options
)
{
skipDefaultError
=
options
.
skipDefaultError
;
defaultErrorMessage
=
options
.
defaultErrorMessage
;
}
if
(
error
&&
error
.
status
)
{
if
(
error
.
status
==
401
)
{
window
.
location
=
'login.jsp'
}
else
if
(
error
.
status
==
419
)
{
window
.
location
=
'login.jsp'
}
else
if
(
error
.
status
==
403
)
{
var
message
=
"You are not authorized"
;
if
(
error
.
statusText
)
{
try
{
message
=
JSON
.
parse
(
error
.
statusText
).
AuthorizationError
;
}
catch
(
err
)
{}
Utils
.
notifyError
({
content
:
message
});
}
Utils
.
serverErrorHandler
(
error
,
"You are not authorized"
);
}
else
if
(
error
.
status
==
"0"
&&
error
.
statusText
!=
"abort"
)
{
var
diffTime
=
(
new
Date
().
getTime
()
-
prevNetworkErrorTime
);
if
(
diffTime
>
3000
)
{
...
...
@@ -243,22 +241,23 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums',
"It seems you are not connected to the internet. Please check your internet connection and try again"
});
}
}
else
{
Utils
.
serverErrorHandler
(
model
,
error
)
}
else
if
(
skipDefaultError
!==
true
)
{
Utils
.
serverErrorHandler
(
error
,
defaultErrorMessage
);
}
}
else
{
Utils
.
serverErrorHandler
(
model
,
error
)
}
else
if
(
skipDefaultError
!==
true
)
{
Utils
.
serverErrorHandler
(
error
,
defaultErrorMessage
);
}
};
Utils
.
serverErrorHandler
=
function
(
model
,
response
)
{
var
responseJSON
=
response
?
response
.
responseJSON
:
response
;
if
(
response
&&
responseJSON
&&
(
responseJSON
.
errorMessage
||
responseJSON
.
message
||
responseJSON
.
error
))
{
Utils
.
notifyError
({
content
:
responseJSON
.
errorMessage
||
responseJSON
.
message
||
responseJSON
.
error
});
}
else
{
Utils
.
serverErrorHandler
=
function
(
response
,
defaultErrorMessage
)
{
var
responseJSON
=
response
?
response
.
responseJSON
:
response
,
message
=
defaultErrorMessage
?
defaultErrorMessage
:
Messages
.
defaultErrorMessage
if
(
response
&&
responseJSON
)
{
message
=
responseJSON
.
errorMessage
||
responseJSON
.
message
||
responseJSON
.
error
||
message
}
var
existingError
=
$
(
".ui-pnotify-container.alert-danger .ui-pnotify-text"
).
text
();
if
(
existingError
!==
message
)
{
Utils
.
notifyError
({
content
:
Messages
.
defaultErrorM
essage
content
:
m
essage
});
}
};
...
...
dashboardv2/public/js/views/graph/LineageLayoutView.js
View file @
b0c85dd9
...
...
@@ -225,7 +225,6 @@ define(['require',
"el"
:
that
.
$
(
".graph-button-group button,select[data-id='selectDepth']"
)
});
this
.
collection
.
getLineage
(
this
.
guid
,
{
skipDefaultError
:
true
,
queryParam
:
queryParam
,
success
:
function
(
data
)
{
if
(
that
.
isDestroyed
)
{
...
...
dashboardv2/public/js/views/profile/ProfileColumnLayoutView.js
View file @
b0c85dd9
...
...
@@ -69,7 +69,6 @@ define(['require',
fetchEntity
:
function
(
argument
)
{
var
that
=
this
;
this
.
entityModel
.
getEntity
(
this
.
entityDetail
.
table
.
guid
,
{
skipDefaultError
:
true
,
success
:
function
(
data
)
{
var
entity
=
data
.
entity
,
profileData
=
entity
&&
entity
.
attributes
&&
entity
.
attributes
.
profileData
?
entity
.
attributes
.
profileData
.
attributes
:
null
;
...
...
dashboardv2/public/js/views/profile/ProfileTableLayoutView.js
View file @
b0c85dd9
...
...
@@ -110,7 +110,6 @@ define(['require',
fetchEntity
:
function
(
argument
)
{
var
that
=
this
;
this
.
entityModel
.
getEntity
(
this
.
entityDetail
.
db
.
guid
,
{
skipDefaultError
:
true
,
success
:
function
(
data
)
{
var
entity
=
data
.
entity
;
if
(
entity
.
attributes
)
{
...
...
dashboardv2/public/js/views/search/SearchLayoutView.js
View file @
b0c85dd9
...
...
@@ -381,7 +381,6 @@ define(['require',
}
};
this
.
metricCollection
.
fetch
({
skipDefaultError
:
true
,
complete
:
function
()
{
--
apiCount
;
that
.
entityCountObj
=
_
.
first
(
that
.
metricCollection
.
toJSON
());
...
...
@@ -390,7 +389,6 @@ define(['require',
});
this
.
typeHeaders
.
fetch
({
skipDefaultError
:
true
,
silent
:
true
,
complete
:
function
()
{
--
apiCount
;
...
...
dashboardv2/public/js/views/site/Statistics.js
View file @
b0c85dd9
...
...
@@ -104,7 +104,6 @@ define(['require',
fetchMetricData
:
function
(
options
)
{
var
that
=
this
;
this
.
metricCollection
.
fetch
({
skipDefaultError
:
true
,
success
:
function
(
data
)
{
var
data
=
_
.
first
(
data
.
toJSON
());
that
.
renderStats
({
valueObject
:
data
.
general
.
stats
,
dataObject
:
data
.
general
});
...
...
dashboardv2/public/js/views/tag/AddTagModalView.js
View file @
b0c85dd9
...
...
@@ -439,9 +439,9 @@ define(['require',
this
.
showLoader
();
}
this
.
entityModel
.
saveTraitsEntity
(
this
.
tagModel
?
options
.
guid
:
null
,
{
skipDefaultError
:
true
,
data
:
JSON
.
stringify
(
json
),
type
:
this
.
tagModel
?
'PUT'
:
'POST'
,
defaultErrorMessage
:
"Tag "
+
tagName
+
" could not be added"
,
success
:
function
(
data
)
{
var
addupdatetext
=
that
.
tagModel
?
'updated successfully to '
:
'added to '
;
Utils
.
notifySuccess
({
...
...
@@ -455,13 +455,6 @@ define(['require',
}
},
cust_error
:
function
(
model
,
response
)
{
var
message
=
"Tag "
+
tagName
+
" could not be added"
;
if
(
response
&&
response
.
responseJSON
)
{
message
=
response
.
responseJSON
.
errorMessage
;
}
Utils
.
notifyError
({
content
:
message
});
if
(
that
.
hideLoader
)
{
that
.
hideLoader
();
}
...
...
dashboardv3/public/js/main.js
View file @
b0c85dd9
...
...
@@ -268,7 +268,6 @@ require(['App',
}
});
this
.
entityDefCollection
.
fetch
({
skipDefaultError
:
true
,
complete
:
function
()
{
that
.
entityDefCollection
.
fullCollection
.
comparator
=
function
(
model
)
{
return
model
.
get
(
'name'
).
toLowerCase
();
...
...
@@ -279,7 +278,6 @@ require(['App',
}
});
this
.
typeHeaders
.
fetch
({
skipDefaultError
:
true
,
complete
:
function
()
{
that
.
typeHeaders
.
fullCollection
.
comparator
=
function
(
model
)
{
return
model
.
get
(
'name'
).
toLowerCase
();
...
...
@@ -290,7 +288,6 @@ require(['App',
}
});
this
.
enumDefCollection
.
fetch
({
skipDefaultError
:
true
,
complete
:
function
()
{
that
.
enumDefCollection
.
fullCollection
.
comparator
=
function
(
model
)
{
return
model
.
get
(
'name'
).
toLowerCase
();
...
...
@@ -301,7 +298,6 @@ require(['App',
}
});
this
.
classificationDefCollection
.
fetch
({
skipDefaultError
:
true
,
complete
:
function
()
{
that
.
classificationDefCollection
.
fullCollection
.
comparator
=
function
(
model
)
{
return
model
.
get
(
'name'
).
toLowerCase
();
...
...
@@ -313,7 +309,6 @@ require(['App',
});
this
.
metricCollection
.
fetch
({
skipDefaultError
:
true
,
complete
:
function
()
{
--
that
.
asyncFetchCounter
;
startApp
();
...
...
@@ -321,7 +316,6 @@ require(['App',
});
this
.
nameSpaceCollection
.
fetch
({
skipDefaultError
:
true
,
complete
:
function
()
{
that
.
nameSpaceCollection
.
fullCollection
.
comparator
=
function
(
model
)
{
return
model
.
get
(
'name'
).
toLowerCase
();
...
...
dashboardv3/public/js/utils/CommonViewFunction.js
View file @
b0c85dd9
...
...
@@ -34,7 +34,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
options
.
showLoader
();
}
tagModel
.
deleteAssociation
(
options
.
guid
,
options
.
tagName
,
options
.
associatedGuid
,
{
skipDefaultError
:
tru
e
,
defaultErrorMessage
:
options
.
tagName
+
Messages
.
deleteErrorMessag
e
,
success
:
function
(
data
)
{
Utils
.
notifySuccess
({
content
:
"Classification "
+
options
.
tagName
+
Messages
.
getAbbreviationMsg
(
false
,
'removeSuccessMessage'
)
...
...
@@ -48,16 +48,9 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
},
cust_error
:
function
(
model
,
response
)
{
var
message
=
options
.
tagName
+
Messages
.
deleteErrorMessage
;
if
(
response
&&
response
.
responseJSON
)
{
message
=
response
.
responseJSON
.
errorMessage
;
}
if
(
options
.
hideLoader
)
{
options
.
hideLoader
();
}
Utils
.
notifyError
({
content
:
message
});
}
});
},
...
...
dashboardv3/public/js/utils/Overrides.js
View file @
b0c85dd9
...
...
@@ -37,9 +37,7 @@ define(['require', 'utils/Utils', 'marionette', 'backgrid', 'asBreadcrumbs', 'jq
return
oldBackboneSync
.
apply
(
this
,
[
method
,
model
,
_
.
extend
(
options
,
{
error
:
function
(
response
)
{
if
(
!
options
.
skipDefaultError
)
{
Utils
.
defaultErrorHandler
(
that
,
response
);
}
Utils
.
defaultErrorHandler
(
that
,
response
,
options
);
that
.
trigger
(
"error"
,
that
,
response
);
if
(
options
.
cust_error
)
{
options
.
cust_error
(
that
,
response
);
...
...
dashboardv3/public/js/utils/Utils.js
View file @
b0c85dd9
...
...
@@ -224,22 +224,20 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums',
}
});
}
Utils
.
defaultErrorHandler
=
function
(
model
,
error
)
{
Utils
.
defaultErrorHandler
=
function
(
model
,
error
,
options
)
{
var
skipDefaultError
=
null
,
defaultErrorMessage
=
null
;
if
(
options
)
{
skipDefaultError
=
options
.
skipDefaultError
;
defaultErrorMessage
=
options
.
defaultErrorMessage
;
}
if
(
error
&&
error
.
status
)
{
if
(
error
.
status
==
401
)
{
window
.
location
=
'login.jsp'
}
else
if
(
error
.
status
==
419
)
{
window
.
location
=
'login.jsp'
}
else
if
(
error
.
status
==
403
)
{
var
message
=
"You are not authorized"
;
if
(
error
.
statusText
)
{
try
{
message
=
JSON
.
parse
(
error
.
statusText
).
AuthorizationError
;
}
catch
(
err
)
{}
Utils
.
notifyError
({
content
:
message
});
}
Utils
.
serverErrorHandler
(
error
,
"You are not authorized"
);
}
else
if
(
error
.
status
==
"0"
&&
error
.
statusText
!=
"abort"
)
{
var
diffTime
=
(
new
Date
().
getTime
()
-
prevNetworkErrorTime
);
if
(
diffTime
>
3000
)
{
...
...
@@ -249,22 +247,23 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums',
"It seems you are not connected to the internet. Please check your internet connection and try again"
});
}
}
else
{
Utils
.
serverErrorHandler
(
model
,
error
)
}
else
if
(
skipDefaultError
!==
true
)
{
Utils
.
serverErrorHandler
(
error
,
defaultErrorMessage
);
}
}
else
{
Utils
.
serverErrorHandler
(
model
,
error
)
}
else
if
(
skipDefaultError
!==
true
)
{
Utils
.
serverErrorHandler
(
error
,
defaultErrorMessage
);
}
};
Utils
.
serverErrorHandler
=
function
(
model
,
response
)
{
var
responseJSON
=
response
?
response
.
responseJSON
:
response
;
if
(
response
&&
responseJSON
&&
(
responseJSON
.
errorMessage
||
responseJSON
.
message
||
responseJSON
.
error
))
{
Utils
.
notifyError
({
content
:
responseJSON
.
errorMessage
||
responseJSON
.
message
||
responseJSON
.
error
});
}
else
{
Utils
.
serverErrorHandler
=
function
(
response
,
defaultErrorMessage
)
{
var
responseJSON
=
response
?
response
.
responseJSON
:
response
,
message
=
defaultErrorMessage
?
defaultErrorMessage
:
Messages
.
defaultErrorMessage
if
(
response
&&
responseJSON
)
{
message
=
responseJSON
.
errorMessage
||
responseJSON
.
message
||
responseJSON
.
error
||
message
}
var
existingError
=
$
(
".ui-pnotify-container.alert-danger .ui-pnotify-text"
).
text
();
if
(
existingError
!==
message
)
{
Utils
.
notifyError
({
content
:
Messages
.
defaultErrorM
essage
content
:
m
essage
});
}
};
...
...
dashboardv3/public/js/views/administrator/PurgeAuditTableLayoutView.js
View file @
b0c85dd9
...
...
@@ -310,7 +310,6 @@ define(['require',
}
}
var
apiObj
=
{
skipDefaultError
:
true
,
sort
:
false
,
success
:
function
(
dataOrCollection
,
response
)
{
if
(
!
(
that
.
ui
.
pageRecordText
instanceof
jQuery
))
{
...
...
dashboardv3/public/js/views/graph/LineageLayoutView.js
View file @
b0c85dd9
...
...
@@ -240,7 +240,6 @@ define(['require',
"el"
:
that
.
$
(
".graph-button-group button,select[data-id='selectDepth']"
)
});
this
.
collection
.
getLineage
(
this
.
guid
,
{
skipDefaultError
:
true
,
queryParam
:
queryParam
,
success
:
function
(
data
)
{
if
(
that
.
isDestroyed
)
{
...
...
dashboardv3/public/js/views/name_space/NameSpaceAttrTableLayoutView.js
View file @
b0c85dd9
...
...
@@ -132,7 +132,6 @@ define(['require',
enumDefCollection
.
fetch
({
reset
:
true
});
that
.
nameSpaceAttr
.
fullCollection
.
reset
();
that
.
options
.
selectedNameSpace
.
fetch
({
skipDefaultError
:
true
,
complete
:
function
(
model
,
status
)
{
that
.
nameSpaceAttr
.
fullCollection
.
add
(
model
.
responseJSON
.
attributeDefs
);
}
...
...
@@ -179,40 +178,40 @@ define(['require',
getNamespaceTableColumns
:
function
()
{
var
that
=
this
;
return
this
.
nameSpaceAttr
.
constructor
.
getTableCols
({
name
:
{
label
:
"Attribute Name"
,
cell
:
"html"
,
editable
:
false
,
formatter
:
_
.
extend
({},
Backgrid
.
CellFormatter
.
prototype
,
{
fromRaw
:
function
(
rawValue
,
model
)
{
return
model
.
get
(
'name'
);
}
})
},
typeName
:
{
label
:
"typeName"
,
cell
:
"html"
,
editable
:
false
,
formatter
:
_
.
extend
({},
Backgrid
.
CellFormatter
.
prototype
,
{
fromRaw
:
function
(
rawValue
,
model
)
{
return
model
.
get
(
'typeName'
);
}
})
},
options
:
{
label
:
"Entity Type(s)"
,
cell
:
"html"
,
editable
:
false
,
formatter
:
_
.
extend
({},
Backgrid
.
CellFormatter
.
prototype
,
{
fromRaw
:
function
(
rawValue
,
model
)
{
var
applicableEntityTypes
=
''
,
attrEntityTypes
=
JSON
.
parse
(
model
.
get
(
'options'
).
applicableEntityTypes
);
_
.
each
(
attrEntityTypes
,
function
(
values
)
{
applicableEntityTypes
+=
'<label class="btn btn-action btn-xs btn-blue no-pointer">'
+
values
+
'</label>'
;
});
return
applicableEntityTypes
;
}
})
name
:
{
label
:
"Attribute Name"
,
cell
:
"html"
,
editable
:
false
,
formatter
:
_
.
extend
({},
Backgrid
.
CellFormatter
.
prototype
,
{
fromRaw
:
function
(
rawValue
,
model
)
{
return
model
.
get
(
'name'
);
}
})
},
typeName
:
{
label
:
"typeName"
,
cell
:
"html"
,
editable
:
false
,
formatter
:
_
.
extend
({},
Backgrid
.
CellFormatter
.
prototype
,
{
fromRaw
:
function
(
rawValue
,
model
)
{
return
_
.
escape
(
model
.
get
(
'typeName'
)
);
}
})
},
options
:
{
label
:
"Entity Type(s)"
,
cell
:
"html"
,
editable
:
false
,
formatter
:
_
.
extend
({},
Backgrid
.
CellFormatter
.
prototype
,
{
fromRaw
:
function
(
rawValue
,
model
)
{
var
applicableEntityTypes
=
''
,
attrEntityTypes
=
JSON
.
parse
(
model
.
get
(
'options'
).
applicableEntityTypes
);
_
.
each
(
attrEntityTypes
,
function
(
values
)
{
applicableEntityTypes
+=
'<label class="btn btn-action btn-xs btn-blue no-pointer">'
+
values
+
'</label>'
;
});
return
applicableEntityTypes
;
}
})
},
tool
:
{
label
:
"Action"
,
...
...
@@ -226,7 +225,7 @@ define(['require',
})
}
},
this
.
nameSpaceAttr
);
}
});
return
NameSpaceAttrTableLayoutView
;
}
});
return
NameSpaceAttrTableLayoutView
;
});
\ No newline at end of file
dashboardv3/public/js/views/name_space/NameSpaceContainerLayoutView.js
View file @
b0c85dd9
...
...
@@ -69,7 +69,6 @@ define([
fetchNameSpaceGuid
:
function
()
{
var
that
=
this
;
this
.
selectedNameSpace
.
fetch
({
skipDefaultError
:
true
,
complete
:
function
(
model
,
status
)
{
that
.
nameSpaceAttr
.
fullCollection
.
add
(
model
.
responseJSON
.
attributeDefs
);
}
...
...
dashboardv3/public/js/views/profile/ProfileColumnLayoutView.js
View file @
b0c85dd9
...
...
@@ -69,7 +69,6 @@ define(['require',
fetchEntity
:
function
(
argument
)
{
var
that
=
this
;
this
.
entityModel
.
getEntity
(
this
.
entityDetail
.
table
.
guid
,
{
skipDefaultError
:
true
,
success
:
function
(
data
)
{
var
entity
=
data
.
entity
,
profileData
=
entity
&&
entity
.
attributes
&&
entity
.
attributes
.
profileData
?
entity
.
attributes
.
profileData
.
attributes
:
null
;
...
...
dashboardv3/public/js/views/profile/ProfileTableLayoutView.js
View file @
b0c85dd9
...
...
@@ -110,7 +110,6 @@ define(['require',
fetchEntity
:
function
(
argument
)
{
var
that
=
this
;
this
.
entityModel
.
getEntity
(
this
.
entityDetail
.
db
.
guid
,
{
skipDefaultError
:
true
,
success
:
function
(
data
)
{
var
entity
=
data
.
entity
;
if
(
entity
.
attributes
)
{
...
...
dashboardv3/public/js/views/search/tree/ClassificationTreeLayoutView.js
View file @
b0c85dd9
...
...
@@ -174,7 +174,6 @@ define([
var
opt
=
options
||
{};
if
(
opt
&&
!
opt
.
metricData
)
{
that
.
metricCollection
.
fetch
({
skipDefaultError
:
true
,
complete
:
function
()
{
that
.
entityCountObj
=
_
.
first
(
that
.
metricCollection
.
toJSON
());
that
.
classificationTreeUpdate
=
true
;
...
...
@@ -351,7 +350,6 @@ define([
}
};
this
.
classificationDefCollection
.
fetch
({
skipDefaultError
:
true
,
silent
:
true
,
complete
:
function
()
{
--
apiCount
;
...
...
@@ -359,7 +357,6 @@ define([
}
});
this
.
metricCollection
.
fetch
({
skipDefaultError
:
true
,
complete
:
function
()
{
--
apiCount
;
that
.
entityCountObj
=
_
.
first
(
that
.
metricCollection
.
toJSON
());
...
...
dashboardv3/public/js/views/search/tree/EntityTreeLayoutView.js
View file @
b0c85dd9
...
...
@@ -91,7 +91,6 @@ define([
var
opt
=
options
||
{};
if
(
opt
&&
!
opt
.
metricData
)
{
that
.
metricCollection
.
fetch
({
skipDefaultError
:
true
,
complete
:
function
()
{
that
.
entityCountObj
=
_
.
first
(
that
.
metricCollection
.
toJSON
());
that
.
ui
.
entitySearchTree
.
jstree
(
true
).
refresh
();
...
...
@@ -510,7 +509,6 @@ define([
}
};
this
.
entityDefCollection
.
fetch
({
skipDefaultError
:
true
,
complete
:
function
()
{
that
.
entityDefCollection
.
fullCollection
.
comparator
=
function
(
model
)
{
return
model
.
get
(
'name'
).
toLowerCase
();
...
...
@@ -522,7 +520,6 @@ define([
});
this
.
metricCollection
.
fetch
({
skipDefaultError
:
true
,
complete
:
function
()
{
--
apiCount
;
that
.
entityCountObj
=
_
.
first
(
that
.
metricCollection
.
toJSON
());
...
...
@@ -531,7 +528,6 @@ define([
});
this
.
typeHeaders
.
fetch
({
skipDefaultError
:
true
,
complete
:
function
()
{
that
.
typeHeaders
.
fullCollection
.
comparator
=
function
(
model
)
{
return
model
.
get
(
'name'
).
toLowerCase
();
...
...
dashboardv3/public/js/views/search/tree/NameSpaceTreeLayoutView.js
View file @
b0c85dd9
...
...
@@ -215,7 +215,6 @@ define([
refresh
:
function
(
options
)
{
var
that
=
this
;
this
.
nameSpaceCollection
.
fetch
({
skipDefaultError
:
true
,
silent
:
true
,
complete
:
function
()
{
that
.
nameSpaceCollection
.
fullCollection
.
comparator
=
function
(
model
)
{
...
...
dashboardv3/public/js/views/site/Statistics.js
View file @
b0c85dd9
...
...
@@ -99,7 +99,6 @@ define(['require',
fetchMetricData
:
function
(
options
)
{
var
that
=
this
;
this
.
metricCollection
.
fetch
({
skipDefaultError
:
true
,
success
:
function
(
data
)
{
var
data
=
_
.
first
(
data
.
toJSON
());
that
.
renderStats
({
valueObject
:
data
.
general
.
stats
,
dataObject
:
data
.
general
});
...
...
dashboardv3/public/js/views/tag/AddTagModalView.js
View file @
b0c85dd9
...
...
@@ -439,9 +439,9 @@ define(['require',
this
.
showLoader
();
}
this
.
entityModel
.
saveTraitsEntity
(
this
.
tagModel
?
options
.
guid
:
null
,
{
skipDefaultError
:
true
,
data
:
JSON
.
stringify
(
json
),
type
:
this
.
tagModel
?
'PUT'
:
'POST'
,
defaultErrorMessage
:
"Tag "
+
tagName
+
" could not be added"
,
success
:
function
(
data
)
{
var
addupdatetext
=
that
.
tagModel
?
'updated successfully to '
:
'added to '
;
Utils
.
notifySuccess
({
...
...
@@ -455,13 +455,6 @@ define(['require',
}
},
cust_error
:
function
(
model
,
response
)
{
var
message
=
"Tag "
+
tagName
+
" could not be added"
;
if
(
response
&&
response
.
responseJSON
)
{
message
=
response
.
responseJSON
.
errorMessage
;
}
Utils
.
notifyError
({
content
:
message
});
if
(
that
.
hideLoader
)
{
that
.
hideLoader
();
}
...
...
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