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
3b4ccb7f
Commit
3b4ccb7f
authored
Feb 10, 2017
by
kevalbhatt
Committed by
Madhan Neethiraj
Feb 10, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-1545 : UI updates for recent changes in TypesREST
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
9e7e5f05
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
45 additions
and
50 deletions
+45
-50
VEntityList.js
dashboardv2/public/js/collection/VEntityList.js
+1
-17
VTagList.js
dashboardv2/public/js/collection/VTagList.js
+1
-12
main.js
dashboardv2/public/js/main.js
+1
-2
VTag.js
dashboardv2/public/js/models/VTag.js
+1
-1
UrlLinks.js
dashboardv2/public/js/utils/UrlLinks.js
+14
-8
TagAttributeDetailLayoutView.js
...ardv2/public/js/views/tag/TagAttributeDetailLayoutView.js
+13
-4
TagDetailTableLayoutView.js
dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js
+5
-2
TagLayoutView.js
dashboardv2/public/js/views/tag/TagLayoutView.js
+9
-4
No files found.
dashboardv2/public/js/collection/VEntityList.js
View file @
3b4ccb7f
...
...
@@ -32,7 +32,7 @@ define(['require',
initialize
:
function
()
{
this
.
modelName
=
'VEntity'
;
this
.
modelAttrName
=
''
;
this
.
modelAttrName
=
'
entityDefs
'
;
},
parseRecords
:
function
(
resp
,
options
)
{
try
{
...
...
@@ -50,22 +50,6 @@ define(['require',
}
else
{
return
resp
}
// if (this.modelAttrName && this.modelAttrName === "createEntity") {
// var arr = [];
// arr.push({
// attributes: resp.attributes,
// classifications: resp.classifications,
// guid: resp.guid,
// typeName: resp.typeName
// });
// return arr;
// } else {
// if (resp[this.modelAttrName]) {
// return resp[this.modelAttrName];
// } else {
// return resp
// }
// }
}
catch
(
e
)
{
console
.
log
(
e
);
...
...
dashboardv2/public/js/collection/VTagList.js
View file @
3b4ccb7f
...
...
@@ -30,30 +30,19 @@ define(['require',
model
:
VTag
,
initialize
:
function
()
{
this
.
modelName
=
'VTag'
;
this
.
modelAttrName
=
'
list
'
;
this
.
modelAttrName
=
'
classificationDefs
'
;
},
parseRecords
:
function
(
resp
,
options
)
{
try
{
if
(
!
this
.
modelAttrName
)
{
throw
new
Error
(
"this.modelAttrName not defined for "
+
this
);
}
if
(
this
.
modelAttrName
===
"list"
)
{
if
(
resp
[
this
.
modelAttrName
])
{
return
resp
[
this
.
modelAttrName
];
}
else
{
return
resp
}
}
else
{
var
arr
=
[];
resp
[
this
.
modelAttrName
].
forEach
(
function
(
d
)
{
arr
.
push
({
tags
:
d
});
});
return
arr
;
}
}
catch
(
e
)
{
console
.
log
(
e
);
}
...
...
dashboardv2/public/js/main.js
View file @
3b4ccb7f
...
...
@@ -169,8 +169,7 @@ require(['App',
var
that
=
this
;
this
.
asyncFetchCounter
=
2
;
this
.
entityDefCollection
=
new
VEntityList
();
that
.
entityDefCollection
.
url
=
UrlLinks
.
entitiesDefApiUrl
()
that
.
entityDefCollection
.
modelAttrName
=
'list'
;
that
.
entityDefCollection
.
url
=
UrlLinks
.
entitiesDefApiUrl
();
App
.
appRouter
=
new
Router
({
entityDefCollection
:
this
.
entityDefCollection
...
...
dashboardv2/public/js/models/VTag.js
View file @
3b4ccb7f
...
...
@@ -49,7 +49,7 @@ define(['require',
return
this
.
constructor
.
nonCrudOperation
.
call
(
this
,
url
,
'DELETE'
,
options
);
},
saveTagAttribute
:
function
(
guid
,
options
)
{
var
url
=
UrlLinks
.
typesClassicationApiUrl
(
null
,
guid
);
var
url
=
UrlLinks
.
typesClassicationApiUrl
();
options
=
_
.
extend
({
contentType
:
'application/json'
,
dataType
:
'json'
...
...
dashboardv2/public/js/utils/UrlLinks.js
View file @
3b4ccb7f
...
...
@@ -22,6 +22,12 @@ define(['require', 'utils/Enums'], function(require, Enums) {
var
UrlLinks
=
{
baseUrl
:
'/api/atlas'
,
baseUrlV2
:
'/api/atlas/v2'
,
typedefsUrl
:
function
()
{
return
{
defs
:
this
.
baseUrlV2
+
'/types/typedefs'
,
def
:
this
.
baseUrlV2
+
'/types/typedef'
};
},
taxonomiesApiUrl
:
function
()
{
return
this
.
baseUrl
+
'/v1/taxonomies'
;
},
...
...
@@ -39,11 +45,11 @@ define(['require', 'utils/Enums'], function(require, Enums) {
}
},
entitiesDefApiUrl
:
function
(
name
)
{
var
entitieDefUrl
=
this
.
baseUrlV2
+
'/types/entitydef'
;
var
entitieDefUrl
=
this
.
typedefsUrl
()
;
if
(
name
)
{
return
entitieDefUrl
+
'/name/'
+
name
;
return
entitieDefUrl
.
def
+
'/name/'
+
name
+
'?type=entity'
;
}
else
{
return
entitieDefUrl
;
return
entitieDefUrl
.
defs
+
'?type=entity'
;
}
},
entitiesTraitsApiUrl
:
function
(
token
)
{
...
...
@@ -59,17 +65,17 @@ define(['require', 'utils/Enums'], function(require, Enums) {
return
this
.
baseUrl
+
'/entities/'
+
guid
+
'/audit'
;
},
typesClassicationApiUrl
:
function
(
name
,
guid
)
{
var
typeUrl
=
this
.
baseUrlV2
+
'/types/classificationdef'
var
typeUrl
=
this
.
typedefsUrl
();
if
(
name
)
{
return
typeUrl
+
'/name/'
+
name
;
return
typeUrl
.
def
+
'/name/'
+
name
+
'?type=classification'
;
}
else
if
(
guid
)
{
return
typeUrl
+
'/guid/'
+
guid
;
return
typeUrl
.
def
+
'/guid/'
+
guid
+
'?type=classification'
;
}
else
{
return
typeUrl
;
return
typeUrl
.
defs
+
'?type=classification'
;
}
},
typesApiUrl
:
function
()
{
return
this
.
baseUrlV2
+
'/types/typedefs
/headers'
return
this
.
typedefsUrl
().
defs
+
'
/headers'
},
lineageApiUrl
:
function
(
guid
)
{
var
lineageUrl
=
this
.
baseUrlV2
+
'/lineage'
;
...
...
dashboardv2/public/js/views/tag/TagAttributeDetailLayoutView.js
View file @
3b4ccb7f
...
...
@@ -70,7 +70,7 @@ define(['require',
}
else
{
this
.
$
(
'.fontLoader'
).
hide
();
Utils
.
notifyError
({
content
:
'
Something went wrong
'
content
:
'
Tag Not Found
'
});
}
},
this
);
...
...
@@ -106,7 +106,7 @@ define(['require',
if
(
this
.
model
.
get
(
"description"
))
{
this
.
ui
.
description
.
text
(
this
.
model
.
get
(
"description"
));
}
if
(
this
.
model
.
get
(
"attributeDefs"
)
)
{
if
(
attributeDefs
)
{
if
(
!
_
.
isArray
(
attributeDefs
))
{
attributeDefs
=
[
attributeDefs
];
}
...
...
@@ -138,10 +138,19 @@ define(['require',
});
return
;
}
this
.
model
.
saveTagAttribute
(
this
.
model
.
get
(
'guid'
),
{
data
:
JSON
.
stringify
(
saveObject
),
data
:
JSON
.
stringify
({
classificationDefs
:
[
saveObject
],
entityDefs
:
[],
enumDefs
:
[],
structDefs
:
[]
}),
success
:
function
(
model
,
response
)
{
that
.
model
.
set
(
model
);
if
(
model
.
classificationDefs
)
{
that
.
model
.
set
(
model
.
classificationDefs
[
0
],
{
merge
:
true
});
}
that
.
renderTagDetail
();
Utils
.
notifySuccess
({
content
:
message
...
...
dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js
View file @
3b4ccb7f
...
...
@@ -60,7 +60,7 @@ define(['require',
* @constructs
*/
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'entity'
,
'guid'
,
'term'
,
'entityName'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'entity'
,
'guid'
,
'term'
,
'entityName'
,
'fetchCollection'
));
this
.
collectionObject
=
this
.
entity
;
this
.
tagTermCollection
=
new
VTagList
();
var
tagorterm
=
_
.
toArray
(
this
.
collectionObject
.
classifications
),
...
...
@@ -204,7 +204,10 @@ define(['require',
'tagOrTerm'
:
(
that
.
term
?
"term"
:
"tag"
),
callback
:
function
()
{
that
.
$
(
'.fontLoader'
).
show
();
that
.
collection
.
fetch
({
reset
:
true
});
if
(
that
.
fetchCollection
)
{
that
.
fetchCollection
();
}
}
});
}
...
...
dashboardv2/public/js/views/tag/TagLayoutView.js
View file @
3b4ccb7f
...
...
@@ -239,19 +239,24 @@ define(['require',
attributeObj
=
[];
}
this
.
json
=
{
'name'
:
this
.
name
,
'description'
:
this
.
description
,
classificationDefs
:
[{
'name'
:
this
.
name
.
trim
(),
'description'
:
this
.
description
.
trim
(),
"typeVersion"
:
"2"
,
"version"
:
"2"
,
'superTypes'
:
superTypes
.
length
?
superTypes
:
[],
"attributeDefs"
:
attributeObj
}],
entityDefs
:
[],
enumDefs
:
[],
structDefs
:
[]
};
new
this
.
collection
.
model
().
set
(
this
.
json
).
save
(
null
,
{
success
:
function
(
model
,
response
)
{
that
.
ui
.
createTag
.
removeAttr
(
"disabled"
);
that
.
createTag
=
true
;
that
.
fetchCollections
();
that
.
collection
.
add
(
model
)
that
.
collection
.
reset
(
model
.
get
(
'classificationDefs'
));
that
.
setUrl
(
'#!/tag/tagAttribute/'
+
ref
.
ui
.
tagName
.
val
(),
true
);
Utils
.
notifySuccess
({
content
:
"Tag "
+
that
.
name
+
Messages
.
addSuccessMessage
...
...
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