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
952d0696
Commit
952d0696
authored
Aug 21, 2019
by
kevalbhatt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3382 : UI: Entity & Classification count are not getting updated after…
ATLAS-3382 : UI: Entity & Classification count are not getting updated after clicking on refresh button
parent
a310bc29
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
25 deletions
+43
-25
main.js
dashboardv2/public/js/main.js
+5
-5
Router.js
dashboardv2/public/js/router/Router.js
+4
-3
UrlLinks.js
dashboardv2/public/js/utils/UrlLinks.js
+1
-1
SearchLayoutView.js
dashboardv2/public/js/views/search/SearchLayoutView.js
+30
-11
Statistics.js
dashboardv2/public/js/views/site/Statistics.js
+3
-5
No files found.
dashboardv2/public/js/main.js
View file @
952d0696
...
@@ -210,16 +210,16 @@ require(['App',
...
@@ -210,16 +210,16 @@ require(['App',
this
.
enumDefCollection
.
url
=
UrlLinks
.
enumDefApiUrl
();
this
.
enumDefCollection
.
url
=
UrlLinks
.
enumDefApiUrl
();
this
.
enumDefCollection
.
modelAttrName
=
"enumDefs"
;
this
.
enumDefCollection
.
modelAttrName
=
"enumDefs"
;
this
.
classificationDefCollection
=
new
VTagList
();
this
.
classificationDefCollection
=
new
VTagList
();
this
.
entityCount
Collection
=
new
VTagList
();
this
.
metric
Collection
=
new
VTagList
();
this
.
entityCountCollection
.
url
=
UrlLinks
.
entityCountApi
();
this
.
metricCollection
.
url
=
UrlLinks
.
metricsApiUrl
();
this
.
entityCount
Collection
.
modelAttrName
=
"data"
;
this
.
metric
Collection
.
modelAttrName
=
"data"
;
App
.
appRouter
=
new
Router
({
App
.
appRouter
=
new
Router
({
entityDefCollection
:
this
.
entityDefCollection
,
entityDefCollection
:
this
.
entityDefCollection
,
typeHeaders
:
this
.
typeHeaders
,
typeHeaders
:
this
.
typeHeaders
,
enumDefCollection
:
this
.
enumDefCollection
,
enumDefCollection
:
this
.
enumDefCollection
,
classificationDefCollection
:
this
.
classificationDefCollection
,
classificationDefCollection
:
this
.
classificationDefCollection
,
entityCountCollection
:
this
.
entityCount
Collection
metricCollection
:
this
.
metric
Collection
});
});
var
startApp
=
function
()
{
var
startApp
=
function
()
{
...
@@ -301,7 +301,7 @@ require(['App',
...
@@ -301,7 +301,7 @@ require(['App',
}
}
});
});
this
.
entityCount
Collection
.
fetch
({
this
.
metric
Collection
.
fetch
({
skipDefaultError
:
true
,
skipDefaultError
:
true
,
complete
:
function
()
{
complete
:
function
()
{
--
that
.
asyncFetchCounter
;
--
that
.
asyncFetchCounter
;
...
...
dashboardv2/public/js/router/Router.js
View file @
952d0696
...
@@ -42,7 +42,7 @@ define([
...
@@ -42,7 +42,7 @@ define([
'*actions'
:
'defaultAction'
'*actions'
:
'defaultAction'
},
},
initialize
:
function
(
options
)
{
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'entityDefCollection'
,
'typeHeaders'
,
'enumDefCollection'
,
'classificationDefCollection'
,
'
entityCount
Collection'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'entityDefCollection'
,
'typeHeaders'
,
'enumDefCollection'
,
'classificationDefCollection'
,
'
metric
Collection'
));
this
.
showRegions
();
this
.
showRegions
();
this
.
bindCommonEvents
();
this
.
bindCommonEvents
();
this
.
listenTo
(
this
,
'route'
,
this
.
postRouteExecute
,
this
);
this
.
listenTo
(
this
,
'route'
,
this
.
postRouteExecute
,
this
);
...
@@ -58,7 +58,7 @@ define([
...
@@ -58,7 +58,7 @@ define([
'enumDefCollection'
:
this
.
enumDefCollection
,
'enumDefCollection'
:
this
.
enumDefCollection
,
'classificationDefCollection'
:
this
.
classificationDefCollection
,
'classificationDefCollection'
:
this
.
classificationDefCollection
,
'glossaryCollection'
:
this
.
glossaryCollection
,
'glossaryCollection'
:
this
.
glossaryCollection
,
'
entityCountCollection'
:
this
.
entityCount
Collection
'
metricCollection'
:
this
.
metric
Collection
}
}
this
.
sharedObj
=
{
this
.
sharedObj
=
{
searchTableColumns
:
{},
searchTableColumns
:
{},
...
@@ -77,7 +77,8 @@ define([
...
@@ -77,7 +77,8 @@ define([
require
([
require
([
'views/site/Statistics'
,
'views/site/Statistics'
,
],
function
(
Statistics
)
{
],
function
(
Statistics
)
{
new
Statistics
();
new
Statistics
(
_
.
extend
({},
that
.
preFetchedCollectionLists
,
that
.
sharedObj
));
});
});
});
});
$
(
'body'
).
on
(
'click'
,
'li.aboutAtlas'
,
function
()
{
$
(
'body'
).
on
(
'click'
,
'li.aboutAtlas'
,
function
()
{
...
...
dashboardv2/public/js/utils/UrlLinks.js
View file @
952d0696
...
@@ -40,7 +40,7 @@ define(['require', 'utils/Enums', 'utils/Utils', 'underscore'], function(require
...
@@ -40,7 +40,7 @@ define(['require', 'utils/Enums', 'utils/Utils', 'underscore'], function(require
enumDefApiUrl
:
function
(
name
)
{
enumDefApiUrl
:
function
(
name
)
{
return
this
.
getDefApiUrl
(
'enum'
,
name
);
return
this
.
getDefApiUrl
(
'enum'
,
name
);
},
},
entityCountApi
:
function
(){
metricsApiUrl
:
function
(){
return
this
.
baseUrl
+
'/admin/metrics'
return
this
.
baseUrl
+
'/admin/metrics'
},
},
getDefApiUrl
:
function
(
type
,
name
)
{
getDefApiUrl
:
function
(
type
,
name
)
{
...
...
dashboardv2/public/js/views/search/SearchLayoutView.js
View file @
952d0696
...
@@ -89,9 +89,9 @@ define(['require',
...
@@ -89,9 +89,9 @@ define(['require',
* @constructs
* @constructs
*/
*/
initialize
:
function
(
options
)
{
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'value'
,
'typeHeaders'
,
'searchVent'
,
'entityDefCollection'
,
'enumDefCollection'
,
'classificationDefCollection'
,
'searchTableColumns'
,
'searchTableFilters'
,
'
entityCount
Collection'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'value'
,
'typeHeaders'
,
'searchVent'
,
'entityDefCollection'
,
'enumDefCollection'
,
'classificationDefCollection'
,
'searchTableColumns'
,
'searchTableFilters'
,
'
metric
Collection'
));
this
.
type
=
"basic"
;
this
.
type
=
"basic"
;
this
.
entityCountObj
=
_
.
first
(
this
.
entityCount
Collection
.
toJSON
());
this
.
entityCountObj
=
_
.
first
(
this
.
metric
Collection
.
toJSON
());
this
.
filterTypeSelected
=
[];
this
.
filterTypeSelected
=
[];
var
param
=
Utils
.
getUrlState
.
getQueryParams
();
var
param
=
Utils
.
getUrlState
.
getQueryParams
();
this
.
query
=
{
this
.
query
=
{
...
@@ -358,16 +358,35 @@ define(['require',
...
@@ -358,16 +358,35 @@ define(['require',
includeDE
:
null
includeDE
:
null
}),
param
);
}),
param
);
},
},
fetchCollection
:
function
(
value
)
{
this
.
typeHeaders
.
fetch
({
reset
:
true
});
},
onRefreshButton
:
function
()
{
onRefreshButton
:
function
()
{
this
.
fetchCollection
();
var
that
=
this
,
//to check url query param contain type or not
apiCount
=
2
,
var
checkURLValue
=
Utils
.
getUrlState
.
getQueryParams
(
this
.
url
);
updateSearchList
=
function
()
{
if
(
this
.
searchVent
&&
(
_
.
has
(
checkURLValue
,
"tag"
)
||
_
.
has
(
checkURLValue
,
"type"
)
||
_
.
has
(
checkURLValue
,
"query"
)))
{
if
(
apiCount
===
0
)
{
this
.
searchVent
.
trigger
(
'search:refresh'
);
that
.
initializeValues
();
}
var
checkURLValue
=
Utils
.
getUrlState
.
getQueryParams
(
that
.
url
);
if
(
that
.
searchVent
&&
(
_
.
has
(
checkURLValue
,
"tag"
)
||
_
.
has
(
checkURLValue
,
"type"
)
||
_
.
has
(
checkURLValue
,
"query"
)))
{
that
.
searchVent
.
trigger
(
'search:refresh'
);
}
}
};
this
.
metricCollection
.
fetch
({
skipDefaultError
:
true
,
complete
:
function
()
{
--
apiCount
;
that
.
entityCountObj
=
_
.
first
(
that
.
metricCollection
.
toJSON
());
updateSearchList
();
}
});
this
.
typeHeaders
.
fetch
({
skipDefaultError
:
true
,
silent
:
true
,
complete
:
function
()
{
--
apiCount
;
updateSearchList
();
}
});
},
},
advancedInfo
:
function
(
e
)
{
advancedInfo
:
function
(
e
)
{
require
([
require
([
...
...
dashboardv2/public/js/views/site/Statistics.js
View file @
952d0696
...
@@ -85,11 +85,9 @@ define(['require',
...
@@ -85,11 +85,9 @@ define(['require',
},
},
bindEvents
:
function
()
{},
bindEvents
:
function
()
{},
fetchMetricData
:
function
(
options
)
{
fetchMetricData
:
function
(
options
)
{
var
that
=
this
,
var
that
=
this
;
entityCountCollection
=
new
VTagList
();
this
.
metricCollection
.
fetch
({
entityCountCollection
.
url
=
UrlLinks
.
entityCountApi
();
skipDefaultError
:
true
,
entityCountCollection
.
modelAttrName
=
"data"
;
entityCountCollection
.
fetch
({
success
:
function
(
data
)
{
success
:
function
(
data
)
{
var
data
=
_
.
first
(
data
.
toJSON
());
var
data
=
_
.
first
(
data
.
toJSON
());
that
.
renderStats
({
valueObject
:
data
.
general
.
stats
,
dataObject
:
data
.
general
});
that
.
renderStats
({
valueObject
:
data
.
general
.
stats
,
dataObject
:
data
.
general
});
...
...
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