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
58a58956
Commit
58a58956
authored
Feb 24, 2020
by
kevalbhatt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3624 : Beta UI : Allow user to add mutlti-valued attributes in namespaces
parent
91d2b8ea
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
154 additions
and
162 deletions
+154
-162
namespace.scss
dashboardv3/public/css/scss/namespace.scss
+14
-4
DetailPageLayoutView_tmpl.html
...c/js/templates/detail_page/DetailPageLayoutView_tmpl.html
+5
-1
NameSpaceAttributeItemView_tmpl.html
...templates/name_space/NameSpaceAttributeItemView_tmpl.html
+2
-2
Header.html
dashboardv3/public/js/templates/site/Header.html
+1
-1
Globals.js
dashboardv3/public/js/utils/Globals.js
+2
-1
Utils.js
dashboardv3/public/js/utils/Utils.js
+4
-0
AdministratorLayoutView.js
.../public/js/views/administrator/AdministratorLayoutView.js
+2
-2
AuditTableLayoutView.js
dashboardv3/public/js/views/audit/AuditTableLayoutView.js
+1
-0
DetailPageLayoutView.js
...ardv3/public/js/views/detail_page/DetailPageLayoutView.js
+4
-2
EntityNameSpaceItemView.js
...boardv3/public/js/views/entity/EntityNameSpaceItemView.js
+0
-0
EntityNameSpaceView.js
dashboardv3/public/js/views/entity/EntityNameSpaceView.js
+33
-34
CreateNameSpaceLayoutView.js
...3/public/js/views/name_space/CreateNameSpaceLayoutView.js
+2
-6
EnumCreateUpdateItemView.js
...v3/public/js/views/name_space/EnumCreateUpdateItemView.js
+8
-0
NameSpaceAttrTableLayoutView.js
...ublic/js/views/name_space/NameSpaceAttrTableLayoutView.js
+3
-2
NameSpaceAttributeItemView.js
.../public/js/views/name_space/NameSpaceAttributeItemView.js
+9
-15
NameSpaceContainerLayoutView.js
...ublic/js/views/name_space/NameSpaceContainerLayoutView.js
+2
-1
NameSpaceTableLayoutView.js
...v3/public/js/views/name_space/NameSpaceTableLayoutView.js
+5
-3
QueryBuilderView.js
dashboardv3/public/js/views/search/QueryBuilderView.js
+18
-18
SearchFilterBrowseLayoutView.js
...v3/public/js/views/search/SearchFilterBrowseLayoutView.js
+1
-1
SearchResultLayoutView.js
dashboardv3/public/js/views/search/SearchResultLayoutView.js
+16
-1
NameSpaceTreeLayoutView.js
...v3/public/js/views/search/tree/NameSpaceTreeLayoutView.js
+11
-68
Header.js
dashboardv3/public/js/views/site/Header.js
+11
-0
No files found.
dashboardv3/public/css/scss/namespace.scss
View file @
58a58956
...
...
@@ -24,8 +24,19 @@
}
.namespace-tree-child
{
padding-left
:
20px
;
&
.entity-detail-table
table
{
td
{
&
:nth-child
(
1
)
{
width
:
35%
;
}
word-break
:
break-all
;
}
}
padding-left
:
5px
;
margin-top
:
10px
;
font-weight
:
100
;
}
}
...
...
@@ -61,8 +72,8 @@
.expandable
.attr-details
{
max-height
:
300px
;
overflow
:
auto
;
margin-left
:
10
0px
;
width
:
calc
(
100%
-
10
0px
);
margin-left
:
3
0px
;
width
:
calc
(
100%
-
3
0px
);
}
}
...
...
@@ -124,7 +135,6 @@
.name-space-details
{
.backgrid
{
td
.expandable-content
{
width
:
100%
;
max-width
:
none
;
background
:
#f8f8f8
;
...
...
dashboardv3/public/js/templates/detail_page/DetailPageLayoutView_tmpl.html
View file @
58a58956
...
...
@@ -77,7 +77,11 @@
</div>
</div>
<div
class=
"col-md-6"
>
<div
id=
"r_entityUserDefineView"
></div>
<div
id=
"r_entityUserDefineView"
>
<div
class=
"fontLoader-relative"
>
<i
class=
"fa fa-refresh fa-spin-custom"
></i>
</div>
</div>
<div
id=
"r_entityLabelDefineView"
></div>
<div
id=
"r_entityNameSpaceView"
></div>
</div>
...
...
dashboardv3/public/js/templates/name_space/NameSpaceAttributeItemView_tmpl.html
View file @
58a58956
...
...
@@ -44,12 +44,12 @@
</select>
</div>
</div>
<
!-- <
div class="form-group" data-id="multiValueSelect">
<div
class=
"form-group"
data-id=
"multiValueSelect"
>
<label
class=
"control-label col-sm-3"
for=
"multiValSelect"
>
Enable Multivalues
</label>
<div
class=
"col-sm-8"
>
<input
type=
"checkbox"
class=
"form-check-input multi-value-select"
data-id=
"multiValueSelectStatus"
>
</div>
</div>
-->
</div>
<div
class=
"form-group enumtype-container"
data-id=
"enumTypeSelectorContainer"
>
<div
class=
""
>
<label
class=
"control-label col-sm-3 required"
for=
"enumType"
>
Enum Name
</label>
...
...
dashboardv3/public/js/templates/site/Header.html
View file @
58a58956
...
...
@@ -42,7 +42,7 @@
</tr>
</table>
<ul
class=
"dropdown-menu pull-right multi-level"
role=
"menu"
aria-labelledby=
"dropdownMenu"
>
<li><a
href=
"
#!/administrator"
data-id=
"purgeSearch"
>
Administration
</a></li>
<li><a
href=
"
javascript:void(0)"
data-id=
'administrator'
>
Administration
</a></li>
<li
class=
"dropdown-submenu"
>
<a
tabindex=
"-1"
href=
"javascript:void(0)"
>
Help
</span></a>
<ul
class=
"dropdown-menu"
>
...
...
dashboardv3/public/js/utils/Globals.js
View file @
58a58956
...
...
@@ -28,7 +28,8 @@ define(['require'], function(require) {
stateChanged
:
false
,
tagUrl
:
"#!/tag"
,
searchUrl
:
"#!/search"
,
glossaryUrl
:
"#!/glossary"
glossaryUrl
:
"#!/glossary"
,
administratorUrl
:
"#!/administrator"
},
detailPageState
:
{}
};
...
...
dashboardv3/public/js/utils/Utils.js
View file @
58a58956
...
...
@@ -340,6 +340,8 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums',
urlUpdate
[
'searchUrl'
]
=
options
.
url
;
}
else
if
(
Utils
.
getUrlState
.
isGlossaryTab
(
options
.
url
))
{
urlUpdate
[
'glossaryUrl'
]
=
options
.
url
;
}
else
if
(
Utils
.
getUrlState
.
isAdministratorTab
(
options
.
url
))
{
urlUpdate
[
'administratorUrl'
]
=
options
.
url
;
}
$
.
extend
(
Globals
.
saveApplicationState
.
tabState
,
urlUpdate
);
}
...
...
@@ -561,6 +563,8 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums',
urlPath
=
"tagUrl"
;
}
else
if
(
queryParams
.
from
==
"glossary"
)
{
urlPath
=
"glossaryUrl"
;
}
else
if
(
queryParams
.
from
==
"namespace"
)
{
urlPath
=
"administratorUrl"
;
}
}
Utils
.
setUrl
({
...
...
dashboardv3/public/js/views/administrator/AdministratorLayoutView.js
View file @
58a58956
...
...
@@ -67,7 +67,7 @@ define(['require',
* @constructs
*/
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'value'
,
'guid'
,
'entity'
,
'entityName'
,
'attributeDefs'
,
'nameSpaceCollection'
,
'enumDefCollection'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'value'
,
'guid'
,
'entity'
,
'entityName'
,
'attributeDefs'
,
'
entityDefCollection'
,
'
nameSpaceCollection'
,
'enumDefCollection'
));
},
onShow
:
function
()
{
...
...
@@ -87,7 +87,7 @@ define(['require',
renderNameSpaceLayoutView
:
function
(
obj
)
{
var
that
=
this
;
require
([
'views/name_space/NameSpaceTableLayoutView'
],
function
(
NameSpaceTableLayoutView
)
{
that
.
RNamespaceTableLayoutView
.
show
(
new
NameSpaceTableLayoutView
({
nameSpaceCollection
:
that
.
nameSpaceCollection
}));
that
.
RNamespaceTableLayoutView
.
show
(
new
NameSpaceTableLayoutView
({
nameSpaceCollection
:
that
.
nameSpaceCollection
,
entityDefCollection
:
that
.
entityDefCollection
}));
});
},
renderEnumLayoutView
:
function
(
obj
)
{
...
...
dashboardv3/public/js/views/audit/AuditTableLayoutView.js
View file @
58a58956
...
...
@@ -185,6 +185,7 @@ define(['require',
cell
:
"html"
,
editable
:
false
,
sortable
:
false
,
fixWidth
:
"20"
,
cell
:
Backgrid
.
ExpandableCell
,
accordion
:
false
,
expand
:
function
(
el
,
model
)
{
...
...
dashboardv3/public/js/views/detail_page/DetailPageLayoutView.js
View file @
58a58956
...
...
@@ -245,7 +245,7 @@ define(['require',
enumDefCollection
:
this
.
enumDefCollection
,
classificationDefCollection
:
this
.
classificationDefCollection
,
glossaryCollection
:
this
.
glossaryCollection
,
nameSpaceCollection
:
this
.
nameSpaceCollection
,
nameSpaceCollection
:
this
.
activeEntityDef
.
get
(
'namespaceAttributeDefs'
)
,
searchVent
:
this
.
searchVent
,
attributeDefs
:
(
function
()
{
return
that
.
getEntityDef
(
collectionJSON
);
...
...
@@ -255,7 +255,9 @@ define(['require',
this
.
renderEntityDetailTableLayoutView
(
obj
);
this
.
renderEntityUserDefineView
(
obj
);
this
.
renderEntityLabelDefineView
(
obj
);
this
.
renderEntityNameSpaceView
(
obj
);
if
(
obj
.
nameSpaceCollection
)
{
this
.
renderEntityNameSpaceView
(
obj
);
}
this
.
renderRelationshipLayoutView
(
obj
);
this
.
renderAuditTableLayoutView
(
obj
);
this
.
renderTagTableLayoutView
(
obj
);
...
...
dashboardv3/public/js/views/entity/EntityNameSpaceItemView.js
View file @
58a58956
This diff is collapsed.
Click to expand it.
dashboardv3/public/js/views/entity/EntityNameSpaceView.js
View file @
58a58956
...
...
@@ -62,39 +62,21 @@ define([
initialize
:
function
(
options
)
{
var
that
=
this
;
_
.
extend
(
this
,
_
.
pick
(
options
,
"entity"
,
"nameSpaceCollection"
,
"enumDefCollection"
,
"guid"
,
"fetchCollection"
));
this
.
editMode
-
false
;
this
.
editMode
=
false
;
this
.
$
(
"editBox"
).
hide
();
var
nameSpaceSet
=
{};
this
.
treeData
=
[];
this
.
actualCollection
=
new
Backbone
.
Collection
(
_
.
map
(
this
.
entity
.
namespaceAttributes
,
function
(
val
,
key
)
{
var
foundNameSpace
=
that
.
nameSpaceCollection
.
fullCollection
.
find
({
name
:
key
});
var
tempData
=
{
text
:
key
,
name
:
key
,
parent
:
"#"
,
icon
:
"fa fa-folder-o"
,
children
:
[]
}
var
foundNameSpace
=
that
.
nameSpaceCollection
[
key
];
if
(
foundNameSpace
)
{
var
attributeDefs
=
foundNameSpace
.
get
(
"attributeDefs"
);
_
.
each
(
val
,
function
(
aVal
,
aKey
)
{
var
foundAttr
=
_
.
find
(
attributeDefs
,
function
(
o
)
{
var
foundAttr
=
_
.
find
(
foundNameSpace
,
function
(
o
)
{
return
o
.
name
===
aKey
});
if
(
foundAttr
)
{
var
treVal
=
aKey
+
" : "
+
(
foundAttr
.
typeName
===
"date"
?
moment
(
aVal
).
format
(
"MM/DD/YYYY"
)
:
aVal
);
tempData
.
children
.
push
({
text
:
treVal
,
name
:
treVal
,
icon
:
"fa fa-file-o"
,
children
:
[]
})
val
[
aKey
]
=
{
value
:
aVal
,
typeName
:
foundAttr
.
typeName
};
}
})
}
that
.
treeData
.
push
(
tempData
);
return
_
.
extend
({},
val
,
{
__internal_UI_nameSpaceName
:
key
});
}));
this
.
collection
=
new
Backbone
.
Collection
();
...
...
@@ -230,22 +212,38 @@ define([
var
modelObj
=
{
isNew
:
true
};
this
.
collection
.
unshift
(
modelObj
);
},
generateTree
:
function
()
{
this
.
ui
.
namespaceTree
.
jstree
({
plugins
:
[
"core"
,
"sort"
,
"changed"
,
"wholerow"
,
"conditionalselect"
],
conditionalselect
:
function
(
node
)
{
return
false
;
},
state
:
{
opened
:
true
,
selected
:
false
},
core
:
{
multiple
:
false
,
data
:
this
.
treeData
}
})
renderNamespace
:
function
()
{
var
li
=
""
this
.
actualCollection
.
forEach
(
function
(
obj
)
{
var
attrLi
=
""
;
_
.
each
(
obj
.
attributes
,
function
(
val
,
key
)
{
if
(
key
!==
"__internal_UI_nameSpaceName"
)
{
var
newVal
=
val
;
if
(
_
.
isObject
(
val
)
&&
!
_
.
isUndefinedNull
(
val
.
value
))
{
newVal
=
val
.
value
;
if
(
newVal
.
length
>
0
&&
val
.
typeName
.
indexOf
(
"date"
)
>
-
1
)
{
newVal
=
_
.
map
(
newVal
,
function
(
dates
)
{
return
moment
(
dates
).
format
(
"MM/DD/YYYY"
);
});
}
if
(
val
.
typeName
===
"date"
)
{
newVal
=
moment
(
newVal
).
format
(
"MM/DD/YYYY"
);
}
}
attrLi
+=
"<tr><td>"
+
_
.
escape
(
key
)
+
" ("
+
_
.
escape
(
val
.
typeName
)
+
")</td><td>"
+
_
.
escape
(
newVal
)
+
"</td></tr>"
;
}
});
li
+=
"<ul class='namespace-tree-parent'><li class='table'>"
+
_
.
escape
(
obj
.
get
(
"__internal_UI_nameSpaceName"
))
+
"</li>"
+
"<li class='namespace-tree-child entity-detail-table'>"
+
"<table class='table'>"
+
attrLi
+
"</table>"
+
"</li></ul>"
;
});
this
.
ui
.
namespaceTree
.
html
(
li
);
},
onRender
:
function
()
{
this
.
panelOpenClose
();
this
.
generateTre
e
();
this
.
renderNamespac
e
();
}
});
});
\ No newline at end of file
dashboardv3/public/js/views/name_space/CreateNameSpaceLayoutView.js
View file @
58a58956
...
...
@@ -349,9 +349,7 @@ define(['require',
}
if
(
isMultiCheck
)
{
obj
.
multiValued
=
true
;
if
(
obj
.
typeName
==
"string"
||
obj
.
typeName
==
"int"
||
obj
.
typeName
==
"float"
)
{
obj
.
typeName
=
"array<"
+
obj
.
typeName
+
">"
;
}
obj
.
typeName
=
"array<"
+
obj
.
typeName
+
">"
;
}
});
var
notifyObj
=
{
...
...
@@ -489,9 +487,7 @@ define(['require',
}
if
(
isMultiCheck
)
{
obj
.
multiValued
=
true
;
if
(
obj
.
typeName
==
"string"
||
obj
.
typeName
==
"int"
||
obj
.
typeName
==
"float"
)
{
obj
.
typeName
=
"array<"
+
obj
.
typeName
+
">"
;
}
obj
.
typeName
=
"array<"
+
obj
.
typeName
+
">"
;
}
});
...
...
dashboardv3/public/js/views/name_space/EnumCreateUpdateItemView.js
View file @
58a58956
...
...
@@ -70,6 +70,7 @@ define(["require", "backbone", "hbs!tmpl/name_space/EnumCreateUpdateItemView_tmp
this
.
ui
.
enumCancleBtn
.
attr
(
"disabled"
,
"true"
);
};
events
[
"click "
+
this
.
ui
.
enumOkBtn
]
=
function
(
e
)
{
this
.
ui
.
enumCancleBtn
.
attr
(
"disabled"
,
"true"
);
this
.
onUpdateEnum
();
};
return
events
;
...
...
@@ -173,6 +174,9 @@ define(["require", "backbone", "hbs!tmpl/name_space/EnumCreateUpdateItemView_tmp
return
;
}
this
.
ui
.
enumOkBtn
.
attr
(
"disabled"
,
"true"
);
this
.
ui
.
enumSelector
.
attr
(
"disabled"
,
"true"
);
this
.
ui
.
valueSelector
.
attr
(
"disabled"
,
"true"
);
this
.
ui
.
enumCancleBtn
.
attr
(
"disabled"
,
"true"
);
if
(
enumName
)
{
var
enumDef
=
enumName
.
get
(
"elementDefs"
);
if
(
enumDef
.
length
===
selectedEnumValues
.
length
)
{
...
...
@@ -231,6 +235,8 @@ define(["require", "backbone", "hbs!tmpl/name_space/EnumCreateUpdateItemView_tmp
complete
:
function
(
model
,
status
)
{
that
.
emumTypeSelectDisplay
();
that
.
ui
.
enumOkBtn
.
removeAttr
(
"disabled"
);
that
.
ui
.
enumSelector
.
removeAttr
(
"disabled"
);
that
.
ui
.
valueSelector
.
removeAttr
(
"disabled"
);
if
(
that
.
options
.
closeModal
)
{
that
.
options
.
closeModal
();
}
...
...
@@ -246,6 +252,8 @@ define(["require", "backbone", "hbs!tmpl/name_space/EnumCreateUpdateItemView_tmp
content
:
"No updated values"
});
that
.
ui
.
enumOkBtn
.
removeAttr
(
"disabled"
);
that
.
ui
.
enumSelector
.
removeAttr
(
"disabled"
);
that
.
ui
.
valueSelector
.
removeAttr
(
"disabled"
);
if
(
that
.
options
.
closeModal
)
{
that
.
options
.
closeModal
();
}
...
...
dashboardv3/public/js/views/name_space/NameSpaceAttrTableLayoutView.js
View file @
58a58956
...
...
@@ -63,7 +63,7 @@ define(['require',
* @constructs
*/
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'guid'
,
'entity'
,
'entityName'
,
'attributeDefs'
,
'typeHeaders'
,
'nameSpaceCollection'
,
'nameSpaceAttr'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'guid'
,
'entity'
,
'entityName'
,
'attributeDefs'
,
'typeHeaders'
,
'nameSpaceCollection'
,
'nameSpaceAttr'
,
'entityDefCollection'
));
this
.
commonTableOptions
=
{
collection
:
this
.
nameSpaceAttr
,
includeFilter
:
false
,
...
...
@@ -141,6 +141,7 @@ define(['require',
that
.
renderTableLayoutView
();
that
.
showDetails
=
true
;
that
.
toggleNamespaceDetailsAttrView
();
that
.
entityDefCollection
.
fetch
({
silent
:
true
});
},
parent
:
that
.
$el
,
tagCollection
:
that
.
nameSpaceCollection
,
...
...
@@ -189,7 +190,7 @@ define(['require',
})
},
typeName
:
{
label
:
"
type
Name"
,
label
:
"
Type
Name"
,
cell
:
"html"
,
editable
:
false
,
formatter
:
_
.
extend
({},
Backgrid
.
CellFormatter
.
prototype
,
{
...
...
dashboardv3/public/js/views/name_space/NameSpaceAttributeItemView.js
View file @
58a58956
...
...
@@ -57,9 +57,7 @@ define(['require',
this
.
model
.
set
({
"name"
:
e
.
target
.
value
.
trim
()
});
};
events
[
"change "
+
this
.
ui
.
dataTypeSelector
]
=
function
(
e
)
{
//this.ui.multiValueSelect.hide();
if
(
e
.
target
.
value
.
trim
()
===
'enumeration'
||
e
.
target
.
value
.
trim
()
===
'Enumeration'
)
{
// this.model.set({ "typeName": "enum" });
this
.
ui
.
enumTypeSelectorContainer
.
show
();
this
.
emumTypeSelectDisplay
();
this
.
ui
.
stringLengthContainer
.
hide
();
...
...
@@ -67,13 +65,9 @@ define(['require',
this
.
model
.
set
({
"typeName"
:
e
.
target
.
value
.
trim
()
});
this
.
model
.
set
({
"enumValues"
:
null
});
this
.
ui
.
stringLengthContainer
.
show
();
//this.ui.multiValueSelect.show();
this
.
ui
.
enumTypeSelectorContainer
.
hide
();
this
.
ui
.
enumValueSelectorContainer
.
hide
();
}
else
{
// if (e.target.value.trim() === 'int' || e.target.value.trim() === 'float') {
// this.ui.multiValueSelect.show();
// }
this
.
model
.
set
({
"typeName"
:
e
.
target
.
value
.
trim
()
});
this
.
model
.
set
({
"enumValues"
:
null
});
this
.
ui
.
enumTypeSelectorContainer
.
hide
();
...
...
@@ -101,9 +95,9 @@ define(['require',
events
[
"change "
+
this
.
ui
.
enumValueSelector
]
=
function
(
e
)
{
this
.
model
.
set
({
"enumValues"
:
this
.
ui
.
enumValueSelector
.
val
()
});
};
//
events["change " + this.ui.multiValueSelectStatus] = function(e) {
//
this.model.set({ "multiValueSelect": e.target.checked });
//
};
events
[
"change "
+
this
.
ui
.
multiValueSelectStatus
]
=
function
(
e
)
{
this
.
model
.
set
({
"multiValueSelect"
:
e
.
target
.
checked
});
};
events
[
"click "
+
this
.
ui
.
close
]
=
'onCloseButton'
;
events
[
"click "
+
this
.
ui
.
createNewEnum
]
=
'onCreateUpdateEnum'
;
return
events
;
...
...
@@ -150,7 +144,7 @@ define(['require',
this
.
ui
.
attributeInput
.
attr
(
"disabled"
,
"false"
);
this
.
ui
.
dataTypeSelector
.
attr
(
"disabled"
,
"false"
);
this
.
ui
.
dataTypeSelector
.
attr
(
"disabled"
,
"false"
);
//
this.ui.multiValueSelect.hide();
this
.
ui
.
multiValueSelect
.
hide
();
this
.
ui
.
dataTypeSelector
.
val
(
this
.
parentView
.
attrDetails
.
attrTypeName
);
if
(
this
.
parentView
.
attrDetails
.
attrTypeName
==
"string"
)
{
this
.
ui
.
stringLengthContainer
.
show
();
...
...
@@ -176,11 +170,11 @@ define(['require',
this
.
ui
.
enumTypeSelector
.
val
(
typeName
).
trigger
(
'change'
);
}
}
// if (
this.parentView.attrDetails.multiValued) {
//
this.ui.multiValueSelect.show();
//
$(this.ui.multiValueSelectStatus).prop('checked', true).trigger('change');
//
this.ui.multiValueSelectStatus.attr("disabled", "false");
//
}
if
(
this
.
parentView
.
attrDetails
&&
this
.
parentView
.
attrDetails
.
multiValued
)
{
this
.
ui
.
multiValueSelect
.
show
();
$
(
this
.
ui
.
multiValueSelectStatus
).
prop
(
'checked'
,
true
).
trigger
(
'change'
);
this
.
ui
.
multiValueSelectStatus
.
attr
(
"disabled"
,
"false"
);
}
}
},
showEnumValues
:
function
(
enumName
)
{
...
...
dashboardv3/public/js/views/name_space/NameSpaceContainerLayoutView.js
View file @
58a58956
...
...
@@ -106,7 +106,8 @@ define([
guid
:
that
.
options
.
namespaceID
,
typeHeaders
:
that
.
typeHeaders
,
enumDefCollection
:
that
.
enumDefCollection
,
selectedNameSpace
:
that
.
selectedNameSpace
selectedNameSpace
:
that
.
selectedNameSpace
,
entityDefCollection
:
that
.
options
.
entityDefCollection
}));
});
}
...
...
dashboardv3/public/js/views/name_space/NameSpaceTableLayoutView.js
View file @
58a58956
...
...
@@ -79,7 +79,7 @@ define(['require',
* @constructs
*/
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'guid'
,
'entity'
,
'entityName'
,
'attributeDefs'
,
'typeHeaders'
,
'nameSpaceCollection'
,
'nameSpaceAttr'
,
'selectedNameSpace'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'guid'
,
'entity'
,
'entityName'
,
'attributeDefs'
,
'typeHeaders'
,
'nameSpaceCollection'
,
'
entityDefCollection'
,
'
nameSpaceAttr'
,
'selectedNameSpace'
));
this
.
limit
=
10
;
this
.
offset
=
0
;
this
.
pervOld
=
[];
...
...
@@ -188,6 +188,7 @@ define(['require',
enumDefCollection
.
fetch
({
reset
:
true
});
that
.
showDetails
=
true
;
that
.
toggleNamespaceDetailsAttrView
();
that
.
entityDefCollection
.
fetch
({
silent
:
true
});
},
parent
:
that
.
$el
,
tagCollection
:
that
.
nameSpaceCollection
,
...
...
@@ -224,6 +225,7 @@ define(['require',
enumDefCollection
.
fetch
({
reset
:
true
});
that
.
showDetails
=
true
;
that
.
toggleNamespaceDetailsAttrView
();
that
.
entityDefCollection
.
fetch
({
silent
:
true
});
},
tagCollection
:
that
.
nameSpaceCollection
,
enumDefCollection
:
enumDefCollection
,
...
...
@@ -256,7 +258,7 @@ define(['require',
editable
:
false
,
sortable
:
false
,
cell
:
Backgrid
.
ExpandableCell
,
fixWidth
:
"
5
0"
,
fixWidth
:
"
2
0"
,
accordion
:
false
,
alwaysVisible
:
true
,
expand
:
function
(
el
,
model
)
{
...
...
@@ -298,7 +300,7 @@ define(['require',
editable
:
false
,
formatter
:
_
.
extend
({},
Backgrid
.
CellFormatter
.
prototype
,
{
fromRaw
:
function
(
rawValue
,
model
)
{
return
'<a title= "'
+
model
.
get
(
'name'
)
+
'" href ="#!/administrator/namespace/'
+
model
.
get
(
'guid'
)
+
'">'
+
model
.
get
(
'name'
)
+
'</a>'
;
return
'<a title= "'
+
model
.
get
(
'name'
)
+
'" href ="#!/administrator/namespace/'
+
model
.
get
(
'guid'
)
+
'
?from=namespace
">'
+
model
.
get
(
'name'
)
+
'</a>'
;
}
})
},
...
...
dashboardv3/public/js/views/search/QueryBuilderView.js
View file @
58a58956
...
...
@@ -63,6 +63,7 @@ define(['require',
'classificationDefCollection'
,
'nameSpaceCollection'
,
'tag'
,
'type'
,
'searchTableFilters'
,
'systemAttrArr'
));
this
.
attrObj
=
_
.
sortBy
(
this
.
attrObj
,
'name'
);
...
...
@@ -365,29 +366,28 @@ define(['require',
filters
.
push
(
returnObj
);
}
});
if
(
this
.
attrObj
.
length
>
0
)
{
var
sortedNamespaceData
=
_
.
sortBy
(
this
.
nameSpaceCollection
.
models
,
function
(
obj
)
{
return
obj
.
get
(
'name'
)
});
_
.
each
(
sortedNamespaceData
,
function
(
obj
)
{
var
namespaceName
=
obj
.
get
(
'name'
);
var
sortedNamespaceAttr
=
_
.
sortBy
(
obj
.
attributes
.
attributeDefs
,
function
(
obj
)
{
return
obj
.
name
;
});
_
.
each
(
sortedNamespaceAttr
,
function
(
attrDetails
)
{
if
(
attrDetails
.
options
&&
attrDetails
.
options
.
applicableEntityTypes
&&
that
.
options
.
applicableType
&&
(
JSON
.
parse
(
attrDetails
.
options
.
applicableEntityTypes
).
indexOf
(
that
.
options
.
applicableType
)
!=
-
1
))
{
if
(
this
.
type
)
{
var
entityDef
=
this
.
entityDefCollection
.
fullCollection
.
find
({
name
:
that
.
options
.
applicableType
}),
namespaceAttributeDefs
=
null
;
if
(
entityDef
)
{
namespaceAttributeDefs
=
entityDef
.
get
(
"namespaceAttributeDefs"
);
}
if
(
namespaceAttributeDefs
)
{
_
.
each
(
namespaceAttributeDefs
,
function
(
attributes
,
key
)
{
var
sortedAttributes
=
_
.
sortBy
(
attributes
,
function
(
obj
)
{
return
obj
.
name
;
});
_
.
each
(
sortedAttributes
,
function
(
attrDetails
)
{
var
returnObj
=
that
.
getObjDef
(
attrDetails
,
rules_widgets
,
isGroupView
,
'Select Namespace Attribute'
,
true
);
if
(
returnObj
)
{
returnObj
.
id
=
namespaceName
+
"."
+
returnObj
.
id
;
returnObj
.
label
=
namespaceName
+
": "
+
returnObj
.
label
;
returnObj
.
id
=
key
+
"."
+
returnObj
.
id
;
returnObj
.
label
=
key
+
": "
+
returnObj
.
label
;
returnObj
.
data
=
{
'entityType'
:
"namespace"
};
filters
.
push
(
returnObj
);
}
}
})
}
);
}
);
})
;
}
}
filters
=
_
.
uniq
(
filters
,
'id'
);
if
(
filters
&&
!
_
.
isEmpty
(
filters
))
{
...
...
dashboardv3/public/js/views/search/SearchFilterBrowseLayoutView.js
View file @
58a58956
...
...
@@ -133,7 +133,7 @@ define([
this
.
showDefaultPage
();
},
showDefaultPage
:
function
()
{
if
(
this
.
options
.
value
)
{
if
(
Utils
.
getUrlState
.
isSearchTab
()
&&
this
.
options
.
value
)
{
if
(
!
this
.
options
.
value
.
type
&&
!
this
.
options
.
value
.
tag
&&
...
...
dashboardv3/public/js/views/search/SearchResultLayoutView.js
View file @
58a58956
...
...
@@ -30,8 +30,9 @@ define(['require',
'utils/Messages'
,
'utils/Enums'
,
'utils/UrlLinks'
,
'moment'
,
'platform'
],
function
(
require
,
Backbone
,
tableDragger
,
SearchResultLayoutViewTmpl
,
Modal
,
VEntity
,
Utils
,
Globals
,
VSearchList
,
VCommon
,
CommonViewFunction
,
Messages
,
Enums
,
UrlLinks
,
platform
)
{
],
function
(
require
,
Backbone
,
tableDragger
,
SearchResultLayoutViewTmpl
,
Modal
,
VEntity
,
Utils
,
Globals
,
VSearchList
,
VCommon
,
CommonViewFunction
,
Messages
,
Enums
,
UrlLinks
,
moment
,
platform
)
{
'use strict'
;
var
SearchResultLayoutView
=
Backbone
.
Marionette
.
LayoutView
.
extend
(
...
...
@@ -801,6 +802,20 @@ define(['require',
if
(
obj
&&
obj
.
attributes
)
{
_
.
each
(
obj
.
attributes
,
function
(
namespaceValue
,
attributeName
)
{
if
(
attributeName
.
indexOf
(
'.'
)
!=
-
1
)
{
var
isDate
=
false
,
namespace
=
that
.
options
.
nameSpaceCollection
.
fullCollection
.
find
({
"name"
:
attributeName
.
split
(
'.'
)[
0
]
});
if
(
namespace
)
{
var
getAttributes
=
namespace
.
get
(
'attributeDefs'
);
getAttributes
.
every
(
function
(
attrTypeCheck
)
{
if
(
attributeName
.
split
(
'.'
)[
1
]
===
attrTypeCheck
.
name
&&
attrTypeCheck
.
typeName
.
indexOf
(
"date"
)
>
-
1
)
{
isDate
=
true
;
}
return
!
isDate
;
});
}
if
(
isDate
)
{
namespaceValue
=
moment
(
namespaceValue
).
format
(
"MM/DD/YYYY"
)
}
namespaceStr
+=
'<label class="btn btn-action btn-xs btn-blue no-pointer">'
+
attributeName
+
': '
+
namespaceValue
+
'</label>'
;
}
})
...
...
dashboardv3/public/js/views/search/tree/NameSpaceTreeLayoutView.js
View file @
58a58956
...
...
@@ -142,46 +142,25 @@ define([
this
.
ui
.
nameSpaceSearchTree
.
jstree
(
true
).
deselect_all
();
this
.
namespaceID
=
null
;
}
// if (this.options.value === undefined) {
// this.options.value = {};
// }
// if (!this.options.value.tag) {
// this.ui.nameSpaceSearchTree.jstree(true).deselect_all();
// this.nameSpaceId = null;
// } else {
// if (that.options.value.tag.indexOf("*") != -1) {
// that.ui.nameSpaceSearchTree.jstree(true).deselect_all();
// }
// var dataFound = this.nameSpaceCollection.fullCollection.find(function(obj) {
// return obj.get("name") === that.options.value.tag;
// });
// if (dataFound) {
// if ((this.nameSpaceId && this.nameSpaceId !== dataFound.get("guid")) || this.nameSpaceId === null) {
// if (this.nameSpaceId) {
// this.ui.nameSpaceSearchTree.jstree(true).deselect_node(this.nameSpaceId);
// }
// this.fromManualRender = true;
// this.nameSpaceId = dataFound.get("guid");
// this.ui.nameSpaceSearchTree.jstree(true).select_node(dataFound.get("guid"));
// }
// }
// if (!dataFound && Globals[that.options.value.tag]) {
// this.fromManualRender = true;
// this.typeId = Globals[that.options.value.tag].guid;
// this.ui.nameSpaceSearchTree.jstree(true).select_node(this.typeId);
// }
// }
},
onNodeSelect
:
function
(
nodeData
)
{
var
that
=
this
,
options
=
nodeData
.
node
.
original
,
url
=
"#!/administrator/namespace"
;
url
=
"#!/administrator/namespace"
,
trigger
=
true
,
queryParams
=
Utils
.
getUrlState
.
getQueryParams
();
if
(
options
.
parent
===
undefined
)
{
url
+=
"/"
+
options
.
id
;
}
if
(
queryParams
&&
queryParams
.
from
===
"namespace"
&&
Utils
.
getUrlState
.
getQueryUrl
().
queyParams
[
0
]
===
url
)
{
trigger
=
false
;
}
if
(
trigger
)
{
this
.
triggerUrl
(
url
);
}
else
{
//this.triggerSearch();
}
},
onViewEditNameSpace
:
function
()
{
var
selectedNode
=
this
.
ui
.
nameSpaceSearchTree
.
jstree
(
"get_selected"
,
true
);
...
...
@@ -194,16 +173,6 @@ define([
}
}
},
// triggerSearch: function(params, url) {
// var serachUrl = url ? url : "#!/search/searchResult";
// Utils.setUrl({
// url: serachUrl,
// urlParams: params,
// mergeBrowserUrl: false,
// trigger: true,
// updateTabState: true
// });
// },
triggerUrl
:
function
(
url
)
{
Utils
.
setUrl
({
url
:
url
,
...
...
@@ -252,32 +221,6 @@ define([
};
return
nodeStructure
;
};
// getChildren = function(options) {
// var children = options.children,
// data = [],
// dataWithoutEmptyTag = [],
// isAttrNode = true;
// if (children && children.length) {
// _.each(children, function(attrDetail) {
// var nodeDetails = {
// name: _.escape(attrDetail.name),
// model: attrDetail
// },
// nodeProperties = {
// parent: options.parent,
// text: _.escape(attrDetail.name),
// model: attrDetail,
// id: options.parent + "_" + _.escape(attrDetail.name)
// },
// getNodeDetails = generateNode(nodeDetails, isAttrNode),
// classificationNode = _.extend(getNodeDetails, nodeProperties);
// data.push(classificationNode);
// });
// } else {
// return null;
// }
// return data;
// };
_
.
each
(
namsSpaceTreeData
,
function
(
filterNode
)
{
nameSpaceList
.
push
(
generateNode
(
filterNode
));
});
...
...
dashboardv3/public/js/views/site/Header.js
View file @
58a58956
...
...
@@ -34,6 +34,7 @@ define(['require',
ui
:
{
backButton
:
"[data-id='backButton']"
,
menuHamburger
:
"[data-id='menuHamburger']"
,
administrator
:
"[data-id='administrator']"
,
signOut
:
"[data-id='signOut']"
},
events
:
function
()
{
...
...
@@ -52,6 +53,16 @@ define(['require',
var
path
=
Utils
.
getBaseUrl
(
window
.
location
.
pathname
);
window
.
location
=
path
+
"/logout.html"
;
};
events
[
'click '
+
this
.
ui
.
administrator
]
=
function
()
{
Utils
.
setUrl
({
url
:
"#!/administrator"
,
mergeBrowserUrl
:
false
,
trigger
:
true
,
updateTabState
:
true
});
};
return
events
;
},
...
...
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