Search is not available for this dataset
repo stringlengths 2 152 ⌀ | file stringlengths 15 239 | code stringlengths 0 58.4M | file_length int64 0 58.4M | avg_line_length float64 0 1.81M | max_line_length int64 0 12.7M | extension_type stringclasses 364
values |
|---|---|---|---|---|---|---|
null | ceph-main/src/pybind/mgr/dashboard/controllers/_base_controller.py | import inspect
import json
import logging
from functools import wraps
from typing import ClassVar, List, Optional, Type
from urllib.parse import unquote
import cherrypy
from ..plugins import PLUGIN_MANAGER
from ..services.auth import AuthManager, JwtManager
from ..tools import get_request_body_params
from ._helpers i... | 10,918 | 33.553797 | 100 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/_crud.py | from enum import Enum
from functools import wraps
from inspect import isclass
from typing import Any, Callable, Dict, Generator, Iterable, Iterator, List, \
NamedTuple, Optional, Tuple, Union, get_type_hints
from ._api_router import APIRouter
from ._docs import APIDoc, EndpointDoc
from ._rest_controller import RES... | 16,887 | 33.748971 | 99 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/_docs.py | from typing import Any, Dict, List, Optional, Tuple, Union
from ..api.doc import SchemaInput, SchemaType
class EndpointDoc: # noqa: N802
DICT_TYPE = Union[Dict[str, Any], Dict[int, Any]]
def __init__(self, description: str = "", group: str = "",
parameters: Optional[Union[DICT_TYPE, List[A... | 5,587 | 42.317829 | 99 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/_endpoint.py | from typing import Optional
from ._helpers import _get_function_params
from ._version import APIVersion
class Endpoint:
def __init__(self, method=None, path=None, path_params=None, query_params=None, # noqa: N802
json_response=True, proxy=False, xml=False,
version: Optional[AP... | 2,703 | 31.578313 | 97 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/_helpers.py | import collections
import json
import logging
import re
from functools import wraps
import cherrypy
from ceph_argparse import ArgumentFormat # pylint: disable=import-error
from ..exceptions import DashboardException
from ..tools import getargspec
logger = logging.getLogger(__name__)
ENDPOINT_MAP = collections.def... | 3,990 | 30.179688 | 84 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/_paginate.py | 0 | 0 | 0 | py | |
null | ceph-main/src/pybind/mgr/dashboard/controllers/_permissions.py | """
Role-based access permissions decorators
"""
import logging
from ..exceptions import PermissionNotValid
from ..security import Permission
logger = logging.getLogger(__name__)
def _set_func_permissions(func, permissions):
if not isinstance(permissions, list):
permissions = [permissions]
for perm... | 1,618 | 25.540984 | 61 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/_rest_controller.py | import collections
import inspect
from functools import wraps
from typing import Optional
import cherrypy
from ..security import Permission
from ._base_controller import BaseController
from ._endpoint import Endpoint
from ._helpers import _get_function_params
from ._permissions import _set_func_permissions
from ._ver... | 10,337 | 40.352 | 155 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/_router.py | import logging
import cherrypy
from ..exceptions import ScopeNotValid
from ..security import Scope
from ._base_controller import BaseController
from ._helpers import generate_controller_routes
logger = logging.getLogger(__name__)
class Router(object):
def __init__(self, path, base_url=None, security_scope=None... | 2,158 | 29.842857 | 80 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/_task.py | from functools import wraps
import cherrypy
from ..tools import TaskManager
from ._helpers import _get_function_params
class Task:
def __init__(self, name, metadata, wait_for=5.0, exception_handler=None):
self.name = name
if isinstance(metadata, list):
self.metadata = {e[1:-1]: e for... | 3,121 | 35.729412 | 89 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/_ui_router.py | from ._router import Router
class UIRouter(Router):
def __init__(self, path, security_scope=None, secure=True):
super().__init__(path, base_url="/ui-api",
security_scope=security_scope,
secure=secure)
def __call__(self, cls):
cls = super().__c... | 384 | 26.5 | 63 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/_version.py | import re
from typing import NamedTuple
class APIVersion(NamedTuple):
"""
>>> APIVersion(1,0)
APIVersion(major=1, minor=0)
>>> APIVersion._make([1,0])
APIVersion(major=1, minor=0)
>>> f'{APIVersion(1, 0)!r}'
'APIVersion(major=1, minor=0)'
"""
major: int
minor: int
DEFAUL... | 2,038 | 25.828947 | 79 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/auth.py | # -*- coding: utf-8 -*-
import http.cookies
import logging
import sys
from .. import mgr
from ..exceptions import InvalidCredentialsError, UserDoesNotExist
from ..services.auth import AuthManager, JwtManager
from ..services.cluster import ClusterModel
from ..settings import Settings
from . import APIDoc, APIRouter, C... | 4,829 | 38.268293 | 99 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/ceph_users.py | import logging
from errno import EINVAL
from typing import List, NamedTuple, Optional
from ..exceptions import DashboardException
from ..security import Scope
from ..services.ceph_service import CephService, SendCommandError
from . import APIDoc, APIRouter, CRUDCollectionMethod, CRUDEndpoint, \
EndpointDoc, RESTCo... | 8,139 | 36.511521 | 119 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/cephfs.py | # -*- coding: utf-8 -*-
import logging
import os
from collections import defaultdict
import cephfs
import cherrypy
from .. import mgr
from ..exceptions import DashboardException
from ..security import Scope
from ..services.ceph_service import CephService
from ..services.cephfs import CephFS as CephFS_
from ..services... | 20,408 | 34.994709 | 100 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/cluster.py | # -*- coding: utf-8 -*-
from typing import Dict, List, Optional
from ..security import Scope
from ..services.cluster import ClusterModel
from ..services.exception import handle_orchestrator_error
from ..services.orchestrator import OrchClient, OrchFeature
from ..tools import str_to_bool
from . import APIDoc, APIRoute... | 3,916 | 37.401961 | 98 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/cluster_configuration.py | # -*- coding: utf-8 -*-
import cherrypy
from .. import mgr
from ..exceptions import DashboardException
from ..security import Scope
from ..services.ceph_service import CephService
from . import APIDoc, APIRouter, EndpointDoc, RESTController
FILTER_SCHEMA = [{
"name": (str, 'Name of the config option'),
"type... | 5,085 | 37.240602 | 91 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/crush_rule.py |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from cherrypy import NotFound
from .. import mgr
from ..security import Scope
from ..services.ceph_service import CephService
from . import APIDoc, APIRouter, Endpoint, EndpointDoc, ReadPermission, RESTController, UIRouter
from ._version import APIVersio... | 2,213 | 31.086957 | 96 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/daemon.py | # -*- coding: utf-8 -*-
from typing import Optional
from ..exceptions import DashboardException
from ..security import Scope
from ..services.exception import handle_orchestrator_error
from ..services.orchestrator import OrchClient, OrchFeature
from . import APIDoc, APIRouter, RESTController
from ._version import APIV... | 1,310 | 37.558824 | 96 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/docs.py | # -*- coding: utf-8 -*-
import logging
from typing import Any, Dict, List, Optional, Union
import cherrypy
from .. import mgr
from ..api.doc import Schema, SchemaInput, SchemaType
from . import ENDPOINT_MAP, BaseController, Endpoint, Router
from ._version import APIVersion
NO_DESCRIPTION_AVAILABLE = "*No description... | 16,752 | 37.424312 | 100 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/erasure_code_profile.py | # -*- coding: utf-8 -*-
from cherrypy import NotFound
from .. import mgr
from ..security import Scope
from ..services.ceph_service import CephService
from . import APIDoc, APIRouter, Endpoint, EndpointDoc, ReadPermission, RESTController, UIRouter
LIST_CODE__SCHEMA = {
"crush-failure-domain": (str, ''),
"k": ... | 2,324 | 34.227273 | 96 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/feedback.py | # # -*- coding: utf-8 -*-
from .. import mgr
from ..exceptions import DashboardException
from ..security import Scope
from . import APIDoc, APIRouter, BaseController, Endpoint, ReadPermission, RESTController, UIRouter
from ._version import APIVersion
@APIRouter('/feedback', Scope.CONFIG_OPT)
@APIDoc("Feedback API", ... | 4,560 | 36.694215 | 99 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/frontend_logging.py | import logging
from . import BaseController, Endpoint, UIRouter
logger = logging.getLogger('frontend.error')
@UIRouter('/logging', secure=False)
class FrontendLogging(BaseController):
@Endpoint('POST', path='js-error')
def jsError(self, url, message, stack=None): # noqa: N802
logger.error('(%s): %... | 352 | 24.214286 | 62 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/grafana.py | # -*- coding: utf-8 -*-
from .. import mgr
from ..grafana import GrafanaRestClient, push_local_dashboards
from ..security import Scope
from ..services.exception import handle_error
from ..settings import Settings
from . import APIDoc, APIRouter, BaseController, Endpoint, EndpointDoc, \
ReadPermission, UpdatePermiss... | 1,636 | 31.74 | 80 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/health.py | # -*- coding: utf-8 -*-
import json
from .. import mgr
from ..rest_client import RequestException
from ..security import Permission, Scope
from ..services.ceph_service import CephService
from ..services.cluster import ClusterModel
from ..services.iscsi_cli import IscsiGatewaysConfig
from ..services.iscsi_client impor... | 9,694 | 30.9967 | 82 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/home.py | # -*- coding: utf-8 -*-
import json
import logging
import os
import re
try:
from functools import lru_cache
except ImportError:
from ..plugins.lru_cache import lru_cache
import cherrypy
from cherrypy.lib.static import serve_file
from .. import mgr
from . import BaseController, Endpoint, Proxy, Router, UIRou... | 5,379 | 35.107383 | 93 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/host.py | # -*- coding: utf-8 -*-
import copy
import os
import time
from collections import Counter
from typing import Dict, List, Optional
import cherrypy
from mgr_util import merge_dicts
from orchestrator import HostSpec
from .. import mgr
from ..exceptions import DashboardException
from ..security import Scope
from ..servi... | 19,748 | 36.403409 | 98 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/iscsi.py | # -*- coding: utf-8 -*-
# pylint: disable=C0302
# pylint: disable=too-many-branches
# pylint: disable=too-many-lines
import json
import re
from copy import deepcopy
from typing import Any, Dict, List, no_type_check
import cherrypy
import rados
import rbd
from .. import mgr
from ..exceptions import DashboardException... | 55,574 | 47.707274 | 100 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/logs.py | # -*- coding: utf-8 -*-
import collections
from ..security import Scope
from ..services.ceph_service import CephService
from ..tools import NotificationQueue
from . import APIDoc, APIRouter, BaseController, Endpoint, EndpointDoc, ReadPermission
LOG_BUFFER_SIZE = 30
LOGS_SCHEMA = {
"clog": ([str], ""),
"audi... | 2,117 | 28.013699 | 88 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/mgr_modules.py | # -*- coding: utf-8 -*-
from .. import mgr
from ..security import Scope
from ..services.ceph_service import CephService
from ..services.exception import handle_send_command_error
from ..tools import find_object_in_list, str_to_bool
from . import APIDoc, APIRouter, EndpointDoc, RESTController, allow_empty_body
MGR_MOD... | 7,733 | 38.258883 | 83 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/monitor.py | # -*- coding: utf-8 -*-
import json
from .. import mgr
from ..security import Scope
from . import APIDoc, APIRouter, BaseController, Endpoint, EndpointDoc, ReadPermission
MONITOR_SCHEMA = {
"mon_status": ({
"name": (str, ""),
"rank": (int, ""),
"state": (str, ""),
"election_epoch"... | 4,011 | 28.940299 | 86 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/nfs.py | # -*- coding: utf-8 -*-
import json
import logging
import os
from functools import partial
from typing import Any, Dict, List, Optional
import cephfs
from mgr_module import NFS_GANESHA_SUPPORTED_FSALS
from .. import mgr
from ..security import Scope
from ..services.cephfs import CephFS
from ..services.exception impor... | 10,503 | 36.514286 | 95 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/orchestrator.py | # -*- coding: utf-8 -*-
from functools import wraps
from .. import mgr
from ..exceptions import DashboardException
from ..services.orchestrator import OrchClient
from . import APIDoc, Endpoint, EndpointDoc, ReadPermission, RESTController, UIRouter
STATUS_SCHEMA = {
"available": (bool, "Orchestrator status"),
... | 1,906 | 34.981132 | 100 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/osd.py | # -*- coding: utf-8 -*-
import json
import logging
import time
from typing import Any, Dict, List, Optional, Union
from ceph.deployment.drive_group import DriveGroupSpec, DriveGroupValidationError # type: ignore
from mgr_util import get_most_recent_rate
from .. import mgr
from ..exceptions import DashboardException... | 24,740 | 36.543247 | 97 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/perf_counters.py | # -*- coding: utf-8 -*-
import cherrypy
from .. import mgr
from ..security import Scope
from ..services.ceph_service import CephService
from . import APIDoc, APIRouter, EndpointDoc, RESTController
PERF_SCHEMA = {
"mon.a": ({
".cache_bytes": ({
"description": (str, ""),
"nick": (st... | 2,362 | 27.46988 | 92 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/pool.py | # -*- coding: utf-8 -*-
import time
from typing import Any, Dict, Iterable, List, Optional, Union, cast
import cherrypy
from .. import mgr
from ..security import Scope
from ..services.ceph_service import CephService
from ..services.exception import handle_send_command_error
from ..services.rbd import RbdConfiguratio... | 13,864 | 38.166667 | 100 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/prometheus.py | # -*- coding: utf-8 -*-
import json
import os
import tempfile
from datetime import datetime
import requests
from .. import mgr
from ..exceptions import DashboardException
from ..security import Scope
from ..services import ceph_service
from ..services.settings import SettingsService
from ..settings import Options, Se... | 7,293 | 41.905882 | 168 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/rbd.py | # -*- coding: utf-8 -*-
# pylint: disable=unused-argument
# pylint: disable=too-many-statements,too-many-branches
import logging
import math
from datetime import datetime
from functools import partial
import cherrypy
import rbd
from .. import mgr
from ..controllers.pool import RBDPool
from ..exceptions import Dashbo... | 18,767 | 40.067834 | 192 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/rbd_mirroring.py | # -*- coding: utf-8 -*-
import json
import logging
import re
from enum import IntEnum
from functools import partial
from typing import NamedTuple, Optional, no_type_check
import cherrypy
import rbd
from .. import mgr
from ..controllers.pool import RBDPool
from ..controllers.service import Service
from ..security imp... | 23,261 | 33.309735 | 100 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/rgw.py | # -*- coding: utf-8 -*-
import json
import logging
from typing import Any, Dict, List, NamedTuple, Optional, Union
import cherrypy
from .. import mgr
from ..exceptions import DashboardException
from ..rest_client import RequestException
from ..security import Permission, Scope
from ..services.auth import AuthManager... | 38,899 | 40.827957 | 154 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/role.py | # -*- coding: utf-8 -*-
import cherrypy
from .. import mgr
from ..exceptions import DashboardException, RoleAlreadyExists, \
RoleDoesNotExist, RoleIsAssociatedWithUser
from ..security import Permission
from ..security import Scope as SecurityScope
from ..services.access_control import SYSTEM_ROLES
from . import A... | 5,530 | 37.409722 | 88 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/saml2.py | # -*- coding: utf-8 -*-
import cherrypy
try:
from onelogin.saml2.auth import OneLogin_Saml2_Auth
from onelogin.saml2.errors import OneLogin_Saml2_Error
from onelogin.saml2.settings import OneLogin_Saml2_Settings
python_saml_imported = True
except ImportError:
python_saml_imported = False
from ..... | 4,462 | 38.149123 | 95 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/service.py | from typing import Dict, List, Optional
import cherrypy
from ceph.deployment.service_spec import ServiceSpec
from ..security import Scope
from ..services.exception import handle_custom_error, handle_orchestrator_error
from ..services.orchestrator import OrchClient, OrchFeature
from . import APIDoc, APIRouter, CreateP... | 3,866 | 39.28125 | 91 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/settings.py | # -*- coding: utf-8 -*-
from ..security import Scope
from ..services.settings import SettingsService, _to_native
from ..settings import Options
from ..settings import Settings as SettingsModule
from . import APIDoc, APIRouter, EndpointDoc, RESTController, UIRouter
SETTINGS_SCHEMA = [{
"name": (str, 'Settings Name'... | 4,271 | 36.473684 | 75 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/summary.py | # -*- coding: utf-8 -*-
import json
from .. import mgr
from ..controllers.rbd_mirroring import get_daemons_and_pools
from ..exceptions import ViewCacheNoDataException
from ..security import Permission, Scope
from ..services import progress
from ..tools import TaskManager
from . import APIDoc, APIRouter, BaseControlle... | 4,446 | 34.862903 | 90 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/task.py | # -*- coding: utf-8 -*-
from ..services import progress
from ..tools import TaskManager
from . import APIDoc, APIRouter, EndpointDoc, RESTController
TASK_SCHEMA = {
"executing_tasks": (str, "ongoing executing tasks"),
"finished_tasks": ([{
"name": (str, "finished tasks name"),
"metadata": ({
... | 1,372 | 28.212766 | 69 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/telemetry.py | # -*- coding: utf-8 -*-
from .. import mgr
from ..exceptions import DashboardException
from ..security import Scope
from . import APIDoc, APIRouter, EndpointDoc, RESTController
REPORT_SCHEMA = {
"report": ({
"leaderboard": (bool, ""),
"report_version": (int, ""),
"report_timestamp": (str, ... | 8,363 | 33.85 | 98 | py |
null | ceph-main/src/pybind/mgr/dashboard/controllers/user.py | # -*- coding: utf-8 -*-
import time
from datetime import datetime
import cherrypy
from ceph_argparse import CephString
from .. import mgr
from ..exceptions import DashboardException, PasswordPolicyException, \
PwdExpirationDateNotValid, UserAlreadyExists, UserDoesNotExist
from ..security import Scope
from ..serv... | 8,616 | 39.07907 | 90 | py |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress.config.ts | import { defineConfig } from 'cypress'
export default defineConfig({
video: true,
videoUploadOnPasses: false,
defaultCommandTimeout: 120000,
responseTimeout: 45000,
viewportHeight: 1080,
viewportWidth: 1920,
projectId: 'k7ab29',
reporter: 'cypress-multi-reporters',
reporterOptions: {
reporterEnab... | 1,207 | 27.093023 | 62 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/page-helper.po.ts | interface Page {
url: string;
id: string;
}
export abstract class PageHelper {
pages: Record<string, Page>;
/**
* Decorator to be used on Helper methods to restrict access to one particular URL. This shall
* help developers to prevent and highlight mistakes. It also reduces boilerplate code and by
... | 8,772 | 27.3 | 97 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/a11y/dashboard.e2e-spec.ts | import { DashboardPageHelper } from '../ui/dashboard.po';
describe('Dashboard Main Page', { retries: 0 }, () => {
const dashboard = new DashboardPageHelper();
beforeEach(() => {
cy.login();
dashboard.navigateTo();
});
describe('Dashboard accessibility', () => {
it('should have no accessibility vi... | 585 | 20.703704 | 57 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/a11y/navigation.e2e-spec.ts | import { NavigationPageHelper } from '../ui/navigation.po';
describe('Navigation accessibility', { retries: 0 }, () => {
const shared = new NavigationPageHelper();
beforeEach(() => {
cy.login();
shared.navigateTo();
});
it('top-nav should have no accessibility violations', () => {
cy.injectAxe();... | 513 | 23.47619 | 63 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/block/images.e2e-spec.ts | import { PoolPageHelper } from '../pools/pools.po';
import { ImagesPageHelper } from './images.po';
describe('Images page', () => {
const pools = new PoolPageHelper();
const images = new ImagesPageHelper();
const poolName = 'e2e_images_pool';
before(() => {
cy.login();
// Need pool for image testing
... | 2,604 | 27.010753 | 66 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/block/images.po.ts | import { PageHelper } from '../page-helper.po';
export class ImagesPageHelper extends PageHelper {
pages = {
index: { url: '#/block/rbd', id: 'cd-rbd-list' },
create: { url: '#/block/rbd/create', id: 'cd-rbd-form' }
};
// Creates a block image and fills in the name, pool, and size fields.
// Then chec... | 3,747 | 32.765766 | 88 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/block/iscsi.e2e-spec.ts | import { IscsiPageHelper } from './iscsi.po';
describe('Iscsi Page', () => {
const iscsi = new IscsiPageHelper();
beforeEach(() => {
cy.login();
iscsi.navigateTo();
});
it('should open and show breadcrumb', () => {
iscsi.expectBreadcrumbText('Overview');
});
it('should check that tables are ... | 687 | 26.52 | 78 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/block/iscsi.po.ts | import { PageHelper } from '../page-helper.po';
export class IscsiPageHelper extends PageHelper {
pages = {
index: { url: '#/block/iscsi/overview', id: 'cd-iscsi' }
};
}
| 179 | 21.5 | 60 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/block/mirroring.e2e-spec.ts | import { PoolPageHelper } from '../pools/pools.po';
import { MirroringPageHelper } from './mirroring.po';
describe('Mirroring page', () => {
const pools = new PoolPageHelper();
const mirroring = new MirroringPageHelper();
beforeEach(() => {
cy.login();
mirroring.navigateTo();
});
it('should open an... | 4,180 | 34.432203 | 82 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/block/mirroring.po.ts | import { PageHelper } from '../page-helper.po';
const pages = {
index: { url: '#/block/mirroring', id: 'cd-mirroring' }
};
export class MirroringPageHelper extends PageHelper {
pages = pages;
poolsColumnIndex = {
name: 1,
health: 6
};
/**
* Goes to the mirroring page and edits a pool in the Poo... | 2,087 | 32.677419 | 86 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/cluster/configuration.e2e-spec.ts | import { ConfigurationPageHelper } from './configuration.po';
describe('Configuration page', () => {
const configuration = new ConfigurationPageHelper();
beforeEach(() => {
cy.login();
configuration.navigateTo();
});
describe('breadcrumb test', () => {
it('should open and show breadcrumb', () => ... | 2,372 | 29.423077 | 94 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/cluster/configuration.po.ts | import { PageHelper } from '../page-helper.po';
export class ConfigurationPageHelper extends PageHelper {
pages = {
index: { url: '#/configuration', id: 'cd-configuration' }
};
/**
* Clears out all the values in a config to reset before and after testing
* Does not work for configs with checkbox only,... | 2,639 | 33.736842 | 106 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/cluster/create-cluster.po.ts | import { PageHelper } from '../page-helper.po';
import { NotificationSidebarPageHelper } from '../ui/notification.po';
import { HostsPageHelper } from './hosts.po';
import { ServicesPageHelper } from './services.po';
const pages = {
index: { url: '#/expand-cluster', id: 'cd-create-cluster' }
};
export class CreateCl... | 1,512 | 25.54386 | 91 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/cluster/crush-map.e2e-spec.ts | import { CrushMapPageHelper } from './crush-map.po';
describe('CRUSH map page', () => {
const crushmap = new CrushMapPageHelper();
beforeEach(() => {
cy.login();
crushmap.navigateTo();
});
describe('breadcrumb test', () => {
it('should open and show breadcrumb', () => {
crushmap.expectBread... | 959 | 24.945946 | 66 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/cluster/crush-map.po.ts | import { PageHelper } from '../page-helper.po';
export class CrushMapPageHelper extends PageHelper {
pages = { index: { url: '#/crush-map', id: 'cd-crushmap' } };
getPageTitle() {
return cy.get('cd-crushmap .card-header').text();
}
getCrushNode(idx: number) {
return cy.get('.node-name.type-osd').eq(i... | 331 | 22.714286 | 63 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/cluster/hosts.e2e-spec.ts | import { HostsPageHelper } from './hosts.po';
describe('Hosts page', () => {
const hosts = new HostsPageHelper();
beforeEach(() => {
cy.login();
hosts.navigateTo();
});
describe('breadcrumb and tab tests', () => {
it('should open and show breadcrumb', () => {
hosts.expectBreadcrumbText('Hos... | 837 | 22.942857 | 65 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/cluster/hosts.po.ts | import { PageHelper } from '../page-helper.po';
const pages = {
index: { url: '#/hosts', id: 'cd-hosts' },
add: { url: '#/hosts/(modal:add)', id: 'cd-host-form' }
};
export class HostsPageHelper extends PageHelper {
pages = pages;
columnIndex = {
hostname: 2,
services: 3,
labels: 4,
status: 5... | 6,081 | 31.698925 | 88 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/cluster/inventory.po.ts | import { PageHelper } from '../page-helper.po';
const pages = {
index: { url: '#/inventory', id: 'cd-inventory' }
};
export class InventoryPageHelper extends PageHelper {
pages = pages;
identify() {
// Nothing we can do, just verify the form is there
this.getFirstTableCell().click();
cy.contains('c... | 636 | 26.695652 | 63 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/cluster/logs.e2e-spec.ts | import { PoolPageHelper } from '../pools/pools.po';
import { LogsPageHelper } from './logs.po';
describe('Logs page', () => {
const logs = new LogsPageHelper();
const pools = new PoolPageHelper();
const poolname = 'e2e_logs_test_pool';
const today = new Date();
let hour = today.getHours();
if (hour > 12) ... | 1,664 | 25.854839 | 75 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/cluster/logs.po.ts | import { PageHelper } from '../page-helper.po';
export class LogsPageHelper extends PageHelper {
pages = {
index: { url: '#/logs', id: 'cd-logs' }
};
checkAuditForPoolFunction(poolname: string, poolfunction: string, hour: number, minute: number) {
this.navigateTo();
// sometimes the modal from dele... | 2,211 | 30.15493 | 99 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/cluster/mgr-modules.e2e-spec.ts | import { Input, ManagerModulesPageHelper } from './mgr-modules.po';
describe('Manager modules page', () => {
const mgrmodules = new ManagerModulesPageHelper();
beforeEach(() => {
cy.login();
mgrmodules.navigateTo();
});
describe('breadcrumb test', () => {
it('should open and show breadcrumb', () ... | 1,889 | 23.230769 | 72 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/cluster/mgr-modules.po.ts | import { PageHelper } from '../page-helper.po';
export class Input {
id: string;
oldValue: string;
newValue: string;
}
export class ManagerModulesPageHelper extends PageHelper {
pages = { index: { url: '#/mgr-modules', id: 'cd-mgr-module-list' } };
/**
* Selects the Manager Module and then fills in the ... | 1,544 | 25.637931 | 72 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/cluster/monitors.e2e-spec.ts | import { MonitorsPageHelper } from './monitors.po';
describe('Monitors page', () => {
const monitors = new MonitorsPageHelper();
beforeEach(() => {
cy.login();
monitors.navigateTo();
});
describe('breadcrumb test', () => {
it('should open and show breadcrumb', () => {
monitors.expectBreadcr... | 1,921 | 30 | 77 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/cluster/monitors.po.ts | import { PageHelper } from '../page-helper.po';
export class MonitorsPageHelper extends PageHelper {
pages = {
index: { url: '#/monitor', id: 'cd-monitor' }
};
}
| 171 | 20.5 | 52 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/cluster/osds.e2e-spec.ts | import { OSDsPageHelper } from './osds.po';
describe('OSDs page', () => {
const osds = new OSDsPageHelper();
beforeEach(() => {
cy.login();
osds.navigateTo();
});
describe('breadcrumb and tab tests', () => {
it('should open and show breadcrumb', () => {
osds.expectBreadcrumbText('OSDs');
... | 1,587 | 26.859649 | 76 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/cluster/osds.po.ts | import { PageHelper } from '../page-helper.po';
const pages = {
index: { url: '#/osd', id: 'cd-osd-list' },
create: { url: '#/osd/create', id: 'cd-osd-form' }
};
export class OSDsPageHelper extends PageHelper {
pages = pages;
columnIndex = {
id: 3,
status: 5
};
create(deviceType: 'hdd' | 'ssd', ... | 2,614 | 29.764706 | 97 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/cluster/services.po.ts | import { PageHelper } from '../page-helper.po';
const pages = {
index: { url: '#/services', id: 'cd-services' },
create: { url: '#/services/(modal:create)', id: 'cd-service-form' }
};
export class ServicesPageHelper extends PageHelper {
pages = pages;
columnIndex = {
service_name: 2,
placement: 3,
... | 6,410 | 30.895522 | 100 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/cluster/users.e2e-spec.ts | import { UsersPageHelper } from './users.po';
describe('Cluster Ceph Users', () => {
const users = new UsersPageHelper();
beforeEach(() => {
cy.login();
users.navigateTo();
});
describe('breadcrumb and tab tests', () => {
it('should open and show breadcrumb', () => {
users.expectBreadcrumbT... | 1,172 | 23.957447 | 61 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/cluster/users.po.ts | import { PageHelper } from '../page-helper.po';
const pages = {
index: { url: '#/ceph-users', id: 'cd-crud-table' },
create: { url: '#/cluster/user/create', id: 'cd-crud-form' }
};
export class UsersPageHelper extends PageHelper {
pages = pages;
columnIndex = {
entity: 2,
capabilities: 3,
key: 4
... | 1,829 | 29.5 | 85 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/common/01-global.feature.po.ts | import { And, Given, Then, When } from 'cypress-cucumber-preprocessor/steps';
import { UrlsCollection } from './urls.po';
const urlsCollection = new UrlsCollection();
Given('I am logged in', () => {
cy.login();
});
Given('I am on the {string} page', (page: string) => {
cy.visit(urlsCollection.pages[page].url);
... | 5,845 | 30.095745 | 96 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/common/grafana.feature.po.ts | import { Then, When } from 'cypress-cucumber-preprocessor/steps';
import 'cypress-iframe';
function getIframe() {
cy.frameLoaded('#iframe');
return cy.iframe();
}
Then('I should see the grafana panel {string}', (panels: string) => {
getIframe().within(() => {
for (const panel of panels.split(', ')) {
... | 2,391 | 26.181818 | 92 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/common/urls.po.ts | import { PageHelper } from '../page-helper.po';
export class UrlsCollection extends PageHelper {
pages = {
// Cluster expansion
welcome: { url: '#/expand-cluster', id: 'cd-create-cluster' },
// Landing page
dashboard: { url: '#/dashboard', id: 'cd-dashboard' },
// Hosts
hosts: { url: '#/hos... | 1,267 | 27.177778 | 83 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/common/create-cluster/create-cluster.feature.po.ts | import { Given, Then } from 'cypress-cucumber-preprocessor/steps';
Given('I am on the {string} section', (page: string) => {
cy.get('cd-wizard').within(() => {
cy.get('.nav-link').should('contain.text', page).first().click();
cy.get('.nav-link.active').should('contain.text', page);
});
});
Then('I should ... | 447 | 33.461538 | 89 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/filesystems/filesystems.e2e-spec.ts | import { FilesystemsPageHelper } from './filesystems.po';
describe('File Systems page', () => {
const filesystems = new FilesystemsPageHelper();
beforeEach(() => {
cy.login();
filesystems.navigateTo();
});
describe('breadcrumb test', () => {
it('should open and show breadcrumb', () => {
fil... | 385 | 21.705882 | 57 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/filesystems/filesystems.po.ts | import { PageHelper } from '../page-helper.po';
export class FilesystemsPageHelper extends PageHelper {
pages = { index: { url: '#/cephfs', id: 'cd-cephfs-list' } };
}
| 171 | 27.666667 | 63 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/01-hosts.e2e-spec.ts | import { HostsPageHelper } from '../cluster/hosts.po';
describe('Hosts page', () => {
const hosts = new HostsPageHelper();
beforeEach(() => {
cy.login();
hosts.navigateTo();
});
describe('when Orchestrator is available', () => {
beforeEach(function () {
cy.fixture('orchestrator/inventory.js... | 2,594 | 29.174419 | 75 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/03-inventory.e2e-spec.ts | import { InventoryPageHelper } from '../cluster/inventory.po';
describe('Physical Disks page', () => {
const inventory = new InventoryPageHelper();
beforeEach(() => {
cy.login();
inventory.navigateTo();
});
it('should have correct devices', () => {
cy.fixture('orchestrator/inventory.json').then((... | 730 | 27.115385 | 78 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/04-osds.e2e-spec.ts | import { OSDsPageHelper } from '../cluster/osds.po';
import { DashboardPageHelper } from '../ui/dashboard.po';
describe('OSDs page', () => {
const osds = new OSDsPageHelper();
const dashboard = new DashboardPageHelper();
beforeEach(() => {
cy.login();
osds.navigateTo();
});
describe('when Orchestra... | 1,681 | 32.64 | 90 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/05-services.e2e-spec.ts | import { ServicesPageHelper } from '../cluster/services.po';
describe('Services page', () => {
const services = new ServicesPageHelper();
const serviceName = 'rgw.foo';
beforeEach(() => {
cy.login();
services.navigateTo();
});
describe('when Orchestrator is available', () => {
it('should create... | 910 | 24.305556 | 61 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/workflow/03-create-cluster-create-services.e2e-spec.ts | /* tslint:disable*/
import {
CreateClusterServicePageHelper,
CreateClusterWizardHelper
} from '../../cluster/create-cluster.po';
/* tslint:enable*/
describe('Create cluster create services page', () => {
const createCluster = new CreateClusterWizardHelper();
const createClusterServicePage = new CreateClusterSe... | 1,450 | 29.87234 | 82 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/workflow/04-create-cluster-create-osds.e2e-spec.ts | /* tslint:disable*/
import { CreateClusterWizardHelper } from '../../cluster/create-cluster.po';
import { OSDsPageHelper } from '../../cluster/osds.po';
/* tslint:enable*/
const osds = new OSDsPageHelper();
describe('Create cluster create osds page', () => {
const createCluster = new CreateClusterWizardHelper();
... | 1,336 | 31.609756 | 76 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/workflow/05-create-cluster-review.e2e-spec.ts | /* tslint:disable*/
import {
CreateClusterHostPageHelper,
CreateClusterWizardHelper
} from '../../cluster/create-cluster.po';
/* tslint:enable*/
describe('Create Cluster Review page', () => {
const createCluster = new CreateClusterWizardHelper();
const createClusterHostPage = new CreateClusterHostPageHelper();... | 2,191 | 31.716418 | 81 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/workflow/06-cluster-check.e2e-spec.ts | /* tslint:disable*/
import { CreateClusterWizardHelper } from '../../cluster/create-cluster.po';
import { HostsPageHelper } from '../../cluster/hosts.po';
import { ServicesPageHelper } from '../../cluster/services.po';
/* tslint:enable*/
describe('when cluster creation is completed', () => {
const createCluster = ne... | 2,740 | 32.024096 | 96 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/workflow/07-osds.e2e-spec.ts | /* tslint:disable*/
import { OSDsPageHelper } from '../../cluster/osds.po';
/* tslint:enable*/
describe('OSDs page', () => {
const osds = new OSDsPageHelper();
beforeEach(() => {
cy.login();
osds.navigateTo();
});
it('should check if atleast 3 osds are created', { retries: 3 }, () => {
// we have... | 628 | 25.208333 | 74 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/workflow/08-hosts.e2e-spec.ts | /* tslint:disable*/
import { HostsPageHelper } from '../../cluster/hosts.po';
import { ServicesPageHelper } from '../../cluster/services.po';
/* tslint:enable*/
describe('Host Page', () => {
const hosts = new HostsPageHelper();
const services = new ServicesPageHelper();
const hostnames = ['ceph-node-00', 'ceph-... | 1,418 | 27.959184 | 85 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/workflow/09-services.e2e-spec.ts | /* tslint:disable*/
import { ServicesPageHelper } from '../../cluster/services.po';
/* tslint:enable*/
describe('Services page', () => {
const services = new ServicesPageHelper();
const mdsDaemonName = 'mds.test';
beforeEach(() => {
cy.login();
services.navigateTo();
});
it('should check if rgw serv... | 4,296 | 31.308271 | 102 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/workflow/10-nfs-exports.e2e-spec.ts | /* tslint:disable*/
import { ServicesPageHelper } from '../../cluster/services.po';
import { NFSPageHelper } from '../../orchestrator/workflow/nfs/nfs-export.po';
import { BucketsPageHelper } from '../../rgw/buckets.po';
/* tslint:enable*/
describe('nfsExport page', () => {
const nfsExport = new NFSPageHelper();
c... | 2,677 | 31.26506 | 83 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/workflow/nfs/nfs-export.po.ts | /* tslint:disable*/
import { PageHelper } from '../../../page-helper.po';
/* tslint:enable*/
const pages = {
index: { url: '#/nfs', id: 'cd-nfs-list' },
create: { url: '#/nfs/create', id: 'cd-nfs-form' }
};
export class NFSPageHelper extends PageHelper {
pages = pages;
@PageHelper.restrictTo(pages.create.url... | 1,655 | 30.245283 | 93 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/pools/pools.e2e-spec.ts | import { PoolPageHelper } from './pools.po';
describe('Pools page', () => {
const pools = new PoolPageHelper();
const poolName = 'pool_e2e_pool-test';
beforeEach(() => {
cy.login();
pools.navigateTo();
});
describe('breadcrumb and tab tests', () => {
it('should open and show breadcrumb', () => ... | 1,413 | 25.185185 | 65 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/pools/pools.po.ts | import { PageHelper } from '../page-helper.po';
const pages = {
index: { url: '#/pool', id: 'cd-pool-list' },
create: { url: '#/pool/create', id: 'cd-pool-form' }
};
export class PoolPageHelper extends PageHelper {
pages = pages;
private isPowerOf2(n: number) {
// tslint:disable-next-line: no-bitwise
... | 2,095 | 28.521127 | 96 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/rgw/buckets.e2e-spec.ts | import { BucketsPageHelper } from './buckets.po';
describe('RGW buckets page', () => {
const buckets = new BucketsPageHelper();
const bucket_name = 'e2ebucket';
beforeEach(() => {
cy.login();
buckets.navigateTo();
});
describe('breadcrumb tests', () => {
it('should open and show breadcrumb', ()... | 2,118 | 30.626866 | 89 | ts |
null | ceph-main/src/pybind/mgr/dashboard/frontend/cypress/e2e/rgw/buckets.po.ts | import { PageHelper } from '../page-helper.po';
const pages = {
index: { url: '#/rgw/bucket', id: 'cd-rgw-bucket-list' },
create: { url: '#/rgw/bucket/create', id: 'cd-rgw-bucket-form' }
};
export class BucketsPageHelper extends PageHelper {
static readonly USERS = ['dashboard', 'testid'];
pages = pages;
... | 7,514 | 36.019704 | 118 | ts |