From 2977d04205539b684b990618e1ed79b1a16616d7 Mon Sep 17 00:00:00 2001 From: "michele.artini" Date: Tue, 17 Jan 2023 11:55:59 +0100 Subject: [PATCH] new directives --- .../resources/static/html/context_viewer.html | 2 +- .../main/resources/static/html/contexts.html | 11 +++---- .../resources/static/html/dsm_add_api.html | 2 +- .../main/resources/static/html/dsm_api.html | 2 +- .../resources/static/html/dsm_results.html | 10 +++--- .../resources/static/html/dsm_search.html | 6 ++-- .../src/main/resources/static/html/info.html | 2 +- .../static/html/parts/page_filter.html | 4 +++ .../static/html/parts/page_title.html | 1 + .../main/resources/static/html/protocols.html | 2 +- .../main/resources/static/html/resources.html | 10 ++---- .../resources/static/html/voc_editor.html | 9 ++---- .../src/main/resources/static/html/vocs.html | 11 +++---- .../resources/static/html/wf_history.html | 11 +++---- .../src/main/resources/static/js/is_main.js | 31 +++++++++++++++++++ 15 files changed, 67 insertions(+), 47 deletions(-) create mode 100644 apps/dnet-is-application/src/main/resources/static/html/parts/page_filter.html create mode 100644 apps/dnet-is-application/src/main/resources/static/html/parts/page_title.html diff --git a/apps/dnet-is-application/src/main/resources/static/html/context_viewer.html b/apps/dnet-is-application/src/main/resources/static/html/context_viewer.html index a1c73d73..6ff22bfe 100644 --- a/apps/dnet-is-application/src/main/resources/static/html/context_viewer.html +++ b/apps/dnet-is-application/src/main/resources/static/html/context_viewer.html @@ -1,4 +1,4 @@ -

Context Editor

+
diff --git a/apps/dnet-is-application/src/main/resources/static/html/contexts.html b/apps/dnet-is-application/src/main/resources/static/html/contexts.html index 38cf5405..f8ed091d 100644 --- a/apps/dnet-is-application/src/main/resources/static/html/contexts.html +++ b/apps/dnet-is-application/src/main/resources/static/html/contexts.html @@ -1,4 +1,4 @@ -

Contexts

+
@@ -7,12 +7,9 @@

-

- -

-

- Number of contexts: {{(contexts | filter:ctxFilter).length}} -

+ + + diff --git a/apps/dnet-is-application/src/main/resources/static/html/dsm_add_api.html b/apps/dnet-is-application/src/main/resources/static/html/dsm_add_api.html index b95bf157..5539d1fa 100644 --- a/apps/dnet-is-application/src/main/resources/static/html/dsm_add_api.html +++ b/apps/dnet-is-application/src/main/resources/static/html/dsm_add_api.html @@ -1,4 +1,4 @@ -

Datasource Manager: Add API

+
diff --git a/apps/dnet-is-application/src/main/resources/static/html/dsm_api.html b/apps/dnet-is-application/src/main/resources/static/html/dsm_api.html index bef68f7c..35a1e8ee 100644 --- a/apps/dnet-is-application/src/main/resources/static/html/dsm_api.html +++ b/apps/dnet-is-application/src/main/resources/static/html/dsm_api.html @@ -1,4 +1,4 @@ -

Datasource Manager: API

+
diff --git a/apps/dnet-is-application/src/main/resources/static/html/dsm_results.html b/apps/dnet-is-application/src/main/resources/static/html/dsm_results.html index a0092ff4..5754a8ed 100644 --- a/apps/dnet-is-application/src/main/resources/static/html/dsm_results.html +++ b/apps/dnet-is-application/src/main/resources/static/html/dsm_results.html @@ -1,8 +1,10 @@ -

Datasource Manager: Results

+
+ +

Number of results: {{nResults}}
Page: {{currPage + 1}} / {{nPages}}- / - @@ -18,11 +20,7 @@ - -

- -

- +
{{r.name}} diff --git a/apps/dnet-is-application/src/main/resources/static/html/dsm_search.html b/apps/dnet-is-application/src/main/resources/static/html/dsm_search.html index 5921afa6..b49c75a0 100644 --- a/apps/dnet-is-application/src/main/resources/static/html/dsm_search.html +++ b/apps/dnet-is-application/src/main/resources/static/html/dsm_search.html @@ -1,4 +1,4 @@ -

Datasource Manager: Search

+
@@ -36,7 +36,9 @@
diff --git a/apps/dnet-is-application/src/main/resources/static/html/info.html b/apps/dnet-is-application/src/main/resources/static/html/info.html index 67933729..80b08390 100644 --- a/apps/dnet-is-application/src/main/resources/static/html/info.html +++ b/apps/dnet-is-application/src/main/resources/static/html/info.html @@ -1,4 +1,4 @@ -

Container Info

+
diff --git a/apps/dnet-is-application/src/main/resources/static/html/parts/page_filter.html b/apps/dnet-is-application/src/main/resources/static/html/parts/page_filter.html new file mode 100644 index 00000000..0f8af4bd --- /dev/null +++ b/apps/dnet-is-application/src/main/resources/static/html/parts/page_filter.html @@ -0,0 +1,4 @@ +

+ + {{totalLabel}}: {{(list | filter:filter).length}} +

diff --git a/apps/dnet-is-application/src/main/resources/static/html/parts/page_title.html b/apps/dnet-is-application/src/main/resources/static/html/parts/page_title.html new file mode 100644 index 00000000..09f70183 --- /dev/null +++ b/apps/dnet-is-application/src/main/resources/static/html/parts/page_title.html @@ -0,0 +1 @@ +

{{title}}

diff --git a/apps/dnet-is-application/src/main/resources/static/html/protocols.html b/apps/dnet-is-application/src/main/resources/static/html/protocols.html index d4c1eb99..fc8820b9 100644 --- a/apps/dnet-is-application/src/main/resources/static/html/protocols.html +++ b/apps/dnet-is-application/src/main/resources/static/html/protocols.html @@ -1,4 +1,4 @@ -

Harvesting Protocols

+
diff --git a/apps/dnet-is-application/src/main/resources/static/html/resources.html b/apps/dnet-is-application/src/main/resources/static/html/resources.html index 2a238796..d273d8a6 100644 --- a/apps/dnet-is-application/src/main/resources/static/html/resources.html +++ b/apps/dnet-is-application/src/main/resources/static/html/resources.html @@ -1,4 +1,4 @@ -

{{typeDesc.name}}

+
@@ -6,12 +6,8 @@

-

- -

-

- Number of resources: {{(resources | filter:resFilter).length}} -

+ +
diff --git a/apps/dnet-is-application/src/main/resources/static/html/voc_editor.html b/apps/dnet-is-application/src/main/resources/static/html/voc_editor.html index 245d3184..acb943f2 100644 --- a/apps/dnet-is-application/src/main/resources/static/html/voc_editor.html +++ b/apps/dnet-is-application/src/main/resources/static/html/voc_editor.html @@ -1,4 +1,4 @@ -

Vocabulary Editor

+
@@ -14,12 +14,7 @@ Download

-

- -

-

- Number of terms: {{(terms | filter:termFilter).length}} -

+
diff --git a/apps/dnet-is-application/src/main/resources/static/html/vocs.html b/apps/dnet-is-application/src/main/resources/static/html/vocs.html index 6bda931f..aa6a341a 100644 --- a/apps/dnet-is-application/src/main/resources/static/html/vocs.html +++ b/apps/dnet-is-application/src/main/resources/static/html/vocs.html @@ -1,4 +1,4 @@ -

Vocabularies

+
@@ -6,12 +6,9 @@

-

- -

-

- Number of vocabularies: {{(vocabularies | filter:vocFilter).length}} -

+ + +
diff --git a/apps/dnet-is-application/src/main/resources/static/html/wf_history.html b/apps/dnet-is-application/src/main/resources/static/html/wf_history.html index 1c19f520..ff362589 100644 --- a/apps/dnet-is-application/src/main/resources/static/html/wf_history.html +++ b/apps/dnet-is-application/src/main/resources/static/html/wf_history.html @@ -1,12 +1,11 @@ -

Workflow History

+
- -

- -

+ + +

Recent workflows (max {{maxNumberOfRecentWfs}}) Workflows from {{fromDate | date:"yyyy-MM-dd HH:mm:ss"}} to {{toDate | date:"yyyy-MM-dd HH:mm:ss"}} @@ -108,7 +107,7 @@ Duration: {{currentWf.duration}}

- +
diff --git a/apps/dnet-is-application/src/main/resources/static/js/is_main.js b/apps/dnet-is-application/src/main/resources/static/js/is_main.js index 35f182a3..6f05e43f 100644 --- a/apps/dnet-is-application/src/main/resources/static/js/is_main.js +++ b/apps/dnet-is-application/src/main/resources/static/js/is_main.js @@ -18,6 +18,37 @@ app.config(['$routeProvider', function($routeProvider) { .otherwise({ redirectTo: '/info' }); } ]); + +app.directive('pageTitle', function() { + return { + restrict: 'E', + scope: { 'title': '@' }, + templateUrl: './html/parts/page_title.html', + link: function(scope, element, attrs) {} + }; +}); + + +app.directive('pageFilter', function() { + return { + restrict: 'E', + scope: { + 'filter' : '=', + 'list' : '=', + 'description' : '@', + 'totalLabel' : '@' + }, + templateUrl: './html/parts/page_filter.html', + link: function(scope, element, attrs) { + if (!scope.description) { + scope.description = 'Filter...'; + } + if (!scope.totalLabel) { + scope.totalLabel = 'Total'; + } + } + }; +}); app.directive('formTextfield', function() { return {