From 4030aeb40524095b98d5015a8f1a67783b7031de Mon Sep 17 00:00:00 2001 From: Joe Meiring Date: Mon, 24 Jul 2017 12:01:30 -0500 Subject: [PATCH 1/3] DES-241 fix --- .../designsafe/apps/rapid/build/bundle.js | 269 +++++++++--------- .../designsafe/apps/rapid/build/bundle.js.map | 2 +- .../designsafe/apps/rapid/scripts/index.js | 3 +- 3 files changed, 138 insertions(+), 136 deletions(-) diff --git a/designsafe/apps/rapid/static/designsafe/apps/rapid/build/bundle.js b/designsafe/apps/rapid/static/designsafe/apps/rapid/build/bundle.js index 162a84c5e4..4dec3ccc89 100644 --- a/designsafe/apps/rapid/static/designsafe/apps/rapid/build/bundle.js +++ b/designsafe/apps/rapid/static/designsafe/apps/rapid/build/bundle.js @@ -63,7 +63,7 @@ /******/ __webpack_require__.p = ""; /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 8); +/******/ return __webpack_require__(__webpack_require__.s = 10); /******/ }) /************************************************************************/ /******/ ([ @@ -73,11 +73,11 @@ "use strict"; -var _rapidMainCtrl = __webpack_require__(3); +var _rapidMainCtrl = __webpack_require__(4); var _rapidMainCtrl2 = _interopRequireDefault(_rapidMainCtrl); -var _rapidAdminUsersCtrl = __webpack_require__(9); +var _rapidAdminUsersCtrl = __webpack_require__(3); var _rapidAdminUsersCtrl2 = _interopRequireDefault(_rapidAdminUsersCtrl); @@ -95,11 +95,11 @@ mod.controller('RapidAdminUsersCtrl', _rapidAdminUsersCtrl2.default); "use strict"; -var _eventListing = __webpack_require__(5); +var _eventListing = __webpack_require__(6); var _eventListing2 = _interopRequireDefault(_eventListing); -var _eventListingDetailed = __webpack_require__(4); +var _eventListingDetailed = __webpack_require__(5); var _eventListingDetailed2 = _interopRequireDefault(_eventListingDetailed); @@ -117,11 +117,11 @@ mod.directive('eventListingDetailed', _eventListingDetailed2.default); "use strict"; -var _rapidDataService = __webpack_require__(6); +var _rapidDataService = __webpack_require__(8); var _rapidDataService2 = _interopRequireDefault(_rapidDataService); -var _rapidAdminService = __webpack_require__(10); +var _rapidAdminService = __webpack_require__(7); var _rapidAdminService2 = _interopRequireDefault(_rapidAdminService); @@ -145,7 +145,82 @@ Object.defineProperty(exports, "__esModule", { var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); -var _L = __webpack_require__(7); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var RapidAdminUsersCtrl = function () { + RapidAdminUsersCtrl.$inject = ["UserService", "RapidAdminService"]; + function RapidAdminUsersCtrl(UserService, RapidAdminService) { + 'ngInject'; + + _classCallCheck(this, RapidAdminUsersCtrl); + + this.UserService = UserService; + this.RapidAdminService = RapidAdminService; + this.list_admin_users(); + } + + _createClass(RapidAdminUsersCtrl, [{ + key: 'list_admin_users', + value: function list_admin_users() { + var _this = this; + + this.UserService.search({ q: '', role: 'Rapid Admin' }).then(function (resp) { + _this.admin_users = resp; + }); + } + }, { + key: 'search_users', + value: function search_users(q) { + var _this2 = this; + + if (q.length > 1) { + this.UserService.search({ q: q }).then(function (resp) { + console.log(resp); + _this2.found_users = resp; + }); + } else { + this.found_users = []; + } + } + }, { + key: 'make_admin', + value: function make_admin(user) { + var _this3 = this; + + this.RapidAdminService.update_permissions(user, 'grant').then(function (resp) { + _this3.list_admin_users(); + }); + } + }, { + key: 'revoke_admin', + value: function revoke_admin(user) { + var _this4 = this; + + this.RapidAdminService.update_permissions(user, 'revoke').then(function (resp) { + _this4.list_admin_users(); + }); + } + }]); + + return RapidAdminUsersCtrl; +}(); + +exports.default = RapidAdminUsersCtrl; + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _L = __webpack_require__(9); var _L2 = _interopRequireDefault(_L); @@ -247,7 +322,7 @@ var RapidMainCtrl = function () { exports.default = RapidMainCtrl; /***/ }), -/* 4 */ +/* 5 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -267,7 +342,7 @@ function eventListingDetailed() { } /***/ }), -/* 5 */ +/* 6 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -287,7 +362,52 @@ function eventListing() { } /***/ }), -/* 6 */ +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var RapidAdminService = function () { + RapidAdminService.$inject = ["$http", "$q"]; + function RapidAdminService($http, $q) { + 'ngInject'; + + _classCallCheck(this, RapidAdminService); + + this.$http = $http; + this.$q = $q; + } + + _createClass(RapidAdminService, [{ + key: 'update_permissions', + value: function update_permissions(user, action) { + var payload = { + username: user.username, + action: action + }; + + return this.$http.post('/rapid/admin/users/permissions', payload).then(function (resp) { + return resp.data; + }); + } + }]); + + return RapidAdminService; +}(); + +exports.default = RapidAdminService; + +/***/ }), +/* 8 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -363,13 +483,13 @@ var RapidDataService = function () { exports.default = RapidDataService; /***/ }), -/* 7 */ +/* 9 */ /***/ (function(module, exports) { module.exports = L; /***/ }), -/* 8 */ +/* 10 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -393,7 +513,8 @@ function config($stateProvider, $uibTooltipProvider, $urlRouterProvider, $locati 'ngInject'; $locationProvider.html5Mode({ - enabled: true + enabled: true, + rewriteLinks: false }); $stateProvider.state('rapid', { @@ -424,126 +545,6 @@ mod.config(config); exports.default = mod; -/***/ }), -/* 9 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var RapidAdminUsersCtrl = function () { - RapidAdminUsersCtrl.$inject = ["UserService", "RapidAdminService"]; - function RapidAdminUsersCtrl(UserService, RapidAdminService) { - 'ngInject'; - - _classCallCheck(this, RapidAdminUsersCtrl); - - this.UserService = UserService; - this.RapidAdminService = RapidAdminService; - this.list_admin_users(); - } - - _createClass(RapidAdminUsersCtrl, [{ - key: 'list_admin_users', - value: function list_admin_users() { - var _this = this; - - this.UserService.search({ q: '', role: 'Rapid Admin' }).then(function (resp) { - _this.admin_users = resp; - }); - } - }, { - key: 'search_users', - value: function search_users(q) { - var _this2 = this; - - if (q.length > 1) { - this.UserService.search({ q: q }).then(function (resp) { - console.log(resp); - _this2.found_users = resp; - }); - } else { - this.found_users = []; - } - } - }, { - key: 'make_admin', - value: function make_admin(user) { - var _this3 = this; - - this.RapidAdminService.update_permissions(user, 'grant').then(function (resp) { - _this3.list_admin_users(); - }); - } - }, { - key: 'revoke_admin', - value: function revoke_admin(user) { - var _this4 = this; - - this.RapidAdminService.update_permissions(user, 'revoke').then(function (resp) { - _this4.list_admin_users(); - }); - } - }]); - - return RapidAdminUsersCtrl; -}(); - -exports.default = RapidAdminUsersCtrl; - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var RapidAdminService = function () { - RapidAdminService.$inject = ["$http", "$q"]; - function RapidAdminService($http, $q) { - 'ngInject'; - - _classCallCheck(this, RapidAdminService); - - this.$http = $http; - this.$q = $q; - } - - _createClass(RapidAdminService, [{ - key: 'update_permissions', - value: function update_permissions(user, action) { - var payload = { - username: user.username, - action: action - }; - - return this.$http.post('/rapid/admin/users/permissions', payload).then(function (resp) { - return resp.data; - }); - } - }]); - - return RapidAdminService; -}(); - -exports.default = RapidAdminService; - /***/ }) /******/ ]); //# sourceMappingURL=bundle.js.map \ No newline at end of file diff --git a/designsafe/apps/rapid/static/designsafe/apps/rapid/build/bundle.js.map b/designsafe/apps/rapid/static/designsafe/apps/rapid/build/bundle.js.map index 2881ffc7b5..53bd9689ed 100644 --- a/designsafe/apps/rapid/static/designsafe/apps/rapid/build/bundle.js.map +++ b/designsafe/apps/rapid/static/designsafe/apps/rapid/build/bundle.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap 0ac48a4f1a0fccb4b9eb","webpack:///./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/controllers/index.js","webpack:///./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/directives/index.js","webpack:///./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/services/index.js","webpack:///./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/controllers/rapid-main-ctrl.js","webpack:///./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/directives/event-listing-detailed.js","webpack:///./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/directives/event-listing.js","webpack:///./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/services/rapid-data-service.js","webpack:///external \"L\"","webpack:///./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/index.js","webpack:///./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/controllers/rapid-admin-users-ctrl.js","webpack:///./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/services/rapid-admin-service.js"],"names":["mod","angular","module","controller","directive","service","RapidMainCtrl","$scope","$compile","RapidDataService","show_sidebar","filter_options","active_rapid_event","attribution","maxZoom","streets","satellite","layers","scrollWheelZoom","setView","map","zoomControl","setPosition","event_types","resp","events","forEach","marker","d","location","lat","addLayer","rapid_event","on","ev","console","log","filtered_events","search","eventListingDetailed","templateUrl","scope","event","eventListing","$http","$q","opts","get","data","created_date","Date","event_date","tmp","_","f1","event_type","item","f2","title","f3","f4","requires","push","config","$stateProvider","$uibTooltipProvider","$locationProvider","html5Mode","enabled","url","resolve","auth","state","UserService","RapidAdminService","list_admin_users","admin_users","q","length","found_users","action"],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AAC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;;iBAEiC;AAChC,GAAc;AAAA;AAEZmC,gBAAQA;AAFI,OAAd;;AAKD,aAAO,KAAKpC,GAAoE;AAC9E,eAAOpB,KAAKwB,IAAZ;AACD,OAFM,CAAP;AAGA","file":"./designsafe/apps/rapid/static/designsafe/apps/rapid/build/bundle.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 8);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 0ac48a4f1a0fccb4b9eb","import RapidMainCtrl from './rapid-main-ctrl';\nimport RapidAdminUsersCtrl from './rapid-admin-users-ctrl';\n\n\nlet mod = angular.module('ds.rapid.controllers', []);\n\nmod.controller('RapidMainCtrl', RapidMainCtrl);\nmod.controller('RapidAdminUsersCtrl', RapidAdminUsersCtrl);\n\n\n\n// WEBPACK FOOTER //\n// ./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/controllers/index.js","import eventListing from './event-listing';\nimport eventListingDetailed from './event-listing-detailed';\n\nlet mod = angular.module('ds.rapid.directives', []);\n\nmod.directive('eventListing', eventListing);\nmod.directive('eventListingDetailed', eventListingDetailed);\n\n\n\n// WEBPACK FOOTER //\n// ./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/directives/index.js","import RapidDataService from './rapid-data-service';\nimport RapidAdminService from './rapid-admin-service';\n\nlet mod = angular.module('ds.rapid.services', []);\n\nmod.service('RapidDataService', RapidDataService);\nmod.service('RapidAdminService', RapidAdminService);\n\n\n\n// WEBPACK FOOTER //\n// ./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/services/index.js","import L from 'L';\n\nexport default class RapidMainCtrl {\n constructor ($scope, $compile, RapidDataService) {\n 'ngInject';\n console.log(\"RapidMainCtrl\")\n this.$scope = $scope;\n this.$compile = $compile;\n this.RapidDataService = RapidDataService;\n this.show_sidebar = true;\n this.filter_options = {};\n this.active_rapid_event = null;\n\n let streets = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {\n attribution: '© OpenStreetMap contributors'\n });\n\n let satellite = L.tileLayer(\n 'https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', {\n attribution: '©',\n maxZoom: 18,\n });\n\n let basemaps = {\n 'Street': streets,\n 'Satellite': satellite\n };\n this.map = L.map('map', {\n layers: [streets, satellite],\n scrollWheelZoom: true\n }\n ).setView([30.2672, -97.7431], 2);\n this.map.zoomControl.setPosition('topright');\n\n this.RapidDataService.get_event_types().then( (resp)=> {\n this.event_types = resp;\n });\n\n this.RapidDataService.get_events().then( (resp)=>{\n this.events = resp;\n this.events.forEach((d)=> {\n // let template = \"
\" +\n // \"

{{event.title}}

\" +\n // \"
\" +\n // \" {{dataset.doi}} \"+\n // \"
\";\n // let linker = this.$compile(angular.element(template));\n let marker = L.marker([d.location.lat, d.location.lon]);\n // let newScope = this.$scope.$new();\n // newScope.event = d;\n // marker.bindPopup(linker(newScope)[0], {className : 'rapid-popup'});\n this.map.addLayer(marker);\n marker.rapid_event = d;\n marker.on('click', (ev) => {\n if (marker.rapid_event == this.active_rapid_event) {\n this.active_rapid_event = null;\n } else {\n this.active_rapid_event = marker.rapid_event;\n this.show_sidebar = true;\n }\n this.$scope.$apply();\n });\n });\n });\n }\n\n select_event (ev) {\n this.map.setView([ev.location.lat, ev.location.lon],8, {animate: true});\n this.active_rapid_event = ev;\n }\n\n search () {\n console.log(this.filter_options)\n this.filtered_events = this.RapidDataService.search(this.events, this.filter_options);\n }\n\n clear_filters () {\n this.filter_options = {};\n this.search();\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/controllers/rapid-main-ctrl.js","\nexport default function eventListingDetailed() {\n return {\n templateUrl: \"/static/designsafe/apps/rapid/html/event-listing-detailed.html\",\n scope: {\n event: '=event',\n }\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/directives/event-listing-detailed.js","\nexport default function eventListing() {\n return {\n templateUrl: \"/static/designsafe/apps/rapid/html/event-listing.html\",\n scope: {\n event: '=event',\n }\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/directives/event-listing.js","export default class RapidDataService {\n constructor ($http, $q) {\n 'ngInject';\n this.$http = $http;\n this.$q = $q;\n }\n\n get_events (opts) {\n console.log(opts);\n return this.$http.get('/rapid/events', opts).then( (resp) => {\n resp.data.forEach( (d) =>{\n d.created_date = new Date(d.created_date);\n d.event_date = new Date(d.event_date);\n });\n return resp.data;\n });\n }\n\n get_event_types () {\n return this.$http.get('/rapid/event-types').then( (resp) => {\n return resp.data;\n });\n }\n\n search (events, filter_options) {\n let tmp = _.filter(events, (item)=>{\n let f1 = true;\n if (filter_options.event_type) {\n f1 = item.event_type == filter_options.event_type.name;\n }\n let f2 = true;\n if (filter_options.search_text) {\n f2 = item.title.substring(0, filter_options.search_text.length).toLowerCase() === filter_options.search_text.toLowerCase();\n }\n let f3 = true;\n if (filter_options.start_date) {\n f3 = item.event_date > filter_options.start_date;\n }\n let f4 = true;\n if (filter_options.end_date) {\n f4 = item.event_date < filter_options.end_date;\n }\n return f1 && f2 && f3 && f4;\n });\n return tmp;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/services/rapid-data-service.js","module.exports = L;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"L\"\n// module id = 7\n// module chunks = 0","import {mod as rapid_controllers} from './controllers';\nimport {mod as rapid_services} from './services';\nimport {mod as rapid_directives} from './directives';\n\nlet mod = angular.module('designsafe');\nmod.requires.push('ui.router','ds.rapid.controllers', 'ds.rapid.services', 'ds.rapid.directives', 'ngAnimate');\n\nfunction config($stateProvider, $uibTooltipProvider, $urlRouterProvider, $locationProvider) {\n 'ngInject';\n\n $locationProvider.html5Mode({\n enabled: true\n });\n\n $stateProvider.state('rapid', {\n url: '/',\n templateUrl: '/static/designsafe/apps/rapid/html/index.html',\n controller: 'RapidMainCtrl as vm',\n resolve: {\n auth: function () {\n return true;\n }\n }\n })\n .state('rapid_admin', {\n url: '/admin/users',\n templateUrl: '/static/designsafe/apps/rapid/html/rapid-admin-users.html',\n controller: 'RapidAdminUsersCtrl as vm',\n resolve: {\n auth: function () {\n return true;\n }\n }\n });\n\n //config popups etc\n $uibTooltipProvider.options({popupDelay:1000});\n\n}\n\nmod.config(config);\n\n\n\nexport default mod;\n\n\n\n// WEBPACK FOOTER //\n// ./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/index.js","\nexport default class RapidAdminUsersCtrl {\n\n constructor(UserService, RapidAdminService) {\n 'ngInject';\n this.UserService = UserService;\n this.RapidAdminService = RapidAdminService;\n this.list_admin_users();\n\n }\n\n list_admin_users () {\n this.UserService.search({q:'', role:'Rapid Admin'}).then( (resp)=>{\n this.admin_users = resp;\n });\n }\n\n search_users(q) {\n if (q.length > 1) {\n this.UserService.search({q:q}).then((resp)=>{\n console.log(resp);\n this.found_users = resp;\n });\n } else {\n this.found_users = [];\n }\n }\n\n make_admin(user) {\n this.RapidAdminService.update_permissions(user, 'grant').then( (resp)=>{\n this.list_admin_users();\n });\n }\n\n revoke_admin(user) {\n this.RapidAdminService.update_permissions(user, 'revoke').then( (resp)=>{\n this.list_admin_users();\n });\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/controllers/rapid-admin-users-ctrl.js","export default class RapidAdminService {\n constructor ($http, $q) {\n 'ngInject';\n this.$http = $http;\n this.$q = $q;\n }\n\n update_permissions (user, action) {\n let payload = {\n username: user.username,\n action: action\n };\n\n return this.$http.post('/rapid/admin/users/permissions', payload).then( (resp)=>{\n return resp.data;\n });\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/services/rapid-admin-service.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap 6b4f069571b6740cac4e","webpack:///./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/controllers/index.js","webpack:///./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/directives/index.js","webpack:///./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/services/index.js","webpack:///./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/controllers/rapid-admin-users-ctrl.js","webpack:///./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/controllers/rapid-main-ctrl.js","webpack:///./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/directives/event-listing-detailed.js","webpack:///./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/directives/event-listing.js","webpack:///./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/services/rapid-admin-service.js","webpack:///./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/services/rapid-data-service.js","webpack:///external \"L\"","webpack:///./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/index.js"],"names":["mod","angular","module","controller","directive","service","RapidAdminUsersCtrl","UserService","RapidAdminService","list_admin_users","admin_users","resp","console","log","found_users","$scope","$compile","RapidDataService","show_sidebar","filter_options","active_rapid_event","streets","tileLayer","maxZoom","satellite","map","layers","scrollWheelZoom","setView","zoomControl","setPosition","get_event_types","then","events","forEach","d","marker","addLayer","rapid_event","on","$apply","ev","filtered_events","search","templateUrl","scope","event","$q","payload","username","user","action","$http","get","data","created_date","Date","event_date","f1","item","event_type","f2","search_text","title","substring","f3","start_date","f4","end_date","tmp","requires","push","config","$stateProvider","$uibTooltipProvider","$locationProvider","html5Mode","rewriteLinks","state","url","auth","resolve"],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA,mDAA2C,cAAc;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;;;AChEA;;;;AACA;;;;;;AAGA,IAAI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B;AAC3BD,eAAKR,KAAKF,UAAL,GAAkBtC,eAAeiD,QAAtC;AACD;AACD,eAAOV,MAAMG,CAAb;AACD,OAlBS,CAAV;AAmBA,aAAOQ,GAAP;AACD;;;;;;;;;;;;AC7CH,S;;;;;;;;;;;;;ACAA;;AACA;;AACA;;AAEA;AACArE,IAAIsE,QAAJ,CAAaC,IAAb,CAAkB,WAAlB,EAA8B,QAA9B;;AAEA,SAASC,MAAT,CAAgBC,cAAhB,EAAgCC,SAA4D;AAC1F;;AAEAC,oBAAkBC,SAAlB,CAA4B;AAAA;AAE1BC,kBAAc;AAFY,GAA5B;;AAKAJ,iBAAeK,KAAf,CAAqB,OAArB,CAA8B;AAC5BC,SAAK,GADuB;AAE5BnC,iBAAa,MAFe;AAG5BzC,KAH4B;AAInB;AACP6E,YAAM,gBAAY;AAChB;AACD;AAHM;AAJmB,GAA9B,EAUCF,KAVD,CAUO,GAAe;AACpBC,SAAK,cADe;AAEpBnC,iBAAa,GAFO;AAGpBzC,OAHoB;AAIpB8E,KAAS;AACPD,YAAM,eAAY;AAChB,eAAO,IAAP;AACD;AAHM;AAJW,GAVtB;;AAqBA;AACAN,OAAA;AAED;;AAED;;kBAIe1E,G","file":"./designsafe/apps/rapid/static/designsafe/apps/rapid/build/bundle.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 10);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6b4f069571b6740cac4e","import RapidMainCtrl from './rapid-main-ctrl';\nimport RapidAdminUsersCtrl from './rapid-admin-users-ctrl';\n\n\nlet mod = angular.module('ds.rapid.controllers', []);\n\nmod.controller('RapidMainCtrl', RapidMainCtrl);\nmod.controller('RapidAdminUsersCtrl', RapidAdminUsersCtrl);\n\n\n\n// WEBPACK FOOTER //\n// ./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/controllers/index.js","import eventListing from './event-listing';\nimport eventListingDetailed from './event-listing-detailed';\n\nlet mod = angular.module('ds.rapid.directives', []);\n\nmod.directive('eventListing', eventListing);\nmod.directive('eventListingDetailed', eventListingDetailed);\n\n\n\n// WEBPACK FOOTER //\n// ./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/directives/index.js","import RapidDataService from './rapid-data-service';\nimport RapidAdminService from './rapid-admin-service';\n\nlet mod = angular.module('ds.rapid.services', []);\n\nmod.service('RapidDataService', RapidDataService);\nmod.service('RapidAdminService', RapidAdminService);\n\n\n\n// WEBPACK FOOTER //\n// ./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/services/index.js","\nexport default class RapidAdminUsersCtrl {\n\n constructor(UserService, RapidAdminService) {\n 'ngInject';\n this.UserService = UserService;\n this.RapidAdminService = RapidAdminService;\n this.list_admin_users();\n\n }\n\n list_admin_users () {\n this.UserService.search({q:'', role:'Rapid Admin'}).then( (resp)=>{\n this.admin_users = resp;\n });\n }\n\n search_users(q) {\n if (q.length > 1) {\n this.UserService.search({q:q}).then((resp)=>{\n console.log(resp);\n this.found_users = resp;\n });\n } else {\n this.found_users = [];\n }\n }\n\n make_admin(user) {\n this.RapidAdminService.update_permissions(user, 'grant').then( (resp)=>{\n this.list_admin_users();\n });\n }\n\n revoke_admin(user) {\n this.RapidAdminService.update_permissions(user, 'revoke').then( (resp)=>{\n this.list_admin_users();\n });\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/controllers/rapid-admin-users-ctrl.js","import L from 'L';\n\nexport default class RapidMainCtrl {\n constructor ($scope, $compile, RapidDataService) {\n 'ngInject';\n console.log(\"RapidMainCtrl\")\n this.$scope = $scope;\n this.$compile = $compile;\n this.RapidDataService = RapidDataService;\n this.show_sidebar = true;\n this.filter_options = {};\n this.active_rapid_event = null;\n\n let streets = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {\n attribution: '© OpenStreetMap contributors'\n });\n\n let satellite = L.tileLayer(\n 'https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', {\n attribution: '©',\n maxZoom: 18,\n });\n\n let basemaps = {\n 'Street': streets,\n 'Satellite': satellite\n };\n this.map = L.map('map', {\n layers: [streets, satellite],\n scrollWheelZoom: true\n }\n ).setView([30.2672, -97.7431], 2);\n this.map.zoomControl.setPosition('topright');\n\n this.RapidDataService.get_event_types().then( (resp)=> {\n this.event_types = resp;\n });\n\n this.RapidDataService.get_events().then( (resp)=>{\n this.events = resp;\n this.events.forEach((d)=> {\n // let template = \"
\" +\n // \"

{{event.title}}

\" +\n // \"
\" +\n // \" {{dataset.doi}} \"+\n // \"
\";\n // let linker = this.$compile(angular.element(template));\n let marker = L.marker([d.location.lat, d.location.lon]);\n // let newScope = this.$scope.$new();\n // newScope.event = d;\n // marker.bindPopup(linker(newScope)[0], {className : 'rapid-popup'});\n this.map.addLayer(marker);\n marker.rapid_event = d;\n marker.on('click', (ev) => {\n if (marker.rapid_event == this.active_rapid_event) {\n this.active_rapid_event = null;\n } else {\n this.active_rapid_event = marker.rapid_event;\n this.show_sidebar = true;\n }\n this.$scope.$apply();\n });\n });\n });\n }\n\n select_event (ev) {\n this.map.setView([ev.location.lat, ev.location.lon],8, {animate: true});\n this.active_rapid_event = ev;\n }\n\n search () {\n console.log(this.filter_options)\n this.filtered_events = this.RapidDataService.search(this.events, this.filter_options);\n }\n\n clear_filters () {\n this.filter_options = {};\n this.search();\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/controllers/rapid-main-ctrl.js","\nexport default function eventListingDetailed() {\n return {\n templateUrl: \"/static/designsafe/apps/rapid/html/event-listing-detailed.html\",\n scope: {\n event: '=event',\n }\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/directives/event-listing-detailed.js","\nexport default function eventListing() {\n return {\n templateUrl: \"/static/designsafe/apps/rapid/html/event-listing.html\",\n scope: {\n event: '=event',\n }\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/directives/event-listing.js","export default class RapidAdminService {\n constructor ($http, $q) {\n 'ngInject';\n this.$http = $http;\n this.$q = $q;\n }\n\n update_permissions (user, action) {\n let payload = {\n username: user.username,\n action: action\n };\n\n return this.$http.post('/rapid/admin/users/permissions', payload).then( (resp)=>{\n return resp.data;\n });\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/services/rapid-admin-service.js","export default class RapidDataService {\n constructor ($http, $q) {\n 'ngInject';\n this.$http = $http;\n this.$q = $q;\n }\n\n get_events (opts) {\n console.log(opts);\n return this.$http.get('/rapid/events', opts).then( (resp) => {\n resp.data.forEach( (d) =>{\n d.created_date = new Date(d.created_date);\n d.event_date = new Date(d.event_date);\n });\n return resp.data;\n });\n }\n\n get_event_types () {\n return this.$http.get('/rapid/event-types').then( (resp) => {\n return resp.data;\n });\n }\n\n search (events, filter_options) {\n let tmp = _.filter(events, (item)=>{\n let f1 = true;\n if (filter_options.event_type) {\n f1 = item.event_type == filter_options.event_type.name;\n }\n let f2 = true;\n if (filter_options.search_text) {\n f2 = item.title.substring(0, filter_options.search_text.length).toLowerCase() === filter_options.search_text.toLowerCase();\n }\n let f3 = true;\n if (filter_options.start_date) {\n f3 = item.event_date > filter_options.start_date;\n }\n let f4 = true;\n if (filter_options.end_date) {\n f4 = item.event_date < filter_options.end_date;\n }\n return f1 && f2 && f3 && f4;\n });\n return tmp;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/services/rapid-data-service.js","module.exports = L;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"L\"\n// module id = 9\n// module chunks = 0","import {mod as rapid_controllers} from './controllers';\nimport {mod as rapid_services} from './services';\nimport {mod as rapid_directives} from './directives';\n\nlet mod = angular.module('designsafe');\nmod.requires.push('ui.router','ds.rapid.controllers', 'ds.rapid.services', 'ds.rapid.directives', 'ngAnimate');\n\nfunction config($stateProvider, $uibTooltipProvider, $urlRouterProvider, $locationProvider) {\n 'ngInject';\n\n $locationProvider.html5Mode({\n enabled: true,\n rewriteLinks: false\n });\n\n $stateProvider.state('rapid', {\n url: '/',\n templateUrl: '/static/designsafe/apps/rapid/html/index.html',\n controller: 'RapidMainCtrl as vm',\n resolve: {\n auth: function () {\n return true;\n }\n }\n })\n .state('rapid_admin', {\n url: '/admin/users',\n templateUrl: '/static/designsafe/apps/rapid/html/rapid-admin-users.html',\n controller: 'RapidAdminUsersCtrl as vm',\n resolve: {\n auth: function () {\n return true;\n }\n }\n });\n\n //config popups etc\n $uibTooltipProvider.options({popupDelay:1000});\n\n}\n\nmod.config(config);\n\n\n\nexport default mod;\n\n\n\n// WEBPACK FOOTER //\n// ./designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/index.js"],"sourceRoot":""} \ No newline at end of file diff --git a/designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/index.js b/designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/index.js index efa47178f6..a85a04434c 100644 --- a/designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/index.js +++ b/designsafe/apps/rapid/static/designsafe/apps/rapid/scripts/index.js @@ -9,7 +9,8 @@ function config($stateProvider, $uibTooltipProvider, $urlRouterProvider, $locati 'ngInject'; $locationProvider.html5Mode({ - enabled: true + enabled: true, + rewriteLinks: false }); $stateProvider.state('rapid', { From f835460da798d8a1c813c915723b26a24e0a0691 Mon Sep 17 00:00:00 2001 From: Josue Balandrano Coronel Date: Mon, 24 Jul 2017 12:45:48 -0500 Subject: [PATCH 2/3] Hiding re-captcha in registration form --- designsafe/apps/accounts/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designsafe/apps/accounts/forms.py b/designsafe/apps/accounts/forms.py index 852aa677e7..91e5f356df 100644 --- a/designsafe/apps/accounts/forms.py +++ b/designsafe/apps/accounts/forms.py @@ -338,7 +338,7 @@ class UserRegistrationForm(forms.Form): label='I Agree to the Terms of Use', error_messages={'required': 'Please Accept the DesignSafe Terms of Use.'}) - captcha = NoReCaptchaField() + #captcha = NoReCaptchaField() def __init__(self, *args, **kwargs): super(UserRegistrationForm, self).__init__(*args, **kwargs) From cf0473f9964cff70e65e69b1476268c64e03c569 Mon Sep 17 00:00:00 2001 From: Josue Balandrano Coronel Date: Mon, 24 Jul 2017 12:58:33 -0500 Subject: [PATCH 3/3] Updating uwsgi processes to 50 --- conf/uwsgi.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/uwsgi.ini b/conf/uwsgi.ini index 89a7519bda..e3a9893507 100644 --- a/conf/uwsgi.ini +++ b/conf/uwsgi.ini @@ -10,7 +10,7 @@ module=designsafe.wsgi:application master = True pidfile = /tmp/django-master.pid vacuum = True -processes = 20 +processes = 50 buffer-size = 65535 harakiri = 120 #post-buffering = 4096