ATLAS-1832: If no attribute is present in tag then showing edit-button for a tag in tags tab on entity page.
Signed-off-by: nixonrodrigues <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/c2c05d67 Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/c2c05d67 Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/c2c05d67 Branch: refs/heads/feature-odf Commit: c2c05d673071073f036d18a2d82460f3025310cf Parents: 894a91f Author: Kalyani <[email protected]> Authored: Tue Jun 13 12:21:54 2017 +0530 Committer: nixonrodrigues <[email protected]> Committed: Tue Jun 13 12:53:11 2017 +0530 ---------------------------------------------------------------------- .../js/templates/audit/CreateAuditTableLayoutView_tmpl.html | 2 +- dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/c2c05d67/dashboardv2/public/js/templates/audit/CreateAuditTableLayoutView_tmpl.html ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/templates/audit/CreateAuditTableLayoutView_tmpl.html b/dashboardv2/public/js/templates/audit/CreateAuditTableLayoutView_tmpl.html index fc8e6cc..736b957 100644 --- a/dashboardv2/public/js/templates/audit/CreateAuditTableLayoutView_tmpl.html +++ b/dashboardv2/public/js/templates/audit/CreateAuditTableLayoutView_tmpl.html @@ -23,4 +23,4 @@ <tbody data-id="auditValue"> </tbody> </table> -<h3 data-id="noData" style="display:none">No details to show</h3> +<h4 data-id="noData" style="display:none">No details to show</h4> http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/c2c05d67/dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js b/dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js index cdbd00f..45cdd6b 100644 --- a/dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js +++ b/dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js @@ -155,11 +155,16 @@ define(['require', sortable: false, formatter: _.extend({}, Backgrid.CellFormatter.prototype, { fromRaw: function(rawValue, model) { - return '<button class="btn btn-atlasAction btn-atlas no-margin-bottom typeLOV" data-id="delete" data-name="' + model.get('typeName') + '"><i class="fa fa-trash"></i></button> <button class="btn btn-atlasAction btn-atlas no-margin-bottom typeLOV" data-id="edit" data-name="' + model.get('typeName') + '"><i class="fa fa-pencil"></i></button>'; + var deleteData = '<button class="btn btn-atlasAction btn-atlas no-margin-bottom typeLOV" data-id="delete" data-name="' + model.get('typeName') + '"><i class="fa fa-trash"></i></button>', + editData = '<button class="btn btn-atlasAction btn-atlas no-margin-bottom typeLOV" data-id="edit" data-name="' + model.get('typeName') + '"><i class="fa fa-pencil"></i></button>'; + if (model.get('attributes') === undefined) { + return deleteData; + } else { + return deleteData + editData; + } } }) }, - }, this.tagTermCollection); },
