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
Feb 24, 2017
by
kevalbhatt
Committed by
Madhan Neethiraj
Feb 24, 2017
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
Hide 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
...
@@ -149,7 +149,14 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
valueOfArray
.
push
(
'<span>'
+
_
.
escape
(
inputOutputField
)
+
'</span>'
);
valueOfArray
.
push
(
'<span>'
+
_
.
escape
(
inputOutputField
)
+
'</span>'
);
}
}
}
else
if
(
_
.
isObject
(
inputOutputField
)
&&
!
id
)
{
}
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
;
var
value
=
objValue
;
if
(
objKey
.
indexOf
(
"$"
)
==
-
1
)
{
if
(
objKey
.
indexOf
(
"$"
)
==
-
1
)
{
if
(
_
.
isObject
(
value
))
{
if
(
_
.
isObject
(
value
))
{
...
@@ -162,7 +169,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
...
@@ -162,7 +169,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
if
(
id
&&
inputOutputField
)
{
if
(
id
&&
inputOutputField
)
{
var
name
=
Utils
.
getName
(
inputOutputField
);
var
name
=
Utils
.
getName
(
inputOutputField
);
if
(
name
===
"-"
)
{
if
(
name
===
"-"
||
name
===
id
)
{
var
fetch
=
true
;
var
fetch
=
true
;
var
fetchId
=
(
_
.
isObject
(
id
)
?
id
.
id
:
id
);
var
fetchId
=
(
_
.
isObject
(
id
)
?
id
.
id
:
id
);
fetchInputOutputValue
(
fetchId
);
fetchInputOutputValue
(
fetchId
);
...
...
dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
View file @
c7900f25
...
@@ -167,6 +167,7 @@ define(['require',
...
@@ -167,6 +167,7 @@ define(['require',
referredEntities
:
this
.
entityObject
.
referredEntities
,
referredEntities
:
this
.
entityObject
.
referredEntities
,
guid
:
this
.
id
,
guid
:
this
.
id
,
entityName
:
this
.
name
,
entityName
:
this
.
name
,
typeHeaders
:
this
.
typeHeaders
,
entityDefCollection
:
this
.
entityDefCollection
,
entityDefCollection
:
this
.
entityDefCollection
,
fetchCollection
:
this
.
fetchCollection
.
bind
(
that
)
fetchCollection
:
this
.
fetchCollection
.
bind
(
that
)
}
}
...
...
dashboardv2/public/js/views/entity/CreateEntityLayoutView.js
View file @
c7900f25
...
@@ -148,7 +148,7 @@ define(['require',
...
@@ -148,7 +148,7 @@ define(['require',
this
.
decrementCounter
(
'asyncFetchLOVCounter'
);
this
.
decrementCounter
(
'asyncFetchLOVCounter'
);
this
.
addJsonSearchData
();
this
.
addJsonSearchData
();
},
this
);
},
this
);
this
.
ui
.
entityInputData
.
on
(
"keyup
"
,
"textarea"
,
function
(
)
{
this
.
ui
.
entityInputData
.
on
(
"keyup
change"
,
"textarea"
,
function
(
e
)
{
var
value
=
this
.
value
;
var
value
=
this
.
value
;
if
(
!
value
.
length
&&
$
(
this
).
hasClass
(
'false'
))
{
if
(
!
value
.
length
&&
$
(
this
).
hasClass
(
'false'
))
{
$
(
this
).
removeClass
(
'errorClass'
);
$
(
this
).
removeClass
(
'errorClass'
);
...
@@ -165,7 +165,6 @@ define(['require',
...
@@ -165,7 +165,6 @@ define(['require',
that
.
modal
.
$el
.
find
(
'button.ok'
).
prop
(
"disabled"
,
true
);
that
.
modal
.
$el
.
find
(
'button.ok'
).
prop
(
"disabled"
,
true
);
}
}
}
}
});
});
if
(
this
.
guid
)
{
if
(
this
.
guid
)
{
...
@@ -433,12 +432,23 @@ define(['require',
...
@@ -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"
)
+
'"'
+
return
'<textarea class="form-control entityInputBox '
+
(
value
.
isOptional
===
true
?
"false"
:
"true"
)
+
'"'
+
' data-type="'
+
value
.
typeName
+
'"'
+
' data-type="'
+
value
.
typeName
+
'"'
+
' data-key="'
+
value
.
name
+
'"'
+
' data-key="'
+
value
.
name
+
'"'
+
' placeholder="'
+
value
.
name
+
'"'
+
' placeholder="'
+
value
.
name
+
'"'
+
' data-id="entityInput">'
+
entityValue
+
'</textarea>'
;
' data-id="entityInput">'
+
setValue
+
'</textarea>'
;
},
},
getInput
:
function
(
value
,
entityValue
)
{
getInput
:
function
(
value
,
entityValue
)
{
return
'<input class="form-control entityInputBox '
+
(
value
.
isOptional
===
true
?
"false"
:
"true"
)
+
'"'
+
return
'<input class="form-control entityInputBox '
+
(
value
.
isOptional
===
true
?
"false"
:
"true"
)
+
'"'
+
...
@@ -491,7 +501,7 @@ define(['require',
...
@@ -491,7 +501,7 @@ define(['require',
}
else
{
}
else
{
var
typeNameCategory
=
this
.
typeHeaders
.
fullCollection
.
findWhere
({
name
:
typeName
});
var
typeNameCategory
=
this
.
typeHeaders
.
fullCollection
.
findWhere
({
name
:
typeName
});
if
(
typeNameCategory
&&
typeNameCategory
.
get
(
'category'
)
===
'STRUCT'
)
{
if
(
typeNameCategory
&&
typeNameCategory
.
get
(
'category'
)
===
'STRUCT'
)
{
return
this
.
getTextArea
(
value
,
entityValue
);
return
this
.
getTextArea
(
value
,
entityValue
,
true
);
}
else
{
}
else
{
return
this
.
getInput
(
value
,
entityValue
);
return
this
.
getInput
(
value
,
entityValue
);
}
}
...
...
dashboardv2/public/js/views/entity/EntityDetailTableLayoutView.js
View file @
c7900f25
...
@@ -48,7 +48,7 @@ define(['require',
...
@@ -48,7 +48,7 @@ define(['require',
* @constructs
* @constructs
*/
*/
initialize
:
function
(
options
)
{
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'entity'
,
'referredEntities'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'entity'
,
'referredEntities'
,
'typeHeaders'
));
this
.
entityModel
=
new
VEntity
({});
this
.
entityModel
=
new
VEntity
({});
},
},
bindEvents
:
function
()
{},
bindEvents
:
function
()
{},
...
...
dashboardv2/public/js/views/tag/TagLayoutView.js
View file @
c7900f25
...
@@ -242,8 +242,6 @@ define(['require',
...
@@ -242,8 +242,6 @@ define(['require',
classificationDefs
:
[{
classificationDefs
:
[{
'name'
:
this
.
name
.
trim
(),
'name'
:
this
.
name
.
trim
(),
'description'
:
this
.
description
.
trim
(),
'description'
:
this
.
description
.
trim
(),
"typeVersion"
:
"2"
,
"version"
:
"2"
,
'superTypes'
:
superTypes
.
length
?
superTypes
:
[],
'superTypes'
:
superTypes
.
length
?
superTypes
:
[],
"attributeDefs"
:
attributeObj
"attributeDefs"
:
attributeObj
}],
}],
...
...
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