How to use the api/apiHelper.setInTotalStorage function in api

To help you get started, we’ve selected a few api 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 cloudera / hue / desktop / core / src / desktop / js / apps / notebook / editorViewModel.js View on Github external
self.isRightPanelVisible.subscribe(val => {
      if (!self.assistWithoutStorage()) {
        apiHelper.setInTotalStorage('assist', 'right_assist_panel_visible', val);
      }
    });
github cloudera / hue / desktop / core / src / desktop / js / sidePanelViewModel.js View on Github external
self.leftAssistVisible.subscribe(val => {
      if (!self.assistWithoutStorage()) {
        apiHelper.setInTotalStorage('assist', 'left_assist_panel_visible', val);
      }
      hueAnalytics.convert('hue', 'leftAssistVisible/' + val);
      window.setTimeout(() => {
        huePubSub.publish('split.panel.resized');
        $(window).trigger('resize');
      }, 0);
    });
github cloudera / hue / desktop / core / src / desktop / js / ko / components / ko.contextSelector.js View on Github external
const found = self[TYPES_INDEX.compute.available]().some(compute => {
          if (namespace.id === compute.namespace) {
            self[TYPES_INDEX.compute.name](compute);
            apiHelper.setInTotalStorage(
              'contextSelector',
              TYPES_INDEX.compute.totalStorageId,
              namespace
            );
            return true;
          }
        });
github cloudera / hue / desktop / core / src / desktop / js / ko / bindings / ace / ko.aceEditor.js View on Github external
setEnableLiveAutocompletion: function(enabled) {
        editor.setOption('enableLiveAutocompletion', enabled);
        apiHelper.setInTotalStorage('hue.ace', 'enableLiveAutocompletion', enabled);
        if (enabled && $('#setEnableAutocompleter:checked').length === 0) {
          $('#setEnableAutocompleter').trigger('click');
        }
      },
      getEnableLiveAutocompletion: function() {
github cloudera / hue / desktop / core / src / desktop / js / ko / bindings / ace / ko.aceEditor.js View on Github external
editor.customMenuOptions.setClearIgnoredSyntaxChecks = function() {
        apiHelper.setInTotalStorage('hue.syntax.checker', 'suppressedRules', {});
        $('#setClearIgnoredSyntaxChecks')
          .hide()
          .before('<div style="margin-top:5px;float:right;">done</div>');
      };
      editor.customMenuOptions.getClearIgnoredSyntaxChecks = function() {
github cloudera / hue / desktop / core / src / desktop / js / ko / components / ko.contextSelector.js View on Github external
self[type.onSelect] = function(selectedVal, previousVal) {
      if (params[type.onSelect]) {
        params[type.onSelect](selectedVal, previousVal);
      }
      apiHelper.setInTotalStorage('contextSelector', type.totalStorageId, selectedVal);

      if (selectedVal && type === TYPES_INDEX.compute) {
        self.setMatchingNamespace(selectedVal);
      } else if (selectedVal && type === TYPES_INDEX.namespace) {
        self.setMatchingCompute(selectedVal);
      }
    };
    if (self[type.name]) {
github cloudera / hue / desktop / core / src / desktop / js / ko / bindings / ace / ko.aceEditor.js View on Github external
exec: function() {
        darkThemeEnabled = !darkThemeEnabled;
        apiHelper.setInTotalStorage('ace', 'dark.theme.enabled', darkThemeEnabled);
        editor.setTheme(darkThemeEnabled ? 'ace/theme/hue_dark' : 'ace/theme/hue');
      }
    });
github cloudera / hue / desktop / core / src / desktop / js / apps / notebook2 / editorViewModel.js View on Github external
this.isRightPanelVisible.subscribe(val => {
      if (!this.assistWithoutStorage()) {
        apiHelper.setInTotalStorage('assist', 'right_assist_panel_visible', val);
      }
    });
github cloudera / hue / desktop / core / src / desktop / js / apps / notebook2 / snippet.js View on Github external
this.showOptimizer.subscribe(newValue => {
      if (newValue !== null) {
        apiHelper.setInTotalStorage('editor', 'show.optimizer', newValue);
      }
    });
github cloudera / hue / desktop / core / src / desktop / js / ko / components / assist / ko.assistAdlsPanel.js View on Github external
huePubSub.subscribe('assist.adls.go.home', () => {
      loadPath(window.USER_HOME_DIR);
      apiHelper.setInTotalStorage('assist', 'currentAdlsPath', window.USER_HOME_DIR);
    });