Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-arcgis-portal-services

Package Overview
Dependencies
Maintainers
5
Versions
119
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-arcgis-portal-services - npm Package Compare versions

Comparing version 1.4.0 to 1.5.0

addon/utils/get-service-admin-url.js

27

addon/services/hosted-service.js

@@ -0,1 +1,2 @@

import getServiceAdminUrl from 'ember-arcgis-portal-services/utils/get-service-admin-url';
import Service from '@ember/service';

@@ -53,7 +54,3 @@ import serviceMixin from '../mixins/service-mixin';

addToDefinition (featureServiceUrl, definition, layerId, portalOpts) {
let adminUrl = featureServiceUrl.replace(/\/arcgis\/rest\/services\//i, '/arcgis/rest/admin/services/');
let url = `${adminUrl}/addToDefinition?f=json`;
if (layerId || layerId === 0) {
url = `${adminUrl}/${layerId}/addToDefinition?f=json`;
}
const url = getServiceAdminUrl(featureServiceUrl, 'addToDefinition', layerId);
// since the fs has it's own url we use the requestUrl method

@@ -72,7 +69,3 @@ return this.requestUrl(url, {

updateDefinition (featureServiceUrl, definition, layerId, portalOpts) {
let adminUrl = featureServiceUrl.replace(/\/arcgis\/rest\/services\//i, '/arcgis/rest/admin/services/');
let url = `${adminUrl}/updateDefinition?f=json`;
if (layerId || layerId === 0) {
url = `${adminUrl}/${layerId}/updateDefinition?f=json`;
}
const url = getServiceAdminUrl(featureServiceUrl, 'updateDefinition', layerId);
// since the fs has it's own url we use the requestUrl method

@@ -88,2 +81,16 @@ return this.requestUrl(url, {

/**
* Delete from the service definition
*/
deleteFromDefinition (featureServiceUrl, definition, layerId, portalOpts) {
const url = getServiceAdminUrl(featureServiceUrl, 'deleteFromDefinition', layerId);
// since the fs has it's own url we use the requestUrl method
return this.requestUrl(url, {
method: 'POST',
data: {
deleteFromDefinition: JSON.stringify(definition)
}
}, portalOpts);
},
/**
* Shared logic for POST operations

@@ -90,0 +97,0 @@ */

@@ -5,2 +5,6 @@ # Change Log

## Unreleased
### Added
- `hosted-service:deleteFromDefinition` method
## 1.4.0

@@ -7,0 +11,0 @@ ### Added

{
"name": "ember-arcgis-portal-services",
"version": "1.4.0",
"version": "1.5.0",
"description": "A set of promise-based Ember Services for working with the ArcGIS Portal API.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -175,2 +175,3 @@ # ember-arcgis-portal-services

| `updateDefinition (fsUrl, definition, layerId, portalOpts)` | `promise` | Update a service/layer's definition |
| `deleteFromDefinition (fsUrl, definition, layerId, portalOpts)` | `promise` | Delete from a service/layer's definition |

@@ -177,0 +178,0 @@ ### environment.js

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc