diff options
author | Christopher Lott (cl778h) <clott@research.att.com> | 2017-08-23 18:27:19 -0400 |
---|---|---|
committer | Christopher Lott (cl778h) <clott@research.att.com> | 2017-08-23 21:12:56 -0400 |
commit | 978dbcf0a196acbafad72fe1e2478ec0e384f02f (patch) | |
tree | 17e1ceaa4a12a599320cbb317947e990bf1a5383 /ecomp-portal-widget-ms/common-widgets | |
parent | bc7350dce5b7b1dcd1c472a3922b42c4ea99809d (diff) |
Deliver centralized role management feature
Repair multiple defects also.
Revise deployment to use docker-compose.
Remove all zip archives.
Issue: PORTAL-21, PORTAL-25, PORTAL-28, PORTAL-52, PORTAL-69,
PORTAL-74, PORTAL-76, PORTAL-80, PORTAL-82
Change-Id: Ie72fec7d35ba78beb162bba6ed27b2caee340c61
Signed-off-by: Christopher Lott (cl778h) <clott@research.att.com>
Diffstat (limited to 'ecomp-portal-widget-ms/common-widgets')
27 files changed, 858 insertions, 0 deletions
diff --git a/ecomp-portal-widget-ms/common-widgets/.gitignore b/ecomp-portal-widget-ms/common-widgets/.gitignore new file mode 100644 index 00000000..f151f08a --- /dev/null +++ b/ecomp-portal-widget-ms/common-widgets/.gitignore @@ -0,0 +1,5 @@ +.classpath +.project +/.settings/ +/bin/ +target/ diff --git a/ecomp-portal-widget-ms/common-widgets/assembly-descriptor-events.xml b/ecomp-portal-widget-ms/common-widgets/assembly-descriptor-events.xml new file mode 100644 index 00000000..0ed3c98a --- /dev/null +++ b/ecomp-portal-widget-ms/common-widgets/assembly-descriptor-events.xml @@ -0,0 +1,23 @@ +<assembly + xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 " + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance " + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 + http://maven.apache.org/xsd/assembly-1.1.2.xsd "> + <!-- second part of the final zip archive name --> + <id>widget</id> + <includeBaseDirectory>false</includeBaseDirectory> + <formats> + <format>zip</format> + </formats> + <fileSets> + <fileSet> + <directory>${basedir}</directory> + <includes> + <include>events-widget/**</include> + </includes> + <!-- silence warning about filesystem-root relative reference --> + <outputDirectory>${file.separator}</outputDirectory> + <filtered>true</filtered> + </fileSet> + </fileSets> +</assembly> diff --git a/ecomp-portal-widget-ms/common-widgets/assembly-descriptor-news.xml b/ecomp-portal-widget-ms/common-widgets/assembly-descriptor-news.xml new file mode 100644 index 00000000..93797b66 --- /dev/null +++ b/ecomp-portal-widget-ms/common-widgets/assembly-descriptor-news.xml @@ -0,0 +1,23 @@ +<assembly + xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 " + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance " + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 + http://maven.apache.org/xsd/assembly-1.1.2.xsd "> + <!-- second part of the final zip archive name --> + <id>widget</id> + <includeBaseDirectory>false</includeBaseDirectory> + <formats> + <format>zip</format> + </formats> + <fileSets> + <fileSet> + <directory>${basedir}</directory> + <includes> + <include>news-widget/**</include> + </includes> + <!-- silence warning about filesystem-root relative reference --> + <outputDirectory>${file.separator}</outputDirectory> + <filtered>true</filtered> + </fileSet> + </fileSets> +</assembly> diff --git a/ecomp-portal-widget-ms/common-widgets/assembly-descriptor-resources.xml b/ecomp-portal-widget-ms/common-widgets/assembly-descriptor-resources.xml new file mode 100644 index 00000000..e584a81b --- /dev/null +++ b/ecomp-portal-widget-ms/common-widgets/assembly-descriptor-resources.xml @@ -0,0 +1,23 @@ +<assembly + xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 " + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance " + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 + http://maven.apache.org/xsd/assembly-1.1.2.xsd "> + <!-- second part of the final zip archive name --> + <id>widget</id> + <includeBaseDirectory>false</includeBaseDirectory> + <formats> + <format>zip</format> + </formats> + <fileSets> + <fileSet> + <directory>${basedir}</directory> + <includes> + <include>resources-widget/**</include> + </includes> + <!-- silence warning about filesystem-root relative reference --> + <outputDirectory>${file.separator}</outputDirectory> + <filtered>true</filtered> + </fileSet> + </fileSets> +</assembly> diff --git a/ecomp-portal-widget-ms/common-widgets/events-widget/js/controller.js b/ecomp-portal-widget-ms/common-widgets/events-widget/js/controller.js new file mode 100644 index 00000000..8ccebeee --- /dev/null +++ b/ecomp-portal-widget-ms/common-widgets/events-widget/js/controller.js @@ -0,0 +1,64 @@ +function EventsCtrl($rootScope, applicationsService , $log, + $window, userProfileService, $scope, $cookies, $timeout, $interval, + $uibModal, dashboardService, ngDialog) { + var _this = this; + + //activate spinner + this.isLoading = true; + $scope.getUserAppsIsDone = false; + this.userProfileService = userProfileService; + $scope.demoNum = 1; + $scope.event_content_show = false; + $scope.widgetData = []; + + $scope.editWidgetModalPopup = function(availableData, resourceType) { + + $scope.editData = JSON.stringify(availableData); + $scope.availableDataTemp = $scope.availableData; + ngDialog.open({ + templateUrl : 'app/views/dashboard/dashboard-widget-manage.html', + controller : 'CommonWidgetController', + resolve : { + message : function message() { + var message = { + type : resourceType, + availableData : $scope.editData + }; + return message; + } + } + }).closePromise.then(needUpdate => { + if(resourceType=='NEWS'){ + $scope.updateNews(); + }else if(resourceType=='EVENTS'){ + $scope.updateEvents(); + }else if(resourceType=='IMPORTANTRESOURCES'){ + $scope.updateImportRes(); + } + }); + }; + /*Setting News data*/ + $scope.eventData = []; + $scope.updateEvents = function() { + + $scope.eventData.length=0; + //dashboardService.getCommonWidgetData('EVENTS').then(function(res) { + var eventDataJsonArray = res.response.items; + for (var i = 0; i < eventDataJsonArray.length; i++) { + if(eventDataJsonArray[i].eventDate !=null) { + // yyyy-mm-dd + eventDataJsonArray[i].year = eventDataJsonArray[i].eventDate.substring(2,4); + eventDataJsonArray[i].mon = eventDataJsonArray[i].eventDate.substring(5,7); + eventDataJsonArray[i].day = eventDataJsonArray[i].eventDate.substring(8,10); + } + $scope.eventData.push(eventDataJsonArray[i]); + } + //})['catch'](function(err) { + // $log.error('dashboard controller: failed to get Events list', err); + // _this.isLoading = false; + //}); + } + $scope.updateEvents(); + + + } diff --git a/ecomp-portal-widget-ms/common-widgets/events-widget/markup/markup.html b/ecomp-portal-widget-ms/common-widgets/events-widget/markup/markup.html new file mode 100644 index 00000000..39715547 --- /dev/null +++ b/ecomp-portal-widget-ms/common-widgets/events-widget/markup/markup.html @@ -0,0 +1,49 @@ +<div id="widget-events" ng-controller="EventsCtrl" class="widget-news-main"> + <div att-gridster-item-body + class="information-section-gridsterContent"> + <div class="events"> + <ul ng-show="eventData.length!=0"> + <li ng-repeat="event in eventData"> + <div ng-click="event_content_show=!event_content_show"> + <div class="events-date">{{event.mon}}/{{event.day}}/{{event.year}} + </div> + <div> + <div class="event-title-div"> + <p ng-bind="event.title"></p> + </div> + <div> + <span class="icon-chevron-up" ng-if="event_content_show" + style="color: #888; font-size: 22px;"></span> <span + class="icon-chevron-down" ng-if="!event_content_show" + style="color: #888; font-size: 22px;"></span> + + </div> + <div style="clear: both;"></div> + </div> + </div> + <div class="events-content" ng-show="event_content_show"> + <div class="events-content-body"> + <a id="event-widget-{{event.id}}" class="events-link" ng-href="{{event.href}}" + target="_blank"> <span ng-bind="event.content"></span> + </a> + </div> + <div></div> + </div> + </li> + + + </ul> + <div ng-hide="eventData.length!=0"> + <div class="activity-error-container" + style="background: rgb(255, 255, 255); overflow: hidden !important; width: 100%;"> + <div class="activity-error-block"> + <i class="icon-information full-linear-icon-information" + style="margin-left: 125px; font-size: 90px"></i> <br> + <div class="activity-error-msg1">There's currently no + event available.</div> + </div> + </div> + </div> + </div> + </div> +</div> diff --git a/ecomp-portal-widget-ms/common-widgets/events-widget/styles/app-widget-1-by-3.css b/ecomp-portal-widget-ms/common-widgets/events-widget/styles/app-widget-1-by-3.css new file mode 100644 index 00000000..53ac5c82 --- /dev/null +++ b/ecomp-portal-widget-ms/common-widgets/events-widget/styles/app-widget-1-by-3.css @@ -0,0 +1,43 @@ + +.portal-widget-panel-container { + margin-left:150px; + width:1500px; +} + + +.portal-widget-panel-fixed-panel { + min-height: 300px; + max-height: 300px; + overflow: auto; +} + +.portal-widget-panel-double-middle { + min-height: 660px; + max-height: 660px; + overflow: auto; +} + +.portal-widget-panel-row { + margin-right: 0px; + margin-left: 0px; + width: 2800px; +} + +/*Increases the width of the card/panel */ +.portal-widget-panel-panel-default { + width:450px +} + +/*Controls the spacing between the cards */ +.portal-widget-panel-col-sm-3 { + width:20.5% +} + +.portal-widget-panel-top { + top: 15px; + left: 15px; +} + +#stork-css-ready { +color: #bada55 !important; +}
\ No newline at end of file diff --git a/ecomp-portal-widget-ms/common-widgets/events-widget/styles/images/generic.png b/ecomp-portal-widget-ms/common-widgets/events-widget/styles/images/generic.png Binary files differnew file mode 100644 index 00000000..5f06bc2e --- /dev/null +++ b/ecomp-portal-widget-ms/common-widgets/events-widget/styles/images/generic.png diff --git a/ecomp-portal-widget-ms/common-widgets/events-widget/styles/images/grips.png b/ecomp-portal-widget-ms/common-widgets/events-widget/styles/images/grips.png Binary files differnew file mode 100644 index 00000000..29b92cc5 --- /dev/null +++ b/ecomp-portal-widget-ms/common-widgets/events-widget/styles/images/grips.png diff --git a/ecomp-portal-widget-ms/common-widgets/events-widget/styles/styles.css b/ecomp-portal-widget-ms/common-widgets/events-widget/styles/styles.css new file mode 100644 index 00000000..b2fbe871 --- /dev/null +++ b/ecomp-portal-widget-ms/common-widgets/events-widget/styles/styles.css @@ -0,0 +1,43 @@ + +.portal-widget-panel-container { + margin-left:150px; + width:1500px; +} + + +.portal-widget-panel-fixed-panel { + min-height: 300px; + max-height: 1300px; + overflow: auto; +} + +.portal-widget-panel-double-middle { + min-height: 660px; + max-height: 660px; + overflow: auto; +} + +.portal-widget-panel-row { + margin-right: 0px; + margin-left: 0px; + width: 2800px; +} + +/*Increases the width of the card/panel */ +.portal-widget-panel-panel-default { + width:450px +} + +/*Controls the spacing between the cards */ +.portal-widget-panel-col-sm-3 { + width:20.5% +} + +.portal-widget-panel-top { + top: 15px; + left: 15px; +} + +#events-css-ready { +color: #bada55 !important; +}
\ No newline at end of file diff --git a/ecomp-portal-widget-ms/common-widgets/news-widget/js/controller.js b/ecomp-portal-widget-ms/common-widgets/news-widget/js/controller.js new file mode 100644 index 00000000..13133339 --- /dev/null +++ b/ecomp-portal-widget-ms/common-widgets/news-widget/js/controller.js @@ -0,0 +1,60 @@ +function NewsCtrl($rootScope, applicationsService , $log, + $window, userProfileService, $scope, $cookies, $timeout, $interval, + $uibModal, dashboardService, ngDialog) { + + var _this = this; + + //activate spinner + this.isLoading = true; + $scope.getUserAppsIsDone = false; + this.userProfileService = userProfileService; + $scope.demoNum = 1; + $scope.event_content_show = false; + $scope.widgetData = []; + + $scope.editWidgetModalPopup = function(availableData, resourceType) { + + $scope.editData = JSON.stringify(availableData); + $scope.availableDataTemp = $scope.availableData; + ngDialog.open({ + templateUrl : 'app/views/dashboard/dashboard-widget-manage.html', + controller : 'CommonWidgetController', + resolve : { + message : function message() { + var message = { + type : resourceType, + availableData : $scope.editData + }; + return message; + } + } + }).closePromise.then(needUpdate => { + if(resourceType=='NEWS'){ + $scope.updateNews(); + }else if(resourceType=='EVENTS'){ + $scope.updateEvents(); + }else if(resourceType=='IMPORTANTRESOURCES'){ + $scope.updateImportRes(); + } + }); + }; + + /*Setting News data*/ + $scope.newsData = []; + $scope.updateNews = function() { + $scope.newsData.length=0; + //dashboardService.getCommonWidgetData('NEWS').then(function(res) { + // $log.info(res.message); + var newsDataJsonArray = res.response.items; + for (var i = 0; i < newsDataJsonArray.length; i++) { + $scope.newsData.push(newsDataJsonArray[i]); + } + //})['catch'](function(err) { + // $log.error('dashboard controller: failed to get news list', err); + // _this.isLoading = false; + //}); + } + $scope.updateNews(); + + } + diff --git a/ecomp-portal-widget-ms/common-widgets/news-widget/markup/markup.html b/ecomp-portal-widget-ms/common-widgets/news-widget/markup/markup.html new file mode 100644 index 00000000..c7d2df44 --- /dev/null +++ b/ecomp-portal-widget-ms/common-widgets/news-widget/markup/markup.html @@ -0,0 +1,21 @@ +<div id="widget-news" ng-controller="NewsCtrl" class="widget-news-main"> + <div att-gridster-item-body class="information-section-gridsterContent"> + <div class="resources"> + <ul ng-show="newsData.length!=0"> + <li ng-repeat="item in newsData"><a id="new-widget-{{item.id}}" + href="{{item.href}}" target="_blank" ng-bind="item.title"></a></li> + </ul> + <div ng-hide="newsData.length!=0"> + <div class="activity-error-container" + style="background: rgb(255, 255, 255); overflow: hidden !important; width: 100%;"> + <div class="activity-error-block"> + <i class="icon-information full-linear-icon-information" + style="margin-left: 125px; font-size: 90px"></i> <br> + <div class="activity-error-msg1">There's currently no + news available.</div> + </div> + </div> + </div> + </div> + </div> +</div> diff --git a/ecomp-portal-widget-ms/common-widgets/news-widget/styles/app-widget-1-by-3.css b/ecomp-portal-widget-ms/common-widgets/news-widget/styles/app-widget-1-by-3.css new file mode 100644 index 00000000..53ac5c82 --- /dev/null +++ b/ecomp-portal-widget-ms/common-widgets/news-widget/styles/app-widget-1-by-3.css @@ -0,0 +1,43 @@ + +.portal-widget-panel-container { + margin-left:150px; + width:1500px; +} + + +.portal-widget-panel-fixed-panel { + min-height: 300px; + max-height: 300px; + overflow: auto; +} + +.portal-widget-panel-double-middle { + min-height: 660px; + max-height: 660px; + overflow: auto; +} + +.portal-widget-panel-row { + margin-right: 0px; + margin-left: 0px; + width: 2800px; +} + +/*Increases the width of the card/panel */ +.portal-widget-panel-panel-default { + width:450px +} + +/*Controls the spacing between the cards */ +.portal-widget-panel-col-sm-3 { + width:20.5% +} + +.portal-widget-panel-top { + top: 15px; + left: 15px; +} + +#stork-css-ready { +color: #bada55 !important; +}
\ No newline at end of file diff --git a/ecomp-portal-widget-ms/common-widgets/news-widget/styles/app-widget.css b/ecomp-portal-widget-ms/common-widgets/news-widget/styles/app-widget.css new file mode 100644 index 00000000..0fbc8758 --- /dev/null +++ b/ecomp-portal-widget-ms/common-widgets/news-widget/styles/app-widget.css @@ -0,0 +1,43 @@ + +.portal-widget-panel-container { + margin-left:150px; + width:1500px; +} + + +.portal-widget-panel-fixed-panel { + min-height: 300px; + max-height: 1300px; + overflow: auto; +} + +.portal-widget-panel-double-middle { + min-height: 660px; + max-height: 660px; + overflow: auto; +} + +.portal-widget-panel-row { + margin-right: 0px; + margin-left: 0px; + width: 2800px; +} + +/*Increases the width of the card/panel */ +.portal-widget-panel-panel-default { + width:450px +} + +/*Controls the spacing between the cards */ +.portal-widget-panel-col-sm-3 { + width:20.5% +} + +.portal-widget-panel-top { + top: 15px; + left: 15px; +} + +#stork-css-ready { +color: #bada55 !important; +}
\ No newline at end of file diff --git a/ecomp-portal-widget-ms/common-widgets/news-widget/styles/images/generic.png b/ecomp-portal-widget-ms/common-widgets/news-widget/styles/images/generic.png Binary files differnew file mode 100644 index 00000000..5f06bc2e --- /dev/null +++ b/ecomp-portal-widget-ms/common-widgets/news-widget/styles/images/generic.png diff --git a/ecomp-portal-widget-ms/common-widgets/news-widget/styles/images/grips.png b/ecomp-portal-widget-ms/common-widgets/news-widget/styles/images/grips.png Binary files differnew file mode 100644 index 00000000..29b92cc5 --- /dev/null +++ b/ecomp-portal-widget-ms/common-widgets/news-widget/styles/images/grips.png diff --git a/ecomp-portal-widget-ms/common-widgets/news-widget/styles/style.css b/ecomp-portal-widget-ms/common-widgets/news-widget/styles/style.css new file mode 100644 index 00000000..e7c07d59 --- /dev/null +++ b/ecomp-portal-widget-ms/common-widgets/news-widget/styles/style.css @@ -0,0 +1,43 @@ + +.portal-widget-panel-container { + margin-left:150px; + width:1500px; +} + + +.portal-widget-panel-fixed-panel { + min-height: 300px; + max-height: 1300px; + overflow: auto; +} + +.portal-widget-panel-double-middle { + min-height: 660px; + max-height: 660px; + overflow: auto; +} + +.portal-widget-panel-row { + margin-right: 0px; + margin-left: 0px; + width: 2800px; +} + +/*Increases the width of the card/panel */ +.portal-widget-panel-panel-default { + width:450px +} + +/*Controls the spacing between the cards */ +.portal-widget-panel-col-sm-3 { + width:20.5% +} + +.portal-widget-panel-top { + top: 15px; + left: 15px; +} + +#-css-ready { +color: #bada55 !important; +}
\ No newline at end of file diff --git a/ecomp-portal-widget-ms/common-widgets/news-widget/styles/styles.css b/ecomp-portal-widget-ms/common-widgets/news-widget/styles/styles.css new file mode 100644 index 00000000..e7c07d59 --- /dev/null +++ b/ecomp-portal-widget-ms/common-widgets/news-widget/styles/styles.css @@ -0,0 +1,43 @@ + +.portal-widget-panel-container { + margin-left:150px; + width:1500px; +} + + +.portal-widget-panel-fixed-panel { + min-height: 300px; + max-height: 1300px; + overflow: auto; +} + +.portal-widget-panel-double-middle { + min-height: 660px; + max-height: 660px; + overflow: auto; +} + +.portal-widget-panel-row { + margin-right: 0px; + margin-left: 0px; + width: 2800px; +} + +/*Increases the width of the card/panel */ +.portal-widget-panel-panel-default { + width:450px +} + +/*Controls the spacing between the cards */ +.portal-widget-panel-col-sm-3 { + width:20.5% +} + +.portal-widget-panel-top { + top: 15px; + left: 15px; +} + +#-css-ready { +color: #bada55 !important; +}
\ No newline at end of file diff --git a/ecomp-portal-widget-ms/common-widgets/pom.xml b/ecomp-portal-widget-ms/common-widgets/pom.xml new file mode 100644 index 00000000..a71c5ac5 --- /dev/null +++ b/ecomp-portal-widget-ms/common-widgets/pom.xml @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>org.openecomp.portal</groupId> + <artifactId>widget-ms-widgets-os</artifactId> + <version>1.3.0-SNAPSHOT</version> + <packaging>pom</packaging> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> + </properties> + + <build> + + <plugins> + + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <!-- <version>2.4</version> --> + <executions> + <execution> + <id>events</id> + <phase>prepare-package</phase> + <goals> + <goal>single</goal> + </goals> + <configuration> + <descriptor>assembly-descriptor-events.xml</descriptor> + <!-- final zip archive name --> + <finalName>events-widget</finalName> + <appendAssemblyId>false</appendAssemblyId> + </configuration> + </execution> + <execution> + <id>news</id> + <phase>prepare-package</phase> + <goals> + <goal>single</goal> + </goals> + <configuration> + <descriptor>assembly-descriptor-news.xml</descriptor> + <!-- final zip archive name --> + <finalName>news-widget</finalName> + <appendAssemblyId>false</appendAssemblyId> + </configuration> + </execution> + <execution> + <id>resources</id> + <phase>prepare-package</phase> + <goals> + <goal>single</goal> + </goals> + <configuration> + <descriptor>assembly-descriptor-resources.xml</descriptor> + <!-- final zip archive name --> + <finalName>resources-widget</finalName> + <appendAssemblyId>false</appendAssemblyId> + </configuration> + </execution> + </executions> + </plugin> + + <!-- No deployment step for this project --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-deploy-plugin</artifactId> + <version>2.8</version> + <configuration> + <skip>true</skip> + </configuration> + </plugin> + + </plugins> + + </build> + +</project> diff --git a/ecomp-portal-widget-ms/common-widgets/resources-widget/js/controller.js b/ecomp-portal-widget-ms/common-widgets/resources-widget/js/controller.js new file mode 100644 index 00000000..13133339 --- /dev/null +++ b/ecomp-portal-widget-ms/common-widgets/resources-widget/js/controller.js @@ -0,0 +1,60 @@ +function NewsCtrl($rootScope, applicationsService , $log, + $window, userProfileService, $scope, $cookies, $timeout, $interval, + $uibModal, dashboardService, ngDialog) { + + var _this = this; + + //activate spinner + this.isLoading = true; + $scope.getUserAppsIsDone = false; + this.userProfileService = userProfileService; + $scope.demoNum = 1; + $scope.event_content_show = false; + $scope.widgetData = []; + + $scope.editWidgetModalPopup = function(availableData, resourceType) { + + $scope.editData = JSON.stringify(availableData); + $scope.availableDataTemp = $scope.availableData; + ngDialog.open({ + templateUrl : 'app/views/dashboard/dashboard-widget-manage.html', + controller : 'CommonWidgetController', + resolve : { + message : function message() { + var message = { + type : resourceType, + availableData : $scope.editData + }; + return message; + } + } + }).closePromise.then(needUpdate => { + if(resourceType=='NEWS'){ + $scope.updateNews(); + }else if(resourceType=='EVENTS'){ + $scope.updateEvents(); + }else if(resourceType=='IMPORTANTRESOURCES'){ + $scope.updateImportRes(); + } + }); + }; + + /*Setting News data*/ + $scope.newsData = []; + $scope.updateNews = function() { + $scope.newsData.length=0; + //dashboardService.getCommonWidgetData('NEWS').then(function(res) { + // $log.info(res.message); + var newsDataJsonArray = res.response.items; + for (var i = 0; i < newsDataJsonArray.length; i++) { + $scope.newsData.push(newsDataJsonArray[i]); + } + //})['catch'](function(err) { + // $log.error('dashboard controller: failed to get news list', err); + // _this.isLoading = false; + //}); + } + $scope.updateNews(); + + } + diff --git a/ecomp-portal-widget-ms/common-widgets/resources-widget/markup/markup.html b/ecomp-portal-widget-ms/common-widgets/resources-widget/markup/markup.html new file mode 100644 index 00000000..ce27632e --- /dev/null +++ b/ecomp-portal-widget-ms/common-widgets/resources-widget/markup/markup.html @@ -0,0 +1,21 @@ +<div id="widget-news" ng-controller="NewsCtrl" class="widget-news-main"> + <div att-gridster-item-body class="information-section-gridsterContent"> + <div class="resources"> + <ul ng-show="newsData.length!=0"> + <li ng-repeat="item in newsData"><a id="resource-widget-{{item.id}}" + href="{{item.href}}" target="_blank" ng-bind="item.title"></a></li> + </ul> + <div ng-hide="newsData.length!=0"> + <div class="activity-error-container" + style="background: rgb(255, 255, 255); overflow: hidden !important; width: 100%;"> + <div class="activity-error-block"> + <i class="icon-information full-linear-icon-information" + style="margin-left: 125px; font-size: 90px"></i> <br> + <div class="activity-error-msg1">There's currently no + news available.</div> + </div> + </div> + </div> + </div> + </div> +</div> diff --git a/ecomp-portal-widget-ms/common-widgets/resources-widget/styles/app-widget-1-by-3.css b/ecomp-portal-widget-ms/common-widgets/resources-widget/styles/app-widget-1-by-3.css new file mode 100644 index 00000000..53ac5c82 --- /dev/null +++ b/ecomp-portal-widget-ms/common-widgets/resources-widget/styles/app-widget-1-by-3.css @@ -0,0 +1,43 @@ + +.portal-widget-panel-container { + margin-left:150px; + width:1500px; +} + + +.portal-widget-panel-fixed-panel { + min-height: 300px; + max-height: 300px; + overflow: auto; +} + +.portal-widget-panel-double-middle { + min-height: 660px; + max-height: 660px; + overflow: auto; +} + +.portal-widget-panel-row { + margin-right: 0px; + margin-left: 0px; + width: 2800px; +} + +/*Increases the width of the card/panel */ +.portal-widget-panel-panel-default { + width:450px +} + +/*Controls the spacing between the cards */ +.portal-widget-panel-col-sm-3 { + width:20.5% +} + +.portal-widget-panel-top { + top: 15px; + left: 15px; +} + +#stork-css-ready { +color: #bada55 !important; +}
\ No newline at end of file diff --git a/ecomp-portal-widget-ms/common-widgets/resources-widget/styles/app-widget.css b/ecomp-portal-widget-ms/common-widgets/resources-widget/styles/app-widget.css new file mode 100644 index 00000000..0fbc8758 --- /dev/null +++ b/ecomp-portal-widget-ms/common-widgets/resources-widget/styles/app-widget.css @@ -0,0 +1,43 @@ + +.portal-widget-panel-container { + margin-left:150px; + width:1500px; +} + + +.portal-widget-panel-fixed-panel { + min-height: 300px; + max-height: 1300px; + overflow: auto; +} + +.portal-widget-panel-double-middle { + min-height: 660px; + max-height: 660px; + overflow: auto; +} + +.portal-widget-panel-row { + margin-right: 0px; + margin-left: 0px; + width: 2800px; +} + +/*Increases the width of the card/panel */ +.portal-widget-panel-panel-default { + width:450px +} + +/*Controls the spacing between the cards */ +.portal-widget-panel-col-sm-3 { + width:20.5% +} + +.portal-widget-panel-top { + top: 15px; + left: 15px; +} + +#stork-css-ready { +color: #bada55 !important; +}
\ No newline at end of file diff --git a/ecomp-portal-widget-ms/common-widgets/resources-widget/styles/images/generic.png b/ecomp-portal-widget-ms/common-widgets/resources-widget/styles/images/generic.png Binary files differnew file mode 100644 index 00000000..5f06bc2e --- /dev/null +++ b/ecomp-portal-widget-ms/common-widgets/resources-widget/styles/images/generic.png diff --git a/ecomp-portal-widget-ms/common-widgets/resources-widget/styles/images/grips.png b/ecomp-portal-widget-ms/common-widgets/resources-widget/styles/images/grips.png Binary files differnew file mode 100644 index 00000000..29b92cc5 --- /dev/null +++ b/ecomp-portal-widget-ms/common-widgets/resources-widget/styles/images/grips.png diff --git a/ecomp-portal-widget-ms/common-widgets/resources-widget/styles/style.css b/ecomp-portal-widget-ms/common-widgets/resources-widget/styles/style.css new file mode 100644 index 00000000..e7c07d59 --- /dev/null +++ b/ecomp-portal-widget-ms/common-widgets/resources-widget/styles/style.css @@ -0,0 +1,43 @@ + +.portal-widget-panel-container { + margin-left:150px; + width:1500px; +} + + +.portal-widget-panel-fixed-panel { + min-height: 300px; + max-height: 1300px; + overflow: auto; +} + +.portal-widget-panel-double-middle { + min-height: 660px; + max-height: 660px; + overflow: auto; +} + +.portal-widget-panel-row { + margin-right: 0px; + margin-left: 0px; + width: 2800px; +} + +/*Increases the width of the card/panel */ +.portal-widget-panel-panel-default { + width:450px +} + +/*Controls the spacing between the cards */ +.portal-widget-panel-col-sm-3 { + width:20.5% +} + +.portal-widget-panel-top { + top: 15px; + left: 15px; +} + +#-css-ready { +color: #bada55 !important; +}
\ No newline at end of file diff --git a/ecomp-portal-widget-ms/common-widgets/resources-widget/styles/styles.css b/ecomp-portal-widget-ms/common-widgets/resources-widget/styles/styles.css new file mode 100644 index 00000000..e7c07d59 --- /dev/null +++ b/ecomp-portal-widget-ms/common-widgets/resources-widget/styles/styles.css @@ -0,0 +1,43 @@ + +.portal-widget-panel-container { + margin-left:150px; + width:1500px; +} + + +.portal-widget-panel-fixed-panel { + min-height: 300px; + max-height: 1300px; + overflow: auto; +} + +.portal-widget-panel-double-middle { + min-height: 660px; + max-height: 660px; + overflow: auto; +} + +.portal-widget-panel-row { + margin-right: 0px; + margin-left: 0px; + width: 2800px; +} + +/*Increases the width of the card/panel */ +.portal-widget-panel-panel-default { + width:450px +} + +/*Controls the spacing between the cards */ +.portal-widget-panel-col-sm-3 { + width:20.5% +} + +.portal-widget-panel-top { + top: 15px; + left: 15px; +} + +#-css-ready { +color: #bada55 !important; +}
\ No newline at end of file |