Delete a specific dashboard.
965619
def _delete(url, profile):
    ''''''
    request_url = "{0}/api/dashboards/{1}".format(profile.get('grafana_url'),
                                                  url)
    response = requests.delete(
        request_url,
        headers={
            "Accept": "application/json",
            "Authorization": "Bearer {0}".format(profile.get('grafana_token'))
        },
        timeout=profile.get('grafana_timeout'),
    )
    data = response.json()
    return data
1175784
def delete(self, data=None):
        """"""
        if not self.can_delete:
            raise JSSMethodNotAllowedError(self.__class__.__name__)
        if data:
            self.jss.delete(self.url, data)
        else:
            self.jss.delete(self.url)
1240315
public function delete(string $id)
    {
        $this->request->allowMethod(['post', 'delete']);
        $dashboard = $this->Dashboards->get($id);

        if ($this->Dashboards->delete($dashboard)) {
            /** @var \Search\Model\Table\WidgetsTable */
            $widgetTable = TableRegistry::get('Search.Widgets');
            $widgetTable->trashAll([
                'dashboard_id' => $id
            ]);

            $this->Flash->success((string)__('The dashboard has been deleted.'));
        } else {
            $this->Flash->error((string)__('The dashboard could not be deleted. Please, try again.'));
        }

        return $this->redirect(['action' => 'index']);
    }
1067646
def delete(self, skip_mapping=False):
        """"""
        for index in self.indexes:
            index.destroy()
            if not skip_mapping:
                index.create_mapping()
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))
756236
def delete(self):
        """"""
        stacks = [
            self.utilities_name,
            self.spot_nodes_name,
            self.node_group_name,
            self.cluster_name,
            self.vpc_name,
            self.role_name
        ]
        # Execute creation.
        for stack in tqdm.tqdm(stacks, ncols=70):
            self.delete_stack(stack)
1114272
def delete(self):
        
        self.manager.session.delete(self.uri)
        self.manager._metrics_contexts.remove(self)
499060
def delete(self):
        """"""
        response = self.http_request(self._url, 'DELETE')
        if response.status != 204:
            self.raise_http_error(response)
867447
def delete(self):
        """"""
        self.conn.delete(self.jid)
        self.reserved = False
380671
def remove(self, transport):
        
        if transport.uid in self.transports:
            del (self.transports[transport.uid])
390112
def delete(self, task_id):
    """"""
    if isinstance(task_id, RegisteredTask):
      task_id = task_id.id

    def cloud_delete(api):
      api.delete(task_id)

    if len(self._threads):
      self.put(cloud_delete)
    else:
      cloud_delete(self._api)

    return self
153292
def destroy
      return render json: { errors: { message: 'Dashboard not found' } }, status: :not_found unless dashboard

      # Abort on failure
      unless dashboard.destroy
        return render json: { errors: 'Cannot destroy dashboard' }, status: :bad_request
      end

      MnoEnterprise::EventLogger.info('dashboard_delete', current_user.id, 'Dashboard Deletion', dashboard)
      head status: :ok
    end
506319
def terminate(self):
        """"""
        try:
            self.id2sims.terminate()
        except:
            pass
        import glob
        for fname in glob.glob(self.fname + '*'):
            try:
                os.remove(fname)
                logger.info("deleted %s" % fname)
            except Exception, e:
                logger.warning("failed to delete %s: %s" % (fname, e))
        for val in self.__dict__.keys():
            try:
                delattr(self, val)
            except:
                pass
336058
def delete(self):
        """"""

        start = datetime.now()
        r = requests.delete(self._url(), auth=(self.key, ""))
        self._delay_for_ratelimits(start)

        if r.status_code not in self.TRUTHY_CODES:
            return self._handle_request_exception(r)
46449
def _delete(self, url):
        """"""
        req = self._session.delete(self._api_prefix + url)
        return self._action(req)
141005
def delete_service(self, service_id):
		""""""
		content = self._fetch("/service/%s" % service_id, method="DELETE")
		return self._status(content)
162715
def delete(self, redis):
        '''  '''
        value = getattr(self.obj, self.name)
        redis.srem(self.key() + ':' + value, self.obj.id)