def render_view(self, req, id): template,data,content_type = Droplet.render_view(self, req, id) if self._is_disable_api_termination(req, id): attrs = data.get('delete_attrs',{}) attrs['disabled'] = 'disabled' data['delete_attrs'] = attrs return template, data, content_type
def render_view(self, req, id): template, data, content_type = Droplet.render_view(self, req, id) if self._is_disable_api_termination(req, id): attrs = data.get('delete_attrs', {}) attrs['disabled'] = 'disabled' data['delete_attrs'] = attrs return template, data, content_type
def render_view(self, req, id): template,data,content_type = Droplet.render_view(self, req, id) deploy = self._get_command('deploy') audit = self._get_command('audit') if deploy: attrs = {} progress_file = self._is_deploying(id) if progress_file: href = req.href.cloud(self.name, action='progress', file=progress_file) data['message'] = '<b>Deploying!</b> Track the %s' % id + \ ' deployment <a href=\\"%s\\">here</a>.' % href attrs = {'disabled':'disabled'} button = ('execute',_('Deploy to %(label)s',label=self.label),attrs) data['buttons'].append(button) if audit: button = ('audit',_('Audit %(label)s',label=self.label),{}) data['buttons'].append(button) if not deploy and not audit: data['cmd_fields'] = [] return template, data, content_type
def render_view(self, req, id): template, data, content_type = Droplet.render_view(self, req, id) deploy = self._get_command('deploy') audit = self._get_command('audit') if deploy: attrs = {} progress_file = self._is_deploying(id) if progress_file: href = req.href.cloud(self.name, action='progress', file=progress_file) data['message'] = '<b>Deploying!</b> Track the %s' % id + \ ' deployment <a href=\\"%s\\">here</a>.' % href attrs = {'disabled': 'disabled'} button = ('execute', _('Deploy to %(label)s', label=self.label), attrs) data['buttons'].append(button) if audit: button = ('audit', _('Audit %(label)s', label=self.label), {}) data['buttons'].append(button) if not deploy and not audit: data['cmd_fields'] = [] return template, data, content_type
def render_view(self, req, id): template,data,content_type = Droplet.render_view(self, req, id) if id in ('deploy','audit'): href = req.href.cloud('env') data['message'] = 'To %s, use the respective button in an' % id + \ ' <a href=\\"%s\\">Environment\\\'s view</a>.' % href data['cmd_fields'] = [] # clear command fields else: button = ('execute',_('Execute %(label)s',label=self.label),{}) data['buttons'].append(button) return template, data, content_type