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
f20f8bae
Commit
f20f8bae
authored
May 07, 2020
by
kevalbhatt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3366:UI: Quick Search dropdown entry icon does not match the fallback icon for that entry
parent
23aea76f
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
68 additions
and
11 deletions
+68
-11
Globals.js
dashboardv2/public/js/utils/Globals.js
+1
-0
DetailPageLayoutView.js
...ardv2/public/js/views/detail_page/DetailPageLayoutView.js
+8
-1
SearchResultLayoutView.js
dashboardv2/public/js/views/search/SearchResultLayoutView.js
+11
-0
Header.js
dashboardv2/public/js/views/site/Header.js
+15
-8
Globals.js
dashboardv3/public/js/utils/Globals.js
+1
-0
DetailPageLayoutView.js
...ardv3/public/js/views/detail_page/DetailPageLayoutView.js
+8
-1
GlobalSearchLayoutView.js
dashboardv3/public/js/views/search/GlobalSearchLayoutView.js
+13
-1
SearchResultLayoutView.js
dashboardv3/public/js/views/search/SearchResultLayoutView.js
+11
-0
No files found.
dashboardv2/public/js/utils/Globals.js
View file @
f20f8bae
...
...
@@ -37,6 +37,7 @@ define(["require"], function(require) {
status
:
false
,
response
:
{}
};
Globals
.
serviceTypeMap
=
{};
Globals
.
entityImgPath
=
"/img/entity-icon/"
;
Globals
.
DEFAULT_UI
=
"v2"
;
return
Globals
;
...
...
dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
View file @
f20f8bae
...
...
@@ -189,7 +189,14 @@ define(['require',
titleName
+=
'<button title="Deleted" class="btn btn-action btn-md deleteBtn"><i class="fa fa-trash"></i> Deleted</button>'
;
}
this
.
ui
.
title
.
html
(
titleName
);
var
entityData
=
_
.
extend
({
"serviceType"
:
this
.
activeEntityDef
&&
this
.
activeEntityDef
.
get
(
'serviceType'
),
"isProcess"
:
isProcess
},
collectionJSON
);
if
(
collectionJSON
.
attributes
.
serviceType
===
undefined
)
{
if
(
Globals
.
serviceTypeMap
[
collectionJSON
.
typeName
]
===
undefined
&&
this
.
activeEntityDef
)
{
Globals
.
serviceTypeMap
[
collectionJSON
.
typeName
]
=
this
.
activeEntityDef
.
get
(
'serviceType'
);
}
}
else
if
(
Globals
.
serviceTypeMap
[
collectionJSON
.
typeName
]
===
undefined
)
{
Globals
.
serviceTypeMap
[
collectionJSON
.
typeName
]
=
collectionJSON
.
attributes
.
serviceType
;
}
var
entityData
=
_
.
extend
({
"serviceType"
:
Globals
.
serviceTypeMap
[
collectionJSON
.
typeName
],
"isProcess"
:
isProcess
},
collectionJSON
);
if
(
this
.
readOnly
)
{
this
.
ui
.
entityIcon
.
addClass
(
'disabled'
);
}
else
{
...
...
dashboardv2/public/js/views/search/SearchResultLayoutView.js
View file @
f20f8bae
...
...
@@ -667,6 +667,17 @@ define(['require',
var
obj
=
model
.
toJSON
(),
nameHtml
=
""
,
name
=
Utils
.
getName
(
obj
);
if
(
obj
.
attributes
.
serviceType
===
undefined
)
{
if
(
Globals
.
serviceTypeMap
[
obj
.
typeName
]
===
undefined
&&
that
.
entityDefCollection
)
{
var
defObj
=
that
.
entityDefCollection
.
fullCollection
.
find
({
name
:
obj
.
typeName
});
if
(
defObj
)
{
Globals
.
serviceTypeMap
[
obj
.
typeName
]
=
defObj
.
get
(
'serviceType'
);
}
}
}
else
if
(
Globals
.
serviceTypeMap
[
obj
.
typeName
]
===
undefined
)
{
Globals
.
serviceTypeMap
[
obj
.
typeName
]
=
obj
.
attributes
.
serviceType
;
}
obj
.
serviceType
=
Globals
.
serviceTypeMap
[
obj
.
typeName
];
if
(
obj
.
guid
)
{
if
(
obj
.
guid
==
"-1"
)
{
nameHtml
=
'<span title="'
+
name
+
'">'
+
name
+
'</span>'
;
...
...
dashboardv2/public/js/views/site/Header.js
View file @
f20f8bae
...
...
@@ -133,12 +133,14 @@ define(['require',
var
that
=
this
,
request
=
options
.
request
,
response
=
options
.
response
,
inputEl
=
options
.
inputEl
,
term
=
request
.
term
,
data
=
{},
sendResponse
=
function
()
{
var
query
=
data
.
query
,
suggestions
=
data
.
suggestions
;
if
(
query
!==
undefined
&&
suggestions
!==
undefined
)
{
inputEl
.
siblings
(
'span.fa-refresh'
).
removeClass
(
"fa-refresh fa-spin-custom"
).
addClass
(
"fa-search"
);
response
(
data
);
}
};
...
...
@@ -195,12 +197,6 @@ define(['require',
search
:
function
()
{
$
(
this
).
siblings
(
'span.fa-search'
).
removeClass
(
"fa-search"
).
addClass
(
"fa-refresh fa-spin-custom"
);
},
focus
:
function
(
event
,
ui
)
{
return
false
;
},
open
:
function
()
{
$
(
this
).
siblings
(
'span.fa-refresh'
).
removeClass
(
"fa-refresh fa-spin-custom"
).
addClass
(
"fa-search"
);
},
select
:
function
(
event
,
ui
)
{
var
item
=
ui
&&
ui
.
item
;
event
.
preventDefault
();
...
...
@@ -223,7 +219,8 @@ define(['require',
source
:
function
(
request
,
response
)
{
that
.
fetchSearchData
({
request
:
request
,
response
:
response
response
:
response
,
inputEl
:
this
.
element
});
}
}).
focus
(
function
()
{
...
...
@@ -242,7 +239,6 @@ define(['require',
}
}
}).
atlasAutoComplete
(
"instance"
).
_renderItem
=
function
(
ul
,
searchItem
)
{
if
(
searchItem
)
{
var
data
=
searchItem
.
data
,
searchTerm
=
this
.
term
,
...
...
@@ -268,6 +264,17 @@ define(['require',
item
.
itemText
=
Utils
.
getName
(
item
)
+
" ("
+
item
.
typeName
+
")"
;
var
options
=
{},
table
=
''
;
if
(
item
.
serviceType
===
undefined
)
{
if
(
Globals
.
serviceTypeMap
[
item
.
typeName
]
===
undefined
&&
that
.
entityDefCollection
)
{
var
defObj
=
that
.
entityDefCollection
.
fullCollection
.
find
({
name
:
item
.
typeName
});
if
(
defObj
)
{
Globals
.
serviceTypeMap
[
item
.
typeName
]
=
defObj
.
get
(
"serviceType"
);
}
}
}
else
if
(
Globals
.
serviceTypeMap
[
item
.
typeName
]
===
undefined
)
{
Globals
.
serviceTypeMap
[
item
.
typeName
]
=
item
.
serviceType
;
}
item
.
serviceType
=
Globals
.
serviceTypeMap
[
item
.
typeName
];
options
.
entityData
=
item
;
var
imgEl
=
$
(
'<img src="'
+
Utils
.
getEntityIconPath
(
options
)
+
'">'
).
on
(
"error"
,
function
(
error
,
s
)
{
this
.
src
=
Utils
.
getEntityIconPath
(
_
.
extend
(
options
,
{
errorUrl
:
this
.
src
}));
...
...
dashboardv3/public/js/utils/Globals.js
View file @
f20f8bae
...
...
@@ -37,6 +37,7 @@ define(["require"], function(require) {
status
:
false
,
response
:
{}
};
Globals
.
serviceTypeMap
=
{};
Globals
.
entityImgPath
=
"/img/entity-icon/"
;
Globals
.
DEFAULT_UI
=
"v2"
;
return
Globals
;
...
...
dashboardv3/public/js/views/detail_page/DetailPageLayoutView.js
View file @
f20f8bae
...
...
@@ -193,7 +193,14 @@ define(['require',
titleName
+=
'<button title="Deleted" class="btn btn-action btn-md deleteBtn"><i class="fa fa-trash"></i> Deleted</button>'
;
}
this
.
ui
.
title
.
html
(
titleName
);
var
entityData
=
_
.
extend
({
"serviceType"
:
this
.
activeEntityDef
&&
this
.
activeEntityDef
.
get
(
'serviceType'
),
"isProcess"
:
isProcess
},
collectionJSON
);
if
(
collectionJSON
.
attributes
.
serviceType
===
undefined
)
{
if
(
Globals
.
serviceTypeMap
[
collectionJSON
.
typeName
]
===
undefined
&&
this
.
activeEntityDef
)
{
Globals
.
serviceTypeMap
[
collectionJSON
.
typeName
]
=
this
.
activeEntityDef
.
get
(
'serviceType'
);
}
}
else
if
(
Globals
.
serviceTypeMap
[
collectionJSON
.
typeName
]
===
undefined
)
{
Globals
.
serviceTypeMap
[
collectionJSON
.
typeName
]
=
collectionJSON
.
attributes
.
serviceType
;
}
var
entityData
=
_
.
extend
({
"serviceType"
:
Globals
.
serviceTypeMap
[
collectionJSON
.
typeName
],
"isProcess"
:
isProcess
},
collectionJSON
);
if
(
this
.
readOnly
)
{
this
.
ui
.
entityIcon
.
addClass
(
'disabled'
);
}
else
{
...
...
dashboardv3/public/js/views/search/GlobalSearchLayoutView.js
View file @
f20f8bae
...
...
@@ -21,8 +21,9 @@ define(["require",
"hbs!tmpl/search/GlobalSearchLayoutView_tmpl"
,
"utils/Utils"
,
"utils/UrlLinks"
,
'utils/Globals'
,
"jquery-ui"
],
function
(
require
,
Backbone
,
GlobalSearchLayoutViewTmpl
,
Utils
,
UrlLinks
)
{
],
function
(
require
,
Backbone
,
GlobalSearchLayoutViewTmpl
,
Utils
,
UrlLinks
,
Globals
)
{
"use strict"
;
var
GlobalSearchLayoutView
=
Backbone
.
Marionette
.
LayoutView
.
extend
(
...
...
@@ -292,6 +293,17 @@ define(["require",
item
.
itemText
=
Utils
.
getName
(
item
)
+
" ("
+
item
.
typeName
+
")"
;
var
options
=
{},
table
=
""
;
if
(
item
.
serviceType
===
undefined
)
{
if
(
Globals
.
serviceTypeMap
[
item
.
typeName
]
===
undefined
&&
that
.
entityDefCollection
)
{
var
defObj
=
that
.
entityDefCollection
.
fullCollection
.
find
({
name
:
item
.
typeName
});
if
(
defObj
)
{
Globals
.
serviceTypeMap
[
item
.
typeName
]
=
defObj
.
get
(
"serviceType"
);
}
}
}
else
if
(
Globals
.
serviceTypeMap
[
item
.
typeName
]
===
undefined
)
{
Globals
.
serviceTypeMap
[
item
.
typeName
]
=
item
.
serviceType
;
}
item
.
serviceType
=
Globals
.
serviceTypeMap
[
item
.
typeName
];
options
.
entityData
=
item
;
var
imgEl
=
$
(
'<img src="'
+
Utils
.
getEntityIconPath
(
options
)
+
'">'
).
on
(
"error"
,
function
(
error
,
s
)
{
this
.
src
=
Utils
.
getEntityIconPath
(
_
.
extend
(
options
,
{
errorUrl
:
this
.
src
}));
...
...
dashboardv3/public/js/views/search/SearchResultLayoutView.js
View file @
f20f8bae
...
...
@@ -680,6 +680,17 @@ define(['require',
var
obj
=
model
.
toJSON
(),
nameHtml
=
""
,
name
=
Utils
.
getName
(
obj
);
if
(
obj
.
attributes
.
serviceType
===
undefined
)
{
if
(
Globals
.
serviceTypeMap
[
obj
.
typeName
]
===
undefined
&&
that
.
entityDefCollection
)
{
var
defObj
=
that
.
entityDefCollection
.
fullCollection
.
find
({
name
:
obj
.
typeName
});
if
(
defObj
)
{
Globals
.
serviceTypeMap
[
obj
.
typeName
]
=
defObj
.
get
(
'serviceType'
);
}
}
}
else
if
(
Globals
.
serviceTypeMap
[
obj
.
typeName
]
===
undefined
)
{
Globals
.
serviceTypeMap
[
obj
.
typeName
]
=
obj
.
attributes
.
serviceType
;
}
obj
.
serviceType
=
Globals
.
serviceTypeMap
[
obj
.
typeName
];
if
(
obj
.
guid
)
{
if
(
obj
.
guid
==
"-1"
)
{
nameHtml
=
'<span title="'
+
name
+
'">'
+
name
+
'</span>'
;
...
...
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