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
c7900f25
Commit
c7900f25
authored
8 years ago
by
kevalbhatt
Committed by
Madhan Neethiraj
8 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-1592: updated UI to display struct values without type header details
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
69c4806a
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
10 deletions
+26
-10
CommonViewFunction.js
dashboardv2/public/js/utils/CommonViewFunction.js
+9
-2
DetailPageLayoutView.js
...ardv2/public/js/views/detail_page/DetailPageLayoutView.js
+1
-0
CreateEntityLayoutView.js
dashboardv2/public/js/views/entity/CreateEntityLayoutView.js
+15
-5
EntityDetailTableLayoutView.js
...dv2/public/js/views/entity/EntityDetailTableLayoutView.js
+1
-1
TagLayoutView.js
dashboardv2/public/js/views/tag/TagLayoutView.js
+0
-2
No files found.
dashboardv2/public/js/utils/CommonViewFunction.js
View file @
c7900f25
...
...
@@ -149,7 +149,14 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
valueOfArray
.
push
(
'<span>'
+
_
.
escape
(
inputOutputField
)
+
'</span>'
);
}
}
else
if
(
_
.
isObject
(
inputOutputField
)
&&
!
id
)
{
_
.
each
(
inputOutputField
,
function
(
objValue
,
objKey
)
{
var
attributesList
=
inputOutputField
;
if
(
scope
.
typeHeaders
&&
inputOutputField
.
typeName
)
{
var
typeNameCategory
=
scope
.
typeHeaders
.
fullCollection
.
findWhere
({
name
:
inputOutputField
.
typeName
});
if
(
attributesList
.
attributes
&&
typeNameCategory
&&
typeNameCategory
.
get
(
'category'
)
===
'STRUCT'
)
{
attributesList
=
attributesList
.
attributes
;
}
}
_
.
each
(
attributesList
,
function
(
objValue
,
objKey
)
{
var
value
=
objValue
;
if
(
objKey
.
indexOf
(
"$"
)
==
-
1
)
{
if
(
_
.
isObject
(
value
))
{
...
...
@@ -162,7 +169,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
if
(
id
&&
inputOutputField
)
{
var
name
=
Utils
.
getName
(
inputOutputField
);
if
(
name
===
"-"
)
{
if
(
name
===
"-"
||
name
===
id
)
{
var
fetch
=
true
;
var
fetchId
=
(
_
.
isObject
(
id
)
?
id
.
id
:
id
);
fetchInputOutputValue
(
fetchId
);
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
View file @
c7900f25
...
...
@@ -167,6 +167,7 @@ define(['require',
referredEntities
:
this
.
entityObject
.
referredEntities
,
guid
:
this
.
id
,
entityName
:
this
.
name
,
typeHeaders
:
this
.
typeHeaders
,
entityDefCollection
:
this
.
entityDefCollection
,
fetchCollection
:
this
.
fetchCollection
.
bind
(
that
)
}
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/entity/CreateEntityLayoutView.js
View file @
c7900f25
...
...
@@ -148,7 +148,7 @@ define(['require',
this
.
decrementCounter
(
'asyncFetchLOVCounter'
);
this
.
addJsonSearchData
();
},
this
);
this
.
ui
.
entityInputData
.
on
(
"keyup
"
,
"textarea"
,
function
(
)
{
this
.
ui
.
entityInputData
.
on
(
"keyup
change"
,
"textarea"
,
function
(
e
)
{
var
value
=
this
.
value
;
if
(
!
value
.
length
&&
$
(
this
).
hasClass
(
'false'
))
{
$
(
this
).
removeClass
(
'errorClass'
);
...
...
@@ -165,7 +165,6 @@ define(['require',
that
.
modal
.
$el
.
find
(
'button.ok'
).
prop
(
"disabled"
,
true
);
}
}
});
if
(
this
.
guid
)
{
...
...
@@ -433,12 +432,23 @@ define(['require',
}
},
getTextArea
:
function
(
value
,
entityValue
)
{
getTextArea
:
function
(
value
,
entityValue
,
structType
)
{
var
setValue
=
entityValue
try
{
if
(
structType
&&
entityValue
&&
entityValue
.
length
)
{
var
parseValue
=
JSON
.
parse
(
entityValue
);
if
(
_
.
isObject
(
parseValue
)
&&
!
_
.
isArray
(
parseValue
)
&&
parseValue
.
attributes
)
{
setValue
=
JSON
.
stringify
(
parseValue
.
attributes
);
}
}
}
catch
(
err
)
{}
return
'<textarea class="form-control entityInputBox '
+
(
value
.
isOptional
===
true
?
"false"
:
"true"
)
+
'"'
+
' data-type="'
+
value
.
typeName
+
'"'
+
' data-key="'
+
value
.
name
+
'"'
+
' placeholder="'
+
value
.
name
+
'"'
+
' data-id="entityInput">'
+
entityValue
+
'</textarea>'
;
' data-id="entityInput">'
+
setValue
+
'</textarea>'
;
},
getInput
:
function
(
value
,
entityValue
)
{
return
'<input class="form-control entityInputBox '
+
(
value
.
isOptional
===
true
?
"false"
:
"true"
)
+
'"'
+
...
...
@@ -491,7 +501,7 @@ define(['require',
}
else
{
var
typeNameCategory
=
this
.
typeHeaders
.
fullCollection
.
findWhere
({
name
:
typeName
});
if
(
typeNameCategory
&&
typeNameCategory
.
get
(
'category'
)
===
'STRUCT'
)
{
return
this
.
getTextArea
(
value
,
entityValue
);
return
this
.
getTextArea
(
value
,
entityValue
,
true
);
}
else
{
return
this
.
getInput
(
value
,
entityValue
);
}
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/entity/EntityDetailTableLayoutView.js
View file @
c7900f25
...
...
@@ -48,7 +48,7 @@ define(['require',
* @constructs
*/
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'entity'
,
'referredEntities'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'entity'
,
'referredEntities'
,
'typeHeaders'
));
this
.
entityModel
=
new
VEntity
({});
},
bindEvents
:
function
()
{},
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/tag/TagLayoutView.js
View file @
c7900f25
...
...
@@ -242,8 +242,6 @@ define(['require',
classificationDefs
:
[{
'name'
:
this
.
name
.
trim
(),
'description'
:
this
.
description
.
trim
(),
"typeVersion"
:
"2"
,
"version"
:
"2"
,
'superTypes'
:
superTypes
.
length
?
superTypes
:
[],
"attributeDefs"
:
attributeObj
}],
...
...
This diff is collapsed.
Click to expand it.
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