Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for render_template (0.34 sec)

  1. samples/bookinfo/src/productpage/productpage.py

    #   See the License for the specific language governing permissions and
    #   limitations under the License.
    
    import time
    from flask import Flask, request, session, render_template, redirect, g
    from json2html import json2html
    from opentelemetry import trace
    from opentelemetry.instrumentation.flask import FlaskInstrumentor
    from opentelemetry.propagate import set_global_textmap
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jun 10 14:35:54 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  2. testing/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/logging/comparison/LineSearchFailures.java

            /* package */ static final String HEADER_TEMPLATE = "Expected: %d lines, but found: %d lines.";
    
            public DifferentSizesLineListComparisonFailure(List<String> expectedLines, List<String> actualLines) {
                super(expectedLines, actualLines);
            }
    
            @Override
            public String getMessage() {
                return String.format(HEADER_TEMPLATE, expectedLines.size(), actualLines.size());
            }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  3. operator/pkg/util/util.go

    		sb.WriteString(fmt.Sprintf("%s (repeated %v times)\n", item, logCountMap[item]))
    		// reset seen log count
    		logCountMap[item] = 0
    	}
    	return sb.String()
    }
    
    // RenderTemplate is a helper method to render a template with the given values.
    func RenderTemplate(tmpl string, ts any) (string, error) {
    	t, err := template.New("").Parse(tmpl)
    	if err != nil {
    		return "", err
    	}
    	buf := new(bytes.Buffer)
    	err = t.Execute(buf, ts)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 02 13:01:43 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  4. test-site/test/ApplicationTest.java

    *
    */
    public class ApplicationTest {
    
        @Test
        public void simpleCheck() {
            int a = 1 + 1;
            assertThat(a).isEqualTo(2);
        }
    
        @Test
        public void renderTemplate() {
            Content html = views.html.index.render("Your new application is ready.");
            assertThat(contentType(html)).isEqualTo("text/html");
    Registered: Wed Jun 12 15:38:08 UTC 2024
    - Last Modified: Mon Apr 20 08:41:37 UTC 2015
    - 1.1K bytes
    - Viewed (0)
  5. operator/cmd/mesh/operator-common.go

    		Hub:               ocArgs.hub,
    		Tag:               ocArgs.tag,
    		ImagePullSecrets:  ocArgs.imagePullSecrets,
    		Revision:          ocArgs.revision,
    	}
    	vals, err := util.RenderTemplate(tmpl, tv)
    	if err != nil {
    		return "", "", err
    	}
    	manifest, err := r.RenderManifest(vals)
    	return vals, manifest, err
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Dec 17 02:25:04 UTC 2022
    - 3.8K bytes
    - Viewed (0)
  6. operator/pkg/util/util_test.go

    			in: tmplValue{
    				Name:  "istio",
    				Proxy: "envoy",
    			},
    			want: "",
    			err:  errors.New(""),
    		},
    	}
    	for _, tt := range tests {
    		t.Run(tt.desc, func(t *testing.T) {
    			got, err := RenderTemplate(tt.template, tt.in)
    			if got != tt.want {
    				t.Errorf("%s: got :%v, wanted output: %v", tt.desc, got, tt.want)
    			}
    
    			if (err == nil && tt.err != nil) || (err != nil && tt.err == nil) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 25 19:30:47 UTC 2022
    - 4.9K bytes
    - Viewed (0)
  7. testing/internal-integ-testing/src/test/groovy/org/gradle/integtests/fixtures/logging/comparison/ExhaustiveLinesSearcherTest.groovy

            ["a", "b", "c"]         | ["d"]                 || InsufficientSizeLineListComparisonFailure    || String.format(InsufficientSizeLineListComparisonFailure.HEADER_TEMPLATE, 3, 1);
        }
    
        def "failing lines contained in comparison due to mismatched lines with single potential match: #expectedLines vs #actualLines"() {
            when:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  8. operator/pkg/helm/helm.go

    	hubTagYAMLTemplate := `
    spec:
      hub: {{.Hub}}
      tag: {{.Tag}}
    `
    	ts := struct {
    		Hub string
    		Tag string
    	}{
    		Hub: hub,
    		Tag: tag,
    	}
    	return util.RenderTemplate(hubTagYAMLTemplate, ts)
    }
    
    // DefaultFilenameForProfile returns the profile name of the default profile for the given profile.
    func DefaultFilenameForProfile(profile string) string {
    	switch {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Jan 10 05:10:03 UTC 2024
    - 8K bytes
    - Viewed (0)
  9. operator/pkg/translate/translate.go

    	type Temp struct {
    		ComponentName name.ComponentName
    	}
    	ts := Temp{
    		ComponentName: componentName,
    	}
    	return util.RenderTemplate(tmpl, ts)
    }
    
    // renderResourceComponentPathTemplate renders a template of the form <path>{{.ResourceName}}<path>{{.ContainerName}}<path> with
    // the supplied parameters.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Feb 12 19:43:09 UTC 2024
    - 36.3K bytes
    - Viewed (0)
  10. operator/pkg/translate/translate_value.go

    // the supplied parameters.
    func renderComponentName(tmpl string, componentName string) (string, error) {
    	type temp struct {
    		ValueComponentName string
    	}
    	return util.RenderTemplate(tmpl, temp{componentName})
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Feb 08 03:52:24 UTC 2024
    - 21.6K bytes
    - Viewed (0)
Back to top