How to use the inql.actions.executor.ExecutorAction function in inql

To help you get started, we’ve selected a few inql examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github doyensec / graph-ql / inql / widgets / tab.py View on Github external
def _setup(self):
        """
        Setup callback
        :return: None
        """
        PropertyEditor.get_instance(
            text="Configure InQL",
            columns=['Property', 'Value'],
            data=self._run_config,
            actions=[
                ExecutorAction("Setup Load Headers",
                               lambda _: self._setup_headers()),
                ExecutorAction("Reset",
                               lambda _: self._reset())
            ]
github doyensec / graph-ql / inql / widgets / tab.py View on Github external
def _setup(self):
        """
        Setup callback
        :return: None
        """
        PropertyEditor.get_instance(
            text="Configure InQL",
            columns=['Property', 'Value'],
            data=self._run_config,
            actions=[
                ExecutorAction("Setup Load Headers",
                               lambda _: self._setup_headers()),
                ExecutorAction("Reset",
                               lambda _: self._reset())
            ]
github doyensec / graph-ql / inql / widgets / propertyeditor.py View on Github external
self._pane = JScrollPane(self._table)
        self.this.add(self._pane)
        self._empty = empty

        self.this.addWindowListener(self)

        self._dtm.addTableModelListener(lambda _: self._update_model())
        self.this.setLocation(PropertyEditor.NEW_WINDOW_OFFSET, PropertyEditor.NEW_WINDOW_OFFSET)

        if add_actions:
            self._popup = JPopupMenu()
            self._pane.setComponentPopupMenu(self._popup)
            inherits_popup_menu(self._pane)

            self._actions = actions
            self._actions.append(ExecutorAction('Remove Selected Rows', action=lambda e: self._remove_row()))
            self._actions.append(ExecutorAction('Add New Row', action=lambda e: self._add_row()))

            for action in self._actions:
                self._popup.add(action.menuitem)

        self.this.setForeground(Color.black)
        self.this.setBackground(Color.lightGray)
        self.this.pack()
        self.this.setVisible(True)
        self.this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE)

        return self
github doyensec / graph-ql / inql / widgets / propertyeditor.py View on Github external
self.this.add(self._pane)
        self._empty = empty

        self.this.addWindowListener(self)

        self._dtm.addTableModelListener(lambda _: self._update_model())
        self.this.setLocation(PropertyEditor.NEW_WINDOW_OFFSET, PropertyEditor.NEW_WINDOW_OFFSET)

        if add_actions:
            self._popup = JPopupMenu()
            self._pane.setComponentPopupMenu(self._popup)
            inherits_popup_menu(self._pane)

            self._actions = actions
            self._actions.append(ExecutorAction('Remove Selected Rows', action=lambda e: self._remove_row()))
            self._actions.append(ExecutorAction('Add New Row', action=lambda e: self._add_row()))

            for action in self._actions:
                self._popup.add(action.menuitem)

        self.this.setForeground(Color.black)
        self.this.setBackground(Color.lightGray)
        self.this.pack()
        self.this.setVisible(True)
        self.this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE)

        return self
github doyensec / graph-ql / inql / widgets / tab.py View on Github external
['Proxy', proxy],
            ['Authorization Key', None],
            ['Load Placeholders', True],
            ['Generate HTML DOC', True],
            ['Generate Schema DOC', False],
            ['Generate Stub Queries', True],
            ['Accept Invalid SSL Certificate', True]
        ]
        self._init_config = json.loads(json.dumps(self._run_config))
        self._default_config = {}
        for k, v in self._run_config:
            self._default_config[k] = v
        self._old_config_hash = None
        self._actions.append(BrowserAction())
        self._actions.append(ExecutorAction("Configure", lambda _: self._setup()))
        self._actions.append(ExecutorAction("Load", self._loadurl))
        self._actions = [a for a in reversed(self._actions)]
        self._http_mutator = http_mutator

        self.this = JPanel()
        self.this.setLayout(BorderLayout())
        self._omnibar = Omnibar(
            hint=DEFAULT_LOAD_URL,
            label="Load",
            action=self._loadurl)
        self.this.add(BorderLayout.PAGE_START, self._omnibar.this)
        self._fileview = FileView(
            dir=os.getcwd(),
            filetree_label="Queries, Mutations and Subscriptions",
            texteditor_factory=texteditor_factory)
        self.this.add(BorderLayout.CENTER, self._fileview.this)
        self._fileview.addTreeListener(self._tree_listener)
github doyensec / graph-ql / inql / widgets / tab.py View on Github external
self._run_config = [
            ['Proxy', proxy],
            ['Authorization Key', None],
            ['Load Placeholders', True],
            ['Generate HTML DOC', True],
            ['Generate Schema DOC', False],
            ['Generate Stub Queries', True],
            ['Accept Invalid SSL Certificate', True]
        ]
        self._init_config = json.loads(json.dumps(self._run_config))
        self._default_config = {}
        for k, v in self._run_config:
            self._default_config[k] = v
        self._old_config_hash = None
        self._actions.append(BrowserAction())
        self._actions.append(ExecutorAction("Configure", lambda _: self._setup()))
        self._actions.append(ExecutorAction("Load", self._loadurl))
        self._actions = [a for a in reversed(self._actions)]
        self._http_mutator = http_mutator

        self.this = JPanel()
        self.this.setLayout(BorderLayout())
        self._omnibar = Omnibar(
            hint=DEFAULT_LOAD_URL,
            label="Load",
            action=self._loadurl)
        self.this.add(BorderLayout.PAGE_START, self._omnibar.this)
        self._fileview = FileView(
            dir=os.getcwd(),
            filetree_label="Queries, Mutations and Subscriptions",
            texteditor_factory=texteditor_factory)
        self.this.add(BorderLayout.CENTER, self._fileview.this)