How to use the inql.widgets.propertyeditor.PropertyEditor.get_instance 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_headers(self):
        """
        Setup Headers callback
        :return: None
        """
        PropertyEditor.get_instance(
            text='Load Headers',
            columns=['Header', 'Value'],
            data=self._load_headers,
            empty=["X-New-Header", "X-New-Header-Value"])
github doyensec / graph-ql / inql / actions / setcustomheader.py View on Github external
def actionPerformed(self, e):
        """
        Overrides ActionListener behaviour, when clicked it opens the headers property editor for the given host.

        :param e: unused
        :return:
        """
        if self._host:
            try:
                self._overrideheaders[self._host]
            except KeyError:
                print("No custom header for %s, generating an empty set" % self._host)
                self._overrideheaders[self._host] = []
            PropertyEditor.get_instance("Set Custom Header for %s" % self._host,
                           columns=["Header", "Value"],
                           data=self._overrideheaders[self._host],
                           empty=["X-New-Header", "X-New-Header-Value"])
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
d = str(self._dtm.getValueAt(i, j)).lower()
                if d == 'none' or d == '':
                    self._data[i][j] = None
                elif d == 'true' or d == 't':
                    self._data[i][j] = True
                elif d == 'false' or d == 'f':
                    self._data[i][j] = False
                else:
                    try:
                        self._data[i][j] = int(self._dtm.getValueAt(i, j))
                    except ValueError:
                        self._data[i][j] = self._dtm.getValueAt(i, j)

if __name__ == "__main__":
    data = [['a', 'b'], ['c', 'd']]
    pe = PropertyEditor.get_instance(columns=['ciao', 'bao'], data=data, empty=['e1', 'e2'])
    while True:
        time.sleep(10)
        pe = PropertyEditor.get_instance(columns=['ciao', 'bao'], data=data, empty=['e1', 'e2'])
        PropertyEditor.get_instance(text='test2', columns=['ciao', 'bao'], data=data, empty=['e1', 'e2'])
        print(pe._data)
github doyensec / graph-ql / inql / widgets / propertyeditor.py View on Github external
self._data[i][j] = True
                elif d == 'false' or d == 'f':
                    self._data[i][j] = False
                else:
                    try:
                        self._data[i][j] = int(self._dtm.getValueAt(i, j))
                    except ValueError:
                        self._data[i][j] = self._dtm.getValueAt(i, j)

if __name__ == "__main__":
    data = [['a', 'b'], ['c', 'd']]
    pe = PropertyEditor.get_instance(columns=['ciao', 'bao'], data=data, empty=['e1', 'e2'])
    while True:
        time.sleep(10)
        pe = PropertyEditor.get_instance(columns=['ciao', 'bao'], data=data, empty=['e1', 'e2'])
        PropertyEditor.get_instance(text='test2', columns=['ciao', 'bao'], data=data, empty=['e1', 'e2'])
        print(pe._data)
github doyensec / graph-ql / inql / widgets / propertyeditor.py View on Github external
elif d == 'true' or d == 't':
                    self._data[i][j] = True
                elif d == 'false' or d == 'f':
                    self._data[i][j] = False
                else:
                    try:
                        self._data[i][j] = int(self._dtm.getValueAt(i, j))
                    except ValueError:
                        self._data[i][j] = self._dtm.getValueAt(i, j)

if __name__ == "__main__":
    data = [['a', 'b'], ['c', 'd']]
    pe = PropertyEditor.get_instance(columns=['ciao', 'bao'], data=data, empty=['e1', 'e2'])
    while True:
        time.sleep(10)
        pe = PropertyEditor.get_instance(columns=['ciao', 'bao'], data=data, empty=['e1', 'e2'])
        PropertyEditor.get_instance(text='test2', columns=['ciao', 'bao'], data=data, empty=['e1', 'e2'])
        print(pe._data)