Commit b15aa400 by Hemanth Yamijala

ATLAS-664 UI: Add Support for Versioning / History (Kalyanikashikar via yhemanth)

parent 208e90b1
...@@ -27,7 +27,7 @@ $color_puerto_rico_approx: #3dd4af; ...@@ -27,7 +27,7 @@ $color_puerto_rico_approx: #3dd4af;
$color_star_dust_approx: #9a9a9a; $color_star_dust_approx: #9a9a9a;
$color_mirage_approx: #1c1e2a; $color_mirage_approx: #1c1e2a;
$concrete: #f2f2f2; $concrete: #f2f2f2;
//fonts $lightGrey:#e1e2e4; //fonts
$font_0: Source Sans Pro; $font_0: Source Sans Pro;
$font_1: sans-serif; $font_1: sans-serif;
$font_2: FontAwesome; $font_2: FontAwesome;
...@@ -132,6 +132,7 @@ ul { ...@@ -132,6 +132,7 @@ ul {
} }
.table { .table {
background-color: $white;
.table { .table {
width: auto; width: auto;
} }
...@@ -155,3 +156,13 @@ ul { ...@@ -155,3 +156,13 @@ ul {
bottom: 0; bottom: 0;
display: none; display: none;
} }
.auditCreateBtn {
background-color: #359f89;
color: white;
cursor: pointer;
}
.aditCreateBtn {
cursor: pointer;
}
...@@ -41,15 +41,32 @@ ...@@ -41,15 +41,32 @@
} }
.table-quickMenu { .table-quickMenu {
border: 1px #ddd solid; border: thin $lightGrey solid;
border-collapse: separate;
border-radius: 6px;
box-shadow: 0px 0px 4px #d8d8d8;
overflow: visible !important; overflow: visible !important;
} }
.table-quickMenu>thead>tr>th { .table-quickMenu>thead>tr>th {
border-bottom-width: 0px; border-width: thin;
padding: 24px 8px; border-color: $action_gray;
border-bottom-style: solid;
box-shadow: none;
padding: 20px 30px;
background-color: transparent; background-color: transparent;
text-align: left; text-align: left;
font-weight: 800;
font-size: 14px;
letter-spacing: 0.25px;
color: rgba(52, 52, 52, 1);
}
.table-quickMenu > tbody > tr > td {
border-color: $color_gallery_approx;
color: #333333;
font-weight: 100;
padding: 15px 30px;
} }
.backgrid-paginator ul > li > a:hover, .backgrid-paginator ul > li > a:hover,
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
max-width: 93%; max-width: 93%;
} }
} }
&.parentChiled { &.parentChild {
ul { ul {
padding-left: 9%; padding-left: 9%;
} }
......
...@@ -14,13 +14,12 @@ ...@@ -14,13 +14,12 @@
* 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"> <table class="table table-bordered table-striped" data-id="tableAudit">
<thead> <thead>
<tr> <tr data-id="auditHeaderValue">
<th>Key</th>
<th>Value</th>
</tr> </tr>
</thead> </thead>
<tbody data-id="auditValue"> <tbody data-id="auditValue">
</tbody> </tbody>
</table> </table>
<h3 data-id="noData" style="display:none">No details to show</h3>
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
<!-- <li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">Acceptable Use</a></li> --> <!-- <li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">Acceptable Use</a></li> -->
<li role="presentation"><a href="#tab-tagTable" aria-controls="tab-tagTable" role="tab" data-toggle="tab">Tags</a></li> <li role="presentation"><a href="#tab-tagTable" aria-controls="tab-tagTable" role="tab" data-toggle="tab">Tags</a></li>
<li role="presentation"><a href="#tab-termTable" aria-controls="tab-termTable" role="tab" data-toggle="tab">Terms</a></li> <li role="presentation"><a href="#tab-termTable" aria-controls="tab-termTable" role="tab" data-toggle="tab">Terms</a></li>
<li role="presentation" class="tab"><a href="#tab-audit" aria-controls="tab-audit" role="tab" data-toggle="tab">Audits</a></li>
<li role="presentation" class="tab schemaTable" style="display:none"><a href="#tab-schema" aria-controls="tab-schema" role="tab" data-toggle="tab">Schema</a></li> <li role="presentation" class="tab schemaTable" style="display:none"><a href="#tab-schema" aria-controls="tab-schema" role="tab" data-toggle="tab">Schema</a></li>
</ul> </ul>
<div class="tab-content"> <div class="tab-content">
...@@ -70,6 +71,9 @@ ...@@ -70,6 +71,9 @@
<div id="tab-termTable" role="tabpanel" class="tab-pane"> <div id="tab-termTable" role="tabpanel" class="tab-pane">
<div id="r_termTableLayoutView"></div> <div id="r_termTableLayoutView"></div>
</div> </div>
<div id="tab-audit" role="tabpanel" class="tab-pane">
<div id="r_auditTableLayoutView"></div>
</div>
<div id="tab-schema" role="tabpanel" class="tab-pane"> <div id="tab-schema" role="tabpanel" class="tab-pane">
<div id="r_schemaTableLayoutView"></div> <div id="r_schemaTableLayoutView"></div>
</div> </div>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* 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.
--> -->
<div class="container-fluid"> <div class="container-fluid gray-bg">
<div class="row"> <div class="row">
<div class="col-sm-10 col-sm-offset-1"> <div class="col-sm-10 col-sm-offset-1">
<div class="atlast-tabbable"> <div class="atlast-tabbable">
......
...@@ -90,5 +90,85 @@ define(['require', 'utils/Utils', 'modules/Modal'], function(require, Utils, Mod ...@@ -90,5 +90,85 @@ define(['require', 'utils/Utils', 'modules/Modal'], function(require, Utils, Mod
} }
}); });
}; };
CommonViewFunction.propertyTable = function(valueObject, scope) {
var table = "",
fetchInputOutputValue = function(id) {
var that = this;
scope.model.getEntity(id, {
beforeSend: function() {},
success: function(data) {
var value = "";
if (data.definition.values.name) {
value = data.definition.values.name;
} else {
value = data.GUID;
}
scope.$('td div[data-id="' + data.GUID + '"]').html('<a href="#!/detailPage/' + data.GUID + '">' + value + '</a>');
},
error: function(error, data, status) {},
complete: function() {}
});
}
_.keys(valueObject).map(function(key) {
var keyValue = valueObject[key];
if (_.isArray(keyValue)) {
var subLink = "";
for (var i = 0; i < keyValue.length; i++) {
var inputOutputField = keyValue[i],
id = undefined;
if (_.isObject(inputOutputField.id)) {
id = inputOutputField.id.id;
} else {
id = inputOutputField.id;
}
if (id) {
fetchInputOutputValue(id);
subLink += '<div data-id="' + id + '"></div>';
} else {
subLink += '<div></div>';
}
}
table += '<tr><td>' + key + '</td><td>' + subLink + '</td></tr>';
} else if (_.isObject(keyValue)) {
var id = undefined;
if (_.isObject(keyValue.id)) {
id = keyValue.id.id;
} else {
id = keyValue.id;
}
if (id) {
fetchInputOutputValue(id);
table += '<tr><td>' + key + '</td><td><div data-id="' + id + '"></div></td></tr>';
} else {
var stringArr = [];
_.each(keyValue, function(val, key) {
var value = "";
if (_.isObject(val)) {
value = JSON.stringify(val);
} else {
value = val;
}
var attrName = "<span>" + key + " : " + value + "</span>";
stringArr.push(attrName);
});
var jointValues = stringArr.join(", ");
if (jointValues.length) {
table += '<tr><td>' + key + '</td><td><div>' + jointValues + '</div></td></tr>';
} else {
table += '<tr><td>' + key + '</td><td></td></tr>';
}
}
} else {
if (key == "createTime" || key == "lastAccessTime" || key == "retention") {
table += '<tr><td>' + key + '</td><td>' + new Date(valueObject[key]) + '</td></tr>';
} else {
table += '<tr><td>' + key + '</td><td>' + valueObject[key] + '</td></tr>';
}
}
});
return table;
}
return CommonViewFunction; return CommonViewFunction;
}); });
...@@ -34,6 +34,13 @@ define(['require'], function(require) { ...@@ -34,6 +34,13 @@ define(['require'], function(require) {
}, },
detailPageState: {} detailPageState: {}
}; };
Globals.auditAction = {
ENTITY_CREATE: "Entity Created",
ENTITY_UPDATE: "Entity Updated",
ENTITY_DELETE: "Entity Deleted",
TAG_ADD: "Tag Added",
TAG_DELETE: "Tag Deleted"
}
return Globals; return Globals;
}); });
...@@ -20,8 +20,8 @@ define(['require', ...@@ -20,8 +20,8 @@ define(['require',
'backbone', 'backbone',
'hbs!tmpl/audit/AuditTableLayoutView_tmpl', 'hbs!tmpl/audit/AuditTableLayoutView_tmpl',
'collection/VEntityList', 'collection/VEntityList',
'moment' 'utils/Globals'
], function(require, Backbone, AuditTableLayoutView_tmpl, VEntityList, moment) { ], function(require, Backbone, AuditTableLayoutView_tmpl, VEntityList, Globals) {
'use strict'; 'use strict';
var AuditTableLayoutView = Backbone.Marionette.LayoutView.extend( var AuditTableLayoutView = Backbone.Marionette.LayoutView.extend(
...@@ -61,11 +61,11 @@ define(['require', ...@@ -61,11 +61,11 @@ define(['require',
this.commonTableOptions = { this.commonTableOptions = {
collection: this.entityCollection, collection: this.entityCollection,
includeFilter: false, includeFilter: false,
includePagination: false, includePagination: true,
includePageSize: false, includePageSize: true,
includeFooterRecords: true, includeFooterRecords: true,
gridOpts: { gridOpts: {
className: "table table-striped table-condensed backgrid table-quickMenu", className: "table table-hover backgrid table-quickMenu",
emptyText: 'No records found!' emptyText: 'No records found!'
}, },
filterOpts: {}, filterOpts: {},
...@@ -88,10 +88,7 @@ define(['require', ...@@ -88,10 +88,7 @@ define(['require',
var cols = new Backgrid.Columns(that.getAuditTableColumns()); var cols = new Backgrid.Columns(that.getAuditTableColumns());
that.RAuditTableLayoutView.show(new TableLayout(_.extend({}, that.commonTableOptions, { that.RAuditTableLayoutView.show(new TableLayout(_.extend({}, that.commonTableOptions, {
globalVent: that.globalVent, globalVent: that.globalVent,
columns: cols, columns: cols
gridOpts: {
className: "table table-quickMenu",
},
}))); })));
}); });
}, },
...@@ -99,41 +96,52 @@ define(['require', ...@@ -99,41 +96,52 @@ define(['require',
var that = this; var that = this;
return this.entityCollection.constructor.getTableCols({ return this.entityCollection.constructor.getTableCols({
user: { user: {
label: "User", label: "Users",
cell: "html", cell: "html",
editable: false, editable: false,
sortable: false, sortable: false,
}, },
timestamp: { timestamp: {
label: "Timestamp", label: "Timestamp",
cell: "time", cell: "html",
editable: false, editable: false,
sortable: false, sortable: false,
formatter: _.extend({}, Backgrid.CellFormatter.prototype, { formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
fromRaw: function(rawValue, model) { fromRaw: function(rawValue, model) {
return moment(rawValue).format("YYYY-MM-DD HH:mm:ss,SSS"); return new Date(rawValue);
} }
}) })
}, },
action: { action: {
label: "Action", label: "Actions",
cell: "html", cell: "html",
editable: false, editable: false,
sortable: false sortable: false,
formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
fromRaw: function(rawValue, model) {
that.detailBtnDisable = false;
if (Globals.auditAction[rawValue]) {
return Globals.auditAction[rawValue]
} else {
return rawValue
}
}
})
}, },
tool: { tool: {
label: "Tool", label: "Tools",
cell: "html", cell: "html",
editable: false, editable: false,
sortable: false, sortable: false,
formatter: _.extend({}, Backgrid.CellFormatter.prototype, { formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
fromRaw: function(rawValue, model) { fromRaw: function(rawValue, model) {
return '<div class="label label-success auditCreateBtn" data-id="auditCreate">Create</div>'; return '<div class="label label-success aditCreateBtn" data-id="auditCreate" data-action="' + Globals.auditAction[model.attributes.action] + '" disabled="' + that.detailBtnDisable + '" data-modalId="' + model.get('eventKey') + '">Detail</div>';
} }
}) })
}, },
}, this.entityCollection); }, this.entityCollection);
}, },
onClickAuditCreate: function(e) { onClickAuditCreate: function(e) {
var that = this; var that = this;
...@@ -141,14 +149,18 @@ define(['require', ...@@ -141,14 +149,18 @@ define(['require',
'modules/Modal', 'modules/Modal',
'views/audit/CreateAuditTableLayoutView', 'views/audit/CreateAuditTableLayoutView',
], function(Modal, CreateAuditTableLayoutView) { ], function(Modal, CreateAuditTableLayoutView) {
var collectionModel = that.entityCollection.findWhere({ 'eventKey': $(e.currentTarget).data('modalid') });
var view = new CreateAuditTableLayoutView({ guid: that.guid }); that.action = $(e.target).data("action");
var view = new CreateAuditTableLayoutView({ guid: that.guid, model: collectionModel, action: that.action });
var modal = new Modal({ var modal = new Modal({
title: 'Create', title: that.action,
content: view, content: view,
okCloses: true, okCloses: true,
showFooter: true, showFooter: true,
}).open(); }).open();
view.on('closeModal', function() {
modal.trigger('cancel');
});
}); });
} }
}); });
......
...@@ -19,8 +19,9 @@ ...@@ -19,8 +19,9 @@
define(['require', define(['require',
'backbone', 'backbone',
'hbs!tmpl/audit/CreateAuditTableLayoutView_tmpl', 'hbs!tmpl/audit/CreateAuditTableLayoutView_tmpl',
'collection/VEntityList' 'utils/Globals',
], function(require, Backbone, CreateAuditTableLayoutViewTmpl, VEntityList) { 'utils/CommonViewFunction'
], function(require, Backbone, CreateAuditTableLayoutViewTmpl, Globals, CommonViewFunction) {
'use strict'; 'use strict';
var CreateAuditTableLayoutView = Backbone.Marionette.LayoutView.extend( var CreateAuditTableLayoutView = Backbone.Marionette.LayoutView.extend(
...@@ -37,6 +38,9 @@ define(['require', ...@@ -37,6 +38,9 @@ define(['require',
ui: { ui: {
auditValue: "[data-id='auditValue']", auditValue: "[data-id='auditValue']",
auditCreate: "[data-id='auditCreate']", auditCreate: "[data-id='auditCreate']",
noData: "[data-id='noData']",
tableAudit: "[data-id='tableAudit']",
auditHeaderValue: "[data-id='auditHeaderValue']"
}, },
/** ui events hash */ /** ui events hash */
events: function() { events: function() {
...@@ -45,87 +49,47 @@ define(['require', ...@@ -45,87 +49,47 @@ define(['require',
return events; return events;
}, },
/** /**
* intialize a new AuditTableLayoutView Layout * intialize a new CreateAuditTableLayoutView Layout
* @constructs * @constructs
*/ */
initialize: function(options) { initialize: function(options) {
_.extend(this, _.pick(options, 'globalVent', 'guid')); _.extend(this, _.pick(options, 'globalVent', 'guid', 'model', 'action'));
this.entityCollection = new VEntityList();
this.entityCollection.url = "/api/atlas/entities/" + this.guid + "/audit";
this.entityCollection.modelAttrName = "events";
this.entityModel = new this.entityCollection.model();
},
bindEvents: function() {
this.listenTo(this.entityCollection, "reset", function(value) {
this.auditTableGenerate();
}, this);
}, },
bindEvents: function() {},
onRender: function() { onRender: function() {
this.entityCollection.fetch({ reset: true }); this.auditTableGenerate();
this.bindEvents();
}, },
auditTableGenerate: function() { auditTableGenerate: function() {
var that = this, var that = this,
table = ""; table = "";
var collectionObject = this.entityCollection.models[0].toJSON(); if (this.model.get('details').search('{') >= 0) {
var appendedString = "{" + collectionObject.details + "}"; var appendedString = "{" + this.model.get('details') + "}";
var auditData = appendedString.split('"')[0].split(':')[0].split("{")[1]; var auditData = appendedString.split('"')[0].split(':')[0].split("{")[1];
var detailsObject = JSON.parse(appendedString.replace("{" + auditData + ":", '{"' + auditData + '":'))[auditData]; var detailsObject = JSON.parse(appendedString.replace("{" + auditData + ":", '{"' + auditData + '":'))[auditData];
//Append string for JSON parse //Append string for JSON parse
var valueObject = detailsObject.values; var valueObject = detailsObject.values;
_.keys(valueObject).map(function(key) { if (this.action == Globals.auditAction.TAG_ADD) {
var keyValue = valueObject[key]; this.ui.auditHeaderValue.html('<th>Tag</th>');
if (_.isArray(keyValue)) { this.ui.auditValue.html("<tr><td>" + detailsObject.typeName + "</td></tr>");
var subLink = "";
for (var i = 0; i < keyValue.length; i++) {
var inputOutputField = keyValue[i];
if (_.isObject(inputOutputField.id)) {
id = inputOutputField.id.id;
} else {
id = inputOutputField.id;
}
that.fetchInputOutputValue(id);
//var coma = (i = 0) ? ('') : (',');
subLink += '<div data-id="' + id + '"></div>';
}
table += '<tr><td>' + key + '</td><td>' + subLink + '</td></tr>';
} else if (_.isObject(keyValue)) {
var id = "";
if (_.isObject(keyValue.id)) {
id = keyValue.id.id;
} else {
id = keyValue.id;
}
that.fetchInputOutputValue(id);
table += '<tr><td>' + key + '</td><td><div data-id="' + id + '"></div></td></tr>';
} else { } else {
if (key == "createTime" || key == "lastAccessTime" || key == "retention") { this.ui.auditHeaderValue.html('<th>Key</th><th>New Value</th>');
table += '<tr><td>' + key + '</td><td>' + new Date(valueObject[key]) + '</td></tr>'; table = CommonViewFunction.propertyTable(valueObject, this);
if (table.length) {
this.ui.noData.hide();
this.ui.tableAudit.show();
this.ui.auditValue.html(table);
} else { } else {
table += '<tr><td>' + key + '</td><td>' + valueObject[key] + '</td></tr>'; this.ui.noData.show();
this.ui.tableAudit.hide();
} }
} }
}); } else if (this.action == Globals.auditAction.TAG_DELETE) {
that.ui.auditValue.append(table); var appendedString = this.model.get('details').split(':');
this.ui.auditHeaderValue.html('<th>Tag</th>');
this.ui.auditValue.html("<tr><td>" + appendedString[1] + "</td></tr>");
}
}, },
fetchInputOutputValue: function(id) {
var that = this;
this.entityModel.getEntity(id, {
beforeSend: function() {},
success: function(data) {
var value = "";
if (data.definition.values.name) {
value = data.definition.values.name;
} else {
value = data.GUID;
}
that.$('td div[data-id="' + data.GUID + '"]').html('<a href="#!/detailPage/' + data.GUID + '">' + value + '</a>');
},
error: function(error, data, status) {},
complete: function() {}
});
}
}); });
return CreateAuditTableLayoutView; return CreateAuditTableLayoutView;
}); });
...@@ -40,6 +40,7 @@ define(['require', ...@@ -40,6 +40,7 @@ define(['require',
RSchemaTableLayoutView: "#r_schemaTableLayoutView", RSchemaTableLayoutView: "#r_schemaTableLayoutView",
RTagTableLayoutView: "#r_tagTableLayoutView", RTagTableLayoutView: "#r_tagTableLayoutView",
RLineageLayoutView: "#r_lineageLayoutView", RLineageLayoutView: "#r_lineageLayoutView",
RAuditTableLayoutView: "#r_auditTableLayoutView",
RTermTableLayoutView: "#r_termTableLayoutView" RTermTableLayoutView: "#r_termTableLayoutView"
}, },
...@@ -162,6 +163,7 @@ define(['require', ...@@ -162,6 +163,7 @@ define(['require',
this.renderTagTableLayoutView(tagGuid); this.renderTagTableLayoutView(tagGuid);
this.renderLineageLayoutView(tagGuid); this.renderLineageLayoutView(tagGuid);
this.renderSchemaLayoutView(tagGuid); this.renderSchemaLayoutView(tagGuid);
this.renderAuditTableLayoutView(tagGuid);
this.renderTermTableLayoutView(tagGuid); this.renderTermTableLayoutView(tagGuid);
}, this); }, this);
}, },
...@@ -313,6 +315,15 @@ define(['require', ...@@ -313,6 +315,15 @@ define(['require',
})); }));
}); });
}, },
renderAuditTableLayoutView: function(tagGuid) {
var that = this;
require(['views/audit/AuditTableLayoutView'], function(AuditTableLayoutView) {
that.RAuditTableLayoutView.show(new AuditTableLayoutView({
globalVent: that.globalVent,
guid: tagGuid
}));
});
},
renderTermTableLayoutView: function(tagGuid) { renderTermTableLayoutView: function(tagGuid) {
var that = this; var that = this;
require(['views/tag/TagDetailTableLayoutView'], function(TagDetailTableLayoutView) { require(['views/tag/TagDetailTableLayoutView'], function(TagDetailTableLayoutView) {
......
...@@ -19,7 +19,8 @@ ...@@ -19,7 +19,8 @@
define(['require', define(['require',
'backbone', 'backbone',
'hbs!tmpl/entity/EntityDetailTableLayoutView_tmpl', 'hbs!tmpl/entity/EntityDetailTableLayoutView_tmpl',
], function(require, Backbone, EntityDetailTableLayoutView_tmpl) { 'utils/CommonViewFunction'
], function(require, Backbone, EntityDetailTableLayoutView_tmpl, CommonViewFunction) {
'use strict'; 'use strict';
var EntityDetailTableLayoutView = Backbone.Marionette.LayoutView.extend( var EntityDetailTableLayoutView = Backbone.Marionette.LayoutView.extend(
...@@ -48,7 +49,7 @@ define(['require', ...@@ -48,7 +49,7 @@ define(['require',
initialize: function(options) { initialize: function(options) {
_.extend(this, _.pick(options, 'globalVent', 'collection')); _.extend(this, _.pick(options, 'globalVent', 'collection'));
this.collectionObject = this.collection.toJSON(); this.collectionObject = this.collection.toJSON();
this.entityModel = new this.collection.model(); this.model = new this.collection.model();
}, },
bindEvents: function() {}, bindEvents: function() {},
onRender: function() { onRender: function() {
...@@ -56,87 +57,9 @@ define(['require', ...@@ -56,87 +57,9 @@ define(['require',
}, },
entityTableGenerate: function() { entityTableGenerate: function() {
var that = this, var that = this,
table = "", valueObject = this.collectionObject[0].values,
valueObject = this.collectionObject[0].values; table = CommonViewFunction.propertyTable(valueObject, this);
_.keys(valueObject).map(function(key) {
/* if (key == 'columns')
return;*/
var keyValue = valueObject[key];
if (_.isArray(keyValue)) {
var subLink = "";
for (var i = 0; i < keyValue.length; i++) {
var inputOutputField = keyValue[i],
id = undefined;
if (_.isObject(inputOutputField.id)) {
id = inputOutputField.id.id;
} else {
id = inputOutputField.id;
}
if (id) {
that.fetchInputOutputValue(id);
subLink += '<div data-id="' + id + '"></div>';
} else {
subLink += '<div></div>';
}
}
table += '<tr><td>' + key + '</td><td>' + subLink + '</td></tr>';
} else if (_.isObject(keyValue)) {
var id = undefined;
if (_.isObject(keyValue.id)) {
id = keyValue.id.id;
} else {
id = keyValue.id;
}
if (id) {
that.fetchInputOutputValue(id);
table += '<tr><td>' + key + '</td><td><div data-id="' + id + '"></div></td></tr>';
} else {
var stringArr = [];
_.each(keyValue, function(val, key) {
var value = "";
if (_.isObject(val)) {
value = JSON.stringify(val);
} else {
value = val;
}
var attrName = "<span>" + key + " : " + value + "</span>";
stringArr.push(attrName);
});
var jointValues = stringArr.join(", ");
if (jointValues.length) {
table += '<tr><td>' + key + '</td><td><div>' + jointValues + '</div></td></tr>';
} else {
table += '<tr><td>' + key + '</td><td></td></tr>';
}
}
} else {
if (key == "createTime" || key == "lastAccessTime" || key == "retention") {
table += '<tr><td>' + key + '</td><td>' + new Date(valueObject[key]) + '</td></tr>';
} else {
table += '<tr><td>' + key + '</td><td>' + valueObject[key] + '</td></tr>';
}
}
});
that.ui.detailValue.append(table); that.ui.detailValue.append(table);
},
fetchInputOutputValue: function(id) {
var that = this;
this.entityModel.getEntity(id, {
beforeSend: function() {},
success: function(data) {
var value = "";
if (data.definition.values.name) {
value = data.definition.values.name;
} else {
value = data.GUID;
}
that.$('td div[data-id="' + data.GUID + '"]').html('<a href="#!/detailPage/' + data.GUID + '">' + value + '</a>');
},
error: function(error, data, status) {},
complete: function() {}
});
} }
}); });
return EntityDetailTableLayoutView; return EntityDetailTableLayoutView;
......
...@@ -74,8 +74,8 @@ define(['require', ...@@ -74,8 +74,8 @@ define(['require',
this.commonTableOptions = { this.commonTableOptions = {
collection: this.schemaCollection, collection: this.schemaCollection,
includeFilter: false, includeFilter: false,
includePagination: false, includePagination: true,
includePageSize: false, includePageSize: true,
includeFooterRecords: true, includeFooterRecords: true,
gridOpts: { gridOpts: {
className: "table table-striped table-condensed backgrid table-quickMenu", className: "table table-striped table-condensed backgrid table-quickMenu",
......
...@@ -60,10 +60,12 @@ define(['require', ...@@ -60,10 +60,12 @@ define(['require',
'searchType': that.value.searchType 'searchType': that.value.searchType
}; };
} }
that.RSearchResultLayoutView.show(new SearchResultLayoutView({ if (that.RSearchResultLayoutView) {
value: value, that.RSearchResultLayoutView.show(new SearchResultLayoutView({
tag: that.tag value: value,
})); tag: that.tag
}));
}
}); });
} }
}); });
......
...@@ -176,9 +176,10 @@ define(['require', ...@@ -176,9 +176,10 @@ define(['require',
} else if (model.get('name') == "owner") { } else if (model.get('name') == "owner") {
model.set("position", 3, { silent: true }); model.set("position", 3, { silent: true });
model.set("label", "Owner"); model.set("label", "Owner");
} else {
model.set("position", ++count, { silent: true });
} }
/*else {
model.set("position", ++count, { silent: true });
}*/
}); });
return this; return this;
} }
......
...@@ -22,6 +22,7 @@ ATLAS-409 Atlas will not import avro tables with schema read from a file (dosset ...@@ -22,6 +22,7 @@ ATLAS-409 Atlas will not import avro tables with schema read from a file (dosset
ATLAS-379 Create sqoop and falcon metadata addons (venkatnrangan,bvellanki,sowmyaramesh via shwethags) ATLAS-379 Create sqoop and falcon metadata addons (venkatnrangan,bvellanki,sowmyaramesh via shwethags)
ALL CHANGES: ALL CHANGES:
ATLAS-664 UI: Add Support for Versioning / History (Kalyanikashikar via yhemanth)
ATLAS-833 Make default build profile for External HBase and Solr (tbeerbower via yhemanth) ATLAS-833 Make default build profile for External HBase and Solr (tbeerbower via yhemanth)
ATLAS-841 mvn clean install of Atlas is failing python unit tests (yhemanth) ATLAS-841 mvn clean install of Atlas is failing python unit tests (yhemanth)
ATLAS-834 Handle exceptions from HiveHook executor.submit() (sumasai) ATLAS-834 Handle exceptions from HiveHook executor.submit() (sumasai)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment