Skip to content

Commit

Permalink
Dashboard / Add capability to have multiple dashboard tabs.
Browse files Browse the repository at this point in the history
  • Loading branch information
fxprunayre committed Jun 16, 2017
1 parent d1aee4b commit 0ba883c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
8 changes: 6 additions & 2 deletions web-ui/src/main/resources/catalog/js/admin/AdminController.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,13 @@
$scope.getTpl = function(pageMenu) {
$scope.type = pageMenu.defaultTab;
$.each(pageMenu.tabs, function(index, value) {
if (value.href === $routeParams.tab ||
value.type === $routeParams.tab) {
if ((angular.isUndefined($routeParams.dashboard) &&
value.type === $routeParams.tab) || (
angular.isDefined($routeParams.dashboard) &&
value.href.indexOf(encodeURIComponent($routeParams.dashboard)) !== -1)
) {
$scope.type = $routeParams.tab;
$scope.href = value.href;
}
});
return tplFolder + pageMenu.folder + $scope.type + '.html';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,20 @@
href: '#/dashboard/statistics?dashboard=' +
encodeURIComponent('../../dashboards/app/kibana#/dashboard/' +
'cf5d74b0-2c25-11e7-8cd9-338183f2da0f?embed=true&_g=()')
}, {
type: 'statistics',
label: 'validationStatistics',
icon: 'fa-bar-chart',
href: '#/dashboard/statistics?dashboard=' +
encodeURIComponent('../../dashboards/app/kibana#/dashboard/' +
'915983d0-2c2e-11e7-a889-7bfa00c573d3?embed=true&_g=()')
}, {
type: 'statistics',
label: 'searchStatistics',
icon: 'fa-search',
href: '#/dashboard/statistics?dashboard=' +
encodeURIComponent('../../dashboards/app/kibana#/dashboard/' +
'5b407790-4fa1-11e7-a577-3197d1592a1d?embed=true&' +
'_g=(refreshInterval%3A(display%3AOff%2Cpause%3A!f%2Cvalue%3A0)' +
'%2Ctime%3A(from%3Anow-24h%2Cmode%3Aquick%2Cto%3Anow))')
'5b407790-4fa1-11e7-a577-3197d1592a1d?embed=true&_g=()')
}];


Expand Down
1 change: 1 addition & 0 deletions web-ui/src/main/resources/catalog/locales/en-admin.json
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@
"contactAsXML": "XML snippet to insert to replace the matching contact",
"contactAsXML-help": "<h5>Example:</h5><code class='gn-code'>&lt;gmd:CI_ResponsibleParty xmlns:gco=\"http://www.isotc211.org/2005/gco\" xmlns:gmd=\"http://www.isotc211.org/2005/gmd\"&gt;&lt;gmd:individualName&gt;&lt;gco:CharacterString&gt;A new user&lt;/gco:CharacterString&gt;&lt;/gmd:individualName&gt;&lt;gmd:organisationName&gt;&lt;gco:CharacterString&gt;Organisation&lt;/gco:CharacterString&gt;&lt;/gmd:organisationName&gt;&lt;gmd:contactInfo&gt;&lt;gmd:CI_Contact&gt;&lt;gmd:address&gt;&lt;gmd:CI_Address&gt;&lt;gmd:electronicMailAddress&gt;&lt;gco:CharacterString&gt;newemail@organisation.org&lt;/gco:CharacterString&gt;&lt;/gmd:electronicMailAddress&gt;&lt;/gmd:CI_Address&gt;&lt;/gmd:address&gt;&lt;/gmd:CI_Contact&gt;&lt;/gmd:contactInfo&gt;&lt;gmd:role&gt;&lt;gmd:CI_RoleCode codeListValue=\"pointOfContact\" codeList=\"http://www.isotc211.org/2005/resources/codeList.xml#CI_RoleCode\"/&gt;&lt;/gmd:role&gt;&lt;/gmd:CI_ResponsibleParty&gt;</code>",
"contentStatistics": "Content statistics",
"validationStatistics":"Validation",
"createKeyword": "Add",
"createReport": " Create report",
"createThesaurus": "Create",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<div class="row">
<div class="col-lg12" data-ng-controller="GnDashboardRenderController">
<!-- TODO: add a link to edit the dashboard ?-->
<iframe src="{{url}}"
style="border: none;width: 100%; height: 80vh;"></iframe>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div data-ng-controller="GnAdminController">
<ul class="nav nav-pills">
<li data-ng-repeat="t in pageMenu.tabs"
data-ng-class="type === t.type && 'active'">
data-ng-class="href === t.href && 'active'">
<a href="{{t.href}}">
<i class="fa {{t.icon || 'fa-fw'}}"/>
<span data-translate="">{{t.label}}</span>
Expand Down

0 comments on commit 0ba883c

Please sign in to comment.