From d5b85a2b4ff4f0c5cdf168fa3eb0fc4e669b57a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Marsza=C5=82ek?= Date: Mon, 16 Apr 2018 10:43:32 +0200 Subject: [PATCH 01/11] removed unnecessary files --- .../js/dashboard/dashboard.controller.js | 51 ----- .../static/js/dashboard/dashboard.service.js | 53 ----- .../static/js/dashboard/dashboard.view.html | 10 - .../js/dashboard/document.controller.js | 125 ----------- .../static/js/dashboard/document.view.html | 59 ------ .../static/js/profile/profile.controller.js | 9 - .../static/js/profile/profile.view.html | 3 - .../resources/static/js/view/account.html | 9 - .../static/js/view/add-affiliation.html | 70 ------- .../static/js/view/affiliation-view.html | 90 -------- .../static/js/view/affiliations-list.html | 32 --- .../js/view/affiliations-management-list.html | 26 --- .../resources/static/js/view/dashboard.html | 26 --- src/main/resources/static/js/view/footer.html | 8 - .../static/js/view/indigo/document.html | 196 ------------------ .../js/view/indigo/indigo/activeSlaQuery.html | 36 ---- .../js/view/indigo/indigo/provider.html | 15 -- .../js/view/indigo/indigo/providers.html | 21 -- .../js/view/indigo/indigo/providersQuery.html | 40 ---- .../resources/static/js/view/indigo/main.html | 29 --- .../static/js/view/indigo/menu-bazaar.html | 16 -- .../static/js/view/indigo/menu-plgrid.html | 24 --- .../view/indigo/move-it-from-here/header.html | 16 -- .../static/js/view/indigo/query.html | 36 ---- .../js/view/indigo/sla/create-pool.html | 44 ---- .../js/view/indigo/sla/create-request.html | 45 ---- .../js/view/indigo/test-grants/list.html | 43 ---- src/main/resources/static/js/view/login.html | 0 .../static/js/view/manage-affiliation.html | 95 --------- .../resources/static/js/view/profile.html | 83 -------- .../static/js/view/registration.html | 38 ---- .../static/js/view/resources-apply.html | 6 - .../resources/static/js/view/resources.html | 33 --- 33 files changed, 1387 deletions(-) delete mode 100644 src/main/resources/static/js/dashboard/dashboard.controller.js delete mode 100644 src/main/resources/static/js/dashboard/dashboard.service.js delete mode 100644 src/main/resources/static/js/dashboard/dashboard.view.html delete mode 100644 src/main/resources/static/js/dashboard/document.controller.js delete mode 100644 src/main/resources/static/js/dashboard/document.view.html delete mode 100644 src/main/resources/static/js/profile/profile.controller.js delete mode 100644 src/main/resources/static/js/profile/profile.view.html delete mode 100644 src/main/resources/static/js/view/account.html delete mode 100644 src/main/resources/static/js/view/add-affiliation.html delete mode 100644 src/main/resources/static/js/view/affiliation-view.html delete mode 100644 src/main/resources/static/js/view/affiliations-list.html delete mode 100644 src/main/resources/static/js/view/affiliations-management-list.html delete mode 100644 src/main/resources/static/js/view/dashboard.html delete mode 100644 src/main/resources/static/js/view/footer.html delete mode 100644 src/main/resources/static/js/view/indigo/document.html delete mode 100644 src/main/resources/static/js/view/indigo/indigo/activeSlaQuery.html delete mode 100644 src/main/resources/static/js/view/indigo/indigo/provider.html delete mode 100644 src/main/resources/static/js/view/indigo/indigo/providers.html delete mode 100644 src/main/resources/static/js/view/indigo/indigo/providersQuery.html delete mode 100644 src/main/resources/static/js/view/indigo/main.html delete mode 100644 src/main/resources/static/js/view/indigo/menu-bazaar.html delete mode 100644 src/main/resources/static/js/view/indigo/menu-plgrid.html delete mode 100644 src/main/resources/static/js/view/indigo/move-it-from-here/header.html delete mode 100644 src/main/resources/static/js/view/indigo/query.html delete mode 100644 src/main/resources/static/js/view/indigo/sla/create-pool.html delete mode 100644 src/main/resources/static/js/view/indigo/sla/create-request.html delete mode 100644 src/main/resources/static/js/view/indigo/test-grants/list.html delete mode 100644 src/main/resources/static/js/view/login.html delete mode 100644 src/main/resources/static/js/view/manage-affiliation.html delete mode 100644 src/main/resources/static/js/view/profile.html delete mode 100644 src/main/resources/static/js/view/registration.html delete mode 100644 src/main/resources/static/js/view/resources-apply.html delete mode 100644 src/main/resources/static/js/view/resources.html diff --git a/src/main/resources/static/js/dashboard/dashboard.controller.js b/src/main/resources/static/js/dashboard/dashboard.controller.js deleted file mode 100644 index 7944dbf..0000000 --- a/src/main/resources/static/js/dashboard/dashboard.controller.js +++ /dev/null @@ -1,51 +0,0 @@ -angular.module('indigo.dashboard', ['ngRoute']).config(function ($routeProvider) { - $routeProvider.when('/dashboard', {templateUrl: 'js/dashboard/dashboard.view.html', controller: 'dashboardCtrl', - activetab: 'dashboard', - data: { - //authorizedRoles: [USER_ROLES.admin, USER_ROLES.editor] - }}); -}).controller('dashboardCtrl', function ($scope, $location, $routeParams, DashboardResource, DocumentResource, SESSION, Sites) { - $scope.slas = []; - $scope.Sites = Sites; - - var type = 'userDashboard'; - - if($routeParams.type == undefined) { - if(SESSION.roles.indexOf('ROLE_PROVIDER') != -1) - type = 'providerDashboard'; - } else { - type = $routeParams.type; - } - - - - - DashboardResource.query({type: type}, function (data) { - $scope.slas = data.data; - - data.data.forEach(function (sla_type) { - sla_type.slas = []; - DocumentResource.query({query_id: sla_type.id}, function (data) { - sla_type.documents = data.data; - }); - }) - }, function (resonse) { - - }); - - $scope.addDocument = function () { - $location.path('/component'); - }; - - $scope.editDocument = function (documentId) { - $location.path('/component/'+documentId); - }; - - $scope.removeDocument = function (documentId) { - - }; - - $scope.acceptDocument = function (documentId) { - - } -}); \ No newline at end of file diff --git a/src/main/resources/static/js/dashboard/dashboard.service.js b/src/main/resources/static/js/dashboard/dashboard.service.js deleted file mode 100644 index c0e981a..0000000 --- a/src/main/resources/static/js/dashboard/dashboard.service.js +++ /dev/null @@ -1,53 +0,0 @@ -angular.module('indigo.dashboard') - .service('DashboardResource', function ($resource) { - //tyoe can be either userDashboard or providerDashboard - return $resource('/query/available?queryCategoryId=:type', {type: '@userDashboard'}, { - query: {method: 'GET'} - }); - }) - .service('Sites', function ($resource, $q) { - var res = $resource('api/sites', {}, {query: {method: 'GET'}}); - - var sites = {}; - res.query({}, function (data) { - data.rows.forEach(function (site) { - sites[site.id] = site; - }); - }); - - return sites; - }) - .service('DocumentResource', function ($resource, EngineInterceptor) { - - - return $resource('/query/documents?queryId=:query_id', {query_id: '@query_id', id: '@id', action: '@action'}, { - query: {method: 'GET'}, - get: {method: 'GET', url: '/component/getwithextradata?documentId=:id', interceptor: EngineInterceptor}, - metrics: {method: 'GET', url: 'api/metrics?type=computing', isArray: true}, - query_action: {method: 'GET', url: 'api/sla_action/:id', isArray: true}, - perform_action: {method: 'POST', url: 'api/sla_action/:id', transformRequest: EngineInterceptor.request}, - create: {method: 'POST', url: 'api/sla', transformRequest: EngineInterceptor.request}, - update: {method: 'PUT', url: 'api/sla/:id', transformRequest: EngineInterceptor.request}, - //sites: {method: 'GET', url: 'http://indigo.cloud.plgrid.pl/cmdb/service/list'} - sites: {method: 'GET', url: 'api/sites'} - }) - }).service('EngineInterceptor', function () { - return { - response: function (response) { - return response.resource.data; - }, - responseError: function (response) { - return response; - }, - request: function (data, headersGetter) { - var site = data.site; - console.log('parsing request'); - if(site && site.id) { - data.site = site.id; - data.siteName = site.value.provider_id; - } - - return angular.toJson(data) - } - } -}); \ No newline at end of file diff --git a/src/main/resources/static/js/dashboard/dashboard.view.html b/src/main/resources/static/js/dashboard/dashboard.view.html deleted file mode 100644 index 06bdfaf..0000000 --- a/src/main/resources/static/js/dashboard/dashboard.view.html +++ /dev/null @@ -1,10 +0,0 @@ - -
-

{{ sla.label }}

- -
- diff --git a/src/main/resources/static/js/dashboard/document.controller.js b/src/main/resources/static/js/dashboard/document.controller.js deleted file mode 100644 index 4e5f539..0000000 --- a/src/main/resources/static/js/dashboard/document.controller.js +++ /dev/null @@ -1,125 +0,0 @@ -angular.module('indigo.dashboard').config(function ($routeProvider) { - $routeProvider.when('/component/:document_id', {templateUrl: 'js/dashboard/component.view.html', controller: 'documentCtrl', - activetab: 'dashboard', - data: { - //authorizedRoles: [USER_ROLES.admin, USER_ROLES.editor] - }}); - $routeProvider.when('/component', {templateUrl: 'js/dashboard/component.view.html', controller: 'documentCtrl', - activetab: 'dashboard', - data: { - //authorizedRoles: [USER_ROLES.admin, USER_ROLES.editor] - }}); -}).controller('documentCtrl', function ($scope, $route, $location, DashboardResource, DocumentResource) { - console.log($route.current.params.document_id); - $scope.documentId = $route.current.params.document_id; - $scope.state = 'form'; - $scope.metrics = []; - $scope.metrics_d = {}; - $scope.sla = {site: null, name: '', id: $scope.documentId, metrics: {}, editable: false}; - $scope.sites = []; - $scope.actions = []; - - $scope.loadDocument = function () { - var sla = null; - - if($scope.documentId) { - DocumentResource.get({id: $scope.documentId}, function (data) { - $scope.actions = data.actions; - sla = data.document; - - for (var metric in sla.metrics) { - if (sla.metrics.hasOwnProperty(metric) && metric != 'weightComputing') { - if ($scope.metrics_d[metric].inputType == 'DATE' && sla.metrics[metric] != null) { - sla.metrics[metric] = new Date(sla.metrics[metric]); - } - - } - } - - $scope.sla = sla; - - $scope.sites.forEach(function (site) { - if(site.id == sla.site){ - sla.site = site; - } - }); - - //check whether component is editable - $scope.actions.forEach(function (action) { - if(action.id == 'editDraft') - //setting it in sla is for possible future compatibility - sla.editable = true; - }) - }, function (response) { - - }) - } - }; - - - $scope.sites = DocumentResource.sites({}, function (data) { - $scope.sites = data.rows; - $scope.sla.site = data.rows[0]; - $scope.loadMetrics(); - }, function (response) { - $location.url('/error?message=sitesUnavailable'); - }); - - $scope.loadMetrics = function () { - DocumentResource.metrics({}, function (data) { - $scope.metrics = data; - - - - $scope.metrics.forEach(function (metric) { - if(!$scope.documentId) - $scope.sla.metrics[metric.id] = null; - $scope.metrics_d[metric.id] = metric; - }); - - $scope.loadDocument(); - - }, function (response) { - - }); - }; - - $scope.getMetricClasses = function (metric) { - if(metric.unit && metric.unit != 'none') { - return 'input-group'; - } - return ''; - }; - - $scope.sendRequest = function (form, sla) { - if(!form.$valid) - return; - var action = 'create'; - if(sla.id) - action = 'update'; - - - DocumentResource[action](sla, function (data) { - $scope.state = 'success'; - }, function (response) { - - }); - }; - $scope.deleteRequest = function (sla) { - DocumentResource.delete({id: $scope.documentId}, function (data) { - $scope.state = 'deleted'; - }, function (response) { - - }); - }; - $scope.performAction = function (form, action, sla) { - if(!form.$valid) - return; - $scope.sla.action = action; - DocumentResource.perform_action(sla, function (data) { - $scope.state = 'success'; - }, function (response) { - - }); - }; -}); \ No newline at end of file diff --git a/src/main/resources/static/js/dashboard/document.view.html b/src/main/resources/static/js/dashboard/document.view.html deleted file mode 100644 index dea1f45..0000000 --- a/src/main/resources/static/js/dashboard/document.view.html +++ /dev/null @@ -1,59 +0,0 @@ -
-

Request

- -
-
- -
- - - - - - - - -
-
-

Site in which apply for resources

-
-
- -
- -
-
- -
-
-
-

Request's name

-
-
- -
- -
-
- - {{metric.unit}} -
-
-
-

{{metric.description}}

-
-
- -
- - -
-
-
-

Action has been successfully carried out (back)

-
-
-

Request has been successfully deleted (back)

-
\ No newline at end of file diff --git a/src/main/resources/static/js/profile/profile.controller.js b/src/main/resources/static/js/profile/profile.controller.js deleted file mode 100644 index a3ccfaa..0000000 --- a/src/main/resources/static/js/profile/profile.controller.js +++ /dev/null @@ -1,9 +0,0 @@ -angular.module('indigo.profile', ['ngRoute']).config(function ($routeProvider) { - $routeProvider.when('/profile', {templateUrl: 'js/profile/profile.view.html', controller: 'profileCtrl', - activetab: 'profile', - data: { - //authorizedRoles: [USER_ROLES.admin, USER_ROLES.editor] - }}); -}).controller('profileCtrl', function ($scope) { - -}); \ No newline at end of file diff --git a/src/main/resources/static/js/profile/profile.view.html b/src/main/resources/static/js/profile/profile.view.html deleted file mode 100644 index 3a6cce8..0000000 --- a/src/main/resources/static/js/profile/profile.view.html +++ /dev/null @@ -1,3 +0,0 @@ -
- -
\ No newline at end of file diff --git a/src/main/resources/static/js/view/account.html b/src/main/resources/static/js/view/account.html deleted file mode 100644 index d646ff8..0000000 --- a/src/main/resources/static/js/view/account.html +++ /dev/null @@ -1,9 +0,0 @@ -
-
-
-
- -
-
-
-
diff --git a/src/main/resources/static/js/view/add-affiliation.html b/src/main/resources/static/js/view/add-affiliation.html deleted file mode 100644 index 38768cf..0000000 --- a/src/main/resources/static/js/view/add-affiliation.html +++ /dev/null @@ -1,70 +0,0 @@ - -
-

Add new affiliation

- - - -
diff --git a/src/main/resources/static/js/view/affiliation-view.html b/src/main/resources/static/js/view/affiliation-view.html deleted file mode 100644 index 3fdceeb..0000000 --- a/src/main/resources/static/js/view/affiliation-view.html +++ /dev/null @@ -1,90 +0,0 @@ - -
-

{{affiliation.institution}}

-
-
    - -
  • - Institution type: - {{affiliation.type}} -
  • - -
  • - Name: - {{affiliation.name}} -
  • - -
  • - Acronym: - {{affiliation.acronym}} -
  • - -
  • - Department/Center: - {{affiliation.department}} -
  • - -
  • - Address: - {{affiliation.address}} -
  • - -
  • - ZIP code: - {{affiliation.zipCode}} -
  • - -
  • - City: - {{affiliation.city}} -
  • - -
  • - Country / NGI: - {{affiliation.country}} -
  • - -
  • - Phone: - {{affiliation.primaryPhone}} -
  • - -
  • - Secondary Phone: - {{affiliation.secondaryPhone}} -
  • - -
-
-

- Back to profile and affiliations -

-
-
-
    -
  • -
    - -
    -

    - Status: {{affiliation.status}} -

    -
  • -
  • -
    - -
    -

    - Updated: {{affiliation.lastUpdateDate | date:'MM/dd/yyyy'}} -

    -
  • -
- -
-
- diff --git a/src/main/resources/static/js/view/affiliations-list.html b/src/main/resources/static/js/view/affiliations-list.html deleted file mode 100644 index 6746c96..0000000 --- a/src/main/resources/static/js/view/affiliations-list.html +++ /dev/null @@ -1,32 +0,0 @@ -

- Affiliations - Add affiliation -

- - - -
- To apply for a personal allocation you need to have confirmed affiliation - Add your first affiliation -
- - -
- - - - - - - - - - - - - -
NameStatusDate
- - {{affiliation.department+" / "+affiliation.name}} - - {{affiliation.status}}{{affiliation.lastUpdateDate | date:'MM.dd.yyyy'}}
diff --git a/src/main/resources/static/js/view/affiliations-management-list.html b/src/main/resources/static/js/view/affiliations-management-list.html deleted file mode 100644 index 3a70ecf..0000000 --- a/src/main/resources/static/js/view/affiliations-management-list.html +++ /dev/null @@ -1,26 +0,0 @@ -
-

- Affiliations management -

- -
- - - - - - - - - - - - - -
NameStatusDate
- {{affiliation.department+" / "+affiliation.name}} {{affiliation.status}}{{affiliation.lastUpdateDate | date:'MM.dd.yyyy'}}
-
-
- - diff --git a/src/main/resources/static/js/view/dashboard.html b/src/main/resources/static/js/view/dashboard.html deleted file mode 100644 index 3ad18bb..0000000 --- a/src/main/resources/static/js/view/dashboard.html +++ /dev/null @@ -1,26 +0,0 @@ -
-
-

Hello

-

- Welcome to Indigo-SLAM. -

-
- -

Are you new here? - Read information about our project -

-
- -
-
-

First steps

-
    -
  • -
  • -
  • -
  • -
  • -
-
-
- diff --git a/src/main/resources/static/js/view/footer.html b/src/main/resources/static/js/view/footer.html deleted file mode 100644 index a15a716..0000000 --- a/src/main/resources/static/js/view/footer.html +++ /dev/null @@ -1,8 +0,0 @@ - -
-
-

- ©2015 -

-
-
\ No newline at end of file diff --git a/src/main/resources/static/js/view/indigo/document.html b/src/main/resources/static/js/view/indigo/document.html deleted file mode 100644 index b706d14..0000000 --- a/src/main/resources/static/js/view/indigo/document.html +++ /dev/null @@ -1,196 +0,0 @@ - - - -
- -
-

- {{::document.name}} - {{::document.site}} - - {{branchOfScience}} -

-
-
-
-
- - - - -
-
-
- - - - - - - - - - - - - -
- -
- - - - - - -
- - - -
-
-
- -
-

-
-
- -
-
- -
-

- {{metricFormValues[metricId]}} - -

-
-
-
-
-
- -
- -

-

- - - - -
- - - - - - - -