How to use the format.setting.pattern function in format

To help you get started, we’ve selected a few format 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 cdapio / cdap / cdap-ui / app / directives / widget-container / widget-schema-editor-stream / widget-schema-editor-stream.js View on Github external
$scope.error = 'Invalid JSON string';
              }

            }
          } else if ($scope.pluginProperties[watchProperty] === 'grok') {
            $scope.disableEdit = false;
            $scope.fields = 'GROK';
            watcher = $scope.$watch('grok', function () {
              $scope.pluginProperties['format.setting.pattern'] = $scope.grok.pattern;
            }, true);
          }

          else {
            $scope.disableEdit = false;
            $scope.fields = 'SHOW';
            $scope.pluginProperties['format.setting.pattern'] = null;
            initialize($scope.model);
          }
        }
github cdapio / cdap / cdap-ui / app / directives / widget-container / widget-schema-editor-stream / widget-schema-editor-stream.js View on Github external
function initialize(jsonString) {
          filledCount = 0;
          var schema = {};
          $scope.avro = {};
          $scope.grok = {
            pattern: $scope.pluginProperties['format.setting.pattern']
          };

          $scope.error = null;
          if (jsonString) {
            try {
              schema = JSON.parse(jsonString);
              $scope.avro.schema = schema;
            } catch (e) {
              $scope.error = 'Invalid JSON string';
            }
          }

          schema = myHelpers.objectQuery(schema, 'fields');
          $scope.properties = [];
          $scope.activeCell = false;