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
24c9556c
Commit
24c9556c
authored
Apr 18, 2019
by
gutkaBinit
Committed by
kevalbhatt
Apr 18, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3146 UI : Toggle N/A values in relationship and property tables.
Signed-off-by:
kevalbhatt
<
kbhatt@apache.org
>
parent
5389b9bd
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
92 additions
and
9 deletions
+92
-9
relationship.scss
dashboardv2/public/css/scss/relationship.scss
+1
-0
table.scss
dashboardv2/public/css/scss/table.scss
+27
-0
EntityDetailTableLayoutView_tmpl.html
...js/templates/entity/EntityDetailTableLayoutView_tmpl.html
+14
-3
RelationshipLayoutView_tmpl.html
...ublic/js/templates/graph/RelationshipLayoutView_tmpl.html
+9
-1
CommonViewFunction.js
dashboardv2/public/js/utils/CommonViewFunction.js
+4
-2
Utils.js
dashboardv2/public/js/utils/Utils.js
+11
-0
EntityDetailTableLayoutView.js
...dv2/public/js/views/entity/EntityDetailTableLayoutView.js
+14
-2
RelationshipLayoutView.js
dashboardv2/public/js/views/graph/RelationshipLayoutView.js
+12
-1
No files found.
dashboardv2/public/css/scss/relationship.scss
View file @
24c9556c
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
height
:
100%
;
height
:
100%
;
width
:
100%
;
width
:
100%
;
overflow
:
hidden
;
overflow
:
hidden
;
z-index
:
1
;
.relatioship-link
{
.relatioship-link
{
fill
:
none
;
fill
:
none
;
...
...
dashboardv2/public/css/scss/table.scss
View file @
24c9556c
...
@@ -42,3 +42,29 @@ tr.empty {
...
@@ -42,3 +42,29 @@ tr.empty {
position
:
absolute
;
position
:
absolute
;
right
:
0px
;
right
:
0px
;
}
}
.entity-detail-table
,
.relationship-detail-table
{
position
:
relative
;
.hide-empty-value
{
.hide-row
{
display
:
none
;
}
}
.entity-relationship-table-toggle
,
.entity-detail-table-toggle
{
position
:
absolute
;
right
:
0
;
top
:
18px
;
}
table
{
th
:nth-child
(
1
),
td
:nth-child
(
1
)
{
width
:
20%
;
}
}
}
\ No newline at end of file
dashboardv2/public/js/templates/entity/EntityDetailTableLayoutView_tmpl.html
View file @
24c9556c
...
@@ -14,13 +14,23 @@
...
@@ -14,13 +14,23 @@
* See the License for the specific language governing permissions and
* See the License for the specific language governing permissions and
* limitations under the License.
* limitations under the License.
-->
-->
<table
class=
"table table-quickMenu"
>
<div
class=
"entity-detail-table"
>
<div
class=
"entity-detail-table-toggle"
>
<div
class=
"pretty p-switch p-fill"
>
<input
type=
"checkbox"
data-id=
"noValueToggle"
/>
<div
class=
"state p-primary"
>
<label>
Show Empty Values
</label>
</div>
</div>
</div>
<table
class=
"table table-quickMenu"
>
<thead>
<thead>
<tr>
<tr>
<th>
Key
</th>
<th>
Key
</th>
<th>
Value
</th>
<th>
Value
</th>
</tr>
</tr>
</thead>
</thead>
<tbody
data-id=
"detailV
alue"
>
<tbody
data-id=
"detailValue"
class=
"hide-empty-v
alue"
>
</tbody>
</tbody>
</table>
</table>
</div>
\ No newline at end of file
dashboardv2/public/js/templates/graph/RelationshipLayoutView_tmpl.html
View file @
24c9556c
...
@@ -46,7 +46,15 @@
...
@@ -46,7 +46,15 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div
class=
"relationship-detail-table"
>
<div
class=
"entity-relationship-table-toggle"
>
<div
class=
"pretty p-switch p-fill"
>
<input
type=
"checkbox"
data-id=
"noValueToggle"
/>
<div
class=
"state p-primary"
>
<label>
Show Empty Values
</label>
</div>
</div>
</div>
<table
class=
"table table-quickMenu"
data-id=
"relationshipDetailTable"
>
<table
class=
"table table-quickMenu"
data-id=
"relationshipDetailTable"
>
<thead>
<thead>
<tr>
<tr>
...
...
dashboardv2/public/js/utils/CommonViewFunction.js
View file @
24c9556c
...
@@ -254,7 +254,9 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
...
@@ -254,7 +254,9 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
val
=
_
.
escape
(
keyValue
);
val
=
_
.
escape
(
keyValue
);
}
}
if
(
isTable
)
{
if
(
isTable
)
{
var
htmlTag
=
'<div class="scroll-y">'
+
getValue
(
val
)
+
'</div>'
;
var
value
=
getValue
(
val
),
appendClass
=
(
value
==
"N/A"
?
"hide-row"
:
""
),
htmlTag
=
'<div class="scroll-y">'
+
value
+
'</div>'
;
if
(
_
.
isObject
(
valueObject
[
key
])
&&
!
_
.
isEmpty
(
valueObject
[
key
]))
{
if
(
_
.
isObject
(
valueObject
[
key
])
&&
!
_
.
isEmpty
(
valueObject
[
key
]))
{
var
matchedLinkString
=
val
.
match
(
/href|value-loader
\w
*/g
),
var
matchedLinkString
=
val
.
match
(
/href|value-loader
\w
*/g
),
matchedJson
=
val
.
match
(
/json-value|json-string
\w
*/g
),
matchedJson
=
val
.
match
(
/json-value|json-string
\w
*/g
),
...
@@ -266,7 +268,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
...
@@ -266,7 +268,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
htmlTag
=
'<pre class="shrink code-block '
+
(
isMatchJSONStringIsSingle
?
'fixed-height'
:
''
)
+
'">'
+
expandCollapseButton
+
'<code>'
+
val
+
'</code></pre>'
;
htmlTag
=
'<pre class="shrink code-block '
+
(
isMatchJSONStringIsSingle
?
'fixed-height'
:
''
)
+
'">'
+
expandCollapseButton
+
'<code>'
+
val
+
'</code></pre>'
;
}
}
}
}
table
+=
'<tr><td>'
+
(
_
.
escape
(
key
)
+
listCount
)
+
'</td><td>'
+
htmlTag
+
'</td></tr>'
;
table
+=
'<tr
class="'
+
appendClass
+
'"
><td>'
+
(
_
.
escape
(
key
)
+
listCount
)
+
'</td><td>'
+
htmlTag
+
'</td></tr>'
;
}
else
{
}
else
{
table
+=
'<div>'
+
val
+
'</div>'
;
table
+=
'<div>'
+
val
+
'</div>'
;
}
}
...
...
dashboardv2/public/js/utils/Utils.js
View file @
24c9556c
...
@@ -828,5 +828,15 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums',
...
@@ -828,5 +828,15 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums',
return
hours
+
":"
+
minutes
+
":"
+
seconds
+
"."
+
milliseconds
;
return
hours
+
":"
+
minutes
+
":"
+
seconds
+
"."
+
milliseconds
;
}
}
Utils
.
togglePropertyRelationshipTableEmptyValues
=
function
(
object
)
{
var
inputSelector
=
object
.
inputType
,
tableEl
=
object
.
tableEl
;
if
(
inputSelector
.
prop
(
'checked'
)
==
true
)
{
tableEl
.
removeClass
(
'hide-empty-value'
);
}
else
{
tableEl
.
addClass
(
'hide-empty-value'
);
}
}
return
Utils
;
return
Utils
;
});
});
\ No newline at end of file
dashboardv2/public/js/views/entity/EntityDetailTableLayoutView.js
View file @
24c9556c
...
@@ -20,8 +20,9 @@ define(['require',
...
@@ -20,8 +20,9 @@ define(['require',
'backbone'
,
'backbone'
,
'hbs!tmpl/entity/EntityDetailTableLayoutView_tmpl'
,
'hbs!tmpl/entity/EntityDetailTableLayoutView_tmpl'
,
'utils/CommonViewFunction'
,
'utils/CommonViewFunction'
,
'models/VEntity'
'models/VEntity'
,
],
function
(
require
,
Backbone
,
EntityDetailTableLayoutView_tmpl
,
CommonViewFunction
,
VEntity
)
{
'utils/Utils'
],
function
(
require
,
Backbone
,
EntityDetailTableLayoutView_tmpl
,
CommonViewFunction
,
VEntity
,
Utils
)
{
'use strict'
;
'use strict'
;
var
EntityDetailTableLayoutView
=
Backbone
.
Marionette
.
LayoutView
.
extend
(
var
EntityDetailTableLayoutView
=
Backbone
.
Marionette
.
LayoutView
.
extend
(
...
@@ -37,10 +38,17 @@ define(['require',
...
@@ -37,10 +38,17 @@ define(['require',
/** ui selector cache */
/** ui selector cache */
ui
:
{
ui
:
{
detailValue
:
"[data-id='detailValue']"
,
detailValue
:
"[data-id='detailValue']"
,
noValueToggle
:
"[data-id='noValueToggle']"
},
},
/** ui events hash */
/** ui events hash */
events
:
function
()
{
events
:
function
()
{
var
events
=
{};
var
events
=
{};
events
[
"click "
+
this
.
ui
.
noValueToggle
]
=
function
()
{
Utils
.
togglePropertyRelationshipTableEmptyValues
({
"inputType"
:
this
.
ui
.
noValueToggle
,
"tableEl"
:
this
.
ui
.
detailValue
});
};
return
events
;
return
events
;
},
},
/**
/**
...
@@ -58,6 +66,10 @@ define(['require',
...
@@ -58,6 +66,10 @@ define(['require',
entityTableGenerate
:
function
()
{
entityTableGenerate
:
function
()
{
var
table
=
CommonViewFunction
.
propertyTable
({
scope
:
this
,
valueObject
:
this
.
entity
.
attributes
,
attributeDefs
:
this
.
attributeDefs
});
var
table
=
CommonViewFunction
.
propertyTable
({
scope
:
this
,
valueObject
:
this
.
entity
.
attributes
,
attributeDefs
:
this
.
attributeDefs
});
this
.
ui
.
detailValue
.
append
(
table
);
this
.
ui
.
detailValue
.
append
(
table
);
Utils
.
togglePropertyRelationshipTableEmptyValues
({
"inputType"
:
this
.
ui
.
noValueToggle
,
"tableEl"
:
this
.
ui
.
detailValue
});
}
}
});
});
return
EntityDetailTableLayoutView
;
return
EntityDetailTableLayoutView
;
...
...
dashboardv2/public/js/views/graph/RelationshipLayoutView.js
View file @
24c9556c
...
@@ -49,7 +49,8 @@ define(['require',
...
@@ -49,7 +49,8 @@ define(['require',
relationshipSVG
:
"[data-id='relationshipSVG']"
,
relationshipSVG
:
"[data-id='relationshipSVG']"
,
relationshipDetailValue
:
"[data-id='relationshipDetailValue']"
,
relationshipDetailValue
:
"[data-id='relationshipDetailValue']"
,
zoomControl
:
"[data-id='zoomControl']"
,
zoomControl
:
"[data-id='zoomControl']"
,
boxClose
:
'[data-id="box-close"]'
boxClose
:
'[data-id="box-close"]'
,
noValueToggle
:
"[data-id='noValueToggle']"
},
},
/** ui events hash */
/** ui events hash */
...
@@ -63,6 +64,12 @@ define(['require',
...
@@ -63,6 +64,12 @@ define(['require',
events
[
"change "
+
this
.
ui
.
relationshipViewToggle
]
=
function
(
e
)
{
events
[
"change "
+
this
.
ui
.
relationshipViewToggle
]
=
function
(
e
)
{
this
.
relationshipViewToggle
(
e
.
currentTarget
.
checked
)
this
.
relationshipViewToggle
(
e
.
currentTarget
.
checked
)
};
};
events
[
"click "
+
this
.
ui
.
noValueToggle
]
=
function
(
e
)
{
Utils
.
togglePropertyRelationshipTableEmptyValues
({
"inputType"
:
this
.
ui
.
noValueToggle
,
"tableEl"
:
this
.
ui
.
relationshipDetailValue
});
};
return
events
;
return
events
;
},
},
...
@@ -463,6 +470,10 @@ define(['require',
...
@@ -463,6 +470,10 @@ define(['require',
this
.
entityModel
=
new
VEntity
({});
this
.
entityModel
=
new
VEntity
({});
var
table
=
CommonViewFunction
.
propertyTable
({
scope
:
this
,
valueObject
:
this
.
entity
.
relationshipAttributes
,
attributeDefs
:
this
.
attributeDefs
});
var
table
=
CommonViewFunction
.
propertyTable
({
scope
:
this
,
valueObject
:
this
.
entity
.
relationshipAttributes
,
attributeDefs
:
this
.
attributeDefs
});
this
.
ui
.
relationshipDetailValue
.
html
(
table
);
this
.
ui
.
relationshipDetailValue
.
html
(
table
);
Utils
.
togglePropertyRelationshipTableEmptyValues
({
"inputType"
:
this
.
ui
.
noValueToggle
,
"tableEl"
:
this
.
ui
.
relationshipDetailValue
});
},
},
relationshipViewToggle
:
function
(
checked
)
{
relationshipViewToggle
:
function
(
checked
)
{
this
.
ui
.
relationshipDetailTable
.
toggleClass
(
'visible invisible'
);
this
.
ui
.
relationshipDetailTable
.
toggleClass
(
'visible invisible'
);
...
...
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