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
eecff698
Commit
eecff698
authored
Mar 02, 2018
by
pratik24mac
Committed by
Madhan Neethiraj
Mar 05, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2469: UI updates to support propagated tags
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
45e38e85
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
339 additions
and
52 deletions
+339
-52
gruntfile.js
dashboardv2/gruntfile.js
+3
-1
package.json
dashboardv2/package.json
+1
-0
override.scss
dashboardv2/public/css/scss/override.scss
+13
-0
main.js
dashboardv2/public/js/main.js
+7
-0
DetailPageLayoutView_tmpl.html
...c/js/templates/detail_page/DetailPageLayoutView_tmpl.html
+8
-3
SearchLayoutView_tmpl.html
...dv2/public/js/templates/search/SearchLayoutView_tmpl.html
+1
-1
SearchResultLayoutView_tmpl.html
...blic/js/templates/search/SearchResultLayoutView_tmpl.html
+2
-2
SideNavLayoutView_tmpl.html
...rdv2/public/js/templates/site/SideNavLayoutView_tmpl.html
+1
-1
AddTagModalView_tmpl.html
...boardv2/public/js/templates/tag/AddTagModalView_tmpl.html
+31
-1
AddTimezoneView_tmpl.html
...boardv2/public/js/templates/tag/AddTimezoneView_tmpl.html
+35
-0
CreateTagLayoutView_tmpl.html
...dv2/public/js/templates/tag/CreateTagLayoutView_tmpl.html
+2
-2
TagAttributeDetailLayoutView_tmpl.html
...c/js/templates/tag/TagAttributeDetailLayoutView_tmpl.html
+2
-2
TagDetailTableLayoutView_tmpl.html
...ublic/js/templates/tag/TagDetailTableLayoutView_tmpl.html
+7
-0
TagLayoutView_tmpl.html
dashboardv2/public/js/templates/tag/TagLayoutView_tmpl.html
+1
-1
CommonViewFunction.js
dashboardv2/public/js/utils/CommonViewFunction.js
+2
-2
Enums.js
dashboardv2/public/js/utils/Enums.js
+3
-3
Messages.js
dashboardv2/public/js/utils/Messages.js
+5
-5
DetailPageLayoutView.js
...ardv2/public/js/views/detail_page/DetailPageLayoutView.js
+26
-5
SearchResultLayoutView.js
dashboardv2/public/js/views/search/SearchResultLayoutView.js
+1
-1
AddTagModalView.js
dashboardv2/public/js/views/tag/AddTagModalView.js
+0
-0
AddTimezoneItemView.js
dashboardv2/public/js/views/tag/AddTimezoneItemView.js
+138
-0
CreateTagLayoutView.js
dashboardv2/public/js/views/tag/CreateTagLayoutView.js
+1
-1
TagAttributeDetailLayoutView.js
...ardv2/public/js/views/tag/TagAttributeDetailLayoutView.js
+1
-1
TagDetailTableLayoutView.js
dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js
+39
-11
TagLayoutView.js
dashboardv2/public/js/views/tag/TagLayoutView.js
+9
-9
No files found.
dashboardv2/gruntfile.js
View file @
eecff698
...
...
@@ -98,6 +98,7 @@ module.exports = function(grunt) {
'select2.full.min.js'
:
{
'select2/dist/js'
:
'select2'
},
'backgrid-select-all.min.js'
:
{
'backgrid-select-all'
:
'backgrid-select-all'
},
'moment.min.js'
:
{
'moment/min'
:
'moment/js'
},
'moment-timezone-with-data.min.js'
:
{
'moment-timezone/builds'
:
'moment-timezone'
},
'jquery.placeholder.js'
:
{
'jquery-placeholder'
:
'jquery-placeholder/js'
},
'platform.js'
:
{
'platform'
:
'platform'
},
'query-builder.standalone.min.js'
:
{
'jQuery-QueryBuilder/dist/js'
:
'jQueryQueryBuilder/js'
},
...
...
@@ -158,7 +159,8 @@ module.exports = function(grunt) {
{
'd3-tip'
:
'd3/'
},
{
'dagre-d3'
:
'dagre-d3'
},
{
'platform'
:
'platform/'
},
{
'jQuery-QueryBuilder'
:
'jQueryQueryBuilder/'
}
{
'jQuery-QueryBuilder'
:
'jQueryQueryBuilder/'
},
{
'moment-timezone'
:
'moment-timezone'
}
],
'LICENSE.md'
:
[{
'backbone.babysitter'
:
'backbone-babysitter'
},
{
'backbone.wreqr'
:
'backbone-wreqr'
},
...
...
dashboardv2/package.json
View file @
eecff698
...
...
@@ -38,6 +38,7 @@
"jquery-placeholder"
:
"2.3.1"
,
"jquery-sparkline"
:
"2.4.0"
,
"moment"
:
"2.18.1"
,
"moment-timezone"
:
"^0.5.14"
,
"nvd3"
:
"1.8.5"
,
"platform"
:
"1.3.4"
,
"pnotify"
:
"3.2.0"
,
...
...
dashboardv2/public/css/scss/override.scss
View file @
eecff698
...
...
@@ -405,3 +405,15 @@ div.columnmanager-dropdown-container {
.ui-pnotify-icon
span
{
padding
:
2px
0px
;
}
.btn-round-xs
{
border-radius
:
11px
;
padding-left
:
10px
;
padding-right
:
10px
;
background-color
:
transparent
!
important
;
color
:
#626467
;
border
:
1px
solid
black
;
}
.text-center
{
text-align
:
center
!
important
;
}
\ No newline at end of file
dashboardv2/public/js/main.js
View file @
eecff698
...
...
@@ -114,6 +114,12 @@ require.config({
'daterangepicker'
:
{
'deps'
:
[
'jquery'
,
'moment'
]
},
'moment-timezone'
:
{
'deps'
:
[
'moment'
]
},
'moment'
:{
'exports'
:[
'moment'
]
},
'nvd3'
:
{
'deps'
:
[
'd3'
]
},
...
...
@@ -150,6 +156,7 @@ require.config({
'select2'
:
'libs/select2/select2.full.min'
,
'backgrid-select-all'
:
'libs/backgrid-select-all/backgrid-select-all.min'
,
'moment'
:
'libs/moment/js/moment.min'
,
'moment-timezone'
:
'libs/moment-timezone/moment-timezone-with-data.min'
,
'jquery-ui'
:
'external_lib/jquery-ui/jquery-ui.min'
,
'pnotify'
:
'external_lib/pnotify/pnotify.custom.min'
,
'pnotify.buttons'
:
'external_lib/pnotify/pnotify.custom.min'
,
...
...
dashboardv2/public/js/templates/detail_page/DetailPageLayoutView_tmpl.html
View file @
eecff698
...
...
@@ -26,13 +26,18 @@
<div
data-id=
"editButtonContainer"
class=
"pull-right"
></div>
{{/if}}
<div
class=
"form-group"
>
<span
class=
"control-label-sm-pr pull-left"
>
Tag
s:
</span>
<span
class=
"control-label-sm-pr pull-left"
>
Classification
s:
</span>
<div
class=
"pull-left"
data-id=
"tagList"
>
<button
class=
"btn btn-action btn-sm"
title=
"Add
Tag
"
data-id=
"addTag"
>
<button
class=
"btn btn-action btn-sm"
title=
"Add
Classification
"
data-id=
"addTag"
>
<i
class=
"fa fa-plus"
>
</i>
</button>
</div>
</div>
<div
class=
"form-group"
style=
"display: none;"
data-id=
"propagatedTagDiv"
>
<span
class=
"control-label-sm-pr pull-left"
>
Propagated Classifications:
</span>
<div
class=
"pull-left"
data-id=
"propagatedTagList"
>
</div>
</div>
</div>
</div>
<div
class=
"container-fluid gray-bg"
>
...
...
@@ -75,7 +80,7 @@
<div
class=
"col-sm-12"
>
<ul
class=
"nav nav-tabs "
>
<li
role=
"properties"
class=
"tab active"
><a
href=
"#tab-details"
aria-controls=
"tab-details"
role=
"tab"
data-toggle=
"tab"
>
Properties
</a></li>
<li
role=
"tags"
><a
href=
"#tab-tagTable"
aria-controls=
"tab-tagTable"
role=
"tab"
data-toggle=
"tab"
>
Tag
s
</a></li>
<li
role=
"tags"
><a
href=
"#tab-tagTable"
aria-controls=
"tab-tagTable"
role=
"tab"
data-toggle=
"tab"
>
Classification
s
</a></li>
<li
role=
"audits"
class=
"tab"
><a
href=
"#tab-audit"
aria-controls=
"tab-audit"
role=
"tab"
data-toggle=
"tab"
>
Audits
</a></li>
<li
role=
"schema"
class=
"tab schemaTable"
style=
"display:none"
><a
href=
"#tab-schema"
aria-controls=
"tab-schema"
role=
"tab"
data-toggle=
"tab"
>
Schema
</a></li>
<li
role=
"profile"
class=
"tab profileTab"
style=
"display:none"
><a
href=
"#tab-profile"
aria-controls=
"tab-profile"
role=
"tab"
data-toggle=
"tab"
>
Profile
</a></li>
...
...
dashboardv2/public/js/templates/search/SearchLayoutView_tmpl.html
View file @
eecff698
...
...
@@ -45,7 +45,7 @@
</div>
</div>
<div
class=
"srchType tagBox clearfix"
>
<span
class=
"srchTitle"
>
Search By
Tag
</span>
<span
class=
"srchTitle"
>
Search By
Classification
</span>
<div>
<div
class=
"col-sm-10 no-padding"
>
<select
data-id=
"tagLOV"
></select>
...
...
dashboardv2/public/js/templates/search/SearchResultLayoutView_tmpl.html
View file @
eecff698
...
...
@@ -38,12 +38,12 @@
<div
class=
"inline"
data-id=
"containerCheckBox"
style=
"display: none;"
>
<label
class=
"checkbox-inline btn"
for=
"inputLabel"
>
<input
type=
"checkbox"
data-id=
"checkSubClassification"
data-value=
"excludeSC"
/>
<b>
Exclude sub-classification
</b></label>
<b>
Exclude sub-classification
s
</b></label>
</div>
<div
class=
"inline"
data-id=
"containerCheckBox"
style=
"display: none;"
>
<label
class=
"checkbox-inline btn"
for=
"inputLabel"
>
<input
type=
"checkbox"
data-id=
"checkSubType"
data-value=
"excludeST"
/>
<b>
Exclude sub-type
</b></label>
<b>
Exclude sub-type
s
</b></label>
</div>
<div
class=
"inline"
>
<a
href=
"javascript:void(0)"
class=
" multiSelectTag assignTag btn btn-action btn-sm"
style=
"display:none"
data-id=
"addAssignTag"
><i
class=
"fa fa-plus"
></i>
Assign Tag
</a>
...
...
dashboardv2/public/js/templates/site/SideNavLayoutView_tmpl.html
View file @
eecff698
...
...
@@ -20,7 +20,7 @@
</li>
<ul
class=
"tabs"
style=
"width: 100%;"
role=
"tablist"
>
<li
role=
"presentation"
class=
"{{tabClass}}"
><a
href=
"#tab-search"
aria-controls=
"tab-search"
data-name=
"tab-search"
role=
"tab"
data-toggle=
"tab"
class=
""
><i
class=
"fa fa-search"
></i>
Search
</a></li>
<li
role=
"presentation"
class=
"{{tabClass}}"
><a
href=
"#tab-tag"
aria-controls=
"tab-tag"
data-name=
"tab-tag"
role=
"tab"
data-toggle=
"tab"
><i
class=
"fa fa-tags"
></i>
Tags
</a></li>
<li
role=
"presentation"
class=
"{{tabClass}}"
><a
href=
"#tab-tag"
aria-controls=
"tab-tag"
data-name=
"tab-tag"
role=
"tab"
data-toggle=
"tab"
><i
class=
"fa fa-tags"
></i>
Classification
</a></li>
</ul>
</ul>
<div
class=
"tab-content"
>
...
...
dashboardv2/public/js/templates/tag/AddTagModalView_tmpl.html
View file @
eecff698
...
...
@@ -18,9 +18,39 @@
<div
class=
"form-group hide"
>
{{#if tagModel}}
<h4>
{{tagModel.typeName}}
</h4>
{{else}}
<div
class=
"row modalHeight"
>
<div
class=
"col-md-8"
>
<select
class=
"form-control row-margin-bottom"
data-id=
"addTagOptions"
required
>
</select>
</div>
{{/if}}
<div
class=
"col-sm-2"
>
<div
class=
"inline"
>
<label
class=
"checkbox-inline btn"
>
<input
type=
"checkbox"
data-id=
"checkModalTagProperty"
class=
"input"
checked
/>
Propagate
</label>
</div>
</div>
<div
class=
"col-sm-2"
>
<div
class=
"inline-content-fr table-action-btn"
>
<div
class=
"inline"
>
<label
class=
"checkbox-inline btn"
>
<input
type=
"checkbox"
data-id=
"checkTimezoneProperty"
class=
"input"
/>
Apply Validity Period
</label>
</div>
</div>
</div>
</div>
<div
class=
"row modalHeight"
style=
"display: none;"
data-id=
"timeZoneDiv"
>
<hr>
<div
class=
"col-sm-12"
>
<div
class=
"clearfix form-group"
>
<button
type=
"button"
class=
"btn btn-action btn-sm pull-right"
data-id=
"addTimezoneParms"
><i
class=
"fa fa-plus"
></i>
Add Validity Period
</button>
</div>
<div
class=
"panel panel-default"
data-id=
"validityPeriodBody"
style=
"display: none;"
>
<div
class=
"panel-body"
data-id=
"addTimezoneDiv"
>
</div>
</div>
</div>
</div>
</div>
<div
class=
"row modalHeight"
>
<div
class=
"col-sm-12"
>
...
...
@@ -29,7 +59,7 @@
</div>
</div>
<div
class=
"col-sm-12"
style=
"display:none"
>
<p>
Tag
Attributes(optional)
</p>
<p>
Classification
Attributes(optional)
</p>
<p
class=
"text-gray"
>
Add attribute values for this tag
</p>
<div
data-id=
"tagAttribute"
></div>
</div>
...
...
dashboardv2/public/js/templates/tag/AddTimezoneView_tmpl.html
0 → 100644
View file @
eecff698
<!--
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
-->
<div
class=
"form-group clearfix"
>
<div
class=
"col-sm-4"
>
<label
for=
""
>
Start Time
</label>
<input
type=
"text"
class=
"form-control"
name=
"startTime"
data-id=
"startTime"
/>
</div>
<div
class=
"col-sm-4"
>
<label
for=
""
>
End Time
</label>
<input
type=
"text"
class=
"form-control"
name=
"endTime"
data-id=
"endTime"
/>
</div>
<div
class=
"col-sm-3"
>
<label
for=
""
>
TimeZone
</label>
<select
class=
"form-control row-margin-bottom"
data-id=
"timeZone"
required
>
</select>
</div>
<div
class=
"col-sm-1 attributePlusData"
align=
"right"
>
<button
type=
"button"
class=
"btn btn-danger btn-sm closeInput"
data-id=
"close"
><i
class=
"fa fa-times"
></i></button>
</div>
</div>
\ No newline at end of file
dashboardv2/public/js/templates/tag/CreateTagLayoutView_tmpl.html
View file @
eecff698
...
...
@@ -36,8 +36,8 @@
{{#if create}}
<div
class=
"form-group"
>
<div
class=
"col-sm-12"
>
<label>
Select
tags
to inherit attributes(optional)
</label>
<p
class=
"text-gray"
>
Attributes define additional properties for the
tag
</p>
<label>
Select
classification
to inherit attributes(optional)
</label>
<p
class=
"text-gray"
>
Attributes define additional properties for the
classification
</p>
<select
class=
"form-control"
data-id=
"parentTagList"
multiple=
"multiple"
></select>
</div>
</div>
...
...
dashboardv2/public/js/templates/tag/TagAttributeDetailLayoutView_tmpl.html
View file @
eecff698
...
...
@@ -23,12 +23,12 @@
<button
type=
"button"
data-id=
"editButton"
class=
"btn btn-sm btn-action pull-right"
><i
class=
"fa fa-pencil"
></i></button>
<p
class=
"form-group"
data-id=
"description"
></p>
<div
class=
"superType form-group"
style=
"display:none"
>
<label
class=
"control-label-sm-pr pull-left"
>
Direct super-
tag
s:
</label>
<label
class=
"control-label-sm-pr pull-left"
>
Direct super-
classification
s:
</label>
<div
data-id=
"superType"
class=
"btn-inline"
>
</div>
</div>
<div
class=
"subType form-group"
style=
"display:none"
>
<label
class=
"control-label-sm-pr pull-left"
>
Direct sub-
tag
s:
</label>
<label
class=
"control-label-sm-pr pull-left"
>
Direct sub-
classification
s:
</label>
<div
data-id=
"subType"
class=
"btn-inline"
>
</div>
</div>
...
...
dashboardv2/public/js/templates/tag/TagDetailTableLayoutView_tmpl.html
View file @
eecff698
...
...
@@ -16,5 +16,11 @@
-->
<div>
<div
class=
"tableOverlay"
></div>
<div
class=
"inline-content-fr table-action-btn"
>
<div
class=
"inline"
>
<label
class=
"checkbox-inline btn"
>
<input
type=
"checkbox"
data-id=
"checkPropagtedTag"
class=
"input"
checked=
"true"
name=
"queryType"
value=
"text"
name=
"check"
value=
"1"
/>
Show Propagated Classifications
</label>
</div>
</div>
<div
id=
"r_tagTableLayoutView"
></div>
</div>
\ No newline at end of file
dashboardv2/public/js/templates/tag/TagLayoutView_tmpl.html
View file @
eecff698
...
...
@@ -35,7 +35,7 @@
</div> -->
<div
class=
"row"
>
<div
class=
"list-view col-sm-12"
>
<input
type=
"text"
class=
"form-control"
data-id=
"offlineSearchTag"
placeholder=
"Search
Tags
"
>
<input
type=
"text"
class=
"form-control"
data-id=
"offlineSearchTag"
placeholder=
"Search
Classification
"
>
<ul
class=
"tag-tree"
data-id=
"tagsList"
>
</ul>
</div>
...
...
dashboardv2/public/js/utils/CommonViewFunction.js
View file @
eecff698
...
...
@@ -43,7 +43,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
skipDefaultError
:
true
,
success
:
function
(
data
)
{
Utils
.
notifySuccess
({
content
:
"
Tag
"
+
options
.
tagName
+
Messages
.
removeSuccessMessage
content
:
"
Classification
"
+
options
.
tagName
+
Messages
.
removeSuccessMessage
});
if
(
options
.
callback
)
{
options
.
callback
();
...
...
@@ -285,7 +285,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
queryArray
.
push
(
typeKeyValue
)
}
if
(
value
.
tag
)
{
var
tagKeyValue
=
'<span class="key">
Tag
:</span> <span class="value">'
+
_
.
escape
(
value
.
tag
)
+
'</span>'
;
var
tagKeyValue
=
'<span class="key">
Classification
:</span> <span class="value">'
+
_
.
escape
(
value
.
tag
)
+
'</span>'
;
if
(
tagFilters
)
{
tagKeyValue
+=
' <span class="operator">AND</span> (<span class="operator">'
+
tagFilters
.
condition
+
'</span> ('
+
objToString
(
tagFilters
)
+
'))'
;
}
...
...
dashboardv2/public/js/utils/Enums.js
View file @
eecff698
...
...
@@ -25,9 +25,9 @@ define(['require'], function(require) {
ENTITY_CREATE
:
"Entity Created"
,
ENTITY_UPDATE
:
"Entity Updated"
,
ENTITY_DELETE
:
"Entity Deleted"
,
TAG_ADD
:
"
Tag
Added"
,
TAG_DELETE
:
"
Tag
Deleted"
,
TAG_UPDATE
:
"
Tag
Updated"
,
TAG_ADD
:
"
Classification
Added"
,
TAG_DELETE
:
"
Classification
Deleted"
,
TAG_UPDATE
:
"
Classification
Updated"
,
ENTITY_IMPORT_CREATE
:
"Entity Created by import"
,
ENTITY_IMPORT_UPDATE
:
"Entity Updated by import"
,
ENTITY_IMPORT_DELETE
:
"Entity Deleted by import"
...
...
dashboardv2/public/js/utils/Messages.js
View file @
eecff698
...
...
@@ -23,20 +23,20 @@ define(['require'], function(require) {
defaultErrorMessage
:
"Something went wrong"
,
addSuccessMessage
:
" has been created successfully"
,
addErrorMessage
:
" could not be Created"
,
removeTag
:
"Remove
Tag
Assignment"
,
removeTag
:
"Remove
Classification
Assignment"
,
deleteSuccessMessage
:
" has been deleted successfully"
,
deleteErrorMessage
:
" could not be deleted"
,
removeSuccessMessage
:
" has been removed successfully"
,
removeErrorMessage
:
" could not be removed"
,
editSuccessMessage
:
" has been updated successfully"
,
assignDeletedEntity
:
" is deleted,
tag
cannot be assigned"
,
assignDeletedEntity
:
" is deleted,
Classification
cannot be assigned"
,
conformation
:
{
deleteMessage
:
"Are you sure you want to delete "
},
search
:
{
noRecordForPage
:
"No record found at "
,
onSamePage
:
"You are on the same page!"
,
notExists
:
"Invalid Expression or
Tag
/Type has been deleted."
,
notExists
:
"Invalid Expression or
Classification
/Type has been deleted."
,
favoriteSearch
:
{
save
:
"Do you want to overwrite "
,
notSelectedFavoriteElement
:
"Please select any one favorite search"
,
...
...
@@ -44,8 +44,8 @@ define(['require'], function(require) {
}
},
tag
:
{
addAttributeSuccessMessage
:
"
Tag
attribute is added successfully"
,
updateTagDescriptionMessage
:
"
Tag
description is updated successfully"
addAttributeSuccessMessage
:
"
Classification
attribute is added successfully"
,
updateTagDescriptionMessage
:
"
Classification
description is updated successfully"
}
};
return
Messages
;
...
...
dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
View file @
eecff698
...
...
@@ -50,6 +50,7 @@ define(['require',
/** ui selector cache */
ui
:
{
tagClick
:
'[data-id="tagClick"]'
,
propagatedTagDiv
:
'[data-id="propagatedTagDiv"]'
,
title
:
'[data-id="title"]'
,
editButton
:
'[data-id="editButton"]'
,
editButtonContainer
:
'[data-id="editButtonContainer"]'
,
...
...
@@ -59,6 +60,7 @@ define(['require',
backButton
:
"[data-id='backButton']"
,
addTag
:
'[data-id="addTag"]'
,
tagList
:
'[data-id="tagList"]'
,
propagatedTagList
:
'[data-id="propagatedTagList"]'
,
fullscreenPanel
:
"#fullscreen_panel"
},
templateHelpers
:
function
()
{
...
...
@@ -302,12 +304,27 @@ define(['require',
},
generateTag
:
function
(
tagObject
)
{
var
that
=
this
,
tagData
=
""
;
tagData
=
""
,
propagatedTagListData
=
""
,
tag
=
{
'self'
:
[],
'propagated'
:
[]
};
_
.
each
(
tagObject
,
function
(
val
)
{
tagData
+=
'<span class="btn btn-action btn-sm btn-icon btn-blue" data-id="tagClick"><span>'
+
val
.
typeName
+
'</span><i class="fa fa-close" data-id="deleteTag" data-type="tag"></i></span>'
;
val
.
entityGuid
===
that
.
id
?
tag
[
'self'
].
push
(
val
)
:
tag
[
'propagated'
].
push
(
val
);
});
_
.
each
(
tag
.
self
,
function
(
val
)
{
tagData
+=
'<span class="btn btn-action btn-sm btn-icon btn-blue" title='
+
val
.
typeName
+
' data-id="tagClick"><span>'
+
val
.
typeName
+
'</span><i class="fa fa-close" data-id="deleteTag" data-type="tag" title="Delete Tag"></i></span>'
;
});
_
.
each
(
tag
.
propagated
,
function
(
val
)
{
propagatedTagListData
+=
'<span class="btn btn-action btn-sm btn-icon btn-blue" title='
+
val
.
typeName
+
' data-id="tagClick"><span>'
+
val
.
typeName
+
'</span></span>'
;
});
propagatedTagListData
!==
""
?
this
.
ui
.
propagatedTagDiv
.
show
()
:
this
.
ui
.
propagatedTagDiv
.
hide
();
this
.
ui
.
tagList
.
find
(
"span.btn"
).
remove
();
this
.
ui
.
propagatedTagList
.
find
(
"span.btn"
).
remove
();
this
.
ui
.
tagList
.
prepend
(
tagData
);
this
.
ui
.
propagatedTagList
.
html
(
propagatedTagListData
);
},
hideLoader
:
function
()
{
Utils
.
hideTitleLoader
(
this
.
$
(
'.page-title .fontLoader'
),
this
.
$
(
'.entityDetail'
));
...
...
@@ -318,11 +335,15 @@ define(['require',
onClickAddTagBtn
:
function
(
e
)
{
var
that
=
this
;
require
([
'views/tag/AddTagModalView'
],
function
(
AddTagModalView
)
{
var
tagList
=
[];
_
.
map
(
that
.
entityObject
.
entity
.
classifications
,
function
(
obj
)
{
if
(
obj
.
entityGuid
===
that
.
id
)
{
tagList
.
push
(
obj
.
typeName
);
}
});
var
view
=
new
AddTagModalView
({
guid
:
that
.
id
,
tagList
:
_
.
map
(
that
.
entityObject
.
entity
.
classifications
,
function
(
obj
)
{
return
obj
.
typeName
;
}),
tagList
:
tagList
,
callback
:
function
()
{
that
.
fetchCollection
();
},
...
...
dashboardv2/public/js/views/search/SearchResultLayoutView.js
View file @
eecff698
...
...
@@ -779,7 +779,7 @@ define(['require',
col
=
options
.
col
;
if
(
col
)
{
col
[
'tag'
]
=
{
label
:
"
Tag
s"
,
label
:
"
Classification
s"
,
cell
:
"Html"
,
editable
:
false
,
sortable
:
false
,
...
...
dashboardv2/public/js/views/tag/AddTagModalView.js
View file @
eecff698
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/tag/AddTimezoneItemView.js
0 → 100644
View file @
eecff698
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
define
([
'require'
,
'backbone'
,
'hbs!tmpl/tag/AddTimezoneView_tmpl'
,
'moment'
,
'moment-timezone'
,
'daterangepicker'
],
function
(
require
,
Backbone
,
AddTimezoneViewTmpl
,
moment
)
{
'use strict'
;
return
Backbone
.
Marionette
.
ItemView
.
extend
(
/** @lends GlobalExclusionListView */
{
template
:
AddTimezoneViewTmpl
,
/** Layout sub regions */
regions
:
{},
/** ui selector cache */
ui
:
{
close
:
"[data-id='close']"
,
startTime
:
'input[name="startTime"]'
,
endTime
:
'input[name="endTime"]'
,
timeZone
:
'[data-id="timeZone"]'
},
/** ui events hash */
events
:
function
()
{
var
events
=
{};
events
[
"change "
+
this
.
ui
.
startTime
]
=
function
(
e
)
{
this
.
model
.
set
({
"startTime"
:
this
.
ui
.
startTime
.
val
()
});
this
.
buttonActive
({
isButtonActive
:
true
});
};
events
[
"change "
+
this
.
ui
.
endTime
]
=
function
(
e
)
{
this
.
model
.
set
({
"endTime"
:
this
.
ui
.
endTime
.
val
()
});
this
.
buttonActive
({
isButtonActive
:
true
});
};
events
[
"change "
+
this
.
ui
.
timeZone
]
=
function
(
e
)
{
this
.
model
.
set
({
"timeZone"
:
this
.
ui
.
timeZone
.
val
()
});
this
.
buttonActive
({
isButtonActive
:
true
});
};
events
[
"click "
+
this
.
ui
.
close
]
=
'onCloseButton'
;
return
events
;
},
/**
* intialize a new GlobalExclusionComponentView Layout
* @constructs
*/
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'parentView'
,
'model'
,
'tagModel'
));
},
onRender
:
function
()
{
var
that
=
this
,
dateObj
=
{
"singleDatePicker"
:
true
,
"showDropdowns"
:
true
,
"timePicker"
:
true
,
"startDate"
:
new
Date
(),
"timePickerIncrement"
:
30
,
"locale"
:
{
format
:
'YYYY/MM/DD HH:MM:SS'
}
},
tzstr
=
'<option selected="selected" disabled="disabled">-- Select Timezone --</option>'
;
if
(
this
.
model
.
get
(
'startTime'
)
!==
""
)
{
this
.
ui
.
startTime
.
daterangepicker
({
"singleDatePicker"
:
true
,
"showDropdowns"
:
true
,
"timePicker"
:
true
,
"startDate"
:
this
.
model
.
get
(
'startTime'
),
"timePickerIncrement"
:
30
,
"locale"
:
{
format
:
'YYYY/MM/DD HH:MM:SS'
}
});
this
.
ui
.
endTime
.
daterangepicker
({
"singleDatePicker"
:
true
,
"showDropdowns"
:
true
,
"timePicker"
:
true
,
"startDate"
:
this
.
model
.
get
(
'endTime'
),
"timePickerIncrement"
:
30
,
"locale"
:
{
format
:
'YYYY/MM/DD HH:MM:SS'
}
});
this
.
ui
.
timeZone
.
select2
({
data
:
moment
.
tz
.
names
()
});
this
.
ui
.
timeZone
.
val
(
this
.
model
.
get
(
'timeZone'
)).
trigger
(
"change"
,
{
'manual'
:
true
});
}
else
{
this
.
ui
.
startTime
.
daterangepicker
(
dateObj
);
this
.
ui
.
endTime
.
daterangepicker
(
dateObj
);
this
.
ui
.
timeZone
.
html
(
tzstr
);
this
.
ui
.
timeZone
.
select2
({
placeholder
:
"Select TimeZone"
,
allowClear
:
true
,
data
:
moment
.
tz
.
names
()
});
}
},
buttonActive
:
function
(
option
)
{
var
that
=
this
;
if
(
option
&&
option
.
isButtonActive
&&
that
.
tagModel
)
{
var
isButton
=
option
.
isButtonActive
;
this
.
parentView
.
modal
.
$el
.
find
(
'button.ok'
).
attr
(
"disabled"
,
isButton
===
true
?
false
:
true
);
}
},
onCloseButton
:
function
()
{
if
(
this
.
parentView
.
collection
.
models
.
length
>
0
)
{
this
.
model
.
destroy
();
}
if
(
this
.
parentView
.
collection
.
models
.
length
<=
0
)
{
this
.
parentView
.
ui
.
timeZoneDiv
.
hide
();
this
.
parentView
.
ui
.
checkTimeZone
.
prop
(
'checked'
,
false
);
this
.
parentView
.
modal
.
$el
.
find
(
'button.ok'
).
attr
(
"disabled"
,
true
);
}
}
});
});
\ No newline at end of file
dashboardv2/public/js/views/tag/CreateTagLayoutView.js
View file @
eecff698
...
...
@@ -109,7 +109,7 @@ define(['require',
if
(
platform
.
name
===
"IE"
)
{
that
.
ui
.
parentTag
.
select2
({
multiple
:
true
,
placeholder
:
"Search
Tags
"
,
placeholder
:
"Search
Classification
"
,
allowClear
:
true
});
}
...
...
dashboardv2/public/js/views/tag/TagAttributeDetailLayoutView.js
View file @
eecff698
...
...
@@ -292,7 +292,7 @@ define(['require',
],
function
(
CreateTagLayoutView
,
Modal
)
{
var
view
=
new
CreateTagLayoutView
({
'tagCollection'
:
that
.
collection
,
'model'
:
that
.
model
,
'tag'
:
that
.
tag
,
'enumDefCollection'
:
enumDefCollection
});
that
.
modal
=
new
Modal
({
title
:
'Edit
Tag
'
,
title
:
'Edit
Classification
'
,
content
:
view
,
cancelText
:
"Cancel"
,
okText
:
'Save'
,
...
...
dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js
View file @
eecff698
...
...
@@ -44,6 +44,8 @@ define(['require',
addTag
:
"[data-id='addTag']"
,
deleteTag
:
"[data-id='delete']"
,
editTag
:
"[data-id='edit']"
,
checkPropagtedTag
:
"[data-id='checkPropagtedTag']"
,
propagatedFromClick
:
"[data-id='propagatedFromClick']"
},
/** ui events hash */
events
:
function
()
{
...
...
@@ -57,6 +59,14 @@ define(['require',
events
[
"click "
+
this
.
ui
.
editTag
]
=
function
(
e
)
{
this
.
editTagDataModal
(
e
);
};
events
[
"click "
+
this
.
ui
.
propagatedFromClick
]
=
function
(
e
)
{
Utils
.
setUrl
({
url
:
'#!/detailPage/'
+
e
.
currentTarget
.
dataset
.
guid
,
mergeBrowserUrl
:
false
,
trigger
:
true
});
};
events
[
"click "
+
this
.
ui
.
checkPropagtedTag
]
=
'onCheckPropagtedTag'
;
return
events
;
},
/**
...
...
@@ -97,19 +107,24 @@ define(['require',
})));
});
},
getSchemaTableColumns
:
function
()
{
var
that
=
this
;
var
col
=
{};
getSchemaTableColumns
:
function
(
options
)
{
var
that
=
this
,
col
=
{};
return
this
.
tagCollection
.
constructor
.
getTableCols
({
tag
:
{
label
:
"
Tags
"
,
cell
:
"
String
"
,
label
:
"
Classification
"
,
cell
:
"
html
"
,
editable
:
false
,
sortable
:
false
,
formatter
:
_
.
extend
({},
Backgrid
.
CellFormatter
.
prototype
,
{
fromRaw
:
function
(
rawValue
,
model
)
{
return
model
.
get
(
'typeName'
);
if
(
that
.
guid
!==
model
.
get
(
'entityGuid'
)
)
{
var
propagtedFrom
=
' <span class="btn btn-action btn-sm btn-icon btn-blue" title="Propagated From" data-guid='
+
model
.
get
(
'entityGuid'
)
+
' data-id="propagatedFromClick"><span> Propagated From </span></span>'
;
return
'<a title="" href="#!/tag/tagAttribute/'
+
model
.
get
(
'typeName'
)
+
'">'
+
model
.
get
(
'typeName'
)
+
'</a>'
+
propagtedFrom
;
}
else
{
return
'<a title="'
+
model
.
get
(
'typeName'
)
+
'" href="#!/tag/tagAttribute/'
+
model
.
get
(
'typeName'
)
+
'">'
+
model
.
get
(
'typeName'
)
+
'</a>'
;
}
}
})
},
...
...
@@ -145,7 +160,7 @@ define(['require',
})
},
tool
:
{
label
:
"
Tool
"
,
label
:
"
Action
"
,
cell
:
"html"
,
editable
:
false
,
sortable
:
false
,
...
...
@@ -154,12 +169,11 @@ define(['require',
var
deleteData
=
'<button title="Delete" class="btn btn-action btn-sm" data-id="delete" data-name="'
+
model
.
get
(
'typeName'
)
+
'"><i class="fa fa-trash"></i></button>'
,
editData
=
'<button title="Edit" class="btn btn-action btn-sm" data-id="edit" data-name="'
+
model
.
get
(
'typeName'
)
+
'"><i class="fa fa-pencil"></i></button>'
,
btnObj
=
null
;
if
(
model
.
get
(
'attributes'
)
===
undefined
)
{
btnObj
=
deleteData
;
if
(
that
.
guid
===
model
.
get
(
'entityGuid'
)
)
{
return
'<div class="btn-inline">'
+
deleteData
+
editData
+
'</div>'
}
else
{
btnObj
=
deleteData
+
editData
;
return
;
}
return
'<div class="btn-inline">'
+
btnObj
+
'</div>'
}
})
},
...
...
@@ -233,6 +247,20 @@ define(['require',
'enumDefCollection'
:
that
.
enumDefCollection
});
});
},
onCheckPropagtedTag
:
function
(
e
)
{
var
that
=
this
,
tags
=
_
.
toArray
(
that
.
collectionObject
.
classifications
),
unPropagatedTags
=
[];
e
.
stopPropagation
();
if
(
e
.
target
.
checked
)
{
that
.
tagCollection
.
reset
(
tags
);
}
else
{
unPropagatedTags
=
_
.
filter
(
tags
,
function
(
val
){
return
that
.
guid
===
val
.
entityGuid
;
});
that
.
tagCollection
.
reset
(
unPropagatedTags
);
}
}
});
return
TagDetailTableLayoutView
;
...
...
dashboardv2/public/js/views/tag/TagLayoutView.js
View file @
eecff698
...
...
@@ -124,7 +124,7 @@ define(['require',
});
that
.
ui
.
treeLov
.
html
(
treeStr
);
that
.
ui
.
treeLov
.
select2
({
placeholder
:
"Search
tag
"
,
placeholder
:
"Search
Classification
"
,
allowClear
:
true
});
},
...
...
@@ -349,7 +349,7 @@ define(['require',
var
name
=
(
!
(
nodeName
==
"BUTTON"
)
?
that
.
query
[
that
.
viewType
].
tagName
:
null
);
var
view
=
new
CreateTagLayoutView
({
'tagCollection'
:
that
.
collection
,
'selectedTag'
:
name
,
'enumDefCollection'
:
enumDefCollection
}),
modal
=
new
Modal
({
title
:
'Create a new
tag
'
,
title
:
'Create a new
classification
'
,
content
:
view
,
cancelText
:
"Cancel"
,
okCloses
:
false
,
...
...
@@ -368,7 +368,7 @@ define(['require',
modal
.
on
(
'shownModal'
,
function
()
{
view
.
ui
.
parentTag
.
select2
({
multiple
:
true
,
placeholder
:
"Search
Tags
"
,
placeholder
:
"Search
Classification
"
,
allowClear
:
true
});
});
...
...
@@ -493,7 +493,7 @@ define(['require',
that
.
collection
.
fullCollection
.
add
(
classificationDefs
);
that
.
setUrl
(
'#!/tag/tagAttribute/'
+
ref
.
ui
.
tagName
.
val
(),
true
);
Utils
.
notifySuccess
({
content
:
"
Tag
"
+
that
.
name
+
Messages
.
addSuccessMessage
content
:
"
Classification
"
+
that
.
name
+
Messages
.
addSuccessMessage
});
modal
.
trigger
(
'cancel'
);
that
.
typeHeaders
.
fetch
({
reset
:
true
});
...
...
@@ -529,9 +529,9 @@ define(['require',
popoverOptions
:
{
content
:
function
()
{
return
"<ul>"
+
"<li class='listTerm' ><i class='fa fa-search'></i> <a href='javascript:void(0)' data-fn='onSearchTag'>Search
Tag
</a></li>"
+
"<li class='listTerm' ><i class='fa fa-plus'></i> <a href='javascript:void(0)' data-fn='onClickCreateTag'>Create Sub-
tag
</a></li>"
+
"<li class='listTerm' ><i class='fa fa-trash-o'></i> <a href='javascript:void(0)' data-fn='onDeleteTag'>Delete
Tag
</a></li>"
+
"<li class='listTerm' ><i class='fa fa-search'></i> <a href='javascript:void(0)' data-fn='onSearchTag'>Search
Classification
</a></li>"
+
"<li class='listTerm' ><i class='fa fa-plus'></i> <a href='javascript:void(0)' data-fn='onClickCreateTag'>Create Sub-
classification
</a></li>"
+
"<li class='listTerm' ><i class='fa fa-trash-o'></i> <a href='javascript:void(0)' data-fn='onDeleteTag'>Delete
Classification
</a></li>"
+
"</ul>"
;
}
}
...
...
@@ -563,7 +563,7 @@ define(['require',
},
cancel
:
function
(
argument
)
{}
}
var
text
=
"Are you sure you want to delete the
tag
"
var
text
=
"Are you sure you want to delete the
classification
"
notifyObj
[
'text'
]
=
text
;
Utils
.
notifyConfirm
(
notifyObj
);
},
...
...
@@ -581,7 +581,7 @@ define(['require',
data
:
JSON
.
stringify
(
deleteJson
),
success
:
function
()
{
Utils
.
notifySuccess
({
content
:
"
Tag
"
+
that
.
tag
+
Messages
.
deleteSuccessMessage
content
:
"
Classification
"
+
that
.
tag
+
Messages
.
deleteSuccessMessage
});
// if deleted tag is prviously searched then remove that tag url from save state of tab.
var
searchUrl
=
Globals
.
saveApplicationState
.
tabState
.
searchUrl
;
...
...
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