List all registered views
771100
def list_views():
    
    echo_header("List of registered views")
    for view in current_app.appbuilder.baseviews:
        click.echo(
            "View:{0} | Route:{1} | Perms:{2}".format(
                view.__class__.__name__, view.route_base, view.base_permissions
            )
        )
611068
def _list_view(self, model, **kwargs):
        
        from uliweb import request

        #add download fields process
        fields = kwargs.pop('fields', None)
        meta = kwargs.pop('meta', 'Table')
        if 'download' in request.GET:
            if 'download_fields' in kwargs:
                fields = kwargs.pop('download_fields', fields)
            if 'download_meta' in kwargs:
                meta = kwargs.pop('download_meta')
            else:
                if hasattr(model, 'Download'):
                    meta = 'Download'
                else:
                    meta = meta

        view = functions.ListView(model, fields=fields, meta=meta, **kwargs)
        return view
537886
def register_view(self, view, timestamp):
        """"""
        if len(self.exporters) > 0:
            try:
                for e in self.exporters:
                    e.on_register_view(view)
            except AttributeError:
                pass

        self._exported_views = None
        existing_view = self._registered_views.get(view.name)
        if existing_view is not None:
            if existing_view == view:
                # ignore the views that are already registered
                return
            else:
                logging.warning(
                    "A different view with the same name is already registered"
                )  # pragma: NO COVER
        measure = view.measure
        registered_measure = self._registered_measures.get(measure.name)
        if registered_measure is not None and registered_measure != measure:
            logging.warning(
                "A different measure with the same name is already registered")
        self._registered_views[view.name] = view
        if registered_measure is None:
            self._registered_measures[measure.name] = measure
        self._measure_to_view_data_list_map[view.measure.name].append(
            view_data_module.ViewData(view=view, start_time=timestamp,
                                      end_time=timestamp))
755648
def get_views(self):
        
        url = self.__url + 'views'
        return self.session.get(url).json()
35567
protected function registerViews()
    {
        $path      = $this->getBasePath() . '/' . $this->convention->viewsFolder();
        $namespace = $this->config('views.namespace', $this->shortName());

        if (is_dir($path)) {
            $this->loadViewsFrom($path, $namespace);
        }
    }
83772
def list_all_requests_view(request, requestType):
    '''
    
    '''
    request_type = get_object_or_404(RequestType, url_name=requestType)
    requests = Request.objects.filter(request_type=request_type)
    # Hide the count for private requests
    if not request_type.managers.filter(incumbent__user=request.user):
        requests = requests.exclude(
            ~Q(owner__user=request.user), private=True,
            )

    page_name = "Archives - All {0} Requests".format(request_type.name.title())
    return render_to_response('list_requests.html', {
        'page_name': page_name,
        'requests': requests,
        'request_type': request_type,
        }, context_instance=RequestContext(request))
269598
def list_all(self, name=None, visibility=None, member_status=None,
            owner=None, tag=None, status=None, size_min=None, size_max=None,
            sort_key=None, sort_dir=None):
        
        return self._manager.list_all(name=name, visibility=visibility,
                member_status=member_status, owner=owner, tag=tag,
                status=status, size_min=size_min, size_max=size_max,
                sort_key=sort_key, sort_dir=sort_dir)
550950
def tablesAndViews(self):
      """"""
      result = self.execute(
        u'SELECT name,type FROM sqlite_master WHERE type in ("table", "view")',
        commit=False)
      return ((row['name'],row['type']) for row in result)
1073055
def list(self, cur_p=''):
        '''
        
        '''
        if cur_p == '':
            current_page_number = 1
        else:
            current_page_number = int(cur_p)

        current_page_number = 1 if current_page_number < 1 else current_page_number

        pager_num = int(MReply.total_number() / CMS_CFG['list_num'])

        kwd = {'pager': '',
               'current_page': current_page_number,
               'title': '单页列表'}
        self.render('admin/reply_ajax/reply_list.html',
                    kwd=kwd,
                    view_all=MReply.query_all(),
                    infos=MReply.query_pager(current_page_num=current_page_number),
                    userinfo=self.userinfo
                    )
616402
def view_list(self):
        ''''''
        done = set()
        ret = []
        while len(done) != self.count():
            p = self.view_indexes(done)
            if len(p) > 0:
                ret.append(p)
        return ret
414152
private void addViewsToList(List<WebElement> allWebElements, List<WebElement> webElementsOnScreen){

		int[] xyViewFromSet = new int[2];
		int[] xyViewFromScreen = new int[2];

		for(WebElement textFromScreen : webElementsOnScreen){
			boolean foundView = false;
			textFromScreen.getLocationOnScreen(xyViewFromScreen);

			for(WebElement textFromList : allWebElements){
				textFromList.getLocationOnScreen(xyViewFromSet);

				if(textFromScreen.getText().equals(textFromList.getText()) && xyViewFromScreen[0] == xyViewFromSet[0] && xyViewFromScreen[1] == xyViewFromSet[1]) {
					foundView = true;
				}
			}

			if(!foundView){
				allWebElements.add(textFromScreen);
			}
		}

	}
866029
def query_all(current_page_num=1):
        '''
        
        '''
        return TabLog.select().where(TabLog.user_id == 'None').order_by(TabLog.time_out.desc()).paginate(
            current_page_num, CMS_CFG['list_num']
        )
94848
public List<Widget> getAllViews() {
        List<Widget> views = new ArrayList<>();
        for (Widget child: mContent.getChildren()) {
            Widget item =  ((ListItemHostWidget) child).getGuest();
            if (item != null) {
                views.add(item);
            }
        }
        return views;
    }
609644
def register_view(self, view):
        """"""
        self.setup_columns()

        # connects tv messages
        tv = self.view['tv_categories']
        sel = tv.get_selection()
        sel.connect('changed', self.on_selection_changed)

        # connects other messages
        return
1276184
def list_view_changed(self, widget, event, data=None):
        
        adj = self.scrolled_window.get_vadjustment()
        adj.set_value(adj.get_upper() - adj.get_page_size())
669871
protected function getViewModuleFiles($view)
    {
        $rootPath = resource_path('views/' . str_replace('.', '/', $view));

        return [
            $rootPath . '/index',
            $rootPath . '/show',
            $rootPath . '/create',
            $rootPath . '/edit'
        ];
    }
775439
def _get_view_index(self, view):
        """"""
        name = view.__class__.__name__
        return len(self.list_views(name))