delete an alert from the given site
334562
def delete(nsc, site_id)
      uri = "/api/2.1/site_configurations/#{site_id}/alerts/#{id}"
      AJAX.delete(nsc, uri, AJAX::CONTENT_TYPE::JSON)
    end
1280198
function() {
		var self = this;
		function errorHandler(err) {
			self._onError(err);
		}
		function reload(site) {
			self._setSiteConfiguration(site);
			self.setDirty(false);
		}
		this._siteClient.isSelfHostingSite(this.getSiteConfiguration()).then(function(isSelfHostingSite) {
			self._isSelfHostingSite = isSelfHostingSite;
			self._commandService.destroy(self._commandsContainer);
			var userData = {
				site: self._siteConfiguration,
				startCallback: reload,
				stopCallback: reload,
				errorCallback: errorHandler
			};
			self._commandService.renderCommands(self._commandsContainer.id, self._commandsContainer, self._siteConfiguration, {}, "button", userData); //$NON-NLS-0$
		});
	}
1242340
function _delete_site( $store = true, $blog_id = null ) {
            return self::_delete_site_by_slug( $this->_slug, $this->_module_type, $store, $blog_id );
        }
668171
def destroy
      @news = Cmtool::News.find(params[:id])
      @news.destroy

      respond_to do |format|
        format.html { redirect_to(cmtool.news_index_url) }
        format.xml  { head :ok }
      end
    end
1055849
public function delete_site($site_id)
    {
        if (!$this->is_loggedin) {
            return false;
        }

        $payload  = ['site' => $site_id, 'cmd' => 'delete-site'];
        $response = $this->exec_curl('/api/s/' . $this->site . '/cmd/sitemgr', $payload);

        return $this->process_response_boolean($response);
    }
1026604
def remove_site (site)
      return nil unless @sites.map{|s| s[:name]}.include? site
      @sites.reject!{|s| s[:name] == site}
      @need_to_update = true
    end
554542
def removexattr(self, req, ino, name):
        
        self.reply_err(req, errno.ENOSYS)
361600
public function deleteSiteAction(Site $site)
    {
        $this->siteService->pruneSite($site);
        $this->addFlashMessage('The site "%s" has been deleted.', 'Site deleted', Message::SEVERITY_OK, [htmlspecialchars($site->getName())], 1412372689);
        $this->unsetLastVisitedNodeAndRedirect('index');
    }
933888
def delete(index_name, force, verbose):
    """"""
    result = current_search_client.indices.delete(
        index=index_name,
        ignore=[400, 404] if force else None,
    )
    if verbose:
        click.echo(json.dumps(result))
108857
def delete_single(site, domain, delete_code=False, no_prompt=False):
    
    click.secho('Deleting installation "{sn}" hosted on the domain {dn}'.format(sn=site.name, dn=domain.name),
                fg='yellow', bold=True)
    if not no_prompt:
        if delete_code:
            warn_text = click.style('WARNING! THIS WILL PERMANENTLY DELETE THIS SITE AND ALL OF THE ASSOCIATED '
                                    'PROJECT CODE FILES!\nTHIS MEANS ALL DATA FILES, INCLUDING ANY CREATED CUSTOM '
                                    'APPLICATIONS AND PLUGINS WILL BE PERMANENTLY AND IRREVOCABLY ERASED!',
                                    fg='red', bold=True)
            click.echo(warn_text)
            prompt_text = click.style('In order to continue, please re-input the site name', fg='white', bold=True)
            prompt = click.prompt(prompt_text)

            # If our prompt doesn't match, abort
            if prompt != site.name:
                click.secho('Site name did not match, site will not be deleted. Aborting.', fg='red', bold=True)
                raise click.Abort('Site name prompt did not match')

        else:
            prompt_text = click.style('Are you sure you want to delete this site entry? Your project files will '
                                      'still be preserved.', fg='white', bold=True)
            click.confirm(prompt_text, abort=True)

    site.delete()

    if delete_code:
        _remove_code(site)

    # If this is the only site left in the domain, remove the domain now as well
    domain_sites = [ds for ds in domain.sites if ds.id != site.id]
    if not len(domain_sites):
        Session.delete(domain)

    Session.commit()
    click.secho('{sn} removed'.format(sn=site.name), fg='yellow', bold=True)

    # Restart Nginx
    FNULL = open(os.devnull, 'w')
    subprocess.check_call(['service', 'nginx', 'restart'], stdout=FNULL, stderr=subprocess.STDOUT)
614183
def _delete(self, url):
        """"""
        r = requests.delete(self._api_prefix + url,
            headers=self.headers,
            auth=self.auth,
            allow_redirects=False,
        )
        return self._action(r)
132281
def delete(self, **kwargs):
        """"""
        url_str = self.base_url + '/%s' % kwargs['alarm_id']
        resp = self.client.delete(url_str)
        return resp
725666
function delete() {
            $option_name = $this->get_option_manager_name();

            if ( $this->_is_network_storage ) {
                delete_site_option( $option_name );
            } else if ( $this->_blog_id > 0 ) {
                delete_blog_option( $this->_blog_id, $option_name );
            } else {
                delete_option( $option_name );
            }
        }
88773
def delete_alert_change_log(self, id_or_uri):
        
        uri = self.URI + "/AlertChangeLog/" + extract_id_from_uri(id_or_uri)
        resource = {
            "uri": uri
        }
        self._client.delete(resource)
1168794
def remove_site(self):
        
        params = dict(oxd_id=self.oxd_id)

        logger.debug("Sending command `remove_site` with params %s",
                     params)
        response = self.msgr.request("remove_site", **params)
        logger.debug("Received response: %s", response)

        if response['status'] == 'error':
            raise OxdServerError(response['data'])
        return response['data']['oxd_id']
46449
def _delete(self, url):
        """"""
        req = self._session.delete(self._api_prefix + url)
        return self._action(req)
1293470
def delete_index(index):
    """"""
    logger.info("Deleting search index: '%s'", index)
    client = get_client()
    return client.indices.delete(index=index)