From 0b1f856ce6b8a69d9df86fd4f2033041baed0d2b Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 11 Mar 2022 19:16:39 +0100 Subject: [PATCH 001/154] modify Changelog.md --- CHANGELOG.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 83520944..96d64604 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,13 +5,19 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.ht ml). -## master - [1.0.12-beta] -## testing - [1.0.13-beta] - -## [1.0.13-beta] +## [2.0.0-alpha] +- [changes] #209 adding a new device in a lot if it is created from a lot +- [addend] #208 render from backend filter for type of devices in the general list +- [bugfix] #206 fix 2 bugs about visibility devices when you are not the owner +- [addend] #205 ux improvements +- [addend] #204 render from backend export files +- [addend] #203 render from backend Trade action +- [addend] #201 render from backend Data Wipe action +- [addend] #196 render from backend action system +- [addend] #195 render from backend tags system +- [addend] #193 render from backend devices and lots +- [changes] #191 pass to drop teal and use the pure flask and use render from flask ## [1.0.12-beta] - [changes] #187 now is possible duplicate slots of RAM. From 4e35660080ccb8fc6351bc7945b3a19ba4bccbfc Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 14 Mar 2022 13:32:39 +0100 Subject: [PATCH 002/154] change conftest --- tests/conftest.py | 61 +++++++++++++++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 21 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 991374ba..b85b34fd 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,15 +1,15 @@ import io import uuid -import jwt -import ereuse_utils from contextlib import redirect_stdout from datetime import datetime from pathlib import Path -from decouple import config import boltons.urlutils +import ereuse_utils +import jwt import pytest import yaml +from decouple import config from psycopg2 import IntegrityError from sqlalchemy.exc import ProgrammingError @@ -17,11 +17,12 @@ from ereuse_devicehub.client import Client, UserClient from ereuse_devicehub.config import DevicehubConfig from ereuse_devicehub.db import db from ereuse_devicehub.devicehub import Devicehub +from ereuse_devicehub.inventory.views import devices from ereuse_devicehub.resources.agent.models import Person -from ereuse_devicehub.resources.tag import Tag -from ereuse_devicehub.resources.user.models import User -from ereuse_devicehub.resources.user.models import Session from ereuse_devicehub.resources.enums import SessionType +from ereuse_devicehub.resources.tag import Tag +from ereuse_devicehub.resources.user.models import Session, User +from ereuse_devicehub.views import core STARTT = datetime(year=2000, month=1, day=1, hour=1) """A dummy starting time to use in tests.""" @@ -50,6 +51,19 @@ def config(): @pytest.fixture(scope='session') def _app(config: TestConfig) -> Devicehub: + # dh_config = DevicehubConfig() + # config = TestConfig(dh_config) + app = Devicehub(inventory='test', config=config, db=db) + app.register_blueprint(core) + app.register_blueprint(devices) + app.config["SQLALCHEMY_RECORD_QUERIES"] = True + app.config['PROFILE'] = True + # app.wsgi_app = ProfilerMiddleware(app.wsgi_app, restrictions=[30]) + return app + + +@pytest.fixture(scope='session') +def _app2(config: TestConfig) -> Devicehub: return Devicehub(inventory='test', config=config, db=db) @@ -61,13 +75,15 @@ def app(request, _app: Devicehub) -> Devicehub: db.drop_all() def _init(): - _app.init_db(name='Test Inventory', - org_name='FooOrg', - org_id='foo-org-id', - tag_url=boltons.urlutils.URL('https://example.com'), - tag_token=uuid.UUID('52dacef0-6bcb-4919-bfed-f10d2c96ecee'), - erase=False, - common=True) + _app.init_db( + name='Test Inventory', + org_name='FooOrg', + org_id='foo-org-id', + tag_url=boltons.urlutils.URL('https://example.com'), + tag_token=uuid.UUID('52dacef0-6bcb-4919-bfed-f10d2c96ecee'), + erase=False, + common=True, + ) with _app.app_context(): try: @@ -99,7 +115,9 @@ def user(app: Devicehub) -> UserClient: with app.app_context(): password = 'foo' user = create_user(password=password) - client = UserClient(app, user.email, password, response_wrapper=app.response_class) + client = UserClient( + app, user.email, password, response_wrapper=app.response_class + ) client.login() return client @@ -111,7 +129,9 @@ def user2(app: Devicehub) -> UserClient: password = 'foo' email = 'foo2@foo.com' user = create_user(email=email, password=password) - client = UserClient(app, user.email, password, response_wrapper=app.response_class) + client = UserClient( + app, user.email, password, response_wrapper=app.response_class + ) client.login() return client @@ -145,16 +165,13 @@ def auth_app_context(app: Devicehub): def json_encode(dev: str) -> dict: """Encode json.""" data = {"type": "Snapshot"} - data['data'] = jwt.encode(dev, - P, - algorithm="HS256", - json_encoder=ereuse_utils.JSONEncoder + data['data'] = jwt.encode( + dev, P, algorithm="HS256", json_encoder=ereuse_utils.JSONEncoder ) return data - def yaml2json(name: str) -> dict: """Opens and parses a YAML file from the ``files`` subdir.""" with Path(__file__).parent.joinpath('files').joinpath(name + '.yaml').open() as f: @@ -168,7 +185,9 @@ def file(name: str) -> dict: def file_workbench(name: str) -> dict: """Opens and parses a YAML file from the ``files`` subdir.""" - with Path(__file__).parent.joinpath('workbench_files').joinpath(name + '.json').open() as f: + with Path(__file__).parent.joinpath('workbench_files').joinpath( + name + '.json' + ).open() as f: return yaml.load(f) From 071e1452645fe8b7e28c213b6ceb083daea9fedc Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 15 Mar 2022 11:17:05 +0100 Subject: [PATCH 003/154] Add body in the check of request --- tests/test_render_2_0.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tests/test_render_2_0.py diff --git a/tests/test_render_2_0.py b/tests/test_render_2_0.py new file mode 100644 index 00000000..45c79d30 --- /dev/null +++ b/tests/test_render_2_0.py @@ -0,0 +1,28 @@ +# import pytest +from flask.testing import FlaskClient + +from ereuse_devicehub.client import UserClient +from ereuse_devicehub.devicehub import Devicehub + +# from tests import conftest + + +# @pytest.mark.mvp +# @pytest.mark.usefixtures() +# def test_create_application(client: FlaskClient, mocker): +# @pytest.mark.usefixtures(conftest.app_context.__name__) +def test_login(user: UserClient, app: Devicehub): + """Checks a simple login""" + + client = FlaskClient(app, use_cookies=True, response_wrapper=app.response_class) + body, status, headers = client.get('/login/') + body = next(body).decode("utf-8") + assert status == '200 OK' + assert "Login to Your Account" in body + + data = {'email': user.email, 'password': 'foo', "remember": False} + body, status, headers = client.post('/login/', data=data) + + body = next(body).decode("utf-8") + assert status == '200 OK' + assert "Login to Your Account" not in body From 39dc4d86354793853924915276f41d0f0fe42229 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 15 Mar 2022 19:57:54 +0100 Subject: [PATCH 004/154] add one example that how use client validate --- tests/test_render_2_0.py | 43 +++++++++++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/tests/test_render_2_0.py b/tests/test_render_2_0.py index 45c79d30..0a3a19ad 100644 --- a/tests/test_render_2_0.py +++ b/tests/test_render_2_0.py @@ -1,28 +1,53 @@ -# import pytest +import pytest from flask.testing import FlaskClient +from flask_wtf.csrf import generate_csrf from ereuse_devicehub.client import UserClient from ereuse_devicehub.devicehub import Devicehub - -# from tests import conftest +from tests import conftest -# @pytest.mark.mvp +@pytest.mark.mvp # @pytest.mark.usefixtures() -# def test_create_application(client: FlaskClient, mocker): -# @pytest.mark.usefixtures(conftest.app_context.__name__) +@pytest.mark.usefixtures(conftest.app_context.__name__) def test_login(user: UserClient, app: Devicehub): """Checks a simple login""" - client = FlaskClient(app, use_cookies=True, response_wrapper=app.response_class) + client = FlaskClient(app, use_cookies=True) + body, status, headers = client.get('/login/') body = next(body).decode("utf-8") assert status == '200 OK' assert "Login to Your Account" in body - data = {'email': user.email, 'password': 'foo', "remember": False} - body, status, headers = client.post('/login/', data=data) + data = { + 'email': user.email, + 'password': 'foo', + 'remember': False, + 'csrf_token': generate_csrf(), + } + body, status, headers = client.post('/login/', data=data, follow_redirects=True) body = next(body).decode("utf-8") assert status == '200 OK' assert "Login to Your Account" not in body + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_inventory(user: UserClient, app: Devicehub): + client = FlaskClient(app, use_cookies=True) + client.get('/login/') + data = { + 'email': user.email, + 'password': 'foo', + 'remember': False, + 'csrf_token': generate_csrf(), + } + body, status, headers = client.post('/login/', data=data, follow_redirects=True) + body, status, headers = client.get('/inventory/device/', headers=headers) + + body = next(body).decode("utf-8") + assert status == '200 OK' + # import pdb; pdb.set_trace() + assert "Unassgined" in body From ec99ad22b5957ab6af3f0938864b088ac8c75d9d Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 17 Mar 2022 11:50:57 +0100 Subject: [PATCH 005/154] . --- ereuse_devicehub/client.py | 60 ++++++++++++++++++++++++++++++++++++++ tests/conftest.py | 27 ++++++++++++++++- tests/test_render_2_0.py | 34 ++++++++++++--------- 3 files changed, 107 insertions(+), 14 deletions(-) diff --git a/ereuse_devicehub/client.py b/ereuse_devicehub/client.py index 3224dfd3..3ddf94ff 100644 --- a/ereuse_devicehub/client.py +++ b/ereuse_devicehub/client.py @@ -1,5 +1,7 @@ from inspect import isclass from typing import Dict, Iterable, Type, Union +from flask.testing import FlaskClient +from flask_wtf.csrf import generate_csrf from ereuse_utils.test import JSON, Res from teal.client import Client as TealClient, Query, Status @@ -156,3 +158,61 @@ class UserClient(Client): response = super().login(self.email, self.password) self.user = response[0] return response + + +class UserClientFlask: + + def __init__(self, application, + email: str, + password: str, + response_wrapper=None, + use_cookies=True, + follow_redirects=True): + self.email = email + self.password = password + self.follow_redirects = follow_redirects + self.user = None + + self.client = FlaskClient(application, use_cookies=use_cookies) + self.client.get('/login/') + + data = { + 'email': email, + 'password': password, + 'csrf_token': generate_csrf(), + } + body, status, headers = self.client.post('/login/', data=data, follow_redirects=True) + self.headers = headers + body = next(body).decode("utf-8") + assert "Unassgined" in body + + def get(self, + uri='', + data=None, + follow_redirects=True, + **kw): + + body, status, headers = self.client.get( + uri, + data=data, + follow_redirects=follow_redirects, + headers=self.headers + ) + body = next(body).decode("utf-8") + return (body, status) + + def post(self, + uri='', + data=None, + follow_redirects=True, + **kw): + + import pdb; pdb.set_trace() + body, status, headers = self.client.post( + uri, + data=data, + follow_redirects=follow_redirects, + headers=self.headers + ) + body = next(body).decode("utf-8") + return (body, status) diff --git a/tests/conftest.py b/tests/conftest.py index b85b34fd..e571e96b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -13,7 +13,7 @@ from decouple import config from psycopg2 import IntegrityError from sqlalchemy.exc import ProgrammingError -from ereuse_devicehub.client import Client, UserClient +from ereuse_devicehub.client import Client, UserClient, UserClientFlask from ereuse_devicehub.config import DevicehubConfig from ereuse_devicehub.db import db from ereuse_devicehub.devicehub import Devicehub @@ -136,6 +136,31 @@ def user2(app: Devicehub) -> UserClient: return client +@pytest.fixture() +def user3(app: Devicehub) -> UserClientFlask: + """Gets a client with a logged-in dummy user.""" + with app.app_context(): + password = 'foo' + user = create_user(password=password) + client = UserClientFlask( + app, user.email, password + ) + return client + + +@pytest.fixture() +def user4(app: Devicehub) -> UserClient: + """Gets a client with a logged-in dummy user.""" + with app.app_context(): + password = 'foo' + email = 'foo2@foo.com' + user = create_user(email=email, password=password) + client = UserClientFlask( + app, user.email, password + ) + return client + + def create_user(email='foo@foo.com', password='foo') -> User: user = User(email=email, password=password) user.individuals.add(Person(name='Timmy')) diff --git a/tests/test_render_2_0.py b/tests/test_render_2_0.py index 0a3a19ad..3d3775ed 100644 --- a/tests/test_render_2_0.py +++ b/tests/test_render_2_0.py @@ -2,7 +2,7 @@ import pytest from flask.testing import FlaskClient from flask_wtf.csrf import generate_csrf -from ereuse_devicehub.client import UserClient +from ereuse_devicehub.client import UserClient, UserClientFlask from ereuse_devicehub.devicehub import Devicehub from tests import conftest @@ -35,19 +35,27 @@ def test_login(user: UserClient, app: Devicehub): @pytest.mark.mvp @pytest.mark.usefixtures(conftest.app_context.__name__) -def test_inventory(user: UserClient, app: Devicehub): - client = FlaskClient(app, use_cookies=True) - client.get('/login/') +def test_inventory(user3: UserClientFlask): + body, status = user3.get('/inventory/device/') + + assert status == '200 OK' + assert "Unassgined" in body + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_add_lot(user3: UserClientFlask): + body, status = user3.get('/inventory/lot/add/') + + assert status == '200 OK' + assert "Add a new lot" in body + data = { - 'email': user.email, - 'password': 'foo', - 'remember': False, + 'name': 'lot1', 'csrf_token': generate_csrf(), } - body, status, headers = client.post('/login/', data=data, follow_redirects=True) - body, status, headers = client.get('/inventory/device/', headers=headers) - - body = next(body).decode("utf-8") - assert status == '200 OK' # import pdb; pdb.set_trace() - assert "Unassgined" in body + body, status = user3.post('/inventory/lot/add/', data=data) + + assert status == '200 OK' + assert "lot1" in body From f2ab02804b366b93b0ed4aed1210a9a509f51ef0 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 17 Mar 2022 13:13:15 +0100 Subject: [PATCH 006/154] new userclient from flask instead of teal --- ereuse_devicehub/client.py | 329 +++++++++++++++++++++---------------- tests/conftest.py | 8 +- 2 files changed, 193 insertions(+), 144 deletions(-) diff --git a/ereuse_devicehub/client.py b/ereuse_devicehub/client.py index 3ddf94ff..36d3bd49 100644 --- a/ereuse_devicehub/client.py +++ b/ereuse_devicehub/client.py @@ -1,10 +1,11 @@ from inspect import isclass from typing import Dict, Iterable, Type, Union -from flask.testing import FlaskClient -from flask_wtf.csrf import generate_csrf from ereuse_utils.test import JSON, Res -from teal.client import Client as TealClient, Query, Status +from flask.testing import FlaskClient +from flask_wtf.csrf import generate_csrf +from teal.client import Client as TealClient +from teal.client import Query, Status from werkzeug.exceptions import HTTPException from ereuse_devicehub.resources import models, schemas @@ -15,110 +16,156 @@ ResourceLike = Union[Type[Union[models.Thing, schemas.Thing]], str] class Client(TealClient): """A client suited for Devicehub main usage.""" - def __init__(self, application, - response_wrapper=None, - use_cookies=False, - allow_subdomain_redirects=False): - super().__init__(application, response_wrapper, use_cookies, allow_subdomain_redirects) + def __init__( + self, + application, + response_wrapper=None, + use_cookies=False, + allow_subdomain_redirects=False, + ): + super().__init__( + application, response_wrapper, use_cookies, allow_subdomain_redirects + ) - def open(self, - uri: str, - res: ResourceLike = None, - status: Status = 200, - query: Query = tuple(), - accept=JSON, - content_type=JSON, - item=None, - headers: dict = None, - token: str = None, - **kw) -> Res: + def open( + self, + uri: str, + res: ResourceLike = None, + status: Status = 200, + query: Query = tuple(), + accept=JSON, + content_type=JSON, + item=None, + headers: dict = None, + token: str = None, + **kw, + ) -> Res: if isclass(res) and issubclass(res, (models.Thing, schemas.Thing)): res = res.t - return super().open(uri, res, status, query, accept, content_type, item, headers, token, - **kw) + return super().open( + uri, res, status, query, accept, content_type, item, headers, token, **kw + ) - def get(self, - uri: str = '', - res: ResourceLike = None, - query: Query = tuple(), - status: Status = 200, - item: Union[int, str] = None, - accept: str = JSON, - headers: dict = None, - token: str = None, - **kw) -> Res: + def get( + self, + uri: str = '', + res: ResourceLike = None, + query: Query = tuple(), + status: Status = 200, + item: Union[int, str] = None, + accept: str = JSON, + headers: dict = None, + token: str = None, + **kw, + ) -> Res: return super().get(uri, res, query, status, item, accept, headers, token, **kw) - def post(self, - data: str or dict, - uri: str = '', - res: ResourceLike = None, - query: Query = tuple(), - status: Status = 201, - content_type: str = JSON, - accept: str = JSON, - headers: dict = None, - token: str = None, - **kw) -> Res: - return super().post(data, uri, res, query, status, content_type, accept, headers, token, - **kw) + def post( + self, + data: str or dict, + uri: str = '', + res: ResourceLike = None, + query: Query = tuple(), + status: Status = 201, + content_type: str = JSON, + accept: str = JSON, + headers: dict = None, + token: str = None, + **kw, + ) -> Res: + return super().post( + data, uri, res, query, status, content_type, accept, headers, token, **kw + ) - def patch(self, - data: str or dict, - uri: str = '', - res: ResourceLike = None, - query: Query = tuple(), - item: Union[int, str] = None, - status: Status = 200, - content_type: str = JSON, - accept: str = JSON, - headers: dict = None, - token: str = None, - **kw) -> Res: - return super().patch(data, uri, res, query, item, status, content_type, accept, token, - headers, **kw) + def patch( + self, + data: str or dict, + uri: str = '', + res: ResourceLike = None, + query: Query = tuple(), + item: Union[int, str] = None, + status: Status = 200, + content_type: str = JSON, + accept: str = JSON, + headers: dict = None, + token: str = None, + **kw, + ) -> Res: + return super().patch( + data, + uri, + res, + query, + item, + status, + content_type, + accept, + token, + headers, + **kw, + ) - def put(self, - data: str or dict, - uri: str = '', - res: ResourceLike = None, - query: Query = tuple(), - item: Union[int, str] = None, - status: Status = 201, - content_type: str = JSON, - accept: str = JSON, - headers: dict = None, - token: str = None, - **kw) -> Res: - return super().put(data, uri, res, query, item, status, content_type, accept, token, - headers, **kw) + def put( + self, + data: str or dict, + uri: str = '', + res: ResourceLike = None, + query: Query = tuple(), + item: Union[int, str] = None, + status: Status = 201, + content_type: str = JSON, + accept: str = JSON, + headers: dict = None, + token: str = None, + **kw, + ) -> Res: + return super().put( + data, + uri, + res, + query, + item, + status, + content_type, + accept, + token, + headers, + **kw, + ) - def delete(self, - uri: str = '', - res: ResourceLike = None, - query: Query = tuple(), - status: Status = 204, - item: Union[int, str] = None, - accept: str = JSON, - headers: dict = None, - token: str = None, - **kw) -> Res: - return super().delete(uri, res, query, status, item, accept, headers, token, **kw) + def delete( + self, + uri: str = '', + res: ResourceLike = None, + query: Query = tuple(), + status: Status = 204, + item: Union[int, str] = None, + accept: str = JSON, + headers: dict = None, + token: str = None, + **kw, + ) -> Res: + return super().delete( + uri, res, query, status, item, accept, headers, token, **kw + ) def login(self, email: str, password: str): assert isinstance(email, str) assert isinstance(password, str) - return self.post({'email': email, 'password': password}, '/users/login/', status=200) + return self.post( + {'email': email, 'password': password}, '/users/login/', status=200 + ) - def get_many(self, - res: ResourceLike, - resources: Iterable[Union[dict, int]], - key: str = None, - **kw) -> Iterable[Union[Dict[str, object], str]]: + def get_many( + self, + res: ResourceLike, + resources: Iterable[Union[dict, int]], + key: str = None, + **kw, + ) -> Iterable[Union[Dict[str, object], str]]: """Like :meth:`.get` but with many resources.""" return ( - self.get(res=res, item=r[key] if key else r, **kw)[0] - for r in resources + self.get(res=res, item=r[key] if key else r, **kw)[0] for r in resources ) @@ -128,30 +175,47 @@ class UserClient(Client): It will automatically perform login on the first request. """ - def __init__(self, application, - email: str, - password: str, - response_wrapper=None, - use_cookies=False, - allow_subdomain_redirects=False): - super().__init__(application, response_wrapper, use_cookies, allow_subdomain_redirects) + def __init__( + self, + application, + email: str, + password: str, + response_wrapper=None, + use_cookies=False, + allow_subdomain_redirects=False, + ): + super().__init__( + application, response_wrapper, use_cookies, allow_subdomain_redirects + ) self.email = email # type: str self.password = password # type: str self.user = None # type: dict - def open(self, - uri: str, - res: ResourceLike = None, - status: int or HTTPException = 200, - query: Query = tuple(), - accept=JSON, - content_type=JSON, - item=None, - headers: dict = None, - token: str = None, - **kw) -> Res: - return super().open(uri, res, status, query, accept, content_type, item, headers, - self.user['token'] if self.user else token, **kw) + def open( + self, + uri: str, + res: ResourceLike = None, + status: int or HTTPException = 200, + query: Query = tuple(), + accept=JSON, + content_type=JSON, + item=None, + headers: dict = None, + token: str = None, + **kw, + ) -> Res: + return super().open( + uri, + res, + status, + query, + accept, + content_type, + item, + headers, + self.user['token'] if self.user else token, + **kw, + ) # noinspection PyMethodOverriding def login(self): @@ -161,13 +225,15 @@ class UserClient(Client): class UserClientFlask: - - def __init__(self, application, - email: str, - password: str, - response_wrapper=None, - use_cookies=True, - follow_redirects=True): + def __init__( + self, + application, + email: str, + password: str, + response_wrapper=None, + use_cookies=True, + follow_redirects=True, + ): self.email = email self.password = password self.follow_redirects = follow_redirects @@ -181,38 +247,25 @@ class UserClientFlask: 'password': password, 'csrf_token': generate_csrf(), } - body, status, headers = self.client.post('/login/', data=data, follow_redirects=True) + body, status, headers = self.client.post( + '/login/', data=data, follow_redirects=True + ) self.headers = headers body = next(body).decode("utf-8") assert "Unassgined" in body - def get(self, - uri='', - data=None, - follow_redirects=True, - **kw): + def get(self, uri='', data=None, follow_redirects=True, **kw): body, status, headers = self.client.get( - uri, - data=data, - follow_redirects=follow_redirects, - headers=self.headers + uri, data=data, follow_redirects=follow_redirects, headers=self.headers ) body = next(body).decode("utf-8") return (body, status) - def post(self, - uri='', - data=None, - follow_redirects=True, - **kw): + def post(self, uri='', data=None, follow_redirects=True, **kw): - import pdb; pdb.set_trace() body, status, headers = self.client.post( - uri, - data=data, - follow_redirects=follow_redirects, - headers=self.headers + uri, data=data, follow_redirects=follow_redirects, headers=self.headers ) body = next(body).decode("utf-8") return (body, status) diff --git a/tests/conftest.py b/tests/conftest.py index e571e96b..1bd1ec71 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -142,9 +142,7 @@ def user3(app: Devicehub) -> UserClientFlask: with app.app_context(): password = 'foo' user = create_user(password=password) - client = UserClientFlask( - app, user.email, password - ) + client = UserClientFlask(app, user.email, password) return client @@ -155,9 +153,7 @@ def user4(app: Devicehub) -> UserClient: password = 'foo' email = 'foo2@foo.com' user = create_user(email=email, password=password) - client = UserClientFlask( - app, user.email, password - ) + client = UserClientFlask(app, user.email, password) return client From 3114c678a4c2585a281bbf3fd8cd1f0e486985ec Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 6 Apr 2022 12:35:08 +0200 Subject: [PATCH 007/154] add user model fields #3017 --- .../1b61613d1c19_add_new_fields_in_agent.py | 35 ++++++++ ereuse_devicehub/resources/agent/models.py | 86 ++++++++++++------- ereuse_devicehub/resources/user/models.py | 58 ++++++++----- .../ereuse_devicehub/user_profile.html | 73 +++++++++++----- ereuse_devicehub/views.py | 2 + 5 files changed, 182 insertions(+), 72 deletions(-) create mode 100644 ereuse_devicehub/migrations/versions/1b61613d1c19_add_new_fields_in_agent.py diff --git a/ereuse_devicehub/migrations/versions/1b61613d1c19_add_new_fields_in_agent.py b/ereuse_devicehub/migrations/versions/1b61613d1c19_add_new_fields_in_agent.py new file mode 100644 index 00000000..13d71b82 --- /dev/null +++ b/ereuse_devicehub/migrations/versions/1b61613d1c19_add_new_fields_in_agent.py @@ -0,0 +1,35 @@ +"""add new fields in agent + +Revision ID: 1b61613d1c19 +Revises: 8571fb32c912 +Create Date: 2022-04-06 12:23:37.644108 + +""" +import citext +import sqlalchemy as sa +from alembic import context, op + +# revision identifiers, used by Alembic. +revision = '1b61613d1c19' +down_revision = '8571fb32c912' +branch_labels = None +depends_on = None + + +def get_inv(): + INV = context.get_x_argument(as_dictionary=True).get('inventory') + if not INV: + raise ValueError("Inventory value is not specified") + return INV + + +def upgrade(): + op.add_column( + "agent", + sa.Column("last_name", citext.CIText(), nullable=True), + schema=f'{get_inv()}', + ) + + +def downgrade(): + op.drop_column('agent', 'last_name', schema=f'{get_inv()}') diff --git a/ereuse_devicehub/resources/agent/models.py b/ereuse_devicehub/resources/agent/models.py index ab9e073a..4554d227 100644 --- a/ereuse_devicehub/resources/agent/models.py +++ b/ereuse_devicehub/resources/agent/models.py @@ -3,7 +3,9 @@ from operator import attrgetter from uuid import uuid4 from citext import CIText -from sqlalchemy import Column, Enum as DBEnum, ForeignKey, Unicode, UniqueConstraint +from sqlalchemy import Column +from sqlalchemy import Enum as DBEnum +from sqlalchemy import ForeignKey, Unicode, UniqueConstraint from sqlalchemy.dialects.postgresql import UUID from sqlalchemy.ext.declarative import declared_attr from sqlalchemy.orm import backref, relationship, validates @@ -29,6 +31,7 @@ class Agent(Thing): id = Column(UUID(as_uuid=True), primary_key=True, default=uuid4) type = Column(Unicode, nullable=False) name = Column(CIText()) + last_name = Column(CIText()) name.comment = """The name of the organization or person.""" tax_id = Column(Unicode(length=STR_SM_SIZE), check_lower('tax_id')) tax_id.comment = """The Tax / Fiscal ID of the organization, @@ -42,9 +45,15 @@ class Agent(Thing): __table_args__ = ( UniqueConstraint(tax_id, country, name='Registration Number per country.'), UniqueConstraint(tax_id, name, name='One tax ID with one name.'), - db.Index('agent_type', type, postgresql_using='hash') + db.Index('agent_type', type, postgresql_using='hash'), ) + @property + def get_full_name(self): + if self.last_name: + return "{} {}".format(self.name, self.last_name) + return self.name + @declared_attr def __mapper_args__(cls): """Defines inheritance. @@ -63,7 +72,9 @@ class Agent(Thing): @property def actions(self) -> list: # todo test - return sorted(chain(self.actions_agent, self.actions_to), key=attrgetter('created')) + return sorted( + chain(self.actions_agent, self.actions_to), key=attrgetter('created') + ) @validates('name') def does_not_contain_slash(self, _, value: str): @@ -76,15 +87,17 @@ class Agent(Thing): class Organization(JoinedTableMixin, Agent): - default_of = db.relationship(Inventory, - uselist=False, - lazy=True, - backref=backref('org', lazy=True), - # We need to use this as we cannot do Inventory.foreign -> Org - # as foreign keys can only reference to one table - # and we have multiple organization table (one per schema) - foreign_keys=[Inventory.org_id], - primaryjoin=lambda: Organization.id == Inventory.org_id) + default_of = db.relationship( + Inventory, + uselist=False, + lazy=True, + backref=backref('org', lazy=True), + # We need to use this as we cannot do Inventory.foreign -> Org + # as foreign keys can only reference to one table + # and we have multiple organization table (one per schema) + foreign_keys=[Inventory.org_id], + primaryjoin=lambda: Organization.id == Inventory.org_id, + ) def __init__(self, name: str, **kwargs) -> None: super().__init__(**kwargs, name=name) @@ -97,12 +110,17 @@ class Organization(JoinedTableMixin, Agent): class Individual(JoinedTableMixin, Agent): active_org_id = Column(UUID(as_uuid=True), ForeignKey(Organization.id)) - active_org = relationship(Organization, primaryjoin=active_org_id == Organization.id) + + active_org = relationship( + Organization, primaryjoin=active_org_id == Organization.id + ) user_id = Column(UUID(as_uuid=True), ForeignKey(User.id), unique=True) - user = relationship(User, - backref=backref('individuals', lazy=True, collection_class=set), - primaryjoin=user_id == User.id) + user = relationship( + User, + backref=backref('individuals', lazy=True, collection_class=set), + primaryjoin=user_id == User.id, + ) class Membership(Thing): @@ -110,20 +128,29 @@ class Membership(Thing): For example, because the individual works in or because is a member of. """ - id = Column(Unicode(), check_lower('id')) - organization_id = Column(UUID(as_uuid=True), ForeignKey(Organization.id), primary_key=True) - organization = relationship(Organization, - backref=backref('members', collection_class=set, lazy=True), - primaryjoin=organization_id == Organization.id) - individual_id = Column(UUID(as_uuid=True), ForeignKey(Individual.id), primary_key=True) - individual = relationship(Individual, - backref=backref('member_of', collection_class=set, lazy=True), - primaryjoin=individual_id == Individual.id) - def __init__(self, organization: Organization, individual: Individual, id: str = None) -> None: - super().__init__(organization=organization, - individual=individual, - id=id) + id = Column(Unicode(), check_lower('id')) + organization_id = Column( + UUID(as_uuid=True), ForeignKey(Organization.id), primary_key=True + ) + organization = relationship( + Organization, + backref=backref('members', collection_class=set, lazy=True), + primaryjoin=organization_id == Organization.id, + ) + individual_id = Column( + UUID(as_uuid=True), ForeignKey(Individual.id), primary_key=True + ) + individual = relationship( + Individual, + backref=backref('member_of', collection_class=set, lazy=True), + primaryjoin=individual_id == Individual.id, + ) + + def __init__( + self, organization: Organization, individual: Individual, id: str = None + ) -> None: + super().__init__(organization=organization, individual=individual, id=id) __table_args__ = ( UniqueConstraint(id, organization_id, name='One member id per organization.'), @@ -134,6 +161,7 @@ class Person(Individual): """A person in the system. There can be several persons pointing to a real. """ + pass diff --git a/ereuse_devicehub/resources/user/models.py b/ereuse_devicehub/resources/user/models.py index 70f14e00..039a4bf3 100644 --- a/ereuse_devicehub/resources/user/models.py +++ b/ereuse_devicehub/resources/user/models.py @@ -2,37 +2,44 @@ from uuid import uuid4 from flask import current_app as app from flask_login import UserMixin -from sqlalchemy import Column, Boolean, BigInteger, Sequence +from sqlalchemy import BigInteger, Boolean, Column, Sequence from sqlalchemy.dialects.postgresql import UUID from sqlalchemy_utils import EmailType, PasswordType from teal.db import IntEnum from ereuse_devicehub.db import db +from ereuse_devicehub.resources.enums import SessionType from ereuse_devicehub.resources.inventory.model import Inventory from ereuse_devicehub.resources.models import STR_SIZE, Thing -from ereuse_devicehub.resources.enums import SessionType class User(UserMixin, Thing): __table_args__ = {'schema': 'common'} id = Column(UUID(as_uuid=True), default=uuid4, primary_key=True) email = Column(EmailType, nullable=False, unique=True) - password = Column(PasswordType(max_length=STR_SIZE, - onload=lambda **kwargs: dict( - schemes=app.config['PASSWORD_SCHEMES'], - **kwargs - ))) + password = Column( + PasswordType( + max_length=STR_SIZE, + onload=lambda **kwargs: dict( + schemes=app.config['PASSWORD_SCHEMES'], **kwargs + ), + ) + ) token = Column(UUID(as_uuid=True), default=uuid4, unique=True, nullable=False) active = Column(Boolean, default=True, nullable=False) phantom = Column(Boolean, default=False, nullable=False) - inventories = db.relationship(Inventory, - backref=db.backref('users', lazy=True, collection_class=set), - secondary=lambda: UserInventory.__table__, - collection_class=set) + inventories = db.relationship( + Inventory, + backref=db.backref('users', lazy=True, collection_class=set), + secondary=lambda: UserInventory.__table__, + collection_class=set, + ) # todo set restriction that user has, at least, one active db - def __init__(self, email, password=None, inventories=None, active=True, phantom=False) -> None: + def __init__( + self, email, password=None, inventories=None, active=True, phantom=False + ) -> None: """Creates an user. :param email: :param password: @@ -44,8 +51,13 @@ class User(UserMixin, Thing): create during the trade actions """ inventories = inventories or {Inventory.current} - super().__init__(email=email, password=password, inventories=inventories, - active=active, phantom=phantom) + super().__init__( + email=email, + password=password, + inventories=inventories, + active=active, + phantom=phantom, + ) def __repr__(self) -> str: return ''.format(self) @@ -73,8 +85,9 @@ class User(UserMixin, Thing): @property def get_full_name(self): - # TODO(@slamora) create first_name & last_name fields and use - # them to generate user full name + if self.individual: + return self.individual.get_full_name + return self.email def check_password(self, password): @@ -84,9 +97,12 @@ class User(UserMixin, Thing): class UserInventory(db.Model): """Relationship between users and their inventories.""" + __table_args__ = {'schema': 'common'} user_id = db.Column(db.UUID(as_uuid=True), db.ForeignKey(User.id), primary_key=True) - inventory_id = db.Column(db.Unicode(), db.ForeignKey(Inventory.id), primary_key=True) + inventory_id = db.Column( + db.Unicode(), db.ForeignKey(Inventory.id), primary_key=True + ) class Session(Thing): @@ -96,9 +112,11 @@ class Session(Thing): token = Column(UUID(as_uuid=True), default=uuid4, unique=True, nullable=False) type = Column(IntEnum(SessionType), default=SessionType.Internal, nullable=False) user_id = db.Column(db.UUID(as_uuid=True), db.ForeignKey(User.id)) - user = db.relationship(User, - backref=db.backref('sessions', lazy=True, collection_class=set), - collection_class=set) + user = db.relationship( + User, + backref=db.backref('sessions', lazy=True, collection_class=set), + collection_class=set, + ) def __str__(self) -> str: return '{0.token}'.format(self) diff --git a/ereuse_devicehub/templates/ereuse_devicehub/user_profile.html b/ereuse_devicehub/templates/ereuse_devicehub/user_profile.html index 71ab39fa..326f3991 100644 --- a/ereuse_devicehub/templates/ereuse_devicehub/user_profile.html +++ b/ereuse_devicehub/templates/ereuse_devicehub/user_profile.html @@ -27,7 +27,7 @@ -
+
@@ -54,46 +54,73 @@
-
About
-

Sunt est soluta temporibus accusantium neque nam maiores cumque temporibus. Tempora libero non est unde veniam est qui dolor. Ut sunt iure rerum quae quisquam autem eveniet perspiciatis odit. Fuga sequi sed ea saepe at unde.

-
Profile Details
+
+
Account user
+
{{ current_user.email or ''}}
+
+ + {% for u in current_user.individuals %} +
Full Name
-
Kevin Anderson
-
- -
-
Company
-
Lueilwitz, Wisoky and Leuschke
-
- -
-
Job
-
Web Designer
+
{{ u.get_full_name or ''}}
Country
-
USA
-
- -
-
Address
-
A108 Adam Street, New York, NY 535022
+
{{ u.country or ''}}
Phone
-
(436) 486-3538 x29071
+
{{ u.telephone or ''}}
Email
-
k.anderson@example.com
+
{{ u.email or ''}}
+
+
Created
+
{{ u.created.strftime('%H:%M %d-%m-%Y') or ''}}
+
+ +
+
Last login
+
+ {% for s in sessions %} + {{ s }}
+ {% endfor %} +
+
+ + {% if u.active_org %} +
+
Company name
+
{{ u.active_org.name or ''}}
+
+ +
+
Company country
+
{{ u.active_org.country or '' }}
+
+ +
+
Company Phone
+
{{ u.active_org.telephone or '' }}
+
+ +
+
Company Email
+
{{ u.active_org.email or '' }}
+
+ + {% endif %} + {% endfor %} +
diff --git a/ereuse_devicehub/views.py b/ereuse_devicehub/views.py index 0c9b4361..1a2112a2 100644 --- a/ereuse_devicehub/views.py +++ b/ereuse_devicehub/views.py @@ -50,8 +50,10 @@ class UserProfileView(View): template_name = 'ereuse_devicehub/user_profile.html' def dispatch_request(self): + sessions = {s.created.strftime('%H:%M %d-%m-%Y') for s in current_user.sessions} context = { 'current_user': current_user, + 'sessions': sessions, 'version': __version__, } return flask.render_template(self.template_name, **context) From 9f8465902683c1e60fc250ecd32ab82680c43116 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 6 Apr 2022 13:49:15 +0200 Subject: [PATCH 008/154] clean white space --- ereuse_devicehub/resources/agent/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ereuse_devicehub/resources/agent/models.py b/ereuse_devicehub/resources/agent/models.py index 4554d227..36d7fcd8 100644 --- a/ereuse_devicehub/resources/agent/models.py +++ b/ereuse_devicehub/resources/agent/models.py @@ -34,7 +34,7 @@ class Agent(Thing): last_name = Column(CIText()) name.comment = """The name of the organization or person.""" tax_id = Column(Unicode(length=STR_SM_SIZE), check_lower('tax_id')) - tax_id.comment = """The Tax / Fiscal ID of the organization, + tax_id.comment = """The Tax / Fiscal ID of the organization, e.g. the TIN in the US or the CIF/NIF in Spain. """ country = Column(DBEnum(enums.Country)) From d1310a67bfa6ca5e87f80e3658385eac889113cf Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 6 Apr 2022 13:50:08 +0200 Subject: [PATCH 009/154] add profile form --- ereuse_devicehub/forms.py | 36 ++++++- .../ereuse_devicehub/user_profile.html | 101 ++---------------- ereuse_devicehub/views.py | 4 +- 3 files changed, 47 insertions(+), 94 deletions(-) diff --git a/ereuse_devicehub/forms.py b/ereuse_devicehub/forms.py index d88c9cf1..dca1044c 100644 --- a/ereuse_devicehub/forms.py +++ b/ereuse_devicehub/forms.py @@ -1,9 +1,19 @@ from flask_wtf import FlaskForm from werkzeug.security import generate_password_hash -from wtforms import BooleanField, EmailField, PasswordField, validators +from wtforms import ( + BooleanField, + EmailField, + PasswordField, + SelectField, + StringField, + validators, +) +from ereuse_devicehub.enums import Country from ereuse_devicehub.resources.user.models import User +COUNTRY = [(x.name, x.value) for x in Country] + class LoginForm(FlaskForm): email = EmailField('Email Address', [validators.Length(min=6, max=35)]) @@ -59,3 +69,27 @@ class LoginForm(FlaskForm): self.form_errors.append(self.error_messages['inactive']) return user.is_active + + +class ProfileForm(FlaskForm): + name = StringField( + 'First name', + [validators.Length(min=2, max=35)], + render_kw={'class': "form-control"}, + ) + last_name = StringField( + 'Last name', + [validators.Length(min=2, max=35)], + render_kw={'class': "form-control"}, + ) + email = StringField( + 'Email Address', + [validators.Length(min=6, max=35)], + render_kw={'class': "form-control"}, + ) + telephone = StringField( + 'Phone', [validators.Length(min=6, max=35)], render_kw={'class': "form-control"} + ) + country = SelectField( + 'Country', choices=COUNTRY, default="es", render_kw={'class': "form-select"} + ) diff --git a/ereuse_devicehub/templates/ereuse_devicehub/user_profile.html b/ereuse_devicehub/templates/ereuse_devicehub/user_profile.html index 326f3991..4b6468ba 100644 --- a/ereuse_devicehub/templates/ereuse_devicehub/user_profile.html +++ b/ereuse_devicehub/templates/ereuse_devicehub/user_profile.html @@ -126,102 +126,19 @@
-
+ + {% for f in profile_form %} + {% if f == profile_form.csrf_token %} + {{ f }} + {% else %}
- +
- Profile -
- - -
+ {{ f }}
- -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- + {% endif %} + {% endfor %}
diff --git a/ereuse_devicehub/views.py b/ereuse_devicehub/views.py index 1a2112a2..f6ed21f4 100644 --- a/ereuse_devicehub/views.py +++ b/ereuse_devicehub/views.py @@ -4,7 +4,7 @@ from flask.views import View from flask_login import current_user, login_required, login_user, logout_user from ereuse_devicehub import __version__ -from ereuse_devicehub.forms import LoginForm +from ereuse_devicehub.forms import LoginForm, ProfileForm from ereuse_devicehub.resources.user.models import User from ereuse_devicehub.utils import is_safe_url @@ -50,11 +50,13 @@ class UserProfileView(View): template_name = 'ereuse_devicehub/user_profile.html' def dispatch_request(self): + form = ProfileForm() sessions = {s.created.strftime('%H:%M %d-%m-%Y') for s in current_user.sessions} context = { 'current_user': current_user, 'sessions': sessions, 'version': __version__, + 'profile_form': form, } return flask.render_template(self.template_name, **context) From 1820b15255c22379d10a643acb2211590bd4f47c Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 11 Apr 2022 17:16:20 +0200 Subject: [PATCH 010/154] save data profile --- ereuse_devicehub/forms.py | 24 +++++++++++++++++++ .../ereuse_devicehub/user_profile.html | 9 ++++++- ereuse_devicehub/views.py | 17 +++++++++++-- 3 files changed, 47 insertions(+), 3 deletions(-) diff --git a/ereuse_devicehub/forms.py b/ereuse_devicehub/forms.py index dca1044c..1bfd7907 100644 --- a/ereuse_devicehub/forms.py +++ b/ereuse_devicehub/forms.py @@ -1,3 +1,4 @@ +from flask import g from flask_wtf import FlaskForm from werkzeug.security import generate_password_hash from wtforms import ( @@ -9,6 +10,7 @@ from wtforms import ( validators, ) +from ereuse_devicehub.db import db from ereuse_devicehub.enums import Country from ereuse_devicehub.resources.user.models import User @@ -93,3 +95,25 @@ class ProfileForm(FlaskForm): country = SelectField( 'Country', choices=COUNTRY, default="es", render_kw={'class': "form-select"} ) + + def __init__(self, *args, **kwargs): + user = kwargs.pop('user', None) + super().__init__(*args, **kwargs) + if user: + self.name.data = user.name + self.last_name.data = user.last_name + self.email.data = user.email + self.telephone.data = user.telephone + self.country.data = user.country + + def save(self, commit=True): + agent = g.user.individual + agent.name = self.name.data + agent.last_name = self.last_name.data + agent.email = self.email.data + agent.telephone = self.telephone.data + agent.country = self.country.data + + db.session.add(agent) + if commit: + db.session.commit() diff --git a/ereuse_devicehub/templates/ereuse_devicehub/user_profile.html b/ereuse_devicehub/templates/ereuse_devicehub/user_profile.html index 4b6468ba..dba8db62 100644 --- a/ereuse_devicehub/templates/ereuse_devicehub/user_profile.html +++ b/ereuse_devicehub/templates/ereuse_devicehub/user_profile.html @@ -135,6 +135,13 @@
{{ f }} + {% if f.errors %} +

+ {% for error in f.errors %} + {{ error }}
+ {% endfor %} +

+ {% endif %}
{% endif %} @@ -149,7 +156,7 @@
- +
diff --git a/ereuse_devicehub/views.py b/ereuse_devicehub/views.py index f6ed21f4..682d858d 100644 --- a/ereuse_devicehub/views.py +++ b/ereuse_devicehub/views.py @@ -1,9 +1,10 @@ import flask -from flask import Blueprint +from flask import Blueprint, request from flask.views import View from flask_login import current_user, login_required, login_user, logout_user -from ereuse_devicehub import __version__ +from ereuse_devicehub import __version__, messages +from ereuse_devicehub.db import db from ereuse_devicehub.forms import LoginForm, ProfileForm from ereuse_devicehub.resources.user.models import User from ereuse_devicehub.utils import is_safe_url @@ -46,11 +47,15 @@ class LogoutView(View): class UserProfileView(View): + methods = ['GET', 'POST'] decorators = [login_required] template_name = 'ereuse_devicehub/user_profile.html' def dispatch_request(self): form = ProfileForm() + if request.method == 'GET': + form = ProfileForm(user=current_user.individual) + sessions = {s.created.strftime('%H:%M %d-%m-%Y') for s in current_user.sessions} context = { 'current_user': current_user, @@ -58,6 +63,14 @@ class UserProfileView(View): 'version': __version__, 'profile_form': form, } + + if form.validate_on_submit(): + form.save(commit=False) + messages.success('Modify user Profile datas successfully!') + elif form.errors: + messages.error('Error modify user Profile data!') + + db.session.commit() return flask.render_template(self.template_name, **context) From 9d4ca5a2dcc21188b904457d19a6a67573ec9818 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 11 Apr 2022 19:48:59 +0200 Subject: [PATCH 011/154] change password --- ereuse_devicehub/forms.py | 43 +++++++++++++++++++ .../ereuse_devicehub/user_profile.html | 37 ++++++++-------- ereuse_devicehub/views.py | 26 +++++++++-- 3 files changed, 83 insertions(+), 23 deletions(-) diff --git a/ereuse_devicehub/forms.py b/ereuse_devicehub/forms.py index 1bfd7907..9789a06e 100644 --- a/ereuse_devicehub/forms.py +++ b/ereuse_devicehub/forms.py @@ -117,3 +117,46 @@ class ProfileForm(FlaskForm): db.session.add(agent) if commit: db.session.commit() + + +class PasswordForm(FlaskForm): + password = PasswordField( + 'Current Password', + [validators.DataRequired()], + render_kw={'class': "form-control"}, + ) + newpassword = PasswordField( + 'New Password', + [validators.DataRequired()], + render_kw={'class': "form-control"}, + ) + renewpassword = PasswordField( + 'Re-enter New Password', + [validators.DataRequired()], + render_kw={'class': "form-control"}, + ) + + def validate(self, extra_validators=None): + is_valid = super().validate(extra_validators) + + if not is_valid: + return False + + if not g.user.check_password(self.password.data): + self.password.errors = ['Incorrect password'] + return False + + if self.newpassword.data != self.renewpassword.data: + self.newpassword.errors = ['Is not the same password'] + self.renewpassword.errors = ['Is not the same password'] + return False + + return True + + def save(self, commit=True): + g.user.password = generate_password_hash(self.newpassword.data) + + db.session.add(g.user) + if commit: + db.session.commit() + return diff --git a/ereuse_devicehub/templates/ereuse_devicehub/user_profile.html b/ereuse_devicehub/templates/ereuse_devicehub/user_profile.html index dba8db62..782b92c8 100644 --- a/ereuse_devicehub/templates/ereuse_devicehub/user_profile.html +++ b/ereuse_devicehub/templates/ereuse_devicehub/user_profile.html @@ -132,7 +132,7 @@ {{ f }} {% else %}
- +
{{ f }} {% if f.errors %} @@ -197,29 +197,26 @@
- - + + {% for f in password_form %} + {% if f == password_form.csrf_token %} + {{ f }} + {% else %}
- +
- + {{ f }} + {% if f.errors %} +

+ {% for error in f.errors %} + {{ error }}
+ {% endfor %} +

+ {% endif %}
- -
- -
- -
-
- -
- -
- -
-
- + {% endif %} + {% endfor %}
diff --git a/ereuse_devicehub/views.py b/ereuse_devicehub/views.py index 682d858d..bdbea6ae 100644 --- a/ereuse_devicehub/views.py +++ b/ereuse_devicehub/views.py @@ -5,7 +5,7 @@ from flask_login import current_user, login_required, login_user, logout_user from ereuse_devicehub import __version__, messages from ereuse_devicehub.db import db -from ereuse_devicehub.forms import LoginForm, ProfileForm +from ereuse_devicehub.forms import LoginForm, PasswordForm, ProfileForm from ereuse_devicehub.resources.user.models import User from ereuse_devicehub.utils import is_safe_url @@ -62,18 +62,38 @@ class UserProfileView(View): 'sessions': sessions, 'version': __version__, 'profile_form': form, + 'password_form': PasswordForm(), } if form.validate_on_submit(): form.save(commit=False) messages.success('Modify user Profile datas successfully!') + db.session.commit() elif form.errors: - messages.error('Error modify user Profile data!') + messages.error('Error modifying user Profile data!') + + return flask.render_template(self.template_name, **context) + + +class UserPasswordView(View): + methods = ['POST'] + decorators = [login_required] + + def dispatch_request(self): + form = PasswordForm() + # import pdb; pdb.set_trace() + db.session.commit() + if form.validate_on_submit(): + form.save(commit=False) + messages.success('Reset user password successfully!') + else: + messages.error('Error modifying user password!') db.session.commit() - return flask.render_template(self.template_name, **context) + return flask.redirect(flask.url_for('core.user-profile')) core.add_url_rule('/login/', view_func=LoginView.as_view('login')) core.add_url_rule('/logout/', view_func=LogoutView.as_view('logout')) core.add_url_rule('/profile/', view_func=UserProfileView.as_view('user-profile')) +core.add_url_rule('/set_password/', view_func=UserPasswordView.as_view('set-password')) From cb1f4377d6f52f6b4fa56e52b3af362437c3e296 Mon Sep 17 00:00:00 2001 From: RubenPX Date: Tue, 12 Apr 2022 12:44:24 +0200 Subject: [PATCH 012/154] Fix button spacing --- ereuse_devicehub/templates/inventory/device_list.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ereuse_devicehub/templates/inventory/device_list.html b/ereuse_devicehub/templates/inventory/device_list.html index b1c45382..47d4c382 100644 --- a/ereuse_devicehub/templates/inventory/device_list.html +++ b/ereuse_devicehub/templates/inventory/device_list.html @@ -72,7 +72,7 @@
-
-{% endblock body %} +{% endblock body %} \ No newline at end of file From d985744fb82edacc3a1cfddcd1141b8c4412b665 Mon Sep 17 00:00:00 2001 From: RubenPX Date: Tue, 12 Apr 2022 13:19:56 +0200 Subject: [PATCH 017/154] fix device list padding --- ereuse_devicehub/templates/inventory/device_list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ereuse_devicehub/templates/inventory/device_list.html b/ereuse_devicehub/templates/inventory/device_list.html index cdf2c5e3..34f1fdd6 100644 --- a/ereuse_devicehub/templates/inventory/device_list.html +++ b/ereuse_devicehub/templates/inventory/device_list.html @@ -69,7 +69,7 @@ {% endif %} -
+
-
- - -
- -
- -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
- -
- -
-
- -
-
From 4e19b9233ba49c58e3d38206ae628d2192ce97fe Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 13 Apr 2022 19:11:23 +0200 Subject: [PATCH 026/154] validate email is unique --- ereuse_devicehub/forms.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ereuse_devicehub/forms.py b/ereuse_devicehub/forms.py index 7dddf884..2ae69094 100644 --- a/ereuse_devicehub/forms.py +++ b/ereuse_devicehub/forms.py @@ -12,6 +12,7 @@ from wtforms import ( ) from ereuse_devicehub.db import db +from ereuse_devicehub.resources.agent.models import Agent from ereuse_devicehub.resources.user.models import User COUNTRY = [(x.name, x.value) for x in Country] @@ -101,6 +102,21 @@ class ProfileForm(FlaskForm): if user.country: self.country.data = user.country.name + def validate(self, extra_validators=None): + is_valid = super().validate(extra_validators) + + if not is_valid: + return False + + # import pdb; pdb.set_trace() + email = self.email.data + if email != g.user.individual.email: + if Agent.query.filter_by(email=email).first(): + self.email.errors = ['You can not use this email.'] + return False + + return True + def save(self, commit=True): agent = g.user.individual agent.name = self.name.data From d870d254f1979f1fc8564b73d93a014edbb46580 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 13 Apr 2022 19:12:12 +0200 Subject: [PATCH 027/154] drop pdbs --- ereuse_devicehub/forms.py | 1 - 1 file changed, 1 deletion(-) diff --git a/ereuse_devicehub/forms.py b/ereuse_devicehub/forms.py index 2ae69094..4c614c95 100644 --- a/ereuse_devicehub/forms.py +++ b/ereuse_devicehub/forms.py @@ -108,7 +108,6 @@ class ProfileForm(FlaskForm): if not is_valid: return False - # import pdb; pdb.set_trace() email = self.email.data if email != g.user.individual.email: if Agent.query.filter_by(email=email).first(): From 093e78d2c812f1e3c10759dc306f5ece34fce98d Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 18 Apr 2022 17:13:38 +0200 Subject: [PATCH 028/154] add new test snapshot lite for clonic desktop --- tests/files/desktop-amd-bug-no-sn.json | 1 + tests/test_snapshot.py | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 tests/files/desktop-amd-bug-no-sn.json diff --git a/tests/files/desktop-amd-bug-no-sn.json b/tests/files/desktop-amd-bug-no-sn.json new file mode 100644 index 00000000..e7c16f81 --- /dev/null +++ b/tests/files/desktop-amd-bug-no-sn.json @@ -0,0 +1 @@ +{"timestamp": "2022-04-18T10:44:04.563919", "type": "Snapshot", "uuid": "2280776b-2fed-4c22-8ada-b57000da8059", "wbid": "G8V4Y", "software": "Workbench", "version": "2022.03.3-alpha", "schema_api": "1.0.0", "data": {"lshw": {"id": "workbench-live", "class": "system", "claimed": true, "handle": "DMI:0001", "description": "Desktop Computer", "product": "System Product Name (To Be Filled By O.E.M.)", "vendor": "System manufacturer", "version": "System Version", "serial": "System Serial Number", "width": 64, "configuration": {"boot": "normal", "chassis": "desktop", "family": "To Be Filled By O.E.M.", "sku": "To Be Filled By O.E.M.", "uuid": "a7130988-fe74-11d5-8893-24e75bf3a527"}, "capabilities": {"smbios-2.4": "SMBIOS version 2.4", "dmi-2.4": "DMI version 2.4", "smp": "Symmetric Multi-Processing", "vsyscall32": "32-bit processes"}, "children": [{"id": "core", "class": "bus", "claimed": true, "handle": "DMI:0002", "description": "Motherboard", "product": "P5B-MX/WiFi-AP", "vendor": "ASUSTeK Computer INC.", "physid": "0", "version": "x.xx", "serial": "MB-1234567890", "slot": "To Be Filled By O.E.M.", "children": [{"id": "firmware", "class": "memory", "claimed": true, "description": "BIOS", "vendor": "American Megatrends Inc.", "physid": "0", "version": "0604", "date": "05/06/2007", "units": "bytes", "size": 65536, "capacity": 524288, "capabilities": {"isa": "ISA bus", "pci": "PCI bus", "pnp": "Plug-and-Play", "apm": "Advanced Power Management", "upgrade": "BIOS EEPROM can be upgraded", "shadowing": "BIOS shadowing", "escd": "ESCD", "cdboot": "Booting from CD-ROM/DVD", "bootselect": "Selectable boot path", "socketedrom": "BIOS ROM is socketed", "edd": "Enhanced Disk Drive extensions", "int13floppy1200": "5.25\" 1.2MB floppy", "int13floppy720": "3.5\" 720KB floppy", "int13floppy2880": "3.5\" 2.88MB floppy", "int5printscreen": "Print Screen key", "int9keyboard": "i8042 keyboard controller", "int14serial": "INT14 serial line control", "int17printer": "INT17 printer control", "int10video": "INT10 CGA/Mono video", "acpi": "ACPI", "usb": "USB legacy emulation", "ls120boot": "Booting from LS-120", "zipboot": "Booting from ATAPI ZIP", "biosbootspecification": "BIOS boot specification"}}, {"id": "cpu", "class": "processor", "claimed": true, "handle": "DMI:0004", "description": "CPU", "product": "Intel(R) Core(TM)2 CPU 6420 @ 2.13GHz", "vendor": "Intel Corp.", "physid": "4", "businfo": "cpu@0", "version": "6.15.6", "serial": "To Be Filled By O.E.M.", "slot": "Socket 775", "units": "Hz", "size": 1600085000, "capacity": 3800000000, "width": 64, "clock": 266000000, "configuration": {"microcode": "198"}, "capabilities": {"fpu": "mathematical co-processor", "fpu_exception": "FPU exceptions reporting", "wp": true, "vme": "virtual mode extensions", "de": "debugging extensions", "pse": "page size extensions", "tsc": "time stamp counter", "msr": "model-specific registers", "pae": "4GB+ memory addressing (Physical Address Extension)", "mce": "machine check exceptions", "cx8": "compare and exchange 8-byte", "apic": "on-chip advanced programmable interrupt controller (APIC)", "sep": "fast system calls", "mtrr": "memory type range registers", "pge": "page global enable", "mca": "machine check architecture", "cmov": "conditional move instruction", "pat": "page attribute table", "pse36": "36-bit page size extensions", "clflush": true, "dts": "debug trace and EMON store MSRs", "acpi": "thermal control (ACPI)", "mmx": "multimedia extensions (MMX)", "fxsr": "fast floating point save/restore", "sse": "streaming SIMD extensions (SSE)", "sse2": "streaming SIMD extensions (SSE2)", "ht": "HyperThreading", "tm": "thermal interrupt and status", "pbe": "pending break event", "syscall": "fast system calls", "nx": "no-execute bit (NX)", "x86-64": "64bits extensions (x86-64)", "constant_tsc": true, "arch_perfmon": true, "pebs": true, "bts": true, "nopl": true, "cpuid": true, "aperfmperf": true, "pni": true, "dtes64": true, "monitor": true, "ds_cpl": true, "vmx": true, "est": true, "tm2": true, "ssse3": true, "cx16": true, "xtpr": true, "pdcm": true, "lahf_lm": true, "pti": true, "tpr_shadow": true, "dtherm": true, "cpufreq": "CPU Frequency scaling"}, "children": [{"id": "cache:0", "class": "memory", "claimed": true, "handle": "DMI:0005", "description": "L1 cache", "physid": "5", "slot": "L1-Cache", "units": "bytes", "size": 65536, "capacity": 65536, "configuration": {"level": "1"}, "capabilities": {"internal": "Internal", "write-back": "Write-back", "data": "Data cache"}}, {"id": "cache:1", "class": "memory", "claimed": true, "handle": "DMI:0006", "description": "L2 cache", "physid": "6", "slot": "L2-Cache", "units": "bytes", "size": 4194304, "capacity": 4194304, "configuration": {"level": "2"}, "capabilities": {"internal": "Internal", "write-back": "Write-back", "instruction": "Instruction cache"}}]}, {"id": "memory", "class": "memory", "claimed": true, "handle": "DMI:0029", "description": "System Memory", "physid": "29", "slot": "System board or motherboard", "units": "bytes", "size": 2684354560, "children": [{"id": "bank:0", "class": "memory", "claimed": true, "handle": "DMI:002B", "description": "DIMM DDR2 Synchronous 667 MHz (1.5 ns)", "product": "PartNum0", "vendor": "Manufacturer0", "physid": "0", "serial": "SerNum0", "slot": "DIMM A1", "units": "bytes", "size": 2147483648, "width": 64, "clock": 667000000}, {"id": "bank:1", "class": "memory", "claimed": true, "handle": "DMI:002D", "description": "DIMM DDR2 Synchronous 667 MHz (1.5 ns)", "product": "PartNum1", "vendor": "Manufacturer1", "physid": "1", "serial": "SerNum1", "slot": "DIMM B1", "units": "bytes", "size": 536870912, "width": 64, "clock": 667000000}]}, {"id": "pci", "class": "bridge", "claimed": true, "handle": "PCIBUS:0000:00", "description": "Host bridge", "product": "82946GZ/PL/GL Memory Controller Hub", "vendor": "Intel Corporation", "physid": "100", "businfo": "pci@0000:00:00.0", "version": "02", "width": 32, "clock": 33000000, "children": [{"id": "display", "class": "display", "claimed": true, "handle": "PCI:0000:00:02.0", "description": "VGA compatible controller", "product": "82946GZ/GL Integrated Graphics Controller", "vendor": "Intel Corporation", "physid": "2", "businfo": "pci@0000:00:02.0", "logicalname": "/dev/fb0", "version": "02", "width": 64, "clock": 33000000, "configuration": {"depth": "32", "driver": "i915", "latency": "0", "resolution": "1920,1200"}, "capabilities": {"msi": "Message Signalled Interrupts", "pm": "Power Management", "vga_controller": true, "bus_master": "bus mastering", "cap_list": "PCI capabilities listing", "rom": "extension ROM", "fb": "framebuffer"}}, {"id": "multimedia", "class": "multimedia", "claimed": true, "handle": "PCI:0000:00:1b.0", "description": "Audio device", "product": "NM10/ICH7 Family High Definition Audio Controller", "vendor": "Intel Corporation", "physid": "1b", "businfo": "pci@0000:00:1b.0", "logicalname": ["card0", "/dev/snd/controlC0", "/dev/snd/hwC0D0", "/dev/snd/pcmC0D0c", "/dev/snd/pcmC0D0p", "/dev/snd/pcmC0D1p", "/dev/snd/pcmC0D2c"], "version": "01", "width": 64, "clock": 33000000, "configuration": {"driver": "snd_hda_intel", "latency": "0"}, "capabilities": {"pm": "Power Management", "msi": "Message Signalled Interrupts", "pciexpress": "PCI Express", "bus_master": "bus mastering", "cap_list": "PCI capabilities listing"}, "children": [{"id": "input:0", "class": "input", "claimed": true, "product": "HDA Intel Front Mic", "physid": "0", "logicalname": ["input11", "/dev/input/event10"]}, {"id": "input:1", "class": "input", "claimed": true, "product": "HDA Intel Rear Mic", "physid": "1", "logicalname": ["input12", "/dev/input/event11"]}, {"id": "input:2", "class": "input", "claimed": true, "product": "HDA Intel Line", "physid": "2", "logicalname": ["input13", "/dev/input/event12"]}, {"id": "input:3", "class": "input", "claimed": true, "product": "HDA Intel Line Out", "physid": "3", "logicalname": ["input14", "/dev/input/event13"]}, {"id": "input:4", "class": "input", "claimed": true, "product": "HDA Intel Front Headphone", "physid": "4", "logicalname": ["input15", "/dev/input/event14"]}]}, {"id": "pci:0", "class": "bridge", "claimed": true, "handle": "PCIBUS:0000:03", "description": "PCI bridge", "product": "NM10/ICH7 Family PCI Express Port 1", "vendor": "Intel Corporation", "physid": "1c", "businfo": "pci@0000:00:1c.0", "version": "01", "width": 32, "clock": 33000000, "configuration": {"driver": "pcieport"}, "capabilities": {"pci": true, "pciexpress": "PCI Express", "msi": "Message Signalled Interrupts", "pm": "Power Management", "normal_decode": true, "bus_master": "bus mastering", "cap_list": "PCI capabilities listing"}}, {"id": "pci:1", "class": "bridge", "claimed": true, "handle": "PCIBUS:0000:02", "description": "PCI bridge", "product": "NM10/ICH7 Family PCI Express Port 2", "vendor": "Intel Corporation", "physid": "1c.1", "businfo": "pci@0000:00:1c.1", "version": "01", "width": 32, "clock": 33000000, "configuration": {"driver": "pcieport"}, "capabilities": {"pci": true, "pciexpress": "PCI Express", "msi": "Message Signalled Interrupts", "pm": "Power Management", "normal_decode": true, "bus_master": "bus mastering", "cap_list": "PCI capabilities listing"}, "children": [{"id": "network", "class": "network", "claimed": true, "handle": "PCI:0000:02:00.0", "description": "Ethernet interface", "product": "Attansic L1 Gigabit Ethernet", "vendor": "Qualcomm Atheros", "physid": "0", "businfo": "pci@0000:02:00.0", "logicalname": "eth0", "version": "b0", "serial": "00:1b:fc:e7:ce:7a", "units": "bit/s", "size": 100000000, "capacity": 1000000000, "width": 64, "clock": 33000000, "configuration": {"autonegotiation": "on", "broadcast": "yes", "driver": "atl1", "driverversion": "5.10.0-13-amd64", "duplex": "full", "ip": "192.168.1.47", "latency": "0", "link": "yes", "multicast": "yes", "port": "twisted pair", "speed": "100Mbit/s"}, "capabilities": {"pm": "Power Management", "msi": "Message Signalled Interrupts", "pciexpress": "PCI Express", "vpd": "Vital Product Data", "bus_master": "bus mastering", "cap_list": "PCI capabilities listing", "rom": "extension ROM", "ethernet": true, "physical": "Physical interface", "tp": "twisted pair", "10bt": "10Mbit/s", "10bt-fd": "10Mbit/s (full duplex)", "100bt": "100Mbit/s", "100bt-fd": "100Mbit/s (full duplex)", "1000bt-fd": "1Gbit/s (full duplex)", "autonegotiation": "Auto-negotiation"}}]}, {"id": "pci:2", "class": "bridge", "claimed": true, "handle": "PCIBUS:0000:01", "description": "PCI bridge", "product": "NM10/ICH7 Family PCI Express Port 3", "vendor": "Intel Corporation", "physid": "1c.2", "businfo": "pci@0000:00:1c.2", "version": "01", "width": 32, "clock": 33000000, "configuration": {"driver": "pcieport"}, "capabilities": {"pci": true, "pciexpress": "PCI Express", "msi": "Message Signalled Interrupts", "pm": "Power Management", "normal_decode": true, "bus_master": "bus mastering", "cap_list": "PCI capabilities listing"}, "children": [{"id": "network", "class": "network", "disabled": true, "claimed": true, "handle": "PCI:0000:01:00.0", "description": "Wireless interface", "product": "AR242x / AR542x Wireless Network Adapter (PCI-Express)", "vendor": "Qualcomm Atheros", "physid": "0", "businfo": "pci@0000:01:00.0", "logicalname": "wlan0", "version": "01", "serial": "00:15:af:19:87:55", "width": 64, "clock": 33000000, "configuration": {"broadcast": "yes", "driver": "ath5k", "driverversion": "5.10.0-13-amd64", "firmware": "N/A", "latency": "0", "link": "no", "multicast": "yes", "wireless": "IEEE 802.11"}, "capabilities": {"pm": "Power Management", "msi": "Message Signalled Interrupts", "pciexpress": "PCI Express", "msix": "MSI-X", "bus_master": "bus mastering", "cap_list": "PCI capabilities listing", "ethernet": true, "physical": "Physical interface", "wireless": "Wireless-LAN"}}]}, {"id": "usb:0", "class": "bus", "claimed": true, "handle": "PCI:0000:00:1d.0", "description": "USB controller", "product": "NM10/ICH7 Family USB UHCI Controller #1", "vendor": "Intel Corporation", "physid": "1d", "businfo": "pci@0000:00:1d.0", "version": "01", "width": 32, "clock": 33000000, "configuration": {"driver": "uhci_hcd", "latency": "0"}, "capabilities": {"uhci": "Universal Host Controller Interface (USB1)", "bus_master": "bus mastering"}, "children": [{"id": "usbhost", "class": "bus", "claimed": true, "handle": "USB:1:1", "product": "UHCI Host Controller", "vendor": "Linux 5.10.0-13-amd64 uhci_hcd", "physid": "1", "businfo": "usb@1", "logicalname": "usb1", "version": "5.10", "configuration": {"driver": "hub", "slots": "2", "speed": "12Mbit/s"}, "capabilities": {"usb-1.10": "USB 1.1"}, "children": [{"id": "usb", "class": "input", "claimed": true, "handle": "USB:1:2", "description": "Keyboard", "product": "Razer Razer Huntsman Mini Consumer Control", "vendor": "Razer", "physid": "2", "businfo": "usb@1:2", "logicalname": ["input3", "/dev/input/event2", "input3::capslock", "input3::numlock", "input3::scrolllock", "input4", "/dev/input/event3", "input4::capslock", "input4::numlock", "input4::scrolllock", "input5", "/dev/input/event4", "input6", "/dev/input/event5", "input7", "/dev/input/event6", "input8", "/dev/input/event7", "/dev/input/mouse0", "input9", "/dev/input/event8"], "version": "2.00", "serial": "00000000001A", "configuration": {"driver": "usbhid", "maxpower": "500mA", "speed": "12Mbit/s"}, "capabilities": {"usb-2.00": "USB 2.0", "usb": "USB"}}]}]}, {"id": "usb:1", "class": "bus", "claimed": true, "handle": "PCI:0000:00:1d.1", "description": "USB controller", "product": "NM10/ICH7 Family USB UHCI Controller #2", "vendor": "Intel Corporation", "physid": "1d.1", "businfo": "pci@0000:00:1d.1", "version": "01", "width": 32, "clock": 33000000, "configuration": {"driver": "uhci_hcd", "latency": "0"}, "capabilities": {"uhci": "Universal Host Controller Interface (USB1)", "bus_master": "bus mastering"}, "children": [{"id": "usbhost", "class": "bus", "claimed": true, "handle": "USB:3:1", "product": "UHCI Host Controller", "vendor": "Linux 5.10.0-13-amd64 uhci_hcd", "physid": "1", "businfo": "usb@3", "logicalname": "usb3", "version": "5.10", "configuration": {"driver": "hub", "slots": "2", "speed": "12Mbit/s"}, "capabilities": {"usb-1.10": "USB 1.1"}}]}, {"id": "usb:2", "class": "bus", "claimed": true, "handle": "PCI:0000:00:1d.2", "description": "USB controller", "product": "NM10/ICH7 Family USB UHCI Controller #3", "vendor": "Intel Corporation", "physid": "1d.2", "businfo": "pci@0000:00:1d.2", "version": "01", "width": 32, "clock": 33000000, "configuration": {"driver": "uhci_hcd", "latency": "0"}, "capabilities": {"uhci": "Universal Host Controller Interface (USB1)", "bus_master": "bus mastering"}, "children": [{"id": "usbhost", "class": "bus", "claimed": true, "handle": "USB:4:1", "product": "UHCI Host Controller", "vendor": "Linux 5.10.0-13-amd64 uhci_hcd", "physid": "1", "businfo": "usb@4", "logicalname": "usb4", "version": "5.10", "configuration": {"driver": "hub", "slots": "2", "speed": "12Mbit/s"}, "capabilities": {"usb-1.10": "USB 1.1"}}]}, {"id": "usb:3", "class": "bus", "claimed": true, "handle": "PCI:0000:00:1d.3", "description": "USB controller", "product": "NM10/ICH7 Family USB UHCI Controller #4", "vendor": "Intel Corporation", "physid": "1d.3", "businfo": "pci@0000:00:1d.3", "version": "01", "width": 32, "clock": 33000000, "configuration": {"driver": "uhci_hcd", "latency": "0"}, "capabilities": {"uhci": "Universal Host Controller Interface (USB1)", "bus_master": "bus mastering"}, "children": [{"id": "usbhost", "class": "bus", "claimed": true, "handle": "USB:5:1", "product": "UHCI Host Controller", "vendor": "Linux 5.10.0-13-amd64 uhci_hcd", "physid": "1", "businfo": "usb@5", "logicalname": "usb5", "version": "5.10", "configuration": {"driver": "hub", "slots": "2", "speed": "12Mbit/s"}, "capabilities": {"usb-1.10": "USB 1.1"}}]}, {"id": "usb:4", "class": "bus", "claimed": true, "handle": "PCI:0000:00:1d.7", "description": "USB controller", "product": "NM10/ICH7 Family USB2 EHCI Controller", "vendor": "Intel Corporation", "physid": "1d.7", "businfo": "pci@0000:00:1d.7", "version": "01", "width": 32, "clock": 33000000, "configuration": {"driver": "ehci-pci", "latency": "0"}, "capabilities": {"pm": "Power Management", "debug": "Debug port", "ehci": "Enhanced Host Controller Interface (USB2)", "bus_master": "bus mastering", "cap_list": "PCI capabilities listing"}, "children": [{"id": "usbhost", "class": "bus", "claimed": true, "handle": "USB:2:1", "product": "EHCI Host Controller", "vendor": "Linux 5.10.0-13-amd64 ehci_hcd", "physid": "1", "businfo": "usb@2", "logicalname": "usb2", "version": "5.10", "configuration": {"driver": "hub", "slots": "8", "speed": "480Mbit/s"}, "capabilities": {"usb-2.00": "USB 2.0"}, "children": [{"id": "usb", "class": "storage", "claimed": true, "handle": "USB:2:2", "description": "Mass storage device", "product": "Mass Storage Device", "vendor": "JetFlash", "physid": "1", "businfo": "usb@2:1", "logicalname": "scsi4", "version": "11.00", "serial": "975NFSQ5RYYWZYQF", "configuration": {"driver": "usb-storage", "maxpower": "500mA", "speed": "480Mbit/s"}, "capabilities": {"usb-2.00": "USB 2.0", "scsi": "SCSI", "emulated": "Emulated device"}, "children": [{"id": "disk", "class": "disk", "claimed": true, "handle": "SCSI:04:00:00:00", "description": "SCSI Disk", "product": "Transcend 2GB", "vendor": "JetFlash", "physid": "0.0.0", "businfo": "scsi@4:0.0.0", "logicalname": "/dev/sdb", "dev": "8:16", "version": "1100", "serial": "AA00000000000485", "units": "bytes", "size": 2013265920, "configuration": {"ansiversion": "4", "logicalsectorsize": "512", "sectorsize": "512"}, "capabilities": {"removable": "support is removable"}, "children": [{"id": "medium", "class": "disk", "claimed": true, "physid": "0", "logicalname": "/dev/sdb", "dev": "8:16", "units": "bytes", "size": 2013265920, "configuration": {"signature": "528cd03d"}, "capabilities": {"partitioned": "Partitioned disk", "partitioned:dos": "MS-DOS partition table"}, "children": [{"id": "volume", "class": "volume", "claimed": true, "description": "Windows FAT volume", "vendor": "mkfs.fat", "physid": "2", "logicalname": "/dev/sdb2", "dev": "8:18", "version": "FAT16", "serial": "31d5-6be2", "size": 18446744073709549568, "configuration": {"FATs": "2", "filesystem": "fat"}, "capabilities": {"primary": "Primary partition", "boot": "Contains boot code", "fat": "Windows FAT", "initialized": "initialized volume"}}]}]}]}]}]}, {"id": "pci:3", "class": "bridge", "claimed": true, "handle": "PCIBUS:0000:04", "description": "PCI bridge", "product": "82801 PCI Bridge", "vendor": "Intel Corporation", "physid": "1e", "businfo": "pci@0000:00:1e.0", "version": "e1", "width": 32, "clock": 33000000, "capabilities": {"pci": true, "subtractive_decode": true, "bus_master": "bus mastering", "cap_list": "PCI capabilities listing"}}, {"id": "isa", "class": "bridge", "claimed": true, "handle": "PCI:0000:00:1f.0", "description": "ISA bridge", "product": "82801GB/GR (ICH7 Family) LPC Interface Bridge", "vendor": "Intel Corporation", "physid": "1f", "businfo": "pci@0000:00:1f.0", "version": "01", "width": 32, "clock": 33000000, "configuration": {"driver": "lpc_ich", "latency": "0"}, "capabilities": {"isa": true, "bus_master": "bus mastering", "cap_list": "PCI capabilities listing"}, "children": [{"id": "pnp00:00", "class": "system", "claimed": true, "product": "PnP device PNP0c01", "physid": "0", "configuration": {"driver": "system"}, "capabilities": {"pnp": true}}, {"id": "pnp00:01", "class": "system", "claimed": true, "product": "PnP device PNP0b00", "physid": "1", "configuration": {"driver": "rtc_cmos"}, "capabilities": {"pnp": true}}, {"id": "pnp00:02", "class": "storage", "claimed": true, "product": "PnP device PNP0700", "physid": "2", "capabilities": {"pnp": true}}, {"id": "pnp00:03", "class": "printer", "claimed": true, "product": "PnP device PNP0401", "physid": "3", "configuration": {"driver": "parport_pc"}, "capabilities": {"pnp": true}}, {"id": "pnp00:04", "class": "system", "claimed": true, "product": "PnP device PNP0c02", "physid": "4", "configuration": {"driver": "system"}, "capabilities": {"pnp": true}}, {"id": "pnp00:05", "class": "system", "claimed": true, "product": "PnP device PNP0c02", "physid": "5", "configuration": {"driver": "system"}, "capabilities": {"pnp": true}}, {"id": "pnp00:06", "class": "system", "claimed": true, "product": "PnP device PNP0c02", "physid": "6", "configuration": {"driver": "system"}, "capabilities": {"pnp": true}}, {"id": "pnp00:07", "class": "system", "claimed": true, "product": "PnP device PNP0c02", "physid": "7", "configuration": {"driver": "system"}, "capabilities": {"pnp": true}}, {"id": "pnp00:08", "class": "input", "claimed": true, "product": "PnP device PNP0303", "physid": "8", "configuration": {"driver": "i8042 kbd"}, "capabilities": {"pnp": true}}, {"id": "pnp00:09", "class": "communication", "claimed": true, "product": "PnP device PNP0501", "physid": "9", "configuration": {"driver": "serial"}, "capabilities": {"pnp": true}}, {"id": "pnp00:0a", "class": "system", "claimed": true, "product": "PnP device PNP0c02", "physid": "a", "configuration": {"driver": "system"}, "capabilities": {"pnp": true}}, {"id": "pnp00:0b", "class": "system", "claimed": true, "product": "PnP device PNP0c01", "physid": "b", "configuration": {"driver": "system"}, "capabilities": {"pnp": true}}]}, {"id": "ide:0", "class": "storage", "claimed": true, "handle": "PCI:0000:00:1f.1", "description": "IDE interface", "product": "82801G (ICH7 Family) IDE Controller", "vendor": "Intel Corporation", "physid": "1f.1", "businfo": "pci@0000:00:1f.1", "logicalname": "scsi0", "version": "01", "width": 32, "clock": 33000000, "configuration": {"driver": "ata_piix", "latency": "0"}, "capabilities": {"ide": true, "isa_compat_mode": "ISA compatibility mode", "pci_native_mode": "PCI native mode", "bus_master": "bus mastering", "emulated": "Emulated device"}, "children": [{"id": "disk", "class": "disk", "claimed": true, "handle": "SCSI:00:00:00:00", "description": "ATA Disk", "product": "HDT722520DLAT80", "physid": "0.0.0", "businfo": "scsi@0:0.0.0", "logicalname": "/dev/sda", "dev": "8:0", "version": "A96A", "serial": "VD051GTF024B4L", "units": "bytes", "size": 200048565760, "configuration": {"ansiversion": "5", "logicalsectorsize": "512", "sectorsize": "512", "signature": "28eb28ea"}, "capabilities": {"partitioned": "Partitioned disk", "partitioned:dos": "MS-DOS partition table"}, "children": [{"id": "volume:0", "class": "volume", "claimed": true, "description": "Windows NTFS volume", "physid": "1", "businfo": "scsi@0:0.0.0,1", "logicalname": "/dev/sda1", "dev": "8:1", "version": "3.1", "serial": "b47c-f237", "size": 103808512, "capacity": 104857600, "configuration": {"clustersize": "4096", "created": "2014-07-07 19:27:27", "filesystem": "ntfs", "label": "System-reserviert", "state": "clean"}, "capabilities": {"primary": "Primary partition", "bootable": "Bootable partition (active)", "ntfs": "Windows NTFS", "initialized": "initialized volume"}}, {"id": "volume:1", "class": "volume", "claimed": true, "description": "Windows NTFS volume", "physid": "2", "businfo": "scsi@0:0.0.0,2", "logicalname": "/dev/sda2", "dev": "8:2", "version": "3.1", "serial": "d0c9aeff-7206-fe4a-a410-bb3c076fdbdf", "size": 199936179712, "capacity": 199941423104, "configuration": {"clustersize": "4096", "created": "2014-07-07 19:27:42", "filesystem": "ntfs", "state": "clean"}, "capabilities": {"primary": "Primary partition", "ntfs": "Windows NTFS", "initialized": "initialized volume"}}]}, {"id": "cdrom", "class": "disk", "claimed": true, "handle": "SCSI:00:00:01:00", "description": "DVD writer", "product": "DVD-RW DVR-112D", "vendor": "PIONEER", "physid": "0.1.0", "businfo": "scsi@0:0.1.0", "logicalname": ["/dev/cdrom", "/dev/cdrw", "/dev/dvd", "/dev/dvdrw", "/dev/sr0"], "dev": "11:0", "version": "1.21", "configuration": {"ansiversion": "5", "status": "nodisc"}, "capabilities": {"removable": "support is removable", "audio": "Audio CD playback", "cd-r": "CD-R burning", "cd-rw": "CD-RW burning", "dvd": "DVD playback", "dvd-r": "DVD-R burning"}}]}, {"id": "ide:1", "class": "storage", "claimed": true, "handle": "PCI:0000:00:1f.2", "description": "IDE interface", "product": "NM10/ICH7 Family SATA Controller [IDE mode]", "vendor": "Intel Corporation", "physid": "1f.2", "businfo": "pci@0000:00:1f.2", "version": "01", "width": 32, "clock": 66000000, "configuration": {"driver": "ata_piix", "latency": "0"}, "capabilities": {"ide": true, "pm": "Power Management", "isa_compat_mode": "ISA compatibility mode", "pci_native_mode": "PCI native mode", "bus_master": "bus mastering", "cap_list": "PCI capabilities listing"}}, {"id": "serial", "class": "bus", "claimed": true, "handle": "PCI:0000:00:1f.3", "description": "SMBus", "product": "NM10/ICH7 Family SMBus Controller", "vendor": "Intel Corporation", "physid": "1f.3", "businfo": "pci@0000:00:1f.3", "version": "01", "width": 32, "clock": 33000000, "configuration": {"driver": "i801_smbus", "latency": "0"}}]}]}, {"id": "input:0", "class": "input", "claimed": true, "product": "Power Button", "physid": "1", "logicalname": ["input1", "/dev/input/event0"], "capabilities": {"platform": true}}, {"id": "input:1", "class": "input", "claimed": true, "product": "PC Speaker", "physid": "2", "logicalname": ["input10", "/dev/input/event9"], "capabilities": {"isa": "ISA bus"}}, {"id": "input:2", "class": "input", "claimed": true, "product": "Power Button", "physid": "3", "logicalname": ["input2", "/dev/input/event1"], "capabilities": {"platform": true}}]}, "dmidecode": "# dmidecode 3.3\nGetting SMBIOS data from sysfs.\nSMBIOS 2.4 present.\n49 structures occupying 1868 bytes.\nTable at 0x000F0680.\n\nHandle 0x0000, DMI type 0, 24 bytes\nBIOS Information\n\tVendor: American Megatrends Inc.\n\tVersion: 0604 \n\tRelease Date: 05/06/2007\n\tAddress: 0xF0000\n\tRuntime Size: 64 kB\n\tROM Size: 512 kB\n\tCharacteristics:\n\t\tISA is supported\n\t\tPCI is supported\n\t\tPNP is supported\n\t\tAPM is supported\n\t\tBIOS is upgradeable\n\t\tBIOS shadowing is allowed\n\t\tESCD support is available\n\t\tBoot from CD is supported\n\t\tSelectable boot is supported\n\t\tBIOS ROM is socketed\n\t\tEDD is supported\n\t\t5.25\"/1.2 MB floppy services are supported (int 13h)\n\t\t3.5\"/720 kB floppy services are supported (int 13h)\n\t\t3.5\"/2.88 MB floppy services are supported (int 13h)\n\t\tPrint screen service is supported (int 5h)\n\t\t8042 keyboard services are supported (int 9h)\n\t\tSerial services are supported (int 14h)\n\t\tPrinter services are supported (int 17h)\n\t\tCGA/mono video services are supported (int 10h)\n\t\tACPI is supported\n\t\tUSB legacy is supported\n\t\tLS-120 boot is supported\n\t\tATAPI Zip drive boot is supported\n\t\tBIOS boot specification is supported\n\t\tTargeted content distribution is supported\n\tBIOS Revision: 8.12\n\nHandle 0x0001, DMI type 1, 27 bytes\nSystem Information\n\tManufacturer: System manufacturer\n\tProduct Name: System Product Name\n\tVersion: System Version\n\tSerial Number: System Serial Number\n\tUUID: 880913a7-74fe-d511-8893-24e75bf3a527\n\tWake-up Type: Power Switch\n\tSKU Number: To Be Filled By O.E.M.\n\tFamily: To Be Filled By O.E.M.\n\nHandle 0x0002, DMI type 2, 15 bytes\nBase Board Information\n\tManufacturer: ASUSTeK Computer INC.\n\tProduct Name: P5B-MX/WiFi-AP\n\tVersion: x.xx\n\tSerial Number: MB-1234567890\n\tAsset Tag: To Be Filled By O.E.M.\n\tFeatures:\n\t\tBoard is a hosting board\n\t\tBoard is replaceable\n\tLocation In Chassis: To Be Filled By O.E.M.\n\tChassis Handle: 0x0003\n\tType: Motherboard\n\tContained Object Handles: 0\n\nHandle 0x0003, DMI type 3, 21 bytes\nChassis Information\n\tManufacturer: Chassis Manufacture\n\tType: Desktop\n\tLock: Not Present\n\tVersion: Chassis Version\n\tSerial Number: Chassis Serial Number\n\tAsset Tag: Asset-1234567890\n\tBoot-up State: Safe\n\tPower Supply State: Safe\n\tThermal State: Safe\n\tSecurity Status: None\n\tOEM Information: 0x00000002\n\tHeight: Unspecified\n\tNumber Of Power Cords: 1\n\tContained Elements: 0\n\nHandle 0x0004, DMI type 4, 35 bytes\nProcessor Information\n\tSocket Designation: Socket 775\n\tType: Central Processor\n\tFamily: Other\n\tManufacturer: Intel \n\tID: F6 06 00 00 FF FB EB BF\n\tSignature: Type 0, Family 6, Model 15, Stepping 6\n\tFlags:\n\t\tFPU (Floating-point unit on-chip)\n\t\tVME (Virtual mode extension)\n\t\tDE (Debugging extension)\n\t\tPSE (Page size extension)\n\t\tTSC (Time stamp counter)\n\t\tMSR (Model specific registers)\n\t\tPAE (Physical address extension)\n\t\tMCE (Machine check exception)\n\t\tCX8 (CMPXCHG8 instruction supported)\n\t\tAPIC (On-chip APIC hardware supported)\n\t\tSEP (Fast system call)\n\t\tMTRR (Memory type range registers)\n\t\tPGE (Page global enable)\n\t\tMCA (Machine check architecture)\n\t\tCMOV (Conditional move instruction supported)\n\t\tPAT (Page attribute table)\n\t\tPSE-36 (36-bit page size extension)\n\t\tCLFSH (CLFLUSH instruction supported)\n\t\tDS (Debug store)\n\t\tACPI (ACPI supported)\n\t\tMMX (MMX technology supported)\n\t\tFXSR (FXSAVE and FXSTOR instructions supported)\n\t\tSSE (Streaming SIMD extensions)\n\t\tSSE2 (Streaming SIMD extensions 2)\n\t\tSS (Self-snoop)\n\t\tHTT (Multi-threading)\n\t\tTM (Thermal monitor supported)\n\t\tPBE (Pending break enabled)\n\tVersion: Intel(R) Core(TM)2 CPU 6420 @ 2.13GHz \n\tVoltage: 1.3 V\n\tExternal Clock: 266 MHz\n\tMax Speed: 3800 MHz\n\tCurrent Speed: 2133 MHz\n\tStatus: Populated, Enabled\n\tUpgrade: Socket LGA775\n\tL1 Cache Handle: 0x0005\n\tL2 Cache Handle: 0x0006\n\tL3 Cache Handle: 0x0007\n\tSerial Number: To Be Filled By O.E.M.\n\tAsset Tag: To Be Filled By O.E.M.\n\tPart Number: To Be Filled By O.E.M.\n\nHandle 0x0005, DMI type 7, 19 bytes\nCache Information\n\tSocket Designation: L1-Cache\n\tConfiguration: Enabled, Not Socketed, Level 1\n\tOperational Mode: Write Back\n\tLocation: Internal\n\tInstalled Size: 64 kB\n\tMaximum Size: 64 kB\n\tSupported SRAM Types:\n\t\tOther\n\tInstalled SRAM Type: Other\n\tSpeed: Unknown\n\tError Correction Type: Parity\n\tSystem Type: Data\n\tAssociativity: 8-way Set-associative\n\nHandle 0x0006, DMI type 7, 19 bytes\nCache Information\n\tSocket Designation: L2-Cache\n\tConfiguration: Enabled, Not Socketed, Level 2\n\tOperational Mode: Write Back\n\tLocation: Internal\n\tInstalled Size: 4 MB\n\tMaximum Size: 4 MB\n\tSupported SRAM Types:\n\t\tOther\n\tInstalled SRAM Type: Other\n\tSpeed: Unknown\n\tError Correction Type: Single-bit ECC\n\tSystem Type: Instruction\n\tAssociativity: 8-way Set-associative\n\nHandle 0x0007, DMI type 7, 19 bytes\nCache Information\n\tSocket Designation: L3-Cache\n\tConfiguration: Disabled, Not Socketed, Level 3\n\tOperational Mode: Unknown\n\tLocation: Internal\n\tInstalled Size: 0 kB\n\tMaximum Size: 0 kB\n\tSupported SRAM Types:\n\t\tUnknown\n\tInstalled SRAM Type: Unknown\n\tSpeed: Unknown\n\tError Correction Type: Unknown\n\tSystem Type: Unknown\n\tAssociativity: Unknown\n\nHandle 0x0008, DMI type 5, 20 bytes\nMemory Controller Information\n\tError Detecting Method: 64-bit ECC\n\tError Correcting Capabilities:\n\t\tNone\n\tSupported Interleave: One-way Interleave\n\tCurrent Interleave: One-way Interleave\n\tMaximum Memory Module Size: 2048 MB\n\tMaximum Total Memory Size: 4096 MB\n\tSupported Speeds:\n\t\tOther\n\tSupported Memory Types:\n\t\tDIMM\n\t\tSDRAM\n\tMemory Module Voltage: 3.3 V\n\tAssociated Memory Slots: 2\n\t\t0x0009\n\t\t0x000A\n\tEnabled Error Correcting Capabilities:\n\t\tNone\n\nHandle 0x0009, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: PS/2 Mouse\n\tInternal Connector Type: None\n\tExternal Reference Designator: PS/2 Mouse\n\tExternal Connector Type: PS/2\n\tPort Type: Mouse Port\n\nHandle 0x000A, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: Keyboard\n\tInternal Connector Type: None\n\tExternal Reference Designator: PS/2 Keyboard\n\tExternal Connector Type: PS/2\n\tPort Type: Keyboard Port\n\nHandle 0x000B, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: USB1\n\tInternal Connector Type: None\n\tExternal Reference Designator: USB1\n\tExternal Connector Type: Access Bus (USB)\n\tPort Type: USB\n\nHandle 0x000C, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: USB2\n\tInternal Connector Type: None\n\tExternal Reference Designator: USB2\n\tExternal Connector Type: Access Bus (USB)\n\tPort Type: USB\n\nHandle 0x000D, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: USB3\n\tInternal Connector Type: None\n\tExternal Reference Designator: USB3\n\tExternal Connector Type: Access Bus (USB)\n\tPort Type: USB\n\nHandle 0x000E, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: USB4\n\tInternal Connector Type: None\n\tExternal Reference Designator: USB4\n\tExternal Connector Type: Access Bus (USB)\n\tPort Type: USB\n\nHandle 0x000F, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: USB5\n\tInternal Connector Type: None\n\tExternal Reference Designator: USB5\n\tExternal Connector Type: Access Bus (USB)\n\tPort Type: USB\n\nHandle 0x0010, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: USB6\n\tInternal Connector Type: None\n\tExternal Reference Designator: USB6\n\tExternal Connector Type: Access Bus (USB)\n\tPort Type: USB\n\nHandle 0x0011, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: COM 1\n\tInternal Connector Type: None\n\tExternal Reference Designator: COM 1\n\tExternal Connector Type: DB-9 male\n\tPort Type: Serial Port 16550A Compatible\n\nHandle 0x0012, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: Audio Line Out1\n\tInternal Connector Type: None\n\tExternal Reference Designator: Audio Line Out1\n\tExternal Connector Type: Mini Jack (headphones)\n\tPort Type: Audio Port\n\nHandle 0x0013, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: Audio Line Out2\n\tInternal Connector Type: None\n\tExternal Reference Designator: Audio Line Out2\n\tExternal Connector Type: Mini Jack (headphones)\n\tPort Type: Audio Port\n\nHandle 0x0014, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: Audio Line Out3\n\tInternal Connector Type: None\n\tExternal Reference Designator: Audio Line Out3\n\tExternal Connector Type: Mini Jack (headphones)\n\tPort Type: Audio Port\n\nHandle 0x0015, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: SPDIF_OUT\n\tInternal Connector Type: None\n\tExternal Reference Designator: SPDIF_OUT\n\tExternal Connector Type: On Board Sound Input From CD-ROM\n\tPort Type: Audio Port\n\nHandle 0x0016, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: GbE LAN 1\n\tInternal Connector Type: None\n\tExternal Reference Designator: GbE LAN 1\n\tExternal Connector Type: RJ-45\n\tPort Type: Network Port\n\nHandle 0x0017, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: SB_SATA1\n\tInternal Connector Type: On Board IDE\n\tExternal Reference Designator: Not Specified\n\tExternal Connector Type: None\n\tPort Type: Other\n\nHandle 0x0018, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: SB_SATA2\n\tInternal Connector Type: On Board IDE\n\tExternal Reference Designator: Not Specified\n\tExternal Connector Type: None\n\tPort Type: Other\n\nHandle 0x0019, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: SB_SATA3\n\tInternal Connector Type: On Board IDE\n\tExternal Reference Designator: Not Specified\n\tExternal Connector Type: None\n\tPort Type: Other\n\nHandle 0x001A, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: SB_SATA4\n\tInternal Connector Type: On Board IDE\n\tExternal Reference Designator: Not Specified\n\tExternal Connector Type: None\n\tPort Type: Other\n\nHandle 0x001B, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: CHA_FAN1\n\tInternal Connector Type: Other\n\tExternal Reference Designator: Not Specified\n\tExternal Connector Type: None\n\tPort Type: Other\n\nHandle 0x001C, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: CD\n\tInternal Connector Type: On Board Sound Input From CD-ROM\n\tExternal Reference Designator: Not Specified\n\tExternal Connector Type: None\n\tPort Type: Audio Port\n\nHandle 0x001D, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: FP_AUDIO\n\tInternal Connector Type: On Board Sound Input From CD-ROM\n\tExternal Reference Designator: Not Specified\n\tExternal Connector Type: None\n\tPort Type: Audio Port\n\nHandle 0x001E, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: FLOPPY\n\tInternal Connector Type: On Board Floppy\n\tExternal Reference Designator: Not Specified\n\tExternal Connector Type: None\n\tPort Type: Other\n\nHandle 0x001F, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: CPU_FAN\n\tInternal Connector Type: Other\n\tExternal Reference Designator: Not Specified\n\tExternal Connector Type: None\n\tPort Type: Other\n\nHandle 0x0020, DMI type 9, 13 bytes\nSystem Slot Information\n\tDesignation: PCIEX16\n\tType: x16 PCI Express\n\tCurrent Usage: Available\n\tLength: Short\n\tID: 1\n\tCharacteristics:\n\t\t3.3 V is provided\n\t\tOpening is shared\n\t\tPME signal is supported\n\nHandle 0x0021, DMI type 9, 13 bytes\nSystem Slot Information\n\tDesignation: PCI_1\n\tType: 32-bit PCI\n\tCurrent Usage: Available\n\tLength: Short\n\tID: 2\n\tCharacteristics:\n\t\t3.3 V is provided\n\t\tOpening is shared\n\t\tPME signal is supported\n\nHandle 0x0022, DMI type 9, 13 bytes\nSystem Slot Information\n\tDesignation: PCI_2\n\tType: 32-bit PCI\n\tCurrent Usage: Available\n\tLength: Short\n\tID: 3\n\tCharacteristics:\n\t\t3.3 V is provided\n\t\tOpening is shared\n\t\tPME signal is supported\n\nHandle 0x0023, DMI type 9, 13 bytes\nSystem Slot Information\n\tDesignation: PCIEX1_1\n\tType: x1 PCI Express\n\tCurrent Usage: Available\n\tLength: Short\n\tID: 4\n\tCharacteristics:\n\t\t3.3 V is provided\n\t\tOpening is shared\n\t\tPME signal is supported\n\nHandle 0x0024, DMI type 9, 13 bytes\nSystem Slot Information\n\tDesignation: PCIEX1_2\n\tType: x1 PCI Express\n\tCurrent Usage: In Use\n\tLength: Short\n\tID: 5\n\tCharacteristics:\n\t\t3.3 V is provided\n\t\tOpening is shared\n\t\tPME signal is supported\n\nHandle 0x0025, DMI type 10, 6 bytes\nOn Board Device Information\n\tType: Ethernet\n\tStatus: Enabled\n\tDescription: Onboard Ethernet\n\nHandle 0x0026, DMI type 11, 5 bytes\nOEM Strings\n\tString 1: To Be Filled By O.E.M.\n\tString 2: To Be Filled By O.E.M.\n\tString 3: To Be Filled By O.E.M.\n\tString 4: To Be Filled By O.E.M.\n\nHandle 0x0027, DMI type 13, 22 bytes\nBIOS Language Information\n\tLanguage Description Format: Abbreviated\n\tInstallable Languages: 1\n\t\ten|US|iso8859-1\n\tCurrently Installed Language: en|US|iso8859-1\n\nHandle 0x0028, DMI type 15, 35 bytes\nSystem Event Log\n\tArea Length: 4 bytes\n\tHeader Start Offset: 0x0000\n\tHeader Length: 2 bytes\n\tData Start Offset: 0x0002\n\tAccess Method: Indexed I/O, one 16-bit index port, one 8-bit data port\n\tAccess Address: Index 0x046A, Data 0x046C\n\tStatus: Invalid, Not Full\n\tChange Token: 0x00000000\n\tHeader Format: No Header\n\tSupported Log Type Descriptors: 6\n\tDescriptor 1: End of log\n\tData Format 1: OEM-specific\n\tDescriptor 2: End of log\n\tData Format 2: OEM-specific\n\tDescriptor 3: End of log\n\tData Format 3: OEM-specific\n\tDescriptor 4: End of log\n\tData Format 4: OEM-specific\n\tDescriptor 5: End of log\n\tData Format 5: OEM-specific\n\tDescriptor 6: End of log\n\tData Format 6: OEM-specific\n\nHandle 0x0029, DMI type 16, 15 bytes\nPhysical Memory Array\n\tLocation: System Board Or Motherboard\n\tUse: System Memory\n\tError Correction Type: None\n\tMaximum Capacity: 4 GB\n\tError Information Handle: Not Provided\n\tNumber Of Devices: 2\n\nHandle 0x002A, DMI type 19, 15 bytes\nMemory Array Mapped Address\n\tStarting Address: 0x00000000000\n\tEnding Address: 0x0009FFFFFFF\n\tRange Size: 2560 MB\n\tPhysical Array Handle: 0x0029\n\tPartition Width: 4\n\nHandle 0x002B, DMI type 17, 27 bytes\nMemory Device\n\tArray Handle: 0x0029\n\tError Information Handle: Not Provided\n\tTotal Width: 64 bits\n\tData Width: 64 bits\n\tSize: 2 GB\n\tForm Factor: DIMM\n\tSet: None\n\tLocator: DIMM A1\n\tBank Locator: BANK0\n\tType: DDR2\n\tType Detail: Synchronous\n\tSpeed: 667 MT/s\n\tManufacturer: Manufacturer0\n\tSerial Number: SerNum0\n\tAsset Tag: AssetTagNum0\n\tPart Number: PartNum0\n\nHandle 0x002C, DMI type 126, 19 bytes\nInactive\n\nHandle 0x002D, DMI type 17, 27 bytes\nMemory Device\n\tArray Handle: 0x0029\n\tError Information Handle: Not Provided\n\tTotal Width: 64 bits\n\tData Width: 64 bits\n\tSize: 512 MB\n\tForm Factor: DIMM\n\tSet: None\n\tLocator: DIMM B1\n\tBank Locator: BANK1\n\tType: DDR2\n\tType Detail: Synchronous\n\tSpeed: 667 MT/s\n\tManufacturer: Manufacturer1\n\tSerial Number: SerNum1\n\tAsset Tag: AssetTagNum1\n\tPart Number: PartNum1\n\nHandle 0x002E, DMI type 126, 19 bytes\nInactive\n\nHandle 0x002F, DMI type 32, 20 bytes\nSystem Boot Information\n\tStatus: No errors detected\n\nHandle 0x0030, DMI type 127, 4 bytes\nEnd Of Table\n\n", "lspci": "00:00.0 Host bridge: Intel Corporation 82946GZ/PL/GL Memory Controller Hub (rev 02)\n\tSubsystem: ASUSTeK Computer Inc. P5B-MX/WiFi-AP\n\tControl: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-\n\tStatus: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- SERR- \n\n00:02.0 VGA compatible controller: Intel Corporation 82946GZ/GL Integrated Graphics Controller (rev 02) (prog-if 00 [VGA controller])\n\tSubsystem: ASUSTeK Computer Inc. P5B-MX/WiFi-AP\n\tControl: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-\n\tStatus: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- Reset- FastB2B-\n\t\tPriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-\n\tCapabilities: [40] Express (v1) Root Port (Slot+), MSI 00\n\t\tDevCap:\tMaxPayload 128 bytes, PhantFunc 0\n\t\t\tExtTag- RBE-\n\t\tDevCtl:\tCorrErr- NonFatalErr- FatalErr- UnsupReq-\n\t\t\tRlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-\n\t\t\tMaxPayload 128 bytes, MaxReadReq 128 bytes\n\t\tDevSta:\tCorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-\n\t\tLnkCap:\tPort #1, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <1us, L1 <4us\n\t\t\tClockPM- Surprise- LLActRep+ BwNot- ASPMOptComp-\n\t\tLnkCtl:\tASPM Disabled; RCB 64 bytes, Disabled- CommClk-\n\t\t\tExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-\n\t\tLnkSta:\tSpeed 2.5GT/s (ok), Width x0 (downgraded)\n\t\t\tTrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-\n\t\tSltCap:\tAttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+\n\t\t\tSlot #4, PowerLimit 25.000W; Interlock- NoCompl-\n\t\tSltCtl:\tEnable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-\n\t\t\tControl: AttnInd Unknown, PwrInd Unknown, Power- Interlock-\n\t\tSltSta:\tStatus: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-\n\t\t\tChanged: MRL- PresDet- LinkState-\n\t\tRootCap: CRSVisible-\n\t\tRootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-\n\t\tRootSta: PME ReqID 0000, PMEStatus- PMEPending-\n\tCapabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-\n\t\tAddress: 00000000 Data: 0000\n\tCapabilities: [90] Subsystem: ASUSTeK Computer Inc. NM10/ICH7 Family PCI Express Port 1\n\tCapabilities: [a0] Power Management version 2\n\t\tFlags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)\n\t\tStatus: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-\n\tCapabilities: [100 v1] Virtual Channel\n\t\tCaps:\tLPEVC=0 RefClk=100ns PATEntryBits=1\n\t\tArb:\tFixed+ WRR32- WRR64- WRR128-\n\t\tCtrl:\tArbSelect=Fixed\n\t\tStatus:\tInProgress-\n\t\tVC0:\tCaps:\tPATOffset=00 MaxTimeSlots=1 RejSnoopTrans-\n\t\t\tArb:\tFixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-\n\t\t\tCtrl:\tEnable+ ID=0 ArbSelect=Fixed TC/VC=01\n\t\t\tStatus:\tNegoPending- InProgress-\n\t\tVC1:\tCaps:\tPATOffset=00 MaxTimeSlots=1 RejSnoopTrans-\n\t\t\tArb:\tFixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-\n\t\t\tCtrl:\tEnable- ID=0 ArbSelect=Fixed TC/VC=00\n\t\t\tStatus:\tNegoPending- InProgress-\n\tCapabilities: [180 v1] Root Complex Link\n\t\tDesc:\tPortNumber=01 ComponentID=00 EltType=Config\n\t\tLink0:\tDesc:\tTargetPort=00 TargetComponent=00 AssocRCRB- LinkType=MemMapped LinkValid+\n\t\t\tAddr:\t00000000fed1c001\n\tKernel driver in use: pcieport\n\n00:1c.1 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 2 (rev 01) (prog-if 00 [Normal decode])\n\tControl: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-\n\tStatus: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- Reset- FastB2B-\n\t\tPriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-\n\tCapabilities: [40] Express (v1) Root Port (Slot+), MSI 00\n\t\tDevCap:\tMaxPayload 128 bytes, PhantFunc 0\n\t\t\tExtTag- RBE-\n\t\tDevCtl:\tCorrErr- NonFatalErr- FatalErr- UnsupReq-\n\t\t\tRlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-\n\t\t\tMaxPayload 128 bytes, MaxReadReq 128 bytes\n\t\tDevSta:\tCorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-\n\t\tLnkCap:\tPort #2, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <256ns, L1 <4us\n\t\t\tClockPM- Surprise- LLActRep+ BwNot- ASPMOptComp-\n\t\tLnkCtl:\tASPM Disabled; RCB 64 bytes, Disabled- CommClk+\n\t\t\tExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-\n\t\tLnkSta:\tSpeed 2.5GT/s (ok), Width x1 (ok)\n\t\t\tTrErr- Train- SlotClk+ DLActive+ BWMgmt- ABWMgmt-\n\t\tSltCap:\tAttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+\n\t\t\tSlot #0, PowerLimit 0.000W; Interlock- NoCompl-\n\t\tSltCtl:\tEnable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-\n\t\t\tControl: AttnInd Unknown, PwrInd Unknown, Power- Interlock-\n\t\tSltSta:\tStatus: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-\n\t\t\tChanged: MRL- PresDet+ LinkState+\n\t\tRootCap: CRSVisible-\n\t\tRootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-\n\t\tRootSta: PME ReqID 0000, PMEStatus- PMEPending-\n\tCapabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-\n\t\tAddress: 00000000 Data: 0000\n\tCapabilities: [90] Subsystem: ASUSTeK Computer Inc. NM10/ICH7 Family PCI Express Port 2\n\tCapabilities: [a0] Power Management version 2\n\t\tFlags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)\n\t\tStatus: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-\n\tCapabilities: [100 v1] Virtual Channel\n\t\tCaps:\tLPEVC=0 RefClk=100ns PATEntryBits=1\n\t\tArb:\tFixed+ WRR32- WRR64- WRR128-\n\t\tCtrl:\tArbSelect=Fixed\n\t\tStatus:\tInProgress-\n\t\tVC0:\tCaps:\tPATOffset=00 MaxTimeSlots=1 RejSnoopTrans-\n\t\t\tArb:\tFixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-\n\t\t\tCtrl:\tEnable+ ID=0 ArbSelect=Fixed TC/VC=01\n\t\t\tStatus:\tNegoPending- InProgress-\n\t\tVC1:\tCaps:\tPATOffset=00 MaxTimeSlots=1 RejSnoopTrans-\n\t\t\tArb:\tFixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-\n\t\t\tCtrl:\tEnable- ID=0 ArbSelect=Fixed TC/VC=00\n\t\t\tStatus:\tNegoPending- InProgress-\n\tCapabilities: [180 v1] Root Complex Link\n\t\tDesc:\tPortNumber=02 ComponentID=00 EltType=Config\n\t\tLink0:\tDesc:\tTargetPort=00 TargetComponent=00 AssocRCRB- LinkType=MemMapped LinkValid+\n\t\t\tAddr:\t00000000fed1c001\n\tKernel driver in use: pcieport\n\n00:1c.2 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 3 (rev 01) (prog-if 00 [Normal decode])\n\tControl: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-\n\tStatus: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- Reset- FastB2B-\n\t\tPriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-\n\tCapabilities: [40] Express (v1) Root Port (Slot+), MSI 00\n\t\tDevCap:\tMaxPayload 128 bytes, PhantFunc 0\n\t\t\tExtTag- RBE-\n\t\tDevCtl:\tCorrErr- NonFatalErr- FatalErr- UnsupReq-\n\t\t\tRlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-\n\t\t\tMaxPayload 128 bytes, MaxReadReq 128 bytes\n\t\tDevSta:\tCorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-\n\t\tLnkCap:\tPort #3, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <256ns, L1 <4us\n\t\t\tClockPM- Surprise- LLActRep+ BwNot- ASPMOptComp-\n\t\tLnkCtl:\tASPM Disabled; RCB 64 bytes, Disabled- CommClk+\n\t\t\tExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-\n\t\tLnkSta:\tSpeed 2.5GT/s (ok), Width x1 (ok)\n\t\t\tTrErr- Train- SlotClk+ DLActive+ BWMgmt- ABWMgmt-\n\t\tSltCap:\tAttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+\n\t\t\tSlot #5, PowerLimit 10.000W; Interlock- NoCompl-\n\t\tSltCtl:\tEnable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-\n\t\t\tControl: AttnInd Unknown, PwrInd Unknown, Power- Interlock-\n\t\tSltSta:\tStatus: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-\n\t\t\tChanged: MRL- PresDet+ LinkState+\n\t\tRootCap: CRSVisible-\n\t\tRootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-\n\t\tRootSta: PME ReqID 0000, PMEStatus- PMEPending-\n\tCapabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-\n\t\tAddress: 00000000 Data: 0000\n\tCapabilities: [90] Subsystem: ASUSTeK Computer Inc. NM10/ICH7 Family PCI Express Port 3\n\tCapabilities: [a0] Power Management version 2\n\t\tFlags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)\n\t\tStatus: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-\n\tCapabilities: [100 v1] Virtual Channel\n\t\tCaps:\tLPEVC=0 RefClk=100ns PATEntryBits=1\n\t\tArb:\tFixed+ WRR32- WRR64- WRR128-\n\t\tCtrl:\tArbSelect=Fixed\n\t\tStatus:\tInProgress-\n\t\tVC0:\tCaps:\tPATOffset=00 MaxTimeSlots=1 RejSnoopTrans-\n\t\t\tArb:\tFixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-\n\t\t\tCtrl:\tEnable+ ID=0 ArbSelect=Fixed TC/VC=01\n\t\t\tStatus:\tNegoPending- InProgress-\n\t\tVC1:\tCaps:\tPATOffset=00 MaxTimeSlots=1 RejSnoopTrans-\n\t\t\tArb:\tFixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-\n\t\t\tCtrl:\tEnable- ID=0 ArbSelect=Fixed TC/VC=00\n\t\t\tStatus:\tNegoPending- InProgress-\n\tCapabilities: [180 v1] Root Complex Link\n\t\tDesc:\tPortNumber=03 ComponentID=00 EltType=Config\n\t\tLink0:\tDesc:\tTargetPort=00 TargetComponent=00 AssocRCRB- LinkType=MemMapped LinkValid+\n\t\t\tAddr:\t00000000fed1c001\n\tKernel driver in use: pcieport\n\n00:1d.0 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #1 (rev 01) (prog-if 00 [UHCI])\n\tSubsystem: ASUSTeK Computer Inc. P5B-MX/WiFi-AP, P5KPL-VM, P5LD2-VM Mainboard\n\tControl: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-\n\tStatus: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- Reset- FastB2B-\n\t\tPriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-\n\tCapabilities: [50] Subsystem: ASUSTeK Computer Inc. 82801 PCI Bridge\n\n00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01)\n\tSubsystem: ASUSTeK Computer Inc. P5B-MX/WiFi-AP, P5KPL-VM Motherboard\n\tControl: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-\n\tStatus: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- \n\tKernel driver in use: lpc_ich\n\tKernel modules: intel_rng, lpc_ich, leds_ss4200\n\n00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01) (prog-if 8a [ISA Compatibility mode controller, supports both channels switched to PCI native mode, supports bus mastering])\n\tSubsystem: ASUSTeK Computer Inc. P5B-MX/WiFi-AP, P5KPL-VM Motherboard\n\tControl: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-\n\tStatus: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- Date: Mon, 18 Apr 2022 17:14:26 +0200 Subject: [PATCH 029/154] fix smartctl bugs --- ereuse_devicehub/parser/parser.py | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/ereuse_devicehub/parser/parser.py b/ereuse_devicehub/parser/parser.py index fc46d351..95a0e86d 100644 --- a/ereuse_devicehub/parser/parser.py +++ b/ereuse_devicehub/parser/parser.py @@ -120,7 +120,11 @@ class ParseSnapshot: def get_usb_num(self): return len( - [u for u in self.dmi.get("Port Connector") if u.get("Port Type") == "USB"] + [ + u + for u in self.dmi.get("Port Connector") + if "USB" in u.get("Port Type", "").upper() + ] ) def get_serial_num(self): @@ -128,7 +132,7 @@ class ParseSnapshot: [ u for u in self.dmi.get("Port Connector") - if u.get("Port Type") == "SERIAL" + if "SERIAL" in u.get("Port Type", "").upper() ] ) @@ -137,7 +141,7 @@ class ParseSnapshot: [ u for u in self.dmi.get("Port Connector") - if u.get("Port Type") == "PCMCIA" + if "PCMCIA" in u.get("Port Type", "").upper() ] ) @@ -461,6 +465,8 @@ class ParseSnapshotLsHw: def get_data_storage(self): for sm in self.smart: + if sm.get('smartctl', {}).get('exit_status') != 0: + continue model = sm.get('model_name') manufacturer = None if model and len(model.split(" ")) > 1: @@ -487,7 +493,7 @@ class ParseSnapshotLsHw: SSD = 'SolidStateDrive' HDD = 'HardDrive' type_dev = x.get('device', {}).get('type') - trim = x.get("trim", {}).get("supported") == "true" + trim = x.get('trim', {}).get("supported") in [True, "true"] return SSD if type_dev in SSDS or trim else HDD def get_data_storage_interface(self, x): @@ -503,15 +509,14 @@ class ParseSnapshotLsHw: return "ATA" def get_data_storage_size(self, x): - type_dev = x.get('device', {}).get('protocol', '').lower() - total_capacity = "{type}_total_capacity".format(type=type_dev) - if not x.get(total_capacity): + total_capacity = x.get('user_capacity', {}).get('bytes') + if not total_capacity: return 1 # convert bytes to Mb - return x.get(total_capacity) / 1024**2 + return total_capacity / 1024**2 def get_test_data_storage(self, smart): - log = "smart_health_information_log" + hours = smart.get("power_on_time", {}).get('hours', 0) action = { "status": "Completed without error", "reallocatedSectorCount": smart.get("reallocated_sector_count", 0), @@ -519,7 +524,8 @@ class ParseSnapshotLsHw: "assessment": True, "severity": "Info", "offlineUncorrectable": smart.get("offline_uncorrectable", 0), - "lifetime": 0, + "lifetime": hours, + "powerOnHours": hours, "type": "TestDataStorage", "length": "Short", "elapsed": 0, @@ -529,11 +535,6 @@ class ParseSnapshotLsHw: "powerCycleCount": smart.get("power_cycle_count", 0), } - for k in smart.keys(): - if log in k: - action['lifetime'] = smart[k].get("power_on_hours", 0) - action['powerOnHours'] = smart[k].get("power_on_hours", 0) - return action def errors(self, txt=None, severity=Severity.Info): From 5595d0ddcff5c02dc95ad79ba3f457fa8ae9348c Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 18 Apr 2022 17:20:07 +0200 Subject: [PATCH 030/154] fix Computer device in the list --- ereuse_devicehub/inventory/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ereuse_devicehub/inventory/forms.py b/ereuse_devicehub/inventory/forms.py index 517f9b3b..e594e50d 100644 --- a/ereuse_devicehub/inventory/forms.py +++ b/ereuse_devicehub/inventory/forms.py @@ -100,7 +100,7 @@ class FilterForm(FlaskForm): if self.device: return [self.device] - return ['Desktop', 'Laptop', 'Server'] + return ['Desktop', 'Laptop', 'Server', 'Computer'] class LotDeviceForm(FlaskForm): From 7f6cac0242e50f34b76e8416bc88faa132175328 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 18 Apr 2022 19:08:23 +0200 Subject: [PATCH 031/154] fix qemu test --- .../qemu-cc9927a9-55ad-4937-b36b-7185147d9fa9.json | 1 + tests/test_snapshot.py | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 tests/files/qemu-cc9927a9-55ad-4937-b36b-7185147d9fa9.json diff --git a/tests/files/qemu-cc9927a9-55ad-4937-b36b-7185147d9fa9.json b/tests/files/qemu-cc9927a9-55ad-4937-b36b-7185147d9fa9.json new file mode 100644 index 00000000..e799e166 --- /dev/null +++ b/tests/files/qemu-cc9927a9-55ad-4937-b36b-7185147d9fa9.json @@ -0,0 +1 @@ +{"timestamp": "2022-04-18T08:08:26.056178", "type": "Snapshot", "uuid": "cc9927a9-55ad-4937-b36b-7185147d9fa9", "wbid": "VL0L5", "software": "Workbench", "version": "2022.03.3-alpha", "schema_api": "1.0.0", "data": {"lshw": {"id": "workbench-live", "class": "system", "claimed": true, "handle": "DMI:0100", "description": "Computer", "product": "Standard PC (i440FX + PIIX, 1996)", "vendor": "QEMU", "version": "pc-i440fx-5.2", "width": 64, "configuration": {"boot": "normal"}, "capabilities": {"smbios-2.8": "SMBIOS version 2.8", "dmi-2.8": "DMI version 2.8", "vsyscall32": "32-bit processes"}, "children": [{"id": "core", "class": "bus", "claimed": true, "description": "Motherboard", "physid": "0", "children": [{"id": "firmware", "class": "memory", "claimed": true, "description": "BIOS", "vendor": "SeaBIOS", "physid": "0", "version": "?-20190711_202441-buildvm-armv7-10.arm.fedoraproject.org-2.fc31", "date": "04/01/2014", "units": "bytes", "size": 98304}, {"id": "cpu", "class": "processor", "claimed": true, "handle": "DMI:0400", "description": "CPU", "product": "QEMU Virtual CPU version 2.5+", "vendor": "Advanced Micro Devices [AMD]", "physid": "400", "businfo": "cpu@0", "version": "6.6.3", "slot": "CPU 0", "units": "Hz", "size": 2000000000, "capacity": 2000000000, "width": 64, "configuration": {"cores": "1", "enabledcores": "1", "microcode": "16777317", "threads": "1"}, "capabilities": {"fpu": "mathematical co-processor", "fpu_exception": "FPU exceptions reporting", "wp": true, "de": "debugging extensions", "pse": "page size extensions", "tsc": "time stamp counter", "msr": "model-specific registers", "pae": "4GB+ memory addressing (Physical Address Extension)", "mce": "machine check exceptions", "cx8": "compare and exchange 8-byte", "apic": "on-chip advanced programmable interrupt controller (APIC)", "sep": "fast system calls", "mtrr": "memory type range registers", "pge": "page global enable", "mca": "machine check architecture", "cmov": "conditional move instruction", "pat": "page attribute table", "pse36": "36-bit page size extensions", "clflush": true, "mmx": "multimedia extensions (MMX)", "fxsr": "fast floating point save/restore", "sse": "streaming SIMD extensions (SSE)", "sse2": "streaming SIMD extensions (SSE2)", "syscall": "fast system calls", "nx": "no-execute bit (NX)", "x86-64": "64bits extensions (x86-64)", "nopl": true, "cpuid": true, "pni": true, "cx16": true, "hypervisor": true, "lahf_lm": true, "svm": true, "3dnowprefetch": true, "vmmcall": true}}, {"id": "memory", "class": "memory", "claimed": true, "handle": "DMI:1000", "description": "System Memory", "physid": "1000", "units": "bytes", "size": 1073741824, "capacity": 1073741824, "configuration": {"errordetection": "multi-bit-ecc"}, "capabilities": {"ecc": "Multi-bit error-correcting code (ECC)"}, "children": [{"id": "bank", "class": "memory", "claimed": true, "handle": "DMI:1100", "description": "DIMM RAM", "vendor": "QEMU", "physid": "0", "slot": "DIMM 0", "units": "bytes", "size": 1073741824}]}, {"id": "pci", "class": "bridge", "claimed": true, "handle": "PCIBUS:0000:00", "description": "Host bridge", "product": "440FX - 82441FX PMC [Natoma]", "vendor": "Intel Corporation", "physid": "100", "businfo": "pci@0000:00:00.0", "version": "02", "width": 32, "clock": 33000000, "children": [{"id": "isa", "class": "bridge", "claimed": true, "handle": "PCI:0000:00:01.0", "description": "ISA bridge", "product": "82371SB PIIX3 ISA [Natoma/Triton II]", "vendor": "Intel Corporation", "physid": "1", "businfo": "pci@0000:00:01.0", "version": "00", "width": 32, "clock": 33000000, "configuration": {"latency": "0"}, "capabilities": {"isa": true}, "children": [{"id": "pnp00:00", "class": "input", "claimed": true, "product": "PnP device PNP0303", "physid": "0", "configuration": {"driver": "i8042 kbd"}, "capabilities": {"pnp": true}}, {"id": "pnp00:01", "class": "input", "claimed": true, "product": "PnP device PNP0f13", "physid": "1", "configuration": {"driver": "i8042 aux"}, "capabilities": {"pnp": true}}, {"id": "pnp00:02", "class": "storage", "claimed": true, "product": "PnP device PNP0700", "physid": "2", "capabilities": {"pnp": true}}, {"id": "pnp00:03", "class": "printer", "claimed": true, "product": "PnP device PNP0400", "physid": "3", "configuration": {"driver": "parport_pc"}, "capabilities": {"pnp": true}}, {"id": "pnp00:04", "class": "communication", "claimed": true, "product": "PnP device PNP0501", "physid": "4", "configuration": {"driver": "serial"}, "capabilities": {"pnp": true}}, {"id": "pnp00:05", "class": "system", "claimed": true, "product": "PnP device PNP0b00", "physid": "5", "configuration": {"driver": "rtc_cmos"}, "capabilities": {"pnp": true}}]}, {"id": "ide", "class": "storage", "claimed": true, "handle": "PCI:0000:00:01.1", "description": "IDE interface", "product": "82371SB PIIX3 IDE [Natoma/Triton II]", "vendor": "Intel Corporation", "physid": "1.1", "businfo": "pci@0000:00:01.1", "logicalname": ["scsi0", "scsi1"], "version": "00", "width": 32, "clock": 33000000, "configuration": {"driver": "ata_piix", "latency": "0"}, "capabilities": {"ide": true, "isa_compat_mode": "ISA compatibility mode", "bus_master": "bus mastering", "emulated": "Emulated device"}, "children": [{"id": "disk", "class": "disk", "claimed": true, "handle": "SCSI:00:00:00:00", "description": "ATA Disk", "product": "QEMU HARDDISK", "physid": "0", "businfo": "scsi@0:0.0.0", "logicalname": "/dev/sda", "dev": "8:0", "version": "2.5+", "serial": "QM00001", "units": "bytes", "size": 42949673472, "configuration": {"ansiversion": "5", "logicalsectorsize": "512", "sectorsize": "512", "signature": "c338ebd4"}, "capabilities": {"partitioned": "Partitioned disk", "partitioned:dos": "MS-DOS partition table"}, "children": [{"id": "volume:0", "class": "volume", "claimed": true, "description": "EXT4 volume", "vendor": "Linux", "physid": "1", "businfo": "scsi@0:0.0.0,1", "logicalname": "/dev/sda1", "dev": "8:1", "version": "1.0", "serial": "666140b3-42b9-4940-8d82-7d894261231f", "size": 4293918720, "capacity": 4293918720, "configuration": {"created": "2020-09-18 18:01:52", "filesystem": "ext4", "lastmountpoint": "/", "modified": "2022-04-18 08:06:53", "mounted": "2022-04-18 08:06:53", "state": "clean"}, "capabilities": {"primary": "Primary partition", "bootable": "Bootable partition (active)", "journaled": true, "extended_attributes": "Extended Attributes", "large_files": "4GB+ files", "huge_files": "16TB+ files", "dir_nlink": "directories with 65000+ subdirs", "64bit": "64bit filesystem", "extents": "extent-based allocation", "ext4": true, "ext2": "EXT2/EXT3", "initialized": "initialized volume"}}, {"id": "volume:1", "class": "volume", "claimed": true, "description": "Extended partition", "physid": "2", "businfo": "scsi@0:0.0.0,2", "logicalname": "/dev/sda2", "dev": "8:2", "size": 38652609536, "capacity": 38652609536, "capabilities": {"primary": "Primary partition", "extended": "Extended partition", "partitioned": "Partitioned disk", "partitioned:extended": "Extended partition"}, "children": [{"id": "logicalvolume:0", "class": "volume", "claimed": true, "description": "Linux swap volume", "physid": "5", "logicalname": "/dev/sda5", "dev": "8:5", "version": "1", "serial": "5149082d-e5ab-4ccb-b75d-52a8b4da4fc8", "size": 4292870144, "capacity": 4292870144, "configuration": {"filesystem": "swap", "pagesize": "4096"}, "capabilities": {"nofs": "No filesystem", "swap": "Linux swap", "initialized": "initialized volume"}}, {"id": "logicalvolume:1", "class": "volume", "claimed": true, "description": "EXT4 volume", "vendor": "Linux", "physid": "6", "logicalname": "/dev/sda6", "dev": "8:6", "version": "1.0", "serial": "cc4fd343-e6f4-4376-937e-f5d2fbcb48c7", "size": 34358689792, "capacity": 34358689792, "configuration": {"created": "2022-04-01 09:25:42", "filesystem": "ext4", "lastmountpoint": "/", "modified": "2022-04-18 08:06:56", "mounted": "2022-04-18 08:06:56", "state": "clean"}, "capabilities": {"journaled": true, "extended_attributes": "Extended Attributes", "large_files": "4GB+ files", "huge_files": "16TB+ files", "dir_nlink": "directories with 65000+ subdirs", "64bit": "64bit filesystem", "extents": "extent-based allocation", "ext4": true, "ext2": "EXT2/EXT3", "initialized": "initialized volume"}}]}]}, {"id": "cdrom", "class": "disk", "claimed": true, "handle": "SCSI:01:00:00:00", "description": "DVD reader", "product": "QEMU DVD-ROM", "vendor": "QEMU", "physid": "1", "businfo": "scsi@1:0.0.0", "logicalname": ["/dev/cdrom", "/dev/dvd", "/dev/sr0", "/run/live/persistence/sr0", "/usr/lib/live/mount/persistence/sr0"], "dev": "11:0", "version": "2.5+", "configuration": {"ansiversion": "5", "mount.fstype": "iso9660", "mount.options": "ro,noatime,nojoliet,check=s,map=n,blocksize=2048,iocharset=utf8", "state": "mounted", "status": "ready"}, "capabilities": {"removable": "support is removable", "audio": "Audio CD playback", "dvd": "DVD playback"}, "children": [{"id": "medium", "class": "disk", "claimed": true, "physid": "0", "logicalname": ["/dev/cdrom", "/run/live/persistence/sr0", "/usr/lib/live/mount/persistence/sr0"], "dev": "11:0", "configuration": {"mount.fstype": "iso9660", "mount.options": "ro,noatime,nojoliet,check=s,map=n,blocksize=2048,iocharset=utf8", "signature": "528cd03d", "state": "mounted"}, "capabilities": {"partitioned": "Partitioned disk", "partitioned:dos": "MS-DOS partition table"}, "children": [{"id": "volume", "class": "volume", "description": "Windows FAT volume", "vendor": "mkfs.fat", "physid": "2", "version": "FAT16", "serial": "31d5-6be2", "size": 18446744073709549568, "configuration": {"FATs": "2", "filesystem": "fat"}, "capabilities": {"primary": "Primary partition", "boot": "Contains boot code", "fat": "Windows FAT", "initialized": "initialized volume"}}]}]}]}, {"id": "bridge", "class": "bridge", "claimed": true, "handle": "PCI:0000:00:01.3", "description": "Bridge", "product": "82371AB/EB/MB PIIX4 ACPI", "vendor": "Intel Corporation", "physid": "1.3", "businfo": "pci@0000:00:01.3", "version": "03", "width": 32, "clock": 33000000, "configuration": {"driver": "piix4_smbus", "latency": "0"}, "capabilities": {"bridge": true}}, {"id": "display", "class": "display", "claimed": true, "handle": "PCI:0000:00:02.0", "description": "VGA compatible controller", "product": "bochs-drmdrmfb", "physid": "2", "businfo": "pci@0000:00:02.0", "logicalname": "/dev/fb0", "version": "02", "width": 32, "clock": 33000000, "configuration": {"depth": "32", "driver": "bochs-drm", "latency": "0", "resolution": "1024,768"}, "capabilities": {"vga_controller": true, "rom": "extension ROM", "fb": "framebuffer"}}, {"id": "network", "class": "network", "claimed": true, "handle": "PCI:0000:00:03.0", "description": "Ethernet interface", "product": "82540EM Gigabit Ethernet Controller", "vendor": "Intel Corporation", "physid": "3", "businfo": "pci@0000:00:03.0", "logicalname": "eth0", "version": "03", "serial": "52:54:00:12:34:56", "units": "bit/s", "size": 1000000000, "capacity": 1000000000, "width": 32, "clock": 33000000, "configuration": {"autonegotiation": "on", "broadcast": "yes", "driver": "e1000", "driverversion": "5.10.0-13-amd64", "duplex": "full", "ip": "10.0.2.15", "latency": "0", "link": "yes", "multicast": "yes", "port": "twisted pair", "speed": "1Gbit/s"}, "capabilities": {"bus_master": "bus mastering", "rom": "extension ROM", "ethernet": true, "physical": "Physical interface", "tp": "twisted pair", "10bt": "10Mbit/s", "10bt-fd": "10Mbit/s (full duplex)", "100bt": "100Mbit/s", "100bt-fd": "100Mbit/s (full duplex)", "1000bt-fd": "1Gbit/s (full duplex)", "autonegotiation": "Auto-negotiation"}}]}]}, {"id": "input:0", "class": "input", "claimed": true, "product": "AT Translated Set 2 keyboard", "physid": "1", "logicalname": ["input0", "/dev/input/event0", "input0::capslock", "input0::numlock", "input0::scrolllock"], "capabilities": {"i8042": "i8042 PC AT keyboard controller"}}, {"id": "input:1", "class": "input", "claimed": true, "product": "Power Button", "physid": "2", "logicalname": ["input2", "/dev/input/event1"], "capabilities": {"platform": true}}, {"id": "input:2", "class": "input", "claimed": true, "product": "ImExPS/2 Generic Explorer Mouse", "physid": "3", "logicalname": ["input3", "/dev/input/event2", "/dev/input/mouse0"], "capabilities": {"i8042": "i8042 PC AT keyboard controller"}}, {"id": "input:3", "class": "input", "claimed": true, "product": "PC Speaker", "physid": "4", "logicalname": ["input4", "/dev/input/event3"], "capabilities": {"isa": "ISA bus"}}]}, "dmidecode": "# dmidecode 3.3\nGetting SMBIOS data from sysfs.\nSMBIOS 2.8 present.\n9 structures occupying 429 bytes.\nTable at 0x000F5AB0.\n\nHandle 0x0000, DMI type 0, 24 bytes\nBIOS Information\n\tVendor: SeaBIOS\n\tVersion: ?-20190711_202441-buildvm-armv7-10.arm.fedoraproject.org-2.fc31\n\tRelease Date: 04/01/2014\n\tAddress: 0xE8000\n\tRuntime Size: 96 kB\n\tROM Size: 64 kB\n\tCharacteristics:\n\t\tBIOS characteristics not supported\n\t\tTargeted content distribution is supported\n\tBIOS Revision: 0.0\n\nHandle 0x0100, DMI type 1, 27 bytes\nSystem Information\n\tManufacturer: QEMU\n\tProduct Name: Standard PC (i440FX + PIIX, 1996)\n\tVersion: pc-i440fx-5.2\n\tSerial Number: Not Specified\n\tUUID: Not Settable\n\tWake-up Type: Power Switch\n\tSKU Number: Not Specified\n\tFamily: Not Specified\n\nHandle 0x0300, DMI type 3, 22 bytes\nChassis Information\n\tManufacturer: QEMU\n\tType: Other\n\tLock: Not Present\n\tVersion: pc-i440fx-5.2\n\tSerial Number: Not Specified\n\tAsset Tag: Not Specified\n\tBoot-up State: Safe\n\tPower Supply State: Safe\n\tThermal State: Safe\n\tSecurity Status: Unknown\n\tOEM Information: 0x00000000\n\tHeight: Unspecified\n\tNumber Of Power Cords: Unspecified\n\tContained Elements: 0\n\tSKU Number: Not Specified\n\nHandle 0x0400, DMI type 4, 42 bytes\nProcessor Information\n\tSocket Designation: CPU 0\n\tType: Central Processor\n\tFamily: Other\n\tManufacturer: QEMU\n\tID: 63 06 00 00 FD FB 8B 07\n\tVersion: pc-i440fx-5.2\n\tVoltage: Unknown\n\tExternal Clock: Unknown\n\tMax Speed: 2000 MHz\n\tCurrent Speed: 2000 MHz\n\tStatus: Populated, Enabled\n\tUpgrade: Other\n\tL1 Cache Handle: Not Provided\n\tL2 Cache Handle: Not Provided\n\tL3 Cache Handle: Not Provided\n\tSerial Number: Not Specified\n\tAsset Tag: Not Specified\n\tPart Number: Not Specified\n\tCore Count: 1\n\tCore Enabled: 1\n\tThread Count: 1\n\tCharacteristics: None\n\nHandle 0x1000, DMI type 16, 23 bytes\nPhysical Memory Array\n\tLocation: Other\n\tUse: System Memory\n\tError Correction Type: Multi-bit ECC\n\tMaximum Capacity: 1 GB\n\tError Information Handle: Not Provided\n\tNumber Of Devices: 1\n\nHandle 0x1100, DMI type 17, 40 bytes\nMemory Device\n\tArray Handle: 0x1000\n\tError Information Handle: Not Provided\n\tTotal Width: Unknown\n\tData Width: Unknown\n\tSize: 1 GB\n\tForm Factor: DIMM\n\tSet: None\n\tLocator: DIMM 0\n\tBank Locator: Not Specified\n\tType: RAM\n\tType Detail: Other\n\tSpeed: Unknown\n\tManufacturer: QEMU\n\tSerial Number: Not Specified\n\tAsset Tag: Not Specified\n\tPart Number: Not Specified\n\tRank: Unknown\n\tConfigured Memory Speed: Unknown\n\tMinimum Voltage: Unknown\n\tMaximum Voltage: Unknown\n\tConfigured Voltage: Unknown\n\nHandle 0x1300, DMI type 19, 31 bytes\nMemory Array Mapped Address\n\tStarting Address: 0x00000000000\n\tEnding Address: 0x0003FFFFFFF\n\tRange Size: 1 GB\n\tPhysical Array Handle: 0x1000\n\tPartition Width: 1\n\nHandle 0x2000, DMI type 32, 11 bytes\nSystem Boot Information\n\tStatus: No errors detected\n\nHandle 0x7F00, DMI type 127, 4 bytes\nEnd Of Table\n\n", "lspci": "00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)\n\tSubsystem: Red Hat, Inc. Qemu virtual machine\n\tControl: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-\n\tStatus: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- Date: Mon, 18 Apr 2022 19:09:03 +0200 Subject: [PATCH 032/154] fix exit_status number --- ereuse_devicehub/parser/parser.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ereuse_devicehub/parser/parser.py b/ereuse_devicehub/parser/parser.py index 95a0e86d..cac097af 100644 --- a/ereuse_devicehub/parser/parser.py +++ b/ereuse_devicehub/parser/parser.py @@ -464,8 +464,9 @@ class ParseSnapshotLsHw: def get_data_storage(self): + # import pdb; pdb.set_trace() for sm in self.smart: - if sm.get('smartctl', {}).get('exit_status') != 0: + if sm.get('smartctl', {}).get('exit_status') == 1: continue model = sm.get('model_name') manufacturer = None From 7c0b3c190c0acd6c2ae1ec00e0318c878a7f80c0 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 19 Apr 2022 10:47:49 +0200 Subject: [PATCH 033/154] test for check general snapshots --- ereuse_devicehub/parser/parser.py | 1 - tests/test_snapshot.py | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ereuse_devicehub/parser/parser.py b/ereuse_devicehub/parser/parser.py index cac097af..2394628f 100644 --- a/ereuse_devicehub/parser/parser.py +++ b/ereuse_devicehub/parser/parser.py @@ -464,7 +464,6 @@ class ParseSnapshotLsHw: def get_data_storage(self): - # import pdb; pdb.set_trace() for sm in self.smart: if sm.get('smartctl', {}).get('exit_status') == 1: continue diff --git a/tests/test_snapshot.py b/tests/test_snapshot.py index f3a6c3e7..1ea2d933 100644 --- a/tests/test_snapshot.py +++ b/tests/test_snapshot.py @@ -1155,3 +1155,17 @@ def test_snapshot_errors_no_serial_number(user: UserClient): assert not c.manufacturer test = c.actions[-1] assert test.power_on_hours == 19819 + + +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_snapshot_check_tests_lite(user: UserClient): + """This test check the minimum validation of json that come from snapshot""" + snapshot_lite = file_json('test_lite/2022-4-13-19-5_user@dhub.com_b27dbf43-b88a-4505-ae27-10de5a95919e.json') + + bodyLite, res = user.post(snapshot_lite, uri="/api/inventory/") + assert res.status_code == 201 + SnapshotErrors.query.all() + dev = m.Device.query.filter_by(id=bodyLite['device']['id']).one() + # import pdb; pdb.set_trace() + + From 25dc0047dc3a0ec7989554d7d0cebf8249592861 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 19 Apr 2022 18:39:05 +0200 Subject: [PATCH 034/154] add tests --- tests/conftest.py | 2 + tests/files/export_devices.csv | 2 + tests/test_render_2_0.py | 191 ++++++++++++++++++++++++++++++++- 3 files changed, 191 insertions(+), 4 deletions(-) create mode 100644 tests/files/export_devices.csv diff --git a/tests/conftest.py b/tests/conftest.py index 1bd1ec71..a8d04506 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -18,6 +18,7 @@ from ereuse_devicehub.config import DevicehubConfig from ereuse_devicehub.db import db from ereuse_devicehub.devicehub import Devicehub from ereuse_devicehub.inventory.views import devices +from ereuse_devicehub.labels.views import labels from ereuse_devicehub.resources.agent.models import Person from ereuse_devicehub.resources.enums import SessionType from ereuse_devicehub.resources.tag import Tag @@ -56,6 +57,7 @@ def _app(config: TestConfig) -> Devicehub: app = Devicehub(inventory='test', config=config, db=db) app.register_blueprint(core) app.register_blueprint(devices) + app.register_blueprint(labels) app.config["SQLALCHEMY_RECORD_QUERIES"] = True app.config['PROFILE'] = True # app.wsgi_app = ProfilerMiddleware(app.wsgi_app, restrictions=[30]) diff --git a/tests/files/export_devices.csv b/tests/files/export_devices.csv new file mode 100644 index 00000000..586a25e7 --- /dev/null +++ b/tests/files/export_devices.csv @@ -0,0 +1,2 @@ +DHID;DocumentID;Public Link;Lots;Tag 1 Type;Tag 1 ID;Tag 1 Organization;Tag 2 Type;Tag 2 ID;Tag 2 Organization;Tag 3 Type;Tag 3 ID;Tag 3 Organization;Device Hardware ID;Device Type;Device Chassis;Device Serial Number;Device Model;Device Manufacturer;Registered in;Registered (process);Updated in (software);Updated in (web);Physical state;Trading state;Processor;RAM (MB);Data Storage Size (MB);Processor 1;Processor 1 Manufacturer;Processor 1 Model;Processor 1 Serial Number;Processor 1 Number of cores;Processor 1 Speed (GHz);Benchmark Processor 1 (points);Benchmark ProcessorSysbench Processor 1 (points);Processor 2;Processor 2 Manufacturer;Processor 2 Model;Processor 2 Serial Number;Processor 2 Number of cores;Processor 2 Speed (GHz);Benchmark Processor 2 (points);Benchmark ProcessorSysbench Processor 2 (points);RamModule 1;RamModule 1 Manufacturer;RamModule 1 Model;RamModule 1 Serial Number;RamModule 1 Size (MB);RamModule 1 Speed (MHz);RamModule 2;RamModule 2 Manufacturer;RamModule 2 Model;RamModule 2 Serial Number;RamModule 2 Size (MB);RamModule 2 Speed (MHz);RamModule 3;RamModule 3 Manufacturer;RamModule 3 Model;RamModule 3 Serial Number;RamModule 3 Size (MB);RamModule 3 Speed (MHz);RamModule 4;RamModule 4 Manufacturer;RamModule 4 Model;RamModule 4 Serial Number;RamModule 4 Size (MB);RamModule 4 Speed (MHz);DataStorage 1;DataStorage 1 Manufacturer;DataStorage 1 Model;DataStorage 1 Serial Number;DataStorage 1 Size (MB);Erasure DataStorage 1;Erasure DataStorage 1 Serial Number;Erasure DataStorage 1 Size (MB);Erasure DataStorage 1 Software;Erasure DataStorage 1 Result;Erasure DataStorage 1 Certificate URL;Erasure DataStorage 1 Type;Erasure DataStorage 1 Method;Erasure DataStorage 1 Elapsed (hours);Erasure DataStorage 1 Date;Erasure DataStorage 1 Steps;Erasure DataStorage 1 Steps Start Time;Erasure DataStorage 1 Steps End Time;Benchmark DataStorage 1 Read Speed (MB/s);Benchmark DataStorage 1 Writing speed (MB/s);Test DataStorage 1 Software;Test DataStorage 1 Type;Test DataStorage 1 Result;Test DataStorage 1 Power cycle count;Test DataStorage 1 Lifetime (days);Test DataStorage 1 Power on hours;DataStorage 2;DataStorage 2 Manufacturer;DataStorage 2 Model;DataStorage 2 Serial Number;DataStorage 2 Size (MB);Erasure DataStorage 2;Erasure DataStorage 2 Serial Number;Erasure DataStorage 2 Size (MB);Erasure DataStorage 2 Software;Erasure DataStorage 2 Result;Erasure DataStorage 2 Certificate URL;Erasure DataStorage 2 Type;Erasure DataStorage 2 Method;Erasure DataStorage 2 Elapsed (hours);Erasure DataStorage 2 Date;Erasure DataStorage 2 Steps;Erasure DataStorage 2 Steps Start Time;Erasure DataStorage 2 Steps End Time;Benchmark DataStorage 2 Read Speed (MB/s);Benchmark DataStorage 2 Writing speed (MB/s);Test DataStorage 2 Software;Test DataStorage 2 Type;Test DataStorage 2 Result;Test DataStorage 2 Power cycle count;Test DataStorage 2 Lifetime (days);Test DataStorage 2 Power on hours;DataStorage 3;DataStorage 3 Manufacturer;DataStorage 3 Model;DataStorage 3 Serial Number;DataStorage 3 Size (MB);Erasure DataStorage 3;Erasure DataStorage 3 Serial Number;Erasure DataStorage 3 Size (MB);Erasure DataStorage 3 Software;Erasure DataStorage 3 Result;Erasure DataStorage 3 Certificate URL;Erasure DataStorage 3 Type;Erasure DataStorage 3 Method;Erasure DataStorage 3 Elapsed (hours);Erasure DataStorage 3 Date;Erasure DataStorage 3 Steps;Erasure DataStorage 3 Steps Start Time;Erasure DataStorage 3 Steps End Time;Benchmark DataStorage 3 Read Speed (MB/s);Benchmark DataStorage 3 Writing speed (MB/s);Test DataStorage 3 Software;Test DataStorage 3 Type;Test DataStorage 3 Result;Test DataStorage 3 Power cycle count;Test DataStorage 3 Lifetime (days);Test DataStorage 3 Power on hours;DataStorage 4;DataStorage 4 Manufacturer;DataStorage 4 Model;DataStorage 4 Serial Number;DataStorage 4 Size (MB);Erasure DataStorage 4;Erasure DataStorage 4 Serial Number;Erasure DataStorage 4 Size (MB);Erasure DataStorage 4 Software;Erasure DataStorage 4 Result;Erasure DataStorage 4 Certificate URL;Erasure DataStorage 4 Type;Erasure DataStorage 4 Method;Erasure DataStorage 4 Elapsed (hours);Erasure DataStorage 4 Date;Erasure DataStorage 4 Steps;Erasure DataStorage 4 Steps Start Time;Erasure DataStorage 4 Steps End Time;Benchmark DataStorage 4 Read Speed (MB/s);Benchmark DataStorage 4 Writing speed (MB/s);Test DataStorage 4 Software;Test DataStorage 4 Type;Test DataStorage 4 Result;Test DataStorage 4 Power cycle count;Test DataStorage 4 Lifetime (days);Test DataStorage 4 Power on hours;Motherboard 1;Motherboard 1 Manufacturer;Motherboard 1 Model;Motherboard 1 Serial Number;Display 1;Display 1 Manufacturer;Display 1 Model;Display 1 Serial Number;GraphicCard 1;GraphicCard 1 Manufacturer;GraphicCard 1 Model;GraphicCard 1 Serial Number;GraphicCard 1 Memory (MB);GraphicCard 2;GraphicCard 2 Manufacturer;GraphicCard 2 Model;GraphicCard 2 Serial Number;GraphicCard 2 Memory (MB);NetworkAdapter 1;NetworkAdapter 1 Manufacturer;NetworkAdapter 1 Model;NetworkAdapter 1 Serial Number;NetworkAdapter 2;NetworkAdapter 2 Manufacturer;NetworkAdapter 2 Model;NetworkAdapter 2 Serial Number;SoundCard 1;SoundCard 1 Manufacturer;SoundCard 1 Model;SoundCard 1 Serial Number;SoundCard 2;SoundCard 2 Manufacturer;SoundCard 2 Model;SoundCard 2 Serial Number;Device Rate;Device Range;Processor Rate;Processor Range;RAM Rate;RAM Range;Data Storage Rate;Data Storage Range;Price;Benchmark RamSysbench (points) +O48N2;;http://localhost/devices/O48N2;;named;O48N2;FooOrg;;;;;;;laptop-asustek_computer_inc-1001pxd-b8oaas048285-14:da:e9:42:f6:7b;Laptop;Netbook;b8oaas048285;1001pxd;asustek computer inc.;Tue Apr 19 18:13:44 2022;Workbench 11.0a2;2022-04-19 18:13:45.018710+02:00;;;;intel atom cpu n455 @ 2.66ghz;1024;238475;Processor 6: model intel atom cpu n455 @ 2.66ghz, S/N None;intel corp.;intel atom cpu n455 @ 2.66ghz;;1;2.667;6666.24;164.0803;;;;;;;;;RamModule 10: model None, S/N None;;;;1024;667;;;;;;;;;;;;;;;;;;;HardDrive 11: model hts54322, S/N e2024242cv86mm;hitachi;hts54322;e2024242cv86mm;238475;harddrive-hitachi-hts54322-e2024242cv86mm;e2024242cv86mm;238475;Workbench 11.0a2;Success;;EraseBasic;Shred;1:16:49;2022-04-19 18:13:44.975393+02:00;✓ – StepRandom 1:16:49;2018-07-03 11:15:22.257059+02:00;2018-07-03 12:32:11.843190+02:00;66.2;21.8;Workbench 11.0a2;Short;Failure;;;0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Motherboard 12: model 1001pxd, S/N eee0123456720;asustek computer inc.;1001pxd;eee0123456720;;;;;GraphicCard 7: model atom processor d4xx/d5xx/n4xx/n5xx integrated graphics controller, S/N None;intel corporation;atom processor d4xx/d5xx/n4xx/n5xx integrated graphics controller;;256;;;;;;NetworkAdapter 4: model ar9285 wireless network adapter, S/N 74:2f:68:8b:fd:c9;qualcomm atheros;ar9285 wireless network adapter;74:2f:68:8b:fd:c9;NetworkAdapter 5: model ar8152 v2.0 fast ethernet, S/N 14:da:e9:42:f6:7b;qualcomm atheros;ar8152 v2.0 fast ethernet;14:da:e9:42:f6:7b;SoundCard 8: model nm10/ich7 family high definition audio controller, S/N None;intel corporation;nm10/ich7 family high definition audio controller;;SoundCard 9: model usb 2.0 uvc vga webcam, S/N 0x0001;azurewave;usb 2.0 uvc vga webcam;0x0001;1.75;LOW;1.55;LOW;1.53;LOW;3.76;HIGH;52.50 €;15.7188 diff --git a/tests/test_render_2_0.py b/tests/test_render_2_0.py index 3d3775ed..7ebd5695 100644 --- a/tests/test_render_2_0.py +++ b/tests/test_render_2_0.py @@ -1,14 +1,20 @@ +import csv +import json +from io import BytesIO +from pathlib import Path + import pytest from flask.testing import FlaskClient from flask_wtf.csrf import generate_csrf from ereuse_devicehub.client import UserClient, UserClientFlask from ereuse_devicehub.devicehub import Devicehub +from ereuse_devicehub.resources.action.models import Snapshot +from ereuse_devicehub.resources.lot.models import Lot from tests import conftest @pytest.mark.mvp -# @pytest.mark.usefixtures() @pytest.mark.usefixtures(conftest.app_context.__name__) def test_login(user: UserClient, app: Devicehub): """Checks a simple login""" @@ -47,15 +53,192 @@ def test_inventory(user3: UserClientFlask): def test_add_lot(user3: UserClientFlask): body, status = user3.get('/inventory/lot/add/') + lot_name = "lot1" assert status == '200 OK' assert "Add a new lot" in body + assert lot_name not in body data = { - 'name': 'lot1', + 'name': lot_name, 'csrf_token': generate_csrf(), } - # import pdb; pdb.set_trace() body, status = user3.post('/inventory/lot/add/', data=data) assert status == '200 OK' - assert "lot1" in body + assert lot_name in body + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_del_lot(user3: UserClientFlask): + body, status = user3.get('/inventory/lot/add/') + + lot_name = "lot1" + assert status == '200 OK' + assert "Add a new lot" in body + assert lot_name not in body + + data = { + 'name': lot_name, + 'csrf_token': generate_csrf(), + } + body, status = user3.post('/inventory/lot/add/', data=data) + + assert status == '200 OK' + assert lot_name in body + + lot = Lot.query.filter_by(name=lot_name).one() + uri = '/inventory/lot/{id}/del/'.format(id=lot.id) + body, status = user3.get(uri) + assert lot_name not in body + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_update_lot(user3: UserClientFlask): + user3.get('/inventory/lot/add/') + + # Add lot + # import pdb; pdb.set_trace() + data = { + 'name': "lot1", + 'csrf_token': generate_csrf(), + } + user3.post('/inventory/lot/add/', data=data) + + data = { + 'name': "lot2", + 'csrf_token': generate_csrf(), + } + + lot = Lot.query.one() + uri = '/inventory/lot/{uuid}/'.format(uuid=lot.id) + body, status = user3.post(uri, data=data) + + assert status == '200 OK' + assert "lot2" in body + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_upload_snapshot(user3: UserClientFlask): + uri = '/inventory/upload-snapshot/' + file_name = 'real-eee-1001pxd.snapshot.12.json' + body, status = user3.get(uri) + + assert status == '200 OK' + assert "Select a Snapshot file" in body + + snapshot = conftest.yaml2json(file_name.split(".json")[0]) + b_snapshot = bytes(json.dumps(snapshot), 'utf-8') + file_snap = (BytesIO(b_snapshot), file_name) + + data = { + 'snapshot': file_snap, + 'csrf_token': generate_csrf(), + } + body, status = user3.post(uri, data=data, content_type="multipart/form-data") + + txt = f"{file_name}: Ok" + assert status == '200 OK' + assert txt in body + db_snapthot = Snapshot.query.one() + dev = db_snapthot.device + assert str(db_snapthot.uuid) == snapshot['uuid'] + assert dev.type == 'Laptop' + assert dev.serial_number == 'b8oaas048285' + assert len(dev.actions) == 12 + assert len(dev.components) == 9 + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_inventory_with_device(user3: UserClientFlask): + uri = '/inventory/upload-snapshot/' + file_name = 'real-eee-1001pxd.snapshot.12.json' + snapshot = conftest.yaml2json(file_name.split(".json")[0]) + b_snapshot = bytes(json.dumps(snapshot), 'utf-8') + file_snap = (BytesIO(b_snapshot), file_name) + user3.get(uri) + + data = { + 'snapshot': file_snap, + 'csrf_token': generate_csrf(), + } + user3.post(uri, data=data, content_type="multipart/form-data") + + body, status = user3.get('/inventory/device/') + + assert status == '200 OK' + assert "Unassgined" in body + db_snapthot = Snapshot.query.one() + assert db_snapthot.device.devicehub_id in body + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_inventory_filter(user3: UserClientFlask): + uri = '/inventory/upload-snapshot/' + file_name = 'real-eee-1001pxd.snapshot.12.json' + snapshot = conftest.yaml2json(file_name.split(".json")[0]) + b_snapshot = bytes(json.dumps(snapshot), 'utf-8') + file_snap = (BytesIO(b_snapshot), file_name) + user3.get(uri) + + data = { + 'snapshot': file_snap, + 'csrf_token': generate_csrf(), + } + user3.post(uri, data=data, content_type="multipart/form-data") + + csrf = generate_csrf() + body, status = user3.get(f'/inventory/device/?filter=Laptop&csrf_token={csrf}') + + assert status == '200 OK' + assert "Unassgined" in body + db_snapthot = Snapshot.query.one() + assert db_snapthot.device.devicehub_id in body + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_export_devices(user3: UserClientFlask): + uri = '/inventory/upload-snapshot/' + file_name = 'real-eee-1001pxd.snapshot.12.json' + snapshot = conftest.yaml2json(file_name.split(".json")[0]) + b_snapshot = bytes(json.dumps(snapshot), 'utf-8') + file_snap = (BytesIO(b_snapshot), file_name) + user3.get(uri) + + data = { + 'snapshot': file_snap, + 'csrf_token': generate_csrf(), + } + user3.post(uri, data=data, content_type="multipart/form-data") + + snap = Snapshot.query.one() + uri = "/inventory/export/devices/?ids={id}".format(id=snap.device.devicehub_id) + + body, status = user3.get(uri) + assert status == '200 OK' + + export_csv = [line.split(";") for line in body.split("\n")] + + with Path(__file__).parent.joinpath('files').joinpath( + 'export_devices.csv' + ).open() as csv_file: + obj_csv = csv.reader(csv_file, delimiter=';', quotechar='"') + fixture_csv = list(obj_csv) + + assert fixture_csv[0] == export_csv[0], 'Headers are not equal' + assert ( + fixture_csv[1][:19] == export_csv[1][:19] + ), 'Computer information are not equal' + assert fixture_csv[1][20] == export_csv[1][20], 'Computer information are not equal' + assert ( + fixture_csv[1][22:82] == export_csv[1][22:82] + ), 'Computer information are not equal' + assert fixture_csv[1][83] == export_csv[1][83], 'Computer information are not equal' + assert ( + fixture_csv[1][86:] == export_csv[1][86:] + ), 'Computer information are not equal' From 4a5ad374f8f2e82374219f929cad3e95dc8d02e4 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 19 Apr 2022 18:39:42 +0200 Subject: [PATCH 035/154] fix UserClientFlask --- ereuse_devicehub/client.py | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/ereuse_devicehub/client.py b/ereuse_devicehub/client.py index 36d3bd49..31a9f136 100644 --- a/ereuse_devicehub/client.py +++ b/ereuse_devicehub/client.py @@ -254,7 +254,14 @@ class UserClientFlask: body = next(body).decode("utf-8") assert "Unassgined" in body - def get(self, uri='', data=None, follow_redirects=True, **kw): + def get( + self, + uri='', + data=None, + follow_redirects=True, + content_type='text/html; charset=utf-8', + **kw, + ): body, status, headers = self.client.get( uri, data=data, follow_redirects=follow_redirects, headers=self.headers @@ -262,10 +269,21 @@ class UserClientFlask: body = next(body).decode("utf-8") return (body, status) - def post(self, uri='', data=None, follow_redirects=True, **kw): + def post( + self, + uri='', + data=None, + follow_redirects=True, + content_type='application/x-www-form-urlencoded', + **kw, + ): body, status, headers = self.client.post( - uri, data=data, follow_redirects=follow_redirects, headers=self.headers + uri, + data=data, + follow_redirects=follow_redirects, + headers=self.headers, + content_type=content_type, ) body = next(body).decode("utf-8") return (body, status) From 154362613e4c92e47cacda7a4c68eb5376ed91f9 Mon Sep 17 00:00:00 2001 From: RubenPX Date: Wed, 20 Apr 2022 11:53:51 +0200 Subject: [PATCH 036/154] fix trade lots modal --- ereuse_devicehub/templates/inventory/device_list.html | 1 + 1 file changed, 1 insertion(+) diff --git a/ereuse_devicehub/templates/inventory/device_list.html b/ereuse_devicehub/templates/inventory/device_list.html index c7e8c133..10305ac4 100644 --- a/ereuse_devicehub/templates/inventory/device_list.html +++ b/ereuse_devicehub/templates/inventory/device_list.html @@ -78,6 +78,7 @@ Lots +
From dd4e938d306571f399aac97b63bc5d0bce0fab8c Mon Sep 17 00:00:00 2001 From: Santiago Lamora Date: Fri, 22 Apr 2022 11:07:18 +0200 Subject: [PATCH 058/154] Split custom CSS & niceadmin theme CSS Keep original source Nice Admin template to keep easy future updates --- ereuse_devicehub/static/css/niceadmin.css | 1084 ++++++++++++++++ ereuse_devicehub/static/css/style.css | 1105 +---------------- .../templates/ereuse_devicehub/base.html | 3 +- 3 files changed, 1098 insertions(+), 1094 deletions(-) create mode 100644 ereuse_devicehub/static/css/niceadmin.css diff --git a/ereuse_devicehub/static/css/niceadmin.css b/ereuse_devicehub/static/css/niceadmin.css new file mode 100644 index 00000000..1fd44f19 --- /dev/null +++ b/ereuse_devicehub/static/css/niceadmin.css @@ -0,0 +1,1084 @@ +/** +* Template Name: NiceAdmin - v2.2.0 +* Template URL: https://bootstrapmade.com/nice-admin-bootstrap-admin-html-template/ +* Author: BootstrapMade.com +* License: https://bootstrapmade.com/license/ +*/ + +/*-------------------------------------------------------------- +# General +--------------------------------------------------------------*/ +:root { + scroll-behavior: smooth; +} + +body { + font-family: "Open Sans", sans-serif; + background: #f6f9ff; + color: #444444; +} + +a { + color: #4154f1; + text-decoration: none; +} + +a:hover { + color: #717ff5; + text-decoration: none; +} + +h1, h2, h3, h4, h5, h6 { + font-family: "Nunito", sans-serif; +} + +/*-------------------------------------------------------------- +# Main +--------------------------------------------------------------*/ +#main { + margin-top: 60px; + padding: 20px 30px; + transition: all 0.3s; +} +@media (max-width: 1199px) { + #main { + padding: 20px; + } +} + +/*-------------------------------------------------------------- +# Page Title +--------------------------------------------------------------*/ +.pagetitle { + margin-bottom: 10px; +} +.pagetitle h1 { + font-size: 24px; + margin-bottom: 0; + font-weight: 600; + color: #012970; +} + +/*-------------------------------------------------------------- +# Back to top button +--------------------------------------------------------------*/ +.back-to-top { + position: fixed; + visibility: hidden; + opacity: 0; + right: 15px; + bottom: 15px; + z-index: 99999; + background: #4154f1; + width: 40px; + height: 40px; + border-radius: 4px; + transition: all 0.4s; +} +.back-to-top i { + font-size: 24px; + color: #fff; + line-height: 0; +} +.back-to-top:hover { + background: #6776f4; + color: #fff; +} +.back-to-top.active { + visibility: visible; + opacity: 1; +} + +/*-------------------------------------------------------------- +# Override some default Bootstrap stylings +--------------------------------------------------------------*/ +/* Dropdown menus */ +.dropdown-menu { + border-radius: 4px; + padding: 10px 0; + -webkit-animation-name: dropdown-animate; + animation-name: dropdown-animate; + -webkit-animation-duration: 0.2s; + animation-duration: 0.2s; + -webkit-animation-fill-mode: both; + animation-fill-mode: both; + border: 0; + box-shadow: 0 5px 30px 0 rgba(82, 63, 105, 0.2); +} +@media (max-width: 480px) { + .dropdown-menu { + width: 100vw !important; + } +} +.dropdown-menu .dropdown-header, .dropdown-menu .dropdown-footer { + text-align: center; + font-size: 15px; + padding: 10px 25px; +} +.dropdown-menu .dropdown-footer a { + color: #444444; + text-decoration: underline; +} +.dropdown-menu .dropdown-footer a:hover { + text-decoration: none; +} +.dropdown-menu .dropdown-divider { + color: #a5c5fe; + margin: 0; +} +.dropdown-menu .dropdown-item { + font-size: 14px; + padding: 10px 15px; + transition: 0.3s; +} +.dropdown-menu .dropdown-item i { + margin-right: 10px; + font-size: 18px; + line-height: 0; +} +.dropdown-menu .dropdown-item:hover { + background-color: #f6f9ff; +} + +@media (min-width: 768px) { + .dropdown-menu-arrow::before { + content: ""; + width: 13px; + height: 13px; + background: #fff; + position: absolute; + top: -7px; + right: 20px; + transform: rotate(45deg); + border-top: 1px solid #eaedf1; + border-left: 1px solid #eaedf1; + } +} +@-webkit-keyframes dropdown-animate { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } + 0% { + opacity: 0; + } +} +@keyframes dropdown-animate { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } + 0% { + opacity: 0; + } +} +/* Light Backgrounds */ +.bg-primary-light { + background-color: #cfe2ff; + border-color: #cfe2ff; +} + +.bg-secondary-light { + background-color: #e2e3e5; + border-color: #e2e3e5; +} + +.bg-success-light { + background-color: #d1e7dd; + border-color: #d1e7dd; +} + +.bg-danger-light { + background-color: #f8d7da; + border-color: #f8d7da; +} + +.bg-warning-light { + background-color: #fff3cd; + border-color: #fff3cd; +} + +.bg-info-light { + background-color: #cff4fc; + border-color: #cff4fc; +} + +.bg-dark-light { + background-color: #d3d3d4; + border-color: #d3d3d4; +} + +/* Card */ +.card { + margin-bottom: 30px; + border: none; + border-radius: 5px; + box-shadow: 0px 0 30px rgba(1, 41, 112, 0.1); + overflow: hidden; +} + +.card-header, .card-footer { + border-color: #ebeef4; + background-color: #fff; + color: #798eb3; + padding: 15px; +} + +.card-title { + padding: 20px 0 15px 0; + font-size: 18px; + font-weight: 500; + color: #012970; + font-family: "Poppins", sans-serif; +} +.card-title span { + color: #899bbd; + font-size: 14px; + font-weight: 400; +} + +.card-body { + padding: 0 20px 20px 20px; +} + +.card-img-overlay { + background-color: rgba(255, 255, 255, 0.6); +} + +/* Alerts */ +.alert-heading { + font-weight: 500; + font-family: "Poppins", sans-serif; + font-size: 20px; +} + +/* Close Button */ +.btn-close { + background-size: 25%; +} +.btn-close:focus { + outline: 0; + box-shadow: none; +} + +/* Accordion */ +.accordion-item { + border: 1px solid #ebeef4; +} + +.accordion-button:focus { + outline: 0; + box-shadow: none; +} +.accordion-button:not(.collapsed) { + color: #012970; + background-color: #f6f9ff; +} + +.accordion-flush .accordion-button { + padding: 15px 0; + background: none; + border: 0; +} +.accordion-flush .accordion-button:not(.collapsed) { + box-shadow: none; + color: #4154f1; +} +.accordion-flush .accordion-body { + padding: 0 0 15px 0; + color: #3e4f6f; + font-size: 15px; +} + +/* Breadcrumbs */ +.breadcrumb { + font-size: 14px; + font-family: "Nunito", sans-serif; + color: #899bbd; + font-weight: 600; +} +.breadcrumb a { + color: #899bbd; + transition: 0.3s; +} +.breadcrumb a:hover { + color: #51678f; +} +.breadcrumb .breadcrumb-item::before { + color: #899bbd; +} +.breadcrumb .active { + color: #51678f; + font-weight: 600; +} + +/* Bordered Tabs */ +.nav-tabs-bordered { + border-bottom: 2px solid #ebeef4; +} +.nav-tabs-bordered .nav-link { + margin-bottom: -2px; + border: none; + color: #2c384e; +} +.nav-tabs-bordered .nav-link:hover, .nav-tabs-bordered .nav-link:focus { + color: #4154f1; +} +.nav-tabs-bordered .nav-link.active { + background-color: #fff; + color: #4154f1; + border-bottom: 2px solid #4154f1; +} + +/*-------------------------------------------------------------- +# Header +--------------------------------------------------------------*/ +.logo { + line-height: 1; +} +@media (min-width: 1200px) { + .logo { + width: 280px; + } +} +.logo img { + max-height: 26px; + margin-right: 6px; +} +.logo span { + font-size: 26px; + font-weight: 700; + color: #012970; + font-family: "Nunito", sans-serif; +} + +.header { + transition: all 0.5s; + z-index: 997; + height: 60px; + box-shadow: 0px 2px 20px rgba(1, 41, 112, 0.1); + background-color: #fff; + padding-left: 20px; + /* Toggle Sidebar Button */ + /* Search Bar */ +} +.header .toggle-sidebar-btn { + font-size: 32px; + padding-left: 10px; + cursor: pointer; + color: #012970; +} +.header .search-bar { + min-width: 360px; + padding: 0 20px; +} +@media (max-width: 1199px) { + .header .search-bar { + position: fixed; + top: 50px; + left: 0; + right: 0; + padding: 20px; + box-shadow: 0px 0px 15px 0px rgba(1, 41, 112, 0.1); + background: white; + z-index: 9999; + transition: 0.3s; + visibility: hidden; + opacity: 0; + } + .header .search-bar-show { + top: 60px; + visibility: visible; + opacity: 1; + } +} +.header .search-form { + width: 100%; +} +.header .search-form input { + border: 0; + font-size: 14px; + color: #012970; + border: 1px solid rgba(1, 41, 112, 0.2); + padding: 7px 38px 7px 8px; + border-radius: 3px; + transition: 0.3s; + width: 100%; +} +.header .search-form input:focus, .header .search-form input:hover { + outline: none; + box-shadow: 0 0 10px 0 rgba(1, 41, 112, 0.15); + border: 1px solid rgba(1, 41, 112, 0.3); +} +.header .search-form button { + border: 0; + padding: 0; + margin-left: -30px; + background: none; +} +.header .search-form button i { + color: #012970; +} + +/*-------------------------------------------------------------- +# Header Nav +--------------------------------------------------------------*/ +.header-nav ul { + list-style: none; +} +.header-nav > ul { + margin: 0; + padding: 0; +} +.header-nav .nav-icon { + font-size: 20px; + color: #012970; +} +.header-nav .nav-profile { + color: #012970; +} +.header-nav .nav-profile img { + max-height: 36px; +} +.header-nav .nav-profile span { + font-size: 14px; + font-weight: 600; +} +.header-nav .badge-number { + position: absolute; + inset: 4px 6px auto auto; + font-weight: normal; + font-size: 11px; + padding: 3px 6px; +} +.header-nav .notifications .notification-item { + display: flex; + align-items: center; + padding: 15px 10px; + transition: 0.3s; +} +.header-nav .notifications .notification-item i { + margin: 0 20px 0 10px; + font-size: 24px; +} +.header-nav .notifications .notification-item h4 { + font-size: 16px; + font-weight: 600; + margin-bottom: 5px; +} +.header-nav .notifications .notification-item p { + font-size: 13px; + margin-bottom: 3px; + color: #919191; +} +.header-nav .notifications .notification-item:hover { + background-color: #f6f9ff; +} +.header-nav .messages .message-item { + padding: 15px 10px; + transition: 0.3s; +} +.header-nav .messages .message-item a { + display: flex; +} +.header-nav .messages .message-item img { + margin: 0 20px 0 10px; + max-height: 40px; +} +.header-nav .messages .message-item h4 { + font-size: 16px; + font-weight: 600; + margin-bottom: 5px; + color: #444444; +} +.header-nav .messages .message-item p { + font-size: 13px; + margin-bottom: 3px; + color: #919191; +} +.header-nav .messages .message-item:hover { + background-color: #f6f9ff; +} +.header-nav .profile { + min-width: 240px; + padding-bottom: 0; +} +.header-nav .profile .dropdown-header h6 { + font-size: 18px; + margin-bottom: 0; + font-weight: 600; + color: #444444; +} +.header-nav .profile .dropdown-header span { + font-size: 14px; +} +.header-nav .profile .dropdown-item { + font-size: 14px; + padding: 10px 15px; + transition: 0.3s; +} +.header-nav .profile .dropdown-item i { + margin-right: 10px; + font-size: 18px; + line-height: 0; +} +.header-nav .profile .dropdown-item:hover { + background-color: #f6f9ff; +} + +/*-------------------------------------------------------------- +# Sidebar +--------------------------------------------------------------*/ +.sidebar { + position: fixed; + top: 60px; + left: 0; + bottom: 0; + width: 300px; + z-index: 996; + transition: all 0.3s; + padding: 20px; + overflow-y: auto; + scrollbar-width: thin; + scrollbar-color: #aab7cf transparent; + box-shadow: 0px 0px 20px rgba(1, 41, 112, 0.1); + background-color: #fff; +} +@media (max-width: 1199px) { + .sidebar { + left: -300px; + } +} +.sidebar::-webkit-scrollbar { + width: 5px; + height: 8px; + background-color: #fff; +} +.sidebar::-webkit-scrollbar-thumb { + background-color: #aab7cf; +} + +@media (min-width: 1200px) { + #main, #footer { + margin-left: 300px; + } +} +@media (max-width: 1199px) { + .toggle-sidebar .sidebar { + left: 0; + } +} +@media (min-width: 1200px) { + .toggle-sidebar #main, .toggle-sidebar #footer { + margin-left: 0; + } + .toggle-sidebar .sidebar { + left: -300px; + } +} + +.sidebar-nav { + padding: 0; + margin: 0; + list-style: none; +} +.sidebar-nav li { + padding: 0; + margin: 0; + list-style: none; +} +.sidebar-nav .nav-item { + margin-bottom: 5px; +} +.sidebar-nav .nav-heading { + font-size: 11px; + text-transform: uppercase; + color: #899bbd; + font-weight: 600; + margin: 10px 0 5px 15px; +} +.sidebar-nav .nav-link { + display: flex; + align-items: center; + font-size: 15px; + font-weight: 600; + color: #4154f1; + transition: 0.3; + background: #f6f9ff; + padding: 10px 15px; + border-radius: 4px; +} +.sidebar-nav .nav-link i { + font-size: 16px; + margin-right: 10px; + color: #4154f1; +} +.sidebar-nav .nav-link.collapsed { + color: #012970; + background: #fff; +} +.sidebar-nav .nav-link.collapsed i { + color: #899bbd; +} +.sidebar-nav .nav-link:hover { + color: #4154f1; + background: #f6f9ff; +} +.sidebar-nav .nav-link:hover i { + color: #4154f1; +} +.sidebar-nav .nav-link .bi-chevron-down { + margin-right: 0; + transition: transform 0.2s ease-in-out; +} +.sidebar-nav .nav-link:not(.collapsed) .bi-chevron-down { + transform: rotate(180deg); +} +.sidebar-nav .nav-content { + padding: 5px 0 0 0; + margin: 0; + list-style: none; +} +.sidebar-nav .nav-content a { + display: flex; + align-items: center; + font-size: 14px; + font-weight: 600; + color: #012970; + transition: 0.3; + padding: 10px 0 10px 40px; + transition: 0.3s; +} +.sidebar-nav .nav-content a i { + font-size: 6px; + margin-right: 8px; + line-height: 0; + border-radius: 50%; +} +.sidebar-nav .nav-content a:hover, .sidebar-nav .nav-content a.active { + color: #4154f1; +} +.sidebar-nav .nav-content a.active i { + background-color: #4154f1; +} + +/*-------------------------------------------------------------- +# Dashboard +--------------------------------------------------------------*/ +/* Filter dropdown */ +.dashboard .filter { + position: absolute; + right: 0px; + top: 15px; +} +.dashboard .filter .icon { + color: #aab7cf; + padding-right: 20px; + padding-bottom: 5px; + transition: 0.3s; + font-size: 16px; +} +.dashboard .filter .icon:hover, .dashboard .filter .icon:focus { + color: #4154f1; +} +.dashboard .filter .dropdown-header { + padding: 8px 15px; +} +.dashboard .filter .dropdown-header h6 { + text-transform: uppercase; + font-size: 14px; + font-weight: 600; + letter-spacing: 1px; + color: #aab7cf; + margin-bottom: 0; + padding: 0; +} +.dashboard .filter .dropdown-item { + padding: 8px 15px; +} + +/* Info Cards */ +.dashboard .info-card { + padding-bottom: 10px; +} +.dashboard .info-card h6 { + font-size: 28px; + color: #012970; + font-weight: 700; + margin: 0; + padding: 0; +} +.dashboard .card-icon { + font-size: 32px; + line-height: 0; + width: 64px; + height: 64px; + flex-shrink: 0; + flex-grow: 0; +} +.dashboard .sales-card .card-icon { + color: #4154f1; + background: #f6f6fe; +} +.dashboard .revenue-card .card-icon { + color: #2eca6a; + background: #e0f8e9; +} +.dashboard .customers-card .card-icon { + color: #ff771d; + background: #ffecdf; +} + +/* Activity */ +.dashboard .activity { + font-size: 14px; +} +.dashboard .activity .activity-item .activite-label { + color: #888; + position: relative; + flex-shrink: 0; + flex-grow: 0; + min-width: 64px; +} +.dashboard .activity .activity-item .activite-label::before { + content: ""; + position: absolute; + right: -11px; + width: 4px; + top: 0; + bottom: 0; + background-color: #eceefe; +} +.dashboard .activity .activity-item .activity-badge { + margin-top: 3px; + z-index: 1; + font-size: 11px; + line-height: 0; + border-radius: 50%; + flex-shrink: 0; + border: 3px solid #fff; + flex-grow: 0; +} +.dashboard .activity .activity-item .activity-content { + padding-left: 10px; + padding-bottom: 20px; +} +.dashboard .activity .activity-item:first-child .activite-label::before { + top: 5px; +} +.dashboard .activity .activity-item:last-child .activity-content { + padding-bottom: 0; +} + +/* News & Updates */ +.dashboard .news .post-item + .post-item { + margin-top: 15px; +} +.dashboard .news img { + width: 80px; + float: left; + border-radius: 5px; +} +.dashboard .news h4 { + font-size: 15px; + margin-left: 95px; + font-weight: bold; + margin-bottom: 5px; +} +.dashboard .news h4 a { + color: #012970; + transition: 0.3s; +} +.dashboard .news h4 a:hover { + color: #4154f1; +} +.dashboard .news p { + font-size: 14px; + color: #777777; + margin-left: 95px; +} + +/* Recent Sales */ +.dashboard .recent-sales { + font-size: 14px; +} +.dashboard .recent-sales .table thead { + background: #f6f6fe; +} +.dashboard .recent-sales .table thead th { + border: 0; +} +.dashboard .recent-sales .dataTable-top { + padding: 0 0 10px 0; +} +.dashboard .recent-sales .dataTable-bottom { + padding: 10px 0 0 0; +} + +/* Top Selling */ +.dashboard .top-selling { + font-size: 14px; +} +.dashboard .top-selling .table thead { + background: #f6f6fe; +} +.dashboard .top-selling .table thead th { + border: 0; +} +.dashboard .top-selling .table tbody td { + vertical-align: middle; +} +.dashboard .top-selling img { + border-radius: 5px; + max-width: 60px; +} + +/*-------------------------------------------------------------- +# Icons list page +--------------------------------------------------------------*/ +.iconslist { + display: grid; + max-width: 100%; + grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); + gap: 1.25rem; + padding-top: 15px; +} +.iconslist .icon { + background-color: #fff; + border-radius: 0.25rem; + text-align: center; + color: #012970; + padding: 15px 0; +} +.iconslist i { + margin: 0.25rem; + font-size: 2.5rem; +} +.iconslist .label { + font-family: var(--bs-font-monospace); + display: inline-block; + width: 100%; + overflow: hidden; + padding: 0.25rem; + font-size: 12px; + text-overflow: ellipsis; + white-space: nowrap; + color: #666; +} + +/*-------------------------------------------------------------- +# Profie Page +--------------------------------------------------------------*/ +.profile .profile-card img { + max-width: 120px; +} +.profile .profile-card h2 { + font-size: 24px; + font-weight: 700; + color: #2c384e; + margin: 10px 0 0 0; +} +.profile .profile-card h3 { + font-size: 18px; +} +.profile .profile-card .social-links a { + font-size: 20px; + display: inline-block; + color: rgba(1, 41, 112, 0.5); + line-height: 0; + margin-right: 10px; + transition: 0.3s; +} +.profile .profile-card .social-links a:hover { + color: #012970; +} +.profile .profile-overview .row { + margin-bottom: 20px; + font-size: 15px; +} +.profile .profile-overview .card-title { + color: #012970; +} +.profile .profile-overview .label { + font-weight: 600; + color: rgba(1, 41, 112, 0.6); +} +.profile .profile-edit label { + font-weight: 600; + color: rgba(1, 41, 112, 0.6); +} +.profile .profile-edit img { + max-width: 120px; +} + +/*-------------------------------------------------------------- +# F.A.Q Page +--------------------------------------------------------------*/ +.faq .basic h6 { + font-size: 18px; + font-weight: 600; + color: #4154f1; +} +.faq .basic p { + color: #6980aa; +} + +/*-------------------------------------------------------------- +# Contact +--------------------------------------------------------------*/ +.contact .info-box { + padding: 28px 30px; +} +.contact .info-box i { + font-size: 38px; + line-height: 0; + color: #4154f1; +} +.contact .info-box h3 { + font-size: 20px; + color: #012970; + font-weight: 700; + margin: 20px 0 10px 0; +} +.contact .info-box p { + padding: 0; + line-height: 24px; + font-size: 14px; + margin-bottom: 0; +} +.contact .php-email-form .error-message { + display: none; + color: #fff; + background: #ed3c0d; + text-align: left; + padding: 15px; + margin-bottom: 24px; + font-weight: 600; +} +.contact .php-email-form .sent-message { + display: none; + color: #fff; + background: #18d26e; + text-align: center; + padding: 15px; + margin-bottom: 24px; + font-weight: 600; +} +.contact .php-email-form .loading { + display: none; + background: #fff; + text-align: center; + padding: 15px; + margin-bottom: 24px; +} +.contact .php-email-form .loading:before { + content: ""; + display: inline-block; + border-radius: 50%; + width: 24px; + height: 24px; + margin: 0 10px -6px 0; + border: 3px solid #18d26e; + border-top-color: #eee; + -webkit-animation: animate-loading 1s linear infinite; + animation: animate-loading 1s linear infinite; +} +.contact .php-email-form input, .contact .php-email-form textarea { + border-radius: 0; + box-shadow: none; + font-size: 14px; + border-radius: 0; +} +.contact .php-email-form input:focus, .contact .php-email-form textarea:focus { + border-color: #4154f1; +} +.contact .php-email-form input { + padding: 10px 15px; +} +.contact .php-email-form textarea { + padding: 12px 15px; +} +.contact .php-email-form button[type=submit] { + background: #4154f1; + border: 0; + padding: 10px 30px; + color: #fff; + transition: 0.4s; + border-radius: 4px; +} +.contact .php-email-form button[type=submit]:hover { + background: #5969f3; +} +@-webkit-keyframes animate-loading { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} +@keyframes animate-loading { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} + +/*-------------------------------------------------------------- +# Error 404 +--------------------------------------------------------------*/ +.error-404 { + padding: 30px; +} +.error-404 h1 { + font-size: 180px; + font-weight: 700; + color: #4154f1; + margin-bottom: 0; + line-height: 150px; +} +.error-404 h2 { + font-size: 24px; + font-weight: 700; + color: #012970; + margin-bottom: 30px; +} +.error-404 .btn { + background: #51678f; + color: #fff; + padding: 8px 30px; +} +.error-404 .btn:hover { + background: #3e4f6f; +} +@media (min-width: 992px) { + .error-404 img { + max-width: 50%; + } +} + +/*-------------------------------------------------------------- +# Footer +--------------------------------------------------------------*/ +.footer { + padding: 20px 0; + font-size: 14px; + transition: all 0.3s; + border-top: 1px solid #cddfff; +} +.footer .copyright { + text-align: center; + color: #012970; +} +.footer .credits { + padding-top: 5px; + text-align: center; + font-size: 13px; + color: #012970; +} diff --git a/ereuse_devicehub/static/css/style.css b/ereuse_devicehub/static/css/style.css index 4f4a98d3..a79a56cc 100644 --- a/ereuse_devicehub/static/css/style.css +++ b/ereuse_devicehub/static/css/style.css @@ -1,1106 +1,25 @@ /** -* Template Name: NiceAdmin - v2.2.0 -* Template URL: https://bootstrapmade.com/nice-admin-bootstrap-admin-html-template/ -* Author: BootstrapMade.com -* License: https://bootstrapmade.com/license/ +* eReuse CSS */ -/*-------------------------------------------------------------- -# General ---------------------------------------------------------------*/ -:root { - scroll-behavior: smooth; -} - -body { - font-family: "Open Sans", sans-serif; - background: #f6f9ff; - color: #444444; -} - -a { - color: #4154f1; - text-decoration: none; -} - -a:hover { - color: #717ff5; - text-decoration: none; -} - -h1, h2, h3, h4, h5, h6 { - font-family: "Nunito", sans-serif; -} - -/*-------------------------------------------------------------- -# Main ---------------------------------------------------------------*/ -#main { - margin-top: 60px; - padding: 20px 30px; - transition: all 0.3s; -} -@media (max-width: 1199px) { - #main { - padding: 20px; - } -} - -/*-------------------------------------------------------------- -# Page Title ---------------------------------------------------------------*/ -.pagetitle { - margin-bottom: 10px; -} -.pagetitle h1 { - font-size: 24px; - margin-bottom: 0; - font-weight: 600; - color: #012970; -} - -/*-------------------------------------------------------------- -# Back to top button ---------------------------------------------------------------*/ -.back-to-top { - position: fixed; - visibility: hidden; - opacity: 0; - right: 15px; - bottom: 15px; - z-index: 99999; - background: #4154f1; - width: 40px; - height: 40px; - border-radius: 4px; - transition: all 0.4s; -} -.back-to-top i { - font-size: 24px; - color: #fff; - line-height: 0; -} -.back-to-top:hover { - background: #6776f4; - color: #fff; -} -.back-to-top.active { - visibility: visible; - opacity: 1; -} - -/*-------------------------------------------------------------- -# Override some default Bootstrap stylings ---------------------------------------------------------------*/ -/* Dropdown menus */ -.dropdown-menu { - border-radius: 4px; - padding: 10px 0; - -webkit-animation-name: dropdown-animate; - animation-name: dropdown-animate; - -webkit-animation-duration: 0.2s; - animation-duration: 0.2s; - -webkit-animation-fill-mode: both; - animation-fill-mode: both; - border: 0; - box-shadow: 0 5px 30px 0 rgba(82, 63, 105, 0.2); -} -@media (max-width: 480px) { - .dropdown-menu { - width: 100vw !important; - } -} -.dropdown-menu .dropdown-header, .dropdown-menu .dropdown-footer { - text-align: center; - font-size: 15px; - padding: 10px 25px; -} -.dropdown-menu .dropdown-footer a { - color: #444444; - text-decoration: underline; -} -.dropdown-menu .dropdown-footer a:hover { - text-decoration: none; -} -.dropdown-menu .dropdown-divider { - color: #a5c5fe; - margin: 0; -} -.dropdown-menu .dropdown-item { - font-size: 14px; - padding: 10px 15px; - transition: 0.3s; -} -.dropdown-menu .dropdown-item i { - margin-right: 10px; - font-size: 18px; - line-height: 0; -} -.dropdown-menu .dropdown-item:hover { - background-color: #f6f9ff; -} - -@media (min-width: 768px) { - .dropdown-menu-arrow::before { - content: ""; - width: 13px; - height: 13px; - background: #fff; - position: absolute; - top: -7px; - right: 20px; - transform: rotate(45deg); - border-top: 1px solid #eaedf1; - border-left: 1px solid #eaedf1; - } -} -@-webkit-keyframes dropdown-animate { - 0% { - opacity: 0; - } - 100% { - opacity: 1; - } - 0% { - opacity: 0; - } -} -@keyframes dropdown-animate { - 0% { - opacity: 0; - } - 100% { - opacity: 1; - } - 0% { - opacity: 0; - } -} -/* Light Backgrounds */ -.bg-primary-light { - background-color: #cfe2ff; - border-color: #cfe2ff; -} - -.bg-secondary-light { - background-color: #e2e3e5; - border-color: #e2e3e5; -} - -.bg-success-light { - background-color: #d1e7dd; - border-color: #d1e7dd; -} - -.bg-danger-light { - background-color: #f8d7da; - border-color: #f8d7da; -} - -.bg-warning-light { - background-color: #fff3cd; - border-color: #fff3cd; -} - -.bg-info-light { - background-color: #cff4fc; - border-color: #cff4fc; -} - -.bg-dark-light { - background-color: #d3d3d4; - border-color: #d3d3d4; -} - -/* Card */ -.card { - margin-bottom: 30px; - border: none; - border-radius: 5px; - box-shadow: 0px 0 30px rgba(1, 41, 112, 0.1); - overflow: hidden; -} - -.card-header, .card-footer { - border-color: #ebeef4; - background-color: #fff; - color: #798eb3; - padding: 15px; -} - -.card-title { - padding: 20px 0 15px 0; - font-size: 18px; - font-weight: 500; - color: #012970; - font-family: "Poppins", sans-serif; -} -.card-title span { - color: #899bbd; - font-size: 14px; - font-weight: 400; -} - -.card-body { - padding: 0 20px 20px 20px; -} - -.card-img-overlay { - background-color: rgba(255, 255, 255, 0.6); -} - -/* Alerts */ -.alert-heading { - font-weight: 500; - font-family: "Poppins", sans-serif; - font-size: 20px; -} - -/* Close Button */ -.btn-close { - background-size: 25%; -} -.btn-close:focus { - outline: 0; - box-shadow: none; -} - -/* Accordion */ -.accordion-item { - border: 1px solid #ebeef4; -} - -.accordion-button:focus { - outline: 0; - box-shadow: none; -} -.accordion-button:not(.collapsed) { - color: #012970; - background-color: #f6f9ff; -} - -.accordion-flush .accordion-button { - padding: 15px 0; - background: none; - border: 0; -} -.accordion-flush .accordion-button:not(.collapsed) { - box-shadow: none; - color: #4154f1; -} -.accordion-flush .accordion-body { - padding: 0 0 15px 0; - color: #3e4f6f; - font-size: 15px; -} - -/* Breadcrumbs */ -.breadcrumb { - font-size: 14px; - font-family: "Nunito", sans-serif; - color: #899bbd; - font-weight: 600; -} -.breadcrumb a { - color: #899bbd; - transition: 0.3s; -} -.breadcrumb a:hover { - color: #51678f; -} -.breadcrumb .breadcrumb-item::before { - color: #899bbd; -} -.breadcrumb .active { - color: #51678f; - font-weight: 600; -} - -/* Bordered Tabs */ -.nav-tabs-bordered { - border-bottom: 2px solid #ebeef4; -} -.nav-tabs-bordered .nav-link { - margin-bottom: -2px; - border: none; - color: #2c384e; -} -.nav-tabs-bordered .nav-link:hover, .nav-tabs-bordered .nav-link:focus { - color: #4154f1; -} -.nav-tabs-bordered .nav-link.active { - background-color: #fff; - color: #4154f1; - border-bottom: 2px solid #4154f1; -} - -/*-------------------------------------------------------------- -# Header ---------------------------------------------------------------*/ -.logo { - line-height: 1; -} -@media (min-width: 1200px) { - .logo { - width: 280px; - } -} -.logo img { - max-height: 26px; - margin-right: 6px; -} -.logo span { - font-size: 26px; - font-weight: 700; - color: #012970; - font-family: "Nunito", sans-serif; -} - -.header { - transition: all 0.5s; - z-index: 997; - height: 60px; - box-shadow: 0px 2px 20px rgba(1, 41, 112, 0.1); - background-color: #fff; - padding-left: 20px; - /* Toggle Sidebar Button */ - /* Search Bar */ -} -.header .toggle-sidebar-btn { - font-size: 32px; - padding-left: 10px; - cursor: pointer; - color: #012970; -} -.header .search-bar { - min-width: 360px; - padding: 0 20px; -} -@media (max-width: 1199px) { - .header .search-bar { - position: fixed; - top: 50px; - left: 0; - right: 0; - padding: 20px; - box-shadow: 0px 0px 15px 0px rgba(1, 41, 112, 0.1); - background: white; - z-index: 9999; - transition: 0.3s; - visibility: hidden; - opacity: 0; - } - .header .search-bar-show { - top: 60px; - visibility: visible; - opacity: 1; - } -} -.header .search-form { - width: 100%; -} -.header .search-form input { - border: 0; - font-size: 14px; - color: #012970; - border: 1px solid rgba(1, 41, 112, 0.2); - padding: 7px 38px 7px 8px; - border-radius: 3px; - transition: 0.3s; - width: 100%; -} -.header .search-form input:focus, .header .search-form input:hover { - outline: none; - box-shadow: 0 0 10px 0 rgba(1, 41, 112, 0.15); - border: 1px solid rgba(1, 41, 112, 0.3); -} -.header .search-form button { - border: 0; - padding: 0; - margin-left: -30px; - background: none; -} -.header .search-form button i { - color: #012970; -} - -/*-------------------------------------------------------------- -# Header Nav ---------------------------------------------------------------*/ -.header-nav ul { - list-style: none; -} -.header-nav > ul { - margin: 0; - padding: 0; -} -.header-nav .nav-icon { - font-size: 20px; - color: #012970; -} -.header-nav .nav-profile { - color: #012970; -} -.header-nav .nav-profile img { - max-height: 36px; -} -.header-nav .nav-profile span { - font-size: 14px; - font-weight: 600; -} -.header-nav .badge-number { - position: absolute; - inset: 4px 6px auto auto; - font-weight: normal; - font-size: 11px; - padding: 3px 6px; -} -.header-nav .notifications .notification-item { - display: flex; - align-items: center; - padding: 15px 10px; - transition: 0.3s; -} -.header-nav .notifications .notification-item i { - margin: 0 20px 0 10px; - font-size: 24px; -} -.header-nav .notifications .notification-item h4 { - font-size: 16px; - font-weight: 600; - margin-bottom: 5px; -} -.header-nav .notifications .notification-item p { - font-size: 13px; - margin-bottom: 3px; - color: #919191; -} -.header-nav .notifications .notification-item:hover { - background-color: #f6f9ff; -} -.header-nav .messages .message-item { - padding: 15px 10px; - transition: 0.3s; -} -.header-nav .messages .message-item a { - display: flex; -} -.header-nav .messages .message-item img { - margin: 0 20px 0 10px; - max-height: 40px; -} -.header-nav .messages .message-item h4 { - font-size: 16px; - font-weight: 600; - margin-bottom: 5px; - color: #444444; -} -.header-nav .messages .message-item p { - font-size: 13px; - margin-bottom: 3px; - color: #919191; -} -.header-nav .messages .message-item:hover { - background-color: #f6f9ff; -} -.header-nav .profile { - min-width: 240px; - padding-bottom: 0; -} -.header-nav .profile .dropdown-header h6 { - font-size: 18px; - margin-bottom: 0; - font-weight: 600; - color: #444444; -} -.header-nav .profile .dropdown-header span { - font-size: 14px; -} -.header-nav .profile .dropdown-item { - font-size: 14px; - padding: 10px 15px; - transition: 0.3s; -} -.header-nav .profile .dropdown-item i { - margin-right: 10px; - font-size: 18px; - line-height: 0; -} -.header-nav .profile .dropdown-item:hover { - background-color: #f6f9ff; -} - -/*-------------------------------------------------------------- -# Sidebar ---------------------------------------------------------------*/ -.sidebar { - position: fixed; - top: 60px; - left: 0; - bottom: 0; - width: 300px; - z-index: 996; - transition: all 0.3s; - padding: 20px; - overflow-y: auto; - scrollbar-width: thin; - scrollbar-color: #aab7cf transparent; - box-shadow: 0px 0px 20px rgba(1, 41, 112, 0.1); - background-color: #fff; -} -@media (max-width: 1199px) { - .sidebar { - left: -300px; - } -} -.sidebar::-webkit-scrollbar { - width: 5px; - height: 8px; - background-color: #fff; -} -.sidebar::-webkit-scrollbar-thumb { - background-color: #aab7cf; -} - -@media (min-width: 1200px) { - #main, #footer { - margin-left: 300px; - } -} -@media (max-width: 1199px) { - .toggle-sidebar .sidebar { - left: 0; - } -} -@media (min-width: 1200px) { - .toggle-sidebar #main, .toggle-sidebar #footer { - margin-left: 0; - } - .toggle-sidebar .sidebar { - left: -300px; - } -} - -.sidebar-nav { - padding: 0; - margin: 0; - list-style: none; -} -.sidebar-nav li { - padding: 0; - margin: 0; - list-style: none; -} -.sidebar-nav .nav-item { - margin-bottom: 5px; -} -.sidebar-nav .nav-heading { - font-size: 11px; - text-transform: uppercase; - color: #899bbd; - font-weight: 600; - margin: 10px 0 5px 15px; -} -.sidebar-nav .nav-link { - display: flex; - align-items: center; - font-size: 15px; - font-weight: 600; - color: #4154f1; - transition: 0.3; - background: #f6f9ff; - padding: 10px 15px; - border-radius: 4px; -} -.sidebar-nav .nav-link i { - font-size: 16px; - margin-right: 10px; - color: #4154f1; -} -.sidebar-nav .nav-link.collapsed { - color: #012970; - background: #fff; -} -.sidebar-nav .nav-link.collapsed i { - color: #899bbd; -} -.sidebar-nav .nav-link:hover { - color: #4154f1; - background: #f6f9ff; -} -.sidebar-nav .nav-link:hover i { - color: #4154f1; -} -.sidebar-nav .nav-link .bi-chevron-down { - margin-right: 0; - transition: transform 0.2s ease-in-out; -} -.sidebar-nav .nav-link:not(.collapsed) .bi-chevron-down { - transform: rotate(180deg); -} -.sidebar-nav .nav-content { - padding: 5px 0 0 0; - margin: 0; - list-style: none; -} -.sidebar-nav .nav-content a { - display: flex; - align-items: center; - font-size: 14px; - font-weight: 600; - color: #012970; - transition: 0.3; - padding: 10px 0 10px 40px; - transition: 0.3s; -} -.sidebar-nav .nav-content a i { - font-size: 6px; - margin-right: 8px; - line-height: 0; - border-radius: 50%; -} -.sidebar-nav .nav-content a:hover, .sidebar-nav .nav-content a.active { - color: #4154f1; -} -.sidebar-nav .nav-content a.active i { - background-color: #4154f1; -} - -/*-------------------------------------------------------------- -# Dashboard ---------------------------------------------------------------*/ -/* Filter dropdown */ -.dashboard .filter { - position: absolute; - right: 0px; - top: 15px; -} -.dashboard .filter .icon { - color: #aab7cf; - padding-right: 20px; - padding-bottom: 5px; - transition: 0.3s; - font-size: 16px; -} -.dashboard .filter .icon:hover, .dashboard .filter .icon:focus { - color: #4154f1; -} -.dashboard .filter .dropdown-header { - padding: 8px 15px; -} -.dashboard .filter .dropdown-header h6 { - text-transform: uppercase; - font-size: 14px; - font-weight: 600; - letter-spacing: 1px; - color: #aab7cf; - margin-bottom: 0; - padding: 0; -} -.dashboard .filter .dropdown-item { - padding: 8px 15px; -} - -/* Info Cards */ -.dashboard .info-card { - padding-bottom: 10px; -} -.dashboard .info-card h6 { - font-size: 28px; - color: #012970; - font-weight: 700; - margin: 0; - padding: 0; -} -.dashboard .card-icon { - font-size: 32px; - line-height: 0; - width: 64px; - height: 64px; - flex-shrink: 0; - flex-grow: 0; -} -.dashboard .sales-card .card-icon { - color: #4154f1; - background: #f6f6fe; -} -.dashboard .revenue-card .card-icon { - color: #2eca6a; - background: #e0f8e9; -} -.dashboard .customers-card .card-icon { - color: #ff771d; - background: #ffecdf; -} - -/* Activity */ -.dashboard .activity { - font-size: 14px; -} -.dashboard .activity .activity-item .activite-label { - color: #888; - position: relative; - flex-shrink: 0; - flex-grow: 0; - min-width: 64px; -} -.dashboard .activity .activity-item .activite-label::before { - content: ""; - position: absolute; - right: -11px; - width: 4px; - top: 0; - bottom: 0; - background-color: #eceefe; -} -.dashboard .activity .activity-item .activity-badge { - margin-top: 3px; - z-index: 1; - font-size: 11px; - line-height: 0; - border-radius: 50%; - flex-shrink: 0; - border: 3px solid #fff; - flex-grow: 0; -} -.dashboard .activity .activity-item .activity-content { - padding-left: 10px; - padding-bottom: 20px; -} -.dashboard .activity .activity-item:first-child .activite-label::before { - top: 5px; -} -.dashboard .activity .activity-item:last-child .activity-content { - padding-bottom: 0; -} - -/* News & Updates */ -.dashboard .news .post-item + .post-item { - margin-top: 15px; -} -.dashboard .news img { - width: 80px; - float: left; - border-radius: 5px; -} -.dashboard .news h4 { - font-size: 15px; - margin-left: 95px; - font-weight: bold; - margin-bottom: 5px; -} -.dashboard .news h4 a { - color: #012970; - transition: 0.3s; -} -.dashboard .news h4 a:hover { - color: #4154f1; -} -.dashboard .news p { - font-size: 14px; - color: #777777; - margin-left: 95px; -} - -/* Recent Sales */ -.dashboard .recent-sales { - font-size: 14px; -} -.dashboard .recent-sales .table thead { - background: #f6f6fe; -} -.dashboard .recent-sales .table thead th { - border: 0; -} -.dashboard .recent-sales .dataTable-top { - padding: 0 0 10px 0; -} -.dashboard .recent-sales .dataTable-bottom { - padding: 10px 0 0 0; -} - -/* Top Selling */ -.dashboard .top-selling { - font-size: 14px; -} -.dashboard .top-selling .table thead { - background: #f6f6fe; -} -.dashboard .top-selling .table thead th { - border: 0; -} -.dashboard .top-selling .table tbody td { - vertical-align: middle; -} -.dashboard .top-selling img { - border-radius: 5px; - max-width: 60px; -} - -/*-------------------------------------------------------------- -# Icons list page ---------------------------------------------------------------*/ -.iconslist { - display: grid; - max-width: 100%; - grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); - gap: 1.25rem; - padding-top: 15px; -} -.iconslist .icon { - background-color: #fff; - border-radius: 0.25rem; - text-align: center; - color: #012970; - padding: 15px 0; -} -.iconslist i { - margin: 0.25rem; - font-size: 2.5rem; -} -.iconslist .label { - font-family: var(--bs-font-monospace); - display: inline-block; - width: 100%; - overflow: hidden; - padding: 0.25rem; - font-size: 12px; - text-overflow: ellipsis; - white-space: nowrap; - color: #666; -} - -/*-------------------------------------------------------------- -# Profie Page ---------------------------------------------------------------*/ -.profile .profile-card img { - max-width: 120px; -} -.profile .profile-card h2 { - font-size: 24px; - font-weight: 700; - color: #2c384e; - margin: 10px 0 0 0; -} -.profile .profile-card h3 { - font-size: 18px; -} -.profile .profile-card .social-links a { - font-size: 20px; - display: inline-block; - color: rgba(1, 41, 112, 0.5); - line-height: 0; - margin-right: 10px; - transition: 0.3s; -} -.profile .profile-card .social-links a:hover { - color: #012970; -} -.profile .profile-overview .row { - margin-bottom: 20px; - font-size: 15px; -} -.profile .profile-overview .card-title { - color: #012970; -} -.profile .profile-overview .label { - font-weight: 600; - color: rgba(1, 41, 112, 0.6); -} -.profile .profile-edit label { - font-weight: 600; - color: rgba(1, 41, 112, 0.6); -} -.profile .profile-edit img { - max-width: 120px; -} - -/*-------------------------------------------------------------- -# F.A.Q Page ---------------------------------------------------------------*/ -.faq .basic h6 { - font-size: 18px; - font-weight: 600; - color: #4154f1; -} -.faq .basic p { - color: #6980aa; -} - -/*-------------------------------------------------------------- -# Contact ---------------------------------------------------------------*/ -.contact .info-box { - padding: 28px 30px; -} -.contact .info-box i { - font-size: 38px; - line-height: 0; - color: #4154f1; -} -.contact .info-box h3 { - font-size: 20px; - color: #012970; - font-weight: 700; - margin: 20px 0 10px 0; -} -.contact .info-box p { - padding: 0; - line-height: 24px; - font-size: 14px; - margin-bottom: 0; -} -.contact .php-email-form .error-message { - display: none; - color: #fff; - background: #ed3c0d; - text-align: left; - padding: 15px; - margin-bottom: 24px; - font-weight: 600; -} -.contact .php-email-form .sent-message { - display: none; - color: #fff; - background: #18d26e; - text-align: center; - padding: 15px; - margin-bottom: 24px; - font-weight: 600; -} -.contact .php-email-form .loading { - display: none; - background: #fff; - text-align: center; - padding: 15px; - margin-bottom: 24px; -} -.contact .php-email-form .loading:before { - content: ""; - display: inline-block; - border-radius: 50%; - width: 24px; - height: 24px; - margin: 0 10px -6px 0; - border: 3px solid #18d26e; - border-top-color: #eee; - -webkit-animation: animate-loading 1s linear infinite; - animation: animate-loading 1s linear infinite; -} -.contact .php-email-form input, .contact .php-email-form textarea { - border-radius: 0; - box-shadow: none; - font-size: 14px; - border-radius: 0; -} -.contact .php-email-form input:focus, .contact .php-email-form textarea:focus { - border-color: #4154f1; -} -.contact .php-email-form input { - padding: 10px 15px; -} -.contact .php-email-form textarea { - padding: 12px 15px; -} -.contact .php-email-form button[type=submit] { - background: #4154f1; - border: 0; - padding: 10px 30px; - color: #fff; - transition: 0.4s; - border-radius: 4px; -} -.contact .php-email-form button[type=submit]:hover { - background: #5969f3; -} -@-webkit-keyframes animate-loading { - 0% { - transform: rotate(0deg); - } - 100% { - transform: rotate(360deg); - } -} -@keyframes animate-loading { - 0% { - transform: rotate(0deg); - } - 100% { - transform: rotate(360deg); - } -} - -/*-------------------------------------------------------------- -# Error 404 ---------------------------------------------------------------*/ -.error-404 { - padding: 30px; -} -.error-404 h1 { - font-size: 180px; - font-weight: 700; - color: #4154f1; - margin-bottom: 0; - line-height: 150px; -} -.error-404 h2 { - font-size: 24px; - font-weight: 700; - color: #012970; - margin-bottom: 30px; -} -.error-404 .btn { - background: #51678f; - color: #fff; - padding: 8px 30px; -} -.error-404 .btn:hover { - background: #3e4f6f; -} -@media (min-width: 992px) { - .error-404 img { - max-width: 50%; - } -} - -/*-------------------------------------------------------------- -# Footer ---------------------------------------------------------------*/ -.footer { - padding: 20px 0; - font-size: 14px; - transition: all 0.3s; - border-top: 1px solid #cddfff; -} -.footer .copyright { - text-align: center; - color: #012970; -} -.footer .credits { - padding-top: 5px; - text-align: center; - font-size: 13px; - color: #012970; -} - /*-------------------------------------------------------------- # LotsSelector --------------------------------------------------------------*/ #dropDownLotsSelector { - max-height: 500px; + max-height: 500px; } -#dropDownLotsSelector > ul#LotsSelector { - list-style-type: none; - margin: 0; - padding: 0; - min-width: max-content; - max-height: 40vh; - overflow-y: auto; +#dropDownLotsSelector>ul#LotsSelector { + list-style-type: none; + margin: 0; + padding: 0; + min-width: max-content; + max-height: 40vh; + overflow-y: auto; } #dropDownLotsSelector #ApplyDeviceLots { - padding-top: 0px; - padding-bottom: 5px; -} \ No newline at end of file + padding-top: 0px; + padding-bottom: 5px; +} diff --git a/ereuse_devicehub/templates/ereuse_devicehub/base.html b/ereuse_devicehub/templates/ereuse_devicehub/base.html index 8e147828..cad2e813 100644 --- a/ereuse_devicehub/templates/ereuse_devicehub/base.html +++ b/ereuse_devicehub/templates/ereuse_devicehub/base.html @@ -28,6 +28,7 @@ + {% endblock main %} From 4ab692405f48b8b16462824fbf20b9ee5d5fb073 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 25 Apr 2022 11:30:41 +0200 Subject: [PATCH 066/154] add migrations change sid for wbid --- .../6f6771813f2e_change_wbid_for_sid.py | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 ereuse_devicehub/migrations/versions/6f6771813f2e_change_wbid_for_sid.py diff --git a/ereuse_devicehub/migrations/versions/6f6771813f2e_change_wbid_for_sid.py b/ereuse_devicehub/migrations/versions/6f6771813f2e_change_wbid_for_sid.py new file mode 100644 index 00000000..ca4e7212 --- /dev/null +++ b/ereuse_devicehub/migrations/versions/6f6771813f2e_change_wbid_for_sid.py @@ -0,0 +1,49 @@ +"""change wbid for sid + +Revision ID: 6f6771813f2e +Revises: 97bef94f7982 +Create Date: 2022-04-25 10:52:11.767569 + +""" +import citext +import sqlalchemy as sa +from alembic import context, op + +# revision identifiers, used by Alembic. +revision = '6f6771813f2e' +down_revision = '97bef94f7982' +branch_labels = None +depends_on = None + + +def get_inv(): + INV = context.get_x_argument(as_dictionary=True).get('inventory') + if not INV: + raise ValueError("Inventory value is not specified") + return INV + + +def upgrade_datas(): + con = op.get_bind() + sql = f"select wbid from {get_inv()}.snapshot;" + snapshots = con.execute(sql) + for snap in snapshots: + wbid = snap.wbid + if wbid: + sql = f"""update {get_inv()}.snapshot set sid='{wbid}' + where wbid='{wbid}';""" + con.execute(sql) + + +def upgrade(): + op.add_column( + 'snapshot', + sa.Column('sid', citext.CIText(), nullable=True), + schema=f'{get_inv()}', + ) + upgrade_datas() + op.drop_column('snapshot', 'wbid', schema=f'{get_inv()}') + + +def downgrade(): + op.drop_column('snapshot', 'sid', schema=f'{get_inv()}') From 9b1e8617fab7aaf041dbbbc897f0ee7d3a511cd4 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 25 Apr 2022 11:43:30 +0200 Subject: [PATCH 067/154] add sid in snapshot_errors --- .../6f6771813f2e_change_wbid_for_sid.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/ereuse_devicehub/migrations/versions/6f6771813f2e_change_wbid_for_sid.py b/ereuse_devicehub/migrations/versions/6f6771813f2e_change_wbid_for_sid.py index ca4e7212..6debf4dd 100644 --- a/ereuse_devicehub/migrations/versions/6f6771813f2e_change_wbid_for_sid.py +++ b/ereuse_devicehub/migrations/versions/6f6771813f2e_change_wbid_for_sid.py @@ -34,6 +34,15 @@ def upgrade_datas(): where wbid='{wbid}';""" con.execute(sql) + sql = f"select wbid from {get_inv()}.snapshot_errors;" + snapshots = con.execute(sql) + for snap in snapshots: + wbid = snap.wbid + if wbid: + sql = f"""update {get_inv()}.snapshot set sid='{wbid}' + where wbid='{wbid}';""" + con.execute(sql) + def upgrade(): op.add_column( @@ -44,6 +53,16 @@ def upgrade(): upgrade_datas() op.drop_column('snapshot', 'wbid', schema=f'{get_inv()}') + op.add_column( + 'snapshot_errors', + sa.Column('sid', citext.CIText(), nullable=True), + schema=f'{get_inv()}', + ) + upgrade_datas() + op.drop_column('snapshot', 'wbid', schema=f'{get_inv()}') + op.drop_column('snapshot_errors', 'wbid', schema=f'{get_inv()}') + def downgrade(): op.drop_column('snapshot', 'sid', schema=f'{get_inv()}') + op.drop_column('snapshot_errors', 'sid', schema=f'{get_inv()}') From be53827c02595b9994d56a4f39a5ff589325b27b Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 25 Apr 2022 11:45:25 +0200 Subject: [PATCH 068/154] sid in parser and inventory --- ereuse_devicehub/api/views.py | 4 ++-- ereuse_devicehub/inventory/forms.py | 4 ++-- ereuse_devicehub/parser/models.py | 2 +- ereuse_devicehub/parser/parser.py | 24 +++++++++++++----------- ereuse_devicehub/parser/schemas.py | 2 +- 5 files changed, 19 insertions(+), 17 deletions(-) diff --git a/ereuse_devicehub/api/views.py b/ereuse_devicehub/api/views.py index 57796675..2b353445 100644 --- a/ereuse_devicehub/api/views.py +++ b/ereuse_devicehub/api/views.py @@ -56,9 +56,9 @@ class InventoryView(LoginMix, SnapshotMix): except Exception as err: txt = "{}, {}".format(err.__class__, err) uuid = snapshot_json.get('uuid') - wbid = snapshot_json.get('wbid') + sid = snapshot_json.get('sid') error = SnapshotErrors( - description=txt, snapshot_uuid=uuid, severity=Severity.Error, wbid=wbid + description=txt, snapshot_uuid=uuid, severity=Severity.Error, sid=sid ) error.save(commit=True) self.response = jsonify('') diff --git a/ereuse_devicehub/inventory/forms.py b/ereuse_devicehub/inventory/forms.py index c2ca71cd..b654bec8 100644 --- a/ereuse_devicehub/inventory/forms.py +++ b/ereuse_devicehub/inventory/forms.py @@ -208,12 +208,12 @@ class UploadSnapshotForm(FlaskForm, SnapshotMix): except ValidationError as err: txt = "{}".format(err) uuid = snapshot_json.get('uuid') - wbid = snapshot_json.get('wbid') + sid = snapshot_json.get('sid') error = SnapshotErrors( description=txt, snapshot_uuid=uuid, severity=Severity.Error, - wbid=wbid, + sid=sid, ) error.save(commit=True) self.result[filename] = 'Error' diff --git a/ereuse_devicehub/parser/models.py b/ereuse_devicehub/parser/models.py index edec89af..54f02461 100644 --- a/ereuse_devicehub/parser/models.py +++ b/ereuse_devicehub/parser/models.py @@ -14,7 +14,7 @@ class SnapshotErrors(Thing): id = Column(BigInteger, Sequence('snapshot_errors_seq'), primary_key=True) description = Column(CIText(), default='', nullable=False) - wbid = Column(CIText(), nullable=True) + sid = Column(CIText(), nullable=True) severity = Column(SmallInteger, default=Severity.Info, nullable=False) snapshot_uuid = Column(UUID(as_uuid=True), nullable=False) owner_id = db.Column( diff --git a/ereuse_devicehub/parser/parser.py b/ereuse_devicehub/parser/parser.py index f1109f22..dccbb22c 100644 --- a/ereuse_devicehub/parser/parser.py +++ b/ereuse_devicehub/parser/parser.py @@ -37,7 +37,7 @@ class ParseSnapshot: "version": "14.0.0", "endTime": snapshot["timestamp"], "elapsed": 1, - "wbid": snapshot["wbid"], + "sid": snapshot["sid"], } def get_snapshot(self): @@ -317,7 +317,7 @@ class ParseSnapshotLsHw: def __init__(self, snapshot, default="n/a"): self.default = default self.uuid = snapshot.get("uuid") - self.wbid = snapshot.get("wbid") + self.sid = snapshot.get("sid") self.dmidecode_raw = snapshot["data"]["dmidecode"] self.smart = snapshot["data"]["smart"] self.hwinfo_raw = snapshot["data"]["hwinfo"] @@ -342,7 +342,7 @@ class ParseSnapshotLsHw: "version": "14.0.0", "endTime": snapshot["timestamp"], "elapsed": 1, - "wbid": snapshot["wbid"], + "sid": snapshot["sid"], } def get_snapshot(self): @@ -398,8 +398,10 @@ class ParseSnapshotLsHw: def get_ram_size(self, ram): size = ram.get("Size") if not len(size.split(" ")) == 2: - txt = "Error: Snapshot: {uuid}, tag: {wbid} have this ram Size: {size}".format( - uuid=self.uuid, size=size, wbid=self.wbid + txt = ( + "Error: Snapshot: {uuid}, tag: {sid} have this ram Size: {size}".format( + uuid=self.uuid, size=size, sid=self.sid + ) ) self.errors(txt) return 128 @@ -409,8 +411,8 @@ class ParseSnapshotLsHw: def get_ram_speed(self, ram): speed = ram.get("Speed", "100") if not len(speed.split(" ")) == 2: - txt = "Error: Snapshot: {uuid}, tag: {wbid} have this ram Speed: {speed}".format( - uuid=self.uuid, speed=speed, wbid=self.wbid + txt = "Error: Snapshot: {uuid}, tag: {sid} have this ram Speed: {speed}".format( + uuid=self.uuid, speed=speed, sid=self.sid ) self.errors(txt) return 100 @@ -444,8 +446,8 @@ class ParseSnapshotLsHw: uuid.UUID(dmi_uuid) except (ValueError, AttributeError) as err: self.errors("{}".format(err)) - txt = "Error: Snapshot: {uuid} tag: {wbid} have this uuid: {device}".format( - uuid=self.uuid, device=dmi_uuid, wbid=self.wbid + txt = "Error: Snapshot: {uuid} tag: {sid} have this uuid: {device}".format( + uuid=self.uuid, device=dmi_uuid, sid=self.sid ) self.errors(txt) dmi_uuid = None @@ -491,7 +493,7 @@ class ParseSnapshotLsHw: DataStorageInterface(interface.upper()) except ValueError as err: txt = "tag: {}, interface {} is not in DataStorageInterface Enum".format( - interface, self.wbid + interface, self.sid ) self.errors("{}".format(err)) self.errors(txt) @@ -533,6 +535,6 @@ class ParseSnapshotLsHw: logger.error(txt) self._errors.append(txt) error = SnapshotErrors( - description=txt, snapshot_uuid=self.uuid, severity=severity, wbid=self.wbid + description=txt, snapshot_uuid=self.uuid, severity=severity, sid=self.sid ) error.save() diff --git a/ereuse_devicehub/parser/schemas.py b/ereuse_devicehub/parser/schemas.py index f65f9090..5eab969c 100644 --- a/ereuse_devicehub/parser/schemas.py +++ b/ereuse_devicehub/parser/schemas.py @@ -19,7 +19,7 @@ class Snapshot_lite(Thing): version = String(required=True) schema_api = String(required=True) software = String(required=True) - wbid = String(required=True) + sid = String(required=True) type = String(required=True) timestamp = String(required=True) data = Nested(Snapshot_lite_data) From 7b784b61742fb1d84dfea0995df084e9522b1091 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 25 Apr 2022 11:45:50 +0200 Subject: [PATCH 069/154] sid in snapshot action --- ereuse_devicehub/resources/action/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ereuse_devicehub/resources/action/models.py b/ereuse_devicehub/resources/action/models.py index 92805ab5..0e6decce 100644 --- a/ereuse_devicehub/resources/action/models.py +++ b/ereuse_devicehub/resources/action/models.py @@ -664,7 +664,7 @@ class Snapshot(JoinedWithOneDeviceMixin, ActionWithOneDevice): elapsed.comment = """For Snapshots made with Workbench, the total amount of time it took to complete. """ - wbid = Column(CIText(), nullable=True) + sid = Column(CIText(), nullable=True) def get_last_lifetimes(self): """We get the lifetime and serial_number of the first disk""" From 538541cd4dd815895e0a087212f25a4c91687abd Mon Sep 17 00:00:00 2001 From: RubenPX Date: Mon, 25 Apr 2022 11:49:11 +0200 Subject: [PATCH 070/154] filter in out trades from lots selector --- ereuse_devicehub/static/js/api.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ereuse_devicehub/static/js/api.js b/ereuse_devicehub/static/js/api.js index 190e5d42..8163e293 100644 --- a/ereuse_devicehub/static/js/api.js +++ b/ereuse_devicehub/static/js/api.js @@ -5,7 +5,10 @@ const Api = { */ async get_lots() { const request = await this.doRequest(API_URLS.lots, "GET", null); - if (request != undefined) return request.items; + if (request != undefined) { + request.items = request.items.filter(itm => !itm.trade) // Avoid show outgoing or incomming trades + return request.items; + } throw request; }, From a362c8644b8d964758a8fe1be8451c054c6e2e96 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 25 Apr 2022 11:53:27 +0200 Subject: [PATCH 071/154] add sid instead of wbid in schema action snapshot --- ereuse_devicehub/resources/action/models.py | 6 ++++-- ereuse_devicehub/resources/action/schemas.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ereuse_devicehub/resources/action/models.py b/ereuse_devicehub/resources/action/models.py index 0e6decce..c0876598 100644 --- a/ereuse_devicehub/resources/action/models.py +++ b/ereuse_devicehub/resources/action/models.py @@ -17,12 +17,12 @@ from datetime import datetime, timedelta, timezone from decimal import ROUND_HALF_EVEN, ROUND_UP, Decimal from typing import Optional, Set, Union from uuid import uuid4 -from dateutil.tz import tzutc import inflection import teal.db from boltons import urlutils from citext import CIText +from dateutil.tz import tzutc from flask import current_app as app from flask import g from sortedcontainers import SortedSet @@ -274,7 +274,9 @@ class Action(Thing): super().__init__(**kwargs) def __lt__(self, other): - return self.end_time.replace(tzinfo=tzutc()) < other.end_time.replace(tzinfo=tzutc()) + return self.end_time.replace(tzinfo=tzutc()) < other.end_time.replace( + tzinfo=tzutc() + ) def __str__(self) -> str: return '{}'.format(self.severity) diff --git a/ereuse_devicehub/resources/action/schemas.py b/ereuse_devicehub/resources/action/schemas.py index 5c8f2d5f..9dadab2c 100644 --- a/ereuse_devicehub/resources/action/schemas.py +++ b/ereuse_devicehub/resources/action/schemas.py @@ -425,7 +425,7 @@ class Snapshot(ActionWithOneDevice): See docs for more info. """ uuid = UUID() - wbid = String(required=False) + sid = String(required=False) software = EnumField( SnapshotSoftware, required=True, From 531e213eff924f7e4b4e902652cd213393856d98 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 25 Apr 2022 11:54:16 +0200 Subject: [PATCH 072/154] change sid for wbid in tests --- ...h18m51s_ZQMPKKX51K67R68VO2X9RNZL08JPL_snapshot.json | 2 +- ...h28m54s_YKPZ27NJ2NMRO4893M4L5NRZV5YJ1_snapshot.json | 2 +- tests/files/desktop-amd-bug-no-sn.json | 2 +- .../qemu-cc9927a9-55ad-4937-b36b-7185147d9fa9.json | 2 +- tests/files/snapshot-error-timestamp.json | 4 ++-- tests/test_snapshot.py | 10 +++++----- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/files/2022-03-31_17h18m51s_ZQMPKKX51K67R68VO2X9RNZL08JPL_snapshot.json b/tests/files/2022-03-31_17h18m51s_ZQMPKKX51K67R68VO2X9RNZL08JPL_snapshot.json index 45065b64..2a4c85a7 100644 --- a/tests/files/2022-03-31_17h18m51s_ZQMPKKX51K67R68VO2X9RNZL08JPL_snapshot.json +++ b/tests/files/2022-03-31_17h18m51s_ZQMPKKX51K67R68VO2X9RNZL08JPL_snapshot.json @@ -2,7 +2,7 @@ "timestamp": "2022-03-31T19:09:57.167164", "type": "Snapshot", "uuid": "cdecaf47-6e32-4ccb-b689-95c064d8c514", - "wbid": "MLKO1Y0R55XZM051WQ5KJM01RY44Q", + "sid": "MLKO1Y0R55XZM051WQ5KJM01RY44Q", "software": "Workbench", "version": "2022.03.00", "schema_api": "1.0.0", diff --git a/tests/files/2022-04-01_06h28m54s_YKPZ27NJ2NMRO4893M4L5NRZV5YJ1_snapshot.json b/tests/files/2022-04-01_06h28m54s_YKPZ27NJ2NMRO4893M4L5NRZV5YJ1_snapshot.json index f11364c8..e5039188 100644 --- a/tests/files/2022-04-01_06h28m54s_YKPZ27NJ2NMRO4893M4L5NRZV5YJ1_snapshot.json +++ b/tests/files/2022-04-01_06h28m54s_YKPZ27NJ2NMRO4893M4L5NRZV5YJ1_snapshot.json @@ -2,7 +2,7 @@ "timestamp": "2022-04-01 06:28:54.099394", "type": "Snapshot", "uuid": "232b44f3-b139-490e-90c8-2748a4523e80", - "wbid": "YKPZ27NJ2NMRO4893M4L5NRZV5YJ1", + "sid": "YKPZ27NJ2NMRO4893M4L5NRZV5YJ1", "software": "Workbench", "version": "2022.03.00", "schema_api": "1.0.0", diff --git a/tests/files/desktop-amd-bug-no-sn.json b/tests/files/desktop-amd-bug-no-sn.json index e7c16f81..85dbe4f9 100644 --- a/tests/files/desktop-amd-bug-no-sn.json +++ b/tests/files/desktop-amd-bug-no-sn.json @@ -1 +1 @@ -{"timestamp": "2022-04-18T10:44:04.563919", "type": "Snapshot", "uuid": "2280776b-2fed-4c22-8ada-b57000da8059", "wbid": "G8V4Y", "software": "Workbench", "version": "2022.03.3-alpha", "schema_api": "1.0.0", "data": {"lshw": {"id": "workbench-live", "class": "system", "claimed": true, "handle": "DMI:0001", "description": "Desktop Computer", "product": "System Product Name (To Be Filled By O.E.M.)", "vendor": "System manufacturer", "version": "System Version", "serial": "System Serial Number", "width": 64, "configuration": {"boot": "normal", "chassis": "desktop", "family": "To Be Filled By O.E.M.", "sku": "To Be Filled By O.E.M.", "uuid": "a7130988-fe74-11d5-8893-24e75bf3a527"}, "capabilities": {"smbios-2.4": "SMBIOS version 2.4", "dmi-2.4": "DMI version 2.4", "smp": "Symmetric Multi-Processing", "vsyscall32": "32-bit processes"}, "children": [{"id": "core", "class": "bus", "claimed": true, "handle": "DMI:0002", "description": "Motherboard", "product": "P5B-MX/WiFi-AP", "vendor": "ASUSTeK Computer INC.", "physid": "0", "version": "x.xx", "serial": "MB-1234567890", "slot": "To Be Filled By O.E.M.", "children": [{"id": "firmware", "class": "memory", "claimed": true, "description": "BIOS", "vendor": "American Megatrends Inc.", "physid": "0", "version": "0604", "date": "05/06/2007", "units": "bytes", "size": 65536, "capacity": 524288, "capabilities": {"isa": "ISA bus", "pci": "PCI bus", "pnp": "Plug-and-Play", "apm": "Advanced Power Management", "upgrade": "BIOS EEPROM can be upgraded", "shadowing": "BIOS shadowing", "escd": "ESCD", "cdboot": "Booting from CD-ROM/DVD", "bootselect": "Selectable boot path", "socketedrom": "BIOS ROM is socketed", "edd": "Enhanced Disk Drive extensions", "int13floppy1200": "5.25\" 1.2MB floppy", "int13floppy720": "3.5\" 720KB floppy", "int13floppy2880": "3.5\" 2.88MB floppy", "int5printscreen": "Print Screen key", "int9keyboard": "i8042 keyboard controller", "int14serial": "INT14 serial line control", "int17printer": "INT17 printer control", "int10video": "INT10 CGA/Mono video", "acpi": "ACPI", "usb": "USB legacy emulation", "ls120boot": "Booting from LS-120", "zipboot": "Booting from ATAPI ZIP", "biosbootspecification": "BIOS boot specification"}}, {"id": "cpu", "class": "processor", "claimed": true, "handle": "DMI:0004", "description": "CPU", "product": "Intel(R) Core(TM)2 CPU 6420 @ 2.13GHz", "vendor": "Intel Corp.", "physid": "4", "businfo": "cpu@0", "version": "6.15.6", "serial": "To Be Filled By O.E.M.", "slot": "Socket 775", "units": "Hz", "size": 1600085000, "capacity": 3800000000, "width": 64, "clock": 266000000, "configuration": {"microcode": "198"}, "capabilities": {"fpu": "mathematical co-processor", "fpu_exception": "FPU exceptions reporting", "wp": true, "vme": "virtual mode extensions", "de": "debugging extensions", "pse": "page size extensions", "tsc": "time stamp counter", "msr": "model-specific registers", "pae": "4GB+ memory addressing (Physical Address Extension)", "mce": "machine check exceptions", "cx8": "compare and exchange 8-byte", "apic": "on-chip advanced programmable interrupt controller (APIC)", "sep": "fast system calls", "mtrr": "memory type range registers", "pge": "page global enable", "mca": "machine check architecture", "cmov": "conditional move instruction", "pat": "page attribute table", "pse36": "36-bit page size extensions", "clflush": true, "dts": "debug trace and EMON store MSRs", "acpi": "thermal control (ACPI)", "mmx": "multimedia extensions (MMX)", "fxsr": "fast floating point save/restore", "sse": "streaming SIMD extensions (SSE)", "sse2": "streaming SIMD extensions (SSE2)", "ht": "HyperThreading", "tm": "thermal interrupt and status", "pbe": "pending break event", "syscall": "fast system calls", "nx": "no-execute bit (NX)", "x86-64": "64bits extensions (x86-64)", "constant_tsc": true, "arch_perfmon": true, "pebs": true, "bts": true, "nopl": true, "cpuid": true, "aperfmperf": true, "pni": true, "dtes64": true, "monitor": true, "ds_cpl": true, "vmx": true, "est": true, "tm2": true, "ssse3": true, "cx16": true, "xtpr": true, "pdcm": true, "lahf_lm": true, "pti": true, "tpr_shadow": true, "dtherm": true, "cpufreq": "CPU Frequency scaling"}, "children": [{"id": "cache:0", "class": "memory", "claimed": true, "handle": "DMI:0005", "description": "L1 cache", "physid": "5", "slot": "L1-Cache", "units": "bytes", "size": 65536, "capacity": 65536, "configuration": {"level": "1"}, "capabilities": {"internal": "Internal", "write-back": "Write-back", "data": "Data cache"}}, {"id": "cache:1", "class": "memory", "claimed": true, "handle": "DMI:0006", "description": "L2 cache", "physid": "6", "slot": "L2-Cache", "units": "bytes", "size": 4194304, "capacity": 4194304, "configuration": {"level": "2"}, "capabilities": {"internal": "Internal", "write-back": "Write-back", "instruction": "Instruction cache"}}]}, {"id": "memory", "class": "memory", "claimed": true, "handle": "DMI:0029", "description": "System Memory", "physid": "29", "slot": "System board or motherboard", "units": "bytes", "size": 2684354560, "children": [{"id": "bank:0", "class": "memory", "claimed": true, "handle": "DMI:002B", "description": "DIMM DDR2 Synchronous 667 MHz (1.5 ns)", "product": "PartNum0", "vendor": "Manufacturer0", "physid": "0", "serial": "SerNum0", "slot": "DIMM A1", "units": "bytes", "size": 2147483648, "width": 64, "clock": 667000000}, {"id": "bank:1", "class": "memory", "claimed": true, "handle": "DMI:002D", "description": "DIMM DDR2 Synchronous 667 MHz (1.5 ns)", "product": "PartNum1", "vendor": "Manufacturer1", "physid": "1", "serial": "SerNum1", "slot": "DIMM B1", "units": "bytes", "size": 536870912, "width": 64, "clock": 667000000}]}, {"id": "pci", "class": "bridge", "claimed": true, "handle": "PCIBUS:0000:00", "description": "Host bridge", "product": "82946GZ/PL/GL Memory Controller Hub", "vendor": "Intel Corporation", "physid": "100", "businfo": "pci@0000:00:00.0", "version": "02", "width": 32, "clock": 33000000, "children": [{"id": "display", "class": "display", "claimed": true, "handle": "PCI:0000:00:02.0", "description": "VGA compatible controller", "product": "82946GZ/GL Integrated Graphics Controller", "vendor": "Intel Corporation", "physid": "2", "businfo": "pci@0000:00:02.0", "logicalname": "/dev/fb0", "version": "02", "width": 64, "clock": 33000000, "configuration": {"depth": "32", "driver": "i915", "latency": "0", "resolution": "1920,1200"}, "capabilities": {"msi": "Message Signalled Interrupts", "pm": "Power Management", "vga_controller": true, "bus_master": "bus mastering", "cap_list": "PCI capabilities listing", "rom": "extension ROM", "fb": "framebuffer"}}, {"id": "multimedia", "class": "multimedia", "claimed": true, "handle": "PCI:0000:00:1b.0", "description": "Audio device", "product": "NM10/ICH7 Family High Definition Audio Controller", "vendor": "Intel Corporation", "physid": "1b", "businfo": "pci@0000:00:1b.0", "logicalname": ["card0", "/dev/snd/controlC0", "/dev/snd/hwC0D0", "/dev/snd/pcmC0D0c", "/dev/snd/pcmC0D0p", "/dev/snd/pcmC0D1p", "/dev/snd/pcmC0D2c"], "version": "01", "width": 64, "clock": 33000000, "configuration": {"driver": "snd_hda_intel", "latency": "0"}, "capabilities": {"pm": "Power Management", "msi": "Message Signalled Interrupts", "pciexpress": "PCI Express", "bus_master": "bus mastering", "cap_list": "PCI capabilities listing"}, "children": [{"id": "input:0", "class": "input", "claimed": true, "product": "HDA Intel Front Mic", "physid": "0", "logicalname": ["input11", "/dev/input/event10"]}, {"id": "input:1", "class": "input", "claimed": true, "product": "HDA Intel Rear Mic", "physid": "1", "logicalname": ["input12", "/dev/input/event11"]}, {"id": "input:2", "class": "input", "claimed": true, "product": "HDA Intel Line", "physid": "2", "logicalname": ["input13", "/dev/input/event12"]}, {"id": "input:3", "class": "input", "claimed": true, "product": "HDA Intel Line Out", "physid": "3", "logicalname": ["input14", "/dev/input/event13"]}, {"id": "input:4", "class": "input", "claimed": true, "product": "HDA Intel Front Headphone", "physid": "4", "logicalname": ["input15", "/dev/input/event14"]}]}, {"id": "pci:0", "class": "bridge", "claimed": true, "handle": "PCIBUS:0000:03", "description": "PCI bridge", "product": "NM10/ICH7 Family PCI Express Port 1", "vendor": "Intel Corporation", "physid": "1c", "businfo": "pci@0000:00:1c.0", "version": "01", "width": 32, "clock": 33000000, "configuration": {"driver": "pcieport"}, "capabilities": {"pci": true, "pciexpress": "PCI Express", "msi": "Message Signalled Interrupts", "pm": "Power Management", "normal_decode": true, "bus_master": "bus mastering", "cap_list": "PCI capabilities listing"}}, {"id": "pci:1", "class": "bridge", "claimed": true, "handle": "PCIBUS:0000:02", "description": "PCI bridge", "product": "NM10/ICH7 Family PCI Express Port 2", "vendor": "Intel Corporation", "physid": "1c.1", "businfo": "pci@0000:00:1c.1", "version": "01", "width": 32, "clock": 33000000, "configuration": {"driver": "pcieport"}, "capabilities": {"pci": true, "pciexpress": "PCI Express", "msi": "Message Signalled Interrupts", "pm": "Power Management", "normal_decode": true, "bus_master": "bus mastering", "cap_list": "PCI capabilities listing"}, "children": [{"id": "network", "class": "network", "claimed": true, "handle": "PCI:0000:02:00.0", "description": "Ethernet interface", "product": "Attansic L1 Gigabit Ethernet", "vendor": "Qualcomm Atheros", "physid": "0", "businfo": "pci@0000:02:00.0", "logicalname": "eth0", "version": "b0", "serial": "00:1b:fc:e7:ce:7a", "units": "bit/s", "size": 100000000, "capacity": 1000000000, "width": 64, "clock": 33000000, "configuration": {"autonegotiation": "on", "broadcast": "yes", "driver": "atl1", "driverversion": "5.10.0-13-amd64", "duplex": "full", "ip": "192.168.1.47", "latency": "0", "link": "yes", "multicast": "yes", "port": "twisted pair", "speed": "100Mbit/s"}, "capabilities": {"pm": "Power Management", "msi": "Message Signalled Interrupts", "pciexpress": "PCI Express", "vpd": "Vital Product Data", "bus_master": "bus mastering", "cap_list": "PCI capabilities listing", "rom": "extension ROM", "ethernet": true, "physical": "Physical interface", "tp": "twisted pair", "10bt": "10Mbit/s", "10bt-fd": "10Mbit/s (full duplex)", "100bt": "100Mbit/s", "100bt-fd": "100Mbit/s (full duplex)", "1000bt-fd": "1Gbit/s (full duplex)", "autonegotiation": "Auto-negotiation"}}]}, {"id": "pci:2", "class": "bridge", "claimed": true, "handle": "PCIBUS:0000:01", "description": "PCI bridge", "product": "NM10/ICH7 Family PCI Express Port 3", "vendor": "Intel Corporation", "physid": "1c.2", "businfo": "pci@0000:00:1c.2", "version": "01", "width": 32, "clock": 33000000, "configuration": {"driver": "pcieport"}, "capabilities": {"pci": true, "pciexpress": "PCI Express", "msi": "Message Signalled Interrupts", "pm": "Power Management", "normal_decode": true, "bus_master": "bus mastering", "cap_list": "PCI capabilities listing"}, "children": [{"id": "network", "class": "network", "disabled": true, "claimed": true, "handle": "PCI:0000:01:00.0", "description": "Wireless interface", "product": "AR242x / AR542x Wireless Network Adapter (PCI-Express)", "vendor": "Qualcomm Atheros", "physid": "0", "businfo": "pci@0000:01:00.0", "logicalname": "wlan0", "version": "01", "serial": "00:15:af:19:87:55", "width": 64, "clock": 33000000, "configuration": {"broadcast": "yes", "driver": "ath5k", "driverversion": "5.10.0-13-amd64", "firmware": "N/A", "latency": "0", "link": "no", "multicast": "yes", "wireless": "IEEE 802.11"}, "capabilities": {"pm": "Power Management", "msi": "Message Signalled Interrupts", "pciexpress": "PCI Express", "msix": "MSI-X", "bus_master": "bus mastering", "cap_list": "PCI capabilities listing", "ethernet": true, "physical": "Physical interface", "wireless": "Wireless-LAN"}}]}, {"id": "usb:0", "class": "bus", "claimed": true, "handle": "PCI:0000:00:1d.0", "description": "USB controller", "product": "NM10/ICH7 Family USB UHCI Controller #1", "vendor": "Intel Corporation", "physid": "1d", "businfo": "pci@0000:00:1d.0", "version": "01", "width": 32, "clock": 33000000, "configuration": {"driver": "uhci_hcd", "latency": "0"}, "capabilities": {"uhci": "Universal Host Controller Interface (USB1)", "bus_master": "bus mastering"}, "children": [{"id": "usbhost", "class": "bus", "claimed": true, "handle": "USB:1:1", "product": "UHCI Host Controller", "vendor": "Linux 5.10.0-13-amd64 uhci_hcd", "physid": "1", "businfo": "usb@1", "logicalname": "usb1", "version": "5.10", "configuration": {"driver": "hub", "slots": "2", "speed": "12Mbit/s"}, "capabilities": {"usb-1.10": "USB 1.1"}, "children": [{"id": "usb", "class": "input", "claimed": true, "handle": "USB:1:2", "description": "Keyboard", "product": "Razer Razer Huntsman Mini Consumer Control", "vendor": "Razer", "physid": "2", "businfo": "usb@1:2", "logicalname": ["input3", "/dev/input/event2", "input3::capslock", "input3::numlock", "input3::scrolllock", "input4", "/dev/input/event3", "input4::capslock", "input4::numlock", "input4::scrolllock", "input5", "/dev/input/event4", "input6", "/dev/input/event5", "input7", "/dev/input/event6", "input8", "/dev/input/event7", "/dev/input/mouse0", "input9", "/dev/input/event8"], "version": "2.00", "serial": "00000000001A", "configuration": {"driver": "usbhid", "maxpower": "500mA", "speed": "12Mbit/s"}, "capabilities": {"usb-2.00": "USB 2.0", "usb": "USB"}}]}]}, {"id": "usb:1", "class": "bus", "claimed": true, "handle": "PCI:0000:00:1d.1", "description": "USB controller", "product": "NM10/ICH7 Family USB UHCI Controller #2", "vendor": "Intel Corporation", "physid": "1d.1", "businfo": "pci@0000:00:1d.1", "version": "01", "width": 32, "clock": 33000000, "configuration": {"driver": "uhci_hcd", "latency": "0"}, "capabilities": {"uhci": "Universal Host Controller Interface (USB1)", "bus_master": "bus mastering"}, "children": [{"id": "usbhost", "class": "bus", "claimed": true, "handle": "USB:3:1", "product": "UHCI Host Controller", "vendor": "Linux 5.10.0-13-amd64 uhci_hcd", "physid": "1", "businfo": "usb@3", "logicalname": "usb3", "version": "5.10", "configuration": {"driver": "hub", "slots": "2", "speed": "12Mbit/s"}, "capabilities": {"usb-1.10": "USB 1.1"}}]}, {"id": "usb:2", "class": "bus", "claimed": true, "handle": "PCI:0000:00:1d.2", "description": "USB controller", "product": "NM10/ICH7 Family USB UHCI Controller #3", "vendor": "Intel Corporation", "physid": "1d.2", "businfo": "pci@0000:00:1d.2", "version": "01", "width": 32, "clock": 33000000, "configuration": {"driver": "uhci_hcd", "latency": "0"}, "capabilities": {"uhci": "Universal Host Controller Interface (USB1)", "bus_master": "bus mastering"}, "children": [{"id": "usbhost", "class": "bus", "claimed": true, "handle": "USB:4:1", "product": "UHCI Host Controller", "vendor": "Linux 5.10.0-13-amd64 uhci_hcd", "physid": "1", "businfo": "usb@4", "logicalname": "usb4", "version": "5.10", "configuration": {"driver": "hub", "slots": "2", "speed": "12Mbit/s"}, "capabilities": {"usb-1.10": "USB 1.1"}}]}, {"id": "usb:3", "class": "bus", "claimed": true, "handle": "PCI:0000:00:1d.3", "description": "USB controller", "product": "NM10/ICH7 Family USB UHCI Controller #4", "vendor": "Intel Corporation", "physid": "1d.3", "businfo": "pci@0000:00:1d.3", "version": "01", "width": 32, "clock": 33000000, "configuration": {"driver": "uhci_hcd", "latency": "0"}, "capabilities": {"uhci": "Universal Host Controller Interface (USB1)", "bus_master": "bus mastering"}, "children": [{"id": "usbhost", "class": "bus", "claimed": true, "handle": "USB:5:1", "product": "UHCI Host Controller", "vendor": "Linux 5.10.0-13-amd64 uhci_hcd", "physid": "1", "businfo": "usb@5", "logicalname": "usb5", "version": "5.10", "configuration": {"driver": "hub", "slots": "2", "speed": "12Mbit/s"}, "capabilities": {"usb-1.10": "USB 1.1"}}]}, {"id": "usb:4", "class": "bus", "claimed": true, "handle": "PCI:0000:00:1d.7", "description": "USB controller", "product": "NM10/ICH7 Family USB2 EHCI Controller", "vendor": "Intel Corporation", "physid": "1d.7", "businfo": "pci@0000:00:1d.7", "version": "01", "width": 32, "clock": 33000000, "configuration": {"driver": "ehci-pci", "latency": "0"}, "capabilities": {"pm": "Power Management", "debug": "Debug port", "ehci": "Enhanced Host Controller Interface (USB2)", "bus_master": "bus mastering", "cap_list": "PCI capabilities listing"}, "children": [{"id": "usbhost", "class": "bus", "claimed": true, "handle": "USB:2:1", "product": "EHCI Host Controller", "vendor": "Linux 5.10.0-13-amd64 ehci_hcd", "physid": "1", "businfo": "usb@2", "logicalname": "usb2", "version": "5.10", "configuration": {"driver": "hub", "slots": "8", "speed": "480Mbit/s"}, "capabilities": {"usb-2.00": "USB 2.0"}, "children": [{"id": "usb", "class": "storage", "claimed": true, "handle": "USB:2:2", "description": "Mass storage device", "product": "Mass Storage Device", "vendor": "JetFlash", "physid": "1", "businfo": "usb@2:1", "logicalname": "scsi4", "version": "11.00", "serial": "975NFSQ5RYYWZYQF", "configuration": {"driver": "usb-storage", "maxpower": "500mA", "speed": "480Mbit/s"}, "capabilities": {"usb-2.00": "USB 2.0", "scsi": "SCSI", "emulated": "Emulated device"}, "children": [{"id": "disk", "class": "disk", "claimed": true, "handle": "SCSI:04:00:00:00", "description": "SCSI Disk", "product": "Transcend 2GB", "vendor": "JetFlash", "physid": "0.0.0", "businfo": "scsi@4:0.0.0", "logicalname": "/dev/sdb", "dev": "8:16", "version": "1100", "serial": "AA00000000000485", "units": "bytes", "size": 2013265920, "configuration": {"ansiversion": "4", "logicalsectorsize": "512", "sectorsize": "512"}, "capabilities": {"removable": "support is removable"}, "children": [{"id": "medium", "class": "disk", "claimed": true, "physid": "0", "logicalname": "/dev/sdb", "dev": "8:16", "units": "bytes", "size": 2013265920, "configuration": {"signature": "528cd03d"}, "capabilities": {"partitioned": "Partitioned disk", "partitioned:dos": "MS-DOS partition table"}, "children": [{"id": "volume", "class": "volume", "claimed": true, "description": "Windows FAT volume", "vendor": "mkfs.fat", "physid": "2", "logicalname": "/dev/sdb2", "dev": "8:18", "version": "FAT16", "serial": "31d5-6be2", "size": 18446744073709549568, "configuration": {"FATs": "2", "filesystem": "fat"}, "capabilities": {"primary": "Primary partition", "boot": "Contains boot code", "fat": "Windows FAT", "initialized": "initialized volume"}}]}]}]}]}]}, {"id": "pci:3", "class": "bridge", "claimed": true, "handle": "PCIBUS:0000:04", "description": "PCI bridge", "product": "82801 PCI Bridge", "vendor": "Intel Corporation", "physid": "1e", "businfo": "pci@0000:00:1e.0", "version": "e1", "width": 32, "clock": 33000000, "capabilities": {"pci": true, "subtractive_decode": true, "bus_master": "bus mastering", "cap_list": "PCI capabilities listing"}}, {"id": "isa", "class": "bridge", "claimed": true, "handle": "PCI:0000:00:1f.0", "description": "ISA bridge", "product": "82801GB/GR (ICH7 Family) LPC Interface Bridge", "vendor": "Intel Corporation", "physid": "1f", "businfo": "pci@0000:00:1f.0", "version": "01", "width": 32, "clock": 33000000, "configuration": {"driver": "lpc_ich", "latency": "0"}, "capabilities": {"isa": true, "bus_master": "bus mastering", "cap_list": "PCI capabilities listing"}, "children": [{"id": "pnp00:00", "class": "system", "claimed": true, "product": "PnP device PNP0c01", "physid": "0", "configuration": {"driver": "system"}, "capabilities": {"pnp": true}}, {"id": "pnp00:01", "class": "system", "claimed": true, "product": "PnP device PNP0b00", "physid": "1", "configuration": {"driver": "rtc_cmos"}, "capabilities": {"pnp": true}}, {"id": "pnp00:02", "class": "storage", "claimed": true, "product": "PnP device PNP0700", "physid": "2", "capabilities": {"pnp": true}}, {"id": "pnp00:03", "class": "printer", "claimed": true, "product": "PnP device PNP0401", "physid": "3", "configuration": {"driver": "parport_pc"}, "capabilities": {"pnp": true}}, {"id": "pnp00:04", "class": "system", "claimed": true, "product": "PnP device PNP0c02", "physid": "4", "configuration": {"driver": "system"}, "capabilities": {"pnp": true}}, {"id": "pnp00:05", "class": "system", "claimed": true, "product": "PnP device PNP0c02", "physid": "5", "configuration": {"driver": "system"}, "capabilities": {"pnp": true}}, {"id": "pnp00:06", "class": "system", "claimed": true, "product": "PnP device PNP0c02", "physid": "6", "configuration": {"driver": "system"}, "capabilities": {"pnp": true}}, {"id": "pnp00:07", "class": "system", "claimed": true, "product": "PnP device PNP0c02", "physid": "7", "configuration": {"driver": "system"}, "capabilities": {"pnp": true}}, {"id": "pnp00:08", "class": "input", "claimed": true, "product": "PnP device PNP0303", "physid": "8", "configuration": {"driver": "i8042 kbd"}, "capabilities": {"pnp": true}}, {"id": "pnp00:09", "class": "communication", "claimed": true, "product": "PnP device PNP0501", "physid": "9", "configuration": {"driver": "serial"}, "capabilities": {"pnp": true}}, {"id": "pnp00:0a", "class": "system", "claimed": true, "product": "PnP device PNP0c02", "physid": "a", "configuration": {"driver": "system"}, "capabilities": {"pnp": true}}, {"id": "pnp00:0b", "class": "system", "claimed": true, "product": "PnP device PNP0c01", "physid": "b", "configuration": {"driver": "system"}, "capabilities": {"pnp": true}}]}, {"id": "ide:0", "class": "storage", "claimed": true, "handle": "PCI:0000:00:1f.1", "description": "IDE interface", "product": "82801G (ICH7 Family) IDE Controller", "vendor": "Intel Corporation", "physid": "1f.1", "businfo": "pci@0000:00:1f.1", "logicalname": "scsi0", "version": "01", "width": 32, "clock": 33000000, "configuration": {"driver": "ata_piix", "latency": "0"}, "capabilities": {"ide": true, "isa_compat_mode": "ISA compatibility mode", "pci_native_mode": "PCI native mode", "bus_master": "bus mastering", "emulated": "Emulated device"}, "children": [{"id": "disk", "class": "disk", "claimed": true, "handle": "SCSI:00:00:00:00", "description": "ATA Disk", "product": "HDT722520DLAT80", "physid": "0.0.0", "businfo": "scsi@0:0.0.0", "logicalname": "/dev/sda", "dev": "8:0", "version": "A96A", "serial": "VD051GTF024B4L", "units": "bytes", "size": 200048565760, "configuration": {"ansiversion": "5", "logicalsectorsize": "512", "sectorsize": "512", "signature": "28eb28ea"}, "capabilities": {"partitioned": "Partitioned disk", "partitioned:dos": "MS-DOS partition table"}, "children": [{"id": "volume:0", "class": "volume", "claimed": true, "description": "Windows NTFS volume", "physid": "1", "businfo": "scsi@0:0.0.0,1", "logicalname": "/dev/sda1", "dev": "8:1", "version": "3.1", "serial": "b47c-f237", "size": 103808512, "capacity": 104857600, "configuration": {"clustersize": "4096", "created": "2014-07-07 19:27:27", "filesystem": "ntfs", "label": "System-reserviert", "state": "clean"}, "capabilities": {"primary": "Primary partition", "bootable": "Bootable partition (active)", "ntfs": "Windows NTFS", "initialized": "initialized volume"}}, {"id": "volume:1", "class": "volume", "claimed": true, "description": "Windows NTFS volume", "physid": "2", "businfo": "scsi@0:0.0.0,2", "logicalname": "/dev/sda2", "dev": "8:2", "version": "3.1", "serial": "d0c9aeff-7206-fe4a-a410-bb3c076fdbdf", "size": 199936179712, "capacity": 199941423104, "configuration": {"clustersize": "4096", "created": "2014-07-07 19:27:42", "filesystem": "ntfs", "state": "clean"}, "capabilities": {"primary": "Primary partition", "ntfs": "Windows NTFS", "initialized": "initialized volume"}}]}, {"id": "cdrom", "class": "disk", "claimed": true, "handle": "SCSI:00:00:01:00", "description": "DVD writer", "product": "DVD-RW DVR-112D", "vendor": "PIONEER", "physid": "0.1.0", "businfo": "scsi@0:0.1.0", "logicalname": ["/dev/cdrom", "/dev/cdrw", "/dev/dvd", "/dev/dvdrw", "/dev/sr0"], "dev": "11:0", "version": "1.21", "configuration": {"ansiversion": "5", "status": "nodisc"}, "capabilities": {"removable": "support is removable", "audio": "Audio CD playback", "cd-r": "CD-R burning", "cd-rw": "CD-RW burning", "dvd": "DVD playback", "dvd-r": "DVD-R burning"}}]}, {"id": "ide:1", "class": "storage", "claimed": true, "handle": "PCI:0000:00:1f.2", "description": "IDE interface", "product": "NM10/ICH7 Family SATA Controller [IDE mode]", "vendor": "Intel Corporation", "physid": "1f.2", "businfo": "pci@0000:00:1f.2", "version": "01", "width": 32, "clock": 66000000, "configuration": {"driver": "ata_piix", "latency": "0"}, "capabilities": {"ide": true, "pm": "Power Management", "isa_compat_mode": "ISA compatibility mode", "pci_native_mode": "PCI native mode", "bus_master": "bus mastering", "cap_list": "PCI capabilities listing"}}, {"id": "serial", "class": "bus", "claimed": true, "handle": "PCI:0000:00:1f.3", "description": "SMBus", "product": "NM10/ICH7 Family SMBus Controller", "vendor": "Intel Corporation", "physid": "1f.3", "businfo": "pci@0000:00:1f.3", "version": "01", "width": 32, "clock": 33000000, "configuration": {"driver": "i801_smbus", "latency": "0"}}]}]}, {"id": "input:0", "class": "input", "claimed": true, "product": "Power Button", "physid": "1", "logicalname": ["input1", "/dev/input/event0"], "capabilities": {"platform": true}}, {"id": "input:1", "class": "input", "claimed": true, "product": "PC Speaker", "physid": "2", "logicalname": ["input10", "/dev/input/event9"], "capabilities": {"isa": "ISA bus"}}, {"id": "input:2", "class": "input", "claimed": true, "product": "Power Button", "physid": "3", "logicalname": ["input2", "/dev/input/event1"], "capabilities": {"platform": true}}]}, "dmidecode": "# dmidecode 3.3\nGetting SMBIOS data from sysfs.\nSMBIOS 2.4 present.\n49 structures occupying 1868 bytes.\nTable at 0x000F0680.\n\nHandle 0x0000, DMI type 0, 24 bytes\nBIOS Information\n\tVendor: American Megatrends Inc.\n\tVersion: 0604 \n\tRelease Date: 05/06/2007\n\tAddress: 0xF0000\n\tRuntime Size: 64 kB\n\tROM Size: 512 kB\n\tCharacteristics:\n\t\tISA is supported\n\t\tPCI is supported\n\t\tPNP is supported\n\t\tAPM is supported\n\t\tBIOS is upgradeable\n\t\tBIOS shadowing is allowed\n\t\tESCD support is available\n\t\tBoot from CD is supported\n\t\tSelectable boot is supported\n\t\tBIOS ROM is socketed\n\t\tEDD is supported\n\t\t5.25\"/1.2 MB floppy services are supported (int 13h)\n\t\t3.5\"/720 kB floppy services are supported (int 13h)\n\t\t3.5\"/2.88 MB floppy services are supported (int 13h)\n\t\tPrint screen service is supported (int 5h)\n\t\t8042 keyboard services are supported (int 9h)\n\t\tSerial services are supported (int 14h)\n\t\tPrinter services are supported (int 17h)\n\t\tCGA/mono video services are supported (int 10h)\n\t\tACPI is supported\n\t\tUSB legacy is supported\n\t\tLS-120 boot is supported\n\t\tATAPI Zip drive boot is supported\n\t\tBIOS boot specification is supported\n\t\tTargeted content distribution is supported\n\tBIOS Revision: 8.12\n\nHandle 0x0001, DMI type 1, 27 bytes\nSystem Information\n\tManufacturer: System manufacturer\n\tProduct Name: System Product Name\n\tVersion: System Version\n\tSerial Number: System Serial Number\n\tUUID: 880913a7-74fe-d511-8893-24e75bf3a527\n\tWake-up Type: Power Switch\n\tSKU Number: To Be Filled By O.E.M.\n\tFamily: To Be Filled By O.E.M.\n\nHandle 0x0002, DMI type 2, 15 bytes\nBase Board Information\n\tManufacturer: ASUSTeK Computer INC.\n\tProduct Name: P5B-MX/WiFi-AP\n\tVersion: x.xx\n\tSerial Number: MB-1234567890\n\tAsset Tag: To Be Filled By O.E.M.\n\tFeatures:\n\t\tBoard is a hosting board\n\t\tBoard is replaceable\n\tLocation In Chassis: To Be Filled By O.E.M.\n\tChassis Handle: 0x0003\n\tType: Motherboard\n\tContained Object Handles: 0\n\nHandle 0x0003, DMI type 3, 21 bytes\nChassis Information\n\tManufacturer: Chassis Manufacture\n\tType: Desktop\n\tLock: Not Present\n\tVersion: Chassis Version\n\tSerial Number: Chassis Serial Number\n\tAsset Tag: Asset-1234567890\n\tBoot-up State: Safe\n\tPower Supply State: Safe\n\tThermal State: Safe\n\tSecurity Status: None\n\tOEM Information: 0x00000002\n\tHeight: Unspecified\n\tNumber Of Power Cords: 1\n\tContained Elements: 0\n\nHandle 0x0004, DMI type 4, 35 bytes\nProcessor Information\n\tSocket Designation: Socket 775\n\tType: Central Processor\n\tFamily: Other\n\tManufacturer: Intel \n\tID: F6 06 00 00 FF FB EB BF\n\tSignature: Type 0, Family 6, Model 15, Stepping 6\n\tFlags:\n\t\tFPU (Floating-point unit on-chip)\n\t\tVME (Virtual mode extension)\n\t\tDE (Debugging extension)\n\t\tPSE (Page size extension)\n\t\tTSC (Time stamp counter)\n\t\tMSR (Model specific registers)\n\t\tPAE (Physical address extension)\n\t\tMCE (Machine check exception)\n\t\tCX8 (CMPXCHG8 instruction supported)\n\t\tAPIC (On-chip APIC hardware supported)\n\t\tSEP (Fast system call)\n\t\tMTRR (Memory type range registers)\n\t\tPGE (Page global enable)\n\t\tMCA (Machine check architecture)\n\t\tCMOV (Conditional move instruction supported)\n\t\tPAT (Page attribute table)\n\t\tPSE-36 (36-bit page size extension)\n\t\tCLFSH (CLFLUSH instruction supported)\n\t\tDS (Debug store)\n\t\tACPI (ACPI supported)\n\t\tMMX (MMX technology supported)\n\t\tFXSR (FXSAVE and FXSTOR instructions supported)\n\t\tSSE (Streaming SIMD extensions)\n\t\tSSE2 (Streaming SIMD extensions 2)\n\t\tSS (Self-snoop)\n\t\tHTT (Multi-threading)\n\t\tTM (Thermal monitor supported)\n\t\tPBE (Pending break enabled)\n\tVersion: Intel(R) Core(TM)2 CPU 6420 @ 2.13GHz \n\tVoltage: 1.3 V\n\tExternal Clock: 266 MHz\n\tMax Speed: 3800 MHz\n\tCurrent Speed: 2133 MHz\n\tStatus: Populated, Enabled\n\tUpgrade: Socket LGA775\n\tL1 Cache Handle: 0x0005\n\tL2 Cache Handle: 0x0006\n\tL3 Cache Handle: 0x0007\n\tSerial Number: To Be Filled By O.E.M.\n\tAsset Tag: To Be Filled By O.E.M.\n\tPart Number: To Be Filled By O.E.M.\n\nHandle 0x0005, DMI type 7, 19 bytes\nCache Information\n\tSocket Designation: L1-Cache\n\tConfiguration: Enabled, Not Socketed, Level 1\n\tOperational Mode: Write Back\n\tLocation: Internal\n\tInstalled Size: 64 kB\n\tMaximum Size: 64 kB\n\tSupported SRAM Types:\n\t\tOther\n\tInstalled SRAM Type: Other\n\tSpeed: Unknown\n\tError Correction Type: Parity\n\tSystem Type: Data\n\tAssociativity: 8-way Set-associative\n\nHandle 0x0006, DMI type 7, 19 bytes\nCache Information\n\tSocket Designation: L2-Cache\n\tConfiguration: Enabled, Not Socketed, Level 2\n\tOperational Mode: Write Back\n\tLocation: Internal\n\tInstalled Size: 4 MB\n\tMaximum Size: 4 MB\n\tSupported SRAM Types:\n\t\tOther\n\tInstalled SRAM Type: Other\n\tSpeed: Unknown\n\tError Correction Type: Single-bit ECC\n\tSystem Type: Instruction\n\tAssociativity: 8-way Set-associative\n\nHandle 0x0007, DMI type 7, 19 bytes\nCache Information\n\tSocket Designation: L3-Cache\n\tConfiguration: Disabled, Not Socketed, Level 3\n\tOperational Mode: Unknown\n\tLocation: Internal\n\tInstalled Size: 0 kB\n\tMaximum Size: 0 kB\n\tSupported SRAM Types:\n\t\tUnknown\n\tInstalled SRAM Type: Unknown\n\tSpeed: Unknown\n\tError Correction Type: Unknown\n\tSystem Type: Unknown\n\tAssociativity: Unknown\n\nHandle 0x0008, DMI type 5, 20 bytes\nMemory Controller Information\n\tError Detecting Method: 64-bit ECC\n\tError Correcting Capabilities:\n\t\tNone\n\tSupported Interleave: One-way Interleave\n\tCurrent Interleave: One-way Interleave\n\tMaximum Memory Module Size: 2048 MB\n\tMaximum Total Memory Size: 4096 MB\n\tSupported Speeds:\n\t\tOther\n\tSupported Memory Types:\n\t\tDIMM\n\t\tSDRAM\n\tMemory Module Voltage: 3.3 V\n\tAssociated Memory Slots: 2\n\t\t0x0009\n\t\t0x000A\n\tEnabled Error Correcting Capabilities:\n\t\tNone\n\nHandle 0x0009, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: PS/2 Mouse\n\tInternal Connector Type: None\n\tExternal Reference Designator: PS/2 Mouse\n\tExternal Connector Type: PS/2\n\tPort Type: Mouse Port\n\nHandle 0x000A, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: Keyboard\n\tInternal Connector Type: None\n\tExternal Reference Designator: PS/2 Keyboard\n\tExternal Connector Type: PS/2\n\tPort Type: Keyboard Port\n\nHandle 0x000B, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: USB1\n\tInternal Connector Type: None\n\tExternal Reference Designator: USB1\n\tExternal Connector Type: Access Bus (USB)\n\tPort Type: USB\n\nHandle 0x000C, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: USB2\n\tInternal Connector Type: None\n\tExternal Reference Designator: USB2\n\tExternal Connector Type: Access Bus (USB)\n\tPort Type: USB\n\nHandle 0x000D, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: USB3\n\tInternal Connector Type: None\n\tExternal Reference Designator: USB3\n\tExternal Connector Type: Access Bus (USB)\n\tPort Type: USB\n\nHandle 0x000E, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: USB4\n\tInternal Connector Type: None\n\tExternal Reference Designator: USB4\n\tExternal Connector Type: Access Bus (USB)\n\tPort Type: USB\n\nHandle 0x000F, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: USB5\n\tInternal Connector Type: None\n\tExternal Reference Designator: USB5\n\tExternal Connector Type: Access Bus (USB)\n\tPort Type: USB\n\nHandle 0x0010, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: USB6\n\tInternal Connector Type: None\n\tExternal Reference Designator: USB6\n\tExternal Connector Type: Access Bus (USB)\n\tPort Type: USB\n\nHandle 0x0011, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: COM 1\n\tInternal Connector Type: None\n\tExternal Reference Designator: COM 1\n\tExternal Connector Type: DB-9 male\n\tPort Type: Serial Port 16550A Compatible\n\nHandle 0x0012, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: Audio Line Out1\n\tInternal Connector Type: None\n\tExternal Reference Designator: Audio Line Out1\n\tExternal Connector Type: Mini Jack (headphones)\n\tPort Type: Audio Port\n\nHandle 0x0013, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: Audio Line Out2\n\tInternal Connector Type: None\n\tExternal Reference Designator: Audio Line Out2\n\tExternal Connector Type: Mini Jack (headphones)\n\tPort Type: Audio Port\n\nHandle 0x0014, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: Audio Line Out3\n\tInternal Connector Type: None\n\tExternal Reference Designator: Audio Line Out3\n\tExternal Connector Type: Mini Jack (headphones)\n\tPort Type: Audio Port\n\nHandle 0x0015, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: SPDIF_OUT\n\tInternal Connector Type: None\n\tExternal Reference Designator: SPDIF_OUT\n\tExternal Connector Type: On Board Sound Input From CD-ROM\n\tPort Type: Audio Port\n\nHandle 0x0016, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: GbE LAN 1\n\tInternal Connector Type: None\n\tExternal Reference Designator: GbE LAN 1\n\tExternal Connector Type: RJ-45\n\tPort Type: Network Port\n\nHandle 0x0017, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: SB_SATA1\n\tInternal Connector Type: On Board IDE\n\tExternal Reference Designator: Not Specified\n\tExternal Connector Type: None\n\tPort Type: Other\n\nHandle 0x0018, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: SB_SATA2\n\tInternal Connector Type: On Board IDE\n\tExternal Reference Designator: Not Specified\n\tExternal Connector Type: None\n\tPort Type: Other\n\nHandle 0x0019, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: SB_SATA3\n\tInternal Connector Type: On Board IDE\n\tExternal Reference Designator: Not Specified\n\tExternal Connector Type: None\n\tPort Type: Other\n\nHandle 0x001A, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: SB_SATA4\n\tInternal Connector Type: On Board IDE\n\tExternal Reference Designator: Not Specified\n\tExternal Connector Type: None\n\tPort Type: Other\n\nHandle 0x001B, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: CHA_FAN1\n\tInternal Connector Type: Other\n\tExternal Reference Designator: Not Specified\n\tExternal Connector Type: None\n\tPort Type: Other\n\nHandle 0x001C, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: CD\n\tInternal Connector Type: On Board Sound Input From CD-ROM\n\tExternal Reference Designator: Not Specified\n\tExternal Connector Type: None\n\tPort Type: Audio Port\n\nHandle 0x001D, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: FP_AUDIO\n\tInternal Connector Type: On Board Sound Input From CD-ROM\n\tExternal Reference Designator: Not Specified\n\tExternal Connector Type: None\n\tPort Type: Audio Port\n\nHandle 0x001E, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: FLOPPY\n\tInternal Connector Type: On Board Floppy\n\tExternal Reference Designator: Not Specified\n\tExternal Connector Type: None\n\tPort Type: Other\n\nHandle 0x001F, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: CPU_FAN\n\tInternal Connector Type: Other\n\tExternal Reference Designator: Not Specified\n\tExternal Connector Type: None\n\tPort Type: Other\n\nHandle 0x0020, DMI type 9, 13 bytes\nSystem Slot Information\n\tDesignation: PCIEX16\n\tType: x16 PCI Express\n\tCurrent Usage: Available\n\tLength: Short\n\tID: 1\n\tCharacteristics:\n\t\t3.3 V is provided\n\t\tOpening is shared\n\t\tPME signal is supported\n\nHandle 0x0021, DMI type 9, 13 bytes\nSystem Slot Information\n\tDesignation: PCI_1\n\tType: 32-bit PCI\n\tCurrent Usage: Available\n\tLength: Short\n\tID: 2\n\tCharacteristics:\n\t\t3.3 V is provided\n\t\tOpening is shared\n\t\tPME signal is supported\n\nHandle 0x0022, DMI type 9, 13 bytes\nSystem Slot Information\n\tDesignation: PCI_2\n\tType: 32-bit PCI\n\tCurrent Usage: Available\n\tLength: Short\n\tID: 3\n\tCharacteristics:\n\t\t3.3 V is provided\n\t\tOpening is shared\n\t\tPME signal is supported\n\nHandle 0x0023, DMI type 9, 13 bytes\nSystem Slot Information\n\tDesignation: PCIEX1_1\n\tType: x1 PCI Express\n\tCurrent Usage: Available\n\tLength: Short\n\tID: 4\n\tCharacteristics:\n\t\t3.3 V is provided\n\t\tOpening is shared\n\t\tPME signal is supported\n\nHandle 0x0024, DMI type 9, 13 bytes\nSystem Slot Information\n\tDesignation: PCIEX1_2\n\tType: x1 PCI Express\n\tCurrent Usage: In Use\n\tLength: Short\n\tID: 5\n\tCharacteristics:\n\t\t3.3 V is provided\n\t\tOpening is shared\n\t\tPME signal is supported\n\nHandle 0x0025, DMI type 10, 6 bytes\nOn Board Device Information\n\tType: Ethernet\n\tStatus: Enabled\n\tDescription: Onboard Ethernet\n\nHandle 0x0026, DMI type 11, 5 bytes\nOEM Strings\n\tString 1: To Be Filled By O.E.M.\n\tString 2: To Be Filled By O.E.M.\n\tString 3: To Be Filled By O.E.M.\n\tString 4: To Be Filled By O.E.M.\n\nHandle 0x0027, DMI type 13, 22 bytes\nBIOS Language Information\n\tLanguage Description Format: Abbreviated\n\tInstallable Languages: 1\n\t\ten|US|iso8859-1\n\tCurrently Installed Language: en|US|iso8859-1\n\nHandle 0x0028, DMI type 15, 35 bytes\nSystem Event Log\n\tArea Length: 4 bytes\n\tHeader Start Offset: 0x0000\n\tHeader Length: 2 bytes\n\tData Start Offset: 0x0002\n\tAccess Method: Indexed I/O, one 16-bit index port, one 8-bit data port\n\tAccess Address: Index 0x046A, Data 0x046C\n\tStatus: Invalid, Not Full\n\tChange Token: 0x00000000\n\tHeader Format: No Header\n\tSupported Log Type Descriptors: 6\n\tDescriptor 1: End of log\n\tData Format 1: OEM-specific\n\tDescriptor 2: End of log\n\tData Format 2: OEM-specific\n\tDescriptor 3: End of log\n\tData Format 3: OEM-specific\n\tDescriptor 4: End of log\n\tData Format 4: OEM-specific\n\tDescriptor 5: End of log\n\tData Format 5: OEM-specific\n\tDescriptor 6: End of log\n\tData Format 6: OEM-specific\n\nHandle 0x0029, DMI type 16, 15 bytes\nPhysical Memory Array\n\tLocation: System Board Or Motherboard\n\tUse: System Memory\n\tError Correction Type: None\n\tMaximum Capacity: 4 GB\n\tError Information Handle: Not Provided\n\tNumber Of Devices: 2\n\nHandle 0x002A, DMI type 19, 15 bytes\nMemory Array Mapped Address\n\tStarting Address: 0x00000000000\n\tEnding Address: 0x0009FFFFFFF\n\tRange Size: 2560 MB\n\tPhysical Array Handle: 0x0029\n\tPartition Width: 4\n\nHandle 0x002B, DMI type 17, 27 bytes\nMemory Device\n\tArray Handle: 0x0029\n\tError Information Handle: Not Provided\n\tTotal Width: 64 bits\n\tData Width: 64 bits\n\tSize: 2 GB\n\tForm Factor: DIMM\n\tSet: None\n\tLocator: DIMM A1\n\tBank Locator: BANK0\n\tType: DDR2\n\tType Detail: Synchronous\n\tSpeed: 667 MT/s\n\tManufacturer: Manufacturer0\n\tSerial Number: SerNum0\n\tAsset Tag: AssetTagNum0\n\tPart Number: PartNum0\n\nHandle 0x002C, DMI type 126, 19 bytes\nInactive\n\nHandle 0x002D, DMI type 17, 27 bytes\nMemory Device\n\tArray Handle: 0x0029\n\tError Information Handle: Not Provided\n\tTotal Width: 64 bits\n\tData Width: 64 bits\n\tSize: 512 MB\n\tForm Factor: DIMM\n\tSet: None\n\tLocator: DIMM B1\n\tBank Locator: BANK1\n\tType: DDR2\n\tType Detail: Synchronous\n\tSpeed: 667 MT/s\n\tManufacturer: Manufacturer1\n\tSerial Number: SerNum1\n\tAsset Tag: AssetTagNum1\n\tPart Number: PartNum1\n\nHandle 0x002E, DMI type 126, 19 bytes\nInactive\n\nHandle 0x002F, DMI type 32, 20 bytes\nSystem Boot Information\n\tStatus: No errors detected\n\nHandle 0x0030, DMI type 127, 4 bytes\nEnd Of Table\n\n", "lspci": "00:00.0 Host bridge: Intel Corporation 82946GZ/PL/GL Memory Controller Hub (rev 02)\n\tSubsystem: ASUSTeK Computer Inc. P5B-MX/WiFi-AP\n\tControl: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-\n\tStatus: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- SERR- \n\n00:02.0 VGA compatible controller: Intel Corporation 82946GZ/GL Integrated Graphics Controller (rev 02) (prog-if 00 [VGA controller])\n\tSubsystem: ASUSTeK Computer Inc. P5B-MX/WiFi-AP\n\tControl: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-\n\tStatus: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- Reset- FastB2B-\n\t\tPriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-\n\tCapabilities: [40] Express (v1) Root Port (Slot+), MSI 00\n\t\tDevCap:\tMaxPayload 128 bytes, PhantFunc 0\n\t\t\tExtTag- RBE-\n\t\tDevCtl:\tCorrErr- NonFatalErr- FatalErr- UnsupReq-\n\t\t\tRlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-\n\t\t\tMaxPayload 128 bytes, MaxReadReq 128 bytes\n\t\tDevSta:\tCorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-\n\t\tLnkCap:\tPort #1, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <1us, L1 <4us\n\t\t\tClockPM- Surprise- LLActRep+ BwNot- ASPMOptComp-\n\t\tLnkCtl:\tASPM Disabled; RCB 64 bytes, Disabled- CommClk-\n\t\t\tExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-\n\t\tLnkSta:\tSpeed 2.5GT/s (ok), Width x0 (downgraded)\n\t\t\tTrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-\n\t\tSltCap:\tAttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+\n\t\t\tSlot #4, PowerLimit 25.000W; Interlock- NoCompl-\n\t\tSltCtl:\tEnable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-\n\t\t\tControl: AttnInd Unknown, PwrInd Unknown, Power- Interlock-\n\t\tSltSta:\tStatus: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-\n\t\t\tChanged: MRL- PresDet- LinkState-\n\t\tRootCap: CRSVisible-\n\t\tRootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-\n\t\tRootSta: PME ReqID 0000, PMEStatus- PMEPending-\n\tCapabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-\n\t\tAddress: 00000000 Data: 0000\n\tCapabilities: [90] Subsystem: ASUSTeK Computer Inc. NM10/ICH7 Family PCI Express Port 1\n\tCapabilities: [a0] Power Management version 2\n\t\tFlags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)\n\t\tStatus: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-\n\tCapabilities: [100 v1] Virtual Channel\n\t\tCaps:\tLPEVC=0 RefClk=100ns PATEntryBits=1\n\t\tArb:\tFixed+ WRR32- WRR64- WRR128-\n\t\tCtrl:\tArbSelect=Fixed\n\t\tStatus:\tInProgress-\n\t\tVC0:\tCaps:\tPATOffset=00 MaxTimeSlots=1 RejSnoopTrans-\n\t\t\tArb:\tFixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-\n\t\t\tCtrl:\tEnable+ ID=0 ArbSelect=Fixed TC/VC=01\n\t\t\tStatus:\tNegoPending- InProgress-\n\t\tVC1:\tCaps:\tPATOffset=00 MaxTimeSlots=1 RejSnoopTrans-\n\t\t\tArb:\tFixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-\n\t\t\tCtrl:\tEnable- ID=0 ArbSelect=Fixed TC/VC=00\n\t\t\tStatus:\tNegoPending- InProgress-\n\tCapabilities: [180 v1] Root Complex Link\n\t\tDesc:\tPortNumber=01 ComponentID=00 EltType=Config\n\t\tLink0:\tDesc:\tTargetPort=00 TargetComponent=00 AssocRCRB- LinkType=MemMapped LinkValid+\n\t\t\tAddr:\t00000000fed1c001\n\tKernel driver in use: pcieport\n\n00:1c.1 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 2 (rev 01) (prog-if 00 [Normal decode])\n\tControl: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-\n\tStatus: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- Reset- FastB2B-\n\t\tPriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-\n\tCapabilities: [40] Express (v1) Root Port (Slot+), MSI 00\n\t\tDevCap:\tMaxPayload 128 bytes, PhantFunc 0\n\t\t\tExtTag- RBE-\n\t\tDevCtl:\tCorrErr- NonFatalErr- FatalErr- UnsupReq-\n\t\t\tRlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-\n\t\t\tMaxPayload 128 bytes, MaxReadReq 128 bytes\n\t\tDevSta:\tCorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-\n\t\tLnkCap:\tPort #2, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <256ns, L1 <4us\n\t\t\tClockPM- Surprise- LLActRep+ BwNot- ASPMOptComp-\n\t\tLnkCtl:\tASPM Disabled; RCB 64 bytes, Disabled- CommClk+\n\t\t\tExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-\n\t\tLnkSta:\tSpeed 2.5GT/s (ok), Width x1 (ok)\n\t\t\tTrErr- Train- SlotClk+ DLActive+ BWMgmt- ABWMgmt-\n\t\tSltCap:\tAttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+\n\t\t\tSlot #0, PowerLimit 0.000W; Interlock- NoCompl-\n\t\tSltCtl:\tEnable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-\n\t\t\tControl: AttnInd Unknown, PwrInd Unknown, Power- Interlock-\n\t\tSltSta:\tStatus: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-\n\t\t\tChanged: MRL- PresDet+ LinkState+\n\t\tRootCap: CRSVisible-\n\t\tRootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-\n\t\tRootSta: PME ReqID 0000, PMEStatus- PMEPending-\n\tCapabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-\n\t\tAddress: 00000000 Data: 0000\n\tCapabilities: [90] Subsystem: ASUSTeK Computer Inc. NM10/ICH7 Family PCI Express Port 2\n\tCapabilities: [a0] Power Management version 2\n\t\tFlags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)\n\t\tStatus: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-\n\tCapabilities: [100 v1] Virtual Channel\n\t\tCaps:\tLPEVC=0 RefClk=100ns PATEntryBits=1\n\t\tArb:\tFixed+ WRR32- WRR64- WRR128-\n\t\tCtrl:\tArbSelect=Fixed\n\t\tStatus:\tInProgress-\n\t\tVC0:\tCaps:\tPATOffset=00 MaxTimeSlots=1 RejSnoopTrans-\n\t\t\tArb:\tFixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-\n\t\t\tCtrl:\tEnable+ ID=0 ArbSelect=Fixed TC/VC=01\n\t\t\tStatus:\tNegoPending- InProgress-\n\t\tVC1:\tCaps:\tPATOffset=00 MaxTimeSlots=1 RejSnoopTrans-\n\t\t\tArb:\tFixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-\n\t\t\tCtrl:\tEnable- ID=0 ArbSelect=Fixed TC/VC=00\n\t\t\tStatus:\tNegoPending- InProgress-\n\tCapabilities: [180 v1] Root Complex Link\n\t\tDesc:\tPortNumber=02 ComponentID=00 EltType=Config\n\t\tLink0:\tDesc:\tTargetPort=00 TargetComponent=00 AssocRCRB- LinkType=MemMapped LinkValid+\n\t\t\tAddr:\t00000000fed1c001\n\tKernel driver in use: pcieport\n\n00:1c.2 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 3 (rev 01) (prog-if 00 [Normal decode])\n\tControl: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-\n\tStatus: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- Reset- FastB2B-\n\t\tPriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-\n\tCapabilities: [40] Express (v1) Root Port (Slot+), MSI 00\n\t\tDevCap:\tMaxPayload 128 bytes, PhantFunc 0\n\t\t\tExtTag- RBE-\n\t\tDevCtl:\tCorrErr- NonFatalErr- FatalErr- UnsupReq-\n\t\t\tRlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-\n\t\t\tMaxPayload 128 bytes, MaxReadReq 128 bytes\n\t\tDevSta:\tCorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-\n\t\tLnkCap:\tPort #3, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <256ns, L1 <4us\n\t\t\tClockPM- Surprise- LLActRep+ BwNot- ASPMOptComp-\n\t\tLnkCtl:\tASPM Disabled; RCB 64 bytes, Disabled- CommClk+\n\t\t\tExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-\n\t\tLnkSta:\tSpeed 2.5GT/s (ok), Width x1 (ok)\n\t\t\tTrErr- Train- SlotClk+ DLActive+ BWMgmt- ABWMgmt-\n\t\tSltCap:\tAttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+\n\t\t\tSlot #5, PowerLimit 10.000W; Interlock- NoCompl-\n\t\tSltCtl:\tEnable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-\n\t\t\tControl: AttnInd Unknown, PwrInd Unknown, Power- Interlock-\n\t\tSltSta:\tStatus: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-\n\t\t\tChanged: MRL- PresDet+ LinkState+\n\t\tRootCap: CRSVisible-\n\t\tRootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-\n\t\tRootSta: PME ReqID 0000, PMEStatus- PMEPending-\n\tCapabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-\n\t\tAddress: 00000000 Data: 0000\n\tCapabilities: [90] Subsystem: ASUSTeK Computer Inc. NM10/ICH7 Family PCI Express Port 3\n\tCapabilities: [a0] Power Management version 2\n\t\tFlags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)\n\t\tStatus: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-\n\tCapabilities: [100 v1] Virtual Channel\n\t\tCaps:\tLPEVC=0 RefClk=100ns PATEntryBits=1\n\t\tArb:\tFixed+ WRR32- WRR64- WRR128-\n\t\tCtrl:\tArbSelect=Fixed\n\t\tStatus:\tInProgress-\n\t\tVC0:\tCaps:\tPATOffset=00 MaxTimeSlots=1 RejSnoopTrans-\n\t\t\tArb:\tFixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-\n\t\t\tCtrl:\tEnable+ ID=0 ArbSelect=Fixed TC/VC=01\n\t\t\tStatus:\tNegoPending- InProgress-\n\t\tVC1:\tCaps:\tPATOffset=00 MaxTimeSlots=1 RejSnoopTrans-\n\t\t\tArb:\tFixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-\n\t\t\tCtrl:\tEnable- ID=0 ArbSelect=Fixed TC/VC=00\n\t\t\tStatus:\tNegoPending- InProgress-\n\tCapabilities: [180 v1] Root Complex Link\n\t\tDesc:\tPortNumber=03 ComponentID=00 EltType=Config\n\t\tLink0:\tDesc:\tTargetPort=00 TargetComponent=00 AssocRCRB- LinkType=MemMapped LinkValid+\n\t\t\tAddr:\t00000000fed1c001\n\tKernel driver in use: pcieport\n\n00:1d.0 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #1 (rev 01) (prog-if 00 [UHCI])\n\tSubsystem: ASUSTeK Computer Inc. P5B-MX/WiFi-AP, P5KPL-VM, P5LD2-VM Mainboard\n\tControl: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-\n\tStatus: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- Reset- FastB2B-\n\t\tPriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-\n\tCapabilities: [50] Subsystem: ASUSTeK Computer Inc. 82801 PCI Bridge\n\n00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01)\n\tSubsystem: ASUSTeK Computer Inc. P5B-MX/WiFi-AP, P5KPL-VM Motherboard\n\tControl: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-\n\tStatus: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- \n\tKernel driver in use: lpc_ich\n\tKernel modules: intel_rng, lpc_ich, leds_ss4200\n\n00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01) (prog-if 8a [ISA Compatibility mode controller, supports both channels switched to PCI native mode, supports bus mastering])\n\tSubsystem: ASUSTeK Computer Inc. P5B-MX/WiFi-AP, P5KPL-VM Motherboard\n\tControl: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-\n\tStatus: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- \n\n00:02.0 VGA compatible controller: Intel Corporation 82946GZ/GL Integrated Graphics Controller (rev 02) (prog-if 00 [VGA controller])\n\tSubsystem: ASUSTeK Computer Inc. P5B-MX/WiFi-AP\n\tControl: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-\n\tStatus: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- Reset- FastB2B-\n\t\tPriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-\n\tCapabilities: [40] Express (v1) Root Port (Slot+), MSI 00\n\t\tDevCap:\tMaxPayload 128 bytes, PhantFunc 0\n\t\t\tExtTag- RBE-\n\t\tDevCtl:\tCorrErr- NonFatalErr- FatalErr- UnsupReq-\n\t\t\tRlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-\n\t\t\tMaxPayload 128 bytes, MaxReadReq 128 bytes\n\t\tDevSta:\tCorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-\n\t\tLnkCap:\tPort #1, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <1us, L1 <4us\n\t\t\tClockPM- Surprise- LLActRep+ BwNot- ASPMOptComp-\n\t\tLnkCtl:\tASPM Disabled; RCB 64 bytes, Disabled- CommClk-\n\t\t\tExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-\n\t\tLnkSta:\tSpeed 2.5GT/s (ok), Width x0 (downgraded)\n\t\t\tTrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-\n\t\tSltCap:\tAttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+\n\t\t\tSlot #4, PowerLimit 25.000W; Interlock- NoCompl-\n\t\tSltCtl:\tEnable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-\n\t\t\tControl: AttnInd Unknown, PwrInd Unknown, Power- Interlock-\n\t\tSltSta:\tStatus: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-\n\t\t\tChanged: MRL- PresDet- LinkState-\n\t\tRootCap: CRSVisible-\n\t\tRootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-\n\t\tRootSta: PME ReqID 0000, PMEStatus- PMEPending-\n\tCapabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-\n\t\tAddress: 00000000 Data: 0000\n\tCapabilities: [90] Subsystem: ASUSTeK Computer Inc. NM10/ICH7 Family PCI Express Port 1\n\tCapabilities: [a0] Power Management version 2\n\t\tFlags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)\n\t\tStatus: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-\n\tCapabilities: [100 v1] Virtual Channel\n\t\tCaps:\tLPEVC=0 RefClk=100ns PATEntryBits=1\n\t\tArb:\tFixed+ WRR32- WRR64- WRR128-\n\t\tCtrl:\tArbSelect=Fixed\n\t\tStatus:\tInProgress-\n\t\tVC0:\tCaps:\tPATOffset=00 MaxTimeSlots=1 RejSnoopTrans-\n\t\t\tArb:\tFixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-\n\t\t\tCtrl:\tEnable+ ID=0 ArbSelect=Fixed TC/VC=01\n\t\t\tStatus:\tNegoPending- InProgress-\n\t\tVC1:\tCaps:\tPATOffset=00 MaxTimeSlots=1 RejSnoopTrans-\n\t\t\tArb:\tFixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-\n\t\t\tCtrl:\tEnable- ID=0 ArbSelect=Fixed TC/VC=00\n\t\t\tStatus:\tNegoPending- InProgress-\n\tCapabilities: [180 v1] Root Complex Link\n\t\tDesc:\tPortNumber=01 ComponentID=00 EltType=Config\n\t\tLink0:\tDesc:\tTargetPort=00 TargetComponent=00 AssocRCRB- LinkType=MemMapped LinkValid+\n\t\t\tAddr:\t00000000fed1c001\n\tKernel driver in use: pcieport\n\n00:1c.1 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 2 (rev 01) (prog-if 00 [Normal decode])\n\tControl: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-\n\tStatus: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- Reset- FastB2B-\n\t\tPriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-\n\tCapabilities: [40] Express (v1) Root Port (Slot+), MSI 00\n\t\tDevCap:\tMaxPayload 128 bytes, PhantFunc 0\n\t\t\tExtTag- RBE-\n\t\tDevCtl:\tCorrErr- NonFatalErr- FatalErr- UnsupReq-\n\t\t\tRlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-\n\t\t\tMaxPayload 128 bytes, MaxReadReq 128 bytes\n\t\tDevSta:\tCorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-\n\t\tLnkCap:\tPort #2, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <256ns, L1 <4us\n\t\t\tClockPM- Surprise- LLActRep+ BwNot- ASPMOptComp-\n\t\tLnkCtl:\tASPM Disabled; RCB 64 bytes, Disabled- CommClk+\n\t\t\tExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-\n\t\tLnkSta:\tSpeed 2.5GT/s (ok), Width x1 (ok)\n\t\t\tTrErr- Train- SlotClk+ DLActive+ BWMgmt- ABWMgmt-\n\t\tSltCap:\tAttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+\n\t\t\tSlot #0, PowerLimit 0.000W; Interlock- NoCompl-\n\t\tSltCtl:\tEnable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-\n\t\t\tControl: AttnInd Unknown, PwrInd Unknown, Power- Interlock-\n\t\tSltSta:\tStatus: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-\n\t\t\tChanged: MRL- PresDet+ LinkState+\n\t\tRootCap: CRSVisible-\n\t\tRootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-\n\t\tRootSta: PME ReqID 0000, PMEStatus- PMEPending-\n\tCapabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-\n\t\tAddress: 00000000 Data: 0000\n\tCapabilities: [90] Subsystem: ASUSTeK Computer Inc. NM10/ICH7 Family PCI Express Port 2\n\tCapabilities: [a0] Power Management version 2\n\t\tFlags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)\n\t\tStatus: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-\n\tCapabilities: [100 v1] Virtual Channel\n\t\tCaps:\tLPEVC=0 RefClk=100ns PATEntryBits=1\n\t\tArb:\tFixed+ WRR32- WRR64- WRR128-\n\t\tCtrl:\tArbSelect=Fixed\n\t\tStatus:\tInProgress-\n\t\tVC0:\tCaps:\tPATOffset=00 MaxTimeSlots=1 RejSnoopTrans-\n\t\t\tArb:\tFixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-\n\t\t\tCtrl:\tEnable+ ID=0 ArbSelect=Fixed TC/VC=01\n\t\t\tStatus:\tNegoPending- InProgress-\n\t\tVC1:\tCaps:\tPATOffset=00 MaxTimeSlots=1 RejSnoopTrans-\n\t\t\tArb:\tFixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-\n\t\t\tCtrl:\tEnable- ID=0 ArbSelect=Fixed TC/VC=00\n\t\t\tStatus:\tNegoPending- InProgress-\n\tCapabilities: [180 v1] Root Complex Link\n\t\tDesc:\tPortNumber=02 ComponentID=00 EltType=Config\n\t\tLink0:\tDesc:\tTargetPort=00 TargetComponent=00 AssocRCRB- LinkType=MemMapped LinkValid+\n\t\t\tAddr:\t00000000fed1c001\n\tKernel driver in use: pcieport\n\n00:1c.2 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 3 (rev 01) (prog-if 00 [Normal decode])\n\tControl: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-\n\tStatus: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- Reset- FastB2B-\n\t\tPriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-\n\tCapabilities: [40] Express (v1) Root Port (Slot+), MSI 00\n\t\tDevCap:\tMaxPayload 128 bytes, PhantFunc 0\n\t\t\tExtTag- RBE-\n\t\tDevCtl:\tCorrErr- NonFatalErr- FatalErr- UnsupReq-\n\t\t\tRlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-\n\t\t\tMaxPayload 128 bytes, MaxReadReq 128 bytes\n\t\tDevSta:\tCorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-\n\t\tLnkCap:\tPort #3, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <256ns, L1 <4us\n\t\t\tClockPM- Surprise- LLActRep+ BwNot- ASPMOptComp-\n\t\tLnkCtl:\tASPM Disabled; RCB 64 bytes, Disabled- CommClk+\n\t\t\tExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-\n\t\tLnkSta:\tSpeed 2.5GT/s (ok), Width x1 (ok)\n\t\t\tTrErr- Train- SlotClk+ DLActive+ BWMgmt- ABWMgmt-\n\t\tSltCap:\tAttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+\n\t\t\tSlot #5, PowerLimit 10.000W; Interlock- NoCompl-\n\t\tSltCtl:\tEnable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-\n\t\t\tControl: AttnInd Unknown, PwrInd Unknown, Power- Interlock-\n\t\tSltSta:\tStatus: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-\n\t\t\tChanged: MRL- PresDet+ LinkState+\n\t\tRootCap: CRSVisible-\n\t\tRootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-\n\t\tRootSta: PME ReqID 0000, PMEStatus- PMEPending-\n\tCapabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-\n\t\tAddress: 00000000 Data: 0000\n\tCapabilities: [90] Subsystem: ASUSTeK Computer Inc. NM10/ICH7 Family PCI Express Port 3\n\tCapabilities: [a0] Power Management version 2\n\t\tFlags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)\n\t\tStatus: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-\n\tCapabilities: [100 v1] Virtual Channel\n\t\tCaps:\tLPEVC=0 RefClk=100ns PATEntryBits=1\n\t\tArb:\tFixed+ WRR32- WRR64- WRR128-\n\t\tCtrl:\tArbSelect=Fixed\n\t\tStatus:\tInProgress-\n\t\tVC0:\tCaps:\tPATOffset=00 MaxTimeSlots=1 RejSnoopTrans-\n\t\t\tArb:\tFixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-\n\t\t\tCtrl:\tEnable+ ID=0 ArbSelect=Fixed TC/VC=01\n\t\t\tStatus:\tNegoPending- InProgress-\n\t\tVC1:\tCaps:\tPATOffset=00 MaxTimeSlots=1 RejSnoopTrans-\n\t\t\tArb:\tFixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-\n\t\t\tCtrl:\tEnable- ID=0 ArbSelect=Fixed TC/VC=00\n\t\t\tStatus:\tNegoPending- InProgress-\n\tCapabilities: [180 v1] Root Complex Link\n\t\tDesc:\tPortNumber=03 ComponentID=00 EltType=Config\n\t\tLink0:\tDesc:\tTargetPort=00 TargetComponent=00 AssocRCRB- LinkType=MemMapped LinkValid+\n\t\t\tAddr:\t00000000fed1c001\n\tKernel driver in use: pcieport\n\n00:1d.0 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #1 (rev 01) (prog-if 00 [UHCI])\n\tSubsystem: ASUSTeK Computer Inc. P5B-MX/WiFi-AP, P5KPL-VM, P5LD2-VM Mainboard\n\tControl: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-\n\tStatus: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- Reset- FastB2B-\n\t\tPriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-\n\tCapabilities: [50] Subsystem: ASUSTeK Computer Inc. 82801 PCI Bridge\n\n00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01)\n\tSubsystem: ASUSTeK Computer Inc. P5B-MX/WiFi-AP, P5KPL-VM Motherboard\n\tControl: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-\n\tStatus: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- \n\tKernel driver in use: lpc_ich\n\tKernel modules: intel_rng, lpc_ich, leds_ss4200\n\n00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01) (prog-if 8a [ISA Compatibility mode controller, supports both channels switched to PCI native mode, supports bus mastering])\n\tSubsystem: ASUSTeK Computer Inc. P5B-MX/WiFi-AP, P5KPL-VM Motherboard\n\tControl: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-\n\tStatus: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- Date: Mon, 25 Apr 2022 14:05:30 +0200 Subject: [PATCH 073/154] add response 201 --- ereuse_devicehub/api/views.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ereuse_devicehub/api/views.py b/ereuse_devicehub/api/views.py index 2b353445..297bbbba 100644 --- a/ereuse_devicehub/api/views.py +++ b/ereuse_devicehub/api/views.py @@ -69,7 +69,13 @@ class InventoryView(LoginMix, SnapshotMix): db.session.add(snapshot) db.session().final_flush() db.session.commit() - self.response = self.schema.jsonify(snapshot) + self.response = jsonify( + { + 'url': snapshot.device.url, + 'dhid': snapshot.device.devicehub_id, + 'sid': snapshot.sid, + } + ) self.response.status_code = 201 move_json(self.tmp_snapshots, self.path_snapshot, g.user.email) return self.response From 515dad5850da2345f4a8d161e6fb977412ca0c70 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 25 Apr 2022 14:06:05 +0200 Subject: [PATCH 074/154] fix test for the new api response 201 --- tests/test_snapshot.py | 60 ++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 34 deletions(-) diff --git a/tests/test_snapshot.py b/tests/test_snapshot.py index fb91cfe3..9f6b9f2a 100644 --- a/tests/test_snapshot.py +++ b/tests/test_snapshot.py @@ -966,16 +966,17 @@ def test_snapshot_wb_lite(user: UserClient): "2022-03-31_17h18m51s_ZQMPKKX51K67R68VO2X9RNZL08JPL_snapshot.json" ) body, res = user.post(snapshot, uri="/api/inventory/") + # import pdb; pdb.set_trace() - ssd = [x for x in body['components'] if x['type'] == 'SolidStateDrive'][0] + dev = m.Device.query.filter_by(devicehub_id=body['dhid']).one() + ssd = [x for x in dev.components if x.type == 'SolidStateDrive'][0] - assert body['device']['manufacturer'] == 'lenovo' - # assert body['sid'] == "LXVC" - assert ssd['serialNumber'] == 's35anx0j401001' + assert dev.manufacturer == 'lenovo' + assert body['sid'] == "MLKO1Y0R55XZM051WQ5KJM01RY44Q" + assert ssd.serial_number == 's35anx0j401001' assert res.status == '201 CREATED' - assert '00:28:f8:a6:d5:7e' in body['device']['hid'] + assert '00:28:f8:a6:d5:7e' in dev.hid - dev = m.Device.query.filter_by(id=body['device']['id']).one() assert dev.actions[0].power_on_hours == 6032 errors = SnapshotErrors.query.filter().all() assert errors == [] @@ -994,7 +995,7 @@ def test_snapshot_wb_lite_qemu(user: UserClient): assert body['sid'] == "VL0L5" assert res.status == '201 CREATED' - dev = m.Device.query.filter_by(id=body['device']['id']).one() + dev = m.Device.query.filter_by(devicehub_id=body['dhid']).one() assert dev.manufacturer == 'qemu' assert dev.model == 'standard' assert dev.serial_number is None @@ -1004,7 +1005,6 @@ def test_snapshot_wb_lite_qemu(user: UserClient): assert dev.components[-1].serial_number == 'qm00001' - @pytest.mark.mvp @pytest.mark.usefixtures(conftest.app_context.__name__) def test_snapshot_wb_lite_old_snapshots(user: UserClient): @@ -1036,26 +1036,23 @@ def test_snapshot_wb_lite_old_snapshots(user: UserClient): body11, res = user.post(snapshot_11, res=Snapshot) bodyLite, res = user.post(snapshot_lite, uri="/api/inventory/") + dev = m.Device.query.filter_by(devicehub_id=bodyLite['dhid']).one() components11 = [] componentsLite = [] for c in body11.get('components', []): if c['type'] in ["HardDrive", "SolidStateDrive"]: continue components11.append({c.get('model'), c['type'], c.get('manufacturer')}) - for c in bodyLite.get('components', []): - componentsLite.append({c.get('model'), c['type'], c.get('manufacturer')}) + for c in dev.components: + componentsLite.append({c.model, c.type, c.manufacturer}) try: - assert body11['device'].get('hid') == bodyLite['device'].get('hid') + assert body11['device'].get('hid') == dev.hid if body11['device'].get('hid'): - assert body11['device']['id'] == bodyLite['device']['id'] - assert body11['device'].get('serialNumber') == bodyLite['device'].get( - 'serialNumber' - ) - assert body11['device'].get('model') == bodyLite['device'].get('model') - assert body11['device'].get('manufacturer') == bodyLite['device'].get( - 'manufacturer' - ) + assert body11['device']['id'] == dev.id + assert body11['device'].get('serialNumber') == dev.serial_number + assert body11['device'].get('model') == dev.model + assert body11['device'].get('manufacturer') == dev.manufacturer # wbLite can find more components than wb11 assert len(components11) <= len(componentsLite) @@ -1094,25 +1091,22 @@ def test_snapshot_errors(user: UserClient): body11, res = user.post(snapshot_11, res=Snapshot) assert SnapshotErrors.query.all() == [] bodyLite, res = user.post(snapshot_lite, uri="/api/inventory/") + dev = m.Device.query.filter_by(devicehub_id=bodyLite['dhid']).one() assert len(SnapshotErrors.query.all()) == 2 - assert body11['device'].get('hid') == bodyLite['device'].get('hid') - assert body11['device']['id'] == bodyLite['device']['id'] - assert body11['device'].get('serialNumber') == bodyLite['device'].get( - 'serialNumber' - ) - assert body11['device'].get('model') == bodyLite['device'].get('model') - assert body11['device'].get('manufacturer') == bodyLite['device'].get( - 'manufacturer' - ) + assert body11['device'].get('hid') == dev.hid + assert body11['device']['id'] == dev.id + assert body11['device'].get('serialNumber') == dev.serial_number + assert body11['device'].get('model') == dev.model + assert body11['device'].get('manufacturer') == dev.manufacturer components11 = [] componentsLite = [] for c in body11['components']: if c['type'] == "HardDrive": continue components11.append({c['model'], c['type'], c['manufacturer']}) - for c in bodyLite['components']: - componentsLite.append({c['model'], c['type'], c['manufacturer']}) + for c in dev.components: + componentsLite.append({c.model, c.type, c.manufacturer}) assert len(components11) == len(componentsLite) for c in components11: @@ -1142,7 +1136,7 @@ def test_snapshot_errors_no_serial_number(user: UserClient): bodyLite, res = user.post(snapshot_lite, uri="/api/inventory/") assert res.status_code == 201 assert len(SnapshotErrors.query.all()) == 0 - dev = m.Device.query.filter_by(id=bodyLite['device']['id']).one() + dev = m.Device.query.filter_by(devicehub_id=bodyLite['dhid']).one() assert not dev.model assert not dev.manufacturer assert not dev.serial_number @@ -1165,7 +1159,5 @@ def test_snapshot_check_tests_lite(user: UserClient): bodyLite, res = user.post(snapshot_lite, uri="/api/inventory/") assert res.status_code == 201 SnapshotErrors.query.all() - dev = m.Device.query.filter_by(id=bodyLite['device']['id']).one() + dev = m.Device.query.filter_by(devicehub_id=bodyLite['dhid']).one() # import pdb; pdb.set_trace() - - From e818feeebd78730818a442dbeb00cead09ffa9ad Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 25 Apr 2022 17:20:54 +0200 Subject: [PATCH 075/154] required datas in json of wb lite, error 422 --- ereuse_devicehub/parser/schemas.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ereuse_devicehub/parser/schemas.py b/ereuse_devicehub/parser/schemas.py index 5eab969c..50fc698f 100644 --- a/ereuse_devicehub/parser/schemas.py +++ b/ereuse_devicehub/parser/schemas.py @@ -7,11 +7,11 @@ from ereuse_devicehub.resources.schemas import Thing class Snapshot_lite_data(MarshmallowSchema): - dmidecode = String(required=False) - hwinfo = String(required=False) - smart = List(Dict(), required=False) - lshw = Dict(required=False) - lspci = String(required=False) + dmidecode = String(required=True) + hwinfo = String(required=True) + smart = List(Dict(), required=True) + lshw = Dict(required=True) + lspci = String(required=True) class Snapshot_lite(Thing): @@ -22,7 +22,7 @@ class Snapshot_lite(Thing): sid = String(required=True) type = String(required=True) timestamp = String(required=True) - data = Nested(Snapshot_lite_data) + data = Nested(Snapshot_lite_data, required=True) @validates_schema def validate_workbench_version(self, data: dict): From 767f7c3092dcdbd869e0c8fcb55ef867aadf7ce0 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 25 Apr 2022 17:21:25 +0200 Subject: [PATCH 076/154] add tests wb lite errors 422 --- tests/test_snapshot.py | 57 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/tests/test_snapshot.py b/tests/test_snapshot.py index 9f6b9f2a..00afa456 100644 --- a/tests/test_snapshot.py +++ b/tests/test_snapshot.py @@ -1063,6 +1063,63 @@ def test_snapshot_wb_lite_old_snapshots(user: UserClient): raise err +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_snapshot_lite_error_422(user: UserClient): + """This test check the minimum validation of json that come from snapshot""" + snapshot_11 = file_json('snapshotErrors.json') + lshw = snapshot_11['debug']['lshw'] + hwinfo = snapshot_11['debug']['hwinfo'] + snapshot_lite = { + 'timestamp': snapshot_11['endTime'], + 'type': 'Snapshot', + 'uuid': str(uuid.uuid4()), + 'sid': 'MLKO1', + 'software': 'Workbench', + 'version': '2022.03.00', + "schema_api": "1.0.0", + } + + for k in ['lshw', 'hwinfo', 'smart', 'dmidecode', 'lspci']: + data = { + 'lshw': lshw, + 'hwinfo': '', + 'smart': [], + 'dmidecode': '', + 'lspci': '', + } + data.pop(k) + snapshot_lite['data'] = data + user.post(snapshot_lite, uri="/api/inventory/", status=422) + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_snapshot_lite_minimum(user: UserClient): + """This test check the minimum validation of json that come from snapshot""" + snapshot_11 = file_json('snapshotErrors.json') + lshw = snapshot_11['debug']['lshw'] + snapshot_lite = { + 'timestamp': snapshot_11['endTime'], + 'type': 'Snapshot', + 'uuid': str(uuid.uuid4()), + 'sid': 'MLKO1', + 'software': 'Workbench', + 'version': '2022.03.00', + "schema_api": "1.0.0", + 'data': { + 'lshw': lshw, + 'hwinfo': '', + 'smart': [], + 'dmidecode': '', + 'lspci': '', + }, + } + bodyLite, res = user.post(snapshot_lite, uri="/api/inventory/") + assert bodyLite['sid'] == 'MLKO1' + assert res.status_code == 201 + + @pytest.mark.mvp @pytest.mark.usefixtures(conftest.app_context.__name__) def test_snapshot_errors(user: UserClient): From aafebbb370ecf0c06e8a0d3b799e128f2b48357d Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 25 Apr 2022 18:38:13 +0200 Subject: [PATCH 077/154] adapt correctly response 400 instead of default 422 --- ereuse_devicehub/api/views.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ereuse_devicehub/api/views.py b/ereuse_devicehub/api/views.py index 297bbbba..b8db0684 100644 --- a/ereuse_devicehub/api/views.py +++ b/ereuse_devicehub/api/views.py @@ -5,7 +5,8 @@ from flask import Blueprint from flask import current_app as app from flask import g, jsonify, request from flask.views import View -from marshmallow import ValidationError +from flask.wrappers import Response +from marshmallow.exceptions import ValidationError from werkzeug.exceptions import Unauthorized from ereuse_devicehub.auth import Auth @@ -51,6 +52,8 @@ class InventoryView(LoginMix, SnapshotMix): self.tmp_snapshots = app.config['TMP_SNAPSHOTS'] self.path_snapshot = save_json(snapshot_json, self.tmp_snapshots, g.user.email) snapshot_json = self.validate(snapshot_json) + if type(snapshot_json) == Response: + return snapshot_json try: self.snapshot_json = ParseSnapshotLsHw(snapshot_json).get_snapshot() except Exception as err: @@ -87,11 +90,15 @@ class InventoryView(LoginMix, SnapshotMix): except ValidationError as err: txt = "{}".format(err) uuid = snapshot_json.get('uuid') + sid = snapshot_json.get('sid') error = SnapshotErrors( - description=txt, snapshot_uuid=uuid, severity=Severity.Error + description=txt, snapshot_uuid=uuid, severity=Severity.Error, sid=sid ) error.save(commit=True) - raise err + # raise err + self.response = jsonify(err) + self.response.status_code = 400 + return self.response api.add_url_rule('/inventory/', view_func=InventoryView.as_view('inventory')) From f6660475656464255bcdcec0f6a8043f19c19083 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 25 Apr 2022 18:40:53 +0200 Subject: [PATCH 078/154] adapt test for error 400 instead of 422 --- tests/test_snapshot.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_snapshot.py b/tests/test_snapshot.py index 00afa456..c362d12b 100644 --- a/tests/test_snapshot.py +++ b/tests/test_snapshot.py @@ -1065,7 +1065,7 @@ def test_snapshot_wb_lite_old_snapshots(user: UserClient): @pytest.mark.mvp @pytest.mark.usefixtures(conftest.app_context.__name__) -def test_snapshot_lite_error_422(user: UserClient): +def test_snapshot_lite_error_400(user: UserClient): """This test check the minimum validation of json that come from snapshot""" snapshot_11 = file_json('snapshotErrors.json') lshw = snapshot_11['debug']['lshw'] @@ -1080,6 +1080,8 @@ def test_snapshot_lite_error_422(user: UserClient): "schema_api": "1.0.0", } + user.post(snapshot_lite, uri="/api/inventory/", status=400) + for k in ['lshw', 'hwinfo', 'smart', 'dmidecode', 'lspci']: data = { 'lshw': lshw, @@ -1090,7 +1092,7 @@ def test_snapshot_lite_error_422(user: UserClient): } data.pop(k) snapshot_lite['data'] = data - user.post(snapshot_lite, uri="/api/inventory/", status=422) + user.post(snapshot_lite, uri="/api/inventory/", status=400) @pytest.mark.mvp From 6ef2d8795d43b0f6b948ba9b0b389ab228207823 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 26 Apr 2022 10:43:58 +0200 Subject: [PATCH 079/154] clean try exception --- ereuse_devicehub/api/views.py | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/ereuse_devicehub/api/views.py b/ereuse_devicehub/api/views.py index b8db0684..3516c79e 100644 --- a/ereuse_devicehub/api/views.py +++ b/ereuse_devicehub/api/views.py @@ -54,19 +54,8 @@ class InventoryView(LoginMix, SnapshotMix): snapshot_json = self.validate(snapshot_json) if type(snapshot_json) == Response: return snapshot_json - try: - self.snapshot_json = ParseSnapshotLsHw(snapshot_json).get_snapshot() - except Exception as err: - txt = "{}, {}".format(err.__class__, err) - uuid = snapshot_json.get('uuid') - sid = snapshot_json.get('sid') - error = SnapshotErrors( - description=txt, snapshot_uuid=uuid, severity=Severity.Error, sid=sid - ) - error.save(commit=True) - self.response = jsonify('') - self.response.status_code = 201 - return self.response + + self.snapshot_json = ParseSnapshotLsHw(snapshot_json).get_snapshot() snapshot = self.build() db.session.add(snapshot) From b836e0a9aecfc624f566ba822f2389456157c3f8 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 26 Apr 2022 10:44:49 +0200 Subject: [PATCH 080/154] save exceptions of components --- ereuse_devicehub/parser/computer.py | 41 ++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/ereuse_devicehub/parser/computer.py b/ereuse_devicehub/parser/computer.py index cdfe7a8b..bf417dac 100644 --- a/ereuse_devicehub/parser/computer.py +++ b/ereuse_devicehub/parser/computer.py @@ -1,3 +1,4 @@ +import logging import re from contextlib import suppress from datetime import datetime @@ -13,7 +14,11 @@ from ereuse_utils.nested_lookup import ( ) from ereuse_devicehub.parser import base2, unit, utils +from ereuse_devicehub.parser.models import SnapshotErrors from ereuse_devicehub.parser.utils import Dumpeable +from ereuse_devicehub.resources.enums import Severity + +logger = logging.getLogger(__name__) class Device(Dumpeable): @@ -417,7 +422,7 @@ class Computer(Device): self._ram = None @classmethod - def run(cls, lshw, hwinfo_raw): + def run(cls, lshw, hwinfo_raw, uuid=None, sid=None): """ Gets hardware information from the computer and its components, like serial numbers or model names, and benchmarks them. @@ -428,17 +433,35 @@ class Computer(Device): hwinfo = hwinfo_raw.splitlines() computer = cls(lshw) components = [] - for Component in cls.COMPONENTS: - if Component == Display and computer.type != 'Laptop': - continue # Only get display info when computer is laptop - components.extend(Component.new(lshw=lshw, hwinfo=hwinfo)) - components.append(Motherboard.new(lshw, hwinfo)) + try: + for Component in cls.COMPONENTS: + if Component == Display and computer.type != 'Laptop': + continue # Only get display info when computer is laptop + components.extend(Component.new(lshw=lshw, hwinfo=hwinfo)) + components.append(Motherboard.new(lshw, hwinfo)) + computer._ram = sum( + ram.size for ram in components if isinstance(ram, RamModule) + ) + except Exception as err: + # if there are any problem with components, save the problem and continue + txt = "Error: Snapshot: {uuid}, sid: {sid}, type_error: {type}, error: {error}".format( + uuid=uuid, sid=sid, type=err.__class__, error=err + ) + cls.errors(txt, uuid=uuid, sid=sid) - computer._ram = sum( - ram.size for ram in components if isinstance(ram, RamModule) - ) return computer, components + @classmethod + def errors(cls, txt=None, uuid=None, sid=None, severity=Severity.Error): + if not txt: + return + + logger.error(txt) + error = SnapshotErrors( + description=txt, snapshot_uuid=uuid, severity=severity, sid=sid + ) + error.save() + def __str__(self) -> str: specs = super().__str__() return '{} with {} MB of RAM.'.format(specs, self._ram) From 1c12548851f1658e1e69465ca579bee4a6a2b420 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 26 Apr 2022 10:47:04 +0200 Subject: [PATCH 081/154] return 422 if no there are components neither hid --- ereuse_devicehub/parser/parser.py | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/ereuse_devicehub/parser/parser.py b/ereuse_devicehub/parser/parser.py index dccbb22c..85683a5c 100644 --- a/ereuse_devicehub/parser/parser.py +++ b/ereuse_devicehub/parser/parser.py @@ -3,6 +3,8 @@ import logging import uuid from dmidecode import DMIParse +from flask import request +from marshmallow.exceptions import ValidationError from ereuse_devicehub.parser import base2 from ereuse_devicehub.parser.computer import Computer @@ -358,8 +360,24 @@ class ParseSnapshotLsHw: return x def set_basic_datas(self): - pc, self.components_obj = Computer.run(self.lshw, self.hwinfo_raw) - self.device = pc.dump() + try: + pc, self.components_obj = Computer.run( + self.lshw, self.hwinfo_raw, self.uuid, self.sid + ) + pc = pc.dump() + minimum_hid = None in [pc['manufacturer'], pc['model'], pc['serialNumber']] + if minimum_hid and not self.components_obj: + # if no there are hid and any components return 422 + raise Exception + except Exception: + msg = """It has not been possible to create the device because we lack data. + You can find more information at: {}""".format( + request.url_root + ) + txt = json.dumps({'sid': self.sid, 'message': msg}) + raise ValidationError(txt) + + self.device = pc self.device['uuid'] = self.get_uuid() def set_components(self): From 53a43ff6cb6d97ee3f012a19664b3993b6ec8b19 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 26 Apr 2022 10:47:29 +0200 Subject: [PATCH 082/154] add test for wb lite --- tests/test_snapshot.py | 96 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 84 insertions(+), 12 deletions(-) diff --git a/tests/test_snapshot.py b/tests/test_snapshot.py index c362d12b..e8519206 100644 --- a/tests/test_snapshot.py +++ b/tests/test_snapshot.py @@ -15,7 +15,7 @@ from requests.exceptions import HTTPError from teal.db import DBError, UniqueViolation from teal.marshmallow import ValidationError -from ereuse_devicehub.client import UserClient +from ereuse_devicehub.client import UserClient, Client from ereuse_devicehub.db import db from ereuse_devicehub.devicehub import Devicehub from ereuse_devicehub.parser.models import SnapshotErrors @@ -966,7 +966,6 @@ def test_snapshot_wb_lite(user: UserClient): "2022-03-31_17h18m51s_ZQMPKKX51K67R68VO2X9RNZL08JPL_snapshot.json" ) body, res = user.post(snapshot, uri="/api/inventory/") - # import pdb; pdb.set_trace() dev = m.Device.query.filter_by(devicehub_id=body['dhid']).one() ssd = [x for x in dev.components if x.type == 'SolidStateDrive'][0] @@ -1059,7 +1058,6 @@ def test_snapshot_wb_lite_old_snapshots(user: UserClient): for c in components11: assert c in componentsLite except Exception as err: - # import pdb; pdb.set_trace() raise err @@ -1069,7 +1067,6 @@ def test_snapshot_lite_error_400(user: UserClient): """This test check the minimum validation of json that come from snapshot""" snapshot_11 = file_json('snapshotErrors.json') lshw = snapshot_11['debug']['lshw'] - hwinfo = snapshot_11['debug']['hwinfo'] snapshot_lite = { 'timestamp': snapshot_11['endTime'], 'type': 'Snapshot', @@ -1095,6 +1092,31 @@ def test_snapshot_lite_error_400(user: UserClient): user.post(snapshot_lite, uri="/api/inventory/", status=400) +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_snapshot_lite_error_422(user: UserClient): + """This test check the minimum validation of json that come from snapshot""" + snapshot_11 = file_json('snapshotErrors.json') + snapshot_lite = { + 'timestamp': snapshot_11['endTime'], + 'type': 'Snapshot', + 'uuid': str(uuid.uuid4()), + 'sid': 'MLKO1', + 'software': 'Workbench', + 'version': '2022.03.00', + "schema_api": "1.0.0", + 'data': { + 'lshw': {}, + 'hwinfo': '', + 'smart': [], + 'dmidecode': '', + 'lspci': '', + }, + } + + user.post(snapshot_lite, uri="/api/inventory/", status=422) + + @pytest.mark.mvp @pytest.mark.usefixtures(conftest.app_context.__name__) def test_snapshot_lite_minimum(user: UserClient): @@ -1122,6 +1144,63 @@ def test_snapshot_lite_minimum(user: UserClient): assert res.status_code == 201 +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_snapshot_lite_error_in_components(user: UserClient): + """This test check the minimum validation of json that come from snapshot""" + snapshot_11 = file_json('snapshotErrorsComponents.json') + lshw = snapshot_11['debug']['lshw'] + snapshot_lite = { + 'timestamp': snapshot_11['endTime'], + 'type': 'Snapshot', + 'uuid': str(uuid.uuid4()), + 'sid': 'MLKO1', + 'software': 'Workbench', + 'version': '2022.03.00', + "schema_api": "1.0.0", + 'data': { + 'lshw': lshw, + 'hwinfo': '', + 'smart': [], + 'dmidecode': '', + 'lspci': '', + }, + } + bodyLite, res = user.post(snapshot_lite, uri="/api/inventory/") + assert bodyLite['sid'] == 'MLKO1' + assert res.status_code == 201 + + dev = m.Device.query.filter_by(devicehub_id=bodyLite['dhid']).one() + assert 'Motherboard' not in [x.type for x in dev.components] + error = SnapshotErrors.query.all()[0] + assert 'StopIteration' in error.description + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_snapshot_lite_error_403(client: Client): + """This test check the minimum validation of json that come from snapshot""" + snapshot_11 = file_json('snapshotErrors.json') + lshw = snapshot_11['debug']['lshw'] + snapshot_lite = { + 'timestamp': snapshot_11['endTime'], + 'type': 'Snapshot', + 'uuid': str(uuid.uuid4()), + 'sid': 'MLKO1', + 'software': 'Workbench', + 'version': '2022.03.00', + "schema_api": "1.0.0", + 'data': { + 'lshw': lshw, + 'hwinfo': '', + 'smart': [], + 'dmidecode': '', + 'lspci': '', + }, + } + client.post(snapshot_lite, uri="/api/inventory/", status=401) + + @pytest.mark.mvp @pytest.mark.usefixtures(conftest.app_context.__name__) def test_snapshot_errors(user: UserClient): @@ -1177,13 +1256,7 @@ def test_snapshot_errors(user: UserClient): def test_snapshot_errors_timestamp(user: UserClient): """This test check the minimum validation of json that come from snapshot""" snapshot_lite = file_json('snapshot-error-timestamp.json') - - bodyLite, res = user.post(snapshot_lite, uri="/api/inventory/") - assert res.status_code == 201 - assert len(SnapshotErrors.query.all()) == 1 - error = SnapshotErrors.query.all()[0] - assert snapshot_lite['sid'] == error.sid - assert user.user['id'] == str(error.owner_id) + user.post(snapshot_lite, uri="/api/inventory/", status=422) @pytest.mark.mvp @@ -1219,4 +1292,3 @@ def test_snapshot_check_tests_lite(user: UserClient): assert res.status_code == 201 SnapshotErrors.query.all() dev = m.Device.query.filter_by(devicehub_id=bodyLite['dhid']).one() - # import pdb; pdb.set_trace() From f34fedfb745fa9d60f8a724ab595d862133e6dc0 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 26 Apr 2022 11:49:40 +0200 Subject: [PATCH 083/154] fix migration file --- .../migrations/versions/6f6771813f2e_change_wbid_for_sid.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ereuse_devicehub/migrations/versions/6f6771813f2e_change_wbid_for_sid.py b/ereuse_devicehub/migrations/versions/6f6771813f2e_change_wbid_for_sid.py index 6debf4dd..7eac98fd 100644 --- a/ereuse_devicehub/migrations/versions/6f6771813f2e_change_wbid_for_sid.py +++ b/ereuse_devicehub/migrations/versions/6f6771813f2e_change_wbid_for_sid.py @@ -25,7 +25,7 @@ def get_inv(): def upgrade_datas(): con = op.get_bind() - sql = f"select wbid from {get_inv()}.snapshot;" + sql = f"select * from {get_inv()}.snapshot;" snapshots = con.execute(sql) for snap in snapshots: wbid = snap.wbid @@ -50,8 +50,6 @@ def upgrade(): sa.Column('sid', citext.CIText(), nullable=True), schema=f'{get_inv()}', ) - upgrade_datas() - op.drop_column('snapshot', 'wbid', schema=f'{get_inv()}') op.add_column( 'snapshot_errors', From 9dbebed9d5da32c3558269b8ea35a7f604f7422e Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 26 Apr 2022 11:52:51 +0200 Subject: [PATCH 084/154] drop commits 04063db 022d40e c8aefc6 --- ereuse_devicehub/labels/forms.py | 4 ++-- ereuse_devicehub/static/js/main_inventory.js | 8 ++------ ereuse_devicehub/templates/inventory/device_list.html | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/ereuse_devicehub/labels/forms.py b/ereuse_devicehub/labels/forms.py index 0c118c4c..cd4b5bec 100644 --- a/ereuse_devicehub/labels/forms.py +++ b/ereuse_devicehub/labels/forms.py @@ -1,6 +1,6 @@ from flask import g from flask_wtf import FlaskForm -from wtforms import HiddenField, IntegerField, StringField, validators +from wtforms import IntegerField, StringField, validators from ereuse_devicehub.db import db from ereuse_devicehub.resources.device.models import Device @@ -48,7 +48,7 @@ class TagUnnamedForm(FlaskForm): class PrintLabelsForm(FlaskForm): - devices = HiddenField(render_kw={'class': "devicesList"}) + devices = StringField(render_kw={'class': "devicesList d-none"}) def validate(self, extra_validators=None): is_valid = super().validate(extra_validators) diff --git a/ereuse_devicehub/static/js/main_inventory.js b/ereuse_devicehub/static/js/main_inventory.js index 03073192..bf2fdf43 100644 --- a/ereuse_devicehub/static/js/main_inventory.js +++ b/ereuse_devicehub/static/js/main_inventory.js @@ -1,5 +1,4 @@ $(document).ready(function() { - $(".deviceSelect").on("change", deviceSelect); var show_allocate_form = $("#allocateModal").data('show-action-form'); var show_datawipe_form = $("#datawipeModal").data('show-action-form'); var show_trade_form = $("#tradeLotModal").data('show-action-form'); @@ -12,6 +11,8 @@ $(document).ready(function() { } else if (show_trade_form != "None") { $("#tradeLotModal .btn-primary").show(); newTrade(show_trade_form); + } else { + $(".deviceSelect").on("change", deviceSelect); } // $('#selectLot').selectpicker(); }) @@ -180,11 +181,6 @@ function export_file(type_file) { } } -function print_labels() { - deviceSelect(); - $('#print_labels').submit(); -} - /** * Reactive lots button diff --git a/ereuse_devicehub/templates/inventory/device_list.html b/ereuse_devicehub/templates/inventory/device_list.html index 312ebede..10305ac4 100644 --- a/ereuse_devicehub/templates/inventory/device_list.html +++ b/ereuse_devicehub/templates/inventory/device_list.html @@ -237,7 +237,7 @@ {% for f in form_print_labels %} {{ f }} {% endfor %} - + Print labels From b933581b89c99ba6524d164da1ef6b44a87e0309 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 26 Apr 2022 12:12:31 +0200 Subject: [PATCH 085/154] add file snapshotErrorsComponents.json --- tests/files/snapshotErrorsComponents.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 tests/files/snapshotErrorsComponents.json diff --git a/tests/files/snapshotErrorsComponents.json b/tests/files/snapshotErrorsComponents.json new file mode 100644 index 00000000..e2a8ed87 --- /dev/null +++ b/tests/files/snapshotErrorsComponents.json @@ -0,0 +1 @@ +{"debug": {"battery": null, "lshw": {"children": [{"children": [{"units": "bytes", "physid": "0", "id": "firmware", "description": "BIOS", "date": "05/17/2013", "capacity": 4653056, "version": "9SKT69AUS", "capabilities": {"usb": "USB legacy emulation", "int14serial": "INT14 serial line control", "bootselect": "Selectable boot path", "socketedrom": "BIOS ROM is socketed", "pci": "PCI bus", "uefi": "UEFI specification is supported", "int13floppy2880": "3.5\" 2.88MB floppy", "cdboot": "Booting from CD-ROM/DVD", "int13floppy720": "3.5\" 720KB floppy", "int13floppy1200": "5.25\" 1.2MB floppy", "shadowing": "BIOS shadowing", "int5printscreen": "Print Screen key", "upgrade": "BIOS EEPROM can be upgraded", "int17printer": "INT17 printer control", "int9keyboard": "i8042 keyboard controller", "acpi": "ACPI", "biosbootspecification": "BIOS boot specification", "edd": "Enhanced Disk Drive extensions"}, "claimed": true, "size": 65536, "vendor": "LENOVO", "class": "memory"}, {"handle": "DMI:003E", "class": "memory", "physid": "3e", "configuration": {"level": "2"}, "id": "cache:0", "description": "L2 cache", "capacity": 1048576, "slot": "CPU Internal L2", "capabilities": {"write-through": "Write-trough", "internal": "Internal", "unified": "Unified cache"}, "claimed": true, "size": 1048576, "units": "bytes"}, {"handle": "DMI:003F", "class": "memory", "physid": "3f", "configuration": {"level": "1"}, "id": "cache:1", "description": "L1 cache", "capacity": 262144, "slot": "CPU Internal L1", "capabilities": {"write-through": "Write-trough", "internal": "Internal", "data": "Data cache"}, "claimed": true, "size": 262144, "units": "bytes"}, {"handle": "DMI:0040", "class": "memory", "physid": "40", "configuration": {"level": "3"}, "id": "cache:2", "description": "L3 cache", "capacity": 6291456, "slot": "CPU Internal L3", "capabilities": {"write-back": "Write-back", "internal": "Internal", "unified": "Unified cache"}, "claimed": true, "size": 6291456, "units": "bytes"}, {"children": [{"size": 4294967296, "width": 64, "handle": "DMI:0044", "physid": "0", "serial": "0CEB87C4", "clock": 1600000000, "id": "bank:0", "description": "DIMM DDR3 Synchronous 1600 MHz (0.6 ns)", "class": "memory", "product": "8JTF51264AZ-1G6E1", "slot": "ChannelA-DIMM0", "claimed": true, "vendor": "Micron", "units": "bytes"}, {"size": 4294967296, "width": 64, "handle": "DMI:0046", "physid": "1", "serial": "4274686A", "clock": 1600000000, "id": "bank:1", "description": "DIMM DDR3 Synchronous 1600 MHz (0.6 ns)", "class": "memory", "product": "RMR5030MJ68F9F1600", "slot": "ChannelA-DIMM1", "claimed": true, "vendor": "Fujitsu", "units": "bytes"}, {"description": "DIMM [empty]", "handle": "DMI:0048", "product": "[Empty]", "slot": "ChannelB-DIMM0", "serial": "[Empty]", "physid": "2", "claimed": true, "vendor": "[Empty]", "id": "bank:2", "class": "memory"}, {"description": "DIMM [empty]", "handle": "DMI:0049", "product": "[Empty]", "slot": "ChannelB-DIMM1", "serial": "[Empty]", "physid": "3", "claimed": true, "vendor": "[Empty]", "id": "bank:3", "class": "memory"}], "description": "System Memory", "units": "bytes", "handle": "DMI:0041", "slot": "System board or motherboard", "size": 8589934592, "physid": "41", "claimed": true, "id": "memory", "class": "memory"}, {"capacity": 3800000000, "children": [{"description": "Logical CPU", "width": 64, "handle": "CPU:2.0", "capabilities": {"logical": "Logical CPU"}, "physid": "2.1", "claimed": true, "id": "logicalcpu:0", "class": "processor"}, {"description": "Logical CPU", "width": 64, "handle": "CPU:2.1", "capabilities": {"logical": "Logical CPU"}, "physid": "2.2", "claimed": true, "id": "logicalcpu:1", "class": "processor"}, {"description": "Logical CPU", "width": 64, "handle": "CPU:2.2", "capabilities": {"logical": "Logical CPU"}, "physid": "2.3", "claimed": true, "id": "logicalcpu:2", "class": "processor"}, {"description": "Logical CPU", "width": 64, "handle": "CPU:2.3", "capabilities": {"logical": "Logical CPU"}, "physid": "2.4", "claimed": true, "id": "logicalcpu:3", "class": "processor"}, {"description": "Logical CPU", "width": 64, "handle": "CPU:2.4", "capabilities": {"logical": "Logical CPU"}, "physid": "2.5", "claimed": true, "id": "logicalcpu:4", "class": "processor"}, {"description": "Logical CPU", "width": 64, "handle": "CPU:2.5", "capabilities": {"logical": "Logical CPU"}, "physid": "2.6", "claimed": true, "id": "logicalcpu:5", "class": "processor"}, {"description": "Logical CPU", "width": 64, "handle": "CPU:2.6", "capabilities": {"logical": "Logical CPU"}, "physid": "2.7", "claimed": true, "id": "logicalcpu:6", "class": "processor"}, {"description": "Logical CPU", "width": 64, "handle": "CPU:2.7", "capabilities": {"logical": "Logical CPU"}, "physid": "2.8", "claimed": true, "id": "logicalcpu:7", "class": "processor"}, {"description": "Logical CPU", "width": 64, "handle": "CPU:2.8", "capabilities": {"logical": "Logical CPU"}, "physid": "2.9", "claimed": true, "id": "logicalcpu:8", "class": "processor"}, {"description": "Logical CPU", "width": 64, "handle": "CPU:2.9", "capabilities": {"logical": "Logical CPU"}, "physid": "2.a", "claimed": true, "id": "logicalcpu:9", "class": "processor"}, {"description": "Logical CPU", "width": 64, "handle": "CPU:2.10", "capabilities": {"logical": "Logical CPU"}, "physid": "2.b", "claimed": true, "id": "logicalcpu:10", "class": "processor"}, {"description": "Logical CPU", "width": 64, "handle": "CPU:2.11", "capabilities": {"logical": "Logical CPU"}, "physid": "2.c", "claimed": true, "id": "logicalcpu:11", "class": "processor"}, {"description": "Logical CPU", "width": 64, "handle": "CPU:2.12", "capabilities": {"logical": "Logical CPU"}, "physid": "2.d", "claimed": true, "id": "logicalcpu:12", "class": "processor"}, {"description": "Logical CPU", "width": 64, "handle": "CPU:2.13", "capabilities": {"logical": "Logical CPU"}, "physid": "2.e", "claimed": true, "id": "logicalcpu:13", "class": "processor"}, {"description": "Logical CPU", "width": 64, "handle": "CPU:2.14", "capabilities": {"logical": "Logical CPU"}, "physid": "2.f", "claimed": true, "id": "logicalcpu:14", "class": "processor"}, {"description": "Logical CPU", "width": 64, "handle": "CPU:2.15", "capabilities": {"logical": "Logical CPU"}, "physid": "2.10", "claimed": true, "id": "logicalcpu:15", "class": "processor"}], "size": 1696679000, "width": 64, "handle": "DMI:0042", "physid": "42", "slot": "SOCKET 0", "serial": "0003-06A9-0000-0000-0000-0000", "businfo": "cpu@0", "id": "cpu:0", "clock": 100000000, "configuration": {"cores": "4", "enabledcores": "4", "threads": "4", "id": "2"}, "description": "CPU", "class": "processor", "product": "Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz", "version": "6.10.9", "capabilities": {"mce": "machine check exceptions", "fsgsbase": true, "xsaveopt": true, "pbe": "pending break event", "ds_cpl": true, "cx16": true, "cpufreq": "CPU Frequency scaling", "vme": "virtual mode extensions", "sse": "streaming SIMD extensions (SSE)", "nx": "no-execute bit (NX)", "clflush": true, "msr": "model-specific registers", "mtrr": "memory type range registers", "flush_l1d": true, "pat": "page attribute table", "smx": true, "pse": "page size extensions", "ept": true, "vnmi": true, "pts": true, "pebs": true, "pni": true, "xtpr": true, "pln": true, "ida": true, "tsc_deadline_timer": true, "stibp": true, "nonstop_tsc": true, "pae": "4GB+ memory addressing (Physical Address Extension)", "wp": true, "fpu": "mathematical co-processor", "tm": "thermal interrupt and status", "apic": "on-chip advanced programmable interrupt controller (APIC)", "ss": "self-snoop", "rdtscp": true, "arat": true, "tpr_shadow": true, "ssbd": true, "sse4_2": true, "pclmulqdq": true, "sep": "fast system calls", "flexpriority": true, "x2apic": true, "sse4_1": true, "xsave": true, "vmx": "CPU virtualization (Vanderpool)", "cmov": "conditional move instruction", "aes": true, "monitor": true, "ht": "HyperThreading", "constant_tsc": true, "aperfmperf": true, "arch_perfmon": true, "dtherm": true, "fpu_exception": "FPU exceptions reporting", "f16c": true, "avx": true, "dtes64": true, "sse2": "streaming SIMD extensions (SSE2)", "mmx": "multimedia extensions (MMX)", "fxsr": "fast floating point save/restore", "pse36": "36-bit page size extensions", "de": "debugging extensions", "lahf_lm": true, "epb": true, "md_clear": true, "acpi": "thermal control (ACPI)", "tsc": "time stamp counter", "pge": "page global enable", "ssse3": true, "pdcm": true, "tm2": true, "bts": true, "xtopology": true, "ibpb": true, "ibrs": true, "smep": true, "cx8": "compare and exchange 8-byte", "dts": "debug trace and EMON store MSRs", "rdrand": true, "vpid": true, "popcnt": true, "est": true, "mca": "machine check architecture", "x86-64": "64bits extensions (x86-64)", "erms": true, "boot": "boot processor"}, "units": "Hz", "vendor": "Intel Corp.", "claimed": true}, {"children": [{"description": "Logical CPU", "handle": "CPU:2.0", "capabilities": {"logical": "Logical CPU"}, "physid": "2.1", "claimed": true, "id": "logicalcpu:0", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.1", "capabilities": {"logical": "Logical CPU"}, "physid": "2.2", "claimed": true, "id": "logicalcpu:1", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.2", "capabilities": {"logical": "Logical CPU"}, "physid": "2.3", "claimed": true, "id": "logicalcpu:2", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.3", "capabilities": {"logical": "Logical CPU"}, "physid": "2.4", "claimed": true, "id": "logicalcpu:3", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.4", "capabilities": {"logical": "Logical CPU"}, "physid": "2.5", "claimed": true, "id": "logicalcpu:4", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.5", "capabilities": {"logical": "Logical CPU"}, "physid": "2.6", "claimed": true, "id": "logicalcpu:5", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.6", "capabilities": {"logical": "Logical CPU"}, "physid": "2.7", "claimed": true, "id": "logicalcpu:6", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.7", "capabilities": {"logical": "Logical CPU"}, "physid": "2.8", "claimed": true, "id": "logicalcpu:7", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.8", "capabilities": {"logical": "Logical CPU"}, "physid": "2.9", "claimed": true, "id": "logicalcpu:8", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.9", "capabilities": {"logical": "Logical CPU"}, "physid": "2.a", "claimed": true, "id": "logicalcpu:9", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.10", "capabilities": {"logical": "Logical CPU"}, "physid": "2.b", "claimed": true, "id": "logicalcpu:10", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.11", "capabilities": {"logical": "Logical CPU"}, "physid": "2.c", "claimed": true, "id": "logicalcpu:11", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.12", "capabilities": {"logical": "Logical CPU"}, "physid": "2.d", "claimed": true, "id": "logicalcpu:12", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.13", "capabilities": {"logical": "Logical CPU"}, "physid": "2.e", "claimed": true, "id": "logicalcpu:13", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.14", "capabilities": {"logical": "Logical CPU"}, "physid": "2.f", "claimed": true, "id": "logicalcpu:14", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.15", "capabilities": {"logical": "Logical CPU"}, "physid": "2.10", "claimed": true, "id": "logicalcpu:15", "class": "processor"}], "physid": "1", "serial": "0003-06A9-0000-0000-0000-0000", "configuration": {"id": "2"}, "id": "cpu:1", "businfo": "cpu@1", "units": "Hz", "capacity": 3600000000, "version": "6.10.9", "capabilities": {"vmx": "CPU virtualization (Vanderpool)", "ht": "HyperThreading", "cpufreq": "CPU Frequency scaling"}, "claimed": true, "size": 1635546000, "class": "processor"}, {"children": [{"description": "Logical CPU", "handle": "CPU:2.0", "capabilities": {"logical": "Logical CPU"}, "physid": "2.1", "claimed": true, "id": "logicalcpu:0", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.1", "capabilities": {"logical": "Logical CPU"}, "physid": "2.2", "claimed": true, "id": "logicalcpu:1", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.2", "capabilities": {"logical": "Logical CPU"}, "physid": "2.3", "claimed": true, "id": "logicalcpu:2", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.3", "capabilities": {"logical": "Logical CPU"}, "physid": "2.4", "claimed": true, "id": "logicalcpu:3", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.4", "capabilities": {"logical": "Logical CPU"}, "physid": "2.5", "claimed": true, "id": "logicalcpu:4", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.5", "capabilities": {"logical": "Logical CPU"}, "physid": "2.6", "claimed": true, "id": "logicalcpu:5", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.6", "capabilities": {"logical": "Logical CPU"}, "physid": "2.7", "claimed": true, "id": "logicalcpu:6", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.7", "capabilities": {"logical": "Logical CPU"}, "physid": "2.8", "claimed": true, "id": "logicalcpu:7", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.8", "capabilities": {"logical": "Logical CPU"}, "physid": "2.9", "claimed": true, "id": "logicalcpu:8", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.9", "capabilities": {"logical": "Logical CPU"}, "physid": "2.a", "claimed": true, "id": "logicalcpu:9", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.10", "capabilities": {"logical": "Logical CPU"}, "physid": "2.b", "claimed": true, "id": "logicalcpu:10", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.11", "capabilities": {"logical": "Logical CPU"}, "physid": "2.c", "claimed": true, "id": "logicalcpu:11", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.12", "capabilities": {"logical": "Logical CPU"}, "physid": "2.d", "claimed": true, "id": "logicalcpu:12", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.13", "capabilities": {"logical": "Logical CPU"}, "physid": "2.e", "claimed": true, "id": "logicalcpu:13", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.14", "capabilities": {"logical": "Logical CPU"}, "physid": "2.f", "claimed": true, "id": "logicalcpu:14", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.15", "capabilities": {"logical": "Logical CPU"}, "physid": "2.10", "claimed": true, "id": "logicalcpu:15", "class": "processor"}], "physid": "2", "serial": "0003-06A9-0000-0000-0000-0000", "configuration": {"id": "2"}, "id": "cpu:2", "businfo": "cpu@2", "units": "Hz", "capacity": 3600000000, "version": "6.10.9", "capabilities": {"vmx": "CPU virtualization (Vanderpool)", "ht": "HyperThreading", "cpufreq": "CPU Frequency scaling"}, "claimed": true, "size": 1638476000, "class": "processor"}, {"children": [{"description": "Logical CPU", "handle": "CPU:2.0", "capabilities": {"logical": "Logical CPU"}, "physid": "2.1", "claimed": true, "id": "logicalcpu:0", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.1", "capabilities": {"logical": "Logical CPU"}, "physid": "2.2", "claimed": true, "id": "logicalcpu:1", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.2", "capabilities": {"logical": "Logical CPU"}, "physid": "2.3", "claimed": true, "id": "logicalcpu:2", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.3", "capabilities": {"logical": "Logical CPU"}, "physid": "2.4", "claimed": true, "id": "logicalcpu:3", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.4", "capabilities": {"logical": "Logical CPU"}, "physid": "2.5", "claimed": true, "id": "logicalcpu:4", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.5", "capabilities": {"logical": "Logical CPU"}, "physid": "2.6", "claimed": true, "id": "logicalcpu:5", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.6", "capabilities": {"logical": "Logical CPU"}, "physid": "2.7", "claimed": true, "id": "logicalcpu:6", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.7", "capabilities": {"logical": "Logical CPU"}, "physid": "2.8", "claimed": true, "id": "logicalcpu:7", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.8", "capabilities": {"logical": "Logical CPU"}, "physid": "2.9", "claimed": true, "id": "logicalcpu:8", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.9", "capabilities": {"logical": "Logical CPU"}, "physid": "2.a", "claimed": true, "id": "logicalcpu:9", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.10", "capabilities": {"logical": "Logical CPU"}, "physid": "2.b", "claimed": true, "id": "logicalcpu:10", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.11", "capabilities": {"logical": "Logical CPU"}, "physid": "2.c", "claimed": true, "id": "logicalcpu:11", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.12", "capabilities": {"logical": "Logical CPU"}, "physid": "2.d", "claimed": true, "id": "logicalcpu:12", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.13", "capabilities": {"logical": "Logical CPU"}, "physid": "2.e", "claimed": true, "id": "logicalcpu:13", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.14", "capabilities": {"logical": "Logical CPU"}, "physid": "2.f", "claimed": true, "id": "logicalcpu:14", "class": "processor"}, {"description": "Logical CPU", "handle": "CPU:2.15", "capabilities": {"logical": "Logical CPU"}, "physid": "2.10", "claimed": true, "id": "logicalcpu:15", "class": "processor"}], "physid": "3", "serial": "0003-06A9-0000-0000-0000-0000", "configuration": {"id": "2"}, "id": "cpu:3", "businfo": "cpu@3", "units": "Hz", "capacity": 3600000000, "version": "6.10.9", "capabilities": {"vmx": "CPU virtualization (Vanderpool)", "ht": "HyperThreading", "cpufreq": "CPU Frequency scaling"}, "claimed": true, "size": 1645507000, "class": "processor"}, {"children": [{"handle": "PCI:0000:00:02.0", "physid": "2", "businfo": "pci@0000:00:02.0", "id": "display", "clock": 33000000, "configuration": {"driver": "i915", "latency": "0"}, "description": "VGA compatible controller", "class": "display", "product": "Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller", "version": "09", "capabilities": {"bus_master": "bus mastering", "rom": "extension ROM", "cap_list": "PCI capabilities listing", "msi": "Message Signalled Interrupts", "pm": "Power Management", "vga_controller": true}, "width": 64, "vendor": "Intel Corporation", "claimed": true}, {"children": [{"children": [{"handle": "USB:1:2", "physid": "4", "configuration": {"maxpower": "98mA", "driver": "usbhid", "speed": "2Mbit/s"}, "id": "usb", "businfo": "usb@1:4", "description": "Keyboard", "class": "input", "product": "KVM", "version": "0.00", "capabilities": {"usb-1.10": "USB 1.1"}, "vendor": "No brand", "claimed": true}], "logicalname": "usb1", "handle": "USB:1:1", "physid": "0", "configuration": {"driver": "hub", "speed": "480Mbit/s", "slots": "4"}, "id": "usbhost:0", "businfo": "usb@1", "class": "bus", "product": "xHCI Host Controller", "version": "4.09", "capabilities": {"usb-2.00": "USB 2.0"}, "vendor": "Linux 4.9.0-16-686-pae xhci-hcd", "claimed": true}, {"logicalname": "usb2", "handle": "USB:2:1", "physid": "1", "configuration": {"driver": "hub", "speed": "5000Mbit/s", "slots": "4"}, "id": "usbhost:1", "businfo": "usb@2", "class": "bus", "product": "xHCI Host Controller", "version": "4.09", "capabilities": {"usb-3.00": true}, "vendor": "Linux 4.9.0-16-686-pae xhci-hcd", "claimed": true}], "handle": "PCI:0000:00:14.0", "physid": "14", "businfo": "pci@0000:00:14.0", "id": "usb:0", "clock": 33000000, "configuration": {"driver": "xhci_hcd", "latency": "0"}, "description": "USB controller", "class": "bus", "product": "7 Series/C210 Series Chipset Family USB xHCI Host Controller", "version": "04", "capabilities": {"xhci": true, "cap_list": "PCI capabilities listing", "msi": "Message Signalled Interrupts", "pm": "Power Management", "bus_master": "bus mastering"}, "width": 64, "vendor": "Intel Corporation", "claimed": true}, {"handle": "PCI:0000:00:16.0", "physid": "16", "businfo": "pci@0000:00:16.0", "id": "communication:0", "clock": 33000000, "configuration": {"driver": "mei_me", "latency": "0"}, "description": "Communication controller", "class": "communication", "product": "7 Series/C216 Chipset Family MEI Controller #1", "version": "04", "capabilities": {"cap_list": "PCI capabilities listing", "msi": "Message Signalled Interrupts", "pm": "Power Management", "bus_master": "bus mastering"}, "width": 64, "vendor": "Intel Corporation", "claimed": true}, {"handle": "PCI:0000:00:16.3", "physid": "16.3", "businfo": "pci@0000:00:16.3", "id": "communication:1", "clock": 66000000, "configuration": {"driver": "serial", "latency": "0"}, "description": "Serial controller", "class": "communication", "product": "7 Series/C210 Series Chipset Family KT Controller", "version": "04", "capabilities": {"bus_master": "bus mastering", "cap_list": "PCI capabilities listing", "msi": "Message Signalled Interrupts", "pm": "Power Management", "16550": true}, "width": 32, "vendor": "Intel Corporation", "claimed": true}, {"capacity": 1000000000, "logicalname": "eno1", "size": 1000000000, "width": 32, "handle": "PCI:0000:00:19.0", "physid": "19", "serial": "44:37:e6:c0:6f:b9", "businfo": "pci@0000:00:19.0", "id": "network", "clock": 33000000, "configuration": {"firmware": "0.13-4", "latency": "0", "multicast": "yes", "link": "yes", "duplex": "full", "driverversion": "3.2.6-k", "autonegotiation": "on", "driver": "e1000e", "ip": "10.0.4.33", "speed": "1Gbit/s", "port": "twisted pair", "broadcast": "yes"}, "description": "Ethernet interface", "class": "network", "product": "82579LM Gigabit Network Connection (Lewisville)", "version": "04", "capabilities": {"tp": "twisted pair", "100bt": "100Mbit/s", "ethernet": true, "100bt-fd": "100Mbit/s (full duplex)", "1000bt-fd": "1Gbit/s (full duplex)", "physical": "Physical interface", "cap_list": "PCI capabilities listing", "msi": "Message Signalled Interrupts", "10bt": "10Mbit/s", "10bt-fd": "10Mbit/s (full duplex)", "bus_master": "bus mastering", "pm": "Power Management", "autonegotiation": "Auto-negotiation"}, "units": "bit/s", "vendor": "Intel Corporation", "claimed": true}, {"children": [{"children": [{"children": [{"children": [{"children": [{"logicalname": "/dev/sdb", "dev": "8:16", "class": "disk", "physid": "0", "id": "medium", "claimed": true}], "logicalname": "/dev/sdb", "dev": "8:16", "handle": "SCSI:06:00:00:00", "physid": "0.0.0", "businfo": "scsi@6:0.0.0", "id": "disk:0", "configuration": {"logicalsectorsize": "512", "sectorsize": "512"}, "description": "SCSI Disk", "class": "disk", "product": "Compact Flash", "version": "1.00", "capabilities": {"removable": "support is removable"}, "vendor": "Generic-", "claimed": true}, {"children": [{"logicalname": "/dev/sdc", "dev": "8:32", "class": "disk", "physid": "0", "id": "medium", "claimed": true}], "logicalname": "/dev/sdc", "dev": "8:32", "handle": "SCSI:06:00:00:01", "physid": "0.0.1", "businfo": "scsi@6:0.0.1", "id": "disk:1", "configuration": {"logicalsectorsize": "512", "sectorsize": "512"}, "description": "SCSI Disk", "class": "disk", "product": "SM/xD-Picture", "version": "1.00", "capabilities": {"removable": "support is removable"}, "vendor": "Generic-", "claimed": true}, {"children": [{"logicalname": "/dev/sdd", "dev": "8:48", "class": "disk", "physid": "0", "id": "medium", "claimed": true}], "logicalname": "/dev/sdd", "dev": "8:48", "handle": "SCSI:06:00:00:02", "physid": "0.0.2", "businfo": "scsi@6:0.0.2", "id": "disk:2", "configuration": {"logicalsectorsize": "512", "sectorsize": "512"}, "description": "SCSI Disk", "class": "disk", "product": "SD/MMC", "version": "1.00", "capabilities": {"removable": "support is removable"}, "vendor": "Generic-", "claimed": true}, {"children": [{"logicalname": "/dev/sde", "dev": "8:64", "class": "disk", "physid": "0", "id": "medium", "claimed": true}], "logicalname": "/dev/sde", "dev": "8:64", "handle": "SCSI:06:00:00:03", "physid": "0.0.3", "serial": "3", "businfo": "scsi@6:0.0.3", "id": "disk:3", "configuration": {"logicalsectorsize": "512", "sectorsize": "512"}, "description": "SCSI Disk", "class": "disk", "product": "M.S./M.S.Pro/HG", "version": "1.00", "capabilities": {"removable": "support is removable"}, "vendor": "Generic-", "claimed": true}, {"children": [{"logicalname": "/dev/sdf", "dev": "8:80", "class": "disk", "physid": "0", "id": "medium", "claimed": true}], "logicalname": "/dev/sdf", "dev": "8:80", "handle": "SCSI:06:00:00:04", "physid": "0.0.4", "businfo": "scsi@6:0.0.4", "id": "disk:4", "configuration": {"logicalsectorsize": "512", "sectorsize": "512"}, "description": "SCSI Disk", "class": "disk", "product": "SD/MMC/M.S.PRO", "version": "1.00", "capabilities": {"removable": "support is removable"}, "vendor": "Generic-", "claimed": true}], "logicalname": "scsi6", "handle": "USB:3:3", "physid": "4", "serial": "20100818841300000", "businfo": "usb@3:1.4", "id": "usb", "configuration": {"maxpower": "500mA", "driver": "ums-realtek", "speed": "480Mbit/s"}, "description": "Mass storage device", "class": "storage", "product": "USB2.0-CRW", "version": "84.13", "capabilities": {"emulated": "Emulated device", "usb-2.00": "USB 2.0", "scsi": "SCSI"}, "vendor": "Generic", "claimed": true}], "handle": "USB:3:2", "physid": "1", "configuration": {"driver": "hub", "speed": "480Mbit/s", "slots": "6"}, "id": "usb", "businfo": "usb@3:1", "description": "USB hub", "class": "bus", "product": "Integrated Rate Matching Hub", "version": "0.00", "capabilities": {"usb-2.00": "USB 2.0"}, "vendor": "Intel Corp.", "claimed": true}], "logicalname": "usb3", "handle": "USB:3:1", "physid": "1", "configuration": {"driver": "hub", "speed": "480Mbit/s", "slots": "3"}, "id": "usbhost", "businfo": "usb@3", "class": "bus", "product": "EHCI Host Controller", "version": "4.09", "capabilities": {"usb-2.00": "USB 2.0"}, "vendor": "Linux 4.9.0-16-686-pae ehci_hcd", "claimed": true}], "handle": "PCI:0000:00:1a.0", "physid": "1a", "businfo": "pci@0000:00:1a.0", "id": "usb:1", "clock": 33000000, "configuration": {"driver": "ehci-pci", "latency": "0"}, "description": "USB controller", "class": "bus", "product": "7 Series/C216 Chipset Family USB Enhanced Host Controller #2", "version": "04", "capabilities": {"debug": "Debug port", "cap_list": "PCI capabilities listing", "ehci": "Enhanced Host Controller Interface (USB2)", "pm": "Power Management", "bus_master": "bus mastering"}, "width": 32, "vendor": "Intel Corporation", "claimed": true}, {"handle": "PCI:0000:00:1b.0", "physid": "1b", "businfo": "pci@0000:00:1b.0", "id": "multimedia", "clock": 33000000, "configuration": {"driver": "snd_hda_intel", "latency": "0"}, "description": "Audio device", "class": "multimedia", "product": "7 Series/C216 Chipset Family High Definition Audio Controller", "version": "04", "capabilities": {"cap_list": "PCI capabilities listing", "pciexpress": "PCI Express", "msi": "Message Signalled Interrupts", "pm": "Power Management", "bus_master": "bus mastering"}, "width": 64, "vendor": "Intel Corporation", "claimed": true}, {"handle": "PCIBUS:0000:01", "physid": "1c", "businfo": "pci@0000:00:1c.0", "id": "pci:0", "clock": 33000000, "configuration": {"driver": "pcieport"}, "description": "PCI bridge", "class": "bridge", "product": "7 Series/C216 Chipset Family PCI Express Root Port 1", "version": "c4", "capabilities": {"pciexpress": "PCI Express", "bus_master": "bus mastering", "pci": true, "normal_decode": true, "cap_list": "PCI capabilities listing", "msi": "Message Signalled Interrupts", "pm": "Power Management"}, "width": 32, "vendor": "Intel Corporation", "claimed": true}, {"children": [{"logicalname": "wlp2s0", "handle": "PCI:0000:02:00.0", "disabled": true, "physid": "0", "serial": "6c:88:14:9d:59:30", "businfo": "pci@0000:02:00.0", "id": "network", "clock": 33000000, "configuration": {"driverversion": "4.9.0-16-686-pae", "wireless": "IEEE 802.11", "firmware": "18.168.6.1", "multicast": "yes", "latency": "0", "link": "no", "driver": "iwlwifi", "broadcast": "yes"}, "description": "Wireless interface", "class": "network", "product": "Centrino Advanced-N 6205 [Taylor Peak]", "version": "34", "capabilities": {"wireless": "Wireless-LAN", "ethernet": true, "pciexpress": "PCI Express", "bus_master": "bus mastering", "physical": "Physical interface", "cap_list": "PCI capabilities listing", "msi": "Message Signalled Interrupts", "pm": "Power Management"}, "width": 64, "vendor": "Intel Corporation", "claimed": true}], "handle": "PCIBUS:0000:02", "physid": "1c.4", "businfo": "pci@0000:00:1c.4", "id": "pci:1", "clock": 33000000, "configuration": {"driver": "pcieport"}, "description": "PCI bridge", "class": "bridge", "product": "7 Series/C210 Series Chipset Family PCI Express Root Port 5", "version": "c4", "capabilities": {"pciexpress": "PCI Express", "bus_master": "bus mastering", "pci": true, "normal_decode": true, "cap_list": "PCI capabilities listing", "msi": "Message Signalled Interrupts", "pm": "Power Management"}, "width": 32, "vendor": "Intel Corporation", "claimed": true}, {"children": [{"children": [{"handle": "USB:4:2", "physid": "1", "configuration": {"driver": "hub", "speed": "480Mbit/s", "slots": "8"}, "id": "usb", "businfo": "usb@4:1", "description": "USB hub", "class": "bus", "product": "Integrated Rate Matching Hub", "version": "0.00", "capabilities": {"usb-2.00": "USB 2.0"}, "vendor": "Intel Corp.", "claimed": true}], "logicalname": "usb4", "handle": "USB:4:1", "physid": "1", "configuration": {"driver": "hub", "speed": "480Mbit/s", "slots": "3"}, "id": "usbhost", "businfo": "usb@4", "class": "bus", "product": "EHCI Host Controller", "version": "4.09", "capabilities": {"usb-2.00": "USB 2.0"}, "vendor": "Linux 4.9.0-16-686-pae ehci_hcd", "claimed": true}], "handle": "PCI:0000:00:1d.0", "physid": "1d", "businfo": "pci@0000:00:1d.0", "id": "usb:2", "clock": 33000000, "configuration": {"driver": "ehci-pci", "latency": "0"}, "description": "USB controller", "class": "bus", "product": "7 Series/C216 Chipset Family USB Enhanced Host Controller #1", "version": "04", "capabilities": {"debug": "Debug port", "cap_list": "PCI capabilities listing", "ehci": "Enhanced Host Controller Interface (USB2)", "pm": "Power Management", "bus_master": "bus mastering"}, "width": 32, "vendor": "Intel Corporation", "claimed": true}, {"handle": "PCIBUS:0000:03", "physid": "1e", "businfo": "pci@0000:00:1e.0", "id": "pci:2", "clock": 33000000, "description": "PCI bridge", "class": "bridge", "product": "82801 PCI Bridge", "version": "a4", "capabilities": {"subtractive_decode": true, "cap_list": "PCI capabilities listing", "bus_master": "bus mastering", "pci": true}, "width": 32, "vendor": "Intel Corporation", "claimed": true}, {"handle": "PCI:0000:00:1f.0", "physid": "1f", "businfo": "pci@0000:00:1f.0", "id": "isa", "clock": 33000000, "configuration": {"driver": "lpc_ich", "latency": "0"}, "description": "ISA bridge", "class": "bridge", "product": "Q77 Express Chipset LPC Controller", "version": "04", "capabilities": {"cap_list": "PCI capabilities listing", "isa": true, "bus_master": "bus mastering"}, "width": 32, "vendor": "Intel Corporation", "claimed": true}, {"handle": "PCI:0000:00:1f.2", "physid": "1f.2", "businfo": "pci@0000:00:1f.2", "id": "storage", "clock": 66000000, "configuration": {"driver": "ahci", "latency": "0"}, "description": "SATA controller", "class": "storage", "product": "7 Series/C210 Series Chipset Family 6-port SATA Controller [AHCI mode]", "version": "04", "capabilities": {"storage": true, "bus_master": "bus mastering", "ahci_1.0": true, "cap_list": "PCI capabilities listing", "msi": "Message Signalled Interrupts", "pm": "Power Management"}, "width": 32, "vendor": "Intel Corporation", "claimed": true}, {"handle": "PCI:0000:00:1f.3", "physid": "1f.3", "businfo": "pci@0000:00:1f.3", "id": "serial", "clock": 33000000, "configuration": {"driver": "i801_smbus", "latency": "0"}, "description": "SMBus", "class": "bus", "product": "7 Series/C216 Chipset Family SMBus Controller", "version": "04", "width": 64, "vendor": "Intel Corporation", "claimed": true}], "handle": "PCIBUS:0000:00", "physid": "100", "businfo": "pci@0000:00:00.0", "id": "pci", "clock": 33000000, "configuration": {"driver": "ivb_uncore"}, "description": "Host bridge", "class": "bridge", "product": "Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller", "version": "09", "width": 32, "vendor": "Intel Corporation", "claimed": true}, {"children": [{"logicalname": "/dev/sda", "dev": "8:0", "size": 500107862016, "handle": "SCSI:00:00:00:00", "physid": "0.0.0", "serial": "WD-WCC2EFM32092", "businfo": "scsi@0:0.0.0", "id": "disk", "configuration": {"logicalsectorsize": "512", "sectorsize": "512", "ansiversion": "5"}, "description": "ATA Disk", "class": "disk", "product": "WDC WD5000AAKX-0", "version": "1H19", "units": "bytes", "vendor": "Western Digital", "claimed": true}], "logicalname": "scsi0", "class": "storage", "capabilities": {"emulated": "Emulated device"}, "physid": "4", "id": "scsi:0", "claimed": true}, {"children": [{"logicalname": ["/dev/cdrom", "/dev/cdrw", "/dev/dvd", "/dev/dvdrw", "/dev/sr0"], "dev": "11:0", "handle": "SCSI:01:00:00:00", "physid": "0.0.0", "businfo": "scsi@1:0.0.0", "id": "cdrom", "configuration": {"status": "nodisc", "ansiversion": "5"}, "description": "DVD-RAM writer", "class": "disk", "product": "DVD-RAM GH82N", "version": "KU02", "capabilities": {"dvd": "DVD playback", "audio": "Audio CD playback", "removable": "support is removable", "cd-r": "CD-R burning", "cd-rw": "CD-RW burning", "dvd-ram": "DVD-RAM burning", "dvd-r": "DVD-R burning"}, "vendor": "HL-DT-ST", "claimed": true}], "logicalname": "scsi1", "class": "storage", "capabilities": {"emulated": "Emulated device"}, "physid": "5", "id": "scsi:1", "claimed": true}], "description": "Motherboards", "slot": "To be filled by O.E.M.", "handle": "DMI:0002", "product": "MAHOBAY", "version": "0B98401 PRO", "physid": "0", "claimed": true, "vendor": "LENOVO", "id": "core", "class": "bus"}, {"capacity": 32768, "description": "To Be Filled By O.E.M.", "class": "power", "product": "To Be Filled By O.E.M.", "version": "To Be Filled By O.E.M.", "serial": "To Be Filled By O.E.M.", "physid": "1", "vendor": "To Be Filled By O.E.M.", "id": "power", "units": "mWh"}], "handle": "DMI:0001", "serial": "S4WBPH6", "configuration": {"uuid": "04FECD3B-22D9-E211-9E31-F495A6022900", "sku": "LENOVO_MT_2988", "cpus": "4", "keyboard_password": "enabled", "power-on_password": "disabled", "boot": "normal", "administrator_password": "disabled", "family": "To be filled by O.E.M.", "chassis": "desktop"}, "id": "debian", "description": "Desktop Computer", "class": "system", "product": "2988D6G (LENOVO_MT_2988)", "version": "ThinkCentre M92p", "capabilities": {"smp-1.4": "SMP specification v1.4", "dmi-2.7": "DMI version 2.7", "smbios-2.7": "SMBIOS version 2.7", "smp": "Symmetric Multi-Processing"}, "width": 32, "vendor": "LENOVO", "claimed": true}, "hwinfo": "01: None 00.0: 10105 BIOS\n [Created at bios.186]\n Unique ID: rdCR.lZF+r4EgHp4\n Hardware Class: bios\n BIOS Keyboard LED Status:\n Scroll Lock: off\n Num Lock: on\n Caps Lock: off\n Serial Port 0: 0x3f8\n Base Memory: 629 kB\n PnP BIOS: @@@0000\n BIOS: extended read supported\n MP spec rev 1.4 info:\n OEM id: \"A M I\"\n Product id: \"LENOVO\"\n 4 CPUs (0 disabled)\n SMBIOS Version: 2.7\n BIOS Info: #0\n Vendor: \"LENOVO\"\n Version: \"9SKT69AUS\"\n Date: \"05/17/2013\"\n Start Address: 0xf0000\n ROM Size: 4608 kB\n Features: 0x0d03001100013f8b9880\n PCI supported\n BIOS flashable\n BIOS shadowing allowed\n CD boot supported\n Selectable boot supported\n BIOS ROM socketed\n EDD spec supported\n 1.2MB Floppy supported\n 720kB Floppy supported\n 2.88MB Floppy supported\n Print Screen supported\n 8042 Keyboard Services supported\n Serial Services supported\n Printer Services supported\n ACPI supported\n USB Legacy supported\n BIOS Boot Spec supported\n System Info: #1\n Manufacturer: \"LENOVO\"\n Product: \"2988D6G\"\n Version: \"ThinkCentre M92p\"\n Serial: \"S4WBPH6\"\n UUID: undefined, but settable\n Wake-up: 0x06 (Power Switch)\n Board Info: #2\n Manufacturer: \"LENOVO\"\n Product: \"MAHOBAY\"\n Version: \"0B98401 PRO\"\n Type: 0x0a (Motherboard)\n Features: 0x09\n Hosting Board\n Replaceable\n Location: \"To be filled by O.E.M.\"\n Chassis: #3\n Chassis Info: #3\n Manufacturer: \"To Be Filled By O.E.M.\"\n Version: \"To Be Filled By O.E.M.\"\n Serial: \"S4WBPH6\"\n Type: 0x03 (Desktop)\n Bootup State: 0x03 (Safe)\n Power Supply State: 0x03 (Safe)\n Thermal State: 0x03 (Safe)\n Security Status: 0x03 (None)\n Port Connector: #4\n Type: 0x0e (Mouse Port)\n Internal Designator: \"J1A1\"\n External Designator: \"PS2Mouse\"\n External Connector: 0x0f (PS/2)\n Port Connector: #5\n Type: 0x0d (Keyboard Port)\n Internal Designator: \"J1A1\"\n External Designator: \"Keyboard\"\n External Connector: 0x0f (PS/2)\n Port Connector: #6\n Type: 0xff (Other)\n Internal Designator: \"J2A1\"\n External Designator: \"TV Out\"\n External Connector: 0x1d (Mini-Centronics Type-14)\n Port Connector: #7\n Type: 0x09 (Serial Port 16550A Compatible)\n Internal Designator: \"J2A2A\"\n External Designator: \"COM A\"\n External Connector: 0x08 (DB-9 pin male)\n Port Connector: #8\n Type: 0x1c (Video Port)\n Internal Designator: \"J2A2B\"\n External Designator: \"Video\"\n External Connector: 0x07 (DB-15 pin female)\n Port Connector: #9\n Type: 0x10 (USB)\n Internal Designator: \"J3A1\"\n External Designator: \"USB1\"\n External Connector: 0x12 (Access Bus [USB])\n Port Connector: #10\n Type: 0x10 (USB)\n Internal Designator: \"J3A1\"\n External Designator: \"USB2\"\n External Connector: 0x12 (Access Bus [USB])\n Port Connector: #11\n Type: 0x10 (USB)\n Internal Designator: \"J3A1\"\n External Designator: \"USB3\"\n External Connector: 0x12 (Access Bus [USB])\n Port Connector: #12\n Type: 0xff (Other)\n Internal Designator: \"J9A1 - TPM HDR\"\n Internal Connector: 0xff (Other)\n Port Connector: #13\n Type: 0xff (Other)\n Internal Designator: \"J9C1 - PCIE DOCKING CONN\"\n Internal Connector: 0xff (Other)\n Port Connector: #14\n Type: 0xff (Other)\n Internal Designator: \"J2B3 - CPU FAN\"\n Internal Connector: 0xff (Other)\n Port Connector: #15\n Type: 0xff (Other)\n Internal Designator: \"J6C2 - EXT HDMI\"\n Internal Connector: 0xff (Other)\n Port Connector: #16\n Type: 0xff (Other)\n Internal Designator: \"J3C1 - GMCH FAN\"\n Internal Connector: 0xff (Other)\n Port Connector: #17\n Type: 0xff (Other)\n Internal Designator: \"J1D1 - ITP\"\n Internal Connector: 0xff (Other)\n Port Connector: #18\n Type: 0xff (Other)\n Internal Designator: \"J9E2 - MDC INTPSR\"\n Internal Connector: 0xff (Other)\n Port Connector: #19\n Type: 0xff (Other)\n Internal Designator: \"J9E4 - MDC INTPSR\"\n Internal Connector: 0xff (Other)\n Port Connector: #20\n Type: 0xff (Other)\n Internal Designator: \"J9E3 - LPC HOT DOCKING\"\n Internal Connector: 0xff (Other)\n Port Connector: #21\n Type: 0xff (Other)\n Internal Designator: \"J9E1 - SCAN MATRIX\"\n Internal Connector: 0xff (Other)\n Port Connector: #22\n Type: 0xff (Other)\n Internal Designator: \"J9G1 - LPC SIDE BAND\"\n Internal Connector: 0xff (Other)\n Port Connector: #23\n Type: 0xff (Other)\n Internal Designator: \"J8F1 - UNIFIED\"\n Internal Connector: 0xff (Other)\n Port Connector: #24\n Type: 0xff (Other)\n Internal Designator: \"J6F1 - LVDS\"\n Internal Connector: 0xff (Other)\n Port Connector: #25\n Type: 0xff (Other)\n Internal Designator: \"J2F1 - LAI FAN\"\n Internal Connector: 0xff (Other)\n Port Connector: #26\n Type: 0xff (Other)\n Internal Designator: \"J2G1 - GFX VID\"\n Internal Connector: 0xff (Other)\n Port Connector: #27\n Type: 0xff (Other)\n Internal Designator: \"J1G6 - AC JACK\"\n Internal Connector: 0xff (Other)\n System Slot: #28\n Designation: \"J6B2\"\n Type: 0xa5 (Other)\n Bus Width: 0x0d (Other)\n Status: 0x04 (In Use)\n Length: 0x04 (Long)\n Slot ID: 0\n Characteristics: 0x010c (3.3 V, Shared, PME#)\n System Slot: #29\n Designation: \"J6B1\"\n Type: 0xa5 (Other)\n Bus Width: 0x08 (Other)\n Status: 0x04 (In Use)\n Length: 0x03 (Short)\n Slot ID: 1\n Characteristics: 0x010c (3.3 V, Shared, PME#)\n System Slot: #30\n Designation: \"J6D1\"\n Type: 0xa5 (Other)\n Bus Width: 0x08 (Other)\n Status: 0x04 (In Use)\n Length: 0x03 (Short)\n Slot ID: 2\n Characteristics: 0x010c (3.3 V, Shared, PME#)\n System Slot: #31\n Designation: \"J7B1\"\n Type: 0xa5 (Other)\n Bus Width: 0x08 (Other)\n Status: 0x04 (In Use)\n Length: 0x03 (Short)\n Slot ID: 3\n Characteristics: 0x010c (3.3 V, Shared, PME#)\n System Slot: #32\n Designation: \"J8B4\"\n Type: 0xa5 (Other)\n Bus Width: 0x08 (Other)\n Status: 0x04 (In Use)\n Length: 0x03 (Short)\n Slot ID: 4\n Characteristics: 0x010c (3.3 V, Shared, PME#)\n On Board Devices: #33\n Video: \"Onboard Video\"\n Ethernet: \"Onboard LAN\"\n Sound: \"Onboard Audio\"\n Other: \"Sata Controller\"\n OEM Strings: #34\n To Be Filled By O.E.M.\n System Config Options (Jumpers & Switches) #35:\n scre++\n Hardware Security: #36\n Power-on Password: 0x00 (Disabled)\n Keyboard Password: 0x01 (Enabled)\n Admin Password: 0x00 (Disabled)\n Front Panel Reset: 0x02 (Not Implemented)\n Type 32 Record: #37\n Data 00: 20 14 25 00 00 00 00 00 00 00 00 00 00 00 00 00\n Data 10: 00 00 00 00\n Type 34 Record: #38\n Data 00: 22 0b 26 00 01 04 00 00 00 00 03\n String 1: \"LM78-1\"\n Type 26 Record: #39\n Data 00: 1a 16 27 00 01 00 00 80 00 80 00 80 00 80 00 80\n Data 10: 00 00 00 00 00 80\n String 1: \"LM78A\"\n Type 36 Record: #40\n Data 00: 24 10 28 00 01 00 02 00 03 00 04 00 05 00 06 00\n Type 35 Record: #41\n Data 00: 23 0b 29 00 01 26 00 26 00 27 00\n String 1: \"To Be Filled By O.E.M.\"\n Type 28 Record: #42\n Data 00: 1c 16 2a 00 01 00 00 80 00 80 00 80 00 80 00 80\n Data 10: 00 00 00 00 00 80\n String 1: \"LM78A\"\n Type 36 Record: #43\n Data 00: 24 10 2b 00 01 00 02 00 03 00 04 00 05 00 06 00\n Type 35 Record: #44\n Data 00: 23 0b 2c 00 01 26 00 29 00 2a 00\n String 1: \"To Be Filled By O.E.M.\"\n Type 27 Record: #45\n Data 00: 1b 0f 2d 00 2a 00 12 01 00 00 00 00 00 80 01\n String 1: \"Cooling Dev 1\"\n Type 36 Record: #46\n Data 00: 24 10 2e 00 01 00 02 00 03 00 04 00 05 00 06 00\n Type 35 Record: #47\n Data 00: 23 0b 2f 00 01 26 00 2c 00 2d 00\n String 1: \"To Be Filled By O.E.M.\"\n Type 27 Record: #48\n Data 00: 1b 0f 30 00 2a 00 12 01 00 00 00 00 00 80 00\n Type 36 Record: #49\n Data 00: 24 10 31 00 01 00 02 00 03 00 04 00 05 00 06 00\n Type 35 Record: #50\n Data 00: 23 0b 32 00 01 26 00 2f 00 30 00\n String 1: \"To Be Filled By O.E.M.\"\n Type 29 Record: #51\n Data 00: 1d 16 33 00 01 00 00 80 00 80 00 80 00 80 00 80\n Data 10: 00 00 00 00 00 80\n String 1: \"ABC\"\n Type 36 Record: #52\n Data 00: 24 10 34 00 00 80 00 80 00 80 00 80 00 80 00 80\n Type 35 Record: #53\n Data 00: 23 0b 35 00 01 26 00 32 00 30 00\n String 1: \"To Be Filled By O.E.M.\"\n Type 26 Record: #54\n Data 00: 1a 16 36 00 01 6a 00 80 00 80 00 80 00 80 00 80\n Data 10: 00 00 00 00 00 80\n String 1: \"LM78A\"\n Type 28 Record: #55\n Data 00: 1c 16 37 00 01 6a 00 80 00 80 00 80 00 80 00 80\n Data 10: 00 00 00 00 00 80\n String 1: \"LM78A\"\n Type 27 Record: #56\n Data 00: 1b 0f 38 00 37 00 67 01 00 00 00 00 00 80 01\n String 1: \"Cooling Dev 1\"\n Type 29 Record: #57\n Data 00: 1d 16 39 00 01 6a 00 80 00 80 00 80 00 80 00 80\n Data 10: 00 00 00 00 00 80\n String 1: \"ABC\"\n Type 39 Record: #58\n Data 00: 27 16 3a 00 01 01 02 03 04 05 06 07 00 80 a2 11\n Data 10: 36 00 38 00 39 00\n String 1: \"To Be Filled By O.E.M.\"\n String 2: \"To Be Filled By O.E.M.\"\n String 3: \"To Be Filled By O.E.M.\"\n String 4: \"To Be Filled By O.E.M.\"\n String 5: \"To Be Filled By O.E.M.\"\n String 6: \"To Be Filled By O.E.M.\"\n String 7: \"To Be Filled By O.E.M.\"\n Type 41 Record: #59\n Data 00: 29 0b 3b 00 01 83 01 00 00 00 10\n String 1: \"Onboard IGD\"\n Type 41 Record: #60\n Data 00: 29 0b 3c 00 01 85 01 00 00 00 c8\n String 1: \"Onboard LAN\"\n Type 41 Record: #61\n Data 00: 29 0b 3d 00 01 81 01 00 00 03 e2\n String 1: \"Onboard 1394\"\n Cache Info: #62\n Designation: \"CPU Internal L2\"\n Level: L2\n State: Enabled\n Mode: 0x00 (Write Through)\n Location: 0x00 (Internal, Not Socketed)\n ECC: 0x06 (Multi-bit)\n Type: 0x05 (Unified)\n Associativity: 0x07 (8-way Set-Associative)\n Max. Size: 1024 kB\n Current Size: 1024 kB\n Supported SRAM Types: 0x0002 (Unknown)\n Current SRAM Type: 0x0002 (Unknown)\n Cache Info: #63\n Designation: \"CPU Internal L1\"\n Level: L1\n State: Enabled\n Mode: 0x00 (Write Through)\n Location: 0x00 (Internal, Not Socketed)\n ECC: 0x04 (Parity)\n Type: 0x04 (Data)\n Associativity: 0x07 (8-way Set-Associative)\n Max. Size: 256 kB\n Current Size: 256 kB\n Supported SRAM Types: 0x0002 (Unknown)\n Current SRAM Type: 0x0002 (Unknown)\n Cache Info: #64\n Designation: \"CPU Internal L3\"\n Level: L3\n State: Enabled\n Mode: 0x01 (Write Back)\n Location: 0x00 (Internal, Not Socketed)\n ECC: 0x06 (Multi-bit)\n Type: 0x05 (Unified)\n Associativity: 0x09 (Other)\n Max. Size: 6144 kB\n Current Size: 6144 kB\n Supported SRAM Types: 0x0002 (Unknown)\n Current SRAM Type: 0x0002 (Unknown)\n Physical Memory Array: #65\n Use: 0x03 (System memory)\n Location: 0x03 (Motherboard)\n Slots: 4\n Max. Size: 32 GB\n ECC: 0x03 (None)\n Processor Info: #66\n Socket: \"SOCKET 0\"\n Socket Type: 0x24 (Other)\n Socket Status: Populated\n Type: 0x03 (CPU)\n Family: 0xcd (Other)\n Manufacturer: \"Intel(R) Corporation\"\n Version: \"Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz\"\n Asset Tag: \"Fill By OEM\"\n Part Number: \"Fill By OEM\"\n Processor ID: 0xbfebfbff000306a9\n Status: 0x01 (Enabled)\n Voltage: 1.6 V\n External Clock: 100 MHz\n Max. Speed: 3800 MHz\n Current Speed: 3200 MHz\n L1 Cache: #63\n L2 Cache: #62\n L3 Cache: #64\n Type 15 Record: #67\n Data 00: 0f 49 43 00 00 20 00 00 10 00 03 01 01 00 00 00\n Data 10: 60 f1 0e 00 01 19 02 01 00 02 00 03 00 04 00 05\n Data 20: 00 06 00 07 00 08 04 09 00 0a 00 0b 00 0c 00 0d\n Data 30: 00 0e 00 10 00 11 00 12 00 13 00 14 00 15 00 16\n Data 40: 00 17 00 ff 00 e0 e0 e1 e1\n Memory Device: #68\n Location: \"ChannelA-DIMM0\"\n Bank: \"BANK 0\"\n Manufacturer: \"Micron\"\n Serial: \"0CEB87C4\"\n Asset Tag: \"9876543210\"\n Part Number: \"8JTF51264AZ-1G6E1\"\n Memory Array: #65\n Form Factor: 0x09 (DIMM)\n Type: 0x18 (Other)\n Type Detail: 0x0080 (Synchronous)\n Data Width: 64 bits\n Size: 4 GB\n Speed: 1600 MHz\n Memory Device Mapping: #69\n Memory Device: #68\n Array Mapping: #74\n Interleave Pos: 0\n Interleaved Depth: 0\n Start Address: 0x0000000000000000\n End Address: 0x0000000100000000\n Memory Device: #70\n Location: \"ChannelA-DIMM1\"\n Bank: \"BANK 1\"\n Manufacturer: \"0443\"\n Serial: \"4274686A\"\n Asset Tag: \"9876543210\"\n Part Number: \"RMR5030MJ68F9F1600\"\n Memory Array: #65\n Form Factor: 0x09 (DIMM)\n Type: 0x18 (Other)\n Type Detail: 0x0080 (Synchronous)\n Data Width: 64 bits\n Size: 4 GB\n Speed: 1600 MHz\n Memory Device Mapping: #71\n Memory Device: #70\n Array Mapping: #74\n Interleave Pos: 0\n Interleaved Depth: 0\n Start Address: 0x0000000100000000\n End Address: 0x0000000200000000\n Memory Device: #72\n Location: \"ChannelB-DIMM0\"\n Bank: \"BANK 2\"\n Manufacturer: \"[Empty]\"\n Serial: \"[Empty]\"\n Asset Tag: \"9876543210\"\n Part Number: \"[Empty]\"\n Memory Array: #65\n Form Factor: 0x09 (DIMM)\n Type: 0x02 (Unknown)\n Data Width: 0 bits\n Size: No Memory Installed\n Memory Device: #73\n Location: \"ChannelB-DIMM1\"\n Bank: \"BANK 3\"\n Manufacturer: \"[Empty]\"\n Serial: \"[Empty]\"\n Asset Tag: \"9876543210\"\n Part Number: \"[Empty]\"\n Memory Array: #65\n Form Factor: 0x09 (DIMM)\n Type: 0x02 (Unknown)\n Data Width: 0 bits\n Size: No Memory Installed\n Memory Array Mapping: #74\n Memory Array: #65\n Partition Width: 4\n Start Address: 0x0000000000000000\n End Address: 0x0000000200000000\n Type 131 Record: #76\n Data 00: 83 16 4c 00 01 02 00 00 00 00 00 00 00 00 00 00\n Data 10: 00 00 00 00 80 01\n String 1: \"TVT-Enablement\"\n Type 133 Record: #77\n Data 00: 85 05 4d 00 01\n String 1: \"KHOIHGIUCCHHII\"\n Type 140 Record: #78\n Data 00: 8c 55 4e 00 4c 45 4e 4f 56 4f 0b 00 01 f6 d8 ca\n Data 10: e9 7f d4 6c de f6 c0 f1 bc 34 01 78 2d 01 00 00\n Data 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n Data 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n Data 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n Data 50: 00 00 00 00 00\n Type 140 Record: #79\n Data 00: 8c 2f 4f 00 4c 45 4e 4f 56 4f 0b 01 01 09 00 ad\n Data 10: fe 6f f4 8b 78 e0 79 40 78 d1 97 2f 9b 72 6b 00\n Data 20: 00 00 00 10 00 10 00 10 01 d0 00 20 01 00 01\n Type 140 Record: #80\n Data 00: 8c 3f 50 00 4c 45 4e 4f 56 4f 0b 02 01 00 00 00\n Data 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n Data 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n Data 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n Type 140 Record: #81\n Data 00: 8c 11 51 00 4c 45 4e 4f 56 4f 0b 03 01 00 00 00\n Data 10: 00\n Type 140 Record: #82\n Data 00: 8c 13 52 00 4c 45 4e 4f 56 4f 0b 04 01 b2 00 4d\n Data 10: 53 20 00\n Type 134 Record: #83\n Data 00: 86 10 53 00 00 50 10 00 00 47 00 00 00 02 01 02\n String 1: \"TPM INFO\"\n String 2: \"System Reserved\"\n On Board Devices: #84\n Other: \"IBM Embedded Security Hardware Type 3\" (disabled)\n Type 129 Record: #85\n Data 00: 81 08 55 00 01 01 02 01\n String 1: \"Intel_ASF\"\n String 2: \"Intel_ASF_001\"\n Type 130 Record: #86\n Data 00: 82 14 56 00 24 41 4d 54 01 01 01 01 01 a5 8f 02\n Data 10: 00 00 01 00\n Type 131 Record: #87\n Data 00: 83 40 57 00 35 00 00 00 08 00 00 00 00 00 45 00\n Data 10: f8 00 47 1e ff ff ff ff 09 c0 00 00 01 00 08 00\n Data 20: f1 04 00 00 00 00 00 00 c8 00 02 15 00 00 00 00\n Data 30: 00 00 00 00 66 00 00 00 76 50 72 6f 00 00 00 00\n Language Info: #88\n Languages: en|US|iso8859-1, fr|FR|iso8859-1, zh|CN|unicode\n Current: en|US|iso8859-1\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n02: None 00.0: 10107 System\n [Created at sys.63]\n Unique ID: rdCR.n_7QNeEnh23\n Hardware Class: system\n Model: \"System\"\n Formfactor: \"desktop\"\n Driver Info #0:\n Driver Status: thermal,fan are active\n Driver Activation Cmd: \"modprobe thermal; modprobe fan\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n03: None 00.0: 10104 FPU\n [Created at misc.191]\n Unique ID: rdCR.EMpH5pjcahD\n Hardware Class: unknown\n Model: \"FPU\"\n I/O Ports: 0xf0-0xff (rw)\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n04: None 00.0: 0801 DMA controller (8237)\n [Created at misc.205]\n Unique ID: rdCR.f5u1ucRm+H9\n Hardware Class: unknown\n Model: \"DMA controller\"\n I/O Ports: 0x00-0xcf7 (rw)\n I/O Ports: 0xc0-0xdf (rw)\n I/O Ports: 0x80-0x8f (rw)\n DMA: 4\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n05: None 00.0: 0800 PIC (8259)\n [Created at misc.218]\n Unique ID: rdCR.8uRK7LxiIA2\n Hardware Class: unknown\n Model: \"PIC\"\n I/O Ports: 0x20-0x21 (rw)\n I/O Ports: 0xa0-0xa1 (rw)\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n06: None 00.0: 0900 Keyboard controller\n [Created at misc.250]\n Unique ID: rdCR.9N+EecqykME\n Hardware Class: unknown\n Model: \"Keyboard controller\"\n I/O Port: 0x60 (rw)\n I/O Port: 0x64 (rw)\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n07: None 00.0: 10400 PS/2 Controller\n [Created at misc.303]\n Unique ID: rdCR.DziBbWO85o5\n Hardware Class: unknown\n Model: \"PS/2 Controller\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n12: None 00.0: 10102 Main Memory\n [Created at memory.74]\n Unique ID: rdCR.CxwsZFjVASF\n Hardware Class: memory\n Model: \"Main Memory\"\n Memory Range: 0x00000000-0x1edce3fff (rw)\n Memory Size: 7 GB + 512 MB\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n13: PCI 19.0: 0200 Ethernet controller\n [Created at pci.378]\n Unique ID: wcdH.x32ml3_VWp0\n SysFS ID: /devices/pci0000:00/0000:00:19.0\n SysFS BusID: 0000:00:19.0\n Hardware Class: network\n Device Name: \"Onboard LAN\"\n Model: \"Intel 82579LM Gigabit Network Connection\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x1502 \"82579LM Gigabit Network Connection\"\n SubVendor: pci 0x17aa \"Lenovo\"\n SubDevice: pci 0x3083 \n Revision: 0x04\n Driver: \"e1000e\"\n Driver Modules: \"e1000e\"\n Device File: eno1\n Memory Range: 0xf7d00000-0xf7d1ffff (rw,non-prefetchable)\n Memory Range: 0xf7d39000-0xf7d39fff (rw,non-prefetchable)\n I/O Ports: 0xf080-0xf09f (rw)\n IRQ: 24 (192448 events)\n HW Address: 44:37:e6:c0:6f:b9\n Permanent HW Address: 44:37:e6:c0:6f:b9\n Link detected: yes\n Module Alias: \"pci:v00008086d00001502sv000017AAsd00003083bc02sc00i00\"\n Driver Info #0:\n Driver Status: e1000e is active\n Driver Activation Cmd: \"modprobe e1000e\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n14: PCI 1e.0: 0604 PCI bridge (Subtractive decode)\n [Created at pci.378]\n Unique ID: 6NW+.Nbk31H154T8\n SysFS ID: /devices/pci0000:00/0000:00:1e.0\n SysFS BusID: 0000:00:1e.0\n Hardware Class: bridge\n Model: \"Intel 82801 PCI Bridge\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x244e \"82801 PCI Bridge\"\n SubVendor: pci 0x17aa \"Lenovo\"\n SubDevice: pci 0x3083 \n Revision: 0xa4\n Module Alias: \"pci:v00008086d0000244Esv000017AAsd00003083bc06sc04i01\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n15: PCI 1f.3: 0c05 SMBus\n [Created at pci.378]\n Unique ID: nS1_.xhqlU6MYXw6\n SysFS ID: /devices/pci0000:00/0000:00:1f.3\n SysFS BusID: 0000:00:1f.3\n Hardware Class: unknown\n Model: \"Intel 7 Series/C216 Chipset Family SMBus Controller\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x1e22 \"7 Series/C216 Chipset Family SMBus Controller\"\n SubVendor: pci 0x17aa \"Lenovo\"\n SubDevice: pci 0x3083 \n Revision: 0x04\n Driver: \"i801_smbus\"\n Driver Modules: \"i2c_i801\"\n Memory Range: 0xf7d35000-0xf7d350ff (rw,non-prefetchable)\n I/O Ports: 0xf040-0xf05f (rw)\n IRQ: 18 (no events)\n Module Alias: \"pci:v00008086d00001E22sv000017AAsd00003083bc0Csc05i00\"\n Driver Info #0:\n Driver Status: i2c_i801 is active\n Driver Activation Cmd: \"modprobe i2c_i801\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n16: PCI 00.0: 0600 Host bridge\n [Created at pci.378]\n Unique ID: qLht._j+5SyxZ+LE\n SysFS ID: /devices/pci0000:00/0000:00:00.0\n SysFS BusID: 0000:00:00.0\n Hardware Class: bridge\n Model: \"Intel Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x0150 \"Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller\"\n SubVendor: pci 0x17aa \"Lenovo\"\n SubDevice: pci 0x3083 \n Revision: 0x09\n Driver: \"ivb_uncore\"\n Driver Modules: \"intel_uncore\"\n Module Alias: \"pci:v00008086d00000150sv000017AAsd00003083bc06sc00i00\"\n Driver Info #0:\n Driver Status: ie31200_edac is not active\n Driver Activation Cmd: \"modprobe ie31200_edac\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n17: PCI 1a.0: 0c03 USB Controller (EHCI)\n [Created at pci.378]\n Unique ID: pwJ7.4rwlXu7yRk1\n SysFS ID: /devices/pci0000:00/0000:00:1a.0\n SysFS BusID: 0000:00:1a.0\n Hardware Class: usb controller\n Model: \"Intel 7 Series/C216 Chipset Family USB Enhanced Host Controller #2\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x1e2d \"7 Series/C216 Chipset Family USB Enhanced Host Controller #2\"\n SubVendor: pci 0x17aa \"Lenovo\"\n SubDevice: pci 0x3083 \n Revision: 0x04\n Driver: \"ehci-pci\"\n Driver Modules: \"ehci_pci\"\n Memory Range: 0xf7d38000-0xf7d383ff (rw,non-prefetchable)\n IRQ: 16 (1379 events)\n Module Alias: \"pci:v00008086d00001E2Dsv000017AAsd00003083bc0Csc03i20\"\n Driver Info #0:\n Driver Status: ehci-hcd is active\n Driver Activation Cmd: \"modprobe ehci-hcd\"\n Driver Info #1:\n Driver Status: ehci_pci is active\n Driver Activation Cmd: \"modprobe ehci_pci\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n18: PCI 16.3: 0700 Serial controller (16550)\n [Created at pci.378]\n Unique ID: 6mDj.En3+bdjUW67\n SysFS ID: /devices/pci0000:00/0000:00:16.3\n SysFS BusID: 0000:00:16.3\n Hardware Class: unknown\n Model: \"Intel 7 Series/C210 Series Chipset Family KT Controller\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x1e3d \"7 Series/C210 Series Chipset Family KT Controller\"\n SubVendor: pci 0x17aa \"Lenovo\"\n SubDevice: pci 0x3083 \n Revision: 0x04\n Driver: \"serial\"\n I/O Ports: 0xf0e0-0xf0e7 (rw)\n Memory Range: 0xf7d3a000-0xf7d3afff (rw,non-prefetchable)\n IRQ: 19 (1 event)\n Module Alias: \"pci:v00008086d00001E3Dsv000017AAsd00003083bc07sc00i02\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n19: PCI 1d.0: 0c03 USB Controller (EHCI)\n [Created at pci.378]\n Unique ID: 1GTX.TxJWAvI0m2F\n SysFS ID: /devices/pci0000:00/0000:00:1d.0\n SysFS BusID: 0000:00:1d.0\n Hardware Class: usb controller\n Model: \"Intel 7 Series/C216 Chipset Family USB Enhanced Host Controller #1\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x1e26 \"7 Series/C216 Chipset Family USB Enhanced Host Controller #1\"\n SubVendor: pci 0x17aa \"Lenovo\"\n SubDevice: pci 0x3083 \n Revision: 0x04\n Driver: \"ehci-pci\"\n Driver Modules: \"ehci_pci\"\n Memory Range: 0xf7d37000-0xf7d373ff (rw,non-prefetchable)\n IRQ: 23 (35 events)\n Module Alias: \"pci:v00008086d00001E26sv000017AAsd00003083bc0Csc03i20\"\n Driver Info #0:\n Driver Status: ehci-hcd is active\n Driver Activation Cmd: \"modprobe ehci-hcd\"\n Driver Info #1:\n Driver Status: ehci_pci is active\n Driver Activation Cmd: \"modprobe ehci_pci\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n20: PCI 1c.4: 0604 PCI bridge (Normal decode)\n [Created at pci.378]\n Unique ID: QSNP.A_4B5mLKtz1\n SysFS ID: /devices/pci0000:00/0000:00:1c.4\n SysFS BusID: 0000:00:1c.4\n Hardware Class: bridge\n Model: \"Intel 7 Series/C210 Series Chipset Family PCI Express Root Port 5\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x1e18 \"7 Series/C210 Series Chipset Family PCI Express Root Port 5\"\n SubVendor: pci 0x17aa \"Lenovo\"\n SubDevice: pci 0x3083 \n Revision: 0xc4\n Driver: \"pcieport\"\n IRQ: 16 (1379 events)\n Module Alias: \"pci:v00008086d00001E18sv000017AAsd00003083bc06sc04i00\"\n Driver Info #0:\n Driver Status: shpchp is active\n Driver Activation Cmd: \"modprobe shpchp\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n21: PCI 02.0: 0300 VGA compatible controller (VGA)\n [Created at pci.378]\n Unique ID: _Znp.z5EssGVEkXA\n SysFS ID: /devices/pci0000:00/0000:00:02.0\n SysFS BusID: 0000:00:02.0\n Hardware Class: graphics card\n Device Name: \"Onboard IGD\"\n Model: \"Intel Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x0152 \"Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller\"\n SubVendor: pci 0x17aa \"Lenovo\"\n SubDevice: pci 0x3083 \n Revision: 0x09\n Driver: \"i915\"\n Driver Modules: \"i915\"\n Memory Range: 0xf7800000-0xf7bfffff (rw,non-prefetchable)\n Memory Range: 0xe0000000-0xefffffff (ro,non-prefetchable)\n I/O Ports: 0xf000-0xf03f (rw)\n Memory Range: 0x000c0000-0x000dffff (rw,non-prefetchable,disabled)\n IRQ: 25 (161 events)\n I/O Ports: 0x3c0-0x3df (rw)\n Module Alias: \"pci:v00008086d00000152sv000017AAsd00003083bc03sc00i00\"\n Driver Info #0:\n Driver Status: i915 is active\n Driver Activation Cmd: \"modprobe i915\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n22: PCI 14.0: 0c03 USB Controller (XHCI)\n [Created at pci.378]\n Unique ID: MZfG.OVVrbkDNSy1\n SysFS ID: /devices/pci0000:00/0000:00:14.0\n SysFS BusID: 0000:00:14.0\n Hardware Class: usb controller\n Model: \"Intel 7 Series/C210 Series Chipset Family USB xHCI Host Controller\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x1e31 \"7 Series/C210 Series Chipset Family USB xHCI Host Controller\"\n SubVendor: pci 0x17aa \"Lenovo\"\n SubDevice: pci 0x3083 \n Revision: 0x04\n Driver: \"xhci_hcd\"\n Driver Modules: \"xhci_pci\"\n Memory Range: 0xf7d20000-0xf7d2ffff (rw,non-prefetchable)\n IRQ: 26 (26 events)\n Module Alias: \"pci:v00008086d00001E31sv000017AAsd00003083bc0Csc03i30\"\n Driver Info #0:\n Driver Status: xhci_pci is active\n Driver Activation Cmd: \"modprobe xhci_pci\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n23: PCI 1f.2: 0106 SATA controller (AHCI 1.0)\n [Created at pci.378]\n Unique ID: w7Y8.oVK+TgIhG_0\n SysFS ID: /devices/pci0000:00/0000:00:1f.2\n SysFS BusID: 0000:00:1f.2\n Hardware Class: storage\n Model: \"Intel 7 Series/C210 Series Chipset Family 6-port SATA Controller [AHCI mode]\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x1e02 \"7 Series/C210 Series Chipset Family 6-port SATA Controller [AHCI mode]\"\n SubVendor: pci 0x17aa \"Lenovo\"\n SubDevice: pci 0x3083 \n Revision: 0x04\n Driver: \"ahci\"\n Driver Modules: \"ahci\"\n I/O Ports: 0xf0d0-0xf0d7 (rw)\n I/O Ports: 0xf0c0-0xf0c3 (rw)\n I/O Ports: 0xf0b0-0xf0b7 (rw)\n I/O Ports: 0xf0a0-0xf0a3 (rw)\n I/O Ports: 0xf060-0xf07f (rw)\n Memory Range: 0xf7d36000-0xf7d367ff (rw,non-prefetchable)\n IRQ: 27 (584 events)\n Module Alias: \"pci:v00008086d00001E02sv000017AAsd00003083bc01sc06i01\"\n Driver Info #0:\n Driver Status: ahci is active\n Driver Activation Cmd: \"modprobe ahci\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n24: PCI 1c.0: 0604 PCI bridge (Normal decode)\n [Created at pci.378]\n Unique ID: z8Q3.2gXBFG3TfK0\n SysFS ID: /devices/pci0000:00/0000:00:1c.0\n SysFS BusID: 0000:00:1c.0\n Hardware Class: bridge\n Model: \"Intel 7 Series/C216 Chipset Family PCI Express Root Port 1\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x1e10 \"7 Series/C216 Chipset Family PCI Express Root Port 1\"\n SubVendor: pci 0x17aa \"Lenovo\"\n SubDevice: pci 0x3083 \n Revision: 0xc4\n Driver: \"pcieport\"\n IRQ: 16 (1379 events)\n Module Alias: \"pci:v00008086d00001E10sv000017AAsd00003083bc06sc04i00\"\n Driver Info #0:\n Driver Status: shpchp is active\n Driver Activation Cmd: \"modprobe shpchp\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n25: PCI 1f.0: 0601 ISA bridge\n [Created at pci.378]\n Unique ID: BUZT.sGg88Oh8Z1E\n SysFS ID: /devices/pci0000:00/0000:00:1f.0\n SysFS BusID: 0000:00:1f.0\n Hardware Class: bridge\n Model: \"Intel Q77 Express Chipset LPC Controller\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x1e47 \"Q77 Express Chipset LPC Controller\"\n SubVendor: pci 0x17aa \"Lenovo\"\n SubDevice: pci 0x3083 \n Revision: 0x04\n Driver: \"lpc_ich\"\n Driver Modules: \"lpc_ich\"\n Module Alias: \"pci:v00008086d00001E47sv000017AAsd00003083bc06sc01i00\"\n Driver Info #0:\n Driver Status: lpc_ich is active\n Driver Activation Cmd: \"modprobe lpc_ich\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n26: PCI 200.0: 0282 WLAN controller\n [Created at pci.378]\n Unique ID: qru8.fNsjQBRm576\n Parent ID: QSNP.A_4B5mLKtz1\n SysFS ID: /devices/pci0000:00/0000:00:1c.4/0000:02:00.0\n SysFS BusID: 0000:02:00.0\n Hardware Class: network\n Model: \"Intel Centrino Advanced-N 6205 AGN\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x0085 \"Centrino Advanced-N 6205 [Taylor Peak]\"\n SubVendor: pci 0x8086 \"Intel Corporation\"\n SubDevice: pci 0x1311 \"Centrino Advanced-N 6205 AGN\"\n Revision: 0x34\n Driver: \"iwlwifi\"\n Driver Modules: \"iwlwifi\"\n Device File: wlp2s0\n Features: WLAN\n Memory Range: 0xf7c00000-0xf7c01fff (rw,non-prefetchable)\n IRQ: 30 (no events)\n HW Address: 6c:88:14:9d:59:30\n Permanent HW Address: 6c:88:14:9d:59:30\n Link detected: no\n WLAN channels: 1 2 3 4 5 6 7 8 9 10 11 12 13 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140\n WLAN frequencies: 2.412 2.417 2.422 2.427 2.432 2.437 2.442 2.447 2.452 2.457 2.462 2.467 2.472 5.18 5.2 5.22 5.24 5.26 5.28 5.3 5.32 5.5 5.52 5.54 5.56 5.58 5.6 5.62 5.64 5.66 5.68 5.7\n WLAN encryption modes: WEP40 WEP104 TKIP CCMP\n WLAN authentication modes: open sharedkey wpa-psk wpa-eap\n Module Alias: \"pci:v00008086d00000085sv00008086sd00001311bc02sc80i00\"\n Driver Info #0:\n Driver Status: iwlwifi is active\n Driver Activation Cmd: \"modprobe iwlwifi\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #20 (PCI bridge)\n\n27: PCI 16.0: 0780 Communication controller\n [Created at pci.378]\n Unique ID: WnlC.fBxU3Fj7CM3\n SysFS ID: /devices/pci0000:00/0000:00:16.0\n SysFS BusID: 0000:00:16.0\n Hardware Class: unknown\n Model: \"Intel 7 Series/C216 Chipset Family MEI Controller #1\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x1e3a \"7 Series/C216 Chipset Family MEI Controller #1\"\n SubVendor: pci 0x17aa \"Lenovo\"\n SubDevice: pci 0x3083 \n Revision: 0x04\n Driver: \"mei_me\"\n Driver Modules: \"mei_me\"\n Memory Range: 0xf7d3c000-0xf7d3c00f (rw,non-prefetchable)\n IRQ: 28 (23 events)\n Module Alias: \"pci:v00008086d00001E3Asv000017AAsd00003083bc07sc80i00\"\n Driver Info #0:\n Driver Status: mei_me is active\n Driver Activation Cmd: \"modprobe mei_me\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n28: PCI 1b.0: 0403 Audio device\n [Created at pci.378]\n Unique ID: u1Nb.lZdWuDy1YM6\n SysFS ID: /devices/pci0000:00/0000:00:1b.0\n SysFS BusID: 0000:00:1b.0\n Hardware Class: sound\n Model: \"Intel 7 Series/C216 Chipset Family High Definition Audio Controller\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x1e20 \"7 Series/C216 Chipset Family High Definition Audio Controller\"\n SubVendor: pci 0x17aa \"Lenovo\"\n SubDevice: pci 0x3083 \n Revision: 0x04\n Driver: \"snd_hda_intel\"\n Driver Modules: \"snd_hda_intel\"\n Memory Range: 0xf7d30000-0xf7d33fff (rw,non-prefetchable)\n IRQ: 29 (597 events)\n Module Alias: \"pci:v00008086d00001E20sv000017AAsd00003083bc04sc03i00\"\n Driver Info #0:\n Driver Status: snd_hda_intel is active\n Driver Activation Cmd: \"modprobe snd_hda_intel\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n29: None 00.0: 10000 Monitor\n [Created at monitor.125]\n Unique ID: rdCR.ASfeOvTrS4A\n Parent ID: _Znp.z5EssGVEkXA\n Hardware Class: monitor\n Model: \"HT225HPB\"\n Vendor: HSD \n Device: eisa 0x49f3 \"HT225HPB\"\n Serial ID: \"1234567890123\"\n Resolution: 720x400@70Hz\n Resolution: 640x480@60Hz\n Resolution: 640x480@67Hz\n Resolution: 640x480@72Hz\n Resolution: 640x480@75Hz\n Resolution: 800x600@56Hz\n Resolution: 800x600@60Hz\n Resolution: 800x600@72Hz\n Resolution: 800x600@75Hz\n Resolution: 832x624@75Hz\n Resolution: 1024x768@60Hz\n Resolution: 1024x768@70Hz\n Resolution: 1024x768@75Hz\n Resolution: 1280x1024@75Hz\n Resolution: 1600x900@60Hz\n Resolution: 1400x1050@60Hz\n Resolution: 1920x1080@60Hz\n Size: 477x268 mm\n Year of Manufacture: 2016\n Week of Manufacture: 0\n Detailed Timings #0:\n Resolution: 1920x1080\n Horizontal: 1920 2008 2052 2200 (+88 +132 +280) +hsync\n Vertical: 1080 1084 1089 1125 (+4 +9 +45) +vsync\n Frequencies: 148.50 MHz, 67.50 kHz, 60.00 Hz\n Driver Info #0:\n Max. Resolution: 1920x1080\n Vert. Sync Range: 56-75 Hz\n Hor. Sync Range: 30-82 kHz\n Bandwidth: 148 MHz\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #21 (VGA compatible controller)\n\n30: ISA(PnP) 00.0: 0000 Unclassified device\n [Created at isapnp.142]\n Unique ID: z9pp.B+yZ9Ve8gC1\n SysFS ID: /devices/pnp0/00:00\n SysFS BusID: 00:00\n Hardware Class: unknown\n Model: \"Unclassified device\"\n SubVendor: PNP \"PnP\"\n SubDevice: eisa 0x0c02 \n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n31: ISA(PnP) 00.0: 0000 Unclassified device\n [Created at isapnp.142]\n Unique ID: NhVi.B+yZ9Ve8gC1\n SysFS ID: /devices/pnp0/00:07\n SysFS BusID: 00:07\n Hardware Class: unknown\n Model: \"Unclassified device\"\n SubVendor: PNP \"PnP\"\n SubDevice: eisa 0x0c02 \n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n32: ISA(PnP) 00.0: 0000 Unclassified device\n [Created at isapnp.142]\n Unique ID: E349.BuKI+1soRmD\n SysFS ID: /devices/pnp0/00:05\n SysFS BusID: 00:05\n Hardware Class: unknown\n Model: \"Unclassified device\"\n SubVendor: PNP \"PnP\"\n SubDevice: eisa 0x0501 \n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n33: ISA(PnP) 00.0: 0000 Unclassified device\n [Created at isapnp.142]\n Unique ID: KiZ0.B+yZ9Ve8gC1\n SysFS ID: /devices/pnp0/00:03\n SysFS BusID: 00:03\n Hardware Class: unknown\n Model: \"Unclassified device\"\n SubVendor: PNP \"PnP\"\n SubDevice: eisa 0x0c02 \n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n34: ISA(PnP) 00.0: 0000 Unclassified device\n [Created at isapnp.142]\n Unique ID: QL3u.WYwRElrJa93\n SysFS ID: /devices/pnp0/00:01\n SysFS BusID: 00:01\n Hardware Class: unknown\n Model: \"Unclassified device\"\n SubVendor: PNP \"PnP\"\n SubDevice: eisa 0x0b00 \n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n35: ISA(PnP) 00.0: 0000 Unclassified device\n [Created at isapnp.142]\n Unique ID: qslm.gNN83gfynbD\n SysFS ID: /devices/pnp0/00:08\n SysFS BusID: 00:08\n Hardware Class: unknown\n Model: \"Unclassified device\"\n SubVendor: PNP \"PnP\"\n SubDevice: eisa 0x0c01 \n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n36: ISA(PnP) 00.0: 0000 Unclassified device\n [Created at isapnp.142]\n Unique ID: hEKD.Q0bqtQJbCs6\n SysFS ID: /devices/pnp0/00:06\n SysFS BusID: 00:06\n Hardware Class: unknown\n Model: \"Unclassified device\"\n SubVendor: PNP \"PnP\"\n SubDevice: eisa 0x0c31 \n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n37: ISA(PnP) 00.0: 0000 Unclassified device\n [Created at isapnp.142]\n Unique ID: ntp4.B+yZ9Ve8gC1\n SysFS ID: /devices/pnp0/00:04\n SysFS BusID: 00:04\n Hardware Class: unknown\n Model: \"Unclassified device\"\n SubVendor: PNP \"PnP\"\n SubDevice: eisa 0x0c02 \n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n38: ISA(PnP) 00.0: 0000 Unclassified device\n [Created at isapnp.142]\n Unique ID: tWJy.fzmL0Yx8Ld7\n SysFS ID: /devices/pnp0/00:02\n SysFS BusID: 00:02\n Hardware Class: unknown\n Model: \"Unclassified device\"\n SubVendor: INT \n SubDevice: eisa 0x3f0d \n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n39: None 00.0: 0700 Serial controller (16550)\n [Created at serial.74]\n Unique ID: S_Uw.3fyvFV+mbWD\n Hardware Class: unknown\n Model: \"16550A\"\n Device: \"16550A\"\n Device File: /dev/ttyS0\n I/O Ports: 0x3f8-0x3ff (rw)\n IRQ: 4 (1 event)\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n40: None 00.1: 0700 Serial controller (16550)\n [Created at serial.74]\n Unique ID: v9l_.3fyvFV+mbWD\n Hardware Class: unknown\n Model: \"16550A\"\n Device: \"16550A\"\n Device File: /dev/ttyS1\n I/O Ports: 0xf0e0-0xf0e7 (rw)\n IRQ: 19 (1 event)\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n41: SCSI 600.4: 10600 Disk\n [Created at block.256]\n Unique ID: i0+h.GmNr0nR27m5\n Parent ID: pwJ7.4rwlXu7yRk1\n SysFS ID: /class/block/sdf\n SysFS BusID: 6:0:0:4\n SysFS Device Link: /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.4/3-1.4:1.0/host6/target6:0:0/6:0:0:4\n Hardware Class: disk\n Model: \"Generic SD/MMC/M.S.PRO\"\n Vendor: \"Generic-\"\n Device: \"SD/MMC/M.S.PRO\"\n Revision: \"1.00\"\n Driver: \"ums-realtek\", \"sd\"\n Driver Modules: \"ums_realtek\", \"sd_mod\"\n Device File: /dev/sdf (/dev/sg6)\n Device Files: /dev/sdf, /dev/disk/by-id/usb-Generic-_SD_MMC_M.S.PRO_20100818841300000-0:4, /dev/disk/by-path/pci-0000:00:1a.0-usb-0:1.4:1.0-scsi-0:0:0:4\n Device Number: block 8:80-8:95 (char 21:6)\n Geometry (Logical): CHS 1024/0/62\n Drive status: no medium\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #17 (USB Controller)\n\n42: SCSI 600.2: 10600 Disk\n [Created at block.256]\n Unique ID: ofUZ.yOvLTtn7zjB\n Parent ID: pwJ7.4rwlXu7yRk1\n SysFS ID: /class/block/sdd\n SysFS BusID: 6:0:0:2\n SysFS Device Link: /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.4/3-1.4:1.0/host6/target6:0:0/6:0:0:2\n Hardware Class: disk\n Model: \"Generic SD/MMC\"\n Vendor: \"Generic-\"\n Device: \"SD/MMC\"\n Revision: \"1.00\"\n Driver: \"ums-realtek\", \"sd\"\n Driver Modules: \"ums_realtek\", \"sd_mod\"\n Device File: /dev/sdd (/dev/sg4)\n Device Files: /dev/sdd, /dev/disk/by-id/usb-Generic-_SD_MMC_20100818841300000-0:2, /dev/disk/by-path/pci-0000:00:1a.0-usb-0:1.4:1.0-scsi-0:0:0:2\n Device Number: block 8:48-8:63 (char 21:4)\n Geometry (Logical): CHS 1024/0/62\n Drive status: no medium\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #17 (USB Controller)\n\n43: SCSI 600.0: 10600 Disk\n [Created at block.256]\n Unique ID: uI_Q.6cuWApTE8mF\n Parent ID: pwJ7.4rwlXu7yRk1\n SysFS ID: /class/block/sdb\n SysFS BusID: 6:0:0:0\n SysFS Device Link: /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.4/3-1.4:1.0/host6/target6:0:0/6:0:0:0\n Hardware Class: disk\n Model: \"Generic Compact Flash\"\n Vendor: \"Generic-\"\n Device: \"Compact Flash\"\n Revision: \"1.00\"\n Driver: \"ums-realtek\", \"sd\"\n Driver Modules: \"ums_realtek\", \"sd_mod\"\n Device File: /dev/sdb (/dev/sg2)\n Device Files: /dev/sdb, /dev/disk/by-id/usb-Generic-_Compact_Flash_20100818841300000-0:0, /dev/disk/by-path/pci-0000:00:1a.0-usb-0:1.4:1.0-scsi-0:0:0:0\n Device Number: block 8:16-8:31 (char 21:2)\n Geometry (Logical): CHS 1024/0/62\n Drive status: no medium\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #17 (USB Controller)\n\n44: SCSI 100.0: 10602 CD-ROM (DVD)\n [Created at block.249]\n Unique ID: KD9E.bQX38a8uxh9\n Parent ID: w7Y8.oVK+TgIhG_0\n SysFS ID: /class/block/sr0\n SysFS BusID: 1:0:0:0\n SysFS Device Link: /devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0\n Hardware Class: cdrom\n Model: \"HL-DT-ST DVD-RAM GH82N\"\n Vendor: \"HL-DT-ST\"\n Device: \"DVD-RAM GH82N\"\n Revision: \"KU02\"\n Driver: \"ahci\", \"sr\"\n Driver Modules: \"ahci\", \"sr_mod\"\n Device File: /dev/sr0 (/dev/sg1)\n Device Files: /dev/sr0, /dev/cdrom, /dev/cdrw, /dev/disk/by-id/ata-HL-DT-STDVD-RAM_GH82N_K3DD1490941, /dev/disk/by-path/pci-0000:00:1f.2-ata-2, /dev/dvd, /dev/dvdrw\n Device Number: block 11:0 (char 21:1)\n Features: CD-R, CD-RW, DVD, DVD-R, DVD-RW, DVD-R DL, DVD+R, DVD+RW, DVD+R DL, DVD-RAM, MRW, MRW-W\n Drive status: no medium\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #23 (SATA controller)\n Drive Speed: 40\n\n45: SCSI 600.3: 10600 Disk\n [Created at block.256]\n Unique ID: Frkd.IXU2dl7JP2D\n Parent ID: pwJ7.4rwlXu7yRk1\n SysFS ID: /class/block/sde\n SysFS BusID: 6:0:0:3\n SysFS Device Link: /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.4/3-1.4:1.0/host6/target6:0:0/6:0:0:3\n Hardware Class: disk\n Model: \"Generic M.S./M.S.Pro/HG\"\n Vendor: \"Generic-\"\n Device: \"M.S./M.S.Pro/HG\"\n Revision: \"1.00\"\n Serial ID: \"3\"\n Driver: \"ums-realtek\", \"sd\"\n Driver Modules: \"ums_realtek\", \"sd_mod\"\n Device File: /dev/sde (/dev/sg5)\n Device Files: /dev/sde, /dev/disk/by-id/usb-Generic-_M.S._M.S.Pro_HG_20100818841300000-0:3, /dev/disk/by-path/pci-0000:00:1a.0-usb-0:1.4:1.0-scsi-0:0:0:3\n Device Number: block 8:64-8:79 (char 21:5)\n Geometry (Logical): CHS 1024/0/62\n Drive status: no medium\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #17 (USB Controller)\n\n46: SCSI 600.1: 10600 Disk\n [Created at block.256]\n Unique ID: LUEV.zwYJWDenTG8\n Parent ID: pwJ7.4rwlXu7yRk1\n SysFS ID: /class/block/sdc\n SysFS BusID: 6:0:0:1\n SysFS Device Link: /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.4/3-1.4:1.0/host6/target6:0:0/6:0:0:1\n Hardware Class: disk\n Model: \"Generic SM/xD-Picture\"\n Vendor: \"Generic-\"\n Device: \"SM/xD-Picture\"\n Revision: \"1.00\"\n Driver: \"ums-realtek\", \"sd\"\n Driver Modules: \"ums_realtek\", \"sd_mod\"\n Device File: /dev/sdc (/dev/sg3)\n Device Files: /dev/sdc, /dev/disk/by-id/usb-Generic-_SM_xD-Picture_20100818841300000-0:1, /dev/disk/by-path/pci-0000:00:1a.0-usb-0:1.4:1.0-scsi-0:0:0:1\n Device Number: block 8:32-8:47 (char 21:3)\n Geometry (Logical): CHS 1024/0/62\n Drive status: no medium\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #17 (USB Controller)\n\n47: IDE 00.0: 10600 Disk\n [Created at block.245]\n Unique ID: 3OOL.cUctO0cKeAC\n Parent ID: w7Y8.oVK+TgIhG_0\n SysFS ID: /class/block/sda\n SysFS BusID: 0:0:0:0\n SysFS Device Link: /devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0\n Hardware Class: disk\n Model: \"WDC WD5000AAKX-0\"\n Vendor: \"WDC\"\n Device: \"WD5000AAKX-0\"\n Revision: \"1H19\"\n Serial ID: \"WD-WCC2EFM32092\"\n Driver: \"ahci\", \"sd\"\n Driver Modules: \"ahci\", \"sd_mod\"\n Device File: /dev/sda\n Device Files: /dev/sda, /dev/disk/by-id/ata-WDC_WD5000AAKX-08ERMA0_WD-WCC2EFM32092, /dev/disk/by-id/wwn-0x50014ee2b3355d90, /dev/disk/by-path/pci-0000:00:1f.2-ata-1\n Device Number: block 8:0-8:15\n BIOS id: 0x80\n Geometry (Logical): CHS 60801/255/63\n Size: 976773168 sectors a 512 bytes\n Capacity: 465 GB (500107862016 bytes)\n Geometry (BIOS EDD): CHS 969021/16/63\n Size (BIOS EDD): 976773168 sectors\n Geometry (BIOS Legacy): CHS 1023/255/63\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #23 (SATA controller)\n\n48: USB 00.1: 10503 USB Mouse\n [Created at usb.122]\n Unique ID: xnLL.TApSazCIno0\n Parent ID: k4bc.2DFUsyrieMD\n SysFS ID: /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.1\n SysFS BusID: 1-4:1.1\n Hardware Class: mouse\n Model: \"Uni Class KVM\"\n Hotplug: USB\n Vendor: usb 0x10d5 \"Uni Class Technology Co., Ltd\"\n Device: usb 0x5a08 \"KVM\"\n Compatible to: int 0x0210 0x0025\n Driver: \"usbhid\"\n Driver Modules: \"usbhid\"\n Device File: /dev/input/mice (/dev/input/mouse0)\n Device Files: /dev/input/mice, /dev/input/mouse0, /dev/input/event4, /dev/input/by-id/usb-No_brand_KVM-if01-event-mouse, /dev/input/by-path/pci-0000:00:14.0-usb-0:4:1.1-event-mouse, /dev/input/by-id/usb-No_brand_KVM-if01-mouse, /dev/input/by-path/pci-0000:00:14.0-usb-0:4:1.1-mouse\n Device Number: char 13:63 (char 13:32)\n Speed: 1.5 Mbps\n Module Alias: \"usb:v10D5p5A08d0000dc00dsc00dp00ic03isc01ip02in01\"\n Driver Info #0:\n Buttons: 5\n Wheels: 2\n XFree86 Protocol: explorerps/2\n GPM Protocol: exps2\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #52 (Hub)\n\n49: USB 00.0: 10600 Disk\n [Created at usb.122]\n Unique ID: Q0Le.RI9g7ZPTcH3\n Parent ID: KRJj.4Nx_qoDfSd7\n SysFS ID: /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.4/3-1.4:1.0\n SysFS BusID: 3-1.4:1.0\n Hardware Class: disk\n Model: \"Realtek RTS5182 Card Reader\"\n Hotplug: USB\n Vendor: usb 0x0bda \"Realtek Semiconductor Corp.\"\n Device: usb 0x0184 \"RTS5182 Card Reader\"\n Revision: \"84.13\"\n Serial ID: \"20100818841300000\"\n Driver: \"ums-realtek\"\n Driver Modules: \"ums_realtek\"\n Speed: 480 Mbps\n Module Alias: \"usb:v0BDAp0184d8413dc00dsc00dp00ic08isc06ip50in00\"\n Driver Info #0:\n Driver Status: ums_realtek is active\n Driver Activation Cmd: \"modprobe ums_realtek\"\n Driver Info #1:\n Driver Status: uas is active\n Driver Activation Cmd: \"modprobe uas\"\n Driver Info #2:\n Driver Status: usb_storage is active\n Driver Activation Cmd: \"modprobe usb_storage\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #51 (Hub)\n\n50: USB 00.0: 10a00 Hub\n [Created at usb.122]\n Unique ID: uIhY.FHd55n4xKo7\n Parent ID: pwJ7.4rwlXu7yRk1\n SysFS ID: /devices/pci0000:00/0000:00:1a.0/usb3/3-0:1.0\n SysFS BusID: 3-0:1.0\n Hardware Class: hub\n Model: \"Linux Foundation 2.0 root hub\"\n Hotplug: USB\n Vendor: usb 0x1d6b \"Linux Foundation\"\n Device: usb 0x0002 \"2.0 root hub\"\n Revision: \"4.09\"\n Serial ID: \"0000:00:1a.0\"\n Driver: \"hub\"\n Driver Modules: \"usbcore\"\n Speed: 480 Mbps\n Module Alias: \"usb:v1D6Bp0002d0409dc09dsc00dp00ic09isc00ip00in00\"\n Driver Info #0:\n Driver Status: usbcore is active\n Driver Activation Cmd: \"modprobe usbcore\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #17 (USB Controller)\n\n51: USB 00.0: 10a00 Hub\n [Created at usb.122]\n Unique ID: KRJj.4Nx_qoDfSd7\n Parent ID: uIhY.FHd55n4xKo7\n SysFS ID: /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1:1.0\n SysFS BusID: 3-1:1.0\n Hardware Class: hub\n Model: \"Intel Integrated Rate Matching Hub\"\n Hotplug: USB\n Vendor: usb 0x8087 \"Intel Corp.\"\n Device: usb 0x0024 \"Integrated Rate Matching Hub\"\n Driver: \"hub\"\n Driver Modules: \"usbcore\"\n Speed: 480 Mbps\n Module Alias: \"usb:v8087p0024d0000dc09dsc00dp01ic09isc00ip00in00\"\n Driver Info #0:\n Driver Status: usbcore is active\n Driver Activation Cmd: \"modprobe usbcore\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #50 (Hub)\n\n52: USB 00.0: 10a00 Hub\n [Created at usb.122]\n Unique ID: k4bc.2DFUsyrieMD\n Parent ID: MZfG.OVVrbkDNSy1\n SysFS ID: /devices/pci0000:00/0000:00:14.0/usb1/1-0:1.0\n SysFS BusID: 1-0:1.0\n Hardware Class: hub\n Model: \"Linux Foundation 2.0 root hub\"\n Hotplug: USB\n Vendor: usb 0x1d6b \"Linux Foundation\"\n Device: usb 0x0002 \"2.0 root hub\"\n Revision: \"4.09\"\n Serial ID: \"0000:00:14.0\"\n Driver: \"hub\"\n Driver Modules: \"usbcore\"\n Speed: 480 Mbps\n Module Alias: \"usb:v1D6Bp0002d0409dc09dsc00dp01ic09isc00ip00in00\"\n Driver Info #0:\n Driver Status: usbcore is active\n Driver Activation Cmd: \"modprobe usbcore\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #22 (USB Controller)\n\n53: USB 00.0: 10800 Keyboard\n [Created at usb.122]\n Unique ID: Uc5H.kRJp2lmBxi1\n Parent ID: k4bc.2DFUsyrieMD\n SysFS ID: /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0\n SysFS BusID: 1-4:1.0\n Hardware Class: keyboard\n Model: \"Uni Class KVM\"\n Hotplug: USB\n Vendor: usb 0x10d5 \"Uni Class Technology Co., Ltd\"\n Device: usb 0x5a08 \"KVM\"\n Driver: \"usbhid\"\n Driver Modules: \"usbhid\"\n Device File: /dev/input/event3\n Device Files: /dev/input/event3, /dev/input/by-id/usb-No_brand_KVM-event-kbd, /dev/input/by-path/pci-0000:00:14.0-usb-0:4:1.0-event-kbd\n Device Number: char 13:67\n Speed: 1.5 Mbps\n Module Alias: \"usb:v10D5p5A08d0000dc00dsc00dp00ic03isc01ip01in00\"\n Driver Info #0:\n XkbRules: xfree86\n XkbModel: pc104\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #52 (Hub)\n\n54: USB 00.0: 10a00 Hub\n [Created at usb.122]\n Unique ID: zPk0.oLWCeziExdF\n Parent ID: 1GTX.TxJWAvI0m2F\n SysFS ID: /devices/pci0000:00/0000:00:1d.0/usb4/4-0:1.0\n SysFS BusID: 4-0:1.0\n Hardware Class: hub\n Model: \"Linux Foundation 2.0 root hub\"\n Hotplug: USB\n Vendor: usb 0x1d6b \"Linux Foundation\"\n Device: usb 0x0002 \"2.0 root hub\"\n Revision: \"4.09\"\n Serial ID: \"0000:00:1d.0\"\n Driver: \"hub\"\n Driver Modules: \"usbcore\"\n Speed: 480 Mbps\n Module Alias: \"usb:v1D6Bp0002d0409dc09dsc00dp00ic09isc00ip00in00\"\n Driver Info #0:\n Driver Status: usbcore is active\n Driver Activation Cmd: \"modprobe usbcore\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #19 (USB Controller)\n\n55: USB 00.0: 10a00 Hub\n [Created at usb.122]\n Unique ID: PYMB.4Nx_qoDfSd7\n Parent ID: zPk0.oLWCeziExdF\n SysFS ID: /devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1:1.0\n SysFS BusID: 4-1:1.0\n Hardware Class: hub\n Model: \"Intel Integrated Rate Matching Hub\"\n Hotplug: USB\n Vendor: usb 0x8087 \"Intel Corp.\"\n Device: usb 0x0024 \"Integrated Rate Matching Hub\"\n Driver: \"hub\"\n Driver Modules: \"usbcore\"\n Speed: 480 Mbps\n Module Alias: \"usb:v8087p0024d0000dc09dsc00dp01ic09isc00ip00in00\"\n Driver Info #0:\n Driver Status: usbcore is active\n Driver Activation Cmd: \"modprobe usbcore\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #54 (Hub)\n\n56: USB 00.0: 10a00 Hub\n [Created at usb.122]\n Unique ID: pBe4.xYNhIwdOaa6\n Parent ID: MZfG.OVVrbkDNSy1\n SysFS ID: /devices/pci0000:00/0000:00:14.0/usb2/2-0:1.0\n SysFS BusID: 2-0:1.0\n Hardware Class: hub\n Model: \"Linux Foundation 3.0 root hub\"\n Hotplug: USB\n Vendor: usb 0x1d6b \"Linux Foundation\"\n Device: usb 0x0003 \"3.0 root hub\"\n Revision: \"4.09\"\n Serial ID: \"0000:00:14.0\"\n Driver: \"hub\"\n Driver Modules: \"usbcore\"\n Module Alias: \"usb:v1D6Bp0003d0409dc09dsc00dp03ic09isc00ip00in00\"\n Driver Info #0:\n Driver Status: usbcore is active\n Driver Activation Cmd: \"modprobe usbcore\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #22 (USB Controller)\n\n57: None 00.0: 10103 CPU\n [Created at cpu.460]\n Unique ID: rdCR.j8NaKXDZtZ6\n Hardware Class: cpu\n Arch: Intel\n Vendor: \"GenuineIntel\"\n Model: 6.58.9 \"Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz\"\n Features: fpu,vme,de,pse,tsc,msr,pae,mce,cx8,apic,sep,mtrr,pge,mca,cmov,pat,pse36,clflush,dts,acpi,mmx,fxsr,sse,sse2,ss,ht,tm,pbe,nx,rdtscp,lm,constant_tsc,arch_perfmon,pebs,bts,xtopology,nonstop_tsc,aperfmperf,pni,pclmulqdq,dtes64,monitor,ds_cpl,vmx,smx,est,tm2,ssse3,cx16,xtpr,pdcm,sse4_1,sse4_2,x2apic,popcnt,tsc_deadline_timer,aes,xsave,avx,f16c,rdrand,lahf_lm,epb,ssbd,ibrs,ibpb,stibp,tpr_shadow,vnmi,flexpriority,ept,vpid,fsgsbase,smep,erms,xsaveopt,dtherm,ida,arat,pln,pts,md_clear,flush_l1d\n Clock: 1600 MHz\n BogoMips: 6385.77\n Cache: 6144 kb\n Units/Processor: 16\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n58: None 01.0: 10103 CPU\n [Created at cpu.460]\n Unique ID: wkFv.j8NaKXDZtZ6\n Hardware Class: cpu\n Arch: Intel\n Vendor: \"GenuineIntel\"\n Model: 6.58.9 \"Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz\"\n Features: fpu,vme,de,pse,tsc,msr,pae,mce,cx8,apic,sep,mtrr,pge,mca,cmov,pat,pse36,clflush,dts,acpi,mmx,fxsr,sse,sse2,ss,ht,tm,pbe,nx,rdtscp,lm,constant_tsc,arch_perfmon,pebs,bts,xtopology,nonstop_tsc,aperfmperf,pni,pclmulqdq,dtes64,monitor,ds_cpl,vmx,smx,est,tm2,ssse3,cx16,xtpr,pdcm,sse4_1,sse4_2,x2apic,popcnt,tsc_deadline_timer,aes,xsave,avx,f16c,rdrand,lahf_lm,epb,ssbd,ibrs,ibpb,stibp,tpr_shadow,vnmi,flexpriority,ept,vpid,fsgsbase,smep,erms,xsaveopt,dtherm,ida,arat,pln,pts,md_clear,flush_l1d\n Clock: 1600 MHz\n BogoMips: 6385.77\n Cache: 6144 kb\n Units/Processor: 16\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n59: None 02.0: 10103 CPU\n [Created at cpu.460]\n Unique ID: +rIN.j8NaKXDZtZ6\n Hardware Class: cpu\n Arch: Intel\n Vendor: \"GenuineIntel\"\n Model: 6.58.9 \"Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz\"\n Features: fpu,vme,de,pse,tsc,msr,pae,mce,cx8,apic,sep,mtrr,pge,mca,cmov,pat,pse36,clflush,dts,acpi,mmx,fxsr,sse,sse2,ss,ht,tm,pbe,nx,rdtscp,lm,constant_tsc,arch_perfmon,pebs,bts,xtopology,nonstop_tsc,aperfmperf,pni,pclmulqdq,dtes64,monitor,ds_cpl,vmx,smx,est,tm2,ssse3,cx16,xtpr,pdcm,sse4_1,sse4_2,x2apic,popcnt,tsc_deadline_timer,aes,xsave,avx,f16c,rdrand,lahf_lm,epb,ssbd,ibrs,ibpb,stibp,tpr_shadow,vnmi,flexpriority,ept,vpid,fsgsbase,smep,erms,xsaveopt,dtherm,ida,arat,pln,pts,md_clear,flush_l1d\n Clock: 1600 MHz\n BogoMips: 6385.77\n Cache: 6144 kb\n Units/Processor: 16\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n60: None 03.0: 10103 CPU\n [Created at cpu.460]\n Unique ID: 4zLr.j8NaKXDZtZ6\n Hardware Class: cpu\n Arch: Intel\n Vendor: \"GenuineIntel\"\n Model: 6.58.9 \"Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz\"\n Features: fpu,vme,de,pse,tsc,msr,pae,mce,cx8,apic,sep,mtrr,pge,mca,cmov,pat,pse36,clflush,dts,acpi,mmx,fxsr,sse,sse2,ss,ht,tm,pbe,nx,rdtscp,lm,constant_tsc,arch_perfmon,pebs,bts,xtopology,nonstop_tsc,aperfmperf,pni,pclmulqdq,dtes64,monitor,ds_cpl,vmx,smx,est,tm2,ssse3,cx16,xtpr,pdcm,sse4_1,sse4_2,x2apic,popcnt,tsc_deadline_timer,aes,xsave,avx,f16c,rdrand,lahf_lm,epb,ssbd,ibrs,ibpb,stibp,tpr_shadow,vnmi,flexpriority,ept,vpid,fsgsbase,smep,erms,xsaveopt,dtherm,ida,arat,pln,pts,md_clear,flush_l1d\n Clock: 1600 MHz\n BogoMips: 6385.77\n Cache: 6144 kb\n Units/Processor: 16\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n61: None 01.0: 10701 Ethernet\n [Created at net.126]\n Unique ID: zHNY.ndpeucax6V1\n Parent ID: wcdH.x32ml3_VWp0\n SysFS ID: /class/net/eno1\n SysFS Device Link: /devices/pci0000:00/0000:00:19.0\n Hardware Class: network interface\n Model: \"Ethernet network interface\"\n Driver: \"e1000e\"\n Driver Modules: \"e1000e\"\n Device File: eno1\n HW Address: 44:37:e6:c0:6f:b9\n Permanent HW Address: 44:37:e6:c0:6f:b9\n Link detected: yes\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #13 (Ethernet controller)\n\n62: None 00.0: 10701 Ethernet\n [Created at net.126]\n Unique ID: VV91.ndpeucax6V1\n Parent ID: qru8.fNsjQBRm576\n SysFS ID: /class/net/wlp2s0\n SysFS Device Link: /devices/pci0000:00/0000:00:1c.4/0000:02:00.0\n Hardware Class: network interface\n Model: \"Ethernet network interface\"\n Driver: \"iwlwifi\"\n Driver Modules: \"iwlwifi\"\n Device File: wlp2s0\n HW Address: 6c:88:14:9d:59:30\n Permanent HW Address: 6c:88:14:9d:59:30\n Link detected: no\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #26 (WLAN controller)\n\n63: None 00.0: 10700 Loopback\n [Created at net.126]\n Unique ID: ZsBS.GQNx7L4uPNA\n SysFS ID: /class/net/lo\n Hardware Class: network interface\n Model: \"Loopback network interface\"\n Device File: lo\n Link detected: yes\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n"}, "endTime": "2021-11-09T20:43:56.996475+00:00", "version": "12.1.1b0", "type": "Snapshot", "components": [{"manufacturer": "Intel Corporation", "type": "SoundCard", "model": "7 Series/C216 Chipset Family High Definition Audio Controller", "serialNumber": null, "actions": []}, {"type": "GraphicCard", "memory": null, "serialNumber": null, "manufacturer": "Intel Corporation", "model": "Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller", "actions": []}, {"type": "RamModule", "model": "8JTF51264AZ-1G6E1", "serialNumber": "0CEB87C4", "manufacturer": "Micron", "speed": 1600.0, "interface": "DDR3", "size": 4096.0, "actions": [], "format": "DIMM"}, {"type": "RamModule", "model": "RMR5030MJ68F9F1600", "serialNumber": "4274686A", "manufacturer": "Fujitsu", "speed": 1600.0, "interface": "DDR3", "size": 4096.0, "actions": [], "format": "DIMM"}, {"manufacturer": "Intel Corp.", "model": "Intel Core i5-3470 CPU @ 3.20GHz", "serialNumber": null, "type": "Processor", "address": 64, "brand": "Core i5", "actions": [{"type": "BenchmarkProcessor", "elapsed": 0, "rate": 25543.08}, {"type": "BenchmarkProcessorSysbench", "elapsed": 8, "rate": 7.6926}], "generation": 3, "cores": 4, "threads": 4, "speed": 1.696679}, {"type": "NetworkAdapter", "wireless": false, "serialNumber": "44:37:e6:c0:6f:b9", "variant": "04", "manufacturer": "Intel Corporation", "model": "82579LM Gigabit Network Connection", "actions": [], "speed": 1000.0}, {"type": "NetworkAdapter", "wireless": true, "serialNumber": "6c:88:14:9d:59:30", "variant": "34", "manufacturer": "Intel Corporation", "model": "Centrino Advanced-N 6205 Taylor Peak", "actions": [], "speed": null}, {"type": "HardDrive", "model": "WDC WD5000AAKX-0", "serialNumber": "WD-WCC2EFM32092", "variant": "1H19", "manufacturer": "Western Digital", "interface": "ATA", "size": 500107.86201599997, "actions": [{"assessment": true, "severity": "Info", "offlineUncorrectable": 0, "status": "Completed without error", "type": "TestDataStorage", "reallocatedSectorCount": 0, "lifetime": 18636, "powerCycleCount": 849, "currentPendingSectorCount": 0, "length": "Short", "elapsed": 120}, {"type": "BenchmarkDataStorage", "readSpeed": 124.0, "elapsed": 12, "writeSpeed": 28.8}, {"type": "EraseBasic", "severity": "Info", "steps": [{"type": "StepRandom", "severity": "Info", "startTime": "2021-11-09T20:51:42.395743+00:00", "endTime": "2021-11-09T22:18:20.704296+00:00"}], "startTime": "2021-11-09T20:51:42.395542+00:00", "endTime": "2021-11-09T22:18:20.704471+00:00"}]}, {"usb": 3, "firewire": 0, "type": "Motherboard", "model": "MAHOBAY", "serial": 1, "slots": 4, "manufacturer": "LENOVO", "serialNumber": null, "version": "9SKT69AUS", "ramMaxSize": 32, "biosDate": "2013-05-17T00:00:00", "ramSlots": 4, "pcmcia": 0, "actions": []}], "device": {"type": "Desktop", "sku": "LENOVO_MT_2988", "serialNumber": "S4WBPH6", "version": "ThinkCentre M92p", "manufacturer": "LENOVO", "model": "2988D6G", "actions": [{"type": "StressTest", "severity": "Info", "elapsed": 300}, {"type": "BenchmarkRamSysbench", "elapsed": 1, "rate": 0.6886}], "chassis": "Tower"}, "software": "Workbench", "uuid": "699adea2-a069-43f3-a095-101c1bf44861", "elapsed": 5664, "closed": true} From ad9a8a04bdb6d07c4ec2e30d3068ead23b191f71 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 26 Apr 2022 12:55:01 +0200 Subject: [PATCH 086/154] Revert "drop commits 04063db 022d40e c8aefc6" This reverts commit 9dbebed9d5da32c3558269b8ea35a7f604f7422e. --- ereuse_devicehub/labels/forms.py | 4 ++-- ereuse_devicehub/static/js/main_inventory.js | 8 ++++++-- ereuse_devicehub/templates/inventory/device_list.html | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ereuse_devicehub/labels/forms.py b/ereuse_devicehub/labels/forms.py index cd4b5bec..0c118c4c 100644 --- a/ereuse_devicehub/labels/forms.py +++ b/ereuse_devicehub/labels/forms.py @@ -1,6 +1,6 @@ from flask import g from flask_wtf import FlaskForm -from wtforms import IntegerField, StringField, validators +from wtforms import HiddenField, IntegerField, StringField, validators from ereuse_devicehub.db import db from ereuse_devicehub.resources.device.models import Device @@ -48,7 +48,7 @@ class TagUnnamedForm(FlaskForm): class PrintLabelsForm(FlaskForm): - devices = StringField(render_kw={'class': "devicesList d-none"}) + devices = HiddenField(render_kw={'class': "devicesList"}) def validate(self, extra_validators=None): is_valid = super().validate(extra_validators) diff --git a/ereuse_devicehub/static/js/main_inventory.js b/ereuse_devicehub/static/js/main_inventory.js index bf2fdf43..03073192 100644 --- a/ereuse_devicehub/static/js/main_inventory.js +++ b/ereuse_devicehub/static/js/main_inventory.js @@ -1,4 +1,5 @@ $(document).ready(function() { + $(".deviceSelect").on("change", deviceSelect); var show_allocate_form = $("#allocateModal").data('show-action-form'); var show_datawipe_form = $("#datawipeModal").data('show-action-form'); var show_trade_form = $("#tradeLotModal").data('show-action-form'); @@ -11,8 +12,6 @@ $(document).ready(function() { } else if (show_trade_form != "None") { $("#tradeLotModal .btn-primary").show(); newTrade(show_trade_form); - } else { - $(".deviceSelect").on("change", deviceSelect); } // $('#selectLot').selectpicker(); }) @@ -181,6 +180,11 @@ function export_file(type_file) { } } +function print_labels() { + deviceSelect(); + $('#print_labels').submit(); +} + /** * Reactive lots button diff --git a/ereuse_devicehub/templates/inventory/device_list.html b/ereuse_devicehub/templates/inventory/device_list.html index 10305ac4..312ebede 100644 --- a/ereuse_devicehub/templates/inventory/device_list.html +++ b/ereuse_devicehub/templates/inventory/device_list.html @@ -237,7 +237,7 @@ {% for f in form_print_labels %} {{ f }} {% endfor %} - + Print labels From 2a7eeb0b5db1245252b442c1bd5fb9411952595e Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 26 Apr 2022 12:55:48 +0200 Subject: [PATCH 087/154] Revert "add print_labels instead of call submit from the template" This reverts commit c8aefc602999394a65a9634d70a48d6517089d49. --- ereuse_devicehub/templates/inventory/device_list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ereuse_devicehub/templates/inventory/device_list.html b/ereuse_devicehub/templates/inventory/device_list.html index 312ebede..10305ac4 100644 --- a/ereuse_devicehub/templates/inventory/device_list.html +++ b/ereuse_devicehub/templates/inventory/device_list.html @@ -237,7 +237,7 @@ {% for f in form_print_labels %} {{ f }} {% endfor %} - + Print labels From c3bb5cb863eb6de04e7aa045f2c326fe853e6bd5 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 26 Apr 2022 12:56:02 +0200 Subject: [PATCH 088/154] Revert "add print_labels instead of call submit from the template" This reverts commit 022d40edbe37be49644db44ba9bbbf32ce4930ae. --- ereuse_devicehub/static/js/main_inventory.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ereuse_devicehub/static/js/main_inventory.js b/ereuse_devicehub/static/js/main_inventory.js index 03073192..bf2fdf43 100644 --- a/ereuse_devicehub/static/js/main_inventory.js +++ b/ereuse_devicehub/static/js/main_inventory.js @@ -1,5 +1,4 @@ $(document).ready(function() { - $(".deviceSelect").on("change", deviceSelect); var show_allocate_form = $("#allocateModal").data('show-action-form'); var show_datawipe_form = $("#datawipeModal").data('show-action-form'); var show_trade_form = $("#tradeLotModal").data('show-action-form'); @@ -12,6 +11,8 @@ $(document).ready(function() { } else if (show_trade_form != "None") { $("#tradeLotModal .btn-primary").show(); newTrade(show_trade_form); + } else { + $(".deviceSelect").on("change", deviceSelect); } // $('#selectLot').selectpicker(); }) @@ -180,11 +181,6 @@ function export_file(type_file) { } } -function print_labels() { - deviceSelect(); - $('#print_labels').submit(); -} - /** * Reactive lots button From ef65b1084ea6431faa86349d3d926d59ae338fbe Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 26 Apr 2022 12:56:34 +0200 Subject: [PATCH 089/154] Revert "HiddenField instead of StringField" This reverts commit 04063db60ea04cdda44b2b43f4495660f35946b6. --- ereuse_devicehub/labels/forms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ereuse_devicehub/labels/forms.py b/ereuse_devicehub/labels/forms.py index 0c118c4c..cd4b5bec 100644 --- a/ereuse_devicehub/labels/forms.py +++ b/ereuse_devicehub/labels/forms.py @@ -1,6 +1,6 @@ from flask import g from flask_wtf import FlaskForm -from wtforms import HiddenField, IntegerField, StringField, validators +from wtforms import IntegerField, StringField, validators from ereuse_devicehub.db import db from ereuse_devicehub.resources.device.models import Device @@ -48,7 +48,7 @@ class TagUnnamedForm(FlaskForm): class PrintLabelsForm(FlaskForm): - devices = HiddenField(render_kw={'class': "devicesList"}) + devices = StringField(render_kw={'class': "devicesList d-none"}) def validate(self, extra_validators=None): is_valid = super().validate(extra_validators) From 13950a5ff69a70f22bdd3b46e5cdcbd81584a94d Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 26 Apr 2022 16:35:16 +0200 Subject: [PATCH 090/154] show only password reset --- .../ereuse_devicehub/user_profile.html | 117 +----------------- 1 file changed, 1 insertion(+), 116 deletions(-) diff --git a/ereuse_devicehub/templates/ereuse_devicehub/user_profile.html b/ereuse_devicehub/templates/ereuse_devicehub/user_profile.html index f6560eb5..599895c0 100644 --- a/ereuse_devicehub/templates/ereuse_devicehub/user_profile.html +++ b/ereuse_devicehub/templates/ereuse_devicehub/user_profile.html @@ -32,124 +32,9 @@
-
-
-
Profile Details
- -
-
Account user
-
{{ current_user.email or ''}}
-
- - {% for u in current_user.individuals %} - -
-
Full Name
-
{{ u.get_full_name or ''}}
-
- -
-
Country
-
{{ u.country or ''}}
-
- -
-
Phone
-
{{ u.telephone or ''}}
-
- -
-
Email
-
{{ u.email or ''}}
-
- -
-
Created
-
{{ u.created.strftime('%H:%M %d-%m-%Y') or ''}}
-
- -
-
Last login
-
- {% for s in sessions %} - {{ s }}
- {% endfor %} -
-
- - {% if u.active_org %} -
-
Company name
-
{{ u.active_org.name or ''}}
-
- -
-
Company country
-
{{ u.active_org.country or '' }}
-
- -
-
Company Phone
-
{{ u.active_org.telephone or '' }}
-
- -
-
Company Email
-
{{ u.active_org.email or '' }}
-
- - {% endif %} - {% endfor %} - -
- -
- - -
- {% for f in profile_form %} - {% if f == profile_form.csrf_token %} - {{ f }} - {% else %} -
- -
- {{ f }} - {% if f.errors %} -

- {% for error in f.errors %} - {{ error }}
- {% endfor %} -

- {% endif %} -
-
- {% endif %} - {% endfor %} -
- -
-
- -
- -
+
{% for f in password_form %} From b11bb163a04be7f6d277e3903907f9ba1d4b3346 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 26 Apr 2022 17:35:29 +0200 Subject: [PATCH 091/154] hide 2 trade buttons --- ereuse_devicehub/templates/inventory/device_list.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ereuse_devicehub/templates/inventory/device_list.html b/ereuse_devicehub/templates/inventory/device_list.html index 3a6874a9..9cc69a17 100644 --- a/ereuse_devicehub/templates/inventory/device_list.html +++ b/ereuse_devicehub/templates/inventory/device_list.html @@ -38,12 +38,14 @@
{% if lot.is_temporary %} + {% if 1 == 2 %} Add supplier Add receiver + {% endif %} Delete Lot From bf42a79ef7584f3d5bcab2dd522825fc0dc839d6 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 27 Apr 2022 18:55:27 +0200 Subject: [PATCH 092/154] change devices for tags in printlabels --- ereuse_devicehub/labels/forms.py | 7 ++----- ereuse_devicehub/labels/views.py | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/ereuse_devicehub/labels/forms.py b/ereuse_devicehub/labels/forms.py index cd4b5bec..98427215 100644 --- a/ereuse_devicehub/labels/forms.py +++ b/ereuse_devicehub/labels/forms.py @@ -64,10 +64,7 @@ class PrintLabelsForm(FlaskForm): .all() ) - # print only tags that are DHID - dhids = [x.devicehub_id for x in self._devices] - self._tags = ( - Tag.query.filter(Tag.owner_id == g.user.id).filter(Tag.id.in_(dhids)).all() - ) + if not self._devices: + return False return is_valid diff --git a/ereuse_devicehub/labels/views.py b/ereuse_devicehub/labels/views.py index 445a4eb8..3f4fbf5d 100644 --- a/ereuse_devicehub/labels/views.py +++ b/ereuse_devicehub/labels/views.py @@ -102,7 +102,7 @@ class PrintLabelsView(View): form = PrintLabelsForm() if form.validate_on_submit(): context['form'] = form - context['tags'] = form._tags + context['devices'] = form._devices return flask.render_template(self.template_name, **context) else: messages.error('Error you need select one or more devices') From e378fef1a6499c1b247415927594067a5146e6cd Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 27 Apr 2022 18:56:15 +0200 Subject: [PATCH 093/154] add customize options in print html and pdf --- ereuse_devicehub/static/js/print.pdf.js | 110 ++++++++++++++++-- .../templates/labels/print_labels.html | 86 ++++++++++---- 2 files changed, 165 insertions(+), 31 deletions(-) diff --git a/ereuse_devicehub/static/js/print.pdf.js b/ereuse_devicehub/static/js/print.pdf.js index 0d6fe6d5..f0b1817c 100644 --- a/ereuse_devicehub/static/js/print.pdf.js +++ b/ereuse_devicehub/static/js/print.pdf.js @@ -1,8 +1,10 @@ $(document).ready(function() { STORAGE_KEY = 'tag-spec-key'; $("#printerType").on("change", change_size); + $(".form-check-input").on("change", change_check); change_size(); - load_size(); + load_settings(); + change_check(); }) function qr_draw(url, id) { @@ -16,27 +18,43 @@ function qr_draw(url, id) { }); } -function save_size() { +function save_settings() { var height = $("#height-tag").val(); var width = $("#width-tag").val(); var sizePreset = $("#printerType").val(); var data = {"height": height, "width": width, "sizePreset": sizePreset}; + data['dhid'] = $("#dhidCheck").prop('checked'); + data['qr'] = $("#qrCheck").prop('checked'); + data['serial_number'] = $("#serialNumberCheck").prop('checked'); + data['manufacturer'] = $("#manufacturerCheck").prop('checked'); + data['model'] = $("#modelCheck").prop('checked'); localStorage.setItem(STORAGE_KEY, JSON.stringify(data)); } -function load_size() { +function load_settings() { var data = JSON.parse(localStorage.getItem(STORAGE_KEY)); if (data){ $("#height-tag").val(data.height); $("#width-tag").val(data.width); $("#printerType").val(data.sizePreset); + $("#qrCheck").prop('checked', data.qr); + $("#dhidCheck").prop('checked', data.dhid); + $("#serialNumberCheck").prop('checked', data.serial_number); + $("#manufacturerCheck").prop('checked', data.manufacturer); + $("#modelCheck").prop('checked', data.model); }; } -function reset_size() { +function reset_settings() { localStorage.removeItem(STORAGE_KEY); $("#printerType").val('brotherSmall'); + $("#qrCheck").prop('checked', true); + $("#dhidCheck").prop('checked', true); + $("#serialNumberCheck").prop('checked', false); + $("#manufacturerCheck").prop('checked', false); + $("#modelCheck").prop('checked', false); change_size(); + change_check(); } function change_size() { @@ -50,29 +68,101 @@ function change_size() { } } +function change_check() { + if ($("#dhidCheck").prop('checked')) { + $(".dhid").show(); + } else { + $(".dhid").hide(); + } + if ($("#serialNumberCheck").prop('checked')) { + $(".serial_number").show(); + } else { + $(".serial_number").hide(); + } + if ($("#manufacturerCheck").prop('checked')) { + $(".manufacturer").show(); + } else { + $(".manufacturer").hide(); + } + if ($("#modelCheck").prop('checked')) { + $(".model").show(); + } else { + $(".model").hide(); + } + if ($("#qrCheck").prop('checked')) { + $(".qr").show(); + } else { + $(".qr").hide(); + } +} + function printpdf() { var border = 2; + var line = 5; var height = parseInt($("#height-tag").val()); var width = parseInt($("#width-tag").val()); - img_side = Math.min(height, width) - 2*border; + var img_side = Math.min(height, width) - 2*border; max_tag_side = (Math.max(height, width)/2) + border; if (max_tag_side < img_side) { - max_tag_side = img_side+ 2*border; + max_tag_side = img_side + 2*border; }; min_tag_side = (Math.min(height, width)/2) + border; var last_tag_code = ''; + if ($("#serialNumberCheck").prop('checked')) { + height += line; + }; + if ($("#manufacturerCheck").prop('checked')) { + height += line; + }; + if ($("#modelCheck").prop('checked')) { + height += line; + }; + var pdf = new jsPDF('l', 'mm', [width, height]); $(".tag").map(function(x, y) { if (x != 0){ pdf.addPage(); - console.log(x) }; + var space = line + border; + if ($("#qrCheck").prop('checked')) { + space += img_side; + } var tag = $(y).text(); last_tag_code = tag; - var imgData = $('#'+tag+' img').attr("src"); - pdf.addImage(imgData, 'PNG', border, border, img_side, img_side); - pdf.text(tag, max_tag_side, min_tag_side); + if ($("#qrCheck").prop('checked')) { + var imgData = $('#'+tag+' img').attr("src"); + pdf.addImage(imgData, 'PNG', border, border, img_side, img_side); + }; + + if ($("#dhidCheck").prop('checked')) { + if ($("#qrCheck").prop('checked')) { + pdf.setFontSize(15); + pdf.text(tag, max_tag_side, min_tag_side); + } else { + pdf.setFontSize(15); + pdf.text(tag, border, space); + space += line; + } + }; + if ($("#serialNumberCheck").prop('checked')) { + var sn = $(y).data('serial-number'); + pdf.setFontSize(12); + pdf.text(sn, border, space); + space += line; + }; + if ($("#manufacturerCheck").prop('checked')) { + var sn = $(y).data('manufacturer'); + pdf.setFontSize(12); + pdf.text(sn, border, space); + space += line; + }; + if ($("#modelCheck").prop('checked')) { + var sn = $(y).data('model'); + pdf.setFontSize(8); + pdf.text(sn, border, space); + space += line; + }; }); pdf.save('Tag_'+last_tag_code+'.pdf'); diff --git a/ereuse_devicehub/templates/labels/print_labels.html b/ereuse_devicehub/templates/labels/print_labels.html index 306b32f9..55d35111 100644 --- a/ereuse_devicehub/templates/labels/print_labels.html +++ b/ereuse_devicehub/templates/labels/print_labels.html @@ -24,16 +24,39 @@
- {% for tag in tags %} -
-
+ {% for dev in devices %} +
+
-
-
+
+
-
+
- {{ tag.id }} + {{ dev.devicehub_id }} +
+
+
+ + + @@ -71,20 +94,41 @@ mm
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
-
-
- Print -
-
- Save -
-
- Reset -
-
-
@@ -96,8 +140,8 @@ {% endblock main %} From ad11521b640c4687bca9c06ea4b5352eb049cfb9 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 28 Apr 2022 10:14:10 +0200 Subject: [PATCH 094/154] fix label details for new architecture --- .../templates/labels/label_detail.html | 88 +++++++++++++++---- 1 file changed, 72 insertions(+), 16 deletions(-) diff --git a/ereuse_devicehub/templates/labels/label_detail.html b/ereuse_devicehub/templates/labels/label_detail.html index 75ff3efb..24c8a535 100644 --- a/ereuse_devicehub/templates/labels/label_detail.html +++ b/ereuse_devicehub/templates/labels/label_detail.html @@ -43,16 +43,49 @@
Print Label
-
+
-
+
-
-
{{ tag.id }}
+
+
+ {% if tag.device %} + {{ tag.id }} + {% else %} + {{ tag.id }} + {% endif %} +
+ {% if tag.device %} + + + + {% endif %}
@@ -84,20 +117,43 @@ mm
+ {% if tag.device %} +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ {% endif %} +
-
-
- Print -
-
- Save -
-
- Reset -
-
-
From c2e431352144865693e60302cfbf43f739f77938 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 28 Apr 2022 11:16:12 +0200 Subject: [PATCH 095/154] change tag for Unique identifier in label_details --- ereuse_devicehub/templates/labels/label_detail.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ereuse_devicehub/templates/labels/label_detail.html b/ereuse_devicehub/templates/labels/label_detail.html index 24c8a535..c378c6f3 100644 --- a/ereuse_devicehub/templates/labels/label_detail.html +++ b/ereuse_devicehub/templates/labels/label_detail.html @@ -5,8 +5,8 @@

Inventory

@@ -26,7 +26,7 @@
Type
-
{% if tag.provider %}UnNamed Tag{% else %}Named{% endif %}
+
{% if tag.provider %}UnNamed Unique Identifier{% else %}Named{% endif %}
@@ -125,7 +125,7 @@
- +
From c8dc1b11e225103848b3a786c17843259e0178b8 Mon Sep 17 00:00:00 2001 From: RubenPX Date: Thu, 28 Apr 2022 11:22:53 +0200 Subject: [PATCH 096/154] Add trade type on api options --- ereuse_devicehub/resources/lot/views.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/ereuse_devicehub/resources/lot/views.py b/ereuse_devicehub/resources/lot/views.py index dce6af62..b99e622f 100644 --- a/ereuse_devicehub/resources/lot/views.py +++ b/ereuse_devicehub/resources/lot/views.py @@ -29,6 +29,7 @@ class LotView(View): """ format = EnumField(LotFormat, missing=None) search = f.Str(missing=None) + type = f.Str(missing=None) def post(self): l = request.get_json() @@ -88,6 +89,7 @@ class LotView(View): else: query = Lot.query query = self.visibility_filter(query) + query = self.type_filter(query, args) if args['search']: query = query.filter(Lot.name.ilike(args['search'] + '%')) lots = query.paginate(per_page=6 if args['search'] else query.count()) @@ -104,6 +106,21 @@ class LotView(View): Lot.owner_id == g.user.id)) return query + def type_filter(self, query, args): + lot_type = args.get('type') + + # temporary + if lot_type == "temporary": + return query.filter(Lot.trade == None) + + if lot_type == "incoming": + return query.filter(Lot.trade and Trade.user_to == g.user) + + if lot_type == "outgoing": + return query.filter(Lot.trade and Trade.user_from == g.user) + + return query + def query(self, args): query = Lot.query.distinct() return query From a945fc085f05f8ed1c1c9fe135dbf70612bf6747 Mon Sep 17 00:00:00 2001 From: RubenPX Date: Thu, 28 Apr 2022 11:31:24 +0200 Subject: [PATCH 097/154] Query using Api instead of javascript filter --- ereuse_devicehub/static/js/api.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ereuse_devicehub/static/js/api.js b/ereuse_devicehub/static/js/api.js index 8163e293..552544d2 100644 --- a/ereuse_devicehub/static/js/api.js +++ b/ereuse_devicehub/static/js/api.js @@ -4,11 +4,8 @@ const Api = { * @returns get lots */ async get_lots() { - const request = await this.doRequest(API_URLS.lots, "GET", null); - if (request != undefined) { - request.items = request.items.filter(itm => !itm.trade) // Avoid show outgoing or incomming trades - return request.items; - } + const request = await this.doRequest(`${API_URLS.lots}?type=temporary`, "GET", null); + if (request != undefined) return request.items; throw request; }, From 8125279619b890b05bd9fb6c3eba7cc6eb322c77 Mon Sep 17 00:00:00 2001 From: Santiago Lamora Date: Thu, 28 Apr 2022 11:38:31 +0200 Subject: [PATCH 098/154] Add comment to not rendered code --- ereuse_devicehub/templates/inventory/device_list.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ereuse_devicehub/templates/inventory/device_list.html b/ereuse_devicehub/templates/inventory/device_list.html index 9cc69a17..f0bbfb8b 100644 --- a/ereuse_devicehub/templates/inventory/device_list.html +++ b/ereuse_devicehub/templates/inventory/device_list.html @@ -38,14 +38,16 @@
{% if lot.is_temporary %} - {% if 1 == 2 %} + + {% if 1 == 2 %}{# #} Add supplier Add receiver - {% endif %} + {% endif %}{# #} + Delete Lot From 6946a2584b6812651f8a5f175777f8a710e18eed Mon Sep 17 00:00:00 2001 From: Santiago Lamora Date: Thu, 28 Apr 2022 11:39:40 +0200 Subject: [PATCH 099/154] Refactor: group related code (delete button & modal status) --- ereuse_devicehub/templates/inventory/device_list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ereuse_devicehub/templates/inventory/device_list.html b/ereuse_devicehub/templates/inventory/device_list.html index f0bbfb8b..827c3b68 100644 --- a/ereuse_devicehub/templates/inventory/device_list.html +++ b/ereuse_devicehub/templates/inventory/device_list.html @@ -37,7 +37,6 @@
{% if lot.is_temporary %} - {% if 1 == 2 %}{# #} @@ -51,6 +50,7 @@ Delete Lot + {% endif %}
From 87c66cf5cd1f281f435fa135602a0e6bce20f2aa Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 28 Apr 2022 11:47:52 +0200 Subject: [PATCH 100/154] change tags for unique identifiers --- .../templates/ereuse_devicehub/base_site.html | 11 +------ .../templates/inventory/addDevicestag.html | 6 ++-- .../templates/inventory/device_list.html | 29 +++++++++++++++---- .../inventory/tag_unlink_device.html | 8 ++--- .../templates/labels/label_detail.html | 6 ++-- .../templates/labels/label_list.html | 6 ++-- .../templates/labels/print_labels.html | 2 +- .../templates/labels/tag_create.html | 8 ++--- .../templates/labels/tag_create_unnamed.html | 8 ++--- 9 files changed, 46 insertions(+), 38 deletions(-) diff --git a/ereuse_devicehub/templates/ereuse_devicehub/base_site.html b/ereuse_devicehub/templates/ereuse_devicehub/base_site.html index 4e721730..f10172e5 100644 --- a/ereuse_devicehub/templates/ereuse_devicehub/base_site.html +++ b/ereuse_devicehub/templates/ereuse_devicehub/base_site.html @@ -191,15 +191,6 @@ - - - - @@ -238,4 +229,4 @@
-{% endblock body %} \ No newline at end of file +{% endblock body %} diff --git a/ereuse_devicehub/templates/inventory/addDevicestag.html b/ereuse_devicehub/templates/inventory/addDevicestag.html index 51938211..bb02c221 100644 --- a/ereuse_devicehub/templates/inventory/addDevicestag.html +++ b/ereuse_devicehub/templates/inventory/addDevicestag.html @@ -3,14 +3,14 @@ + +