Esempio n. 1
0
 def __init__(self, url, fuchsia_root):
     self.url = url
     if not self.url.endswith("/"):
         self.url += "/"
     self.package_manager_targets_url = self.url + "targets.json"
     self.package_manager_blobs_url = self.url + "blobs/"
     self.builtin_path = fuchsia_root + \
       "scripts/component_graph/server/static/builtins.json"
     self.logger = get_logger(__name__)
Esempio n. 2
0
    def __init__(self, package_manager):
        """ Verifies the package manager is online. """
        self.logger = get_logger(__name__)
        self.package_manager = package_manager
        self.graph_generator = ComponentGraphGenerator()

        if not self.package_manager.ping():
            self.logger.error(
                "Failed to connect to package manager please run fx serve.")
            sys.exit(1)
Esempio n. 3
0
 def __init__(self, fuchsia_root):
   self.logger = get_logger(__name__)
   self.static_root = os.path.join(fuchsia_root, "scripts/component_graph/server/static/")
   self.static_lib_path = os.path.join(fuchsia_root, "scripts/third_party/d3/d3.js")
   self.static_files = [
       {
           "type": "text/javascript",
           "path": "js/main.js"
       },
       {
           "type": "text/css",
           "path": "css/main.css"
       },
       {
           "type": "image/png",
           "path": "img/logo.png"
       },
       {
           "type": "image/svg+xml",
           "path": "img/logo.svg"
       },
   ]
Esempio n. 4
0
 def __init__(self, package_manager):
     """ Initializes the query handler with the package manager object """
     self.logger = get_logger(__name__)
     self.query_handler = QueryHandler(package_manager)
 def __init__(self):
     """ Sets up the logging system for the generator. """
     self.logger = get_logger(__name__)