hunk
dict
file
stringlengths
0
11.8M
file_path
stringlengths
2
234
label
int64
0
1
commit_url
stringlengths
74
103
dependency_score
listlengths
5
5
{ "id": 1, "code_window": [ "import { CompletionItemGroup, SearchFunctionType, Token, TypeaheadInput, TypeaheadOutput } from '@grafana/ui';\n", "import { getTemplateSrv } from 'app/features/templating/template_srv';\n", "\n", "import { CloudWatchDatasource } from '../../datasource';\n", "import { CloudWatchQuery, LogGroup, TSDBResponse } from '../../types';\n", "import { interpolateStringArrayUsingSingleOrMultiValuedVariable } from '../../utils/templateVariableUtils';\n", "\n", "import syntax, {\n", " AGGREGATION_FUNCTIONS_STATS,\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ "import { CloudWatchQuery, LogGroup } from '../../types';\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/language/cloudwatch-logs/CloudWatchLogsLanguageProvider.ts", "type": "replace", "edit_start_line_idx": 8 }
package conditions import ( "context" "testing" "github.com/stretchr/testify/require" "github.com/grafana/grafana/pkg/components/simplejson" "github.com/grafana/grafana/pkg/infra/db/dbtest" "github.com/grafana/grafana/pkg/infra/localcache" "github.com/grafana/grafana/pkg/services/alerting" "github.com/grafana/grafana/pkg/services/datasources" fd "github.com/grafana/grafana/pkg/services/datasources/fakes" "github.com/grafana/grafana/pkg/services/validations" "github.com/grafana/grafana/pkg/setting" "github.com/grafana/grafana/pkg/tsdb/intervalv2" "github.com/grafana/grafana/pkg/tsdb/legacydata" ) func TestQueryInterval(t *testing.T) { t.Run("When evaluating query condition, regarding the interval value", func(t *testing.T) { t.Run("Can handle interval-calculation with no panel-min-interval and no datasource-min-interval", func(t *testing.T) { // no panel-min-interval in the queryModel queryModel := `{"target": "aliasByNode(statsd.fakesite.counters.session_start.mobile.count, 4)"}` // no datasource-min-interval var dataSourceJson *simplejson.Json = nil timeRange := "5m" verifier := func(query legacydata.DataSubQuery) { // 5minutes timerange = 300000milliseconds; default-resolution is 1500pixels, // so we should have 300000/1500 = 200milliseconds here require.Equal(t, int64(200), query.IntervalMS) require.Equal(t, intervalv2.DefaultRes, query.MaxDataPoints) } applyScenario(t, timeRange, dataSourceJson, queryModel, verifier) }) t.Run("Can handle interval-calculation with panel-min-interval and no datasource-min-interval", func(t *testing.T) { // panel-min-interval in the queryModel queryModel := `{"interval":"123s", "target": "aliasByNode(statsd.fakesite.counters.session_start.mobile.count, 4)"}` // no datasource-min-interval var dataSourceJson *simplejson.Json = nil timeRange := "5m" verifier := func(query legacydata.DataSubQuery) { require.Equal(t, int64(123000), query.IntervalMS) require.Equal(t, intervalv2.DefaultRes, query.MaxDataPoints) } applyScenario(t, timeRange, dataSourceJson, queryModel, verifier) }) t.Run("Can handle interval-calculation with no panel-min-interval and datasource-min-interval", func(t *testing.T) { // no panel-min-interval in the queryModel queryModel := `{"target": "aliasByNode(statsd.fakesite.counters.session_start.mobile.count, 4)"}` // min-interval in datasource-json dataSourceJson, err := simplejson.NewJson([]byte(`{ "timeInterval": "71s" }`)) require.Nil(t, err) timeRange := "5m" verifier := func(query legacydata.DataSubQuery) { require.Equal(t, int64(71000), query.IntervalMS) require.Equal(t, intervalv2.DefaultRes, query.MaxDataPoints) } applyScenario(t, timeRange, dataSourceJson, queryModel, verifier) }) t.Run("Can handle interval-calculation with both panel-min-interval and datasource-min-interval", func(t *testing.T) { // panel-min-interval in the queryModel queryModel := `{"interval":"19s", "target": "aliasByNode(statsd.fakesite.counters.session_start.mobile.count, 4)"}` // min-interval in datasource-json dataSourceJson, err := simplejson.NewJson([]byte(`{ "timeInterval": "71s" }`)) require.Nil(t, err) timeRange := "5m" verifier := func(query legacydata.DataSubQuery) { // when both panel-min-interval and datasource-min-interval exists, // panel-min-interval is used require.Equal(t, int64(19000), query.IntervalMS) require.Equal(t, intervalv2.DefaultRes, query.MaxDataPoints) } applyScenario(t, timeRange, dataSourceJson, queryModel, verifier) }) t.Run("Can handle no min-interval, and very small time-ranges, where the default-min-interval=1ms applies", func(t *testing.T) { // no panel-min-interval in the queryModel queryModel := `{"target": "aliasByNode(statsd.fakesite.counters.session_start.mobile.count, 4)"}` // no datasource-min-interval var dataSourceJson *simplejson.Json = nil timeRange := "1s" verifier := func(query legacydata.DataSubQuery) { // no min-interval exists, the default-min-interval will be used, // and for such a short time-range this will cause the value to be 1millisecond. require.Equal(t, int64(1), query.IntervalMS) require.Equal(t, intervalv2.DefaultRes, query.MaxDataPoints) } applyScenario(t, timeRange, dataSourceJson, queryModel, verifier) }) }) } type queryIntervalTestContext struct { result *alerting.EvalContext condition *QueryCondition } type queryIntervalVerifier func(query legacydata.DataSubQuery) type fakeIntervalTestReqHandler struct { //nolint: staticcheck // legacydata.DataResponse deprecated response legacydata.DataResponse verifier queryIntervalVerifier } //nolint:staticcheck // legacydata.DataResponse deprecated func (rh fakeIntervalTestReqHandler) HandleRequest(ctx context.Context, dsInfo *datasources.DataSource, query legacydata.DataQuery) ( legacydata.DataResponse, error) { q := query.Queries[0] rh.verifier(q) return rh.response, nil } //nolint:staticcheck // legacydata.DataResponse deprecated func applyScenario(t *testing.T, timeRange string, dataSourceJsonData *simplejson.Json, queryModel string, verifier func(query legacydata.DataSubQuery)) { t.Run("desc", func(t *testing.T) { db := dbtest.NewFakeDB() store := alerting.ProvideAlertStore(db, localcache.ProvideService(), &setting.Cfg{}, nil) ctx := &queryIntervalTestContext{} ctx.result = &alerting.EvalContext{ Ctx: context.Background(), Rule: &alerting.Rule{}, RequestValidator: &validations.OSSPluginRequestValidator{}, Store: store, DatasourceService: &fd.FakeDataSourceService{ DataSources: []*datasources.DataSource{ {ID: 1, Type: datasources.DS_GRAPHITE, JsonData: dataSourceJsonData}, }, }, } jsonModel, err := simplejson.NewJson([]byte(`{ "type": "query", "query": { "params": ["A", "` + timeRange + `", "now"], "datasourceId": 1, "model": ` + queryModel + ` }, "reducer":{"type": "avg"}, "evaluator":{"type": "gt", "params": [100]} }`)) require.Nil(t, err) condition, err := newQueryCondition(jsonModel, 0) require.Nil(t, err) ctx.condition = condition qr := legacydata.DataQueryResult{} reqHandler := fakeIntervalTestReqHandler{ response: legacydata.DataResponse{ Results: map[string]legacydata.DataQueryResult{ "A": qr, }, }, verifier: verifier, } _, err = condition.Eval(ctx.result, reqHandler) require.Nil(t, err) }) }
pkg/services/alerting/conditions/query_interval_test.go
0
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.00017272036348003894, 0.00016921915812417865, 0.0001601176045369357, 0.00016958318883553147, 0.000003311214413770358 ]
{ "id": 1, "code_window": [ "import { CompletionItemGroup, SearchFunctionType, Token, TypeaheadInput, TypeaheadOutput } from '@grafana/ui';\n", "import { getTemplateSrv } from 'app/features/templating/template_srv';\n", "\n", "import { CloudWatchDatasource } from '../../datasource';\n", "import { CloudWatchQuery, LogGroup, TSDBResponse } from '../../types';\n", "import { interpolateStringArrayUsingSingleOrMultiValuedVariable } from '../../utils/templateVariableUtils';\n", "\n", "import syntax, {\n", " AGGREGATION_FUNCTIONS_STATS,\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ "import { CloudWatchQuery, LogGroup } from '../../types';\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/language/cloudwatch-logs/CloudWatchLogsLanguageProvider.ts", "type": "replace", "edit_start_line_idx": 8 }
package dashverimpl import ( "context" "strings" "github.com/grafana/grafana/pkg/infra/db" dashver "github.com/grafana/grafana/pkg/services/dashboardversion" "github.com/grafana/grafana/pkg/services/sqlstore/migrator" ) type sqlStore struct { db db.DB dialect migrator.Dialect } func (ss *sqlStore) Get(ctx context.Context, query *dashver.GetDashboardVersionQuery) (*dashver.DashboardVersion, error) { var version dashver.DashboardVersion err := ss.db.WithDbSession(ctx, func(sess *db.Session) error { has, err := sess.Where("dashboard_version.dashboard_id=? AND dashboard_version.version=? AND dashboard.org_id=?", query.DashboardID, query.Version, query.OrgID). Join("LEFT", "dashboard", `dashboard.id = dashboard_version.dashboard_id`). Get(&version) if err != nil { return err } if !has { return dashver.ErrDashboardVersionNotFound } return nil }) if err != nil { return nil, err } return &version, nil } func (ss *sqlStore) GetBatch(ctx context.Context, cmd *dashver.DeleteExpiredVersionsCommand, perBatch int, versionsToKeep int) ([]interface{}, error) { var versionIds []interface{} err := ss.db.WithTransactionalDbSession(ctx, func(sess *db.Session) error { versionIdsToDeleteQuery := `SELECT id FROM dashboard_version, ( SELECT dashboard_id, count(version) as count, min(version) as min FROM dashboard_version GROUP BY dashboard_id ) AS vtd WHERE dashboard_version.dashboard_id=vtd.dashboard_id AND version < vtd.min + vtd.count - ? LIMIT ?` err := sess.SQL(versionIdsToDeleteQuery, versionsToKeep, perBatch).Find(&versionIds) return err }) return versionIds, err } func (ss *sqlStore) DeleteBatch(ctx context.Context, cmd *dashver.DeleteExpiredVersionsCommand, versionIdsToDelete []interface{}) (int64, error) { var deleted int64 err := ss.db.WithTransactionalDbSession(ctx, func(sess *db.Session) error { deleteExpiredSQL := `DELETE FROM dashboard_version WHERE id IN (?` + strings.Repeat(",?", len(versionIdsToDelete)-1) + `)` sqlOrArgs := append([]interface{}{deleteExpiredSQL}, versionIdsToDelete...) expiredResponse, err := sess.Exec(sqlOrArgs...) if err != nil { return err } deleted, err = expiredResponse.RowsAffected() return err }) return deleted, err } func (ss *sqlStore) List(ctx context.Context, query *dashver.ListDashboardVersionsQuery) ([]*dashver.DashboardVersion, error) { var dashboardVersion []*dashver.DashboardVersion err := ss.db.WithDbSession(ctx, func(sess *db.Session) error { err := sess.Table("dashboard_version"). Select(`dashboard_version.id, dashboard_version.dashboard_id, dashboard_version.parent_version, dashboard_version.restored_from, dashboard_version.version, dashboard_version.created, dashboard_version.created_by, dashboard_version.message, dashboard_version.data`). Join("LEFT", "dashboard", `dashboard.id = dashboard_version.dashboard_id`). Where("dashboard_version.dashboard_id=? AND dashboard.org_id=?", query.DashboardID, query.OrgID). OrderBy("dashboard_version.version DESC"). Limit(query.Limit, query.Start). Find(&dashboardVersion) if err != nil { return err } if len(dashboardVersion) < 1 { return dashver.ErrNoVersionsForDashboardID } return nil }) if err != nil { return nil, err } return dashboardVersion, nil }
pkg/services/dashboardversion/dashverimpl/xorm_store.go
0
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.00017307398957200348, 0.0001686099567450583, 0.00016475300071761012, 0.00016745719767641276, 0.000002700086724871653 ]
{ "id": 2, "code_window": [ " getSyntax(): Grammar {\n", " return syntax;\n", " }\n", "\n", " request = (url: string, params?: any): Promise<TSDBResponse> => {\n", " return lastValueFrom(this.datasource.logsQueryRunner.awsRequest(url, params));\n", " };\n", "\n", " start = () => {\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " request = (url: string, params?: any): Promise<FetchResponse<BackendDataSourceResponse>> => {\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/language/cloudwatch-logs/CloudWatchLogsLanguageProvider.ts", "type": "replace", "edit_start_line_idx": 51 }
import { Observable, map } from 'rxjs'; import { DataSourceInstanceSettings, DataSourceRef, getDataSourceRef, ScopedVars } from '@grafana/data'; import { getBackendSrv } from '@grafana/runtime'; import { notifyApp } from 'app/core/actions'; import { createErrorNotification } from 'app/core/copy/appNotification'; import { TemplateSrv } from 'app/features/templating/template_srv'; import { store } from 'app/store/store'; import { AppNotificationTimeout } from 'app/types'; import memoizedDebounce from '../memoizedDebounce'; import { CloudWatchJsonData, Dimensions, MetricRequest, MultiFilters, TSDBResponse } from '../types'; export abstract class CloudWatchRequest { templateSrv: TemplateSrv; ref: DataSourceRef; dsQueryEndpoint = '/api/ds/query'; debouncedCustomAlert: (title: string, message: string) => void = memoizedDebounce( displayCustomError, AppNotificationTimeout.Error ); constructor(public instanceSettings: DataSourceInstanceSettings<CloudWatchJsonData>, templateSrv: TemplateSrv) { this.templateSrv = templateSrv; this.ref = getDataSourceRef(instanceSettings); } awsRequest(url: string, data: MetricRequest, headers: Record<string, string> = {}): Observable<TSDBResponse> { const options = { method: 'POST', url, data, headers, }; return getBackendSrv() .fetch<TSDBResponse>(options) .pipe(map((result) => result.data)); } convertDimensionFormat(dimensions: Dimensions, scopedVars: ScopedVars): Dimensions { return Object.entries(dimensions).reduce((result, [key, value]) => { key = this.replaceVariableAndDisplayWarningIfMulti(key, scopedVars, true, 'dimension keys'); if (Array.isArray(value)) { return { ...result, [key]: value }; } if (!value) { return { ...result, [key]: null }; } const newValues = this.expandVariableToArray(value, scopedVars); return { ...result, [key]: newValues }; }, {}); } // get the value for a given template variable expandVariableToArray(value: string, scopedVars: ScopedVars): string[] { const variableName = this.templateSrv.getVariableName(value); const valueVar = this.templateSrv.getVariables().find(({ name }) => { return name === variableName; }); if (variableName && valueVar) { const isMultiVariable = valueVar?.type === 'custom' || valueVar?.type === 'query' || valueVar?.type === 'datasource'; if (isMultiVariable && valueVar.multi) { return this.templateSrv.replace(value, scopedVars, 'pipe').split('|'); } return [this.templateSrv.replace(value, scopedVars)]; } return [value]; } convertMultiFilterFormat(multiFilters: MultiFilters, fieldName?: string) { return Object.entries(multiFilters).reduce((result, [key, values]) => { const interpolatedKey = this.replaceVariableAndDisplayWarningIfMulti(key, {}, true, fieldName); if (!values) { return { ...result, [interpolatedKey]: null }; } const initialVal: string[] = []; const newValues = values.reduce((result, value) => { const vals = this.expandVariableToArray(value, {}); return [...result, ...vals]; }, initialVal); return { ...result, [interpolatedKey]: newValues }; }, {}); } replaceVariableAndDisplayWarningIfMulti( target?: string, scopedVars?: ScopedVars, displayErrorIfIsMultiTemplateVariable?: boolean, fieldName?: string ) { if (displayErrorIfIsMultiTemplateVariable && !!target) { const variables = this.templateSrv.getVariables(); const variable = variables.find(({ name }) => name === this.templateSrv.getVariableName(target)); const isMultiVariable = variable?.type === 'custom' || variable?.type === 'query' || variable?.type === 'datasource'; if (isMultiVariable && variable.multi) { this.debouncedCustomAlert( 'CloudWatch templating error', `Multi template variables are not supported for ${fieldName || target}` ); } } return this.templateSrv.replace(target, scopedVars); } getActualRegion(region?: string) { if (region === 'default' || region === undefined || region === '') { return this.instanceSettings.jsonData.defaultRegion ?? ''; } return region; } getVariables() { return this.templateSrv.getVariables().map((v) => `$${v.name}`); } } const displayCustomError = (title: string, message: string) => store.dispatch(notifyApp(createErrorNotification(title, message)));
public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchRequest.ts
1
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.002273893216624856, 0.0003443016903474927, 0.00016776884149294347, 0.00017295984434895217, 0.0005574849201366305 ]
{ "id": 2, "code_window": [ " getSyntax(): Grammar {\n", " return syntax;\n", " }\n", "\n", " request = (url: string, params?: any): Promise<TSDBResponse> => {\n", " return lastValueFrom(this.datasource.logsQueryRunner.awsRequest(url, params));\n", " };\n", "\n", " start = () => {\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " request = (url: string, params?: any): Promise<FetchResponse<BackendDataSourceResponse>> => {\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/language/cloudwatch-logs/CloudWatchLogsLanguageProvider.ts", "type": "replace", "edit_start_line_idx": 51 }
import { css } from '@emotion/css'; import React, { useEffect, useState } from 'react'; import { CloudWatchDatasource } from '../../datasource'; import { useAccountOptions } from '../../hooks'; import { DescribeLogGroupsRequest } from '../../resources/types'; import { LogGroup } from '../../types'; import { isTemplateVariable } from '../../utils/templateVariableUtils'; import { LogGroupsSelector } from './LogGroupsSelector'; import { SelectedLogGroups } from './SelectedLogGroups'; type Props = { datasource?: CloudWatchDatasource; onChange: (logGroups: LogGroup[]) => void; legacyLogGroupNames?: string[]; logGroups?: LogGroup[]; region: string; maxNoOfVisibleLogGroups?: number; onBeforeOpen?: () => void; }; const rowGap = css` gap: 3px; `; export const LogGroupsField = ({ datasource, onChange, legacyLogGroupNames, logGroups, region, maxNoOfVisibleLogGroups, onBeforeOpen, }: Props) => { const accountState = useAccountOptions(datasource?.resources, region); const [loadingLogGroupsStarted, setLoadingLogGroupsStarted] = useState(false); useEffect(() => { // If log group names are stored in the query model, make a new DescribeLogGroups request for each log group to load the arn. Then update the query model. if (datasource && !loadingLogGroupsStarted && !logGroups?.length && legacyLogGroupNames?.length) { setLoadingLogGroupsStarted(true); // there's no need to migrate variables, they will be taken care of in the logs query runner const variables = legacyLogGroupNames.filter((lgn) => isTemplateVariable(datasource.resources.templateSrv, lgn)); const legacyLogGroupNameValues = legacyLogGroupNames.filter( (lgn) => !isTemplateVariable(datasource.resources.templateSrv, lgn) ); Promise.all( legacyLogGroupNameValues.map((lg) => datasource.resources.getLogGroups({ region: region, logGroupNamePrefix: lg }) ) ) .then((results) => { const logGroups = results.flatMap((r) => r.map((lg) => ({ arn: lg.value.arn, name: lg.value.name, accountId: lg.accountId, })) ); onChange([...logGroups, ...variables.map((v) => ({ name: v, arn: v }))]); }) .catch((err) => { console.error(err); }); } }, [datasource, legacyLogGroupNames, logGroups, onChange, region, loadingLogGroupsStarted]); return ( <div className={`gf-form gf-form--grow flex-grow-1 ${rowGap}`}> <LogGroupsSelector fetchLogGroups={async (params: Partial<DescribeLogGroupsRequest>) => datasource?.resources.getLogGroups({ region: region, ...params }) ?? [] } onChange={onChange} accountOptions={accountState.value} selectedLogGroups={logGroups} onBeforeOpen={onBeforeOpen} variables={datasource?.getVariables()} /> <SelectedLogGroups selectedLogGroups={logGroups ?? []} onChange={onChange} maxNoOfVisibleLogGroups={maxNoOfVisibleLogGroups} ></SelectedLogGroups> </div> ); };
public/app/plugins/datasource/cloudwatch/components/LogGroups/LogGroupsField.tsx
0
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.0004666861204896122, 0.00022384049952961504, 0.00016315233369823545, 0.00017350925190839916, 0.00009179108747048303 ]
{ "id": 2, "code_window": [ " getSyntax(): Grammar {\n", " return syntax;\n", " }\n", "\n", " request = (url: string, params?: any): Promise<TSDBResponse> => {\n", " return lastValueFrom(this.datasource.logsQueryRunner.awsRequest(url, params));\n", " };\n", "\n", " start = () => {\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " request = (url: string, params?: any): Promise<FetchResponse<BackendDataSourceResponse>> => {\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/language/cloudwatch-logs/CloudWatchLogsLanguageProvider.ts", "type": "replace", "edit_start_line_idx": 51 }
package modules import ( "context" "errors" "github.com/grafana/dskit/modules" "github.com/grafana/dskit/services" "github.com/grafana/grafana/pkg/infra/log" ) var _ services.ManagerListener = (*serviceListener)(nil) type serviceListener struct { log log.Logger service *service } func newServiceListener(logger log.Logger, s *service) *serviceListener { return &serviceListener{log: logger, service: s} } func (l *serviceListener) Healthy() { l.log.Info("All modules healthy") } func (l *serviceListener) Stopped() { l.log.Info("All modules stopped") } func (l *serviceListener) Failure(service services.Service) { // if any service fails, stop all services if err := l.service.Shutdown(context.Background()); err != nil { l.log.Error("Failed to stop all modules", "err", err) } // log which module failed for module, s := range l.service.ServiceMap { if s == service { if errors.Is(service.FailureCase(), modules.ErrStopProcess) { l.log.Info("Received stop signal via return error", "module", module, "err", service.FailureCase()) } else { l.log.Error("Module failed", "module", module, "err", service.FailureCase()) } return } } l.log.Error("Module failed", "module", "unknown", "err", service.FailureCase()) }
pkg/modules/listener.go
0
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.000174395609064959, 0.0001697621337370947, 0.00016505536041222513, 0.000169009726960212, 0.000003381014948899974 ]
{ "id": 2, "code_window": [ " getSyntax(): Grammar {\n", " return syntax;\n", " }\n", "\n", " request = (url: string, params?: any): Promise<TSDBResponse> => {\n", " return lastValueFrom(this.datasource.logsQueryRunner.awsRequest(url, params));\n", " };\n", "\n", " start = () => {\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " request = (url: string, params?: any): Promise<FetchResponse<BackendDataSourceResponse>> => {\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/language/cloudwatch-logs/CloudWatchLogsLanguageProvider.ts", "type": "replace", "edit_start_line_idx": 51 }
import { ArgsTable } from '@storybook/addon-docs/blocks'; import { DatePicker } from './DatePicker'; # DatePicker A component with a calendar view for selecting a date. ### Usage ```tsx import React, { useState } from 'react'; import { DatePicker, Button } from '@grafana/ui'; const [date, setDate] = useState<Date>(new Date()); const [open, setOpen] = useState(false); return ( <> <Button onClick={() => setOpen(true)}>Show Calendar</Button> <DatePicker isOpen={open} value={date} onChange={(newDate) => setDate(newDate)} onClose={() => setOpen(false)} /> </> ); ``` ### Props <ArgsTable of={DatePicker} />
packages/grafana-ui/src/components/DateTimePickers/DatePicker/DatePicker.mdx
0
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.00017659840523265302, 0.00017506688891444355, 0.00017326189845334738, 0.00017534034850541502, 0.0000013757801298197592 ]
{ "id": 3, "code_window": [ " })),\n", " }).pipe(\n", " map((r) => {\n", " const frames = toDataQueryResponse({ data: r }).data;\n", " return { data: frames };\n", " })\n", " );\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " const frames = toDataQueryResponse(r).data;\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchAnnotationQueryRunner.ts", "type": "replace", "edit_start_line_idx": 38 }
import { findLast, isEmpty } from 'lodash'; import React from 'react'; import { catchError, map, Observable, of, throwError } from 'rxjs'; import { DataFrame, DataQueryRequest, DataQueryResponse, DataSourceInstanceSettings, dateTimeFormat, FieldType, rangeUtil, ScopedVars, TimeRange, } from '@grafana/data'; import { toDataQueryResponse } from '@grafana/runtime'; import { notifyApp } from 'app/core/actions'; import { createErrorNotification } from 'app/core/copy/appNotification'; import { TemplateSrv } from 'app/features/templating/template_srv'; import { store } from 'app/store/store'; import { AppNotificationTimeout } from 'app/types'; import { ThrottlingErrorMessage } from '../components/ThrottlingErrorMessage'; import memoizedDebounce from '../memoizedDebounce'; import { migrateMetricQuery } from '../migrations/metricQueryMigrations'; import { CloudWatchJsonData, CloudWatchMetricsQuery, CloudWatchQuery, DataQueryError, MetricQuery, MetricRequest, } from '../types'; import { filterMetricsQuery } from '../utils/utils'; import { CloudWatchRequest } from './CloudWatchRequest'; const displayAlert = (datasourceName: string, region: string) => store.dispatch( notifyApp( createErrorNotification( `CloudWatch request limit reached in ${region} for data source ${datasourceName}`, '', undefined, React.createElement(ThrottlingErrorMessage, { region }, null) ) ) ); // This class handles execution of CloudWatch metrics query data queries export class CloudWatchMetricsQueryRunner extends CloudWatchRequest { debouncedAlert: (datasourceName: string, region: string) => void = memoizedDebounce( displayAlert, AppNotificationTimeout.Error ); constructor(instanceSettings: DataSourceInstanceSettings<CloudWatchJsonData>, templateSrv: TemplateSrv) { super(instanceSettings, templateSrv); } handleMetricQueries = ( metricQueries: CloudWatchMetricsQuery[], options: DataQueryRequest<CloudWatchQuery> ): Observable<DataQueryResponse> => { const timezoneUTCOffset = dateTimeFormat(Date.now(), { timeZone: options.timezone, format: 'Z', }).replace(':', ''); const validMetricsQueries = metricQueries .filter(this.filterMetricQuery) .map((q: CloudWatchMetricsQuery): MetricQuery => { const migratedQuery = migrateMetricQuery(q); const migratedAndIterpolatedQuery = this.replaceMetricQueryVars(migratedQuery, options.scopedVars); return { timezoneUTCOffset, intervalMs: options.intervalMs, maxDataPoints: options.maxDataPoints, ...migratedAndIterpolatedQuery, type: 'timeSeriesQuery', datasource: this.ref, }; }); // No valid targets, return the empty result to save a round trip. if (isEmpty(validMetricsQueries)) { return of({ data: [] }); } const request = { from: options?.range?.from.valueOf().toString(), to: options?.range?.to.valueOf().toString(), queries: validMetricsQueries, }; return this.performTimeSeriesQuery(request, options.range); }; interpolateMetricsQueryVariables( query: CloudWatchMetricsQuery, scopedVars: ScopedVars ): Pick< CloudWatchMetricsQuery, 'alias' | 'metricName' | 'namespace' | 'period' | 'dimensions' | 'sqlExpression' | 'expression' > { return { alias: this.replaceVariableAndDisplayWarningIfMulti(query.alias, scopedVars), metricName: this.replaceVariableAndDisplayWarningIfMulti(query.metricName, scopedVars), namespace: this.replaceVariableAndDisplayWarningIfMulti(query.namespace, scopedVars), period: this.replaceVariableAndDisplayWarningIfMulti(query.period, scopedVars), expression: this.templateSrv.replace(query.expression, scopedVars), sqlExpression: this.replaceVariableAndDisplayWarningIfMulti(query.sqlExpression, scopedVars), dimensions: this.convertDimensionFormat(query.dimensions ?? {}, scopedVars), }; } performTimeSeriesQuery(request: MetricRequest, { from, to }: TimeRange): Observable<DataQueryResponse> { return this.awsRequest(this.dsQueryEndpoint, request).pipe( map((res) => { const dataframes: DataFrame[] = toDataQueryResponse({ data: res }).data; if (!dataframes || dataframes.length <= 0) { return { data: [] }; } const lastError = findLast(res.results, (v) => !!v.error); dataframes.forEach((frame) => { frame.fields.forEach((field) => { if (field.type === FieldType.time) { // field.config.interval is populated in order for Grafana to fill in null values at frame intervals field.config.interval = frame.meta?.custom?.period * 1000; } }); }); return { data: dataframes, error: lastError ? { message: lastError.error } : undefined, }; }), catchError((err: DataQueryError<CloudWatchMetricsQuery>) => { const isFrameError = err.data?.results; // Error is not frame specific if (!isFrameError && err.data && err.data.message === 'Metric request error' && err.data.error) { err.message = err.data.error; return throwError(() => err); } // The error is either for a specific frame or for all the frames const results: Array<{ error?: string }> = Object.values(err.data?.results ?? {}); const firstErrorResult = results.find((r) => r.error); if (firstErrorResult) { err.message = firstErrorResult.error; } if (results.some((r) => r.error && /^Throttling:.*/.test(r.error))) { const failedRedIds = Object.keys(err.data?.results ?? {}); const regionsAffected = Object.values(request.queries).reduce( (res: string[], { refId, region }) => (refId && !failedRedIds.includes(refId)) || res.includes(region) ? res : [...res, region], [] ); regionsAffected.forEach((region) => { const actualRegion = this.getActualRegion(region); if (actualRegion) { this.debouncedAlert(this.instanceSettings.name, actualRegion); } }); } return throwError(() => err); }) ); } filterMetricQuery(query: CloudWatchMetricsQuery): boolean { return filterMetricsQuery(query); } replaceMetricQueryVars(query: CloudWatchMetricsQuery, scopedVars: ScopedVars): CloudWatchMetricsQuery { query.region = this.templateSrv.replace(this.getActualRegion(query.region), scopedVars); query.namespace = this.replaceVariableAndDisplayWarningIfMulti(query.namespace, scopedVars, true, 'namespace'); query.metricName = this.replaceVariableAndDisplayWarningIfMulti(query.metricName, scopedVars, true, 'metric name'); query.dimensions = this.convertDimensionFormat(query.dimensions ?? {}, scopedVars); query.statistic = this.templateSrv.replace(query.statistic, scopedVars); query.period = String(this.getPeriod(query, scopedVars)); // use string format for period in graph query, and alerting query.id = this.templateSrv.replace(query.id, scopedVars); query.expression = this.templateSrv.replace(query.expression, scopedVars); query.sqlExpression = this.templateSrv.replace(query.sqlExpression, scopedVars, 'raw'); if (query.accountId) { query.accountId = this.templateSrv.replace(query.accountId, scopedVars); } return query; } getPeriod(target: CloudWatchMetricsQuery, scopedVars: ScopedVars) { let period = this.templateSrv.replace(target.period, scopedVars); if (period && period.toLowerCase() !== 'auto') { let p: number; if (/^\d+$/.test(period)) { p = parseInt(period, 10); } else { p = rangeUtil.intervalToSeconds(period); } if (p < 1) { p = 1; } return String(p); } return period; } }
public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchMetricsQueryRunner.ts
1
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.0069267540238797665, 0.0006946717039681971, 0.00016354015679098666, 0.0001732035307213664, 0.0014769957633689046 ]
{ "id": 3, "code_window": [ " })),\n", " }).pipe(\n", " map((r) => {\n", " const frames = toDataQueryResponse({ data: r }).data;\n", " return { data: frames };\n", " })\n", " );\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " const frames = toDataQueryResponse(r).data;\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchAnnotationQueryRunner.ts", "type": "replace", "edit_start_line_idx": 38 }
<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" viewBox="0 0 24 24"><path d="M19,2H5C3.3,2,2,3.3,2,5v14c0,1.7,1.3,3,3,3h14c1.7,0,3-1.3,3-3V5C22,3.3,20.7,2,19,2z M8,17c0,0.6-0.4,1-1,1s-1-0.4-1-1v-4c0-0.6,0.4-1,1-1s1,0.4,1,1V17z M13,17c0,0.6-0.4,1-1,1s-1-0.4-1-1V7c0-0.6,0.4-1,1-1s1,0.4,1,1V17z M18,17c0,0.6-0.4,1-1,1s-1-0.4-1-1v-6c0-0.6,0.4-1,1-1s1,0.4,1,1V17z"/></svg>
public/img/icons/solid/chart.svg
0
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.00016667073941789567, 0.00016667073941789567, 0.00016667073941789567, 0.00016667073941789567, 0 ]
{ "id": 3, "code_window": [ " })),\n", " }).pipe(\n", " map((r) => {\n", " const frames = toDataQueryResponse({ data: r }).data;\n", " return { data: frames };\n", " })\n", " );\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " const frames = toDataQueryResponse(r).data;\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchAnnotationQueryRunner.ts", "type": "replace", "edit_start_line_idx": 38 }
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19,11H5a1,1,0,0,0,0,2H19a1,1,0,0,0,0-2Z"/></svg>
public/img/icons/unicons/minus.svg
0
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.000167596954270266, 0.000167596954270266, 0.000167596954270266, 0.000167596954270266, 0 ]
{ "id": 3, "code_window": [ " })),\n", " }).pipe(\n", " map((r) => {\n", " const frames = toDataQueryResponse({ data: r }).data;\n", " return { data: frames };\n", " })\n", " );\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " const frames = toDataQueryResponse(r).data;\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchAnnotationQueryRunner.ts", "type": "replace", "edit_start_line_idx": 38 }
import { Meta, Story, Preview, Props } from '@storybook/addon-docs/blocks'; import { CodeEditor } from './CodeEditor'; <Meta title="MDX|CodeEditor" component={CodeEditor} /> # CodeEditor Monaco Code editor
packages/grafana-ui/src/components/Monaco/CodeEditor.mdx
0
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.00017406517872586846, 0.00017406517872586846, 0.00017406517872586846, 0.00017406517872586846, 0 ]
{ "id": 4, "code_window": [ "\n", " return this.awsRequest(this.dsQueryEndpoint, requestParams, {\n", " 'X-Cache-Skip': 'true',\n", " }).pipe(\n", " map((response) => resultsToDataFrames({ data: response })),\n", " catchError((err: FetchError) => {\n", " if (config.featureToggles.datasourceQueryMultiStatus && err.status === 207) {\n", " throw err;\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " map((response) => resultsToDataFrames(response)),\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchLogsQueryRunner.ts", "type": "replace", "edit_start_line_idx": 303 }
import { Observable, map } from 'rxjs'; import { DataSourceInstanceSettings, DataSourceRef, getDataSourceRef, ScopedVars } from '@grafana/data'; import { getBackendSrv } from '@grafana/runtime'; import { notifyApp } from 'app/core/actions'; import { createErrorNotification } from 'app/core/copy/appNotification'; import { TemplateSrv } from 'app/features/templating/template_srv'; import { store } from 'app/store/store'; import { AppNotificationTimeout } from 'app/types'; import memoizedDebounce from '../memoizedDebounce'; import { CloudWatchJsonData, Dimensions, MetricRequest, MultiFilters, TSDBResponse } from '../types'; export abstract class CloudWatchRequest { templateSrv: TemplateSrv; ref: DataSourceRef; dsQueryEndpoint = '/api/ds/query'; debouncedCustomAlert: (title: string, message: string) => void = memoizedDebounce( displayCustomError, AppNotificationTimeout.Error ); constructor(public instanceSettings: DataSourceInstanceSettings<CloudWatchJsonData>, templateSrv: TemplateSrv) { this.templateSrv = templateSrv; this.ref = getDataSourceRef(instanceSettings); } awsRequest(url: string, data: MetricRequest, headers: Record<string, string> = {}): Observable<TSDBResponse> { const options = { method: 'POST', url, data, headers, }; return getBackendSrv() .fetch<TSDBResponse>(options) .pipe(map((result) => result.data)); } convertDimensionFormat(dimensions: Dimensions, scopedVars: ScopedVars): Dimensions { return Object.entries(dimensions).reduce((result, [key, value]) => { key = this.replaceVariableAndDisplayWarningIfMulti(key, scopedVars, true, 'dimension keys'); if (Array.isArray(value)) { return { ...result, [key]: value }; } if (!value) { return { ...result, [key]: null }; } const newValues = this.expandVariableToArray(value, scopedVars); return { ...result, [key]: newValues }; }, {}); } // get the value for a given template variable expandVariableToArray(value: string, scopedVars: ScopedVars): string[] { const variableName = this.templateSrv.getVariableName(value); const valueVar = this.templateSrv.getVariables().find(({ name }) => { return name === variableName; }); if (variableName && valueVar) { const isMultiVariable = valueVar?.type === 'custom' || valueVar?.type === 'query' || valueVar?.type === 'datasource'; if (isMultiVariable && valueVar.multi) { return this.templateSrv.replace(value, scopedVars, 'pipe').split('|'); } return [this.templateSrv.replace(value, scopedVars)]; } return [value]; } convertMultiFilterFormat(multiFilters: MultiFilters, fieldName?: string) { return Object.entries(multiFilters).reduce((result, [key, values]) => { const interpolatedKey = this.replaceVariableAndDisplayWarningIfMulti(key, {}, true, fieldName); if (!values) { return { ...result, [interpolatedKey]: null }; } const initialVal: string[] = []; const newValues = values.reduce((result, value) => { const vals = this.expandVariableToArray(value, {}); return [...result, ...vals]; }, initialVal); return { ...result, [interpolatedKey]: newValues }; }, {}); } replaceVariableAndDisplayWarningIfMulti( target?: string, scopedVars?: ScopedVars, displayErrorIfIsMultiTemplateVariable?: boolean, fieldName?: string ) { if (displayErrorIfIsMultiTemplateVariable && !!target) { const variables = this.templateSrv.getVariables(); const variable = variables.find(({ name }) => name === this.templateSrv.getVariableName(target)); const isMultiVariable = variable?.type === 'custom' || variable?.type === 'query' || variable?.type === 'datasource'; if (isMultiVariable && variable.multi) { this.debouncedCustomAlert( 'CloudWatch templating error', `Multi template variables are not supported for ${fieldName || target}` ); } } return this.templateSrv.replace(target, scopedVars); } getActualRegion(region?: string) { if (region === 'default' || region === undefined || region === '') { return this.instanceSettings.jsonData.defaultRegion ?? ''; } return region; } getVariables() { return this.templateSrv.getVariables().map((v) => `$${v.name}`); } } const displayCustomError = (title: string, message: string) => store.dispatch(notifyApp(createErrorNotification(title, message)));
public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchRequest.ts
1
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.00990631990134716, 0.0010404022177681327, 0.00016327791672665626, 0.00017013824253808707, 0.0025932323187589645 ]
{ "id": 4, "code_window": [ "\n", " return this.awsRequest(this.dsQueryEndpoint, requestParams, {\n", " 'X-Cache-Skip': 'true',\n", " }).pipe(\n", " map((response) => resultsToDataFrames({ data: response })),\n", " catchError((err: FetchError) => {\n", " if (config.featureToggles.datasourceQueryMultiStatus && err.status === 207) {\n", " throw err;\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " map((response) => resultsToDataFrames(response)),\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchLogsQueryRunner.ts", "type": "replace", "edit_start_line_idx": 303 }
{ "status": "success", "data": { "resultType": "vector", "result": [ { "metric": { "level": "error", "location": "moon"}, "value": [1645029699, "+Inf"] }, { "metric": { "level": "info", "location": "moon" }, "value": [1645029699, "-Inf"] }, { "metric": { "level": "debug", "location": "moon" }, "value": [1645029699, "NaN"] } ] } }
pkg/tsdb/loki/testdata/vector_special_values.json
0
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.00017420563381165266, 0.00017215817933902144, 0.0001695972605375573, 0.00017267164366785437, 0.000001916074097607634 ]
{ "id": 4, "code_window": [ "\n", " return this.awsRequest(this.dsQueryEndpoint, requestParams, {\n", " 'X-Cache-Skip': 'true',\n", " }).pipe(\n", " map((response) => resultsToDataFrames({ data: response })),\n", " catchError((err: FetchError) => {\n", " if (config.featureToggles.datasourceQueryMultiStatus && err.status === 207) {\n", " throw err;\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " map((response) => resultsToDataFrames(response)),\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchLogsQueryRunner.ts", "type": "replace", "edit_start_line_idx": 303 }
package service import ( "context" "fmt" "time" "github.com/grafana/grafana/pkg/infra/db" "github.com/grafana/grafana/pkg/infra/localcache" "github.com/grafana/grafana/pkg/infra/log" "github.com/grafana/grafana/pkg/services/datasources" "github.com/grafana/grafana/pkg/services/user" ) const ( DefaultCacheTTL = 5 * time.Second ) func ProvideCacheService(cacheService *localcache.CacheService, sqlStore db.DB) *CacheServiceImpl { return &CacheServiceImpl{ logger: log.New("datasources"), cacheTTL: DefaultCacheTTL, CacheService: cacheService, SQLStore: sqlStore, } } type CacheServiceImpl struct { logger log.Logger cacheTTL time.Duration CacheService *localcache.CacheService SQLStore db.DB } func (dc *CacheServiceImpl) GetDatasource( ctx context.Context, datasourceID int64, user *user.SignedInUser, skipCache bool, ) (*datasources.DataSource, error) { cacheKey := idKey(datasourceID) if !skipCache { if cached, found := dc.CacheService.Get(cacheKey); found { ds := cached.(*datasources.DataSource) if ds.OrgID == user.OrgID { return ds, nil } } } dc.logger.FromContext(ctx).Debug("Querying for data source via SQL store", "id", datasourceID, "orgId", user.OrgID) query := &datasources.GetDataSourceQuery{ID: datasourceID, OrgID: user.OrgID} ss := SqlStore{db: dc.SQLStore, logger: dc.logger} ds, err := ss.GetDataSource(ctx, query) if err != nil { return nil, err } if ds.UID != "" { dc.CacheService.Set(uidKey(ds.OrgID, ds.UID), ds, time.Second*5) } dc.CacheService.Set(cacheKey, ds, dc.cacheTTL) return ds, nil } func (dc *CacheServiceImpl) GetDatasourceByUID( ctx context.Context, datasourceUID string, user *user.SignedInUser, skipCache bool, ) (*datasources.DataSource, error) { if datasourceUID == "" { return nil, fmt.Errorf("can not get data source by uid, uid is empty") } if user.OrgID == 0 { return nil, fmt.Errorf("can not get data source by uid, orgId is missing") } uidCacheKey := uidKey(user.OrgID, datasourceUID) if !skipCache { if cached, found := dc.CacheService.Get(uidCacheKey); found { ds := cached.(*datasources.DataSource) if ds.OrgID == user.OrgID { return ds, nil } } } dc.logger.FromContext(ctx).Debug("Querying for data source via SQL store", "uid", datasourceUID, "orgId", user.OrgID) query := &datasources.GetDataSourceQuery{UID: datasourceUID, OrgID: user.OrgID} ss := SqlStore{db: dc.SQLStore, logger: dc.logger} ds, err := ss.GetDataSource(ctx, query) if err != nil { return nil, err } dc.CacheService.Set(uidCacheKey, ds, dc.cacheTTL) dc.CacheService.Set(idKey(ds.ID), ds, dc.cacheTTL) return ds, nil } func idKey(id int64) string { return fmt.Sprintf("ds-%d", id) } func uidKey(orgID int64, uid string) string { return fmt.Sprintf("ds-orgid-uid-%d-%s", orgID, uid) }
pkg/services/datasources/service/cache.go
0
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.00030911804060451686, 0.0001827932574087754, 0.0001655790110817179, 0.00016946524556260556, 0.00003862285666400567 ]
{ "id": 4, "code_window": [ "\n", " return this.awsRequest(this.dsQueryEndpoint, requestParams, {\n", " 'X-Cache-Skip': 'true',\n", " }).pipe(\n", " map((response) => resultsToDataFrames({ data: response })),\n", " catchError((err: FetchError) => {\n", " if (config.featureToggles.datasourceQueryMultiStatus && err.status === 207) {\n", " throw err;\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " map((response) => resultsToDataFrames(response)),\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchLogsQueryRunner.ts", "type": "replace", "edit_start_line_idx": 303 }
import React, { useState } from 'react'; import { NavModelItem } from '@grafana/data'; import { locationService } from '@grafana/runtime'; import { Page } from 'app/core/components/PageNew/Page'; import { LinkSettingsEdit, LinkSettingsList } from '../LinksSettings'; import { newLink } from '../LinksSettings/LinkSettingsEdit'; import { SettingsPageProps } from './types'; export type LinkSettingsMode = 'list' | 'new' | 'edit'; export function LinksSettings({ dashboard, sectionNav, editIndex }: SettingsPageProps) { const [isNew, setIsNew] = useState<boolean>(false); const onGoBack = () => { setIsNew(false); locationService.partial({ editIndex: undefined }); }; const onNew = () => { dashboard.links = [...dashboard.links, { ...newLink }]; setIsNew(true); locationService.partial({ editIndex: dashboard.links.length - 1 }); }; const onEdit = (idx: number) => { setIsNew(false); locationService.partial({ editIndex: idx }); }; const isEditing = editIndex !== undefined; let pageNav: NavModelItem | undefined; if (isEditing) { const title = isNew ? 'New link' : 'Edit link'; const description = isNew ? 'Create a new link on your dashboard' : 'Edit a specific link of your dashboard'; pageNav = { text: title, subTitle: description, }; } return ( <Page navModel={sectionNav} pageNav={pageNav}> {!isEditing && <LinkSettingsList dashboard={dashboard} onNew={onNew} onEdit={onEdit} />} {isEditing && <LinkSettingsEdit dashboard={dashboard} editLinkIdx={editIndex} onGoBack={onGoBack} />} </Page> ); }
public/app/features/dashboard/components/DashboardSettings/LinksSettings.tsx
0
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.00017525443399790674, 0.00017233804101124406, 0.00016857187438290566, 0.0001730518415570259, 0.000002482974423401174 ]
{ "id": 5, "code_window": [ " performTimeSeriesQuery(request: MetricRequest, { from, to }: TimeRange): Observable<DataQueryResponse> {\n", " return this.awsRequest(this.dsQueryEndpoint, request).pipe(\n", " map((res) => {\n", " const dataframes: DataFrame[] = toDataQueryResponse({ data: res }).data;\n", " if (!dataframes || dataframes.length <= 0) {\n", " return { data: [] };\n", " }\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " const dataframes: DataFrame[] = toDataQueryResponse(res).data;\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchMetricsQueryRunner.ts", "type": "replace", "edit_start_line_idx": 119 }
import { Observable, map } from 'rxjs'; import { DataSourceInstanceSettings, DataSourceRef, getDataSourceRef, ScopedVars } from '@grafana/data'; import { getBackendSrv } from '@grafana/runtime'; import { notifyApp } from 'app/core/actions'; import { createErrorNotification } from 'app/core/copy/appNotification'; import { TemplateSrv } from 'app/features/templating/template_srv'; import { store } from 'app/store/store'; import { AppNotificationTimeout } from 'app/types'; import memoizedDebounce from '../memoizedDebounce'; import { CloudWatchJsonData, Dimensions, MetricRequest, MultiFilters, TSDBResponse } from '../types'; export abstract class CloudWatchRequest { templateSrv: TemplateSrv; ref: DataSourceRef; dsQueryEndpoint = '/api/ds/query'; debouncedCustomAlert: (title: string, message: string) => void = memoizedDebounce( displayCustomError, AppNotificationTimeout.Error ); constructor(public instanceSettings: DataSourceInstanceSettings<CloudWatchJsonData>, templateSrv: TemplateSrv) { this.templateSrv = templateSrv; this.ref = getDataSourceRef(instanceSettings); } awsRequest(url: string, data: MetricRequest, headers: Record<string, string> = {}): Observable<TSDBResponse> { const options = { method: 'POST', url, data, headers, }; return getBackendSrv() .fetch<TSDBResponse>(options) .pipe(map((result) => result.data)); } convertDimensionFormat(dimensions: Dimensions, scopedVars: ScopedVars): Dimensions { return Object.entries(dimensions).reduce((result, [key, value]) => { key = this.replaceVariableAndDisplayWarningIfMulti(key, scopedVars, true, 'dimension keys'); if (Array.isArray(value)) { return { ...result, [key]: value }; } if (!value) { return { ...result, [key]: null }; } const newValues = this.expandVariableToArray(value, scopedVars); return { ...result, [key]: newValues }; }, {}); } // get the value for a given template variable expandVariableToArray(value: string, scopedVars: ScopedVars): string[] { const variableName = this.templateSrv.getVariableName(value); const valueVar = this.templateSrv.getVariables().find(({ name }) => { return name === variableName; }); if (variableName && valueVar) { const isMultiVariable = valueVar?.type === 'custom' || valueVar?.type === 'query' || valueVar?.type === 'datasource'; if (isMultiVariable && valueVar.multi) { return this.templateSrv.replace(value, scopedVars, 'pipe').split('|'); } return [this.templateSrv.replace(value, scopedVars)]; } return [value]; } convertMultiFilterFormat(multiFilters: MultiFilters, fieldName?: string) { return Object.entries(multiFilters).reduce((result, [key, values]) => { const interpolatedKey = this.replaceVariableAndDisplayWarningIfMulti(key, {}, true, fieldName); if (!values) { return { ...result, [interpolatedKey]: null }; } const initialVal: string[] = []; const newValues = values.reduce((result, value) => { const vals = this.expandVariableToArray(value, {}); return [...result, ...vals]; }, initialVal); return { ...result, [interpolatedKey]: newValues }; }, {}); } replaceVariableAndDisplayWarningIfMulti( target?: string, scopedVars?: ScopedVars, displayErrorIfIsMultiTemplateVariable?: boolean, fieldName?: string ) { if (displayErrorIfIsMultiTemplateVariable && !!target) { const variables = this.templateSrv.getVariables(); const variable = variables.find(({ name }) => name === this.templateSrv.getVariableName(target)); const isMultiVariable = variable?.type === 'custom' || variable?.type === 'query' || variable?.type === 'datasource'; if (isMultiVariable && variable.multi) { this.debouncedCustomAlert( 'CloudWatch templating error', `Multi template variables are not supported for ${fieldName || target}` ); } } return this.templateSrv.replace(target, scopedVars); } getActualRegion(region?: string) { if (region === 'default' || region === undefined || region === '') { return this.instanceSettings.jsonData.defaultRegion ?? ''; } return region; } getVariables() { return this.templateSrv.getVariables().map((v) => `$${v.name}`); } } const displayCustomError = (title: string, message: string) => store.dispatch(notifyApp(createErrorNotification(title, message)));
public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchRequest.ts
1
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.005582463461905718, 0.0007845911895856261, 0.00016318111738655716, 0.00017243126058019698, 0.0015438708942383528 ]
{ "id": 5, "code_window": [ " performTimeSeriesQuery(request: MetricRequest, { from, to }: TimeRange): Observable<DataQueryResponse> {\n", " return this.awsRequest(this.dsQueryEndpoint, request).pipe(\n", " map((res) => {\n", " const dataframes: DataFrame[] = toDataQueryResponse({ data: res }).data;\n", " if (!dataframes || dataframes.length <= 0) {\n", " return { data: [] };\n", " }\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " const dataframes: DataFrame[] = toDataQueryResponse(res).data;\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchMetricsQueryRunner.ts", "type": "replace", "edit_start_line_idx": 119 }
// Libraries import React, { useEffect } from 'react'; import { PageLayoutType } from '@grafana/data'; import { Page } from 'app/core/components/Page/Page'; import PageLoader from 'app/core/components/PageLoader/PageLoader'; import { GrafanaRouteComponentProps } from 'app/core/navigation/types'; import { getDashboardLoader } from './DashboardsLoader'; export interface Props extends GrafanaRouteComponentProps<{ uid: string }> {} export const DashboardScenePage = ({ match }: Props) => { const loader = getDashboardLoader(); const { dashboard, isLoading } = loader.useState(); useEffect(() => { loader.load(match.params.uid); return () => { loader.clearState(); }; }, [loader, match.params.uid]); if (!dashboard) { return ( <Page layout={PageLayoutType.Canvas}> {isLoading && <PageLoader />} {!isLoading && <h2>Dashboard not found</h2>} </Page> ); } return <dashboard.Component model={dashboard} />; }; export default DashboardScenePage;
public/app/features/scenes/dashboard/DashboardScenePage.tsx
0
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.00017759080219548196, 0.00017465268319938332, 0.00017310469411313534, 0.0001739576255204156, 0.000001750612682371866 ]
{ "id": 5, "code_window": [ " performTimeSeriesQuery(request: MetricRequest, { from, to }: TimeRange): Observable<DataQueryResponse> {\n", " return this.awsRequest(this.dsQueryEndpoint, request).pipe(\n", " map((res) => {\n", " const dataframes: DataFrame[] = toDataQueryResponse({ data: res }).data;\n", " if (!dataframes || dataframes.length <= 0) {\n", " return { data: [] };\n", " }\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " const dataframes: DataFrame[] = toDataQueryResponse(res).data;\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchMetricsQueryRunner.ts", "type": "replace", "edit_start_line_idx": 119 }
package errutil import ( "bytes" "fmt" "text/template" ) // Template is an extended Base for when using templating to construct // error messages. type Template struct { Base Base logTemplate *template.Template publicTemplate *template.Template } // TemplateData contains data for constructing an Error based on a // Template. type TemplateData struct { Private map[string]interface{} Public map[string]interface{} Error error } // Template provides templating for converting Base to Error. // This is useful where the public payload is populated with fields that // should be present in the internal error representation. func (b Base) Template(pattern string, opts ...TemplateOpt) (Template, error) { tmpl, err := template.New(b.messageID + "~private").Parse(pattern) if err != nil { return Template{}, err } t := Template{ Base: b, logTemplate: tmpl, } for _, o := range opts { t, err = o(t) if err != nil { return Template{}, err } } return t, nil } type TemplateOpt func(Template) (Template, error) // MustTemplate panics if the template for Template cannot be compiled. // // Only useful for global or package level initialization of [Template]. func (b Base) MustTemplate(pattern string, opts ...TemplateOpt) Template { res, err := b.Template(pattern, opts...) if err != nil { panic(err) } return res } // WithPublic provides templating for the user facing error message based // on only the fields available in TemplateData.Public. // // Used as a functional option to [Base.Template]. func WithPublic(pattern string) TemplateOpt { return func(t Template) (Template, error) { var err error t.publicTemplate, err = template.New(t.Base.messageID + "~public").Parse(pattern) return t, err } } // WithPublicFromLog copies over the template for the log message to be // used for the user facing error message. // TemplateData.Error and TemplateData.Private will not be populated // when rendering the public message. // // Used as a functional option to [Base.Template]. func WithPublicFromLog() TemplateOpt { return func(t Template) (Template, error) { t.publicTemplate = t.logTemplate return t, nil } } // Build returns a new [Error] based on the base [Template] and the // provided [TemplateData], wrapping the error in TemplateData.Error. // // Build can fail and return an error that is not of type Error. func (t Template) Build(data TemplateData) error { if t.logTemplate == nil { return fmt.Errorf("cannot initialize error using missing template") } buf := bytes.Buffer{} err := t.logTemplate.Execute(&buf, data) if err != nil { return err } pubBuf := bytes.Buffer{} if t.publicTemplate != nil { err := t.publicTemplate.Execute(&pubBuf, TemplateData{Public: data.Public}) if err != nil { return err } } e := t.Base.Errorf("%s", buf.String()) e.PublicMessage = pubBuf.String() e.PublicPayload = data.Public e.Underlying = data.Error return e } func (t Template) Error() string { return t.Base.Error() }
pkg/util/errutil/template.go
0
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.0006309965392574668, 0.00020594193483702838, 0.00016367198259104043, 0.00017065752763301134, 0.00012276253255549818 ]
{ "id": 5, "code_window": [ " performTimeSeriesQuery(request: MetricRequest, { from, to }: TimeRange): Observable<DataQueryResponse> {\n", " return this.awsRequest(this.dsQueryEndpoint, request).pipe(\n", " map((res) => {\n", " const dataframes: DataFrame[] = toDataQueryResponse({ data: res }).data;\n", " if (!dataframes || dataframes.length <= 0) {\n", " return { data: [] };\n", " }\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " const dataframes: DataFrame[] = toDataQueryResponse(res).data;\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchMetricsQueryRunner.ts", "type": "replace", "edit_start_line_idx": 119 }
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11,7H10V6A1,1,0,0,0,8,6V7H7A1,1,0,0,0,7,9H8v1a1,1,0,0,0,2,0V9h1a1,1,0,0,0,0-2Zm2,11h4a1,1,0,0,0,0-2H13a1,1,0,0,0,0,2ZM19,2H5A3,3,0,0,0,2,5V19a3,3,0,0,0,3,3H19a3,3,0,0,0,3-3V5A3,3,0,0,0,19,2ZM4,18.59V5A1,1,0,0,1,5,4H18.59ZM20,19a1,1,0,0,1-1,1H5.41L20,5.41Z"/></svg>
public/img/icons/unicons/exposure-increase.svg
0
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.00017381673387717456, 0.00017381673387717456, 0.00017381673387717456, 0.00017381673387717456, 0 ]
{ "id": 6, "code_window": [ " if (!dataframes || dataframes.length <= 0) {\n", " return { data: [] };\n", " }\n", "\n", " const lastError = findLast(res.results, (v) => !!v.error);\n", "\n", " dataframes.forEach((frame) => {\n", " frame.fields.forEach((field) => {\n", " if (field.type === FieldType.time) {\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " const lastError = findLast(res.data.results, (v) => !!v.error);\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchMetricsQueryRunner.ts", "type": "replace", "edit_start_line_idx": 124 }
import Prism, { Grammar } from 'prismjs'; import { lastValueFrom } from 'rxjs'; import { AbsoluteTimeRange, HistoryItem, LanguageProvider } from '@grafana/data'; import { CompletionItemGroup, SearchFunctionType, Token, TypeaheadInput, TypeaheadOutput } from '@grafana/ui'; import { getTemplateSrv } from 'app/features/templating/template_srv'; import { CloudWatchDatasource } from '../../datasource'; import { CloudWatchQuery, LogGroup, TSDBResponse } from '../../types'; import { interpolateStringArrayUsingSingleOrMultiValuedVariable } from '../../utils/templateVariableUtils'; import syntax, { AGGREGATION_FUNCTIONS_STATS, BOOLEAN_FUNCTIONS, DATETIME_FUNCTIONS, FIELD_AND_FILTER_FUNCTIONS, IP_FUNCTIONS, NUMERIC_OPERATORS, QUERY_COMMANDS, STRING_FUNCTIONS, } from './syntax'; export type CloudWatchHistoryItem = HistoryItem<CloudWatchQuery>; type TypeaheadContext = { history?: CloudWatchHistoryItem[]; absoluteRange?: AbsoluteTimeRange; logGroups?: LogGroup[]; region: string; }; export class CloudWatchLogsLanguageProvider extends LanguageProvider { started = false; declare initialRange: AbsoluteTimeRange; datasource: CloudWatchDatasource; constructor(datasource: CloudWatchDatasource, initialValues?: any) { super(); this.datasource = datasource; Object.assign(this, initialValues); } // Strip syntax chars cleanText = (s: string) => s.replace(/[()]/g, '').trim(); getSyntax(): Grammar { return syntax; } request = (url: string, params?: any): Promise<TSDBResponse> => { return lastValueFrom(this.datasource.logsQueryRunner.awsRequest(url, params)); }; start = () => { if (!this.startTask) { this.startTask = Promise.resolve().then(() => { this.started = true; return []; }); } return this.startTask; }; isStatsQuery(query: string): boolean { const grammar = this.getSyntax(); const tokens = Prism.tokenize(query, grammar) ?? []; return !!tokens.find( (token) => typeof token !== 'string' && token.content.toString().toLowerCase() === 'stats' && token.type === 'query-command' ); } /** * Return suggestions based on input that can be then plugged into a typeahead dropdown. * Keep this DOM-free for testing * @param input * @param context Is optional in types but is required in case we are doing getLabelCompletionItems * @param context.absoluteRange Required in case we are doing getLabelCompletionItems * @param context.history Optional used only in getEmptyCompletionItems */ async provideCompletionItems(input: TypeaheadInput, context?: TypeaheadContext): Promise<TypeaheadOutput> { const { value } = input; // Get tokens const tokens = value?.data.get('tokens'); if (!tokens || !tokens.length) { return { suggestions: [] }; } const curToken: Token = tokens.filter( (token: any) => token.offsets.start <= value!.selection?.start?.offset && token.offsets.end >= value!.selection?.start?.offset )[0]; const isFirstToken = !curToken.prev; const prevToken = prevNonWhitespaceToken(curToken); const isCommandStart = isFirstToken || (!isFirstToken && prevToken?.types.includes('command-separator')); if (isCommandStart) { return this.getCommandCompletionItems(); } if (isInsideFunctionParenthesis(curToken)) { return await this.getFieldCompletionItems(context?.logGroups, context?.region || 'default'); } if (isAfterKeyword('by', curToken)) { return this.handleKeyword(context); } if (prevToken?.types.includes('comparison-operator')) { return this.handleComparison(context); } const commandToken = previousCommandToken(curToken); if (commandToken) { return await this.handleCommand(commandToken, curToken, context); } return { suggestions: [], }; } private fetchFields = async (logGroups: LogGroup[], region: string): Promise<string[]> => { const interpolatedLogGroups = interpolateStringArrayUsingSingleOrMultiValuedVariable( getTemplateSrv(), logGroups.map((lg) => lg.name), {}, 'text' ); const results = await Promise.all( interpolatedLogGroups.map((logGroupName) => this.datasource.resources .getLogGroupFields({ logGroupName, region }) .then((fields) => fields.filter((f) => f).map((f) => f.value.name ?? '')) ) ); return results.flat(); }; private handleKeyword = async (context?: TypeaheadContext): Promise<TypeaheadOutput> => { const suggs = await this.getFieldCompletionItems(context?.logGroups, context?.region || 'default'); const functionSuggestions: CompletionItemGroup[] = [ { searchFunctionType: SearchFunctionType.Prefix, label: 'Functions', items: STRING_FUNCTIONS.concat(DATETIME_FUNCTIONS, IP_FUNCTIONS), }, ]; suggs.suggestions.push(...functionSuggestions); return suggs; }; private handleCommand = async ( commandToken: Token, curToken: Token, context?: TypeaheadContext ): Promise<TypeaheadOutput> => { const queryCommand = commandToken.content.toLowerCase(); const prevToken = prevNonWhitespaceToken(curToken); const currentTokenIsFirstArg = prevToken === commandToken; if (queryCommand === 'sort') { return this.handleSortCommand(currentTokenIsFirstArg, curToken, context); } if (queryCommand === 'parse') { if (currentTokenIsFirstArg) { return await this.getFieldCompletionItems(context?.logGroups ?? [], context?.region || 'default'); } } const currentTokenIsAfterCommandAndEmpty = isTokenType(commandToken.next, 'whitespace') && !commandToken.next?.next; const currentTokenIsAfterCommand = currentTokenIsAfterCommandAndEmpty || nextNonWhitespaceToken(commandToken) === curToken; const currentTokenIsComma = isTokenType(curToken, 'punctuation', ','); const currentTokenIsCommaOrAfterComma = currentTokenIsComma || isTokenType(prevToken, 'punctuation', ','); // We only show suggestions if we are after a command or after a comma which is a field separator if (!(currentTokenIsAfterCommand || currentTokenIsCommaOrAfterComma)) { return { suggestions: [] }; } if (['display', 'fields'].includes(queryCommand)) { const typeaheadOutput = await this.getFieldCompletionItems( context?.logGroups ?? [], context?.region || 'default' ); typeaheadOutput.suggestions.push(...this.getFieldAndFilterFunctionCompletionItems().suggestions); return typeaheadOutput; } if (queryCommand === 'stats') { const typeaheadOutput = this.getStatsAggCompletionItems(); if (currentTokenIsComma || currentTokenIsAfterCommandAndEmpty) { typeaheadOutput?.suggestions.forEach((group) => { group.skipFilter = true; }); } return typeaheadOutput; } if (queryCommand === 'filter' && currentTokenIsFirstArg) { const sugg = await this.getFieldCompletionItems(context?.logGroups, context?.region || 'default'); const boolFuncs = this.getBoolFuncCompletionItems(); sugg.suggestions.push(...boolFuncs.suggestions); return sugg; } return { suggestions: [] }; }; private async handleSortCommand( isFirstArgument: boolean, curToken: Token, context?: TypeaheadContext ): Promise<TypeaheadOutput> { if (isFirstArgument) { return await this.getFieldCompletionItems(context?.logGroups, context?.region || 'default'); } else if (isTokenType(prevNonWhitespaceToken(curToken), 'field-name')) { // suggest sort options return { suggestions: [ { searchFunctionType: SearchFunctionType.Prefix, label: 'Sort Order', items: [ { label: 'asc', }, { label: 'desc' }, ], }, ], }; } return { suggestions: [] }; } private handleComparison = async (context?: TypeaheadContext) => { const fieldsSuggestions = await this.getFieldCompletionItems(context?.logGroups, context?.region || 'default'); const comparisonSuggestions = this.getComparisonCompletionItems(); fieldsSuggestions.suggestions.push(...comparisonSuggestions.suggestions); return fieldsSuggestions; }; private getCommandCompletionItems = (): TypeaheadOutput => { return { suggestions: [{ searchFunctionType: SearchFunctionType.Prefix, label: 'Commands', items: QUERY_COMMANDS }], }; }; private getFieldAndFilterFunctionCompletionItems = (): TypeaheadOutput => { return { suggestions: [ { searchFunctionType: SearchFunctionType.Prefix, label: 'Functions', items: FIELD_AND_FILTER_FUNCTIONS }, ], }; }; private getStatsAggCompletionItems = (): TypeaheadOutput => { return { suggestions: [ { searchFunctionType: SearchFunctionType.Prefix, label: 'Functions', items: AGGREGATION_FUNCTIONS_STATS }, ], }; }; private getBoolFuncCompletionItems = (): TypeaheadOutput => { return { suggestions: [ { searchFunctionType: SearchFunctionType.Prefix, label: 'Functions', items: BOOLEAN_FUNCTIONS, }, ], }; }; private getComparisonCompletionItems = (): TypeaheadOutput => { return { suggestions: [ { searchFunctionType: SearchFunctionType.Prefix, label: 'Functions', items: NUMERIC_OPERATORS.concat(BOOLEAN_FUNCTIONS), }, ], }; }; private getFieldCompletionItems = async ( logGroups: LogGroup[] | undefined, region: string ): Promise<TypeaheadOutput> => { if (!logGroups) { return { suggestions: [] }; } const fields = await this.fetchFields(logGroups, region); return { suggestions: [ { label: 'Fields', items: fields.map((field) => ({ label: field, insertText: field.match(/@?[_a-zA-Z]+[_.0-9a-zA-Z]*/) ? undefined : `\`${field}\``, })), }, ], }; }; } function nextNonWhitespaceToken(token: Token): Token | null { let curToken = token; while (curToken.next) { if (curToken.next.types.includes('whitespace')) { curToken = curToken.next; } else { return curToken.next; } } return null; } function prevNonWhitespaceToken(token: Token): Token | null { let curToken = token; while (curToken.prev) { if (isTokenType(curToken.prev, 'whitespace')) { curToken = curToken.prev; } else { return curToken.prev; } } return null; } function previousCommandToken(startToken: Token): Token | null { let thisToken = startToken; while (!!thisToken.prev) { thisToken = thisToken.prev; if ( thisToken.types.includes('query-command') && (!thisToken.prev || isTokenType(prevNonWhitespaceToken(thisToken), 'command-separator')) ) { return thisToken; } } return null; } const funcsWithFieldArgs = [ 'avg', 'count', 'count_distinct', 'earliest', 'latest', 'sortsFirst', 'sortsLast', 'max', 'min', 'pct', 'stddev', 'ispresent', 'fromMillis', 'toMillis', 'isempty', 'isblank', 'isValidIp', 'isValidIpV4', 'isValidIpV6', 'isIpInSubnet', 'isIpv4InSubnet', 'isIpv6InSubnet', ].map((funcName) => funcName.toLowerCase()); /** * Returns true if cursor is currently inside a function parenthesis for example `count(|)` or `count(@mess|)` should * return true. */ function isInsideFunctionParenthesis(curToken: Token): boolean { const prevToken = prevNonWhitespaceToken(curToken); if (!prevToken) { return false; } const parenthesisToken = curToken.content === '(' ? curToken : prevToken.content === '(' ? prevToken : undefined; if (parenthesisToken) { const maybeFunctionToken = prevNonWhitespaceToken(parenthesisToken); if (maybeFunctionToken) { return ( funcsWithFieldArgs.includes(maybeFunctionToken.content.toLowerCase()) && maybeFunctionToken.types.includes('function') ); } } return false; } function isAfterKeyword(keyword: string, token: Token): boolean { const maybeKeyword = getPreviousTokenExcluding(token, [ 'whitespace', 'function', 'punctuation', 'field-name', 'number', ]); if (isTokenType(maybeKeyword, 'keyword', 'by')) { const prev = getPreviousTokenExcluding(token, ['whitespace']); if (prev === maybeKeyword || isTokenType(prev, 'punctuation', ',')) { return true; } } return false; } function isTokenType(token: Token | undefined | null, type: string, content?: string): boolean { if (!token?.types.includes(type)) { return false; } if (content) { if (token?.content.toLowerCase() !== content) { return false; } } return true; } type TokenDef = string | { type: string; value: string }; function getPreviousTokenExcluding(token: Token, exclude: TokenDef[]): Token | undefined | null { let curToken = token.prev; main: while (curToken) { for (const item of exclude) { if (typeof item === 'string') { if (curToken.types.includes(item)) { curToken = curToken.prev; continue main; } } else { if (curToken.types.includes(item.type) && curToken.content.toLowerCase() === item.value) { curToken = curToken.prev; continue main; } } } break; } return curToken; }
public/app/plugins/datasource/cloudwatch/language/cloudwatch-logs/CloudWatchLogsLanguageProvider.ts
1
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.00017633153765928, 0.00017168356862384826, 0.0001630353945074603, 0.0001728088391246274, 0.0000031981783195078606 ]
{ "id": 6, "code_window": [ " if (!dataframes || dataframes.length <= 0) {\n", " return { data: [] };\n", " }\n", "\n", " const lastError = findLast(res.results, (v) => !!v.error);\n", "\n", " dataframes.forEach((frame) => {\n", " frame.fields.forEach((field) => {\n", " if (field.type === FieldType.time) {\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " const lastError = findLast(res.data.results, (v) => !!v.error);\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchMetricsQueryRunner.ts", "type": "replace", "edit_start_line_idx": 124 }
package metrics import ( "runtime" "github.com/prometheus/client_golang/prometheus" "github.com/grafana/grafana/pkg/infra/metrics/metricutil" pubdash "github.com/grafana/grafana/pkg/services/publicdashboards/models" "github.com/grafana/grafana/pkg/setting" ) // ExporterName is used as namespace for exposing prometheus metrics const ExporterName = "grafana" var ( // MInstanceStart is a metric counter for started instances MInstanceStart prometheus.Counter // MPageStatus is a metric page http response status MPageStatus *prometheus.CounterVec // MApiStatus is a metric api http response status MApiStatus *prometheus.CounterVec // MProxyStatus is a metric proxy http response status MProxyStatus *prometheus.CounterVec // MApiUserSignUpStarted is a metric amount of users who started the signup flow MApiUserSignUpStarted prometheus.Counter // MApiUserSignUpCompleted is a metric amount of users who completed the signup flow MApiUserSignUpCompleted prometheus.Counter // MApiUserSignUpInvite is a metric amount of users who have been invited MApiUserSignUpInvite prometheus.Counter // MApiDashboardSave is a metric summary for dashboard save duration MApiDashboardSave prometheus.Summary // MApiDashboardGet is a metric summary for dashboard get duration MApiDashboardGet prometheus.Summary // MApiDashboardSearch is a metric summary for dashboard search duration MApiDashboardSearch prometheus.Summary // MApiAdminUserCreate is a metric api admin user created counter MApiAdminUserCreate prometheus.Counter // MApiLoginPost is a metric api login post counter MApiLoginPost prometheus.Counter // MApiLoginOAuth is a metric api login oauth counter MApiLoginOAuth prometheus.Counter // MApiLoginSAML is a metric api login SAML counter MApiLoginSAML prometheus.Counter // MApiOrgCreate is a metric api org created counter MApiOrgCreate prometheus.Counter // MApiDashboardSnapshotCreate is a metric dashboard snapshots created MApiDashboardSnapshotCreate prometheus.Counter // MApiDashboardSnapshotExternal is a metric external dashboard snapshots created MApiDashboardSnapshotExternal prometheus.Counter // MApiDashboardSnapshotGet is a metric loaded dashboards MApiDashboardSnapshotGet prometheus.Counter // MApiDashboardInsert is a metric dashboards inserted MApiDashboardInsert prometheus.Counter // MAlertingResultState is a metric alert execution result counter MAlertingResultState *prometheus.CounterVec // MAlertingNotificationSent is a metric counter for how many alert notifications been sent MAlertingNotificationSent *prometheus.CounterVec // MAlertingNotificationSent is a metric counter for how many alert notifications that failed MAlertingNotificationFailed *prometheus.CounterVec // MAwsCloudWatchGetMetricStatistics is a metric counter for getting metric statistics from aws MAwsCloudWatchGetMetricStatistics prometheus.Counter // MAwsCloudWatchListMetrics is a metric counter for getting list of metrics from aws MAwsCloudWatchListMetrics prometheus.Counter // MAwsCloudWatchGetMetricData is a metric counter for getting metric data time series from aws MAwsCloudWatchGetMetricData prometheus.Counter // MDBDataSourceQueryByID is a metric counter for getting datasource by id MDBDataSourceQueryByID prometheus.Counter // LDAPUsersSyncExecutionTime is a metric summary for LDAP users sync execution duration LDAPUsersSyncExecutionTime prometheus.Summary // MRenderingRequestTotal is a metric counter for image rendering requests MRenderingRequestTotal *prometheus.CounterVec // MRenderingQueue is a metric gauge for image rendering queue size MRenderingQueue prometheus.Gauge // MAccessEvaluationCount is a metric gauge for total number of evaluation requests MAccessEvaluationCount prometheus.Counter // MPublicDashboardRequestCount is a metric counter for public dashboards requests MPublicDashboardRequestCount prometheus.Counter // MPublicDashboardDatasourceQuerySuccess is a metric counter for successful queries labelled by datasource MPublicDashboardDatasourceQuerySuccess *prometheus.CounterVec ) // Timers var ( // MDataSourceProxyReqTimer is a metric summary for dataproxy request duration MDataSourceProxyReqTimer prometheus.Summary // MAlertingExecutionTime is a metric summary of alert execution duration MAlertingExecutionTime prometheus.Summary // MRenderingSummary is a metric summary for image rendering request duration MRenderingSummary *prometheus.SummaryVec // MAccessPermissionsSummary is a metric summary for loading permissions request duration when evaluating access MAccessPermissionsSummary prometheus.Histogram // MAccessEvaluationsSummary is a metric summary for loading permissions request duration when evaluating access MAccessEvaluationsSummary prometheus.Histogram ) // StatTotals var ( // MAlertingActiveAlerts is a metric amount of active alerts MAlertingActiveAlerts prometheus.Gauge // MStatTotalDashboards is a metric total amount of dashboards MStatTotalDashboards prometheus.Gauge // MStatTotalFolders is a metric total amount of folders MStatTotalFolders prometheus.Gauge // MStatTotalUsers is a metric total amount of users MStatTotalUsers prometheus.Gauge // MStatTotalTeams is a metric total amount of teams MStatTotalTeams prometheus.Gauge // MStatActiveUsers is a metric number of active users MStatActiveUsers prometheus.Gauge // MStatTotalOrgs is a metric total amount of orgs MStatTotalOrgs prometheus.Gauge // MStatTotalPlaylists is a metric total amount of playlists MStatTotalPlaylists prometheus.Gauge // StatsTotalViewers is a metric total amount of viewers StatsTotalViewers prometheus.Gauge // StatsTotalEditors is a metric total amount of editors StatsTotalEditors prometheus.Gauge // StatsTotalAdmins is a metric total amount of admins StatsTotalAdmins prometheus.Gauge // StatsTotalActiveViewers is a metric total amount of viewers StatsTotalActiveViewers prometheus.Gauge // StatsTotalActiveEditors is a metric total amount of active editors StatsTotalActiveEditors prometheus.Gauge // StatsTotalActiveAdmins is a metric total amount of active admins StatsTotalActiveAdmins prometheus.Gauge // StatsTotalDataSources is a metric total number of defined datasources, labeled by pluginId StatsTotalDataSources *prometheus.GaugeVec // StatsTotalAnnotations is a metric of total number of annotations stored in Grafana. StatsTotalAnnotations prometheus.Gauge // StatsTotalAlertRules is a metric of total number of alert rules stored in Grafana. StatsTotalAlertRules prometheus.Gauge // StatsTotalDashboardVersions is a metric of total number of dashboard versions stored in Grafana. StatsTotalDashboardVersions prometheus.Gauge grafanaPluginBuildInfoDesc *prometheus.GaugeVec // StatsTotalLibraryPanels is a metric of total number of library panels stored in Grafana. StatsTotalLibraryPanels prometheus.Gauge // StatsTotalLibraryVariables is a metric of total number of library variables stored in Grafana. StatsTotalLibraryVariables prometheus.Gauge // StatsTotalDataKeys is a metric of total number of data keys stored in Grafana. StatsTotalDataKeys *prometheus.GaugeVec // MStatTotalPublicDashboards is a metric total amount of public dashboards MStatTotalPublicDashboards prometheus.Gauge ) func init() { httpStatusCodes := []string{"200", "404", "500", "unknown"} objectiveMap := map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001} MInstanceStart = prometheus.NewCounter(prometheus.CounterOpts{ Name: "instance_start_total", Help: "counter for started instances", Namespace: ExporterName, }) MPageStatus = metricutil.NewCounterVecStartingAtZero( prometheus.CounterOpts{ Name: "page_response_status_total", Help: "page http response status", Namespace: ExporterName, }, []string{"code"}, map[string][]string{"code": httpStatusCodes}) MApiStatus = metricutil.NewCounterVecStartingAtZero( prometheus.CounterOpts{ Name: "api_response_status_total", Help: "api http response status", Namespace: ExporterName, }, []string{"code"}, map[string][]string{"code": httpStatusCodes}) MProxyStatus = metricutil.NewCounterVecStartingAtZero( prometheus.CounterOpts{ Name: "proxy_response_status_total", Help: "proxy http response status", Namespace: ExporterName, }, []string{"code"}, map[string][]string{"code": httpStatusCodes}) MApiUserSignUpStarted = metricutil.NewCounterStartingAtZero(prometheus.CounterOpts{ Name: "api_user_signup_started_total", Help: "amount of users who started the signup flow", Namespace: ExporterName, }) MApiUserSignUpCompleted = metricutil.NewCounterStartingAtZero(prometheus.CounterOpts{ Name: "api_user_signup_completed_total", Help: "amount of users who completed the signup flow", Namespace: ExporterName, }) MApiUserSignUpInvite = metricutil.NewCounterStartingAtZero(prometheus.CounterOpts{ Name: "api_user_signup_invite_total", Help: "amount of users who have been invited", Namespace: ExporterName, }) MApiDashboardSave = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "api_dashboard_save_milliseconds", Help: "summary for dashboard save duration", Objectives: objectiveMap, Namespace: ExporterName, }) MApiDashboardGet = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "api_dashboard_get_milliseconds", Help: "summary for dashboard get duration", Objectives: objectiveMap, Namespace: ExporterName, }) MApiDashboardSearch = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "api_dashboard_search_milliseconds", Help: "summary for dashboard search duration", Objectives: objectiveMap, Namespace: ExporterName, }) MApiAdminUserCreate = metricutil.NewCounterStartingAtZero(prometheus.CounterOpts{ Name: "api_admin_user_created_total", Help: "api admin user created counter", Namespace: ExporterName, }) MApiLoginPost = metricutil.NewCounterStartingAtZero(prometheus.CounterOpts{ Name: "api_login_post_total", Help: "api login post counter", Namespace: ExporterName, }) MApiLoginOAuth = metricutil.NewCounterStartingAtZero(prometheus.CounterOpts{ Name: "api_login_oauth_total", Help: "api login oauth counter", Namespace: ExporterName, }) MApiLoginSAML = metricutil.NewCounterStartingAtZero(prometheus.CounterOpts{ Name: "api_login_saml_total", Help: "api login saml counter", Namespace: ExporterName, }) MApiOrgCreate = metricutil.NewCounterStartingAtZero(prometheus.CounterOpts{ Name: "api_org_create_total", Help: "api org created counter", Namespace: ExporterName, }) MApiDashboardSnapshotCreate = metricutil.NewCounterStartingAtZero(prometheus.CounterOpts{ Name: "api_dashboard_snapshot_create_total", Help: "dashboard snapshots created", Namespace: ExporterName, }) MApiDashboardSnapshotExternal = metricutil.NewCounterStartingAtZero(prometheus.CounterOpts{ Name: "api_dashboard_snapshot_external_total", Help: "external dashboard snapshots created", Namespace: ExporterName, }) MApiDashboardSnapshotGet = metricutil.NewCounterStartingAtZero(prometheus.CounterOpts{ Name: "api_dashboard_snapshot_get_total", Help: "loaded dashboards", Namespace: ExporterName, }) MApiDashboardInsert = metricutil.NewCounterStartingAtZero(prometheus.CounterOpts{ Name: "api_models_dashboard_insert_total", Help: "dashboards inserted ", Namespace: ExporterName, }) MAlertingResultState = prometheus.NewCounterVec(prometheus.CounterOpts{ Name: "alerting_result_total", Help: "alert execution result counter", Namespace: ExporterName, }, []string{"state"}) MAlertingNotificationSent = prometheus.NewCounterVec(prometheus.CounterOpts{ Name: "alerting_notification_sent_total", Help: "counter for how many alert notifications have been sent", Namespace: ExporterName, }, []string{"type"}) MAlertingNotificationFailed = prometheus.NewCounterVec(prometheus.CounterOpts{ Name: "alerting_notification_failed_total", Help: "counter for how many alert notifications have failed", Namespace: ExporterName, }, []string{"type"}) MAwsCloudWatchGetMetricStatistics = metricutil.NewCounterStartingAtZero(prometheus.CounterOpts{ Name: "aws_cloudwatch_get_metric_statistics_total", Help: "counter for getting metric statistics from aws", Namespace: ExporterName, }) MAwsCloudWatchListMetrics = metricutil.NewCounterStartingAtZero(prometheus.CounterOpts{ Name: "aws_cloudwatch_list_metrics_total", Help: "counter for getting list of metrics from aws", Namespace: ExporterName, }) MAwsCloudWatchGetMetricData = metricutil.NewCounterStartingAtZero(prometheus.CounterOpts{ Name: "aws_cloudwatch_get_metric_data_total", Help: "counter for getting metric data time series from aws", Namespace: ExporterName, }) MDBDataSourceQueryByID = metricutil.NewCounterStartingAtZero(prometheus.CounterOpts{ Name: "db_datasource_query_by_id_total", Help: "counter for getting datasource by id", Namespace: ExporterName, }) LDAPUsersSyncExecutionTime = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "ldap_users_sync_execution_time", Help: "summary for LDAP users sync execution duration", Objectives: objectiveMap, Namespace: ExporterName, }) MRenderingRequestTotal = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: "rendering_request_total", Help: "counter for rendering requests", Namespace: ExporterName, }, []string{"status", "type"}, ) MRenderingSummary = prometheus.NewSummaryVec( prometheus.SummaryOpts{ Name: "rendering_request_duration_milliseconds", Help: "summary of rendering request duration", Objectives: objectiveMap, Namespace: ExporterName, }, []string{"status", "type"}, ) MRenderingQueue = prometheus.NewGauge(prometheus.GaugeOpts{ Name: "rendering_queue_size", Help: "size of rendering queue", Namespace: ExporterName, }) MDataSourceProxyReqTimer = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "api_dataproxy_request_all_milliseconds", Help: "summary for dataproxy request duration", Objectives: objectiveMap, Namespace: ExporterName, }) MAlertingExecutionTime = prometheus.NewSummary(prometheus.SummaryOpts{ Name: "alerting_execution_time_milliseconds", Help: "summary of alert execution duration", Objectives: objectiveMap, Namespace: ExporterName, }) MAlertingActiveAlerts = prometheus.NewGauge(prometheus.GaugeOpts{ Name: "alerting_active_alerts", Help: "amount of active alerts", Namespace: ExporterName, }) MPublicDashboardRequestCount = metricutil.NewCounterStartingAtZero(prometheus.CounterOpts{ Name: "public_dashboard_request_count", Help: "counter for public dashboards requests", Namespace: ExporterName, }) MPublicDashboardDatasourceQuerySuccess = metricutil.NewCounterVecStartingAtZero(prometheus.CounterOpts{ Name: "public_dashboard_datasource_query_success", Help: "counter for queries to public dashboard datasources labelled by datasource type and success status success/failed", Namespace: ExporterName, }, []string{"datasource", "status"}, map[string][]string{"status": pubdash.QueryResultStatuses}) MStatTotalDashboards = prometheus.NewGauge(prometheus.GaugeOpts{ Name: "stat_totals_dashboard", Help: "total amount of dashboards", Namespace: ExporterName, }) MStatTotalFolders = prometheus.NewGauge(prometheus.GaugeOpts{ Name: "stat_totals_folder", Help: "total amount of folders", Namespace: ExporterName, }) MStatTotalUsers = prometheus.NewGauge(prometheus.GaugeOpts{ Name: "stat_total_users", Help: "total amount of users", Namespace: ExporterName, }) MStatTotalTeams = prometheus.NewGauge(prometheus.GaugeOpts{ Name: "stat_total_teams", Help: "total amount of teams", Namespace: ExporterName, }) MStatActiveUsers = prometheus.NewGauge(prometheus.GaugeOpts{ Name: "stat_active_users", Help: "number of active users", Namespace: ExporterName, }) MStatTotalOrgs = prometheus.NewGauge(prometheus.GaugeOpts{ Name: "stat_total_orgs", Help: "total amount of orgs", Namespace: ExporterName, }) MStatTotalPlaylists = prometheus.NewGauge(prometheus.GaugeOpts{ Name: "stat_total_playlists", Help: "total amount of playlists", Namespace: ExporterName, }) StatsTotalViewers = prometheus.NewGauge(prometheus.GaugeOpts{ Name: "stat_totals_viewers", Help: "total amount of viewers", Namespace: ExporterName, }) StatsTotalEditors = prometheus.NewGauge(prometheus.GaugeOpts{ Name: "stat_totals_editors", Help: "total amount of editors", Namespace: ExporterName, }) StatsTotalAdmins = prometheus.NewGauge(prometheus.GaugeOpts{ Name: "stat_totals_admins", Help: "total amount of admins", Namespace: ExporterName, }) StatsTotalActiveViewers = prometheus.NewGauge(prometheus.GaugeOpts{ Name: "stat_totals_active_viewers", Help: "total amount of viewers", Namespace: ExporterName, }) StatsTotalActiveEditors = prometheus.NewGauge(prometheus.GaugeOpts{ Name: "stat_totals_active_editors", Help: "total amount of active editors", Namespace: ExporterName, }) StatsTotalActiveAdmins = prometheus.NewGauge(prometheus.GaugeOpts{ Name: "stat_totals_active_admins", Help: "total amount of active admins", Namespace: ExporterName, }) StatsTotalDataSources = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "stat_totals_datasource", Help: "total number of defined datasources, labeled by pluginId", Namespace: ExporterName, }, []string{"plugin_id"}) grafanaPluginBuildInfoDesc = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "plugin_build_info", Help: "A metric with a constant '1' value labeled by pluginId, pluginType and version from which Grafana plugin was built", Namespace: ExporterName, }, []string{"plugin_id", "plugin_type", "version", "signature_status"}) StatsTotalDashboardVersions = prometheus.NewGauge(prometheus.GaugeOpts{ Name: "stat_totals_dashboard_versions", Help: "total amount of dashboard versions in the database", Namespace: ExporterName, }) StatsTotalAnnotations = prometheus.NewGauge(prometheus.GaugeOpts{ Name: "stat_totals_annotations", Help: "total amount of annotations in the database", Namespace: ExporterName, }) StatsTotalAlertRules = prometheus.NewGauge(prometheus.GaugeOpts{ Name: "stat_totals_alert_rules", Help: "total amount of alert rules in the database", Namespace: ExporterName, }) MAccessPermissionsSummary = prometheus.NewHistogram(prometheus.HistogramOpts{ Name: "access_permissions_duration", Help: "Histogram for the runtime of permissions check function.", Buckets: prometheus.ExponentialBuckets(0.00001, 4, 10), }) MAccessEvaluationsSummary = prometheus.NewHistogram(prometheus.HistogramOpts{ Name: "access_evaluation_duration", Help: "Histogram for the runtime of evaluation function.", Buckets: prometheus.ExponentialBuckets(0.00001, 4, 10), }) MAccessEvaluationCount = prometheus.NewCounter(prometheus.CounterOpts{ Name: "access_evaluation_count", Help: "number of evaluation calls", Namespace: ExporterName, }) StatsTotalLibraryPanels = prometheus.NewGauge(prometheus.GaugeOpts{ Name: "stat_totals_library_panels", Help: "total amount of library panels in the database", Namespace: ExporterName, }) StatsTotalLibraryVariables = prometheus.NewGauge(prometheus.GaugeOpts{ Name: "stat_totals_library_variables", Help: "total amount of library variables in the database", Namespace: ExporterName, }) StatsTotalDataKeys = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "stat_totals_data_keys", Help: "total amount of data keys in the database", Namespace: ExporterName, }, []string{"active"}) MStatTotalPublicDashboards = prometheus.NewGauge(prometheus.GaugeOpts{ Name: "stat_totals_public_dashboard", Help: "total amount of public dashboards", Namespace: ExporterName, }) } // SetBuildInformation sets the build information for this binary func SetBuildInformation(version, revision, branch string, buildTimestamp int64) { edition := "oss" if setting.IsEnterprise { edition = "enterprise" } grafanaBuildVersion := prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "build_info", Help: "A metric with a constant '1' value labeled by version, revision, branch, and goversion from which Grafana was built", Namespace: ExporterName, }, []string{"version", "revision", "branch", "goversion", "edition"}) grafanaBuildTimestamp := prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "build_timestamp", Help: "A metric exposing when the binary was built in epoch", Namespace: ExporterName, }, []string{"version", "revision", "branch", "goversion", "edition"}) prometheus.MustRegister(grafanaBuildVersion, grafanaBuildTimestamp) grafanaBuildVersion.WithLabelValues(version, revision, branch, runtime.Version(), edition).Set(1) grafanaBuildTimestamp.WithLabelValues(version, revision, branch, runtime.Version(), edition).Set(float64(buildTimestamp)) } // SetEnvironmentInformation exposes environment values provided by the operators as an `_info` metric. // If there are no environment metrics labels configured, this metric will not be exposed. func SetEnvironmentInformation(labels map[string]string) error { if len(labels) == 0 { return nil } grafanaEnvironmentInfo := prometheus.NewGauge(prometheus.GaugeOpts{ Name: "environment_info", Help: "A metric with a constant '1' value labeled by environment information about the running instance.", Namespace: ExporterName, ConstLabels: labels, }) prometheus.MustRegister(grafanaEnvironmentInfo) grafanaEnvironmentInfo.Set(1) return nil } func SetPluginBuildInformation(pluginID, pluginType, version, signatureStatus string) { grafanaPluginBuildInfoDesc.WithLabelValues(pluginID, pluginType, version, signatureStatus).Set(1) } func initMetricVars() { prometheus.MustRegister( MInstanceStart, MPageStatus, MApiStatus, MProxyStatus, MApiUserSignUpStarted, MApiUserSignUpCompleted, MApiUserSignUpInvite, MApiDashboardSave, MApiDashboardGet, MApiDashboardSearch, MDataSourceProxyReqTimer, MAlertingExecutionTime, MApiAdminUserCreate, MApiLoginPost, MApiLoginOAuth, MApiLoginSAML, MApiOrgCreate, MApiDashboardSnapshotCreate, MApiDashboardSnapshotExternal, MApiDashboardSnapshotGet, MApiDashboardInsert, MAlertingResultState, MAlertingNotificationSent, MAlertingNotificationFailed, MAwsCloudWatchGetMetricStatistics, MAwsCloudWatchListMetrics, MAwsCloudWatchGetMetricData, MDBDataSourceQueryByID, LDAPUsersSyncExecutionTime, MRenderingRequestTotal, MRenderingSummary, MRenderingQueue, MAccessPermissionsSummary, MAccessEvaluationsSummary, MAlertingActiveAlerts, MStatTotalDashboards, MStatTotalFolders, MStatTotalUsers, MStatTotalTeams, MStatActiveUsers, MStatTotalOrgs, MStatTotalPlaylists, StatsTotalViewers, StatsTotalEditors, StatsTotalAdmins, StatsTotalActiveViewers, StatsTotalActiveEditors, StatsTotalActiveAdmins, StatsTotalDataSources, grafanaPluginBuildInfoDesc, StatsTotalDashboardVersions, StatsTotalAnnotations, MAccessEvaluationCount, StatsTotalLibraryPanels, StatsTotalLibraryVariables, StatsTotalDataKeys, MStatTotalPublicDashboards, MPublicDashboardRequestCount, MPublicDashboardDatasourceQuerySuccess, ) }
pkg/infra/metrics/metrics.go
0
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.00017728439706843346, 0.00017198940622620285, 0.00016304828750435263, 0.00017245582421310246, 0.0000029638306386914337 ]
{ "id": 6, "code_window": [ " if (!dataframes || dataframes.length <= 0) {\n", " return { data: [] };\n", " }\n", "\n", " const lastError = findLast(res.results, (v) => !!v.error);\n", "\n", " dataframes.forEach((frame) => {\n", " frame.fields.forEach((field) => {\n", " if (field.type === FieldType.time) {\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " const lastError = findLast(res.data.results, (v) => !!v.error);\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchMetricsQueryRunner.ts", "type": "replace", "edit_start_line_idx": 124 }
--- title: View org list as server admin --- {{< docs/list >}} {{< docs/shared "manage-users/view-server-org-list.md" >}} 1. Click the name of the organization that you want to edit. {{< /docs/list >}}
docs/sources/shared/manage-users/view-server-org-list-and-edit.md
0
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.00017397888586856425, 0.0001726210757624358, 0.00017126328020822257, 0.0001726210757624358, 0.00000135780283017084 ]
{ "id": 6, "code_window": [ " if (!dataframes || dataframes.length <= 0) {\n", " return { data: [] };\n", " }\n", "\n", " const lastError = findLast(res.results, (v) => !!v.error);\n", "\n", " dataframes.forEach((frame) => {\n", " frame.fields.forEach((field) => {\n", " if (field.type === FieldType.time) {\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " const lastError = findLast(res.data.results, (v) => !!v.error);\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchMetricsQueryRunner.ts", "type": "replace", "edit_start_line_idx": 124 }
import { getProperty } from './feed'; import { Feed } from './types'; export function parseAtomFeed(txt: string): Feed { const domParser = new DOMParser(); const doc = domParser.parseFromString(txt, 'text/xml'); const feed: Feed = { items: Array.from(doc.querySelectorAll('entry')).map((node) => ({ title: getProperty(node, 'title'), link: node.querySelector('link')?.getAttribute('href') ?? '', content: getProperty(node, 'content'), pubDate: getProperty(node, 'published'), ogImage: node.querySelector("meta[property='og:image']")?.getAttribute('content'), })), }; return feed; }
public/app/plugins/panel/news/atom.ts
0
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.00017629505600780249, 0.00017523264978080988, 0.0001741702581057325, 0.00017523264978080988, 0.000001062398951034993 ]
{ "id": 7, "code_window": [ "import { Observable, map } from 'rxjs';\n", "\n", "import { DataSourceInstanceSettings, DataSourceRef, getDataSourceRef, ScopedVars } from '@grafana/data';\n" ], "labels": [ "replace", "keep", "keep" ], "after_edit": [ "import { Observable } from 'rxjs';\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchRequest.ts", "type": "replace", "edit_start_line_idx": 0 }
import { Observable, map } from 'rxjs'; import { DataSourceInstanceSettings, DataSourceRef, getDataSourceRef, ScopedVars } from '@grafana/data'; import { getBackendSrv } from '@grafana/runtime'; import { notifyApp } from 'app/core/actions'; import { createErrorNotification } from 'app/core/copy/appNotification'; import { TemplateSrv } from 'app/features/templating/template_srv'; import { store } from 'app/store/store'; import { AppNotificationTimeout } from 'app/types'; import memoizedDebounce from '../memoizedDebounce'; import { CloudWatchJsonData, Dimensions, MetricRequest, MultiFilters, TSDBResponse } from '../types'; export abstract class CloudWatchRequest { templateSrv: TemplateSrv; ref: DataSourceRef; dsQueryEndpoint = '/api/ds/query'; debouncedCustomAlert: (title: string, message: string) => void = memoizedDebounce( displayCustomError, AppNotificationTimeout.Error ); constructor(public instanceSettings: DataSourceInstanceSettings<CloudWatchJsonData>, templateSrv: TemplateSrv) { this.templateSrv = templateSrv; this.ref = getDataSourceRef(instanceSettings); } awsRequest(url: string, data: MetricRequest, headers: Record<string, string> = {}): Observable<TSDBResponse> { const options = { method: 'POST', url, data, headers, }; return getBackendSrv() .fetch<TSDBResponse>(options) .pipe(map((result) => result.data)); } convertDimensionFormat(dimensions: Dimensions, scopedVars: ScopedVars): Dimensions { return Object.entries(dimensions).reduce((result, [key, value]) => { key = this.replaceVariableAndDisplayWarningIfMulti(key, scopedVars, true, 'dimension keys'); if (Array.isArray(value)) { return { ...result, [key]: value }; } if (!value) { return { ...result, [key]: null }; } const newValues = this.expandVariableToArray(value, scopedVars); return { ...result, [key]: newValues }; }, {}); } // get the value for a given template variable expandVariableToArray(value: string, scopedVars: ScopedVars): string[] { const variableName = this.templateSrv.getVariableName(value); const valueVar = this.templateSrv.getVariables().find(({ name }) => { return name === variableName; }); if (variableName && valueVar) { const isMultiVariable = valueVar?.type === 'custom' || valueVar?.type === 'query' || valueVar?.type === 'datasource'; if (isMultiVariable && valueVar.multi) { return this.templateSrv.replace(value, scopedVars, 'pipe').split('|'); } return [this.templateSrv.replace(value, scopedVars)]; } return [value]; } convertMultiFilterFormat(multiFilters: MultiFilters, fieldName?: string) { return Object.entries(multiFilters).reduce((result, [key, values]) => { const interpolatedKey = this.replaceVariableAndDisplayWarningIfMulti(key, {}, true, fieldName); if (!values) { return { ...result, [interpolatedKey]: null }; } const initialVal: string[] = []; const newValues = values.reduce((result, value) => { const vals = this.expandVariableToArray(value, {}); return [...result, ...vals]; }, initialVal); return { ...result, [interpolatedKey]: newValues }; }, {}); } replaceVariableAndDisplayWarningIfMulti( target?: string, scopedVars?: ScopedVars, displayErrorIfIsMultiTemplateVariable?: boolean, fieldName?: string ) { if (displayErrorIfIsMultiTemplateVariable && !!target) { const variables = this.templateSrv.getVariables(); const variable = variables.find(({ name }) => name === this.templateSrv.getVariableName(target)); const isMultiVariable = variable?.type === 'custom' || variable?.type === 'query' || variable?.type === 'datasource'; if (isMultiVariable && variable.multi) { this.debouncedCustomAlert( 'CloudWatch templating error', `Multi template variables are not supported for ${fieldName || target}` ); } } return this.templateSrv.replace(target, scopedVars); } getActualRegion(region?: string) { if (region === 'default' || region === undefined || region === '') { return this.instanceSettings.jsonData.defaultRegion ?? ''; } return region; } getVariables() { return this.templateSrv.getVariables().map((v) => `$${v.name}`); } } const displayCustomError = (title: string, message: string) => store.dispatch(notifyApp(createErrorNotification(title, message)));
public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchRequest.ts
1
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.9573764204978943, 0.07398543506860733, 0.00016438361490145326, 0.00026190225617028773, 0.25501319766044617 ]
{ "id": 7, "code_window": [ "import { Observable, map } from 'rxjs';\n", "\n", "import { DataSourceInstanceSettings, DataSourceRef, getDataSourceRef, ScopedVars } from '@grafana/data';\n" ], "labels": [ "replace", "keep", "keep" ], "after_edit": [ "import { Observable } from 'rxjs';\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchRequest.ts", "type": "replace", "edit_start_line_idx": 0 }
export const createTestOrgIfNotExists = (client) => { let orgId = 0; let res = client.orgs.getByName('k6'); if (res.status === 404) { res = client.orgs.create('k6'); if (res.status !== 200) { throw new Error('Expected 200 response status when creating org'); } return res.json().orgId; } // This can happen e.g. in Hosted Grafana instances, where even admins // cannot see organisations if (res.status !== 200) { console.info(`unable to get orgs from instance, continuing with default orgId ${orgId}`); return orgId; } return res.json().id; }; export const createTestdataDatasourceIfNotExists = (client) => { const payload = { access: 'proxy', isDefault: false, name: 'k6-testdata', type: 'testdata', }; let res = client.datasources.getByName(payload.name); if (res.status === 404) { res = client.datasources.create(payload); } if (res.status !== 200) { throw new Error(`expected 200 response status when creating datasource, got ${res.status}`); } return res.json().id; };
devenv/docker/loadtest/modules/util.js
0
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.00021808063320349902, 0.0001814166025724262, 0.00016885646618902683, 0.00017285216017626226, 0.000018494542018743232 ]
{ "id": 7, "code_window": [ "import { Observable, map } from 'rxjs';\n", "\n", "import { DataSourceInstanceSettings, DataSourceRef, getDataSourceRef, ScopedVars } from '@grafana/data';\n" ], "labels": [ "replace", "keep", "keep" ], "after_edit": [ "import { Observable } from 'rxjs';\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchRequest.ts", "type": "replace", "edit_start_line_idx": 0 }
package api import ( "context" "encoding/json" "fmt" "net/http" "testing" "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "golang.org/x/oauth2" "github.com/grafana/grafana/pkg/api/dtos" "github.com/grafana/grafana/pkg/api/response" "github.com/grafana/grafana/pkg/api/routing" "github.com/grafana/grafana/pkg/components/simplejson" "github.com/grafana/grafana/pkg/infra/db" "github.com/grafana/grafana/pkg/infra/db/dbtest" "github.com/grafana/grafana/pkg/infra/usagestats" acmock "github.com/grafana/grafana/pkg/services/accesscontrol/mock" contextmodel "github.com/grafana/grafana/pkg/services/contexthandler/model" "github.com/grafana/grafana/pkg/services/login" "github.com/grafana/grafana/pkg/services/login/authinfoservice" authinfostore "github.com/grafana/grafana/pkg/services/login/authinfoservice/database" "github.com/grafana/grafana/pkg/services/login/logintest" "github.com/grafana/grafana/pkg/services/org/orgimpl" "github.com/grafana/grafana/pkg/services/quota/quotatest" "github.com/grafana/grafana/pkg/services/searchusers" "github.com/grafana/grafana/pkg/services/searchusers/filters" "github.com/grafana/grafana/pkg/services/secrets/database" secretsManager "github.com/grafana/grafana/pkg/services/secrets/manager" "github.com/grafana/grafana/pkg/services/supportbundles/supportbundlestest" "github.com/grafana/grafana/pkg/services/user" "github.com/grafana/grafana/pkg/services/user/userimpl" "github.com/grafana/grafana/pkg/services/user/usertest" "github.com/grafana/grafana/pkg/setting" ) func TestUserAPIEndpoint_userLoggedIn(t *testing.T) { settings := setting.NewCfg() sqlStore := db.InitTestDB(t) hs := &HTTPServer{ Cfg: settings, SQLStore: sqlStore, AccessControl: acmock.New(), } mockResult := user.SearchUserQueryResult{ Users: []*user.UserSearchHitDTO{ {Name: "user1"}, {Name: "user2"}, }, TotalCount: 2, } mock := dbtest.NewFakeDB() userMock := usertest.NewUserServiceFake() loggedInUserScenario(t, "When calling GET on", "api/users/1", "api/users/:id", func(sc *scenarioContext) { fakeNow := time.Date(2019, 2, 11, 17, 30, 40, 0, time.UTC) secretsService := secretsManager.SetupTestService(t, database.ProvideSecretsStore(sqlStore)) authInfoStore := authinfostore.ProvideAuthInfoStore(sqlStore, secretsService, userMock) srv := authinfoservice.ProvideAuthInfoService( &authinfoservice.OSSUserProtectionImpl{}, authInfoStore, &usagestats.UsageStatsMock{}, ) hs.authInfoService = srv orgSvc, err := orgimpl.ProvideService(sqlStore, sqlStore.Cfg, quotatest.New(false, nil)) require.NoError(t, err) userSvc, err := userimpl.ProvideService(sqlStore, orgSvc, sc.cfg, nil, nil, quotatest.New(false, nil), supportbundlestest.NewFakeBundleService()) require.NoError(t, err) hs.userService = userSvc createUserCmd := user.CreateUserCommand{ Email: fmt.Sprint("user", "@test.com"), Name: "user", Login: "loginuser", IsAdmin: true, } usr, err := userSvc.Create(context.Background(), &createUserCmd) require.NoError(t, err) sc.handlerFunc = hs.GetUserByID token := &oauth2.Token{ AccessToken: "testaccess", RefreshToken: "testrefresh", Expiry: time.Now(), TokenType: "Bearer", } idToken := "testidtoken" token = token.WithExtra(map[string]interface{}{"id_token": idToken}) userlogin := "loginuser" query := &login.GetUserByAuthInfoQuery{AuthModule: "test", AuthId: "test", UserLookupParams: login.UserLookupParams{Login: &userlogin}} cmd := &login.UpdateAuthInfoCommand{ UserId: usr.ID, AuthId: query.AuthId, AuthModule: query.AuthModule, OAuthToken: token, } err = srv.UpdateAuthInfo(context.Background(), cmd) require.NoError(t, err) avatarUrl := dtos.GetGravatarUrl("@test.com") sc.fakeReqWithParams("GET", sc.url, map[string]string{"id": fmt.Sprintf("%v", usr.ID)}).exec() expected := user.UserProfileDTO{ ID: 1, Email: "[email protected]", Name: "user", Login: "loginuser", OrgID: 1, IsGrafanaAdmin: true, AuthLabels: []string{}, CreatedAt: fakeNow, UpdatedAt: fakeNow, AvatarURL: avatarUrl, } var resp user.UserProfileDTO require.Equal(t, http.StatusOK, sc.resp.Code) err = json.Unmarshal(sc.resp.Body.Bytes(), &resp) require.NoError(t, err) resp.CreatedAt = fakeNow resp.UpdatedAt = fakeNow resp.AvatarURL = avatarUrl require.EqualValues(t, expected, resp) }, mock) loggedInUserScenario(t, "When calling GET on", "/api/users/lookup", "/api/users/lookup", func(sc *scenarioContext) { createUserCmd := user.CreateUserCommand{ Email: fmt.Sprint("admin", "@test.com"), Name: "admin", Login: "admin", IsAdmin: true, } orgSvc, err := orgimpl.ProvideService(sqlStore, sqlStore.Cfg, quotatest.New(false, nil)) require.NoError(t, err) userSvc, err := userimpl.ProvideService(sqlStore, orgSvc, sc.cfg, nil, nil, quotatest.New(false, nil), supportbundlestest.NewFakeBundleService()) require.NoError(t, err) _, err = userSvc.Create(context.Background(), &createUserCmd) require.Nil(t, err) sc.handlerFunc = hs.GetUserByLoginOrEmail userMock := usertest.NewUserServiceFake() userMock.ExpectedUser = &user.User{ID: 2} sc.userService = userMock hs.userService = userMock sc.fakeReqWithParams("GET", sc.url, map[string]string{"loginOrEmail": "[email protected]"}).exec() var resp user.UserProfileDTO require.Equal(t, http.StatusOK, sc.resp.Code) err = json.Unmarshal(sc.resp.Body.Bytes(), &resp) require.NoError(t, err) }, mock) loggedInUserScenario(t, "When calling GET on", "/api/users", "/api/users", func(sc *scenarioContext) { userMock.ExpectedSearchUsers = mockResult searchUsersService := searchusers.ProvideUsersService(filters.ProvideOSSSearchUserFilter(), userMock) sc.handlerFunc = searchUsersService.SearchUsers sc.fakeReqWithParams("GET", sc.url, map[string]string{}).exec() respJSON, err := simplejson.NewJson(sc.resp.Body.Bytes()) require.NoError(t, err) assert.Equal(t, 2, len(respJSON.MustArray())) }, mock) loggedInUserScenario(t, "When calling GET with page and limit querystring parameters on", "/api/users", "/api/users", func(sc *scenarioContext) { userMock.ExpectedSearchUsers = mockResult searchUsersService := searchusers.ProvideUsersService(filters.ProvideOSSSearchUserFilter(), userMock) sc.handlerFunc = searchUsersService.SearchUsers sc.fakeReqWithParams("GET", sc.url, map[string]string{"perpage": "10", "page": "2"}).exec() respJSON, err := simplejson.NewJson(sc.resp.Body.Bytes()) require.NoError(t, err) assert.Equal(t, 2, len(respJSON.MustArray())) }, mock) loggedInUserScenario(t, "When calling GET on", "/api/users/search", "/api/users/search", func(sc *scenarioContext) { userMock.ExpectedSearchUsers = mockResult searchUsersService := searchusers.ProvideUsersService(filters.ProvideOSSSearchUserFilter(), userMock) sc.handlerFunc = searchUsersService.SearchUsersWithPaging sc.fakeReqWithParams("GET", sc.url, map[string]string{}).exec() respJSON, err := simplejson.NewJson(sc.resp.Body.Bytes()) require.NoError(t, err) assert.Equal(t, 1, respJSON.Get("page").MustInt()) assert.Equal(t, 1000, respJSON.Get("perPage").MustInt()) assert.Equal(t, 2, respJSON.Get("totalCount").MustInt()) assert.Equal(t, 2, len(respJSON.Get("users").MustArray())) }, mock) loggedInUserScenario(t, "When calling GET with page and perpage querystring parameters on", "/api/users/search", "/api/users/search", func(sc *scenarioContext) { userMock.ExpectedSearchUsers = mockResult searchUsersService := searchusers.ProvideUsersService(filters.ProvideOSSSearchUserFilter(), userMock) sc.handlerFunc = searchUsersService.SearchUsersWithPaging sc.fakeReqWithParams("GET", sc.url, map[string]string{"perpage": "10", "page": "2"}).exec() respJSON, err := simplejson.NewJson(sc.resp.Body.Bytes()) require.NoError(t, err) assert.Equal(t, 2, respJSON.Get("page").MustInt()) assert.Equal(t, 10, respJSON.Get("perPage").MustInt()) }, mock) } func TestHTTPServer_UpdateUser(t *testing.T) { settings := setting.NewCfg() sqlStore := db.InitTestDB(t) hs := &HTTPServer{ Cfg: settings, SQLStore: sqlStore, AccessControl: acmock.New(), } updateUserCommand := user.UpdateUserCommand{ Email: fmt.Sprint("admin", "@test.com"), Name: "admin", Login: "admin", UserID: 1, } updateUserScenario(t, updateUserContext{ desc: "Should return 403 when the current User is an external user", url: "/api/users/1", routePattern: "/api/users/:id", cmd: updateUserCommand, fn: func(sc *scenarioContext) { sc.authInfoService.ExpectedUserAuth = &login.UserAuth{} sc.fakeReqWithParams("PUT", sc.url, map[string]string{"id": "1"}).exec() assert.Equal(t, 403, sc.resp.Code) }, }, hs) } type updateUserContext struct { desc string url string routePattern string cmd user.UpdateUserCommand fn scenarioFunc } func updateUserScenario(t *testing.T, ctx updateUserContext, hs *HTTPServer) { t.Run(fmt.Sprintf("%s %s", ctx.desc, ctx.url), func(t *testing.T) { sc := setupScenarioContext(t, ctx.url) sc.authInfoService = &logintest.AuthInfoServiceFake{} hs.authInfoService = sc.authInfoService sc.defaultHandler = routing.Wrap(func(c *contextmodel.ReqContext) response.Response { c.Req.Body = mockRequestBody(ctx.cmd) c.Req.Header.Add("Content-Type", "application/json") sc.context = c sc.context.OrgID = testOrgID sc.context.UserID = testUserID return hs.UpdateUser(c) }) sc.m.Put(ctx.routePattern, sc.defaultHandler) ctx.fn(sc) }) } func TestHTTPServer_UpdateSignedInUser(t *testing.T) { settings := setting.NewCfg() sqlStore := db.InitTestDB(t) hs := &HTTPServer{ Cfg: settings, SQLStore: sqlStore, AccessControl: acmock.New(), } updateUserCommand := user.UpdateUserCommand{ Email: fmt.Sprint("admin", "@test.com"), Name: "admin", Login: "admin", UserID: 1, } updateSignedInUserScenario(t, updateUserContext{ desc: "Should return 403 when the current User is an external user", url: "/api/users/", routePattern: "/api/users/", cmd: updateUserCommand, fn: func(sc *scenarioContext) { sc.authInfoService.ExpectedUserAuth = &login.UserAuth{} sc.fakeReqWithParams("PUT", sc.url, map[string]string{"id": "1"}).exec() assert.Equal(t, 403, sc.resp.Code) }, }, hs) } func updateSignedInUserScenario(t *testing.T, ctx updateUserContext, hs *HTTPServer) { t.Run(fmt.Sprintf("%s %s", ctx.desc, ctx.url), func(t *testing.T) { sc := setupScenarioContext(t, ctx.url) sc.authInfoService = &logintest.AuthInfoServiceFake{} hs.authInfoService = sc.authInfoService sc.defaultHandler = routing.Wrap(func(c *contextmodel.ReqContext) response.Response { c.Req.Body = mockRequestBody(ctx.cmd) c.Req.Header.Add("Content-Type", "application/json") sc.context = c sc.context.OrgID = testOrgID sc.context.UserID = testUserID return hs.UpdateSignedInUser(c) }) sc.m.Put(ctx.routePattern, sc.defaultHandler) ctx.fn(sc) }) }
pkg/api/user_test.go
0
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.0002210137463407591, 0.0001721821172395721, 0.00016130598669406027, 0.00016964950191322714, 0.00001111925121222157 ]
{ "id": 7, "code_window": [ "import { Observable, map } from 'rxjs';\n", "\n", "import { DataSourceInstanceSettings, DataSourceRef, getDataSourceRef, ScopedVars } from '@grafana/data';\n" ], "labels": [ "replace", "keep", "keep" ], "after_edit": [ "import { Observable } from 'rxjs';\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchRequest.ts", "type": "replace", "edit_start_line_idx": 0 }
package liveplugin import ( "context" "fmt" "github.com/centrifugal/centrifuge" "github.com/grafana/grafana-plugin-sdk-go/backend" "github.com/grafana/grafana/pkg/services/datasources" "github.com/grafana/grafana/pkg/services/live/orgchannel" "github.com/grafana/grafana/pkg/services/live/pipeline" "github.com/grafana/grafana/pkg/services/pluginsintegration/plugincontext" "github.com/grafana/grafana/pkg/services/user" ) type ChannelLocalPublisher struct { node *centrifuge.Node pipeline *pipeline.Pipeline } func NewChannelLocalPublisher(node *centrifuge.Node, pipeline *pipeline.Pipeline) *ChannelLocalPublisher { return &ChannelLocalPublisher{node: node, pipeline: pipeline} } func (p *ChannelLocalPublisher) PublishLocal(channel string, data []byte) error { if p.pipeline != nil { orgID, channelID, err := orgchannel.StripOrgID(channel) if err != nil { return err } ok, err := p.pipeline.ProcessInput(context.Background(), orgID, channelID, data) if err != nil { return err } if ok { // if rule found – we are done here. If not - fall through and process as usual. return nil } } pub := &centrifuge.Publication{ Data: data, } err := p.node.Hub().BroadcastPublication(channel, pub, centrifuge.StreamPosition{}) if err != nil { return fmt.Errorf("error publishing %s: %w", string(data), err) } return nil } type NumLocalSubscribersGetter struct { node *centrifuge.Node } func NewNumLocalSubscribersGetter(node *centrifuge.Node) *NumLocalSubscribersGetter { return &NumLocalSubscribersGetter{node: node} } func (p *NumLocalSubscribersGetter) GetNumLocalSubscribers(channelID string) (int, error) { return p.node.Hub().NumSubscribers(channelID), nil } type ContextGetter struct { pluginContextProvider *plugincontext.Provider dataSourceCache datasources.CacheService } func NewContextGetter(pluginContextProvider *plugincontext.Provider, dataSourceCache datasources.CacheService) *ContextGetter { return &ContextGetter{ pluginContextProvider: pluginContextProvider, dataSourceCache: dataSourceCache, } } func (g *ContextGetter) GetPluginContext(ctx context.Context, user *user.SignedInUser, pluginID string, datasourceUID string, skipCache bool) (backend.PluginContext, bool, error) { if datasourceUID == "" { return g.pluginContextProvider.Get(ctx, pluginID, user) } ds, err := g.dataSourceCache.GetDatasourceByUID(ctx, datasourceUID, user, skipCache) if err != nil { return backend.PluginContext{}, false, fmt.Errorf("%v: %w", "Failed to get datasource", err) } return g.pluginContextProvider.GetWithDataSource(ctx, pluginID, user, ds) }
pkg/services/live/liveplugin/plugin.go
0
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.00020019950170535594, 0.00017572725482750684, 0.000166817000717856, 0.0001691894285613671, 0.000012118033737351652 ]
{ "id": 8, "code_window": [ "\n", "import { DataSourceInstanceSettings, DataSourceRef, getDataSourceRef, ScopedVars } from '@grafana/data';\n", "import { getBackendSrv } from '@grafana/runtime';\n", "import { notifyApp } from 'app/core/actions';\n", "import { createErrorNotification } from 'app/core/copy/appNotification';\n", "import { TemplateSrv } from 'app/features/templating/template_srv';\n", "import { store } from 'app/store/store';\n" ], "labels": [ "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ "import { BackendDataSourceResponse, FetchResponse, getBackendSrv } from '@grafana/runtime';\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchRequest.ts", "type": "replace", "edit_start_line_idx": 3 }
import { Observable, map } from 'rxjs'; import { DataSourceInstanceSettings, DataSourceRef, getDataSourceRef, ScopedVars } from '@grafana/data'; import { getBackendSrv } from '@grafana/runtime'; import { notifyApp } from 'app/core/actions'; import { createErrorNotification } from 'app/core/copy/appNotification'; import { TemplateSrv } from 'app/features/templating/template_srv'; import { store } from 'app/store/store'; import { AppNotificationTimeout } from 'app/types'; import memoizedDebounce from '../memoizedDebounce'; import { CloudWatchJsonData, Dimensions, MetricRequest, MultiFilters, TSDBResponse } from '../types'; export abstract class CloudWatchRequest { templateSrv: TemplateSrv; ref: DataSourceRef; dsQueryEndpoint = '/api/ds/query'; debouncedCustomAlert: (title: string, message: string) => void = memoizedDebounce( displayCustomError, AppNotificationTimeout.Error ); constructor(public instanceSettings: DataSourceInstanceSettings<CloudWatchJsonData>, templateSrv: TemplateSrv) { this.templateSrv = templateSrv; this.ref = getDataSourceRef(instanceSettings); } awsRequest(url: string, data: MetricRequest, headers: Record<string, string> = {}): Observable<TSDBResponse> { const options = { method: 'POST', url, data, headers, }; return getBackendSrv() .fetch<TSDBResponse>(options) .pipe(map((result) => result.data)); } convertDimensionFormat(dimensions: Dimensions, scopedVars: ScopedVars): Dimensions { return Object.entries(dimensions).reduce((result, [key, value]) => { key = this.replaceVariableAndDisplayWarningIfMulti(key, scopedVars, true, 'dimension keys'); if (Array.isArray(value)) { return { ...result, [key]: value }; } if (!value) { return { ...result, [key]: null }; } const newValues = this.expandVariableToArray(value, scopedVars); return { ...result, [key]: newValues }; }, {}); } // get the value for a given template variable expandVariableToArray(value: string, scopedVars: ScopedVars): string[] { const variableName = this.templateSrv.getVariableName(value); const valueVar = this.templateSrv.getVariables().find(({ name }) => { return name === variableName; }); if (variableName && valueVar) { const isMultiVariable = valueVar?.type === 'custom' || valueVar?.type === 'query' || valueVar?.type === 'datasource'; if (isMultiVariable && valueVar.multi) { return this.templateSrv.replace(value, scopedVars, 'pipe').split('|'); } return [this.templateSrv.replace(value, scopedVars)]; } return [value]; } convertMultiFilterFormat(multiFilters: MultiFilters, fieldName?: string) { return Object.entries(multiFilters).reduce((result, [key, values]) => { const interpolatedKey = this.replaceVariableAndDisplayWarningIfMulti(key, {}, true, fieldName); if (!values) { return { ...result, [interpolatedKey]: null }; } const initialVal: string[] = []; const newValues = values.reduce((result, value) => { const vals = this.expandVariableToArray(value, {}); return [...result, ...vals]; }, initialVal); return { ...result, [interpolatedKey]: newValues }; }, {}); } replaceVariableAndDisplayWarningIfMulti( target?: string, scopedVars?: ScopedVars, displayErrorIfIsMultiTemplateVariable?: boolean, fieldName?: string ) { if (displayErrorIfIsMultiTemplateVariable && !!target) { const variables = this.templateSrv.getVariables(); const variable = variables.find(({ name }) => name === this.templateSrv.getVariableName(target)); const isMultiVariable = variable?.type === 'custom' || variable?.type === 'query' || variable?.type === 'datasource'; if (isMultiVariable && variable.multi) { this.debouncedCustomAlert( 'CloudWatch templating error', `Multi template variables are not supported for ${fieldName || target}` ); } } return this.templateSrv.replace(target, scopedVars); } getActualRegion(region?: string) { if (region === 'default' || region === undefined || region === '') { return this.instanceSettings.jsonData.defaultRegion ?? ''; } return region; } getVariables() { return this.templateSrv.getVariables().map((v) => `$${v.name}`); } } const displayCustomError = (title: string, message: string) => store.dispatch(notifyApp(createErrorNotification(title, message)));
public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchRequest.ts
1
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.8949090242385864, 0.06960755586624146, 0.00017399780335836112, 0.000557596969883889, 0.2382449507713318 ]
{ "id": 8, "code_window": [ "\n", "import { DataSourceInstanceSettings, DataSourceRef, getDataSourceRef, ScopedVars } from '@grafana/data';\n", "import { getBackendSrv } from '@grafana/runtime';\n", "import { notifyApp } from 'app/core/actions';\n", "import { createErrorNotification } from 'app/core/copy/appNotification';\n", "import { TemplateSrv } from 'app/features/templating/template_srv';\n", "import { store } from 'app/store/store';\n" ], "labels": [ "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ "import { BackendDataSourceResponse, FetchResponse, getBackendSrv } from '@grafana/runtime';\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchRequest.ts", "type": "replace", "edit_start_line_idx": 3 }
import React, { useContext } from 'react'; import { GrafanaConfig } from '@grafana/data'; import { LocationService } from '@grafana/runtime/src/services/LocationService'; import { BackendSrv } from '@grafana/runtime/src/services/backendSrv'; import { AppChromeService } from '../components/AppChrome/AppChromeService'; import { KeybindingSrv } from '../services/keybindingSrv'; export interface GrafanaContextType { backend: BackendSrv; location: LocationService; config: GrafanaConfig; chrome: AppChromeService; keybindings: KeybindingSrv; } export const GrafanaContext = React.createContext<GrafanaContextType | undefined>(undefined); export function useGrafana(): GrafanaContextType { const context = useContext(GrafanaContext); if (!context) { throw new Error('No GrafanaContext found'); } return context; }
public/app/core/context/GrafanaContext.ts
0
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.0005565311294049025, 0.00030857729143463075, 0.00016943918308243155, 0.00019976151816081256, 0.00017576631216797978 ]
{ "id": 8, "code_window": [ "\n", "import { DataSourceInstanceSettings, DataSourceRef, getDataSourceRef, ScopedVars } from '@grafana/data';\n", "import { getBackendSrv } from '@grafana/runtime';\n", "import { notifyApp } from 'app/core/actions';\n", "import { createErrorNotification } from 'app/core/copy/appNotification';\n", "import { TemplateSrv } from 'app/features/templating/template_srv';\n", "import { store } from 'app/store/store';\n" ], "labels": [ "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ "import { BackendDataSourceResponse, FetchResponse, getBackendSrv } from '@grafana/runtime';\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchRequest.ts", "type": "replace", "edit_start_line_idx": 3 }
package ualert import ( "testing" "time" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/prometheus/alertmanager/pkg/labels" "github.com/prometheus/common/model" "github.com/stretchr/testify/require" "github.com/grafana/grafana/pkg/components/simplejson" ngModels "github.com/grafana/grafana/pkg/services/ngalert/models" ) func TestFilterReceiversForAlert(t *testing.T) { tc := []struct { name string channelIds []uidOrID receivers map[uidOrID]*PostableApiReceiver defaultReceivers map[string]struct{} expected map[string]interface{} }{ { name: "when an alert has multiple channels, each should filter for the correct receiver", channelIds: []uidOrID{"uid1", "uid2"}, receivers: map[uidOrID]*PostableApiReceiver{ "uid1": { Name: "recv1", GrafanaManagedReceivers: []*PostableGrafanaReceiver{}, }, "uid2": { Name: "recv2", GrafanaManagedReceivers: []*PostableGrafanaReceiver{}, }, "uid3": { Name: "recv3", GrafanaManagedReceivers: []*PostableGrafanaReceiver{}, }, }, defaultReceivers: map[string]struct{}{}, expected: map[string]interface{}{ "recv1": struct{}{}, "recv2": struct{}{}, }, }, { name: "when default receivers exist, they should be added to an alert's filtered receivers", channelIds: []uidOrID{"uid1"}, receivers: map[uidOrID]*PostableApiReceiver{ "uid1": { Name: "recv1", GrafanaManagedReceivers: []*PostableGrafanaReceiver{}, }, "uid2": { Name: "recv2", GrafanaManagedReceivers: []*PostableGrafanaReceiver{}, }, "uid3": { Name: "recv3", GrafanaManagedReceivers: []*PostableGrafanaReceiver{}, }, }, defaultReceivers: map[string]struct{}{ "recv2": {}, }, expected: map[string]interface{}{ "recv1": struct{}{}, // From alert "recv2": struct{}{}, // From default }, }, { name: "when an alert has a channels associated by ID instead of UID, it should be included", channelIds: []uidOrID{int64(42)}, receivers: map[uidOrID]*PostableApiReceiver{ int64(42): { Name: "recv1", GrafanaManagedReceivers: []*PostableGrafanaReceiver{}, }, }, defaultReceivers: map[string]struct{}{}, expected: map[string]interface{}{ "recv1": struct{}{}, }, }, { name: "when an alert's receivers are covered by the defaults, return nil to use default receiver downstream", channelIds: []uidOrID{"uid1"}, receivers: map[uidOrID]*PostableApiReceiver{ "uid1": { Name: "recv1", GrafanaManagedReceivers: []*PostableGrafanaReceiver{}, }, "uid2": { Name: "recv2", GrafanaManagedReceivers: []*PostableGrafanaReceiver{}, }, "uid3": { Name: "recv3", GrafanaManagedReceivers: []*PostableGrafanaReceiver{}, }, }, defaultReceivers: map[string]struct{}{ "recv1": {}, "recv2": {}, }, expected: nil, // recv1 is already a default }, } for _, tt := range tc { t.Run(tt.name, func(t *testing.T) { m := newTestMigration(t) res := m.filterReceiversForAlert("", tt.channelIds, tt.receivers, tt.defaultReceivers) require.Equal(t, tt.expected, res) }) } } func TestCreateRoute(t *testing.T) { tc := []struct { name string channel *notificationChannel recv *PostableApiReceiver expected *Route }{ { name: "when a receiver is passed in, the route should regex match based on quoted name with continue=true", channel: &notificationChannel{}, recv: &PostableApiReceiver{ Name: "recv1", }, expected: &Route{ Receiver: "recv1", ObjectMatchers: ObjectMatchers{{Type: 2, Name: ContactLabel, Value: `.*"recv1".*`}}, Routes: nil, Continue: true, GroupByStr: nil, RepeatInterval: durationPointer(DisabledRepeatInterval), }, }, { name: "notification channel should be escaped for regex in the matcher", channel: &notificationChannel{}, recv: &PostableApiReceiver{ Name: `. ^ $ * + - ? ( ) [ ] { } \ |`, }, expected: &Route{ Receiver: `. ^ $ * + - ? ( ) [ ] { } \ |`, ObjectMatchers: ObjectMatchers{{Type: 2, Name: ContactLabel, Value: `.*"\. \^ \$ \* \+ - \? \( \) \[ \] \{ \} \\ \|".*`}}, Routes: nil, Continue: true, GroupByStr: nil, RepeatInterval: durationPointer(DisabledRepeatInterval), }, }, { name: "when a channel has sendReminder=true, the route should use the frequency in repeat interval", channel: &notificationChannel{SendReminder: true, Frequency: model.Duration(time.Duration(42) * time.Hour)}, recv: &PostableApiReceiver{ Name: "recv1", }, expected: &Route{ Receiver: "recv1", ObjectMatchers: ObjectMatchers{{Type: 2, Name: ContactLabel, Value: `.*"recv1".*`}}, Routes: nil, Continue: true, GroupByStr: nil, RepeatInterval: durationPointer(model.Duration(time.Duration(42) * time.Hour)), }, }, { name: "when a channel has sendReminder=false, the route should ignore the frequency in repeat interval and use DisabledRepeatInterval", channel: &notificationChannel{SendReminder: false, Frequency: model.Duration(time.Duration(42) * time.Hour)}, recv: &PostableApiReceiver{ Name: "recv1", }, expected: &Route{ Receiver: "recv1", ObjectMatchers: ObjectMatchers{{Type: 2, Name: ContactLabel, Value: `.*"recv1".*`}}, Routes: nil, Continue: true, GroupByStr: nil, RepeatInterval: durationPointer(DisabledRepeatInterval), }, }, } for _, tt := range tc { t.Run(tt.name, func(t *testing.T) { res, err := createRoute(channelReceiver{ channel: tt.channel, receiver: tt.recv, }) require.NoError(t, err) // Order of nested routes is not guaranteed. cOpt := []cmp.Option{ cmpopts.SortSlices(func(a, b *Route) bool { if a.Receiver != b.Receiver { return a.Receiver < b.Receiver } return a.ObjectMatchers[0].Value < b.ObjectMatchers[0].Value }), cmpopts.IgnoreUnexported(Route{}, labels.Matcher{}), } if !cmp.Equal(tt.expected, res, cOpt...) { t.Errorf("Unexpected Route: %v", cmp.Diff(tt.expected, res, cOpt...)) } }) } } func createNotChannel(t *testing.T, uid string, id int64, name string) *notificationChannel { t.Helper() return &notificationChannel{Uid: uid, ID: id, Name: name, Settings: simplejson.New()} } func createNotChannelWithReminder(t *testing.T, uid string, id int64, name string, frequency model.Duration) *notificationChannel { t.Helper() return &notificationChannel{Uid: uid, ID: id, Name: name, SendReminder: true, Frequency: frequency, Settings: simplejson.New()} } func TestCreateReceivers(t *testing.T) { tc := []struct { name string allChannels []*notificationChannel defaultChannels []*notificationChannel expRecvMap map[uidOrID]*PostableApiReceiver expRecv []channelReceiver expErr error }{ { name: "when given notification channels migrate them to receivers", allChannels: []*notificationChannel{createNotChannel(t, "uid1", int64(1), "name1"), createNotChannel(t, "uid2", int64(2), "name2")}, expRecvMap: map[uidOrID]*PostableApiReceiver{ "uid1": { Name: "name1", GrafanaManagedReceivers: []*PostableGrafanaReceiver{{Name: "name1"}}, }, "uid2": { Name: "name2", GrafanaManagedReceivers: []*PostableGrafanaReceiver{{Name: "name2"}}, }, int64(1): { Name: "name1", GrafanaManagedReceivers: []*PostableGrafanaReceiver{{Name: "name1"}}, }, int64(2): { Name: "name2", GrafanaManagedReceivers: []*PostableGrafanaReceiver{{Name: "name2"}}, }, }, expRecv: []channelReceiver{ { channel: createNotChannel(t, "uid1", int64(1), "name1"), receiver: &PostableApiReceiver{ Name: "name1", GrafanaManagedReceivers: []*PostableGrafanaReceiver{{Name: "name1"}}, }, }, { channel: createNotChannel(t, "uid2", int64(2), "name2"), receiver: &PostableApiReceiver{ Name: "name2", GrafanaManagedReceivers: []*PostableGrafanaReceiver{{Name: "name2"}}, }, }, }, }, { name: "when given notification channel contains double quote sanitize with underscore", allChannels: []*notificationChannel{createNotChannel(t, "uid1", int64(1), "name\"1")}, expRecvMap: map[uidOrID]*PostableApiReceiver{ "uid1": { Name: "name_1", GrafanaManagedReceivers: []*PostableGrafanaReceiver{{Name: "name_1"}}, }, int64(1): { Name: "name_1", GrafanaManagedReceivers: []*PostableGrafanaReceiver{{Name: "name_1"}}, }, }, expRecv: []channelReceiver{ { channel: createNotChannel(t, "uid1", int64(1), "name\"1"), receiver: &PostableApiReceiver{ Name: "name_1", GrafanaManagedReceivers: []*PostableGrafanaReceiver{{Name: "name_1"}}, }, }, }, }, { name: "when given notification channels collide after sanitization add short hash to end", allChannels: []*notificationChannel{createNotChannel(t, "uid1", int64(1), "name\"1"), createNotChannel(t, "uid2", int64(2), "name_1")}, expRecvMap: map[uidOrID]*PostableApiReceiver{ "uid1": { Name: "name_1", GrafanaManagedReceivers: []*PostableGrafanaReceiver{{Name: "name_1"}}, }, "uid2": { Name: "name_1_dba13d", GrafanaManagedReceivers: []*PostableGrafanaReceiver{{Name: "name_1_dba13d"}}, }, int64(1): { Name: "name_1", GrafanaManagedReceivers: []*PostableGrafanaReceiver{{Name: "name_1"}}, }, int64(2): { Name: "name_1_dba13d", GrafanaManagedReceivers: []*PostableGrafanaReceiver{{Name: "name_1_dba13d"}}, }, }, expRecv: []channelReceiver{ { channel: createNotChannel(t, "uid1", int64(1), "name\"1"), receiver: &PostableApiReceiver{ Name: "name_1", GrafanaManagedReceivers: []*PostableGrafanaReceiver{{Name: "name_1"}}, }, }, { channel: createNotChannel(t, "uid2", int64(2), "name_1"), receiver: &PostableApiReceiver{ Name: "name_1_dba13d", GrafanaManagedReceivers: []*PostableGrafanaReceiver{{Name: "name_1_dba13d"}}, }, }, }, }, } for _, tt := range tc { t.Run(tt.name, func(t *testing.T) { m := newTestMigration(t) recvMap, recvs, err := m.createReceivers(tt.allChannels) if tt.expErr != nil { require.Error(t, err) require.EqualError(t, err, tt.expErr.Error()) return } require.NoError(t, err) // We ignore certain fields for the purposes of this test for _, recv := range recvs { for _, not := range recv.receiver.GrafanaManagedReceivers { not.UID = "" not.Settings = nil not.SecureSettings = nil } } require.Equal(t, tt.expRecvMap, recvMap) require.ElementsMatch(t, tt.expRecv, recvs) }) } } func TestCreateDefaultRouteAndReceiver(t *testing.T) { tc := []struct { name string amConfig *PostableUserConfig defaultChannels []*notificationChannel expRecv *PostableApiReceiver expRoute *Route expErr error }{ { name: "when given multiple default notification channels migrate them to a single receiver", defaultChannels: []*notificationChannel{createNotChannel(t, "uid1", int64(1), "name1"), createNotChannel(t, "uid2", int64(2), "name2")}, expRecv: &PostableApiReceiver{ Name: "autogen-contact-point-default", GrafanaManagedReceivers: []*PostableGrafanaReceiver{{Name: "name1"}, {Name: "name2"}}, }, expRoute: &Route{ Receiver: "autogen-contact-point-default", Routes: make([]*Route, 0), GroupByStr: []string{ngModels.FolderTitleLabel, model.AlertNameLabel}, RepeatInterval: durationPointer(DisabledRepeatInterval), }, }, { name: "when given multiple default notification channels migrate them to a single receiver with RepeatInterval set to be the minimum of all channel frequencies", defaultChannels: []*notificationChannel{ createNotChannelWithReminder(t, "uid1", int64(1), "name1", model.Duration(42)), createNotChannelWithReminder(t, "uid2", int64(2), "name2", model.Duration(100000)), }, expRecv: &PostableApiReceiver{ Name: "autogen-contact-point-default", GrafanaManagedReceivers: []*PostableGrafanaReceiver{{Name: "name1"}, {Name: "name2"}}, }, expRoute: &Route{ Receiver: "autogen-contact-point-default", Routes: make([]*Route, 0), GroupByStr: []string{ngModels.FolderTitleLabel, model.AlertNameLabel}, RepeatInterval: durationPointer(model.Duration(42)), }, }, { name: "when given no default notification channels create a single empty receiver for default", defaultChannels: []*notificationChannel{}, expRecv: &PostableApiReceiver{ Name: "autogen-contact-point-default", GrafanaManagedReceivers: []*PostableGrafanaReceiver{}, }, expRoute: &Route{ Receiver: "autogen-contact-point-default", Routes: make([]*Route, 0), GroupByStr: []string{ngModels.FolderTitleLabel, model.AlertNameLabel}, RepeatInterval: nil, }, }, { name: "when given a single default notification channels don't create a new default receiver", defaultChannels: []*notificationChannel{createNotChannel(t, "uid1", int64(1), "name1")}, expRecv: nil, expRoute: &Route{ Receiver: "name1", Routes: make([]*Route, 0), GroupByStr: []string{ngModels.FolderTitleLabel, model.AlertNameLabel}, RepeatInterval: durationPointer(DisabledRepeatInterval), }, }, { name: "when given a single default notification channel with SendReminder=true, use the channels Frequency as the RepeatInterval", defaultChannels: []*notificationChannel{createNotChannelWithReminder(t, "uid1", int64(1), "name1", model.Duration(42))}, expRecv: nil, expRoute: &Route{ Receiver: "name1", Routes: make([]*Route, 0), GroupByStr: []string{ngModels.FolderTitleLabel, model.AlertNameLabel}, RepeatInterval: durationPointer(model.Duration(42)), }, }, } for _, tt := range tc { t.Run(tt.name, func(t *testing.T) { m := newTestMigration(t) recv, route, err := m.createDefaultRouteAndReceiver(tt.defaultChannels) if tt.expErr != nil { require.Error(t, err) require.EqualError(t, err, tt.expErr.Error()) return } require.NoError(t, err) // We ignore certain fields for the purposes of this test if recv != nil { for _, not := range recv.GrafanaManagedReceivers { not.UID = "" not.Settings = nil not.SecureSettings = nil } } require.Equal(t, tt.expRecv, recv) require.Equal(t, tt.expRoute, route) }) } } func durationPointer(d model.Duration) *model.Duration { return &d }
pkg/services/sqlstore/migrations/ualert/channel_test.go
0
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.00017664185725152493, 0.00017007703718263656, 0.0001638313988223672, 0.00017015851335600019, 0.000003177726057401742 ]
{ "id": 8, "code_window": [ "\n", "import { DataSourceInstanceSettings, DataSourceRef, getDataSourceRef, ScopedVars } from '@grafana/data';\n", "import { getBackendSrv } from '@grafana/runtime';\n", "import { notifyApp } from 'app/core/actions';\n", "import { createErrorNotification } from 'app/core/copy/appNotification';\n", "import { TemplateSrv } from 'app/features/templating/template_srv';\n", "import { store } from 'app/store/store';\n" ], "labels": [ "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ "import { BackendDataSourceResponse, FetchResponse, getBackendSrv } from '@grafana/runtime';\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchRequest.ts", "type": "replace", "edit_start_line_idx": 3 }
<?xml version="1.0" encoding="utf-8"?> <!-- Generator: Adobe Illustrator 20.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="100px" height="100px" viewBox="0 0 100 100" style="enable-background:new 0 0 100 100;" xml:space="preserve"> <style type="text/css"> .st0{fill:#898989;} .st1{fill:url(#SVGID_1_);} </style> <g> <path class="st0" d="M0,98V74.4c0-1.1,0.9-2,2-2H98c1.1,0,2,0.9,2,2V98c0,1.1-0.9,2-2,2H2C0.9,100,0,99.1,0,98z"/> <path class="st0" d="M0,24.7v-22C0,1.2,1.2,0,2.6,0h94.8c1.4,0,2.6,1.2,2.6,2.8v22c0,1.5-1.2,2.8-2.6,2.8H2.6 C1.2,27.5,0,26.3,0,24.7z"/> <linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="50" y1="94.582" x2="50" y2="11.6586"> <stop offset="0" style="stop-color:#FFF23A"/> <stop offset="4.010540e-02" style="stop-color:#FEE62D"/> <stop offset="0.1171" style="stop-color:#FED41A"/> <stop offset="0.1964" style="stop-color:#FDC90F"/> <stop offset="0.2809" style="stop-color:#FDC60B"/> <stop offset="0.6685" style="stop-color:#F28F3F"/> <stop offset="0.8876" style="stop-color:#ED693C"/> <stop offset="1" style="stop-color:#E83E39"/> </linearGradient> <path class="st1" d="M0,61.8V38.2c0-1.1,0.9-2,2-2H98c1.1,0,2,0.9,2,2v23.6c0,1.1-0.9,2-2,2H2C0.9,63.8,0,62.9,0,61.8z"/> </g> </svg>
public/img/icn-row.svg
0
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.00017427642887923867, 0.00017337064491584897, 0.00017176649998873472, 0.0001740689913276583, 0.0000011374552286724793 ]
{ "id": 9, "code_window": [ "import { TemplateSrv } from 'app/features/templating/template_srv';\n", "import { store } from 'app/store/store';\n", "import { AppNotificationTimeout } from 'app/types';\n", "\n", "import memoizedDebounce from '../memoizedDebounce';\n", "import { CloudWatchJsonData, Dimensions, MetricRequest, MultiFilters, TSDBResponse } from '../types';\n", "\n", "export abstract class CloudWatchRequest {\n", " templateSrv: TemplateSrv;\n", " ref: DataSourceRef;\n", " dsQueryEndpoint = '/api/ds/query';\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ], "after_edit": [ "import { CloudWatchJsonData, Dimensions, MetricRequest, MultiFilters } from '../types';\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchRequest.ts", "type": "replace", "edit_start_line_idx": 11 }
import { Observable, map } from 'rxjs'; import { DataSourceInstanceSettings, DataSourceRef, getDataSourceRef, ScopedVars } from '@grafana/data'; import { getBackendSrv } from '@grafana/runtime'; import { notifyApp } from 'app/core/actions'; import { createErrorNotification } from 'app/core/copy/appNotification'; import { TemplateSrv } from 'app/features/templating/template_srv'; import { store } from 'app/store/store'; import { AppNotificationTimeout } from 'app/types'; import memoizedDebounce from '../memoizedDebounce'; import { CloudWatchJsonData, Dimensions, MetricRequest, MultiFilters, TSDBResponse } from '../types'; export abstract class CloudWatchRequest { templateSrv: TemplateSrv; ref: DataSourceRef; dsQueryEndpoint = '/api/ds/query'; debouncedCustomAlert: (title: string, message: string) => void = memoizedDebounce( displayCustomError, AppNotificationTimeout.Error ); constructor(public instanceSettings: DataSourceInstanceSettings<CloudWatchJsonData>, templateSrv: TemplateSrv) { this.templateSrv = templateSrv; this.ref = getDataSourceRef(instanceSettings); } awsRequest(url: string, data: MetricRequest, headers: Record<string, string> = {}): Observable<TSDBResponse> { const options = { method: 'POST', url, data, headers, }; return getBackendSrv() .fetch<TSDBResponse>(options) .pipe(map((result) => result.data)); } convertDimensionFormat(dimensions: Dimensions, scopedVars: ScopedVars): Dimensions { return Object.entries(dimensions).reduce((result, [key, value]) => { key = this.replaceVariableAndDisplayWarningIfMulti(key, scopedVars, true, 'dimension keys'); if (Array.isArray(value)) { return { ...result, [key]: value }; } if (!value) { return { ...result, [key]: null }; } const newValues = this.expandVariableToArray(value, scopedVars); return { ...result, [key]: newValues }; }, {}); } // get the value for a given template variable expandVariableToArray(value: string, scopedVars: ScopedVars): string[] { const variableName = this.templateSrv.getVariableName(value); const valueVar = this.templateSrv.getVariables().find(({ name }) => { return name === variableName; }); if (variableName && valueVar) { const isMultiVariable = valueVar?.type === 'custom' || valueVar?.type === 'query' || valueVar?.type === 'datasource'; if (isMultiVariable && valueVar.multi) { return this.templateSrv.replace(value, scopedVars, 'pipe').split('|'); } return [this.templateSrv.replace(value, scopedVars)]; } return [value]; } convertMultiFilterFormat(multiFilters: MultiFilters, fieldName?: string) { return Object.entries(multiFilters).reduce((result, [key, values]) => { const interpolatedKey = this.replaceVariableAndDisplayWarningIfMulti(key, {}, true, fieldName); if (!values) { return { ...result, [interpolatedKey]: null }; } const initialVal: string[] = []; const newValues = values.reduce((result, value) => { const vals = this.expandVariableToArray(value, {}); return [...result, ...vals]; }, initialVal); return { ...result, [interpolatedKey]: newValues }; }, {}); } replaceVariableAndDisplayWarningIfMulti( target?: string, scopedVars?: ScopedVars, displayErrorIfIsMultiTemplateVariable?: boolean, fieldName?: string ) { if (displayErrorIfIsMultiTemplateVariable && !!target) { const variables = this.templateSrv.getVariables(); const variable = variables.find(({ name }) => name === this.templateSrv.getVariableName(target)); const isMultiVariable = variable?.type === 'custom' || variable?.type === 'query' || variable?.type === 'datasource'; if (isMultiVariable && variable.multi) { this.debouncedCustomAlert( 'CloudWatch templating error', `Multi template variables are not supported for ${fieldName || target}` ); } } return this.templateSrv.replace(target, scopedVars); } getActualRegion(region?: string) { if (region === 'default' || region === undefined || region === '') { return this.instanceSettings.jsonData.defaultRegion ?? ''; } return region; } getVariables() { return this.templateSrv.getVariables().map((v) => `$${v.name}`); } } const displayCustomError = (title: string, message: string) => store.dispatch(notifyApp(createErrorNotification(title, message)));
public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchRequest.ts
1
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.9967684745788574, 0.15987306833267212, 0.00016487040556967258, 0.0010674638906493783, 0.3570806384086609 ]
{ "id": 9, "code_window": [ "import { TemplateSrv } from 'app/features/templating/template_srv';\n", "import { store } from 'app/store/store';\n", "import { AppNotificationTimeout } from 'app/types';\n", "\n", "import memoizedDebounce from '../memoizedDebounce';\n", "import { CloudWatchJsonData, Dimensions, MetricRequest, MultiFilters, TSDBResponse } from '../types';\n", "\n", "export abstract class CloudWatchRequest {\n", " templateSrv: TemplateSrv;\n", " ref: DataSourceRef;\n", " dsQueryEndpoint = '/api/ds/query';\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ], "after_edit": [ "import { CloudWatchJsonData, Dimensions, MetricRequest, MultiFilters } from '../types';\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchRequest.ts", "type": "replace", "edit_start_line_idx": 11 }
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21,20H20V5a1,1,0,0,0-2,0V20H16V9a1,1,0,0,0-2,0V20H12V13a1,1,0,0,0-2,0v7H8V17a1,1,0,0,0-2,0v3H4V3A1,1,0,0,0,2,3V21a1,1,0,0,0,1,1H21a1,1,0,0,0,0-2Z"/></svg>
public/img/icons/unicons/chart-growth.svg
0
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.0001737070269882679, 0.0001737070269882679, 0.0001737070269882679, 0.0001737070269882679, 0 ]
{ "id": 9, "code_window": [ "import { TemplateSrv } from 'app/features/templating/template_srv';\n", "import { store } from 'app/store/store';\n", "import { AppNotificationTimeout } from 'app/types';\n", "\n", "import memoizedDebounce from '../memoizedDebounce';\n", "import { CloudWatchJsonData, Dimensions, MetricRequest, MultiFilters, TSDBResponse } from '../types';\n", "\n", "export abstract class CloudWatchRequest {\n", " templateSrv: TemplateSrv;\n", " ref: DataSourceRef;\n", " dsQueryEndpoint = '/api/ds/query';\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ], "after_edit": [ "import { CloudWatchJsonData, Dimensions, MetricRequest, MultiFilters } from '../types';\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchRequest.ts", "type": "replace", "edit_start_line_idx": 11 }
package folder import ( "context" ) type Service interface { // GetChildren returns an array containing all child folders. GetChildren(ctx context.Context, cmd *GetChildrenQuery) ([]*Folder, error) // GetParents returns an array containing add parent folders if nested folders are enabled // otherwise it returns an empty array GetParents(ctx context.Context, q GetParentsQuery) ([]*Folder, error) Create(ctx context.Context, cmd *CreateFolderCommand) (*Folder, error) // GetFolder takes a GetFolderCommand and returns a folder matching the // request. One of ID, UID, or Title must be included. If multiple values // are included in the request, Grafana will select one in order of // specificity (ID, UID, Title). Get(ctx context.Context, cmd *GetFolderQuery) (*Folder, error) // Update is used to update a folder's UID, Title and Description. To change // a folder's parent folder, use Move. Update(ctx context.Context, cmd *UpdateFolderCommand) (*Folder, error) Delete(ctx context.Context, cmd *DeleteFolderCommand) error MakeUserAdmin(ctx context.Context, orgID int64, userID, folderID int64, setViewAndEditPermissions bool) error // Move changes a folder's parent folder to the requested new parent. Move(ctx context.Context, cmd *MoveFolderCommand) (*Folder, error) } // FolderStore is a folder store. // //go:generate mockery --name FolderStore --structname FakeFolderStore --outpkg foldertest --output foldertest --filename folder_store_mock.go type FolderStore interface { // GetFolderByTitle retrieves a folder by its title GetFolderByTitle(ctx context.Context, orgID int64, title string) (*Folder, error) // GetFolderByUID retrieves a folder by its UID GetFolderByUID(ctx context.Context, orgID int64, uid string) (*Folder, error) // GetFolderByID retrieves a folder by its ID GetFolderByID(ctx context.Context, orgID int64, id int64) (*Folder, error) }
pkg/services/folder/service.go
0
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.00016972360026556998, 0.00016872672131285071, 0.00016681062697898597, 0.00016892039275262505, 0.0000010428973382659024 ]
{ "id": 9, "code_window": [ "import { TemplateSrv } from 'app/features/templating/template_srv';\n", "import { store } from 'app/store/store';\n", "import { AppNotificationTimeout } from 'app/types';\n", "\n", "import memoizedDebounce from '../memoizedDebounce';\n", "import { CloudWatchJsonData, Dimensions, MetricRequest, MultiFilters, TSDBResponse } from '../types';\n", "\n", "export abstract class CloudWatchRequest {\n", " templateSrv: TemplateSrv;\n", " ref: DataSourceRef;\n", " dsQueryEndpoint = '/api/ds/query';\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ], "after_edit": [ "import { CloudWatchJsonData, Dimensions, MetricRequest, MultiFilters } from '../types';\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchRequest.ts", "type": "replace", "edit_start_line_idx": 11 }
import { DataTransformerConfig } from '@grafana/data'; export interface TransformationsEditorTransformation { transformation: DataTransformerConfig; id: string; }
public/app/features/dashboard/components/TransformationsEditor/types.ts
0
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.00017464438860770315, 0.00017464438860770315, 0.00017464438860770315, 0.00017464438860770315, 0 ]
{ "id": 10, "code_window": [ " constructor(public instanceSettings: DataSourceInstanceSettings<CloudWatchJsonData>, templateSrv: TemplateSrv) {\n", " this.templateSrv = templateSrv;\n", " this.ref = getDataSourceRef(instanceSettings);\n", " }\n", "\n", " awsRequest(url: string, data: MetricRequest, headers: Record<string, string> = {}): Observable<TSDBResponse> {\n", " const options = {\n", " method: 'POST',\n", " url,\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " awsRequest(\n", " url: string,\n", " data: MetricRequest,\n", " headers: Record<string, string> = {}\n", " ): Observable<FetchResponse<BackendDataSourceResponse>> {\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchRequest.ts", "type": "replace", "edit_start_line_idx": 27 }
import { Observable, map } from 'rxjs'; import { DataSourceInstanceSettings, DataSourceRef, getDataSourceRef, ScopedVars } from '@grafana/data'; import { getBackendSrv } from '@grafana/runtime'; import { notifyApp } from 'app/core/actions'; import { createErrorNotification } from 'app/core/copy/appNotification'; import { TemplateSrv } from 'app/features/templating/template_srv'; import { store } from 'app/store/store'; import { AppNotificationTimeout } from 'app/types'; import memoizedDebounce from '../memoizedDebounce'; import { CloudWatchJsonData, Dimensions, MetricRequest, MultiFilters, TSDBResponse } from '../types'; export abstract class CloudWatchRequest { templateSrv: TemplateSrv; ref: DataSourceRef; dsQueryEndpoint = '/api/ds/query'; debouncedCustomAlert: (title: string, message: string) => void = memoizedDebounce( displayCustomError, AppNotificationTimeout.Error ); constructor(public instanceSettings: DataSourceInstanceSettings<CloudWatchJsonData>, templateSrv: TemplateSrv) { this.templateSrv = templateSrv; this.ref = getDataSourceRef(instanceSettings); } awsRequest(url: string, data: MetricRequest, headers: Record<string, string> = {}): Observable<TSDBResponse> { const options = { method: 'POST', url, data, headers, }; return getBackendSrv() .fetch<TSDBResponse>(options) .pipe(map((result) => result.data)); } convertDimensionFormat(dimensions: Dimensions, scopedVars: ScopedVars): Dimensions { return Object.entries(dimensions).reduce((result, [key, value]) => { key = this.replaceVariableAndDisplayWarningIfMulti(key, scopedVars, true, 'dimension keys'); if (Array.isArray(value)) { return { ...result, [key]: value }; } if (!value) { return { ...result, [key]: null }; } const newValues = this.expandVariableToArray(value, scopedVars); return { ...result, [key]: newValues }; }, {}); } // get the value for a given template variable expandVariableToArray(value: string, scopedVars: ScopedVars): string[] { const variableName = this.templateSrv.getVariableName(value); const valueVar = this.templateSrv.getVariables().find(({ name }) => { return name === variableName; }); if (variableName && valueVar) { const isMultiVariable = valueVar?.type === 'custom' || valueVar?.type === 'query' || valueVar?.type === 'datasource'; if (isMultiVariable && valueVar.multi) { return this.templateSrv.replace(value, scopedVars, 'pipe').split('|'); } return [this.templateSrv.replace(value, scopedVars)]; } return [value]; } convertMultiFilterFormat(multiFilters: MultiFilters, fieldName?: string) { return Object.entries(multiFilters).reduce((result, [key, values]) => { const interpolatedKey = this.replaceVariableAndDisplayWarningIfMulti(key, {}, true, fieldName); if (!values) { return { ...result, [interpolatedKey]: null }; } const initialVal: string[] = []; const newValues = values.reduce((result, value) => { const vals = this.expandVariableToArray(value, {}); return [...result, ...vals]; }, initialVal); return { ...result, [interpolatedKey]: newValues }; }, {}); } replaceVariableAndDisplayWarningIfMulti( target?: string, scopedVars?: ScopedVars, displayErrorIfIsMultiTemplateVariable?: boolean, fieldName?: string ) { if (displayErrorIfIsMultiTemplateVariable && !!target) { const variables = this.templateSrv.getVariables(); const variable = variables.find(({ name }) => name === this.templateSrv.getVariableName(target)); const isMultiVariable = variable?.type === 'custom' || variable?.type === 'query' || variable?.type === 'datasource'; if (isMultiVariable && variable.multi) { this.debouncedCustomAlert( 'CloudWatch templating error', `Multi template variables are not supported for ${fieldName || target}` ); } } return this.templateSrv.replace(target, scopedVars); } getActualRegion(region?: string) { if (region === 'default' || region === undefined || region === '') { return this.instanceSettings.jsonData.defaultRegion ?? ''; } return region; } getVariables() { return this.templateSrv.getVariables().map((v) => `$${v.name}`); } } const displayCustomError = (title: string, message: string) => store.dispatch(notifyApp(createErrorNotification(title, message)));
public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchRequest.ts
1
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.9984966516494751, 0.345736563205719, 0.0001696071121841669, 0.041701216250658035, 0.42992275953292847 ]
{ "id": 10, "code_window": [ " constructor(public instanceSettings: DataSourceInstanceSettings<CloudWatchJsonData>, templateSrv: TemplateSrv) {\n", " this.templateSrv = templateSrv;\n", " this.ref = getDataSourceRef(instanceSettings);\n", " }\n", "\n", " awsRequest(url: string, data: MetricRequest, headers: Record<string, string> = {}): Observable<TSDBResponse> {\n", " const options = {\n", " method: 'POST',\n", " url,\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " awsRequest(\n", " url: string,\n", " data: MetricRequest,\n", " headers: Record<string, string> = {}\n", " ): Observable<FetchResponse<BackendDataSourceResponse>> {\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchRequest.ts", "type": "replace", "edit_start_line_idx": 27 }
import { monacoTypes, Monaco } from '@grafana/ui'; import { SeriesMessage } from '../types'; import { CompletionProvider } from './autocomplete'; describe('CompletionProvider', () => { it('suggests labels', () => { const { provider, model } = setup('{}', 1, defaultLabels); const result = provider.provideCompletionItems(model, {} as monacoTypes.Position); expect((result! as monacoTypes.languages.CompletionList).suggestions).toEqual([ expect.objectContaining({ label: 'foo', insertText: 'foo' }), ]); }); it('suggests label names with quotes', () => { const { provider, model } = setup('{foo=}', 6, defaultLabels); const result = provider.provideCompletionItems(model, {} as monacoTypes.Position); expect((result! as monacoTypes.languages.CompletionList).suggestions).toEqual([ expect.objectContaining({ label: 'bar', insertText: '"bar"' }), ]); }); it('suggests label names without quotes', () => { const { provider, model } = setup('{foo="}', 7, defaultLabels); const result = provider.provideCompletionItems(model, {} as monacoTypes.Position); expect((result! as monacoTypes.languages.CompletionList).suggestions).toEqual([ expect.objectContaining({ label: 'bar', insertText: 'bar' }), ]); }); it('suggests nothing without labels', () => { const { provider, model } = setup('{foo="}', 7, []); const result = provider.provideCompletionItems(model, {} as monacoTypes.Position); expect((result! as monacoTypes.languages.CompletionList).suggestions).toEqual([]); }); it('suggests labels on empty input', () => { const { provider, model } = setup('', 0, defaultLabels); const result = provider.provideCompletionItems(model, {} as monacoTypes.Position); expect((result! as monacoTypes.languages.CompletionList).suggestions).toEqual([ expect.objectContaining({ label: 'foo', insertText: '{foo="' }), ]); }); }); const defaultLabels = [{ labels: [{ name: 'foo', value: 'bar' }] }]; function setup(value: string, offset: number, series?: SeriesMessage) { const provider = new CompletionProvider(); if (series) { provider.setSeries(series); } const model = makeModel(value, offset); provider.monaco = { Range: { fromPositions() { return null; }, }, languages: { CompletionItemKind: { Enum: 1, EnumMember: 2, }, }, } as unknown as Monaco; provider.editor = { getModel() { return model; }, } as monacoTypes.editor.IStandaloneCodeEditor; return { provider, model }; } function makeModel(value: string, offset: number) { return { id: 'test_monaco', getWordAtPosition() { return null; }, getOffsetAt() { return offset; }, getValue() { return value; }, } as unknown as monacoTypes.editor.ITextModel; }
public/app/plugins/datasource/phlare/QueryEditor/autocomplete.test.ts
0
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.00017934062634594738, 0.00017675159324426204, 0.000174066168256104, 0.00017660862067714334, 0.0000015332796010625316 ]
{ "id": 10, "code_window": [ " constructor(public instanceSettings: DataSourceInstanceSettings<CloudWatchJsonData>, templateSrv: TemplateSrv) {\n", " this.templateSrv = templateSrv;\n", " this.ref = getDataSourceRef(instanceSettings);\n", " }\n", "\n", " awsRequest(url: string, data: MetricRequest, headers: Record<string, string> = {}): Observable<TSDBResponse> {\n", " const options = {\n", " method: 'POST',\n", " url,\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " awsRequest(\n", " url: string,\n", " data: MetricRequest,\n", " headers: Record<string, string> = {}\n", " ): Observable<FetchResponse<BackendDataSourceResponse>> {\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchRequest.ts", "type": "replace", "edit_start_line_idx": 27 }
package migrations import ( "fmt" "net/url" "time" "xorm.io/xorm" "github.com/grafana/grafana/pkg/components/simplejson" "github.com/grafana/grafana/pkg/services/datasources" "github.com/grafana/grafana/pkg/services/sqlstore/migrations/ualert" "github.com/grafana/grafana/pkg/services/sqlstore/migrator" "github.com/grafana/grafana/pkg/util" ) func AddExternalAlertmanagerToDatasourceMigration(mg *migrator.Migrator) { mg.AddMigration("migrate external alertmanagers to datsourcse", &externalAlertmanagerToDatasources{}) } type externalAlertmanagerToDatasources struct { migrator.MigrationBase } type AdminConfiguration struct { OrgID int64 `xorm:"org_id"` Alertmanagers []string CreatedAt int64 `xorm:"created_at"` UpdatedAt int64 `xorm:"updated_at"` } func (e externalAlertmanagerToDatasources) SQL(dialect migrator.Dialect) string { return "migrate external alertmanagers to datasource" } func (e externalAlertmanagerToDatasources) Exec(sess *xorm.Session, mg *migrator.Migrator) error { var results []AdminConfiguration err := sess.SQL("SELECT org_id, alertmanagers, created_at, updated_at FROM ngalert_configuration").Find(&results) if err != nil { return err } for _, result := range results { for _, am := range removeDuplicates(result.Alertmanagers) { u, err := url.Parse(am) if err != nil { return err } uri := fmt.Sprintf("%s://%s%s", u.Scheme, u.Host, u.Path) uid, err := generateNewDatasourceUid(sess, result.OrgID) if err != nil { return err } ds := &datasources.DataSource{ OrgID: result.OrgID, Name: fmt.Sprintf("alertmanager-%s", uid), Type: "alertmanager", Access: "proxy", URL: uri, Created: time.Unix(result.CreatedAt, 0), Updated: time.Unix(result.UpdatedAt, 0), UID: uid, Version: 1, JsonData: simplejson.NewFromAny(map[string]interface{}{ "handleGrafanaManagedAlerts": true, "implementation": "prometheus", }), SecureJsonData: map[string][]byte{}, } if u.User != nil { ds.BasicAuth = true ds.BasicAuthUser = u.User.Username() if password, ok := u.User.Password(); ok { ds.SecureJsonData = ualert.GetEncryptedJsonData(map[string]string{ "basicAuthPassword": password, }) } } rowsAffected, err := sess.Table("data_source").Insert(ds) if err != nil { return err } if rowsAffected == 0 { return fmt.Errorf("expected 1 row, got %d", rowsAffected) } } } return nil } func removeDuplicates(strs []string) []string { var res []string found := map[string]bool{} for _, str := range strs { if found[str] { continue } found[str] = true res = append(res, str) } return res } func generateNewDatasourceUid(sess *xorm.Session, orgId int64) (string, error) { for i := 0; i < 3; i++ { uid := util.GenerateShortUID() exists, err := sess.Table("data_source").Where("uid = ? AND org_id = ?", uid, orgId).Exist() if err != nil { return "", err } if !exists { return uid, nil } } return "", datasources.ErrDataSourceFailedGenerateUniqueUid }
pkg/services/sqlstore/migrations/external_alertmanagers.go
0
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.0001764407061273232, 0.00017144257435575128, 0.0001628916506888345, 0.00017233048856724054, 0.000004023724159196718 ]
{ "id": 10, "code_window": [ " constructor(public instanceSettings: DataSourceInstanceSettings<CloudWatchJsonData>, templateSrv: TemplateSrv) {\n", " this.templateSrv = templateSrv;\n", " this.ref = getDataSourceRef(instanceSettings);\n", " }\n", "\n", " awsRequest(url: string, data: MetricRequest, headers: Record<string, string> = {}): Observable<TSDBResponse> {\n", " const options = {\n", " method: 'POST',\n", " url,\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " awsRequest(\n", " url: string,\n", " data: MetricRequest,\n", " headers: Record<string, string> = {}\n", " ): Observable<FetchResponse<BackendDataSourceResponse>> {\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchRequest.ts", "type": "replace", "edit_start_line_idx": 27 }
// ========================================================================== // FILTER TABLE // ========================================================================== // Table // -------------------------------------------------------------------------- .filter-table * { box-sizing: border-box; } .filter-table { width: 100%; border-collapse: separate; tbody { tr:nth-child(odd) { background: $table-bg-odd; } } th { width: auto; padding: $space-inset-squish-md; text-align: left; line-height: 30px; height: 30px; white-space: nowrap; } td { padding: $space-inset-squish-md; line-height: 30px; height: 30px; white-space: nowrap; &.filter-table__switch-cell { padding: 0; border-right: 3px solid $page-bg; } } .link-td { padding: 0; line-height: 30px; height: 30px; white-space: nowrap; &.filter-table__switch-cell { padding: 0; border-right: 3px solid $page-bg; } a { display: block; padding: 0px $space-sm; height: 30px; } } .ellipsis { display: block; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .expanded { border-color: $panel-bg; } .expanded > td { padding-bottom: 0; } .filter-table__avatar { width: 25px; height: 25px; border-radius: 50%; } &--hover { tbody tr:hover { background: $table-bg-hover; } } } .filter-table__weak-italic { font-style: italic; color: $text-color-weak; }
public/sass/components/_filter-table.scss
0
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.00017977137758862227, 0.0001772658433765173, 0.00017533983918838203, 0.00017713371198624372, 0.0000014993574950494803 ]
{ "id": 11, "code_window": [ " headers,\n", " };\n", "\n", " return getBackendSrv()\n", " .fetch<TSDBResponse>(options)\n", " .pipe(map((result) => result.data));\n", " }\n", "\n", " convertDimensionFormat(dimensions: Dimensions, scopedVars: ScopedVars): Dimensions {\n", " return Object.entries(dimensions).reduce((result, [key, value]) => {\n" ], "labels": [ "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " return getBackendSrv().fetch<BackendDataSourceResponse>(options);\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchRequest.ts", "type": "replace", "edit_start_line_idx": 35 }
import Prism, { Grammar } from 'prismjs'; import { lastValueFrom } from 'rxjs'; import { AbsoluteTimeRange, HistoryItem, LanguageProvider } from '@grafana/data'; import { CompletionItemGroup, SearchFunctionType, Token, TypeaheadInput, TypeaheadOutput } from '@grafana/ui'; import { getTemplateSrv } from 'app/features/templating/template_srv'; import { CloudWatchDatasource } from '../../datasource'; import { CloudWatchQuery, LogGroup, TSDBResponse } from '../../types'; import { interpolateStringArrayUsingSingleOrMultiValuedVariable } from '../../utils/templateVariableUtils'; import syntax, { AGGREGATION_FUNCTIONS_STATS, BOOLEAN_FUNCTIONS, DATETIME_FUNCTIONS, FIELD_AND_FILTER_FUNCTIONS, IP_FUNCTIONS, NUMERIC_OPERATORS, QUERY_COMMANDS, STRING_FUNCTIONS, } from './syntax'; export type CloudWatchHistoryItem = HistoryItem<CloudWatchQuery>; type TypeaheadContext = { history?: CloudWatchHistoryItem[]; absoluteRange?: AbsoluteTimeRange; logGroups?: LogGroup[]; region: string; }; export class CloudWatchLogsLanguageProvider extends LanguageProvider { started = false; declare initialRange: AbsoluteTimeRange; datasource: CloudWatchDatasource; constructor(datasource: CloudWatchDatasource, initialValues?: any) { super(); this.datasource = datasource; Object.assign(this, initialValues); } // Strip syntax chars cleanText = (s: string) => s.replace(/[()]/g, '').trim(); getSyntax(): Grammar { return syntax; } request = (url: string, params?: any): Promise<TSDBResponse> => { return lastValueFrom(this.datasource.logsQueryRunner.awsRequest(url, params)); }; start = () => { if (!this.startTask) { this.startTask = Promise.resolve().then(() => { this.started = true; return []; }); } return this.startTask; }; isStatsQuery(query: string): boolean { const grammar = this.getSyntax(); const tokens = Prism.tokenize(query, grammar) ?? []; return !!tokens.find( (token) => typeof token !== 'string' && token.content.toString().toLowerCase() === 'stats' && token.type === 'query-command' ); } /** * Return suggestions based on input that can be then plugged into a typeahead dropdown. * Keep this DOM-free for testing * @param input * @param context Is optional in types but is required in case we are doing getLabelCompletionItems * @param context.absoluteRange Required in case we are doing getLabelCompletionItems * @param context.history Optional used only in getEmptyCompletionItems */ async provideCompletionItems(input: TypeaheadInput, context?: TypeaheadContext): Promise<TypeaheadOutput> { const { value } = input; // Get tokens const tokens = value?.data.get('tokens'); if (!tokens || !tokens.length) { return { suggestions: [] }; } const curToken: Token = tokens.filter( (token: any) => token.offsets.start <= value!.selection?.start?.offset && token.offsets.end >= value!.selection?.start?.offset )[0]; const isFirstToken = !curToken.prev; const prevToken = prevNonWhitespaceToken(curToken); const isCommandStart = isFirstToken || (!isFirstToken && prevToken?.types.includes('command-separator')); if (isCommandStart) { return this.getCommandCompletionItems(); } if (isInsideFunctionParenthesis(curToken)) { return await this.getFieldCompletionItems(context?.logGroups, context?.region || 'default'); } if (isAfterKeyword('by', curToken)) { return this.handleKeyword(context); } if (prevToken?.types.includes('comparison-operator')) { return this.handleComparison(context); } const commandToken = previousCommandToken(curToken); if (commandToken) { return await this.handleCommand(commandToken, curToken, context); } return { suggestions: [], }; } private fetchFields = async (logGroups: LogGroup[], region: string): Promise<string[]> => { const interpolatedLogGroups = interpolateStringArrayUsingSingleOrMultiValuedVariable( getTemplateSrv(), logGroups.map((lg) => lg.name), {}, 'text' ); const results = await Promise.all( interpolatedLogGroups.map((logGroupName) => this.datasource.resources .getLogGroupFields({ logGroupName, region }) .then((fields) => fields.filter((f) => f).map((f) => f.value.name ?? '')) ) ); return results.flat(); }; private handleKeyword = async (context?: TypeaheadContext): Promise<TypeaheadOutput> => { const suggs = await this.getFieldCompletionItems(context?.logGroups, context?.region || 'default'); const functionSuggestions: CompletionItemGroup[] = [ { searchFunctionType: SearchFunctionType.Prefix, label: 'Functions', items: STRING_FUNCTIONS.concat(DATETIME_FUNCTIONS, IP_FUNCTIONS), }, ]; suggs.suggestions.push(...functionSuggestions); return suggs; }; private handleCommand = async ( commandToken: Token, curToken: Token, context?: TypeaheadContext ): Promise<TypeaheadOutput> => { const queryCommand = commandToken.content.toLowerCase(); const prevToken = prevNonWhitespaceToken(curToken); const currentTokenIsFirstArg = prevToken === commandToken; if (queryCommand === 'sort') { return this.handleSortCommand(currentTokenIsFirstArg, curToken, context); } if (queryCommand === 'parse') { if (currentTokenIsFirstArg) { return await this.getFieldCompletionItems(context?.logGroups ?? [], context?.region || 'default'); } } const currentTokenIsAfterCommandAndEmpty = isTokenType(commandToken.next, 'whitespace') && !commandToken.next?.next; const currentTokenIsAfterCommand = currentTokenIsAfterCommandAndEmpty || nextNonWhitespaceToken(commandToken) === curToken; const currentTokenIsComma = isTokenType(curToken, 'punctuation', ','); const currentTokenIsCommaOrAfterComma = currentTokenIsComma || isTokenType(prevToken, 'punctuation', ','); // We only show suggestions if we are after a command or after a comma which is a field separator if (!(currentTokenIsAfterCommand || currentTokenIsCommaOrAfterComma)) { return { suggestions: [] }; } if (['display', 'fields'].includes(queryCommand)) { const typeaheadOutput = await this.getFieldCompletionItems( context?.logGroups ?? [], context?.region || 'default' ); typeaheadOutput.suggestions.push(...this.getFieldAndFilterFunctionCompletionItems().suggestions); return typeaheadOutput; } if (queryCommand === 'stats') { const typeaheadOutput = this.getStatsAggCompletionItems(); if (currentTokenIsComma || currentTokenIsAfterCommandAndEmpty) { typeaheadOutput?.suggestions.forEach((group) => { group.skipFilter = true; }); } return typeaheadOutput; } if (queryCommand === 'filter' && currentTokenIsFirstArg) { const sugg = await this.getFieldCompletionItems(context?.logGroups, context?.region || 'default'); const boolFuncs = this.getBoolFuncCompletionItems(); sugg.suggestions.push(...boolFuncs.suggestions); return sugg; } return { suggestions: [] }; }; private async handleSortCommand( isFirstArgument: boolean, curToken: Token, context?: TypeaheadContext ): Promise<TypeaheadOutput> { if (isFirstArgument) { return await this.getFieldCompletionItems(context?.logGroups, context?.region || 'default'); } else if (isTokenType(prevNonWhitespaceToken(curToken), 'field-name')) { // suggest sort options return { suggestions: [ { searchFunctionType: SearchFunctionType.Prefix, label: 'Sort Order', items: [ { label: 'asc', }, { label: 'desc' }, ], }, ], }; } return { suggestions: [] }; } private handleComparison = async (context?: TypeaheadContext) => { const fieldsSuggestions = await this.getFieldCompletionItems(context?.logGroups, context?.region || 'default'); const comparisonSuggestions = this.getComparisonCompletionItems(); fieldsSuggestions.suggestions.push(...comparisonSuggestions.suggestions); return fieldsSuggestions; }; private getCommandCompletionItems = (): TypeaheadOutput => { return { suggestions: [{ searchFunctionType: SearchFunctionType.Prefix, label: 'Commands', items: QUERY_COMMANDS }], }; }; private getFieldAndFilterFunctionCompletionItems = (): TypeaheadOutput => { return { suggestions: [ { searchFunctionType: SearchFunctionType.Prefix, label: 'Functions', items: FIELD_AND_FILTER_FUNCTIONS }, ], }; }; private getStatsAggCompletionItems = (): TypeaheadOutput => { return { suggestions: [ { searchFunctionType: SearchFunctionType.Prefix, label: 'Functions', items: AGGREGATION_FUNCTIONS_STATS }, ], }; }; private getBoolFuncCompletionItems = (): TypeaheadOutput => { return { suggestions: [ { searchFunctionType: SearchFunctionType.Prefix, label: 'Functions', items: BOOLEAN_FUNCTIONS, }, ], }; }; private getComparisonCompletionItems = (): TypeaheadOutput => { return { suggestions: [ { searchFunctionType: SearchFunctionType.Prefix, label: 'Functions', items: NUMERIC_OPERATORS.concat(BOOLEAN_FUNCTIONS), }, ], }; }; private getFieldCompletionItems = async ( logGroups: LogGroup[] | undefined, region: string ): Promise<TypeaheadOutput> => { if (!logGroups) { return { suggestions: [] }; } const fields = await this.fetchFields(logGroups, region); return { suggestions: [ { label: 'Fields', items: fields.map((field) => ({ label: field, insertText: field.match(/@?[_a-zA-Z]+[_.0-9a-zA-Z]*/) ? undefined : `\`${field}\``, })), }, ], }; }; } function nextNonWhitespaceToken(token: Token): Token | null { let curToken = token; while (curToken.next) { if (curToken.next.types.includes('whitespace')) { curToken = curToken.next; } else { return curToken.next; } } return null; } function prevNonWhitespaceToken(token: Token): Token | null { let curToken = token; while (curToken.prev) { if (isTokenType(curToken.prev, 'whitespace')) { curToken = curToken.prev; } else { return curToken.prev; } } return null; } function previousCommandToken(startToken: Token): Token | null { let thisToken = startToken; while (!!thisToken.prev) { thisToken = thisToken.prev; if ( thisToken.types.includes('query-command') && (!thisToken.prev || isTokenType(prevNonWhitespaceToken(thisToken), 'command-separator')) ) { return thisToken; } } return null; } const funcsWithFieldArgs = [ 'avg', 'count', 'count_distinct', 'earliest', 'latest', 'sortsFirst', 'sortsLast', 'max', 'min', 'pct', 'stddev', 'ispresent', 'fromMillis', 'toMillis', 'isempty', 'isblank', 'isValidIp', 'isValidIpV4', 'isValidIpV6', 'isIpInSubnet', 'isIpv4InSubnet', 'isIpv6InSubnet', ].map((funcName) => funcName.toLowerCase()); /** * Returns true if cursor is currently inside a function parenthesis for example `count(|)` or `count(@mess|)` should * return true. */ function isInsideFunctionParenthesis(curToken: Token): boolean { const prevToken = prevNonWhitespaceToken(curToken); if (!prevToken) { return false; } const parenthesisToken = curToken.content === '(' ? curToken : prevToken.content === '(' ? prevToken : undefined; if (parenthesisToken) { const maybeFunctionToken = prevNonWhitespaceToken(parenthesisToken); if (maybeFunctionToken) { return ( funcsWithFieldArgs.includes(maybeFunctionToken.content.toLowerCase()) && maybeFunctionToken.types.includes('function') ); } } return false; } function isAfterKeyword(keyword: string, token: Token): boolean { const maybeKeyword = getPreviousTokenExcluding(token, [ 'whitespace', 'function', 'punctuation', 'field-name', 'number', ]); if (isTokenType(maybeKeyword, 'keyword', 'by')) { const prev = getPreviousTokenExcluding(token, ['whitespace']); if (prev === maybeKeyword || isTokenType(prev, 'punctuation', ',')) { return true; } } return false; } function isTokenType(token: Token | undefined | null, type: string, content?: string): boolean { if (!token?.types.includes(type)) { return false; } if (content) { if (token?.content.toLowerCase() !== content) { return false; } } return true; } type TokenDef = string | { type: string; value: string }; function getPreviousTokenExcluding(token: Token, exclude: TokenDef[]): Token | undefined | null { let curToken = token.prev; main: while (curToken) { for (const item of exclude) { if (typeof item === 'string') { if (curToken.types.includes(item)) { curToken = curToken.prev; continue main; } } else { if (curToken.types.includes(item.type) && curToken.content.toLowerCase() === item.value) { curToken = curToken.prev; continue main; } } } break; } return curToken; }
public/app/plugins/datasource/cloudwatch/language/cloudwatch-logs/CloudWatchLogsLanguageProvider.ts
1
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.0001902001240523532, 0.000172111060237512, 0.00016497795877512544, 0.00017178042617160827, 0.000004001612978754565 ]
{ "id": 11, "code_window": [ " headers,\n", " };\n", "\n", " return getBackendSrv()\n", " .fetch<TSDBResponse>(options)\n", " .pipe(map((result) => result.data));\n", " }\n", "\n", " convertDimensionFormat(dimensions: Dimensions, scopedVars: ScopedVars): Dimensions {\n", " return Object.entries(dimensions).reduce((result, [key, value]) => {\n" ], "labels": [ "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " return getBackendSrv().fetch<BackendDataSourceResponse>(options);\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchRequest.ts", "type": "replace", "edit_start_line_idx": 35 }
# Currently recommended practices We occasionally identify patterns that are either useful or harmful that we'll want to introduce or remove from the codebase. When the complexity or importance of introducing or removing such a pattern is sufficiently high, we'll document it here to provide an addressable local 'currently recommended practice'. By collecting these practices in a single place, we're able to reference them and make it easier to have a shared understanding of how to write idiomatic code for the Grafana backend. Large-scale refactoring based on a new recommended practice is a delicate matter, and most of the time it's better to introduce the new way incrementally over multiple releases and over time to balance the want to introduce new useful patterns and the need to keep Grafana stable. It's also easier to review and revert smaller chunks of changes, reducing the risk of complications. | State | Description | | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | Proposed | The practice has been proposed and been positively received by the Grafana team. Following the proposal is a discretionary choice for developers. | | Ongoing, active | The practice is actively being worked on. New code should adhere to the practice where at all possible. | | Ongoing, passive | There is no immediate active work on refactoring old code. New code should adhere to the practice where at all possible. | | Completed | The work has been done and there is no, or negligible, legacy code left that need refactoring. New code must adhere to the practice. | | Abandoned | The practice has no longer any active ongoing work and new code don't need to comply with the practice described. | ## 1 - Idiomatic Grafana code should be idiomatic Go code **Status:** Ongoing, passive. It'll be easier for contributors to start contributing to Grafana if our code is easily understandable. When there isn't a more specific Grafana recommended practice, we recommend following the practices as put forth by the Go project for development of Go code or the Go compiler itself when applicable. The first resource we recommend everyone developing Grafana's backend to skim is "[Effective Go](https://golang.org/doc/effective_go.html)", which isn't updated to reflect more recent changes since Go was initially released but remain a good source for understanding the general differences between Go and other languages. Secondly, the guidelines for [Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments) for the Go compiler can mostly be applied directly to the Grafana codebase. There are idiosyncrasies in Grafana such as interfaces living closer to its declaration than to its users for services and don't enforce documentation of public declarations (prioritize high coverage of documentation aimed at end-users over documenting internals in the backend). - [Effective Go](https://golang.org/doc/effective_go.html) - [Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments) ## 100 - Global state **State:** Ongoing, passive. Global state makes testing and debugging software harder, and it's something we want to avoid when possible. Unfortunately, there is quite a lot of global state in Grafana. We want to migrate away from this by using [Wire](https://github.com/google/wire) and dependency injection to pack ## 101 - Limit the use of the init() function **State:** Ongoing, passive. Only use the init() function to register services/implementations. ## 102 - Settings refactoring **State:** Ongoing, passive. The plan is to move all settings to from package level vars in settings package to the [setting.Cfg](https://github.com/grafana/grafana/blob/df917663e6f358a076ed3daa9b199412e95c11f4/pkg/setting/setting.go#L210) struct. To access the settings, services and components can inject this setting.Cfg struct: - [Cfg struct](https://github.com/grafana/grafana/blob/df917663e6f358a076ed3daa9b199412e95c11f4/pkg/setting/setting.go#L210) - [Injection example](https://github.com/grafana/grafana/blob/c9773e55b234b7637ea97b671161cd856a1d3d69/pkg/services/cleanup/cleanup.go#L34) ## 103 - Reduce the use of GoConvey **State:** Completed. We want to migrate away from using GoConvey. Instead, we want to use stdlib testing with [testify](https://github.com/stretchr/testify), because it's the most common approach in the Go community, and we think it will be easier for new contributors. Read more about how we want to write tests in the [style guide](/contribute/backend/style-guide.md). ## 104 - Refactor SqlStore **State:** Completed. The `sqlstore` handlers all use a global xorm engine variable. Refactor them to use the `SqlStore` instance. ## 105 - Avoid global HTTP handler functions **State:** Ongoing, passive. Refactor HTTP handlers so that the handler methods are on the HttpServer instance or a more detailed handler struct. E.g (AuthHandler). This ensures they get access to HttpServer service dependencies (and Cfg object) and can avoid global state. ## 106 - Date comparison **State:** Ongoing, passive. Store newly introduced date columns in the database as epoch based integers (i.e. unix timestamps) if they require date comparison. This permits a unified approach for comparing dates against all the supported databases instead of handling dates differently for each database. Also, by comparing epoch based integers, we no longer need error pruning transformations to and from other time zones. ## 107 - Avoid use of the simplejson package **State:** Ongoing, passive Use of the `simplejson` package (`pkg/components/simplejson`) in place of types (Go structs) results in code that is difficult to maintain. Instead, create types for objects and use the Go standard library's [`encoding/json`](https://golang.org/pkg/encoding/json/) package. ## 108 - Provisionable\* **State:** Abandoned: Grafana's file based refactoring is limited to work natively only on on-premise installations of Grafana. We're looking at enhancing the use of the API to enable provisioning for all Grafana instances. All new features that require state should be possible to configure using config files. For example: - [Data sources](https://github.com/grafana/grafana/tree/main/pkg/services/provisioning/datasources) - [Alert notifiers](https://github.com/grafana/grafana/tree/main/pkg/services/provisioning/notifiers) - [Dashboards](https://github.com/grafana/grafana/tree/main/pkg/services/provisioning/dashboards) Today it's only possible to provision data sources and dashboards but this is something we want to support all over Grafana. ### 109 - Use context.Context "everywhere" **State:** Completed. The package [context](https://golang.org/pkg/context/) should be used and propagated through all the layers of the code. For example the `context.Context` of an incoming API request should be propagated to any other layers being used such as the bus, service and database layers. Utility functions/methods normally doesn't need `context.Context`. To follow Go best practices, any function/method that receives a [`context.Context` argument should receive it as its first parameter](https://github.com/golang/go/wiki/CodeReviewComments#contexts). To be able to solve certain problems and/or implement and support certain features making sure that `context.Context` is passed down through all layers of the code is vital. Being able to provide contextual information for the full life-cycle of an API request allows us to use contextual logging, provide contextual information about the authenticated user, create multiple spans for a distributed trace of service calls and database queries etc. Code should use `context.TODO` when it's unclear which Context to use, or it is not yet available (because the surrounding function has not yet been extended to accept a `context.Context` argument). More details in [Services](/contribute/backend/services.md), [Communication](/contribute/backend/communication.md) and [Database](/contribute/backend/database.md). [Original design doc](https://docs.google.com/document/d/1ebUhUVXU8FlShezsN-C64T0dOoo-DaC9_r-c8gB2XEU/edit#). ## 110 - Move API error handling to service layer **State:** Ongoing, passive. All errors returned from Grafana's services should carry a status and the information necessary to provide a structured end-user facing message that the frontend can display and internationalize for end-users. More details in [Errors](/contribute/backend/errors.md).
contribute/backend/recommended-practices.md
0
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.00017347100947517902, 0.0001676158281043172, 0.00016221818805206567, 0.0001670868368819356, 0.000003926818862964865 ]
{ "id": 11, "code_window": [ " headers,\n", " };\n", "\n", " return getBackendSrv()\n", " .fetch<TSDBResponse>(options)\n", " .pipe(map((result) => result.data));\n", " }\n", "\n", " convertDimensionFormat(dimensions: Dimensions, scopedVars: ScopedVars): Dimensions {\n", " return Object.entries(dimensions).reduce((result, [key, value]) => {\n" ], "labels": [ "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " return getBackendSrv().fetch<BackendDataSourceResponse>(options);\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchRequest.ts", "type": "replace", "edit_start_line_idx": 35 }
import { isPromAlertingRuleState, PromAlertingRuleState, PromRuleType } from '../../../../types/unified-alerting-dto'; import { getRuleHealth, isPromRuleType } from '../utils/rules'; import * as terms from './search.terms'; import { applyFiltersToQuery, FilterExpr, FilterSupportedTerm, parseQueryToFilter, QueryFilterMapper, } from './searchParser'; export interface RulesFilter { freeFormWords: string[]; namespace?: string; groupName?: string; ruleName?: string; ruleState?: PromAlertingRuleState; ruleType?: PromRuleType; dataSourceNames: string[]; labels: string[]; ruleHealth?: RuleHealth; } const filterSupportedTerms: FilterSupportedTerm[] = [ FilterSupportedTerm.dataSource, FilterSupportedTerm.nameSpace, FilterSupportedTerm.label, FilterSupportedTerm.group, FilterSupportedTerm.rule, FilterSupportedTerm.state, FilterSupportedTerm.type, FilterSupportedTerm.health, ]; export enum RuleHealth { Ok = 'ok', Error = 'error', NoData = 'nodata', Unknown = 'unknown', } // Define how to map parsed tokens into the filter object export function getSearchFilterFromQuery(query: string): RulesFilter { const filter: RulesFilter = { labels: [], freeFormWords: [], dataSourceNames: [] }; const tokenToFilterMap: QueryFilterMapper = { [terms.DataSourceToken]: (value) => filter.dataSourceNames.push(value), [terms.NameSpaceToken]: (value) => (filter.namespace = value), [terms.GroupToken]: (value) => (filter.groupName = value), [terms.RuleToken]: (value) => (filter.ruleName = value), [terms.LabelToken]: (value) => filter.labels.push(value), [terms.StateToken]: (value) => (filter.ruleState = parseStateToken(value)), [terms.TypeToken]: (value) => (isPromRuleType(value) ? (filter.ruleType = value) : undefined), [terms.HealthToken]: (value) => (filter.ruleHealth = getRuleHealth(value)), [terms.FreeFormExpression]: (value) => filter.freeFormWords.push(value), }; parseQueryToFilter(query, filterSupportedTerms, tokenToFilterMap); return filter; } // Reverse of the previous function // Describes how to map the object into an array of tokens and values export function applySearchFilterToQuery(query: string, filter: RulesFilter): string { const filterStateArray: FilterExpr[] = []; // Convert filter object into an array // It allows to pick filters from the array in the same order as they were applied in the original query if (filter.dataSourceNames) { filterStateArray.push(...filter.dataSourceNames.map((t) => ({ type: terms.DataSourceToken, value: t }))); } if (filter.namespace) { filterStateArray.push({ type: terms.NameSpaceToken, value: filter.namespace }); } if (filter.groupName) { filterStateArray.push({ type: terms.GroupToken, value: filter.groupName }); } if (filter.ruleName) { filterStateArray.push({ type: terms.RuleToken, value: filter.ruleName }); } if (filter.ruleState) { filterStateArray.push({ type: terms.StateToken, value: filter.ruleState }); } if (filter.ruleType) { filterStateArray.push({ type: terms.TypeToken, value: filter.ruleType }); } if (filter.ruleHealth) { filterStateArray.push({ type: terms.HealthToken, value: filter.ruleHealth }); } if (filter.labels) { filterStateArray.push(...filter.labels.map((l) => ({ type: terms.LabelToken, value: l }))); } if (filter.freeFormWords) { filterStateArray.push(...filter.freeFormWords.map((word) => ({ type: terms.FreeFormExpression, value: word }))); } return applyFiltersToQuery(query, filterSupportedTerms, filterStateArray); } function parseStateToken(value: string): PromAlertingRuleState | undefined { if (value === 'normal') { return PromAlertingRuleState.Inactive; } if (isPromAlertingRuleState(value)) { return value; } return; }
public/app/features/alerting/unified/search/rulesSearchParser.ts
0
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.00017821606888901442, 0.000171786654391326, 0.00016508872795384377, 0.00017181580187752843, 0.000004271856141713215 ]
{ "id": 11, "code_window": [ " headers,\n", " };\n", "\n", " return getBackendSrv()\n", " .fetch<TSDBResponse>(options)\n", " .pipe(map((result) => result.data));\n", " }\n", "\n", " convertDimensionFormat(dimensions: Dimensions, scopedVars: ScopedVars): Dimensions {\n", " return Object.entries(dimensions).reduce((result, [key, value]) => {\n" ], "labels": [ "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " return getBackendSrv().fetch<BackendDataSourceResponse>(options);\n" ], "file_path": "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchRequest.ts", "type": "replace", "edit_start_line_idx": 35 }
import { DataSourceSettings } from '@grafana/data'; import { ElasticsearchOptions } from '../types'; import { defaultMaxConcurrentShardRequests } from './ElasticDetails'; export const coerceOptions = ( options: DataSourceSettings<ElasticsearchOptions, {}> ): DataSourceSettings<ElasticsearchOptions, {}> => { return { ...options, jsonData: { ...options.jsonData, timeField: options.jsonData.timeField || '@timestamp', maxConcurrentShardRequests: options.jsonData.maxConcurrentShardRequests || defaultMaxConcurrentShardRequests(), logMessageField: options.jsonData.logMessageField || '', logLevelField: options.jsonData.logLevelField || '', includeFrozen: options.jsonData.includeFrozen ?? false, }, }; }; export const isValidOptions = (options: DataSourceSettings<ElasticsearchOptions, {}>): boolean => { return ( // timeField should not be empty or nullish !!options.jsonData.timeField && // maxConcurrentShardRequests should be a number AND greater than 0 !!options.jsonData.maxConcurrentShardRequests && // message & level fields should be defined options.jsonData.logMessageField !== undefined && options.jsonData.logLevelField !== undefined ); };
public/app/plugins/datasource/elasticsearch/configuration/utils.ts
0
https://github.com/grafana/grafana/commit/96453c6e69caa37488cc44c844a754eaff56eea2
[ 0.00017287804803345352, 0.0001693081430858001, 0.00016554917965549976, 0.00016940267232712358, 0.0000031869874419498956 ]
{ "id": 0, "code_window": [ "// @ts-ignore\n", "import { appLayoutTransition as defaultLayoutTransition } from '#build/nuxt.config.mjs'\n", "\n", "// TODO: revert back to defineAsyncComponent when https://github.com/vuejs/core/issues/6638 is resolved\n", "const LayoutLoader = defineComponent({\n", " inheritAttrs: false,\n", " props: {\n", " name: String,\n", " ...process.dev ? { hasTransition: Boolean } : {}\n" ], "labels": [ "keep", "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ], "after_edit": [ " name: 'LayoutLoader',\n" ], "file_path": "packages/nuxt/src/app/components/layout.ts", "type": "add", "edit_start_line_idx": 14 }
import { computed, defineComponent, h, provide, reactive, onMounted, nextTick, Suspense, Transition } from 'vue' import type { DefineComponent, VNode, KeepAliveProps, TransitionProps } from 'vue' import { RouterView } from 'vue-router' import { defu } from 'defu' import type { RouteLocationNormalized, RouteLocationNormalizedLoaded, RouteLocation } from 'vue-router' import type { RouterViewSlotProps } from './utils' import { generateRouteKey, wrapInKeepAlive } from './utils' import { useNuxtApp } from '#app' import { _wrapIf } from '#app/components/utils' // @ts-ignore import { appPageTransition as defaultPageTransition, appKeepalive as defaultKeepaliveConfig } from '#build/nuxt.config.mjs' export default defineComponent({ name: 'NuxtPage', inheritAttrs: false, props: { name: { type: String }, transition: { type: [Boolean, Object] as any as () => boolean | TransitionProps, default: undefined }, keepalive: { type: [Boolean, Object] as any as () => boolean | KeepAliveProps, default: undefined }, route: { type: Object as () => RouteLocationNormalized }, pageKey: { type: [Function, String] as unknown as () => string | ((route: RouteLocationNormalizedLoaded) => string), default: null } }, setup (props, { attrs }) { const nuxtApp = useNuxtApp() return () => { return h(RouterView, { name: props.name, route: props.route, ...attrs }, { default: (routeProps: RouterViewSlotProps) => { if (!routeProps.Component) { return } const key = generateRouteKey(routeProps, props.pageKey) const done = nuxtApp.deferHydration() const hasTransition = !!(props.transition ?? routeProps.route.meta.pageTransition ?? defaultPageTransition) const transitionProps = hasTransition && _mergeTransitionProps([ props.transition, routeProps.route.meta.pageTransition, defaultPageTransition, { onAfterLeave: () => { nuxtApp.callHook('page:transition:finish', routeProps.Component) } } ].filter(Boolean)) return _wrapIf(Transition, hasTransition && transitionProps, wrapInKeepAlive(props.keepalive ?? routeProps.route.meta.keepalive ?? (defaultKeepaliveConfig as KeepAliveProps), h(Suspense, { onPending: () => nuxtApp.callHook('page:start', routeProps.Component), onResolve: () => { nextTick(() => nuxtApp.callHook('page:finish', routeProps.Component).finally(done)) } }, { default: () => h(Component, { key, routeProps, pageKey: key, hasTransition } as {}) }) )).default() } }) } } }) as DefineComponent<{ name?: string transition?: boolean | TransitionProps keepalive?: boolean | KeepAliveProps route?: RouteLocationNormalized pageKey?: string | ((route: RouteLocationNormalizedLoaded) => string) [key: string]: any }> function _toArray (val: any) { return Array.isArray(val) ? val : (val ? [val] : []) } function _mergeTransitionProps (routeProps: TransitionProps[]): TransitionProps { const _props: TransitionProps[] = routeProps.map(prop => ({ ...prop, onAfterLeave: _toArray(prop.onAfterLeave) })) // @ts-ignore return defu(..._props) } const Component = defineComponent({ // TODO: Type props // eslint-disable-next-line vue/require-prop-types props: ['routeProps', 'pageKey', 'hasTransition'], setup (props) { // Prevent reactivity when the page will be rerendered in a different suspense fork // eslint-disable-next-line vue/no-setup-props-destructure const previousKey = props.pageKey // eslint-disable-next-line vue/no-setup-props-destructure const previousRoute = props.routeProps.route // Provide a reactive route within the page const route = {} as RouteLocation for (const key in props.routeProps.route) { (route as any)[key] = computed(() => previousKey === props.pageKey ? props.routeProps.route[key] : previousRoute[key]) } provide('_route', reactive(route)) let vnode: VNode if (process.dev && process.client && props.hasTransition) { onMounted(() => { nextTick(() => { if (['#comment', '#text'].includes(vnode?.el?.nodeName)) { const filename = (vnode?.type as any).__file console.warn(`[nuxt] \`${filename}\` does not have a single root node and will cause errors when navigating between routes.`) } }) }) } return () => { if (process.dev && process.client) { vnode = h(props.routeProps.Component) return vnode } return h(props.routeProps.Component) } } })
packages/nuxt/src/pages/runtime/page.ts
1
https://github.com/nuxt/nuxt/commit/0db3c6373a72e218baddfc3626695173da103a88
[ 0.003976554609835148, 0.0009324749116785824, 0.0001638178073335439, 0.0002530402853153646, 0.0012724190019071102 ]
{ "id": 0, "code_window": [ "// @ts-ignore\n", "import { appLayoutTransition as defaultLayoutTransition } from '#build/nuxt.config.mjs'\n", "\n", "// TODO: revert back to defineAsyncComponent when https://github.com/vuejs/core/issues/6638 is resolved\n", "const LayoutLoader = defineComponent({\n", " inheritAttrs: false,\n", " props: {\n", " name: String,\n", " ...process.dev ? { hasTransition: Boolean } : {}\n" ], "labels": [ "keep", "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ], "after_edit": [ " name: 'LayoutLoader',\n" ], "file_path": "packages/nuxt/src/app/components/layout.ts", "type": "add", "edit_start_line_idx": 14 }
<?xml version="1.0" encoding="utf-8"?> <!-- Generator: Adobe Illustrator 26.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="1000px" height="128.5px" viewBox="0 0 1000 128.5" enable-background="new 0 0 1000 128.5" xml:space="preserve"> <path fill="#FAFAFA" d="M451.2,1.2c-2.8,4.2-21.9,29.8-33.5,43.9V1.2h-25.3c0,0-1.4,33-1.2,47.9c0.3,28.6,0.9,76.4,0.9,76.4h25.6 V81.9l8.1-9.5c10.2,19.5,28.6,53,28.6,53h29c0,0-29.3-57.6-37.2-73.9c7.4-9.3,23.2-30,37.2-50.6L451.2,1.2z M0,42.1 c0.3,29,1.2,83.6,1.2,83.6h26.7V72.4c16.3-0.5,49-1.9,49-1.9V43.7h-49V29.8l55.3-2.6V0.3L1.9,1C1.9,1-0.2,26.8,0,42.1z M358,1h-26.3 l1.6,84.1L279.7,1h-24.9c0,0-1.6,32.3-1.4,47.4c0.5,29,1.1,77.1,1.1,77.1h26.3L278.6,48l51.3,77.4h27.7c0,0,1.6-33.2,1.4-48.3 C358.5,48.2,358,1,358,1z M195,1c0,0,0.7,44.8,0.7,64.6c0,27-11.8,34.2-27.4,34.2c-15.6,0-27.2-7.2-27.2-34.2 c0-19.8,0.7-64.6,0.7-64.6c0-0.2-27.9,0-27.9,0s-1.6,42.1-1.6,64.6c0,50.7,25.1,62.2,56,62.2c30.9,0,56.2-11.4,56.2-62.2 C224.4,43.1,223,1,223,1S195,0.8,195,1z M602.7,2.1h-26l-1.6,45.8h-41.3V1.8h-27.4c0,0-1.8,32.3-1.6,47.2 c0.5,28.8,1.2,76.7,1.2,76.7h25.8l1.6-49.2h41.2v49.7h27.6c0,0,1.6-33.5,1.4-48.5C603.2,49,602.7,2.1,602.7,2.1z M947.2,48.3 c-10.9,0-21.1,0-21.1-10.4c0-10.4,10.2-10.4,21.1-10.4c9.3,0,18.1,0.7,20.5,12.6l27.7-1.4C992.3,7.4,972.4,0,947.2,0 c-27.6,0-48.5,8.6-48.5,37.9c0,29.5,20.9,38.1,48.5,38.1c12.8,0,24.8,0.4,24.8,11.9c0,11.8-11.9,12.1-24.8,12.1 c-11.2,0-21.8-0.4-24.2-14.9l-28.2,1.2c3,34.4,24.8,42.1,52.5,42.1c30.2,0,52.8-9.7,52.8-40.6C1000,57.2,977.4,48.3,947.2,48.3z M840.9,1.8c0,0,0.7,44.8,0.7,64.6c0,27-11.8,34.2-27.4,34.2c-15.6,0-27.2-7.2-27.2-34.2c0-19.8,0.7-64.6,0.7-64.6 c0-0.2-27.9,0-27.9,0s-1.6,42.1-1.6,64.6c0,50.7,25.1,62.1,56,62.1c30.9,0,56.2-11.4,56.2-62.1c0-22.5-1.4-64.6-1.4-64.6 S840.9,1.6,840.9,1.8z M692.8,1.8h-20.2c-3.9,0-44.9,117.8-44.9,124.5h28.6l9.6-28.6h33.3l9.5,28.6h28.3 C737.1,119.6,697,1.8,692.8,1.8z M672.8,73c0,0,9.1-29.8,9.5-30.5h0.5l10,30.5H672.8z"/> </svg>
docs/public/assets/support/agencies/full/dark/funkhaus.svg
0
https://github.com/nuxt/nuxt/commit/0db3c6373a72e218baddfc3626695173da103a88
[ 0.00017437052156310529, 0.00016987969866022468, 0.0001639228139538318, 0.00017134576046373695, 0.0000043894306145375594 ]
{ "id": 0, "code_window": [ "// @ts-ignore\n", "import { appLayoutTransition as defaultLayoutTransition } from '#build/nuxt.config.mjs'\n", "\n", "// TODO: revert back to defineAsyncComponent when https://github.com/vuejs/core/issues/6638 is resolved\n", "const LayoutLoader = defineComponent({\n", " inheritAttrs: false,\n", " props: {\n", " name: String,\n", " ...process.dev ? { hasTransition: Boolean } : {}\n" ], "labels": [ "keep", "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ], "after_edit": [ " name: 'LayoutLoader',\n" ], "file_path": "packages/nuxt/src/app/components/layout.ts", "type": "add", "edit_start_line_idx": 14 }
import type { AppConfig } from '@nuxt/schema' import { reactive } from 'vue' import { useNuxtApp } from './nuxt' // @ts-ignore import __appConfig from '#build/app.config.mjs' type DeepPartial<T> = T extends Function ? T : T extends Record<string, any> ? { [P in keyof T]?: DeepPartial<T[P]> } : T // Workaround for vite HMR with virtual modules export const _getAppConfig = () => __appConfig as AppConfig function deepDelete (obj: any, newObj: any) { for (const key in obj) { const val = newObj[key] if (!(key in newObj)) { delete (obj as any)[key] } if (val !== null && typeof val === 'object') { deepDelete(obj[key], newObj[key]) } } } function deepAssign (obj: any, newObj: any) { for (const key in newObj) { const val = newObj[key] if (val !== null && typeof val === 'object') { obj[key] = obj[key] || {} deepAssign(obj[key], val) } else { obj[key] = val } } } export function useAppConfig (): AppConfig { const nuxtApp = useNuxtApp() if (!nuxtApp._appConfig) { nuxtApp._appConfig = reactive(__appConfig) as AppConfig } return nuxtApp._appConfig } /** * Deep assign the current appConfig with the new one. * * Will preserve existing properties. */ export function updateAppConfig (appConfig: DeepPartial<AppConfig>) { const _appConfig = useAppConfig() deepAssign(_appConfig, appConfig) } // HMR Support if (process.dev) { function applyHMR (newConfig: AppConfig) { const appConfig = useAppConfig() if (newConfig && appConfig) { deepAssign(appConfig, newConfig) deepDelete(appConfig, newConfig) } } // Vite if (import.meta.hot) { import.meta.hot.accept((newModule) => { const newConfig = newModule._getAppConfig() applyHMR(newConfig) }) } // webpack if (import.meta.webpackHot) { import.meta.webpackHot.accept('#build/app.config.mjs', () => { applyHMR(__appConfig) }) } }
packages/nuxt/src/app/config.ts
0
https://github.com/nuxt/nuxt/commit/0db3c6373a72e218baddfc3626695173da103a88
[ 0.00045932538341730833, 0.00020985733135603368, 0.00016270414926111698, 0.00016985644469968975, 0.00009528639202471823 ]
{ "id": 0, "code_window": [ "// @ts-ignore\n", "import { appLayoutTransition as defaultLayoutTransition } from '#build/nuxt.config.mjs'\n", "\n", "// TODO: revert back to defineAsyncComponent when https://github.com/vuejs/core/issues/6638 is resolved\n", "const LayoutLoader = defineComponent({\n", " inheritAttrs: false,\n", " props: {\n", " name: String,\n", " ...process.dev ? { hasTransition: Boolean } : {}\n" ], "labels": [ "keep", "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ], "after_edit": [ " name: 'LayoutLoader',\n" ], "file_path": "packages/nuxt/src/app/components/layout.ts", "type": "add", "edit_start_line_idx": 14 }
{ "name": "example-components", "private": true, "scripts": { "build": "nuxi build", "dev": "nuxi dev", "start": "nuxi preview" }, "devDependencies": { "@nuxt/ui": "^0.3.3", "nuxt": "^3.0.0" } }
examples/auto-imports/components/package.json
0
https://github.com/nuxt/nuxt/commit/0db3c6373a72e218baddfc3626695173da103a88
[ 0.00016962879453785717, 0.000169421051396057, 0.00016921330825425684, 0.000169421051396057, 2.0774314180016518e-7 ]
{ "id": 1, "code_window": [ " }\n", " }\n", "})\n", "export default defineComponent({\n", " inheritAttrs: false,\n", " props: {\n", " name: {\n", " type: [String, Boolean, Object] as unknown as () => string | false | Ref<string | false>,\n", " default: null\n" ], "labels": [ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ], "after_edit": [ " name: 'NuxtLayout',\n" ], "file_path": "packages/nuxt/src/app/components/layout.ts", "type": "add", "edit_start_line_idx": 44 }
import type { Ref, VNode } from 'vue' import { computed, defineComponent, h, inject, nextTick, onMounted, Transition, unref } from 'vue' import type { RouteLocationNormalizedLoaded } from 'vue-router' import { _wrapIf } from './utils' import { useRoute } from '#app' // @ts-ignore import { useRoute as useVueRouterRoute } from '#build/pages' // @ts-ignore import layouts from '#build/layouts' // @ts-ignore import { appLayoutTransition as defaultLayoutTransition } from '#build/nuxt.config.mjs' // TODO: revert back to defineAsyncComponent when https://github.com/vuejs/core/issues/6638 is resolved const LayoutLoader = defineComponent({ inheritAttrs: false, props: { name: String, ...process.dev ? { hasTransition: Boolean } : {} }, async setup (props, context) { let vnode: VNode if (process.dev && process.client) { onMounted(() => { nextTick(() => { if (props.name && ['#comment', '#text'].includes(vnode?.el?.nodeName)) { console.warn(`[nuxt] \`${props.name}\` layout does not have a single root node and will cause errors when navigating between routes.`) } }) }) } const LayoutComponent = await layouts[props.name]().then((r: any) => r.default || r) return () => { if (process.dev && process.client && props.hasTransition) { vnode = h(LayoutComponent, context.attrs, context.slots) return vnode } return h(LayoutComponent, context.attrs, context.slots) } } }) export default defineComponent({ inheritAttrs: false, props: { name: { type: [String, Boolean, Object] as unknown as () => string | false | Ref<string | false>, default: null } }, setup (props, context) { // Need to ensure (if we are not a child of `<NuxtPage>`) that we use synchronous route (not deferred) const injectedRoute = inject('_route') as RouteLocationNormalizedLoaded const route = injectedRoute === useRoute() ? useVueRouterRoute() : injectedRoute const layout = computed(() => unref(props.name) ?? route.meta.layout as string ?? 'default') let vnode: VNode let _layout: string | false if (process.dev && process.client) { onMounted(() => { nextTick(() => { if (_layout && _layout in layouts && ['#comment', '#text'].includes(vnode?.el?.nodeName)) { console.warn(`[nuxt] \`${_layout}\` layout does not have a single root node and will cause errors when navigating between routes.`) } }) }) } return () => { const hasLayout = layout.value && layout.value in layouts if (process.dev && layout.value && !hasLayout && layout.value !== 'default') { console.warn(`Invalid layout \`${layout.value}\` selected.`) } const transitionProps = route.meta.layoutTransition ?? defaultLayoutTransition // We avoid rendering layout transition if there is no layout to render return _wrapIf(Transition, hasLayout && transitionProps, { default: () => _wrapIf(LayoutLoader, hasLayout && { key: layout.value, name: layout.value, ...(process.dev ? { hasTransition: !!transitionProps } : {}), ...context.attrs }, context.slots).default() }).default() } } })
packages/nuxt/src/app/components/layout.ts
1
https://github.com/nuxt/nuxt/commit/0db3c6373a72e218baddfc3626695173da103a88
[ 0.9984020590782166, 0.22706317901611328, 0.00017017911886796355, 0.0011480526300147176, 0.4115982949733734 ]
{ "id": 1, "code_window": [ " }\n", " }\n", "})\n", "export default defineComponent({\n", " inheritAttrs: false,\n", " props: {\n", " name: {\n", " type: [String, Boolean, Object] as unknown as () => string | false | Ref<string | false>,\n", " default: null\n" ], "labels": [ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ], "after_edit": [ " name: 'NuxtLayout',\n" ], "file_path": "packages/nuxt/src/app/components/layout.ts", "type": "add", "edit_start_line_idx": 44 }
--- toc: false --- # useHead This example shows how to use useHead and Nuxt built-in components to bind meta data to the head of the page. ::ReadMore{link="/docs/api/composables/use-head"} :: ::ReadMore{link="/docs/getting-started/seo-meta"} :: ::sandbox{repo="nuxt/framework" branch="main" dir="examples/composables/use-head" file="app.vue"} ::
docs/content/1.docs/4.examples/3.composables/use-head.md
0
https://github.com/nuxt/nuxt/commit/0db3c6373a72e218baddfc3626695173da103a88
[ 0.00017183381714858115, 0.00016768136993050575, 0.00016352892271243036, 0.00016768136993050575, 0.000004152447218075395 ]
{ "id": 1, "code_window": [ " }\n", " }\n", "})\n", "export default defineComponent({\n", " inheritAttrs: false,\n", " props: {\n", " name: {\n", " type: [String, Boolean, Object] as unknown as () => string | false | Ref<string | false>,\n", " default: null\n" ], "labels": [ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ], "after_edit": [ " name: 'NuxtLayout',\n" ], "file_path": "packages/nuxt/src/app/components/layout.ts", "type": "add", "edit_start_line_idx": 44 }
--- title: Solutions description: Find experts near you to help you to build and enhance your project. image: '/socials/support.jpg' --- ::page-hero --- image: path: '/assets/support/solutions/hero' format: 'webp' height: '216' width: '400' --- #title Nuxt Support #description Discover the different support offers to answer your questions, get an audit, consulting or build your next idea. :: ::support-section --- image: path: 'agency' width: '73' height: '81' format: 'webp' to: '/support/agencies' --- #title Official Agency partners #description The agency Partners are a network of trusted agencies from all over the world that can cover every expertise that you may be looking for. They have been working with Nuxt for years and have dozens of amazing references to showcase their capabilities. <br /><br /> Consult our agency partner catalog and find an agency near you with the right set of skills! <br /><br /> If you have any question, we will gladly help you refine your needs and help you select the relevant partner for you. #link [Look for an agency]{ .text-lg .font-semibold } :: ::support-section --- image: path: 'experts' width: '73' height: '81' format: 'webp' --- #title Nuxt Experts #description The Nuxt Expert Network is a group of experienced freelance developers with an expertise in web development with Vue & Nuxt, carefully selected by NuxtLabs. Their capabilities have been officially certified by the NuxtLabs team during a 3 steps certification process. <br /> <br /> They act as an external workforce for Nuxtlabs and are qualified to take on any consulting mission on behalf of Nuxtlabs, such as: #extra ::list{type="success" icon="heroicons-solid:check-circle"} - Identify and solve your pain points - Set your project on the right track with best practices - Improve your website performance - Provide custom solutions or integrations :: [Contact us at [[email protected]]{ .text-green-400 } for a quote.]{ .text-lg .font-semibold } :: ::support-section --- image: path: 'community' width: '73' height: '81' format: 'webp' --- #title Community Support #description Our active community is comprised of more than 2000 contributors. Asking your questions on our GitHub discussion board is a free and efficient way to ensure that you find solutions to your problems. #list ::support-community-list --- icon: github-discussion --- #title GitHub discussion #description We first recommend looking for your question on the [discussion board](https://github.com/nuxt/framework/discussions){ .font-semibold .text-green-400 }. Feel free to create a post if you can't find the answer. :: ::support-community-list --- icon: discord-server --- #title Discord server #description Our [Discord server](https://discord.com/invite/nuxt-473401852243869706){ .font-semibold .text-green-400 } is also a good place to have real time exchanges with members of the community. :: ::support-community-list --- icon: other-platform --- #title Other Platforms #description If none of the solutions above work for you, you can also try the [Nuxt subreddit](https://www.reddit.com/r/Nuxt/){ .font-semibold .text-green-400 } or [Stack Overflow.](https://stackoverflow.com/questions/tagged/nuxt.js?tab=Newest){ .font-semibold .text-green-400 } :: ::
docs/content/4.support/1.solutions.md
0
https://github.com/nuxt/nuxt/commit/0db3c6373a72e218baddfc3626695173da103a88
[ 0.0001732552918838337, 0.00016959047934506088, 0.00016320229042321444, 0.00017017572827171534, 0.000002682209014892578 ]
{ "id": 1, "code_window": [ " }\n", " }\n", "})\n", "export default defineComponent({\n", " inheritAttrs: false,\n", " props: {\n", " name: {\n", " type: [String, Boolean, Object] as unknown as () => string | false | Ref<string | false>,\n", " default: null\n" ], "labels": [ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ], "after_edit": [ " name: 'NuxtLayout',\n" ], "file_path": "packages/nuxt/src/app/components/layout.ts", "type": "add", "edit_start_line_idx": 44 }
<svg fill="none" height="896" viewBox="0 0 1420 896" width="1420" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><clipPath id="a"><rect height="416" rx="6" width="352" x="1004.43" y="336.417"/></clipPath><clipPath id="b"><rect height="416" rx="6" width="352" x="63" y="336"/></clipPath><clipPath id="c"><rect height="416" rx="6" width="352" x="534" y="336"/></clipPath><rect fill="#fcfcfd" height="213.045" rx="8" stroke="#ededee" stroke-width="2" width="352.857" x="62" y="77.5825"/><path d="m104.382 159v-16.406h-5.4337v-1.794h13.0517v1.794h-5.434v16.406zm10.155 0v-18.72h2.184v8.034c.433-.797 1.049-1.413 1.846-1.846.797-.451 1.664-.676 2.6-.676 1.491 0 2.687.468 3.588 1.404.901.919 1.352 2.34 1.352 4.264v7.54h-2.158v-7.306c0-2.687-1.083-4.03-3.25-4.03-1.127 0-2.071.407-2.834 1.222-.763.797-1.144 1.941-1.144 3.432v6.682zm20.677.312c-1.231 0-2.323-.277-3.276-.832-.953-.572-1.707-1.361-2.262-2.366-.537-1.005-.806-2.193-.806-3.562 0-1.352.269-2.531.806-3.536.537-1.023 1.283-1.811 2.236-2.366.971-.572 2.089-.858 3.354-.858 1.248 0 2.323.286 3.224.858.919.555 1.621 1.291 2.106 2.21s.728 1.907.728 2.964c0 .191-.009.381-.026.572v.65h-10.27c.052.988.277 1.811.676 2.47.416.641.927 1.127 1.534 1.456.624.329 1.283.494 1.976.494.901 0 1.655-.208 2.262-.624s1.049-.979 1.326-1.69h2.158c-.347 1.196-1.014 2.193-2.002 2.99-.971.78-2.219 1.17-3.744 1.17zm0-11.674c-1.04 0-1.967.321-2.782.962-.797.624-1.257 1.543-1.378 2.756h8.112c-.052-1.161-.451-2.071-1.196-2.73s-1.664-.988-2.756-.988zm16.588 11.362v-11.05h-1.95v-1.846h1.95v-2.236c0-1.248.312-2.158.936-2.73s1.534-.858 2.73-.858h1.3v1.872h-.962c-.659 0-1.127.139-1.404.416-.278.26-.416.711-.416 1.352v2.184h3.172v1.846h-3.172v11.05zm12.662.312c-1.525 0-2.739-.459-3.64-1.378-.901-.936-1.352-2.366-1.352-4.29v-7.54h2.184v7.306c0 2.687 1.101 4.03 3.302 4.03 1.127 0 2.054-.399 2.782-1.196.745-.815 1.118-1.967 1.118-3.458v-6.682h2.184v12.896h-1.976l-.156-2.314c-.399.815-.997 1.456-1.794 1.924-.78.468-1.664.702-2.652.702zm10.173-.312v-18.72h2.184v18.72zm5.763 0v-18.72h2.184v18.72zm12.775 0v-18.2h2.184v8.034h9.438v-8.034h2.184v18.2h-2.184v-8.372h-9.438v8.372zm21.91 0v-16.406h-5.434v-1.794h13.052v1.794h-5.434v16.406zm10.285 0v-18.2h2.548l6.552 12.688 6.5-12.688h2.574v18.2h-2.184v-14.3l-6.084 11.7h-1.638l-6.084-11.674v14.274zm22.014 0v-18.2h2.184v16.458h8.476v1.742zm21.737-15.756c-.433 0-.797-.139-1.092-.416-.277-.295-.416-.659-.416-1.092 0-.416.139-.763.416-1.04.295-.277.659-.416 1.092-.416.416 0 .771.139 1.066.416s.442.624.442 1.04c0 .433-.147.797-.442 1.092-.295.277-.65.416-1.066.416zm-1.092 15.756v-12.896h2.184v12.896zm10.927.312c-1.543 0-2.826-.39-3.848-1.17-1.023-.78-1.621-1.837-1.794-3.172h2.236c.138.676.494 1.265 1.066 1.768.589.485 1.378.728 2.366.728.918 0 1.594-.191 2.028-.572.433-.399.65-.867.65-1.404 0-.78-.286-1.3-.858-1.56-.555-.26-1.344-.494-2.366-.702-.694-.139-1.387-.338-2.08-.598-.694-.26-1.274-.624-1.742-1.092-.468-.485-.702-1.118-.702-1.898 0-1.127.416-2.045 1.248-2.756.849-.728 1.993-1.092 3.432-1.092 1.369 0 2.487.347 3.354 1.04.884.676 1.395 1.647 1.534 2.912h-2.158c-.087-.659-.373-1.17-.858-1.534-.468-.381-1.101-.572-1.898-.572-.78 0-1.387.165-1.82.494-.416.329-.624.763-.624 1.3 0 .52.268.927.806 1.222.554.295 1.3.546 2.236.754.797.173 1.551.39 2.262.65.728.243 1.317.615 1.768 1.118.468.485.702 1.196.702 2.132.017 1.161-.425 2.123-1.326 2.886-.884.745-2.089 1.118-3.614 1.118zm19.881 0c-1.543 0-2.826-.39-3.848-1.17-1.023-.78-1.621-1.837-1.794-3.172h2.236c.138.676.494 1.265 1.066 1.768.589.485 1.378.728 2.366.728.918 0 1.594-.191 2.028-.572.433-.399.65-.867.65-1.404 0-.78-.286-1.3-.858-1.56-.555-.26-1.344-.494-2.366-.702-.694-.139-1.387-.338-2.08-.598-.694-.26-1.274-.624-1.742-1.092-.468-.485-.702-1.118-.702-1.898 0-1.127.416-2.045 1.248-2.756.849-.728 1.993-1.092 3.432-1.092 1.369 0 2.487.347 3.354 1.04.884.676 1.395 1.647 1.534 2.912h-2.158c-.087-.659-.373-1.17-.858-1.534-.468-.381-1.101-.572-1.898-.572-.78 0-1.387.165-1.82.494-.416.329-.624.763-.624 1.3 0 .52.268.927.806 1.222.554.295 1.3.546 2.236.754.797.173 1.551.39 2.262.65.728.243 1.317.615 1.768 1.118.468.485.702 1.196.702 2.132.017 1.161-.425 2.123-1.326 2.886-.884.745-2.089 1.118-3.614 1.118zm13.858 0c-1.231 0-2.323-.277-3.276-.832-.954-.572-1.708-1.361-2.262-2.366-.538-1.005-.806-2.193-.806-3.562 0-1.352.268-2.531.806-3.536.537-1.023 1.282-1.811 2.236-2.366.97-.572 2.088-.858 3.354-.858 1.248 0 2.322.286 3.224.858.918.555 1.62 1.291 2.106 2.21.485.919.728 1.907.728 2.964 0 .191-.009.381-.026.572v.65h-10.27c.052.988.277 1.811.676 2.47.416.641.927 1.127 1.534 1.456.624.329 1.282.494 1.976.494.901 0 1.655-.208 2.262-.624.606-.416 1.048-.979 1.326-1.69h2.158c-.347 1.196-1.014 2.193-2.002 2.99-.971.78-2.219 1.17-3.744 1.17zm0-11.674c-1.04 0-1.968.321-2.782.962-.798.624-1.257 1.543-1.378 2.756h8.112c-.052-1.161-.451-2.071-1.196-2.73-.746-.659-1.664-.988-2.756-.988zm9.004 11.362v-12.896h1.976l.13 2.314c.416-.815 1.014-1.456 1.794-1.924s1.664-.702 2.652-.702c1.526 0 2.739.468 3.64 1.404.919.919 1.378 2.34 1.378 4.264v7.54h-2.184v-7.306c0-2.687-1.109-4.03-3.328-4.03-1.109 0-2.036.407-2.782 1.222-.728.797-1.092 1.941-1.092 3.432v6.682zm19.975 0c-1.178 0-2.106-.286-2.782-.858s-1.014-1.603-1.014-3.094v-7.098h-2.236v-1.846h2.236l.286-3.094h1.898v3.094h3.796v1.846h-3.796v7.098c0 .815.165 1.369.494 1.664.33.277.91.416 1.742.416h1.352v1.872zm16.936 0c-1.179 0-2.106-.286-2.782-.858s-1.014-1.603-1.014-3.094v-7.098h-2.236v-1.846h2.236l.286-3.094h1.898v3.094h3.796v1.846h-3.796v7.098c0 .815.164 1.369.494 1.664.329.277.91.416 1.742.416h1.352v1.872zm10.479.312c-1.213 0-2.305-.277-3.276-.832s-1.742-1.335-2.314-2.34c-.555-1.023-.832-2.219-.832-3.588s.286-2.557.858-3.562c.572-1.023 1.343-1.811 2.314-2.366.988-.555 2.089-.832 3.302-.832s2.305.277 3.276.832 1.733 1.343 2.288 2.366c.572 1.005.858 2.193.858 3.562s-.286 2.565-.858 3.588c-.572 1.005-1.352 1.785-2.34 2.34-.971.555-2.063.832-3.276.832zm0-1.872c.745 0 1.439-.182 2.08-.546s1.161-.91 1.56-1.638.598-1.629.598-2.704-.199-1.976-.598-2.704c-.381-.728-.893-1.274-1.534-1.638s-1.326-.546-2.054-.546c-.745 0-1.439.182-2.08.546s-1.161.91-1.56 1.638-.598 1.629-.598 2.704.199 1.976.598 2.704.91 1.274 1.534 1.638c.641.364 1.326.546 2.054.546zm-222.605 35.56c-1.179 0-2.106-.286-2.782-.858s-1.014-1.603-1.014-3.094v-7.098h-2.236v-1.846h2.236l.286-3.094h1.898v3.094h3.796v1.846h-3.796v7.098c0 .815.164 1.369.494 1.664.329.277.91.416 1.742.416h1.352v1.872zm4.958 0v-18.72h2.184v8.034c.434-.797 1.049-1.413 1.846-1.846.798-.451 1.664-.676 2.6-.676 1.491 0 2.687.468 3.588 1.404.902.919 1.352 2.34 1.352 4.264v7.54h-2.158v-7.306c0-2.687-1.083-4.03-3.25-4.03-1.126 0-2.071.407-2.834 1.222-.762.797-1.144 1.941-1.144 3.432v6.682zm20.677.312c-1.23 0-2.322-.277-3.276-.832-.953-.572-1.707-1.361-2.262-2.366-.537-1.005-.806-2.193-.806-3.562 0-1.352.269-2.531.806-3.536.538-1.023 1.283-1.811 2.236-2.366.971-.572 2.089-.858 3.354-.858 1.248 0 2.323.286 3.224.858.919.555 1.621 1.291 2.106 2.21.486.919.728 1.907.728 2.964 0 .191-.008.381-.026.572v.65h-10.27c.052.988.278 1.811.676 2.47.416.641.928 1.127 1.534 1.456.624.329 1.283.494 1.976.494.902 0 1.656-.208 2.262-.624.607-.416 1.049-.979 1.326-1.69h2.158c-.346 1.196-1.014 2.193-2.002 2.99-.97.78-2.218 1.17-3.744 1.17zm0-11.674c-1.04 0-1.967.321-2.782.962-.797.624-1.256 1.543-1.378 2.756h8.112c-.052-1.161-.45-2.071-1.196-2.73-.745-.659-1.664-.988-2.756-.988zm22.776 11.674c-1.057 0-2.002-.217-2.834-.65-.815-.433-1.439-1.04-1.872-1.82l-.208 2.158h-1.976v-18.72h2.184v7.956c.416-.624 1.005-1.187 1.768-1.69.78-.503 1.768-.754 2.964-.754 1.283 0 2.401.295 3.354.884s1.69 1.395 2.21 2.418c.537 1.023.806 2.184.806 3.484s-.269 2.461-.806 3.484c-.52 1.005-1.265 1.803-2.236 2.392-.953.572-2.071.858-3.354.858zm-.234-1.898c.867 0 1.629-.199 2.288-.598.659-.416 1.179-.988 1.56-1.716s.572-1.577.572-2.548-.191-1.82-.572-2.548-.901-1.291-1.56-1.69c-.659-.416-1.421-.624-2.288-.624s-1.629.208-2.288.624c-.659.399-1.179.962-1.56 1.69s-.572 1.577-.572 2.548.191 1.82.572 2.548.901 1.3 1.56 1.716c.659.399 1.421.598 2.288.598zm9.67 1.586v-12.896h1.976l.182 2.47c.399-.849 1.005-1.525 1.82-2.028s1.82-.754 3.016-.754v2.288h-.598c-.763 0-1.465.139-2.106.416-.641.26-1.153.711-1.534 1.352s-.572 1.525-.572 2.652v6.5zm14.839.312c-1.213 0-2.305-.277-3.276-.832s-1.742-1.335-2.314-2.34c-.555-1.023-.832-2.219-.832-3.588s.286-2.557.858-3.562c.572-1.023 1.343-1.811 2.314-2.366.988-.555 2.089-.832 3.302-.832s2.305.277 3.276.832 1.733 1.343 2.288 2.366c.572 1.005.858 2.193.858 3.562s-.286 2.565-.858 3.588c-.572 1.005-1.352 1.785-2.34 2.34-.971.555-2.063.832-3.276.832zm0-1.872c.745 0 1.439-.182 2.08-.546s1.161-.91 1.56-1.638.598-1.629.598-2.704-.199-1.976-.598-2.704c-.381-.728-.893-1.274-1.534-1.638s-1.326-.546-2.054-.546c-.745 0-1.439.182-2.08.546s-1.161.91-1.56 1.638-.598 1.629-.598 2.704.199 1.976.598 2.704.91 1.274 1.534 1.638c.641.364 1.326.546 2.054.546zm11.628 1.56-3.77-12.896h2.184l2.73 10.114 3.016-10.114h2.47l3.042 10.114 2.704-10.114h2.21l-3.77 12.896h-2.236l-3.172-10.634-3.172 10.634zm21.942.312c-1.543 0-2.825-.39-3.848-1.17s-1.621-1.837-1.794-3.172h2.236c.139.676.494 1.265 1.066 1.768.589.485 1.378.728 2.366.728.919 0 1.595-.191 2.028-.572.433-.399.65-.867.65-1.404 0-.78-.286-1.3-.858-1.56-.555-.26-1.343-.494-2.366-.702-.693-.139-1.387-.338-2.08-.598s-1.274-.624-1.742-1.092c-.468-.485-.702-1.118-.702-1.898 0-1.127.416-2.045 1.248-2.756.849-.728 1.993-1.092 3.432-1.092 1.369 0 2.487.347 3.354 1.04.884.676 1.395 1.647 1.534 2.912h-2.158c-.087-.659-.373-1.17-.858-1.534-.468-.381-1.101-.572-1.898-.572-.78 0-1.387.165-1.82.494-.416.329-.624.763-.624 1.3 0 .52.269.927.806 1.222.555.295 1.3.546 2.236.754.797.173 1.551.39 2.262.65.728.243 1.317.615 1.768 1.118.468.485.702 1.196.702 2.132.017 1.161-.425 2.123-1.326 2.886-.884.745-2.089 1.118-3.614 1.118zm13.858 0c-1.231 0-2.323-.277-3.276-.832-.953-.572-1.707-1.361-2.262-2.366-.537-1.005-.806-2.193-.806-3.562 0-1.352.269-2.531.806-3.536.537-1.023 1.283-1.811 2.236-2.366.971-.572 2.089-.858 3.354-.858 1.248 0 2.323.286 3.224.858.919.555 1.621 1.291 2.106 2.21s.728 1.907.728 2.964c0 .191-.009.381-.026.572v.65h-10.27c.052.988.277 1.811.676 2.47.416.641.927 1.127 1.534 1.456.624.329 1.283.494 1.976.494.901 0 1.655-.208 2.262-.624s1.049-.979 1.326-1.69h2.158c-.347 1.196-1.014 2.193-2.002 2.99-.971.78-2.219 1.17-3.744 1.17zm0-11.674c-1.04 0-1.967.321-2.782.962-.797.624-1.257 1.543-1.378 2.756h8.112c-.052-1.161-.451-2.071-1.196-2.73s-1.664-.988-2.756-.988zm9.005 11.362v-12.896h1.976l.182 2.47c.398-.849 1.005-1.525 1.82-2.028.814-.503 1.82-.754 3.016-.754v2.288h-.598c-.763 0-1.465.139-2.106.416-.642.26-1.153.711-1.534 1.352-.382.641-.572 1.525-.572 2.652v6.5zm20.616.312c-1.075 0-1.968-.182-2.678-.546-.711-.364-1.24-.849-1.586-1.456-.347-.607-.52-1.265-.52-1.976 0-1.317.502-2.331 1.508-3.042 1.005-.711 2.374-1.066 4.108-1.066h3.484v-.156c0-1.127-.295-1.976-.884-2.548-.59-.589-1.378-.884-2.366-.884-.85 0-1.586.217-2.21.65-.607.416-.988 1.031-1.144 1.846h-2.236c.086-.936.398-1.725.936-2.366.554-.641 1.239-1.127 2.054-1.456.814-.347 1.681-.52 2.6-.52 1.802 0 3.154.485 4.056 1.456.918.953 1.378 2.227 1.378 3.822v7.93h-1.95l-.13-2.314c-.364.728-.902 1.352-1.612 1.872-.694.503-1.63.754-2.808.754zm.338-1.846c.832 0 1.542-.217 2.132-.65.606-.433 1.066-.997 1.378-1.69s.468-1.421.468-2.184v-.026h-3.302c-1.283 0-2.193.225-2.73.676-.52.433-.78.979-.78 1.638 0 .676.242 1.222.728 1.638.502.399 1.204.598 2.106.598zm9.438 1.534v-12.896h1.976l.13 2.314c.416-.815 1.014-1.456 1.794-1.924s1.664-.702 2.652-.702c1.526 0 2.739.468 3.64 1.404.919.919 1.378 2.34 1.378 4.264v7.54h-2.184v-7.306c0-2.687-1.109-4.03-3.328-4.03-1.109 0-2.036.407-2.782 1.222-.728.797-1.092 1.941-1.092 3.432v6.682zm20.729.312c-1.283 0-2.409-.295-3.38-.884-.953-.589-1.699-1.395-2.236-2.418-.52-1.023-.78-2.184-.78-3.484s.269-2.453.806-3.458c.537-1.023 1.283-1.82 2.236-2.392.953-.589 2.08-.884 3.38-.884 1.057 0 1.993.217 2.808.65s1.447 1.04 1.898 1.82v-7.982h2.184v18.72h-1.976l-.208-2.132c-.416.624-1.014 1.187-1.794 1.69s-1.759.754-2.938.754zm.234-1.898c.867 0 1.629-.199 2.288-.598.676-.416 1.196-.988 1.56-1.716.381-.728.572-1.577.572-2.548s-.191-1.82-.572-2.548c-.364-.728-.884-1.291-1.56-1.69-.659-.416-1.421-.624-2.288-.624-.849 0-1.612.208-2.288.624-.659.399-1.179.962-1.56 1.69-.364.728-.546 1.577-.546 2.548s.182 1.82.546 2.548c.381.728.901 1.3 1.56 1.716.676.399 1.439.598 2.288.598zm-145.136 35.586v-12.896h1.976l.182 2.47c.399-.849 1.006-1.525 1.82-2.028.815-.503 1.82-.754 3.016-.754v2.288h-.598c-.762 0-1.464.139-2.106.416-.641.26-1.152.711-1.534 1.352-.381.641-.572 1.525-.572 2.652v6.5zm14.761.312c-1.23 0-2.322-.277-3.276-.832-.953-.572-1.707-1.361-2.262-2.366-.537-1.005-.806-2.193-.806-3.562 0-1.352.269-2.531.806-3.536.538-1.023 1.283-1.811 2.236-2.366.971-.572 2.089-.858 3.354-.858 1.248 0 2.323.286 3.224.858.919.555 1.621 1.291 2.106 2.21.486.919.728 1.907.728 2.964 0 .191-.008.381-.026.572v.65h-10.27c.052.988.278 1.811.676 2.47.416.641.928 1.127 1.534 1.456.624.329 1.283.494 1.976.494.902 0 1.656-.208 2.262-.624.607-.416 1.049-.979 1.326-1.69h2.158c-.346 1.196-1.014 2.193-2.002 2.99-.97.78-2.218 1.17-3.744 1.17zm0-11.674c-1.04 0-1.967.321-2.782.962-.797.624-1.256 1.543-1.378 2.756h8.112c-.052-1.161-.45-2.071-1.196-2.73-.745-.659-1.664-.988-2.756-.988zm9.005 11.362v-12.896h1.976l.13 2.314c.416-.815 1.014-1.456 1.794-1.924s1.664-.702 2.652-.702c1.525 0 2.739.468 3.64 1.404.919.919 1.378 2.34 1.378 4.264v7.54h-2.184v-7.306c0-2.687-1.109-4.03-3.328-4.03-1.109 0-2.037.407-2.782 1.222-.728.797-1.092 1.941-1.092 3.432v6.682zm20.729.312c-1.283 0-2.409-.295-3.38-.884-.953-.589-1.699-1.395-2.236-2.418-.52-1.023-.78-2.184-.78-3.484s.269-2.453.806-3.458c.537-1.023 1.283-1.82 2.236-2.392.953-.589 2.08-.884 3.38-.884 1.057 0 1.993.217 2.808.65s1.447 1.04 1.898 1.82v-7.982h2.184v18.72h-1.976l-.208-2.132c-.416.624-1.014 1.187-1.794 1.69s-1.759.754-2.938.754zm.234-1.898c.867 0 1.629-.199 2.288-.598.676-.416 1.196-.988 1.56-1.716.381-.728.572-1.577.572-2.548s-.191-1.82-.572-2.548c-.364-.728-.884-1.291-1.56-1.69-.659-.416-1.421-.624-2.288-.624-.849 0-1.612.208-2.288.624-.659.399-1.179.962-1.56 1.69-.364.728-.546 1.577-.546 2.548s.182 1.82.546 2.548c.381.728.901 1.3 1.56 1.716.676.399 1.439.598 2.288.598zm16.04 1.898c-1.231 0-2.323-.277-3.276-.832-.953-.572-1.707-1.361-2.262-2.366-.537-1.005-.806-2.193-.806-3.562 0-1.352.269-2.531.806-3.536.537-1.023 1.283-1.811 2.236-2.366.971-.572 2.089-.858 3.354-.858 1.248 0 2.323.286 3.224.858.919.555 1.621 1.291 2.106 2.21s.728 1.907.728 2.964c0 .191-.009.381-.026.572v.65h-10.27c.052.988.277 1.811.676 2.47.416.641.927 1.127 1.534 1.456.624.329 1.283.494 1.976.494.901 0 1.655-.208 2.262-.624s1.049-.979 1.326-1.69h2.158c-.347 1.196-1.014 2.193-2.002 2.99-.971.78-2.219 1.17-3.744 1.17zm0-11.674c-1.04 0-1.967.321-2.782.962-.797.624-1.257 1.543-1.378 2.756h8.112c-.052-1.161-.451-2.071-1.196-2.73s-1.664-.988-2.756-.988zm9.005 11.362v-12.896h1.976l.182 2.47c.398-.849 1.005-1.525 1.82-2.028.814-.503 1.82-.754 3.016-.754v2.288h-.598c-.763 0-1.465.139-2.106.416-.642.26-1.153.711-1.534 1.352-.382.641-.572 1.525-.572 2.652v6.5zm14.761.312c-1.231 0-2.323-.277-3.276-.832-.954-.572-1.708-1.361-2.262-2.366-.538-1.005-.806-2.193-.806-3.562 0-1.352.268-2.531.806-3.536.537-1.023 1.282-1.811 2.236-2.366.97-.572 2.088-.858 3.354-.858 1.248 0 2.322.286 3.224.858.918.555 1.62 1.291 2.106 2.21.485.919.728 1.907.728 2.964 0 .191-.009.381-.026.572v.65h-10.27c.052.988.277 1.811.676 2.47.416.641.927 1.127 1.534 1.456.624.329 1.282.494 1.976.494.901 0 1.655-.208 2.262-.624.606-.416 1.048-.979 1.326-1.69h2.158c-.347 1.196-1.014 2.193-2.002 2.99-.971.78-2.219 1.17-3.744 1.17zm0-11.674c-1.04 0-1.968.321-2.782.962-.798.624-1.257 1.543-1.378 2.756h8.112c-.052-1.161-.451-2.071-1.196-2.73-.746-.659-1.664-.988-2.756-.988zm14.854 11.674c-1.282 0-2.409-.295-3.38-.884-.953-.589-1.698-1.395-2.236-2.418-.52-1.023-.78-2.184-.78-3.484s.269-2.453.806-3.458c.538-1.023 1.283-1.82 2.236-2.392.954-.589 2.08-.884 3.38-.884 1.058 0 1.994.217 2.808.65.815.433 1.448 1.04 1.898 1.82v-7.982h2.184v18.72h-1.976l-.208-2.132c-.416.624-1.014 1.187-1.794 1.69s-1.759.754-2.938.754zm.234-1.898c.867 0 1.63-.199 2.288-.598.676-.416 1.196-.988 1.56-1.716.382-.728.572-1.577.572-2.548s-.19-1.82-.572-2.548c-.364-.728-.884-1.291-1.56-1.69-.658-.416-1.421-.624-2.288-.624-.849 0-1.612.208-2.288.624-.658.399-1.178.962-1.56 1.69-.364.728-.546 1.577-.546 2.548s.182 1.82.546 2.548c.382.728.902 1.3 1.56 1.716.676.399 1.439.598 2.288.598zm10.997 1.716c-.434 0-.798-.139-1.092-.416-.278-.295-.416-.65-.416-1.066s.138-.763.416-1.04c.294-.295.658-.442 1.092-.442.416 0 .762.147 1.04.442.294.277.442.624.442 1.04s-.148.771-.442 1.066c-.278.277-.624.416-1.04.416z" fill="#0a0a0b"/><rect fill="#fcfcfd" height="213.045" rx="8" stroke="#ededee" stroke-width="2" width="352.857" x="534.857" y="77.5825"/><path d="m595.178 160v-18.2h6.396c1.283 0 2.34.208 3.172.624.849.399 1.482.953 1.898 1.664.416.693.624 1.473.624 2.34 0 1.179-.321 2.106-.962 2.782-.624.676-1.378 1.144-2.262 1.404.676.121 1.291.39 1.846.806s.988.936 1.3 1.56c.329.624.494 1.309.494 2.054 0 .919-.225 1.759-.676 2.522-.451.745-1.118 1.343-2.002 1.794-.884.433-1.959.65-3.224.65zm2.184-10.244h4.056c1.161 0 2.054-.269 2.678-.806.624-.555.936-1.317.936-2.288 0-.919-.312-1.655-.936-2.21-.607-.555-1.525-.832-2.756-.832h-3.978zm0 8.424h4.186c1.248 0 2.21-.286 2.886-.858.676-.589 1.014-1.404 1.014-2.444 0-1.023-.355-1.837-1.066-2.444-.711-.624-1.673-.936-2.886-.936h-4.134zm13.327 1.82v-12.896h1.976l.182 2.47c.398-.849 1.005-1.525 1.82-2.028.814-.503 1.82-.754 3.016-.754v2.288h-.598c-.763 0-1.465.139-2.106.416-.642.26-1.153.711-1.534 1.352-.382.641-.572 1.525-.572 2.652v6.5zm14.838.312c-1.213 0-2.305-.277-3.276-.832-.97-.555-1.742-1.335-2.314-2.34-.554-1.023-.832-2.219-.832-3.588s.286-2.557.858-3.562c.572-1.023 1.344-1.811 2.314-2.366.988-.555 2.089-.832 3.302-.832 1.214 0 2.306.277 3.276.832.971.555 1.734 1.343 2.288 2.366.572 1.005.858 2.193.858 3.562s-.286 2.565-.858 3.588c-.572 1.005-1.352 1.785-2.34 2.34-.97.555-2.062.832-3.276.832zm0-1.872c.746 0 1.439-.182 2.08-.546.642-.364 1.162-.91 1.56-1.638.399-.728.598-1.629.598-2.704s-.199-1.976-.598-2.704c-.381-.728-.892-1.274-1.534-1.638-.641-.364-1.326-.546-2.054-.546-.745 0-1.438.182-2.08.546-.641.364-1.161.91-1.56 1.638-.398.728-.598 1.629-.598 2.704s.2 1.976.598 2.704c.399.728.91 1.274 1.534 1.638.642.364 1.326.546 2.054.546zm11.629 1.56-3.77-12.896h2.184l2.73 10.114 3.016-10.114h2.47l3.042 10.114 2.704-10.114h2.21l-3.77 12.896h-2.236l-3.172-10.634-3.172 10.634zm21.941.312c-1.542 0-2.825-.39-3.848-1.17-1.022-.78-1.62-1.837-1.794-3.172h2.236c.139.676.494 1.265 1.066 1.768.59.485 1.378.728 2.366.728.919 0 1.595-.191 2.028-.572.434-.399.65-.867.65-1.404 0-.78-.286-1.3-.858-1.56-.554-.26-1.343-.494-2.366-.702-.693-.139-1.386-.338-2.08-.598-.693-.26-1.274-.624-1.742-1.092-.468-.485-.702-1.118-.702-1.898 0-1.127.416-2.045 1.248-2.756.85-.728 1.994-1.092 3.432-1.092 1.37 0 2.488.347 3.354 1.04.884.676 1.396 1.647 1.534 2.912h-2.158c-.086-.659-.372-1.17-.858-1.534-.468-.381-1.1-.572-1.898-.572-.78 0-1.386.165-1.82.494-.416.329-.624.763-.624 1.3 0 .52.269.927.806 1.222.555.295 1.3.546 2.236.754.798.173 1.552.39 2.262.65.728.243 1.318.615 1.768 1.118.468.485.702 1.196.702 2.132.018 1.161-.424 2.123-1.326 2.886-.884.745-2.088 1.118-3.614 1.118zm13.858 0c-1.23 0-2.322-.277-3.276-.832-.953-.572-1.707-1.361-2.262-2.366-.537-1.005-.806-2.193-.806-3.562 0-1.352.269-2.531.806-3.536.538-1.023 1.283-1.811 2.236-2.366.971-.572 2.089-.858 3.354-.858 1.248 0 2.323.286 3.224.858.919.555 1.621 1.291 2.106 2.21.486.919.728 1.907.728 2.964 0 .191-.008.381-.026.572v.65h-10.27c.052.988.278 1.811.676 2.47.416.641.928 1.127 1.534 1.456.624.329 1.283.494 1.976.494.902 0 1.656-.208 2.262-.624.607-.416 1.049-.979 1.326-1.69h2.158c-.346 1.196-1.014 2.193-2.002 2.99-.97.78-2.218 1.17-3.744 1.17zm0-11.674c-1.04 0-1.967.321-2.782.962-.797.624-1.256 1.543-1.378 2.756h8.112c-.052-1.161-.45-2.071-1.196-2.73-.745-.659-1.664-.988-2.756-.988zm9.005 11.362v-12.896h1.976l.182 2.47c.399-.849 1.005-1.525 1.82-2.028s1.82-.754 3.016-.754v2.288h-.598c-.763 0-1.465.139-2.106.416-.641.26-1.153.711-1.534 1.352s-.572 1.525-.572 2.652v6.5zm22.176.312c-1.282 0-2.409-.295-3.38-.884-.953-.589-1.698-1.395-2.236-2.418-.52-1.023-.78-2.184-.78-3.484s.269-2.453.806-3.458c.538-1.023 1.283-1.82 2.236-2.392.954-.589 2.08-.884 3.38-.884 1.058 0 1.994.217 2.808.65.815.433 1.448 1.04 1.898 1.82v-7.982h2.184v18.72h-1.976l-.208-2.132c-.416.624-1.014 1.187-1.794 1.69s-1.759.754-2.938.754zm.234-1.898c.867 0 1.63-.199 2.288-.598.676-.416 1.196-.988 1.56-1.716.382-.728.572-1.577.572-2.548s-.19-1.82-.572-2.548c-.364-.728-.884-1.291-1.56-1.69-.658-.416-1.421-.624-2.288-.624-.849 0-1.612.208-2.288.624-.658.399-1.178.962-1.56 1.69-.364.728-.546 1.577-.546 2.548s.182 1.82.546 2.548c.382.728.902 1.3 1.56 1.716.676.399 1.439.598 2.288.598zm16.118 1.898c-1.213 0-2.305-.277-3.276-.832-.97-.555-1.742-1.335-2.314-2.34-.554-1.023-.832-2.219-.832-3.588s.286-2.557.858-3.562c.572-1.023 1.344-1.811 2.314-2.366.988-.555 2.089-.832 3.302-.832 1.214 0 2.306.277 3.276.832.971.555 1.734 1.343 2.288 2.366.572 1.005.858 2.193.858 3.562s-.286 2.565-.858 3.588c-.572 1.005-1.352 1.785-2.34 2.34-.97.555-2.062.832-3.276.832zm0-1.872c.746 0 1.439-.182 2.08-.546.642-.364 1.162-.91 1.56-1.638.399-.728.598-1.629.598-2.704s-.199-1.976-.598-2.704c-.381-.728-.892-1.274-1.534-1.638-.641-.364-1.326-.546-2.054-.546-.745 0-1.438.182-2.08.546-.641.364-1.161.91-1.56 1.638-.398.728-.598 1.629-.598 2.704s.2 1.976.598 2.704c.399.728.91 1.274 1.534 1.638.642.364 1.326.546 2.054.546zm11.629 1.56-3.77-12.896h2.184l2.73 10.114 3.016-10.114h2.47l3.042 10.114 2.704-10.114h2.21l-3.77 12.896h-2.236l-3.172-10.634-3.172 10.634zm17.001 0v-12.896h1.976l.13 2.314c.416-.815 1.014-1.456 1.794-1.924s1.664-.702 2.652-.702c1.526 0 2.739.468 3.64 1.404.919.919 1.378 2.34 1.378 4.264v7.54h-2.184v-7.306c0-2.687-1.109-4.03-3.328-4.03-1.109 0-2.036.407-2.782 1.222-.728.797-1.092 1.941-1.092 3.432v6.682zm14.879 0v-18.72h2.184v18.72zm11.64.312c-1.214 0-2.306-.277-3.276-.832-.971-.555-1.742-1.335-2.314-2.34-.555-1.023-.832-2.219-.832-3.588s.286-2.557.858-3.562c.572-1.023 1.343-1.811 2.314-2.366.988-.555 2.088-.832 3.302-.832 1.213 0 2.305.277 3.276.832.97.555 1.733 1.343 2.288 2.366.572 1.005.858 2.193.858 3.562s-.286 2.565-.858 3.588c-.572 1.005-1.352 1.785-2.34 2.34-.971.555-2.063.832-3.276.832zm0-1.872c.745 0 1.438-.182 2.08-.546.641-.364 1.161-.91 1.56-1.638.398-.728.598-1.629.598-2.704s-.2-1.976-.598-2.704c-.382-.728-.893-1.274-1.534-1.638-.642-.364-1.326-.546-2.054-.546-.746 0-1.439.182-2.08.546-.642.364-1.162.91-1.56 1.638-.399.728-.598 1.629-.598 2.704s.199 1.976.598 2.704c.398.728.91 1.274 1.534 1.638.641.364 1.326.546 2.054.546zm13.801 1.872c-1.075 0-1.968-.182-2.678-.546-.711-.364-1.24-.849-1.586-1.456-.347-.607-.52-1.265-.52-1.976 0-1.317.502-2.331 1.508-3.042 1.005-.711 2.374-1.066 4.108-1.066h3.484v-.156c0-1.127-.295-1.976-.884-2.548-.59-.589-1.378-.884-2.366-.884-.85 0-1.586.217-2.21.65-.607.416-.988 1.031-1.144 1.846h-2.236c.086-.936.398-1.725.936-2.366.554-.641 1.239-1.127 2.054-1.456.814-.347 1.681-.52 2.6-.52 1.802 0 3.154.485 4.056 1.456.918.953 1.378 2.227 1.378 3.822v7.93h-1.95l-.13-2.314c-.364.728-.902 1.352-1.612 1.872-.694.503-1.63.754-2.808.754zm.338-1.846c.832 0 1.542-.217 2.132-.65.606-.433 1.066-.997 1.378-1.69s.468-1.421.468-2.184v-.026h-3.302c-1.283 0-2.193.225-2.73.676-.52.433-.78.979-.78 1.638 0 .676.242 1.222.728 1.638.502.399 1.204.598 2.106.598zm15.288 1.846c-1.283 0-2.409-.295-3.38-.884-.953-.589-1.699-1.395-2.236-2.418-.52-1.023-.78-2.184-.78-3.484s.269-2.453.806-3.458c.537-1.023 1.283-1.82 2.236-2.392.953-.589 2.08-.884 3.38-.884 1.057 0 1.993.217 2.808.65s1.447 1.04 1.898 1.82v-7.982h2.184v18.72h-1.976l-.208-2.132c-.416.624-1.014 1.187-1.794 1.69s-1.759.754-2.938.754zm.234-1.898c.867 0 1.629-.199 2.288-.598.676-.416 1.196-.988 1.56-1.716.381-.728.572-1.577.572-2.548s-.191-1.82-.572-2.548c-.364-.728-.884-1.291-1.56-1.69-.659-.416-1.421-.624-2.288-.624-.849 0-1.612.208-2.288.624-.659.399-1.179.962-1.56 1.69-.364.728-.546 1.577-.546 2.548s.182 1.82.546 2.548c.381.728.901 1.3 1.56 1.716.676.399 1.439.598 2.288.598zm15.182 1.898c-1.543 0-2.825-.39-3.848-1.17s-1.621-1.837-1.794-3.172h2.236c.139.676.494 1.265 1.066 1.768.589.485 1.378.728 2.366.728.919 0 1.595-.191 2.028-.572.433-.399.65-.867.65-1.404 0-.78-.286-1.3-.858-1.56-.555-.26-1.343-.494-2.366-.702-.693-.139-1.387-.338-2.08-.598s-1.274-.624-1.742-1.092c-.468-.485-.702-1.118-.702-1.898 0-1.127.416-2.045 1.248-2.756.849-.728 1.993-1.092 3.432-1.092 1.369 0 2.487.347 3.354 1.04.884.676 1.395 1.647 1.534 2.912h-2.158c-.087-.659-.373-1.17-.858-1.534-.468-.381-1.101-.572-1.898-.572-.78 0-1.387.165-1.82.494-.416.329-.624.763-.624 1.3 0 .52.269.927.806 1.222.555.295 1.3.546 2.236.754.797.173 1.551.39 2.262.65.728.243 1.317.615 1.768 1.118.468.485.702 1.196.702 2.132.017 1.161-.425 2.123-1.326 2.886-.884.745-2.089 1.118-3.614 1.118zm-211.316 34c-1.075 0-1.967-.182-2.678-.546s-1.239-.849-1.586-1.456-.52-1.265-.52-1.976c0-1.317.503-2.331 1.508-3.042s2.375-1.066 4.108-1.066h3.484v-.156c0-1.127-.295-1.976-.884-2.548-.589-.589-1.378-.884-2.366-.884-.849 0-1.586.217-2.21.65-.607.416-.988 1.031-1.144 1.846h-2.236c.087-.936.399-1.725.936-2.366.555-.641 1.239-1.127 2.054-1.456.815-.347 1.681-.52 2.6-.52 1.803 0 3.155.485 4.056 1.456.919.953 1.378 2.227 1.378 3.822v7.93h-1.95l-.13-2.314c-.364.728-.901 1.352-1.612 1.872-.693.503-1.629.754-2.808.754zm.338-1.846c.832 0 1.543-.217 2.132-.65.607-.433 1.066-.997 1.378-1.69s.468-1.421.468-2.184v-.026h-3.302c-1.283 0-2.193.225-2.73.676-.52.433-.78.979-.78 1.638 0 .676.243 1.222.728 1.638.503.399 1.205.598 2.106.598zm9.438 1.534v-12.896h1.976l.13 2.314c.416-.815 1.014-1.456 1.794-1.924s1.664-.702 2.652-.702c1.526 0 2.739.468 3.64 1.404.919.919 1.378 2.34 1.378 4.264v7.54h-2.184v-7.306c0-2.687-1.109-4.03-3.328-4.03-1.109 0-2.036.407-2.782 1.222-.728.797-1.092 1.941-1.092 3.432v6.682zm20.729.312c-1.282 0-2.409-.295-3.38-.884-.953-.589-1.698-1.395-2.236-2.418-.52-1.023-.78-2.184-.78-3.484s.269-2.453.806-3.458c.538-1.023 1.283-1.82 2.236-2.392.954-.589 2.08-.884 3.38-.884 1.058 0 1.994.217 2.808.65.815.433 1.448 1.04 1.898 1.82v-7.982h2.184v18.72h-1.976l-.208-2.132c-.416.624-1.014 1.187-1.794 1.69s-1.759.754-2.938.754zm.234-1.898c.867 0 1.63-.199 2.288-.598.676-.416 1.196-.988 1.56-1.716.382-.728.572-1.577.572-2.548s-.19-1.82-.572-2.548c-.364-.728-.884-1.291-1.56-1.69-.658-.416-1.421-.624-2.288-.624-.849 0-1.612.208-2.288.624-.658.399-1.178.962-1.56 1.69-.364.728-.546 1.577-.546 2.548s.182 1.82.546 2.548c.382.728.902 1.3 1.56 1.716.676.399 1.439.598 2.288.598zm17.123 1.586v-12.896h1.976l.182 2.47c.399-.849 1.006-1.525 1.82-2.028.815-.503 1.82-.754 3.016-.754v2.288h-.598c-.762 0-1.464.139-2.106.416-.641.26-1.152.711-1.534 1.352-.381.641-.572 1.525-.572 2.652v6.5zm14.152.312c-1.526 0-2.739-.459-3.64-1.378-.902-.936-1.352-2.366-1.352-4.29v-7.54h2.184v7.306c0 2.687 1.1 4.03 3.302 4.03 1.126 0 2.054-.399 2.782-1.196.745-.815 1.118-1.967 1.118-3.458v-6.682h2.184v12.896h-1.976l-.156-2.314c-.399.815-.997 1.456-1.794 1.924-.78.468-1.664.702-2.652.702zm10.173-.312v-12.896h1.976l.13 2.314c.416-.815 1.014-1.456 1.794-1.924s1.664-.702 2.652-.702c1.525 0 2.738.468 3.64 1.404.918.919 1.378 2.34 1.378 4.264v7.54h-2.184v-7.306c0-2.687-1.11-4.03-3.328-4.03-1.11 0-2.037.407-2.782 1.222-.728.797-1.092 1.941-1.092 3.432v6.682zm19.819.312c-1.543 0-2.826-.39-3.848-1.17-1.023-.78-1.621-1.837-1.794-3.172h2.236c.138.676.494 1.265 1.066 1.768.589.485 1.378.728 2.366.728.918 0 1.594-.191 2.028-.572.433-.399.65-.867.65-1.404 0-.78-.286-1.3-.858-1.56-.555-.26-1.344-.494-2.366-.702-.694-.139-1.387-.338-2.08-.598-.694-.26-1.274-.624-1.742-1.092-.468-.485-.702-1.118-.702-1.898 0-1.127.416-2.045 1.248-2.756.849-.728 1.993-1.092 3.432-1.092 1.369 0 2.487.347 3.354 1.04.884.676 1.395 1.647 1.534 2.912h-2.158c-.087-.659-.373-1.17-.858-1.534-.468-.381-1.101-.572-1.898-.572-.78 0-1.387.165-1.82.494-.416.329-.624.763-.624 1.3 0 .52.268.927.806 1.222.554.295 1.3.546 2.236.754.797.173 1.551.39 2.262.65.728.243 1.317.615 1.768 1.118.468.485.702 1.196.702 2.132.017 1.161-.425 2.123-1.326 2.886-.884.745-2.089 1.118-3.614 1.118zm20.036-.312c-1.178 0-2.106-.286-2.782-.858s-1.014-1.603-1.014-3.094v-7.098h-2.236v-1.846h2.236l.286-3.094h1.898v3.094h3.796v1.846h-3.796v7.098c0 .815.165 1.369.494 1.664.33.277.91.416 1.742.416h1.352v1.872zm4.959 0v-18.72h2.184v8.034c.433-.797 1.049-1.413 1.846-1.846.797-.451 1.664-.676 2.6-.676 1.491 0 2.687.468 3.588 1.404.901.919 1.352 2.34 1.352 4.264v7.54h-2.158v-7.306c0-2.687-1.083-4.03-3.25-4.03-1.127 0-2.071.407-2.834 1.222-.763.797-1.144 1.941-1.144 3.432v6.682zm20.677.312c-1.231 0-2.323-.277-3.276-.832-.953-.572-1.707-1.361-2.262-2.366-.537-1.005-.806-2.193-.806-3.562 0-1.352.269-2.531.806-3.536.537-1.023 1.283-1.811 2.236-2.366.971-.572 2.089-.858 3.354-.858 1.248 0 2.323.286 3.224.858.919.555 1.621 1.291 2.106 2.21s.728 1.907.728 2.964c0 .191-.009.381-.026.572v.65h-10.27c.052.988.277 1.811.676 2.47.416.641.927 1.127 1.534 1.456.624.329 1.283.494 1.976.494.901 0 1.655-.208 2.262-.624s1.049-.979 1.326-1.69h2.158c-.347 1.196-1.014 2.193-2.002 2.99-.971.78-2.219 1.17-3.744 1.17zm0-11.674c-1.04 0-1.967.321-2.782.962-.797.624-1.257 1.543-1.378 2.756h8.112c-.052-1.161-.451-2.071-1.196-2.73s-1.664-.988-2.756-.988zm20.072 11.674c-1.647 0-2.938-.459-3.874-1.378s-1.404-2.193-1.404-3.822h2.21c0 .919.225 1.69.676 2.314.45.624 1.239.936 2.366.936 1.092 0 1.846-.303 2.262-.91.433-.607.65-1.361.65-2.262v-13.39h2.184v13.39c0 1.612-.451 2.869-1.352 3.77-.884.901-2.124 1.352-3.718 1.352zm14.716 0c-1.334 0-2.496-.243-3.484-.728s-1.75-1.161-2.288-2.028c-.537-.867-.806-1.872-.806-3.016h2.288c0 .711.165 1.369.494 1.976.33.589.806 1.066 1.43 1.43.642.347 1.43.52 2.366.52 1.231 0 2.184-.295 2.86-.884s1.014-1.326 1.014-2.21c0-.728-.156-1.309-.468-1.742-.312-.451-.736-.815-1.274-1.092-.52-.277-1.126-.52-1.82-.728-.676-.208-1.386-.442-2.132-.702-1.404-.485-2.444-1.083-3.12-1.794-.676-.728-1.014-1.673-1.014-2.834-.017-.971.208-1.829.676-2.574.468-.763 1.127-1.352 1.976-1.768.867-.433 1.89-.65 3.068-.65 1.162 0 2.167.217 3.016.65.867.433 1.534 1.031 2.002 1.794.486.763.737 1.629.754 2.6h-2.288c0-.503-.13-.997-.39-1.482-.26-.503-.658-.91-1.196-1.222-.52-.312-1.178-.468-1.976-.468-.988-.017-1.802.234-2.444.754-.624.52-.936 1.239-.936 2.158 0 .78.217 1.378.65 1.794.451.416 1.075.763 1.872 1.04.798.26 1.716.563 2.756.91.867.312 1.647.676 2.34 1.092.694.416 1.231.953 1.612 1.612.399.659.598 1.499.598 2.522 0 .867-.225 1.69-.676 2.47-.45.763-1.135 1.387-2.054 1.872-.901.485-2.036.728-3.406.728zm17.31-16.068c-.433 0-.797-.139-1.092-.416-.277-.295-.416-.659-.416-1.092 0-.416.139-.763.416-1.04.295-.277.659-.416 1.092-.416.416 0 .772.139 1.066.416.295.277.442.624.442 1.04 0 .433-.147.797-.442 1.092-.294.277-.65.416-1.066.416zm-1.092 15.756v-12.896h2.184v12.896zm5.987 0v-12.896h1.976l.13 2.314c.416-.815 1.014-1.456 1.794-1.924s1.664-.702 2.652-.702c1.525 0 2.739.468 3.64 1.404.919.919 1.378 2.34 1.378 4.264v7.54h-2.184v-7.306c0-2.687-1.109-4.03-3.328-4.03-1.109 0-2.037.407-2.782 1.222-.728.797-1.092 1.941-1.092 3.432v6.682zm-159.241 34.312c-1.057 0-2.002-.217-2.834-.65-.815-.433-1.439-1.04-1.872-1.82l-.208 2.158h-1.976v-18.72h2.184v7.956c.416-.624 1.005-1.187 1.768-1.69.78-.503 1.768-.754 2.964-.754 1.283 0 2.401.295 3.354.884s1.69 1.395 2.21 2.418c.537 1.023.806 2.184.806 3.484s-.269 2.461-.806 3.484c-.52 1.005-1.265 1.803-2.236 2.392-.953.572-2.071.858-3.354.858zm-.234-1.898c.867 0 1.629-.199 2.288-.598.659-.416 1.179-.988 1.56-1.716s.572-1.577.572-2.548-.191-1.82-.572-2.548-.901-1.291-1.56-1.69c-.659-.416-1.421-.624-2.288-.624s-1.629.208-2.288.624c-.659.399-1.179.962-1.56 1.69s-.572 1.577-.572 2.548.191 1.82.572 2.548.901 1.3 1.56 1.716c.659.399 1.421.598 2.288.598zm13.96 1.898c-1.074 0-1.967-.182-2.678-.546-.71-.364-1.239-.849-1.586-1.456-.346-.607-.52-1.265-.52-1.976 0-1.317.503-2.331 1.508-3.042 1.006-.711 2.375-1.066 4.108-1.066h3.484v-.156c0-1.127-.294-1.976-.884-2.548-.589-.589-1.378-.884-2.366-.884-.849 0-1.586.217-2.21.65-.606.416-.988 1.031-1.144 1.846h-2.236c.087-.936.399-1.725.936-2.366.555-.641 1.24-1.127 2.054-1.456.815-.347 1.682-.52 2.6-.52 1.803 0 3.155.485 4.056 1.456.919.953 1.378 2.227 1.378 3.822v7.93h-1.95l-.13-2.314c-.364.728-.901 1.352-1.612 1.872-.693.503-1.629.754-2.808.754zm.338-1.846c.832 0 1.543-.217 2.132-.65.607-.433 1.066-.997 1.378-1.69s.468-1.421.468-2.184v-.026h-3.302c-1.282 0-2.192.225-2.73.676-.52.433-.78.979-.78 1.638 0 .676.243 1.222.728 1.638.503.399 1.205.598 2.106.598zm15.367 1.846c-1.231 0-2.34-.277-3.328-.832-.971-.572-1.742-1.361-2.314-2.366-.555-1.023-.832-2.21-.832-3.562s.277-2.531.832-3.536c.572-1.023 1.343-1.811 2.314-2.366.988-.572 2.097-.858 3.328-.858 1.525 0 2.808.399 3.848 1.196 1.057.797 1.724 1.863 2.002 3.198h-2.236c-.174-.797-.598-1.413-1.274-1.846-.676-.451-1.465-.676-2.366-.676-.728 0-1.413.182-2.054.546-.642.364-1.162.91-1.56 1.638-.399.728-.598 1.629-.598 2.704s.199 1.976.598 2.704c.398.728.918 1.283 1.56 1.664.641.364 1.326.546 2.054.546.901 0 1.69-.217 2.366-.65.676-.451 1.1-1.083 1.274-1.898h2.236c-.26 1.3-.919 2.357-1.976 3.172-1.058.815-2.349 1.222-3.874 1.222zm8.9-.312v-18.72h2.184v11.258l5.278-5.434h2.678l-5.72 5.824 6.448 7.072h-2.782l-5.902-6.682v6.682zm18.197-4.056c-.728 0-1.395-.095-2.002-.286l-1.3 1.222c.191.139.425.26.702.364.295.087.711.173 1.248.26.538.069 1.292.147 2.262.234 1.734.121 2.973.52 3.718 1.196.746.676 1.118 1.56 1.118 2.652 0 .745-.208 1.456-.624 2.132-.398.676-1.022 1.231-1.872 1.664-.832.433-1.906.65-3.224.65-1.161 0-2.192-.156-3.094-.468-.901-.295-1.603-.754-2.106-1.378-.502-.607-.754-1.378-.754-2.314 0-.485.13-1.014.39-1.586.26-.555.746-1.083 1.456-1.586-.381-.156-.71-.321-.988-.494-.26-.191-.502-.399-.728-.624v-.598l2.21-2.184c-1.022-.867-1.534-2.011-1.534-3.432 0-.849.2-1.621.598-2.314.399-.693.98-1.239 1.742-1.638.763-.416 1.69-.624 2.782-.624.746 0 1.422.104 2.028.312h4.758v1.638l-2.418.104c.503.728.754 1.569.754 2.522 0 .849-.208 1.621-.624 2.314-.398.693-.979 1.248-1.742 1.664-.745.399-1.664.598-2.756.598zm0-1.794c.919 0 1.647-.234 2.184-.702.555-.485.832-1.179.832-2.08 0-.884-.277-1.56-.832-2.028-.537-.485-1.265-.728-2.184-.728-.936 0-1.681.243-2.236.728-.537.468-.806 1.144-.806 2.028 0 .901.269 1.595.806 2.08.555.468 1.3.702 2.236.702zm-3.796 7.514c0 .867.364 1.508 1.092 1.924.728.433 1.638.65 2.73.65 1.075 0 1.933-.234 2.574-.702.659-.468.988-1.092.988-1.872 0-.555-.225-1.04-.676-1.456-.45-.399-1.282-.633-2.496-.702-.953-.069-1.776-.156-2.47-.26-.71.381-1.178.789-1.404 1.222-.225.451-.338.849-.338 1.196zm13.046-1.664v-12.896h1.976l.182 2.47c.399-.849 1.005-1.525 1.82-2.028s1.82-.754 3.016-.754v2.288h-.598c-.763 0-1.465.139-2.106.416-.641.26-1.153.711-1.534 1.352s-.572 1.525-.572 2.652v6.5zm14.839.312c-1.213 0-2.305-.277-3.276-.832s-1.742-1.335-2.314-2.34c-.555-1.023-.832-2.219-.832-3.588s.286-2.557.858-3.562c.572-1.023 1.343-1.811 2.314-2.366.988-.555 2.089-.832 3.302-.832s2.305.277 3.276.832 1.733 1.343 2.288 2.366c.572 1.005.858 2.193.858 3.562s-.286 2.565-.858 3.588c-.572 1.005-1.352 1.785-2.34 2.34-.971.555-2.063.832-3.276.832zm0-1.872c.745 0 1.439-.182 2.08-.546s1.161-.91 1.56-1.638.598-1.629.598-2.704-.199-1.976-.598-2.704c-.381-.728-.893-1.274-1.534-1.638s-1.326-.546-2.054-.546c-.745 0-1.439.182-2.08.546s-1.161.91-1.56 1.638-.598 1.629-.598 2.704.199 1.976.598 2.704.91 1.274 1.534 1.638c.641.364 1.326.546 2.054.546zm14.217 1.872c-1.526 0-2.739-.459-3.64-1.378-.902-.936-1.352-2.366-1.352-4.29v-7.54h2.184v7.306c0 2.687 1.1 4.03 3.302 4.03 1.126 0 2.054-.399 2.782-1.196.745-.815 1.118-1.967 1.118-3.458v-6.682h2.184v12.896h-1.976l-.156-2.314c-.399.815-.997 1.456-1.794 1.924-.78.468-1.664.702-2.652.702zm10.173-.312v-12.896h1.976l.13 2.314c.416-.815 1.014-1.456 1.794-1.924s1.664-.702 2.652-.702c1.525 0 2.738.468 3.64 1.404.918.919 1.378 2.34 1.378 4.264v7.54h-2.184v-7.306c0-2.687-1.11-4.03-3.328-4.03-1.11 0-2.037.407-2.782 1.222-.728.797-1.092 1.941-1.092 3.432v6.682zm20.729.312c-1.283 0-2.41-.295-3.38-.884-.954-.589-1.699-1.395-2.236-2.418-.52-1.023-.78-2.184-.78-3.484s.268-2.453.806-3.458c.537-1.023 1.282-1.82 2.236-2.392.953-.589 2.08-.884 3.38-.884 1.057 0 1.993.217 2.808.65.814.433 1.447 1.04 1.898 1.82v-7.982h2.184v18.72h-1.976l-.208-2.132c-.416.624-1.014 1.187-1.794 1.69s-1.76.754-2.938.754zm.234-1.898c.866 0 1.629-.199 2.288-.598.676-.416 1.196-.988 1.56-1.716.381-.728.572-1.577.572-2.548s-.191-1.82-.572-2.548c-.364-.728-.884-1.291-1.56-1.69-.659-.416-1.422-.624-2.288-.624-.85 0-1.612.208-2.288.624-.659.399-1.179.962-1.56 1.69-.364.728-.546 1.577-.546 2.548s.182 1.82.546 2.548c.381.728.901 1.3 1.56 1.716.676.399 1.438.598 2.288.598zm10.996 1.716c-.434 0-.798-.139-1.092-.416-.278-.295-.416-.65-.416-1.066s.138-.763.416-1.04c.294-.295.658-.442 1.092-.442.416 0 .762.147 1.04.442.294.277.442.624.442 1.04s-.148.771-.442 1.066c-.278.277-.624.416-1.04.416z" fill="#0a0a0b"/><rect fill="#fcfcfd" height="213.045" rx="8" stroke="#ededee" stroke-width="2" width="352.857" x="1004" y="78"/><path d="m1086.36 159v-18.2h2.19v8.034h9.43v-8.034h2.19v18.2h-2.19v-8.372h-9.43v8.372zm18.92 5.72 3.2-6.968h-.75l-5.13-11.648h2.37l4.26 10.036 4.53-10.036h2.26l-8.45 18.616zm17.68-5.408c-1.29 0-2.41-.295-3.38-.884-.96-.589-1.7-1.395-2.24-2.418-.52-1.023-.78-2.184-.78-3.484s.27-2.453.81-3.458c.53-1.023 1.28-1.82 2.23-2.392.96-.589 2.08-.884 3.38-.884 1.06 0 2 .217 2.81.65.82.433 1.45 1.04 1.9 1.82v-7.982h2.18v18.72h-1.97l-.21-2.132c-.42.624-1.02 1.187-1.8 1.69s-1.75.754-2.93.754zm.23-1.898c.87 0 1.63-.199 2.29-.598.67-.416 1.19-.988 1.56-1.716.38-.728.57-1.577.57-2.548s-.19-1.82-.57-2.548c-.37-.728-.89-1.291-1.56-1.69-.66-.416-1.42-.624-2.29-.624-.85 0-1.61.208-2.29.624-.66.399-1.18.962-1.56 1.69-.36.728-.54 1.577-.54 2.548s.18 1.82.54 2.548c.38.728.9 1.3 1.56 1.716.68.399 1.44.598 2.29.598zm10.24 1.586v-12.896h1.98l.18 2.47c.4-.849 1.01-1.525 1.82-2.028.82-.503 1.82-.754 3.02-.754v2.288h-.6c-.76 0-1.47.139-2.11.416-.64.26-1.15.711-1.53 1.352s-.57 1.525-.57 2.652v6.5zm13.74.312c-1.08 0-1.97-.182-2.68-.546s-1.24-.849-1.59-1.456c-.34-.607-.52-1.265-.52-1.976 0-1.317.51-2.331 1.51-3.042 1.01-.711 2.38-1.066 4.11-1.066h3.48v-.156c0-1.127-.29-1.976-.88-2.548-.59-.589-1.38-.884-2.37-.884-.85 0-1.58.217-2.21.65-.6.416-.98 1.031-1.14 1.846h-2.24c.09-.936.4-1.725.94-2.366.55-.641 1.24-1.127 2.05-1.456.82-.347 1.69-.52 2.6-.52 1.81 0 3.16.485 4.06 1.456.92.953 1.38 2.227 1.38 3.822v7.93h-1.95l-.13-2.314c-.37.728-.9 1.352-1.61 1.872-.7.503-1.63.754-2.81.754zm.34-1.846c.83 0 1.54-.217 2.13-.65.6-.433 1.06-.997 1.38-1.69.31-.693.46-1.421.46-2.184v-.026h-3.3c-1.28 0-2.19.225-2.73.676-.52.433-.78.979-.78 1.638 0 .676.24 1.222.73 1.638.5.399 1.2.598 2.11.598zm14.17 1.534c-1.17 0-2.1-.286-2.78-.858-.67-.572-1.01-1.603-1.01-3.094v-7.098h-2.24v-1.846h2.24l.28-3.094h1.9v3.094h3.8v1.846h-3.8v7.098c0 .815.17 1.369.5 1.664.33.277.91.416 1.74.416h1.35v1.872zm6.29-15.756c-.43 0-.8-.139-1.09-.416-.28-.295-.42-.659-.42-1.092 0-.416.14-.763.42-1.04.29-.277.66-.416 1.09-.416.42 0 .77.139 1.07.416.29.277.44.624.44 1.04 0 .433-.15.797-.44 1.092-.3.277-.65.416-1.07.416zm-1.09 15.756v-12.896h2.18v12.896zm11.86.312c-1.21 0-2.31-.277-3.28-.832s-1.74-1.335-2.31-2.34c-.55-1.023-.83-2.219-.83-3.588s.28-2.557.86-3.562c.57-1.023 1.34-1.811 2.31-2.366.99-.555 2.09-.832 3.3-.832 1.22 0 2.31.277 3.28.832s1.73 1.343 2.29 2.366c.57 1.005.85 2.193.85 3.562s-.28 2.565-.85 3.588c-.58 1.005-1.36 1.785-2.34 2.34-.97.555-2.07.832-3.28.832zm0-1.872c.75 0 1.44-.182 2.08-.546s1.16-.91 1.56-1.638.6-1.629.6-2.704-.2-1.976-.6-2.704c-.38-.728-.89-1.274-1.53-1.638-.65-.364-1.33-.546-2.06-.546-.74 0-1.44.182-2.08.546s-1.16.91-1.56 1.638-.6 1.629-.6 2.704.2 1.976.6 2.704.91 1.274 1.54 1.638c.64.364 1.32.546 2.05.546zm9.51 1.56v-12.896h1.98l.13 2.314c.41-.815 1.01-1.456 1.79-1.924s1.67-.702 2.65-.702c1.53 0 2.74.468 3.64 1.404.92.919 1.38 2.34 1.38 4.264v7.54h-2.18v-7.306c0-2.687-1.11-4.03-3.33-4.03-1.11 0-2.04.407-2.78 1.222-.73.797-1.09 1.941-1.09 3.432v6.682zm26.7.312c-1.54 0-2.82-.39-3.85-1.17-1.02-.78-1.62-1.837-1.79-3.172h2.23c.14.676.5 1.265 1.07 1.768.59.485 1.38.728 2.37.728.92 0 1.59-.191 2.02-.572.44-.399.65-.867.65-1.404 0-.78-.28-1.3-.85-1.56-.56-.26-1.35-.494-2.37-.702-.69-.139-1.39-.338-2.08-.598s-1.27-.624-1.74-1.092c-.47-.485-.7-1.118-.7-1.898 0-1.127.41-2.045 1.24-2.756.85-.728 2-1.092 3.44-1.092 1.37 0 2.48.347 3.35 1.04.88.676 1.4 1.647 1.53 2.912h-2.15c-.09-.659-.38-1.17-.86-1.534-.47-.381-1.1-.572-1.9-.572-.78 0-1.39.165-1.82.494-.42.329-.62.763-.62 1.3 0 .52.27.927.8 1.222.56.295 1.3.546 2.24.754.8.173 1.55.39 2.26.65.73.243 1.32.615 1.77 1.118.47.485.7 1.196.7 2.132.02 1.161-.42 2.123-1.33 2.886-.88.745-2.08 1.118-3.61 1.118zm12.57-.312c-1.18 0-2.1-.286-2.78-.858s-1.01-1.603-1.01-3.094v-7.098h-2.24v-1.846h2.24l.28-3.094h1.9v3.094h3.8v1.846h-3.8v7.098c0 .815.17 1.369.49 1.664.33.277.91.416 1.75.416h1.35v1.872zm10.4.312c-1.23 0-2.32-.277-3.27-.832-.96-.572-1.71-1.361-2.26-2.366-.54-1.005-.81-2.193-.81-3.562 0-1.352.27-2.531.81-3.536.53-1.023 1.28-1.811 2.23-2.366.97-.572 2.09-.858 3.36-.858 1.24 0 2.32.286 3.22.858.92.555 1.62 1.291 2.11 2.21.48.919.72 1.907.72 2.964 0 .191 0 .381-.02.572v.65h-10.27c.05.988.28 1.811.67 2.47.42.641.93 1.127 1.54 1.456.62.329 1.28.494 1.97.494.91 0 1.66-.208 2.27-.624.6-.416 1.04-.979 1.32-1.69h2.16c-.35 1.196-1.01 2.193-2 2.99-.97.78-2.22 1.17-3.75 1.17zm0-11.674c-1.04 0-1.96.321-2.78.962-.8.624-1.25 1.543-1.38 2.756h8.12c-.06-1.161-.45-2.071-1.2-2.73s-1.66-.988-2.76-.988zm9.01 17.082v-18.616h1.97l.21 2.132c.42-.624 1.01-1.187 1.77-1.69.78-.503 1.77-.754 2.96-.754 1.29 0 2.41.295 3.36.884s1.69 1.395 2.21 2.418c.54 1.023.8 2.184.8 3.484s-.26 2.461-.8 3.484c-.52 1.005-1.27 1.803-2.24 2.392-.95.572-2.07.858-3.35.858-1.06 0-2-.217-2.84-.65-.81-.433-1.43-1.04-1.87-1.82v7.878zm6.65-7.306c.87 0 1.63-.199 2.29-.598.66-.416 1.18-.988 1.56-1.716s.57-1.577.57-2.548-.19-1.82-.57-2.548-.9-1.291-1.56-1.69c-.66-.416-1.42-.624-2.29-.624-.86 0-1.62.208-2.28.624-.66.399-1.18.962-1.56 1.69s-.58 1.577-.58 2.548.2 1.82.58 2.548.9 1.3 1.56 1.716c.66.399 1.42.598 2.28.598zm17.88-14.17c-.43 0-.8-.139-1.09-.416-.28-.295-.42-.659-.42-1.092 0-.416.14-.763.42-1.04.29-.277.66-.416 1.09-.416.42 0 .77.139 1.07.416.29.277.44.624.44 1.04 0 .433-.15.797-.44 1.092-.3.277-.65.416-1.07.416zm-1.09 15.756v-12.896h2.18v12.896zm10.93.312c-1.55 0-2.83-.39-3.85-1.17s-1.62-1.837-1.8-3.172h2.24c.14.676.49 1.265 1.07 1.768.59.485 1.37.728 2.36.728.92 0 1.6-.191 2.03-.572.43-.399.65-.867.65-1.404 0-.78-.29-1.3-.86-1.56-.55-.26-1.34-.494-2.36-.702-.7-.139-1.39-.338-2.08-.598-.7-.26-1.28-.624-1.75-1.092-.46-.485-.7-1.118-.7-1.898 0-1.127.42-2.045 1.25-2.756.85-.728 1.99-1.092 3.43-1.092 1.37 0 2.49.347 3.36 1.04.88.676 1.39 1.647 1.53 2.912h-2.16c-.08-.659-.37-1.17-.86-1.534-.46-.381-1.1-.572-1.89-.572-.78 0-1.39.165-1.82.494-.42.329-.63.763-.63 1.3 0 .52.27.927.81 1.222.55.295 1.3.546 2.23.754.8.173 1.56.39 2.27.65.72.243 1.31.615 1.76 1.118.47.485.71 1.196.71 2.132.01 1.161-.43 2.123-1.33 2.886-.88.745-2.09 1.118-3.61 1.118zm-234.03 34c-1.23 0-2.34-.277-3.33-.832-.97-.572-1.74-1.361-2.31-2.366-.56-1.023-.84-2.21-.84-3.562s.28-2.531.84-3.536c.57-1.023 1.34-1.811 2.31-2.366.99-.572 2.1-.858 3.33-.858 1.52 0 2.81.399 3.85 1.196 1.05.797 1.72 1.863 2 3.198h-2.24c-.17-.797-.6-1.413-1.27-1.846-.68-.451-1.47-.676-2.37-.676-.73 0-1.41.182-2.05.546s-1.16.91-1.56 1.638-.6 1.629-.6 2.704.2 1.976.6 2.704.92 1.283 1.56 1.664c.64.364 1.32.546 2.05.546.9 0 1.69-.217 2.37-.65.67-.451 1.1-1.083 1.27-1.898h2.24c-.26 1.3-.92 2.357-1.98 3.172-1.05.815-2.35 1.222-3.87 1.222zm14.78 0c-1.22 0-2.31-.277-3.28-.832s-1.74-1.335-2.31-2.34c-.56-1.023-.84-2.219-.84-3.588s.29-2.557.86-3.562c.57-1.023 1.34-1.811 2.32-2.366s2.08-.832 3.3-.832c1.21 0 2.3.277 3.27.832s1.74 1.343 2.29 2.366c.57 1.005.86 2.193.86 3.562s-.29 2.565-.86 3.588c-.57 1.005-1.35 1.785-2.34 2.34-.97.555-2.06.832-3.27.832zm0-1.872c.74 0 1.43-.182 2.08-.546.64-.364 1.16-.91 1.56-1.638.39-.728.59-1.629.59-2.704s-.2-1.976-.59-2.704-.9-1.274-1.54-1.638-1.32-.546-2.05-.546c-.75 0-1.44.182-2.08.546s-1.16.91-1.56 1.638-.6 1.629-.6 2.704.2 1.976.6 2.704.91 1.274 1.53 1.638c.64.364 1.33.546 2.06.546zm9.51 1.56v-12.896h1.97l.16 1.872c.41-.693.97-1.231 1.66-1.612.7-.381 1.48-.572 2.34-.572 1.02 0 1.9.208 2.63.624.74.416 1.32 1.049 1.71 1.898.45-.78 1.07-1.395 1.85-1.846.8-.451 1.66-.676 2.57-.676 1.55 0 2.78.468 3.7 1.404.91.919 1.37 2.34 1.37 4.264v7.54h-2.15v-7.306c0-1.335-.27-2.34-.81-3.016s-1.31-1.014-2.31-1.014c-1.04 0-1.91.407-2.6 1.222-.68.797-1.02 1.941-1.02 3.432v6.682h-2.18v-7.306c0-1.335-.27-2.34-.81-3.016s-1.31-1.014-2.31-1.014c-1.02 0-1.88.407-2.58 1.222-.67.797-1.01 1.941-1.01 3.432v6.682zm23.25 5.72v-18.616h1.98l.21 2.132c.41-.624 1-1.187 1.77-1.69.78-.503 1.76-.754 2.96-.754 1.28 0 2.4.295 3.35.884.96.589 1.69 1.395 2.21 2.418.54 1.023.81 2.184.81 3.484s-.27 2.461-.81 3.484c-.52 1.005-1.26 1.803-2.23 2.392-.96.572-2.07.858-3.36.858-1.05 0-2-.217-2.83-.65-.82-.433-1.44-1.04-1.87-1.82v7.878zm6.66-7.306c.87 0 1.63-.199 2.29-.598.66-.416 1.18-.988 1.56-1.716s.57-1.577.57-2.548-.19-1.82-.57-2.548-.9-1.291-1.56-1.69c-.66-.416-1.42-.624-2.29-.624s-1.63.208-2.29.624c-.66.399-1.18.962-1.56 1.69s-.57 1.577-.57 2.548.19 1.82.57 2.548.9 1.3 1.56 1.716c.66.399 1.42.598 2.29.598zm9.67 1.586v-18.72h2.18v18.72zm11.56.312c-1.23 0-2.32-.277-3.27-.832-.96-.572-1.71-1.361-2.27-2.366-.53-1.005-.8-2.193-.8-3.562 0-1.352.27-2.531.8-3.536.54-1.023 1.29-1.811 2.24-2.366.97-.572 2.09-.858 3.35-.858 1.25 0 2.33.286 3.23.858.92.555 1.62 1.291 2.1 2.21.49.919.73 1.907.73 2.964 0 .191-.01.381-.02.572v.65h-10.27c.05.988.27 1.811.67 2.47.42.641.93 1.127 1.54 1.456.62.329 1.28.494 1.97.494.9 0 1.66-.208 2.26-.624.61-.416 1.05-.979 1.33-1.69h2.16c-.35 1.196-1.02 2.193-2 2.99-.98.78-2.22 1.17-3.75 1.17zm0-11.674c-1.04 0-1.97.321-2.78.962-.8.624-1.26 1.543-1.38 2.756h8.11c-.05-1.161-.45-2.071-1.19-2.73-.75-.659-1.67-.988-2.76-.988zm13.67 11.362c-1.18 0-2.11-.286-2.78-.858-.68-.572-1.02-1.603-1.02-3.094v-7.098h-2.23v-1.846h2.23l.29-3.094h1.9v3.094h3.79v1.846h-3.79v7.098c0 .815.16 1.369.49 1.664.33.277.91.416 1.74.416h1.36v1.872zm10.4.312c-1.23 0-2.32-.277-3.27-.832-.96-.572-1.71-1.361-2.27-2.366-.53-1.005-.8-2.193-.8-3.562 0-1.352.27-2.531.8-3.536.54-1.023 1.29-1.811 2.24-2.366.97-.572 2.09-.858 3.35-.858 1.25 0 2.33.286 3.23.858.92.555 1.62 1.291 2.1 2.21.49.919.73 1.907.73 2.964 0 .191-.01.381-.02.572v.65h-10.27c.05.988.27 1.811.67 2.47.42.641.93 1.127 1.54 1.456.62.329 1.28.494 1.97.494.9 0 1.66-.208 2.26-.624.61-.416 1.05-.979 1.33-1.69h2.16c-.35 1.196-1.02 2.193-2 2.99-.97.78-2.22 1.17-3.75 1.17zm0-11.674c-1.04 0-1.97.321-2.78.962-.8.624-1.26 1.543-1.38 2.756h8.11c-.05-1.161-.45-2.071-1.19-2.73-.75-.659-1.67-.988-2.76-.988zm20.18 11.674c-1.08 0-1.97-.182-2.68-.546s-1.24-.849-1.59-1.456c-.34-.607-.52-1.265-.52-1.976 0-1.317.51-2.331 1.51-3.042 1.01-.711 2.38-1.066 4.11-1.066h3.48v-.156c0-1.127-.29-1.976-.88-2.548-.59-.589-1.38-.884-2.37-.884-.85 0-1.58.217-2.21.65-.6.416-.98 1.031-1.14 1.846h-2.24c.09-.936.4-1.725.94-2.366.55-.641 1.24-1.127 2.05-1.456.82-.347 1.68-.52 2.6-.52 1.81 0 3.16.485 4.06 1.456.92.953 1.38 2.227 1.38 3.822v7.93h-1.95l-.13-2.314c-.37.728-.9 1.352-1.61 1.872-.7.503-1.63.754-2.81.754zm.34-1.846c.83 0 1.54-.217 2.13-.65.6-.433 1.06-.997 1.38-1.69.31-.693.46-1.421.46-2.184v-.026h-3.3c-1.28 0-2.19.225-2.73.676-.52.433-.78.979-.78 1.638 0 .676.24 1.222.73 1.638.5.399 1.2.598 2.11.598zm9.43 1.534v-12.896h1.98l.13 2.314c.42-.815 1.01-1.456 1.79-1.924s1.67-.702 2.66-.702c1.52 0 2.73.468 3.64 1.404.91.919 1.37 2.34 1.37 4.264v7.54h-2.18v-7.306c0-2.687-1.11-4.03-3.33-4.03-1.11 0-2.03.407-2.78 1.222-.73.797-1.09 1.941-1.09 3.432v6.682zm20.73.312c-1.28 0-2.41-.295-3.38-.884-.95-.589-1.7-1.395-2.23-2.418-.52-1.023-.78-2.184-.78-3.484s.27-2.453.8-3.458c.54-1.023 1.29-1.82 2.24-2.392.95-.589 2.08-.884 3.38-.884 1.06 0 1.99.217 2.81.65.81.433 1.44 1.04 1.89 1.82v-7.982h2.19v18.72h-1.98l-.21-2.132c-.41.624-1.01 1.187-1.79 1.69s-1.76.754-2.94.754zm.24-1.898c.86 0 1.63-.199 2.28-.598.68-.416 1.2-.988 1.56-1.716.39-.728.58-1.577.58-2.548s-.19-1.82-.58-2.548c-.36-.728-.88-1.291-1.56-1.69-.65-.416-1.42-.624-2.28-.624-.85 0-1.62.208-2.29.624-.66.399-1.18.962-1.56 1.69-.37.728-.55 1.577-.55 2.548s.18 1.82.55 2.548c.38.728.9 1.3 1.56 1.716.67.399 1.44.598 2.29.598zm22.22 1.586c-1.18 0-2.11-.286-2.79-.858-.67-.572-1.01-1.603-1.01-3.094v-7.098h-2.24v-1.846h2.24l.29-3.094h1.89v3.094h3.8v1.846h-3.8v7.098c0 .815.17 1.369.5 1.664.33.277.91.416 1.74.416h1.35v1.872zm4.95 0v-18.72h2.19v8.034c.43-.797 1.05-1.413 1.84-1.846.8-.451 1.67-.676 2.6-.676 1.49 0 2.69.468 3.59 1.404.9.919 1.35 2.34 1.35 4.264v7.54h-2.15v-7.306c0-2.687-1.09-4.03-3.25-4.03-1.13 0-2.08.407-2.84 1.222-.76.797-1.14 1.941-1.14 3.432v6.682zm20.68.312c-1.23 0-2.32-.277-3.27-.832-.96-.572-1.71-1.361-2.27-2.366-.53-1.005-.8-2.193-.8-3.562 0-1.352.27-2.531.8-3.536.54-1.023 1.29-1.811 2.24-2.366.97-.572 2.09-.858 3.35-.858 1.25 0 2.33.286 3.23.858.92.555 1.62 1.291 2.1 2.21.49.919.73 1.907.73 2.964 0 .191-.01.381-.02.572v.65h-10.27c.05.988.27 1.811.67 2.47.42.641.93 1.127 1.54 1.456.62.329 1.28.494 1.97.494.9 0 1.66-.208 2.26-.624.61-.416 1.05-.979 1.33-1.69h2.16c-.35 1.196-1.02 2.193-2 2.99-.98.78-2.22 1.17-3.75 1.17zm0-11.674c-1.04 0-1.97.321-2.78.962-.8.624-1.26 1.543-1.38 2.756h8.11c-.05-1.161-.45-2.071-1.19-2.73-.75-.659-1.67-.988-2.76-.988zm20.18 11.674c-1.08 0-1.97-.182-2.68-.546s-1.24-.849-1.59-1.456c-.34-.607-.52-1.265-.52-1.976 0-1.317.51-2.331 1.51-3.042 1.01-.711 2.38-1.066 4.11-1.066h3.48v-.156c0-1.127-.29-1.976-.88-2.548-.59-.589-1.38-.884-2.37-.884-.85 0-1.58.217-2.21.65-.6.416-.99 1.031-1.14 1.846h-2.24c.09-.936.4-1.725.94-2.366.55-.641 1.24-1.127 2.05-1.456.82-.347 1.68-.52 2.6-.52 1.81 0 3.16.485 4.06 1.456.92.953 1.38 2.227 1.38 3.822v7.93h-1.95l-.13-2.314c-.37.728-.9 1.352-1.62 1.872-.69.503-1.62.754-2.8.754zm.33-1.846c.84 0 1.55-.217 2.14-.65.6-.433 1.06-.997 1.37-1.69.32-.693.47-1.421.47-2.184v-.026h-3.3c-1.28 0-2.19.225-2.73.676-.52.433-.78.979-.78 1.638 0 .676.24 1.222.73 1.638.5.399 1.2.598 2.1.598zm9.44 7.254v-18.616h1.98l.21 2.132c.41-.624 1-1.187 1.77-1.69.78-.503 1.76-.754 2.96-.754 1.28 0 2.4.295 3.35.884.96.589 1.69 1.395 2.21 2.418.54 1.023.81 2.184.81 3.484s-.27 2.461-.81 3.484c-.52 1.005-1.26 1.803-2.23 2.392-.96.572-2.07.858-3.36.858-1.05 0-2-.217-2.83-.65-.82-.433-1.44-1.04-1.87-1.82v7.878zm6.66-7.306c.87 0 1.63-.199 2.29-.598.66-.416 1.18-.988 1.56-1.716s.57-1.577.57-2.548-.19-1.82-.57-2.548-.9-1.291-1.56-1.69c-.66-.416-1.42-.624-2.29-.624s-1.63.208-2.29.624c-.66.399-1.18.962-1.56 1.69s-.57 1.577-.57 2.548.19 1.82.57 2.548.9 1.3 1.56 1.716c.66.399 1.42.598 2.29.598zm9.67 7.306v-18.616h1.98l.2 2.132c.42-.624 1.01-1.187 1.77-1.69.78-.503 1.77-.754 2.97-.754 1.28 0 2.4.295 3.35.884s1.69 1.395 2.21 2.418c.54 1.023.81 2.184.81 3.484s-.27 2.461-.81 3.484c-.52 1.005-1.27 1.803-2.24 2.392-.95.572-2.07.858-3.35.858-1.06 0-2-.217-2.83-.65-.82-.433-1.44-1.04-1.88-1.82v7.878zm6.66-7.306c.86 0 1.62-.199 2.28-.598.66-.416 1.18-.988 1.56-1.716s.58-1.577.58-2.548-.2-1.82-.58-2.548-.9-1.291-1.56-1.69c-.66-.416-1.42-.624-2.28-.624-.87 0-1.63.208-2.29.624-.66.399-1.18.962-1.56 1.69s-.57 1.577-.57 2.548.19 1.82.57 2.548.9 1.3 1.56 1.716c.66.399 1.42.598 2.29.598zm17.87-14.17c-.43 0-.79-.139-1.09-.416-.28-.295-.42-.659-.42-1.092 0-.416.14-.763.42-1.04.3-.277.66-.416 1.09-.416.42 0 .77.139 1.07.416.29.277.44.624.44 1.04 0 .433-.15.797-.44 1.092-.3.277-.65.416-1.07.416zm-1.09 15.756v-12.896h2.18v12.896zm10.93.312c-1.55 0-2.83-.39-3.85-1.17s-1.62-1.837-1.79-3.172h2.23c.14.676.5 1.265 1.07 1.768.59.485 1.38.728 2.36.728.92 0 1.6-.191 2.03-.572.43-.399.65-.867.65-1.404 0-.78-.28-1.3-.86-1.56-.55-.26-1.34-.494-2.36-.702-.7-.139-1.39-.338-2.08-.598-.7-.26-1.28-.624-1.74-1.092-.47-.485-.71-1.118-.71-1.898 0-1.127.42-2.045 1.25-2.756.85-.728 1.99-1.092 3.43-1.092 1.37 0 2.49.347 3.36 1.04.88.676 1.39 1.647 1.53 2.912h-2.16c-.08-.659-.37-1.17-.85-1.534-.47-.381-1.11-.572-1.9-.572-.78 0-1.39.165-1.82.494-.42.329-.63.763-.63 1.3 0 .52.27.927.81 1.222.55.295 1.3.546 2.24.754.79.173 1.55.39 2.26.65.73.243 1.31.615 1.77 1.118.46.485.7 1.196.7 2.132.01 1.161-.43 2.123-1.33 2.886-.88.745-2.09 1.118-3.61 1.118zm-232.21 33.688v-11.05h-1.95v-1.846h1.95v-2.236c0-1.248.31-2.158.94-2.73.62-.572 1.53-.858 2.73-.858h1.3v1.872h-.97c-.66 0-1.12.139-1.4.416-.28.26-.42.711-.42 1.352v2.184h3.18v1.846h-3.18v11.05zm12.66.312c-1.52 0-2.74-.459-3.64-1.378-.9-.936-1.35-2.366-1.35-4.29v-7.54h2.18v7.306c0 2.687 1.1 4.03 3.31 4.03 1.12 0 2.05-.399 2.78-1.196.74-.815 1.12-1.967 1.12-3.458v-6.682h2.18v12.896h-1.98l-.15-2.314c-.4.815-1 1.456-1.8 1.924-.78.468-1.66.702-2.65.702zm10.17-.312v-18.72h2.19v18.72zm5.77 0v-18.72h2.18v18.72zm7.17 5.72 3.19-6.968h-.75l-5.12-11.648h2.36l4.27 10.036 4.52-10.036h2.26l-8.45 18.616zm21.25-21.476c-.44 0-.8-.139-1.1-.416-.27-.295-.41-.659-.41-1.092 0-.416.14-.763.41-1.04.3-.277.66-.416 1.1-.416.41 0 .77.139 1.06.416.3.277.44.624.44 1.04 0 .433-.14.797-.44 1.092-.29.277-.65.416-1.06.416zm-1.1 15.756v-12.896h2.19v12.896zm5.99 0v-12.896h1.98l.13 2.314c.41-.815 1.01-1.456 1.79-1.924s1.66-.702 2.65-.702c1.53 0 2.74.468 3.64 1.404.92.919 1.38 2.34 1.38 4.264v7.54h-2.18v-7.306c0-2.687-1.11-4.03-3.33-4.03-1.11 0-2.04.407-2.78 1.222-.73.797-1.1 1.941-1.1 3.432v6.682zm19.98 0c-1.18 0-2.11-.286-2.79-.858-.67-.572-1.01-1.603-1.01-3.094v-7.098h-2.24v-1.846h2.24l.29-3.094h1.89v3.094h3.8v1.846h-3.8v7.098c0 .815.17 1.369.5 1.664.33.277.91.416 1.74.416h1.35v1.872zm10.4.312c-1.23 0-2.33-.277-3.28-.832-.95-.572-1.71-1.361-2.26-2.366-.54-1.005-.81-2.193-.81-3.562 0-1.352.27-2.531.81-3.536.54-1.023 1.28-1.811 2.23-2.366.98-.572 2.09-.858 3.36-.858 1.25 0 2.32.286 3.22.858.92.555 1.62 1.291 2.11 2.21.48.919.73 1.907.73 2.964 0 .191-.01.381-.03.572v.65h-10.27c.05.988.28 1.811.68 2.47.41.641.92 1.127 1.53 1.456.62.329 1.28.494 1.98.494.9 0 1.65-.208 2.26-.624s1.05-.979 1.32-1.69h2.16c-.34 1.196-1.01 2.193-2 2.99-.97.78-2.22 1.17-3.74 1.17zm0-11.674c-1.04 0-1.97.321-2.79.962-.79.624-1.25 1.543-1.37 2.756h8.11c-.05-1.161-.45-2.071-1.2-2.73-.74-.659-1.66-.988-2.75-.988zm9 11.362v-12.896h1.98l.18 2.47c.4-.849 1-1.525 1.82-2.028.81-.503 1.82-.754 3.02-.754v2.288h-.6c-.77 0-1.47.139-2.11.416-.64.26-1.15.711-1.53 1.352s-.57 1.525-.57 2.652v6.5zm13.74.312c-1.08 0-1.97-.182-2.68-.546s-1.24-.849-1.59-1.456c-.34-.607-.52-1.265-.52-1.976 0-1.317.51-2.331 1.51-3.042 1.01-.711 2.38-1.066 4.11-1.066h3.48v-.156c0-1.127-.29-1.976-.88-2.548-.59-.589-1.38-.884-2.37-.884-.85 0-1.58.217-2.21.65-.6.416-.99 1.031-1.14 1.846h-2.24c.09-.936.4-1.725.94-2.366.55-.641 1.24-1.127 2.05-1.456.82-.347 1.68-.52 2.6-.52 1.81 0 3.16.485 4.06 1.456.92.953 1.38 2.227 1.38 3.822v7.93h-1.95l-.13-2.314c-.37.728-.9 1.352-1.62 1.872-.69.503-1.62.754-2.8.754zm.33-1.846c.84 0 1.55-.217 2.14-.65.6-.433 1.06-.997 1.37-1.69.32-.693.47-1.421.47-2.184v-.026h-3.3c-1.28 0-2.19.225-2.73.676-.52.433-.78.979-.78 1.638 0 .676.24 1.222.73 1.638.5.399 1.2.598 2.1.598zm15.37 1.846c-1.23 0-2.34-.277-3.33-.832-.97-.572-1.74-1.361-2.31-2.366-.56-1.023-.83-2.21-.83-3.562s.27-2.531.83-3.536c.57-1.023 1.34-1.811 2.31-2.366.99-.572 2.1-.858 3.33-.858 1.53 0 2.81.399 3.85 1.196 1.06.797 1.72 1.863 2 3.198h-2.23c-.18-.797-.6-1.413-1.28-1.846-.67-.451-1.46-.676-2.36-.676-.73 0-1.42.182-2.06.546s-1.16.91-1.56 1.638-.6 1.629-.6 2.704.2 1.976.6 2.704.92 1.283 1.56 1.664c.64.364 1.33.546 2.06.546.9 0 1.69-.217 2.36-.65.68-.451 1.1-1.083 1.28-1.898h2.23c-.26 1.3-.92 2.357-1.97 3.172-1.06.815-2.35 1.222-3.88 1.222zm13.64-.312c-1.18 0-2.1-.286-2.78-.858s-1.01-1.603-1.01-3.094v-7.098h-2.24v-1.846h2.24l.28-3.094h1.9v3.094h3.8v1.846h-3.8v7.098c0 .815.16 1.369.49 1.664.33.277.91.416 1.75.416h1.35v1.872zm6.29-15.756c-.44 0-.8-.139-1.1-.416-.27-.295-.41-.659-.41-1.092 0-.416.14-.763.41-1.04.3-.277.66-.416 1.1-.416.41 0 .77.139 1.06.416.3.277.44.624.44 1.04 0 .433-.14.797-.44 1.092-.29.277-.65.416-1.06.416zm-1.1 15.756v-12.896h2.19v12.896zm9.71 0-4.89-12.896h2.29l3.87 10.79 3.9-10.79h2.24l-4.89 12.896zm14.98.312c-1.23 0-2.32-.277-3.28-.832-.95-.572-1.71-1.361-2.26-2.366-.54-1.005-.81-2.193-.81-3.562 0-1.352.27-2.531.81-3.536.54-1.023 1.28-1.811 2.24-2.366.97-.572 2.08-.858 3.35-.858 1.25 0 2.32.286 3.22.858.92.555 1.62 1.291 2.11 2.21s.73 1.907.73 2.964c0 .191-.01.381-.03.572v.65h-10.27c.05.988.28 1.811.68 2.47.41.641.93 1.127 1.53 1.456.63.329 1.28.494 1.98.494.9 0 1.65-.208 2.26-.624s1.05-.979 1.33-1.69h2.15c-.34 1.196-1.01 2.193-2 2.99-.97.78-2.22 1.17-3.74 1.17zm0-11.674c-1.04 0-1.97.321-2.78.962-.8.624-1.26 1.543-1.38 2.756h8.11c-.05-1.161-.45-2.071-1.2-2.73-.74-.659-1.66-.988-2.75-.988zm9.76 11.492c-.44 0-.8-.139-1.1-.416-.27-.295-.41-.65-.41-1.066s.14-.763.41-1.04c.3-.295.66-.442 1.1-.442.41 0 .76.147 1.04.442.29.277.44.624.44 1.04s-.15.771-.44 1.066c-.28.277-.63.416-1.04.416z" fill="#0a0a0b"/><g clip-path="url(#a)"><rect fill="#fff" height="416.104" rx="8" stroke="#ededee" stroke-width="2" width="352.857" x="1004" y="336.143"/><g fill="#acffdd" stroke="#00dc82" stroke-width="3"><rect height="11.0029" rx="5.50143" width="61.7549" x="1020.25" y="493.146"/><rect height="11.0029" rx="5.50143" width="136.707" x="1020.25" y="515.995"/><rect height="95.1772" rx="4.5" width="319.944" x="1020.25" y="378.801"/><rect height="95.1772" rx="4.5" width="152.281" x="1020.25" y="548.175"/><rect height="95.1772" rx="4.5" width="152.281" x="1187.91" y="548.175"/><rect height="95.1772" rx="4.5" width="152.281" x="1020.25" y="662.52"/><rect height="95.1772" rx="4.5" width="152.281" x="1187.91" y="662.52"/></g><circle cx="1023.09" cy="354.78" fill="#7f7f8b" r="4.34369"/><circle cx="1038.73" cy="354.78" fill="#94949e" r="4.34369"/><circle cx="1054.37" cy="354.78" fill="#bfbfc5" r="4.34369"/></g><rect height="416" rx="6" stroke="#44444b" stroke-width="2" width="352" x="1004.43" y="336.417"/><g clip-path="url(#b)"><rect fill="#fff" height="416.104" rx="8" stroke="#ededee" stroke-width="2" width="352.857" x="62.5708" y="335.725"/><g fill="#ededee"><rect height="14.0029" rx="7.00143" width="64.7549" x="77.3193" y="491.229"/><rect height="14.0029" rx="7.00143" width="139.707" x="77.3193" y="514.078"/><rect height="98.1772" rx="6" width="322.944" x="77.3193" y="376.883"/><rect height="98.1772" rx="6" width="155.281" x="77.3193" y="546.257"/><rect height="98.1772" rx="6" width="155.281" x="244.982" y="546.257"/><rect height="98.1772" rx="6" width="155.281" x="77.3193" y="660.603"/><rect height="98.1772" rx="6" width="155.281" x="244.982" y="660.603"/></g><circle cx="81.663" cy="354.363" fill="#7f7f8b" r="4.34369"/><circle cx="97.2997" cy="354.363" fill="#94949e" r="4.34369"/><circle cx="112.936" cy="354.363" fill="#bfbfc5" r="4.34369"/></g><rect height="416" rx="6" stroke="#44444b" stroke-width="2" width="352" x="63" y="336"/><g clip-path="url(#c)"><rect fill="#fff" height="416.104" rx="8" stroke="#ededee" stroke-width="2" width="352.857" x="533.571" y="335.725"/><g fill="#ededee"><rect height="14.0029" rx="7.00143" width="64.7549" x="548.319" y="491.229"/><rect height="14.0029" rx="7.00143" width="139.707" x="548.319" y="514.078"/><rect height="98.1772" rx="6" width="322.944" x="548.319" y="376.883"/><rect height="98.1772" rx="6" width="155.281" x="548.319" y="546.257"/><rect height="98.1772" rx="6" width="155.281" x="715.982" y="546.257"/><rect height="98.1772" rx="6" width="155.281" x="548.319" y="660.603"/><rect height="98.1772" rx="6" width="155.281" x="715.982" y="660.603"/></g><circle cx="552.663" cy="354.363" fill="#7f7f8b" r="4.34369"/><circle cx="568.3" cy="354.363" fill="#94949e" r="4.34369"/><circle cx="583.936" cy="354.363" fill="#bfbfc5" r="4.34369"/></g><g stroke-width="2"><rect height="416" rx="6" stroke="#44444b" width="352" x="534" y="336"/><path d="m440.422 183.822h73.777" stroke="#bfbfc5"/><path d="m908.611 183.822h73.777" stroke="#bfbfc5"/><circle cx="414.857" cy="290.628" fill="#fff" r="20.9285" stroke="#ededee"/></g><path d="m414.699 297.628v-12.12l-2.26.5v-1.16l2.82-1.22h1.14v14z" fill="#0a0a0b"/><circle cx="887.714" cy="290.628" fill="#fff" r="20.9285" stroke="#ededee" stroke-width="2"/><path d="m882.751 297.628v-1.18c.947-.747 1.84-1.5 2.68-2.26.854-.773 1.607-1.533 2.26-2.28.667-.747 1.187-1.48 1.56-2.2.387-.72.58-1.413.58-2.08 0-.493-.086-.953-.26-1.38-.16-.427-.426-.767-.8-1.02-.373-.267-.88-.4-1.52-.4-.613 0-1.126.14-1.54.42-.413.267-.726.627-.94 1.08-.2.453-.3.94-.3 1.46h-1.62c0-.92.194-1.707.58-2.36.387-.667.914-1.173 1.58-1.52.667-.347 1.42-.52 2.26-.52 1.24 0 2.254.353 3.04 1.06.8.693 1.2 1.733 1.2 3.12 0 .827-.206 1.647-.62 2.46-.413.8-.94 1.58-1.58 2.34-.64.747-1.326 1.447-2.06 2.1-.72.653-1.393 1.24-2.02 1.76h6.76v1.4z" fill="#0a0a0b"/><circle cx="1356.93" cy="290.929" fill="#fff" r="20.9285" stroke="#ededee" stroke-width="2"/><path d="m1356.39 298.169c-.89 0-1.7-.16-2.42-.48-.72-.334-1.3-.827-1.74-1.48-.43-.654-.65-1.467-.68-2.44h1.7c.01.8.29 1.493.84 2.08.55.573 1.31.86 2.3.86s1.73-.274 2.22-.82c.51-.547.76-1.207.76-1.98 0-.654-.16-1.187-.48-1.6-.31-.414-.73-.72-1.26-.92-.52-.2-1.09-.3-1.72-.3h-1.04v-1.42h1.04c.91 0 1.61-.207 2.12-.62.52-.414.78-.994.78-1.74 0-.627-.21-1.14-.62-1.54-.4-.414-1-.62-1.8-.62-.77 0-1.39.233-1.86.7-.47.453-.73 1.026-.78 1.72h-1.7c.04-.76.24-1.434.6-2.02.37-.587.88-1.04 1.52-1.36.64-.334 1.38-.5 2.22-.5.91 0 1.66.16 2.26.48.61.32 1.07.746 1.38 1.28.32.533.48 1.12.48 1.76 0 .706-.19 1.353-.58 1.94-.39.573-.97.96-1.74 1.16.83.173 1.51.566 2.06 1.18.55.613.82 1.42.82 2.42 0 .773-.18 1.486-.54 2.14-.35.64-.87 1.153-1.56 1.54-.69.386-1.55.58-2.58.58z" fill="#0a0a0b"/><path d="m64 797 819.984-5.062" stroke="#888" stroke-width="3"/><path d="m255.113 831-6.312-16.8h2.184l5.304 14.664 5.352-14.664h2.136l-6.312 16.8zm12.072-14.544c-.4 0-.736-.128-1.008-.384-.256-.272-.384-.608-.384-1.008 0-.384.128-.704.384-.96.272-.256.608-.384 1.008-.384.384 0 .712.128.984.384s.408.576.408.96c0 .4-.136.736-.408 1.008-.272.256-.6.384-.984.384zm-1.008 14.544v-11.904h2.016v11.904zm10.086.288c-1.424 0-2.608-.36-3.552-1.08s-1.496-1.696-1.656-2.928h2.064c.128.624.456 1.168.984 1.632.544.448 1.272.672 2.184.672.848 0 1.472-.176 1.872-.528.4-.368.6-.8.6-1.296 0-.72-.264-1.2-.792-1.44-.512-.24-1.24-.456-2.184-.648-.64-.128-1.28-.312-1.92-.552s-1.176-.576-1.608-1.008c-.432-.448-.648-1.032-.648-1.752 0-1.04.384-1.888 1.152-2.544.784-.672 1.84-1.008 3.168-1.008 1.264 0 2.296.32 3.096.96.816.624 1.288 1.52 1.416 2.688h-1.992c-.08-.608-.344-1.08-.792-1.416-.432-.352-1.016-.528-1.752-.528-.72 0-1.28.152-1.68.456-.384.304-.576.704-.576 1.2 0 .48.248.856.744 1.128.512.272 1.2.504 2.064.696.736.16 1.432.36 2.088.6.672.224 1.216.568 1.632 1.032.432.448.648 1.104.648 1.968.016 1.072-.392 1.96-1.224 2.664-.816.688-1.928 1.032-3.336 1.032zm8.664-14.832c-.4 0-.736-.128-1.008-.384-.256-.272-.384-.608-.384-1.008 0-.384.128-.704.384-.96.272-.256.608-.384 1.008-.384.384 0 .712.128.984.384s.408.576.408.96c0 .4-.136.736-.408 1.008-.272.256-.6.384-.984.384zm-1.008 14.544v-11.904h2.016v11.904zm10.23 0c-1.088 0-1.944-.264-2.568-.792s-.936-1.48-.936-2.856v-6.552h-2.064v-1.704h2.064l.264-2.856h1.752v2.856h3.504v1.704h-3.504v6.552c0 .752.152 1.264.456 1.536.304.256.84.384 1.608.384h1.248v1.728zm9.673.288c-1.12 0-2.128-.256-3.024-.768s-1.608-1.232-2.136-2.16c-.512-.944-.768-2.048-.768-3.312s.264-2.36.792-3.288c.528-.944 1.24-1.672 2.136-2.184.912-.512 1.928-.768 3.048-.768s2.128.256 3.024.768 1.6 1.24 2.112 2.184c.528.928.792 2.024.792 3.288s-.264 2.368-.792 3.312c-.528.928-1.248 1.648-2.16 2.16-.896.512-1.904.768-3.024.768zm0-1.728c.688 0 1.328-.168 1.92-.504s1.072-.84 1.44-1.512.552-1.504.552-2.496-.184-1.824-.552-2.496c-.352-.672-.824-1.176-1.416-1.512s-1.224-.504-1.896-.504c-.688 0-1.328.168-1.92.504s-1.072.84-1.44 1.512-.552 1.504-.552 2.496.184 1.824.552 2.496.84 1.176 1.416 1.512c.592.336 1.224.504 1.896.504zm8.779 1.44v-11.904h1.824l.168 2.28c.368-.784.928-1.408 1.68-1.872s1.68-.696 2.784-.696v2.112h-.552c-.704 0-1.352.128-1.944.384-.592.24-1.064.656-1.416 1.248s-.528 1.408-.528 2.448v6zm13.279.288c-1.424 0-2.608-.36-3.552-1.08s-1.496-1.696-1.656-2.928h2.064c.128.624.456 1.168.984 1.632.544.448 1.272.672 2.184.672.848 0 1.472-.176 1.872-.528.4-.368.6-.8.6-1.296 0-.72-.264-1.2-.792-1.44-.512-.24-1.24-.456-2.184-.648-.64-.128-1.28-.312-1.92-.552s-1.176-.576-1.608-1.008c-.432-.448-.648-1.032-.648-1.752 0-1.04.384-1.888 1.152-2.544.784-.672 1.84-1.008 3.168-1.008 1.264 0 2.296.32 3.096.96.816.624 1.288 1.52 1.416 2.688h-1.992c-.08-.608-.344-1.08-.792-1.416-.432-.352-1.016-.528-1.752-.528-.72 0-1.28.152-1.68.456-.384.304-.576.704-.576 1.2 0 .48.248.856.744 1.128.512.272 1.2.504 2.064.696.736.16 1.432.36 2.088.6.672.224 1.216.568 1.632 1.032.432.448.648 1.104.648 1.968.016 1.072-.392 1.96-1.224 2.664-.816.688-1.928 1.032-3.336 1.032zm19.264 0c-1.136 0-2.16-.256-3.072-.768-.896-.528-1.608-1.256-2.136-2.184-.512-.944-.768-2.04-.768-3.288s.256-2.336.768-3.264c.528-.944 1.24-1.672 2.136-2.184.912-.528 1.936-.792 3.072-.792 1.408 0 2.592.368 3.552 1.104.976.736 1.592 1.72 1.848 2.952h-2.064c-.16-.736-.552-1.304-1.176-1.704-.624-.416-1.352-.624-2.184-.624-.672 0-1.304.168-1.896.504s-1.072.84-1.44 1.512-.552 1.504-.552 2.496.184 1.824.552 2.496.848 1.184 1.44 1.536c.592.336 1.224.504 1.896.504.832 0 1.56-.2 2.184-.6.624-.416 1.016-1 1.176-1.752h2.064c-.24 1.2-.848 2.176-1.824 2.928s-2.168 1.128-3.576 1.128zm12.175 0c-.992 0-1.816-.168-2.472-.504s-1.144-.784-1.464-1.344-.48-1.168-.48-1.824c0-1.216.464-2.152 1.392-2.808s2.192-.984 3.792-.984h3.216v-.144c0-1.04-.272-1.824-.816-2.352-.544-.544-1.272-.816-2.184-.816-.784 0-1.464.2-2.04.6-.56.384-.912.952-1.056 1.704h-2.064c.08-.864.368-1.592.864-2.184.512-.592 1.144-1.04 1.896-1.344.752-.32 1.552-.48 2.4-.48 1.664 0 2.912.448 3.744 1.344.848.88 1.272 2.056 1.272 3.528v7.32h-1.8l-.12-2.136c-.336.672-.832 1.248-1.488 1.728-.64.464-1.504.696-2.592.696zm.312-1.704c.768 0 1.424-.2 1.968-.6.56-.4.984-.92 1.272-1.56s.432-1.312.432-2.016v-.024h-3.048c-1.184 0-2.024.208-2.52.624-.48.4-.72.904-.72 1.512 0 .624.224 1.128.672 1.512.464.368 1.112.552 1.944.552zm8.713 1.416v-11.904h1.824l.12 2.136c.384-.752.936-1.344 1.656-1.776s1.536-.648 2.448-.648c1.408 0 2.528.432 3.36 1.296.848.848 1.271 2.16 1.271 3.936v6.96h-2.015v-6.744c0-2.48-1.024-3.72-3.072-3.72-1.024 0-1.88.376-2.568 1.128-.672.736-1.008 1.792-1.008 3.168v6.168zm20.085 0v-11.904h1.824l.168 2.28c.368-.784.928-1.408 1.68-1.872s1.68-.696 2.784-.696v2.112h-.552c-.704 0-1.352.128-1.944.384-.592.24-1.064.656-1.416 1.248s-.528 1.408-.528 2.448v6zm13.626.288c-1.136 0-2.144-.256-3.024-.768-.88-.528-1.576-1.256-2.088-2.184-.496-.928-.744-2.024-.744-3.288 0-1.248.248-2.336.744-3.264.496-.944 1.184-1.672 2.064-2.184.896-.528 1.928-.792 3.096-.792 1.152 0 2.144.264 2.976.792.848.512 1.496 1.192 1.944 2.04s.672 1.76.672 2.736c0 .176-.008.352-.024.528v.6h-9.48c.048.912.256 1.672.624 2.28.384.592.856 1.04 1.416 1.344.576.304 1.184.456 1.824.456.832 0 1.528-.192 2.088-.576s.968-.904 1.224-1.56h1.992c-.32 1.104-.936 2.024-1.848 2.76-.896.72-2.048 1.08-3.456 1.08zm0-10.776c-.96 0-1.816.296-2.568.888-.736.576-1.16 1.424-1.272 2.544h7.488c-.048-1.072-.416-1.912-1.104-2.52s-1.536-.912-2.544-.912zm12.272 10.776c-.992 0-1.816-.168-2.472-.504s-1.144-.784-1.464-1.344-.48-1.168-.48-1.824c0-1.216.464-2.152 1.392-2.808s2.192-.984 3.792-.984h3.216v-.144c0-1.04-.272-1.824-.816-2.352-.544-.544-1.272-.816-2.184-.816-.784 0-1.464.2-2.04.6-.56.384-.912.952-1.056 1.704h-2.064c.08-.864.368-1.592.864-2.184.512-.592 1.144-1.04 1.896-1.344.752-.32 1.552-.48 2.4-.48 1.664 0 2.912.448 3.744 1.344.848.88 1.272 2.056 1.272 3.528v7.32h-1.8l-.12-2.136c-.336.672-.832 1.248-1.488 1.728-.64.464-1.504.696-2.592.696zm.312-1.704c.768 0 1.424-.2 1.968-.6.56-.4.984-.92 1.272-1.56s.432-1.312.432-2.016v-.024h-3.048c-1.184 0-2.024.208-2.52.624-.48.4-.72.904-.72 1.512 0 .624.224 1.128.672 1.512.464.368 1.112.552 1.944.552zm14.112 1.704c-1.184 0-2.224-.272-3.12-.816-.88-.544-1.568-1.288-2.064-2.232-.48-.944-.72-2.016-.72-3.216s.248-2.264.744-3.192c.496-.944 1.184-1.68 2.064-2.208.88-.544 1.92-.816 3.12-.816.976 0 1.84.2 2.592.6s1.336.96 1.752 1.68v-7.368h2.016v17.28h-1.824l-.192-1.968c-.384.576-.936 1.096-1.656 1.56s-1.624.696-2.712.696zm.216-1.752c.8 0 1.504-.184 2.112-.552.624-.384 1.104-.912 1.44-1.584.352-.672.528-1.456.528-2.352s-.176-1.68-.528-2.352c-.336-.672-.816-1.192-1.44-1.56-.608-.384-1.312-.576-2.112-.576-.784 0-1.488.192-2.112.576-.608.368-1.088.888-1.44 1.56-.336.672-.504 1.456-.504 2.352s.168 1.68.504 2.352c.352.672.832 1.2 1.44 1.584.624.368 1.328.552 2.112.552zm7.847 4.32 1.392-5.304h2.088l-2.088 5.304zm16.785-2.568c-1.424 0-2.608-.36-3.552-1.08s-1.496-1.696-1.656-2.928h2.064c.128.624.456 1.168.984 1.632.544.448 1.272.672 2.184.672.848 0 1.472-.176 1.872-.528.4-.368.6-.8.6-1.296 0-.72-.264-1.2-.792-1.44-.512-.24-1.24-.456-2.184-.648-.64-.128-1.28-.312-1.92-.552s-1.176-.576-1.608-1.008c-.432-.448-.648-1.032-.648-1.752 0-1.04.384-1.888 1.152-2.544.784-.672 1.84-1.008 3.168-1.008 1.264 0 2.296.32 3.096.96.816.624 1.288 1.52 1.416 2.688h-1.992c-.08-.608-.344-1.08-.792-1.416-.432-.352-1.016-.528-1.752-.528-.72 0-1.28.152-1.68.456-.384.304-.576.704-.576 1.2 0 .48.248.856.744 1.128.512.272 1.2.504 2.064.696.736.16 1.432.36 2.088.6.672.224 1.216.568 1.632 1.032.432.448.648 1.104.648 1.968.016 1.072-.392 1.96-1.224 2.664-.816.688-1.928 1.032-3.336 1.032zm12.912 0c-1.136 0-2.16-.256-3.072-.768-.896-.528-1.608-1.256-2.136-2.184-.512-.944-.768-2.04-.768-3.288s.256-2.336.768-3.264c.528-.944 1.24-1.672 2.136-2.184.912-.528 1.936-.792 3.072-.792 1.408 0 2.592.368 3.552 1.104.976.736 1.592 1.72 1.848 2.952h-2.064c-.16-.736-.552-1.304-1.176-1.704-.624-.416-1.352-.624-2.184-.624-.672 0-1.304.168-1.896.504s-1.072.84-1.44 1.512-.552 1.504-.552 2.496.184 1.824.552 2.496.848 1.184 1.44 1.536c.592.336 1.224.504 1.896.504.832 0 1.56-.2 2.184-.6.624-.416 1.016-1 1.176-1.752h2.064c-.24 1.2-.848 2.176-1.824 2.928s-2.168 1.128-3.576 1.128zm8.215-.288v-11.904h1.824l.168 2.28c.368-.784.928-1.408 1.68-1.872s1.68-.696 2.784-.696v2.112h-.552c-.704 0-1.352.128-1.944.384-.592.24-1.064.656-1.416 1.248s-.528 1.408-.528 2.448v6zm13.698.288c-1.12 0-2.128-.256-3.024-.768s-1.608-1.232-2.136-2.16c-.512-.944-.768-2.048-.768-3.312s.264-2.36.792-3.288c.528-.944 1.24-1.672 2.136-2.184.912-.512 1.928-.768 3.048-.768s2.128.256 3.024.768 1.6 1.24 2.112 2.184c.528.928.792 2.024.792 3.288s-.264 2.368-.792 3.312c-.528.928-1.248 1.648-2.16 2.16-.896.512-1.904.768-3.024.768zm0-1.728c.688 0 1.328-.168 1.92-.504s1.072-.84 1.44-1.512.552-1.504.552-2.496-.184-1.824-.552-2.496c-.352-.672-.824-1.176-1.416-1.512s-1.224-.504-1.896-.504c-.688 0-1.328.168-1.92.504s-1.072.84-1.44 1.512-.552 1.504-.552 2.496.184 1.824.552 2.496.84 1.176 1.416 1.512c.592.336 1.224.504 1.896.504zm8.779 1.44v-17.28h2.016v17.28zm5.32 0v-17.28h2.016v17.28zm15.632.288c-.992 0-1.816-.168-2.472-.504s-1.144-.784-1.464-1.344-.48-1.168-.48-1.824c0-1.216.464-2.152 1.392-2.808s2.192-.984 3.792-.984h3.216v-.144c0-1.04-.272-1.824-.816-2.352-.544-.544-1.272-.816-2.184-.816-.784 0-1.464.2-2.04.6-.56.384-.912.952-1.056 1.704h-2.064c.08-.864.368-1.592.864-2.184.512-.592 1.144-1.04 1.896-1.344.752-.32 1.552-.48 2.4-.48 1.664 0 2.912.448 3.744 1.344.848.88 1.272 2.056 1.272 3.528v7.32h-1.8l-.12-2.136c-.336.672-.832 1.248-1.488 1.728-.64.464-1.504.696-2.592.696zm.312-1.704c.768 0 1.424-.2 1.968-.6.56-.4.984-.92 1.272-1.56s.432-1.312.432-2.016v-.024h-3.048c-1.184 0-2.024.208-2.52.624-.48.4-.72.904-.72 1.512 0 .624.224 1.128.672 1.512.464.368 1.112.552 1.944.552zm8.712 1.416v-11.904h1.824l.12 2.136c.384-.752.936-1.344 1.656-1.776s1.536-.648 2.448-.648c1.408 0 2.528.432 3.36 1.296.848.848 1.272 2.16 1.272 3.936v6.96h-2.016v-6.744c0-2.48-1.024-3.72-3.072-3.72-1.024 0-1.88.376-2.568 1.128-.672.736-1.008 1.792-1.008 3.168v6.168zm19.135.288c-1.184 0-2.224-.272-3.12-.816-.88-.544-1.568-1.288-2.064-2.232-.48-.944-.72-2.016-.72-3.216s.248-2.264.744-3.192c.496-.944 1.184-1.68 2.064-2.208.88-.544 1.92-.816 3.12-.816.976 0 1.84.2 2.592.6s1.336.96 1.752 1.68v-7.368h2.016v17.28h-1.824l-.192-1.968c-.384.576-.936 1.096-1.656 1.56s-1.624.696-2.712.696zm.216-1.752c.8 0 1.504-.184 2.112-.552.624-.384 1.104-.912 1.44-1.584.352-.672.528-1.456.528-2.352s-.176-1.68-.528-2.352c-.336-.672-.816-1.192-1.44-1.56-.608-.384-1.312-.576-2.112-.576-.784 0-1.488.192-2.112.576-.608.368-1.088.888-1.44 1.56-.336.672-.504 1.456-.504 2.352s.168 1.68.504 2.352c.352.672.832 1.2 1.44 1.584.624.368 1.328.552 2.112.552zm21.278 1.752c-1.136 0-2.16-.256-3.072-.768-.896-.528-1.608-1.256-2.136-2.184-.512-.944-.768-2.04-.768-3.288s.256-2.336.768-3.264c.528-.944 1.24-1.672 2.136-2.184.912-.528 1.936-.792 3.072-.792 1.408 0 2.592.368 3.552 1.104.976.736 1.592 1.72 1.848 2.952h-2.064c-.16-.736-.552-1.304-1.176-1.704-.624-.416-1.352-.624-2.184-.624-.672 0-1.304.168-1.896.504s-1.072.84-1.44 1.512-.552 1.504-.552 2.496.184 1.824.552 2.496.848 1.184 1.44 1.536c.592.336 1.224.504 1.896.504.832 0 1.56-.2 2.184-.6.624-.416 1.016-1 1.176-1.752h2.064c-.24 1.2-.848 2.176-1.824 2.928s-2.168 1.128-3.576 1.128zm8.215-.288v-17.28h2.016v17.28zm6.545-14.544c-.4 0-.736-.128-1.008-.384-.256-.272-.384-.608-.384-1.008 0-.384.128-.704.384-.96.272-.256.608-.384 1.008-.384.384 0 .712.128.984.384s.408.576.408.96c0 .4-.136.736-.408 1.008-.272.256-.6.384-.984.384zm-1.008 14.544v-11.904h2.016v11.904zm10.998.288c-1.136 0-2.16-.256-3.072-.768-.896-.528-1.608-1.256-2.136-2.184-.512-.944-.768-2.04-.768-3.288s.256-2.336.768-3.264c.528-.944 1.24-1.672 2.136-2.184.912-.528 1.936-.792 3.072-.792 1.408 0 2.592.368 3.552 1.104.976.736 1.592 1.72 1.848 2.952h-2.064c-.16-.736-.552-1.304-1.176-1.704-.624-.416-1.352-.624-2.184-.624-.672 0-1.304.168-1.896.504s-1.072.84-1.44 1.512-.552 1.504-.552 2.496.184 1.824.552 2.496.848 1.184 1.44 1.536c.592.336 1.224.504 1.896.504.832 0 1.56-.2 2.184-.6.624-.416 1.016-1 1.176-1.752h2.064c-.24 1.2-.848 2.176-1.824 2.928s-2.168 1.128-3.576 1.128zm8.215-.288v-17.28h2.016v10.392l4.872-5.016h2.472l-5.28 5.376 5.952 6.528h-2.568l-5.448-6.168v6.168zm23.87.288c-1.12 0-2.128-.256-3.024-.768s-1.608-1.232-2.136-2.16c-.512-.944-.768-2.048-.768-3.312s.264-2.36.792-3.288c.528-.944 1.24-1.672 2.136-2.184.912-.512 1.928-.768 3.048-.768s2.128.256 3.024.768 1.6 1.24 2.112 2.184c.528.928.792 2.024.792 3.288s-.264 2.368-.792 3.312c-.528.928-1.248 1.648-2.16 2.16-.896.512-1.904.768-3.024.768zm0-1.728c.688 0 1.328-.168 1.92-.504s1.072-.84 1.44-1.512.552-1.504.552-2.496-.184-1.824-.552-2.496c-.352-.672-.824-1.176-1.416-1.512s-1.224-.504-1.896-.504c-.688 0-1.328.168-1.92.504s-1.072.84-1.44 1.512-.552 1.504-.552 2.496.184 1.824.552 2.496.84 1.176 1.416 1.512c.592.336 1.224.504 1.896.504zm8.779 1.44v-11.904h1.824l.12 2.136c.384-.752.936-1.344 1.656-1.776s1.536-.648 2.448-.648c1.408 0 2.528.432 3.36 1.296.848.848 1.272 2.16 1.272 3.936v6.96h-2.016v-6.744c0-2.48-1.024-3.72-3.072-3.72-1.024 0-1.88.376-2.568 1.128-.672.736-1.008 1.792-1.008 3.168v6.168zm20.086 0v-17.28h2.016v17.28zm6.544-14.544c-.4 0-.736-.128-1.008-.384-.256-.272-.384-.608-.384-1.008 0-.384.128-.704.384-.96.272-.256.608-.384 1.008-.384.384 0 .712.128.984.384s.408.576.408.96c0 .4-.136.736-.408 1.008-.272.256-.6.384-.984.384zm-1.008 14.544v-11.904h2.016v11.904zm5.526 0v-11.904h1.824l.12 2.136c.384-.752.936-1.344 1.656-1.776s1.536-.648 2.448-.648c1.408 0 2.528.432 3.36 1.296.848.848 1.272 2.16 1.272 3.936v6.96h-2.016v-6.744c0-2.48-1.024-3.72-3.072-3.72-1.024 0-1.88.376-2.568 1.128-.672.736-1.008 1.792-1.008 3.168v6.168zm13.734 0v-17.28h2.016v10.392l4.872-5.016h2.472l-5.28 5.376 5.952 6.528h-2.568l-5.448-6.168v6.168zm15.951.288c-1.424 0-2.608-.36-3.552-1.08s-1.496-1.696-1.656-2.928h2.064c.128.624.456 1.168.984 1.632.544.448 1.272.672 2.184.672.848 0 1.472-.176 1.872-.528.4-.368.6-.8.6-1.296 0-.72-.264-1.2-.792-1.44-.512-.24-1.24-.456-2.184-.648-.64-.128-1.28-.312-1.92-.552s-1.176-.576-1.608-1.008c-.432-.448-.648-1.032-.648-1.752 0-1.04.384-1.888 1.152-2.544.784-.672 1.84-1.008 3.168-1.008 1.264 0 2.296.32 3.096.96.816.624 1.288 1.52 1.416 2.688h-1.992c-.08-.608-.344-1.08-.792-1.416-.432-.352-1.016-.528-1.752-.528-.72 0-1.28.152-1.68.456-.384.304-.576.704-.576 1.2 0 .48.248.856.744 1.128.512.272 1.2.504 2.064.696.736.16 1.432.36 2.088.6.672.224 1.216.568 1.632 1.032.432.448.648 1.104.648 1.968.016 1.072-.392 1.96-1.224 2.664-.816.688-1.928 1.032-3.336 1.032zm8.136-.168c-.4 0-.736-.128-1.008-.384-.256-.272-.384-.6-.384-.984s.128-.704.384-.96c.272-.272.608-.408 1.008-.408.384 0 .704.136.96.408.272.256.408.576.408.96s-.136.712-.408.984c-.256.256-.576.384-.96.384z" fill="#444"/><path d="m63 782h2v30h-2z" fill="#888"/><path d="m884 779h3v30h-3z" fill="#888"/></svg>
docs/public/assets/docs/concepts/rendering/light/ssr.svg
0
https://github.com/nuxt/nuxt/commit/0db3c6373a72e218baddfc3626695173da103a88
[ 0.0004730685905087739, 0.0004730685905087739, 0.0004730685905087739, 0.0004730685905087739, 0 ]
{ "id": 2, "code_window": [ "import { defineComponent, h } from 'vue'\n", "import type { Component } from 'vue'\n", "\n", "const Fragment = defineComponent({\n", " setup (_props, { slots }) {\n", " return () => slots.default?.()\n", " }\n", "})\n" ], "labels": [ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ], "after_edit": [ " name: 'FragmentWrapper',\n" ], "file_path": "packages/nuxt/src/app/components/utils.ts", "type": "add", "edit_start_line_idx": 4 }
import type { Ref, VNode } from 'vue' import { computed, defineComponent, h, inject, nextTick, onMounted, Transition, unref } from 'vue' import type { RouteLocationNormalizedLoaded } from 'vue-router' import { _wrapIf } from './utils' import { useRoute } from '#app' // @ts-ignore import { useRoute as useVueRouterRoute } from '#build/pages' // @ts-ignore import layouts from '#build/layouts' // @ts-ignore import { appLayoutTransition as defaultLayoutTransition } from '#build/nuxt.config.mjs' // TODO: revert back to defineAsyncComponent when https://github.com/vuejs/core/issues/6638 is resolved const LayoutLoader = defineComponent({ inheritAttrs: false, props: { name: String, ...process.dev ? { hasTransition: Boolean } : {} }, async setup (props, context) { let vnode: VNode if (process.dev && process.client) { onMounted(() => { nextTick(() => { if (props.name && ['#comment', '#text'].includes(vnode?.el?.nodeName)) { console.warn(`[nuxt] \`${props.name}\` layout does not have a single root node and will cause errors when navigating between routes.`) } }) }) } const LayoutComponent = await layouts[props.name]().then((r: any) => r.default || r) return () => { if (process.dev && process.client && props.hasTransition) { vnode = h(LayoutComponent, context.attrs, context.slots) return vnode } return h(LayoutComponent, context.attrs, context.slots) } } }) export default defineComponent({ inheritAttrs: false, props: { name: { type: [String, Boolean, Object] as unknown as () => string | false | Ref<string | false>, default: null } }, setup (props, context) { // Need to ensure (if we are not a child of `<NuxtPage>`) that we use synchronous route (not deferred) const injectedRoute = inject('_route') as RouteLocationNormalizedLoaded const route = injectedRoute === useRoute() ? useVueRouterRoute() : injectedRoute const layout = computed(() => unref(props.name) ?? route.meta.layout as string ?? 'default') let vnode: VNode let _layout: string | false if (process.dev && process.client) { onMounted(() => { nextTick(() => { if (_layout && _layout in layouts && ['#comment', '#text'].includes(vnode?.el?.nodeName)) { console.warn(`[nuxt] \`${_layout}\` layout does not have a single root node and will cause errors when navigating between routes.`) } }) }) } return () => { const hasLayout = layout.value && layout.value in layouts if (process.dev && layout.value && !hasLayout && layout.value !== 'default') { console.warn(`Invalid layout \`${layout.value}\` selected.`) } const transitionProps = route.meta.layoutTransition ?? defaultLayoutTransition // We avoid rendering layout transition if there is no layout to render return _wrapIf(Transition, hasLayout && transitionProps, { default: () => _wrapIf(LayoutLoader, hasLayout && { key: layout.value, name: layout.value, ...(process.dev ? { hasTransition: !!transitionProps } : {}), ...context.attrs }, context.slots).default() }).default() } } })
packages/nuxt/src/app/components/layout.ts
1
https://github.com/nuxt/nuxt/commit/0db3c6373a72e218baddfc3626695173da103a88
[ 0.0060382625088095665, 0.00164426164701581, 0.00017146245227195323, 0.0005060142721049488, 0.0019329970236867666 ]
{ "id": 2, "code_window": [ "import { defineComponent, h } from 'vue'\n", "import type { Component } from 'vue'\n", "\n", "const Fragment = defineComponent({\n", " setup (_props, { slots }) {\n", " return () => slots.default?.()\n", " }\n", "})\n" ], "labels": [ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ], "after_edit": [ " name: 'FragmentWrapper',\n" ], "file_path": "packages/nuxt/src/app/components/utils.ts", "type": "add", "edit_start_line_idx": 4 }
<template> <div> <div>nested/[foo]/index.vue</div> <div>foo: {{ $route.params.foo }}</div> </div> </template>
test/fixtures/basic/pages/nested/[foo]/index.vue
0
https://github.com/nuxt/nuxt/commit/0db3c6373a72e218baddfc3626695173da103a88
[ 0.000165220073540695, 0.000165220073540695, 0.000165220073540695, 0.000165220073540695, 0 ]
{ "id": 2, "code_window": [ "import { defineComponent, h } from 'vue'\n", "import type { Component } from 'vue'\n", "\n", "const Fragment = defineComponent({\n", " setup (_props, { slots }) {\n", " return () => slots.default?.()\n", " }\n", "})\n" ], "labels": [ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ], "after_edit": [ " name: 'FragmentWrapper',\n" ], "file_path": "packages/nuxt/src/app/components/utils.ts", "type": "add", "edit_start_line_idx": 4 }
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="147" height="40"> <radialGradient id="a" cy="0%" r="100.11%" gradientTransform="matrix(0 .9989 -1.152 0 .5 -.5)"> <stop offset="0" stop-color="#20c6b7"/> <stop offset="1" stop-color="#4d9abf"/> </radialGradient> <g fill="none" fill-rule="evenodd"> <path fill="#0e1e25" d="m53.37 12.978.123 2.198c1.403-1.7 3.245-2.55 5.525-2.55 3.951 0 5.962 2.268 6.032 6.804v12.568h-4.26v-12.322c0-1.207-.26-2.1-.78-2.681-.52-.58-1.371-.87-2.552-.87-1.719 0-3 .78-3.84 2.338v13.535h-4.262v-19.02h4.016zm24.378 19.372c-2.7 0-4.89-.852-6.567-2.557-1.678-1.705-2.517-3.976-2.517-6.812v-.527c0-1.898.365-3.595 1.096-5.089.73-1.494 1.757-2.657 3.078-3.49 1.321-.831 2.794-1.247 4.42-1.247 2.583 0 4.58.826 5.988 2.478 1.41 1.653 2.114 3.99 2.114 7.014v1.723h-12.4c.13 1.57.652 2.812 1.57 3.726s2.073 1.371 3.464 1.371c1.952 0 3.542-.79 4.77-2.373l2.297 2.198c-.76 1.136-1.774 2.018-3.042 2.645-1.269.627-2.692.94-4.27.94zm-.508-16.294c-1.17 0-2.113.41-2.832 1.23-.72.82-1.178 1.963-1.377 3.428h8.12v-.317c-.094-1.43-.474-2.51-1.14-3.243-.667-.732-1.59-1.098-2.771-1.098zm16.765-7.7v4.623h3.35v3.164h-3.35v10.617c0 .726.144 1.25.43 1.573.286.322.798.483 1.535.483a6.55 6.55 0 0 0 1.49-.176v3.305c-.97.27-1.905.404-2.806.404-3.273 0-4.91-1.81-4.91-5.431v-10.776h-3.124v-3.164h3.122v-4.623h4.261zm11.137 23.643h-4.262v-27h4.262zm9.172 0h-4.262v-19.02h4.262zm-4.525-23.96c0-.655.207-1.2.622-1.634.416-.433 1.009-.65 1.78-.65.772 0 1.368.217 1.79.65.42.434.63.979.63 1.635 0 .644-.21 1.18-.63 1.608-.422.428-1.018.642-1.79.642-.771 0-1.364-.214-1.78-.642-.415-.427-.622-.964-.622-1.608zm10.663 23.96v-15.857h-2.894v-3.164h2.894v-1.74c0-2.11.584-3.738 1.753-4.887 1.17-1.148 2.806-1.722 4.91-1.722.749 0 1.544.105 2.386.316l-.105 3.34a8.375 8.375 0 0 0 -1.631-.14c-2.035 0-3.052 1.048-3.052 3.146v1.687h3.858v3.164h-3.858v15.856h-4.261zm17.87-6.117 3.858-12.903h4.542l-7.54 21.903c-1.158 3.199-3.122 4.799-5.893 4.799-.62 0-1.304-.106-2.052-.317v-3.305l.807.053c1.075 0 1.885-.196 2.429-.589.543-.392.973-1.051 1.289-1.977l.613-1.635-6.664-18.932h4.595z"/> <path fill="url(#a)" fill-rule="nonzero" d="m28.589 14.135-.014-.006c-.008-.003-.016-.006-.023-.013a.11.11 0 0 1 -.028-.093l.773-4.726 3.625 3.626-3.77 1.604a.083.083 0 0 1 -.033.006h-.015c-.005-.003-.01-.007-.02-.017a1.716 1.716 0 0 0 -.495-.381zm5.258-.288 3.876 3.876c.805.806 1.208 1.208 1.355 1.674.022.069.04.138.054.209l-9.263-3.923a.728.728 0 0 0 -.015-.006c-.037-.015-.08-.032-.08-.07s.044-.056.081-.071l.012-.005zm5.127 7.003c-.2.376-.59.766-1.25 1.427l-4.37 4.369-5.652-1.177-.03-.006c-.05-.008-.103-.017-.103-.062a1.706 1.706 0 0 0 -.655-1.193c-.023-.023-.017-.059-.01-.092 0-.005 0-.01.002-.014l1.063-6.526.004-.022c.006-.05.015-.108.06-.108a1.73 1.73 0 0 0 1.16-.665c.009-.01.015-.021.027-.027.032-.015.07 0 .103.014l9.65 4.082zm-6.625 6.801-7.186 7.186 1.23-7.56.002-.01c.001-.01.003-.02.006-.029.01-.024.036-.034.061-.044l.012-.005a1.85 1.85 0 0 0 .695-.517c.024-.028.053-.055.09-.06a.09.09 0 0 1 .029 0l5.06 1.04zm-8.707 8.707-.81.81-8.955-12.942a.424.424 0 0 0 -.01-.014c-.014-.019-.029-.038-.026-.06 0-.016.011-.03.022-.042l.01-.013c.027-.04.05-.08.075-.123l.02-.035.003-.003c.014-.024.027-.047.051-.06.021-.01.05-.006.073-.001l9.921 2.046a.164.164 0 0 1 .076.033c.013.013.016.027.019.043a1.757 1.757 0 0 0 1.028 1.175c.028.014.016.045.003.078a.238.238 0 0 0 -.015.045c-.125.76-1.197 7.298-1.485 9.063zm-1.692 1.691c-.597.591-.949.904-1.347 1.03a2 2 0 0 1 -1.206 0c-.466-.148-.869-.55-1.674-1.356l-8.993-8.993 2.349-3.643c.011-.018.022-.034.04-.047.025-.018.061-.01.091 0a2.434 2.434 0 0 0 1.638-.083c.027-.01.054-.017.075.002a.19.19 0 0 1 .028.032l8.999 13.059zm-14.087-10.186-2.063-2.063 4.074-1.738a.084.084 0 0 1 .033-.007c.034 0 .054.034.072.065a2.91 2.91 0 0 0 .13.184l.013.016c.012.017.004.034-.008.05l-2.25 3.493zm-2.976-2.976-2.61-2.61c-.444-.444-.766-.766-.99-1.043l7.936 1.646a.84.84 0 0 0 .03.005c.049.008.103.017.103.063 0 .05-.059.073-.109.092l-.023.01zm-4.056-4.995a2 2 0 0 1 .09-.495c.148-.466.55-.868 1.356-1.674l3.34-3.34a2175.525 2175.525 0 0 0 4.626 6.687c.027.036.057.076.026.106-.146.161-.292.337-.395.528a.16.16 0 0 1 -.05.062c-.013.008-.027.005-.042.002h-.002l-8.949-1.877zm5.68-6.403 4.489-4.491c.423.185 1.96.834 3.333 1.414 1.04.44 1.988.84 2.286.97.03.012.057.024.07.054.008.018.004.041 0 .06a2.003 2.003 0 0 0 .523 1.828c.03.03 0 .073-.026.11l-.014.021-4.56 7.063c-.012.02-.023.037-.043.05-.024.015-.058.008-.086.001a2.274 2.274 0 0 0 -.543-.074c-.164 0-.342.03-.522.063h-.001c-.02.003-.038.007-.054-.005a.21.21 0 0 1 -.045-.051l-4.808-7.013zm5.398-5.398 5.814-5.814c.805-.805 1.208-1.208 1.674-1.355a2 2 0 0 1 1.206 0c.466.147.869.55 1.674 1.355l1.26 1.26-4.135 6.404a.155.155 0 0 1 -.041.048c-.025.017-.06.01-.09 0a2.097 2.097 0 0 0 -1.92.37c-.027.028-.067.012-.101-.003-.54-.235-4.74-2.01-5.341-2.265zm12.506-3.676 3.818 3.818-.92 5.698v.015a.135.135 0 0 1 -.008.038c-.01.02-.03.024-.05.03a1.83 1.83 0 0 0 -.548.273.154.154 0 0 0 -.02.017c-.011.012-.022.023-.04.025a.114.114 0 0 1 -.043-.007l-5.818-2.472-.011-.005c-.037-.015-.081-.033-.081-.071a2.198 2.198 0 0 0 -.31-.915c-.028-.046-.059-.094-.035-.141zm-3.932 8.606 5.454 2.31c.03.014.063.027.076.058a.106.106 0 0 1 0 .057c-.016.08-.03.171-.03.263v.153c0 .038-.039.054-.075.069l-.011.004c-.864.369-12.13 5.173-12.147 5.173s-.035 0-.052-.017c-.03-.03 0-.072.027-.11a.76.76 0 0 0 .014-.02l4.482-6.94.008-.012c.026-.042.056-.089.104-.089l.045.007c.102.014.192.027.283.027.68 0 1.31-.331 1.69-.897a.16.16 0 0 1 .034-.04c.027-.02.067-.01.098.004zm-6.246 9.185 12.28-5.237s.018 0 .035.017c.067.067.124.112.179.154l.027.017c.025.014.05.03.052.056 0 .01 0 .016-.002.025l-1.052 6.462-.004.026c-.007.05-.014.107-.061.107a1.729 1.729 0 0 0 -1.373.847l-.005.008c-.014.023-.027.045-.05.057-.021.01-.048.006-.07.001l-9.793-2.02c-.01-.002-.152-.519-.163-.52z" transform="translate(-.702)"/> </g> </svg>
docs/public/assets/support/agencies/full/light/netlify.svg
0
https://github.com/nuxt/nuxt/commit/0db3c6373a72e218baddfc3626695173da103a88
[ 0.0002944690641015768, 0.000235742365475744, 0.00017701565229799598, 0.000235742365475744, 0.00005872670590179041 ]
{ "id": 2, "code_window": [ "import { defineComponent, h } from 'vue'\n", "import type { Component } from 'vue'\n", "\n", "const Fragment = defineComponent({\n", " setup (_props, { slots }) {\n", " return () => slots.default?.()\n", " }\n", "})\n" ], "labels": [ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ], "after_edit": [ " name: 'FragmentWrapper',\n" ], "file_path": "packages/nuxt/src/app/components/utils.ts", "type": "add", "edit_start_line_idx": 4 }
/** * This file is based on Vue.js (MIT) webpack plugins * https://github.com/vuejs/vue/blob/dev/src/server/webpack-plugin/util.js */ import { logger } from '@nuxt/kit' import type { Compiler } from 'webpack' export const validate = (compiler: Compiler) => { if (compiler.options.target !== 'node') { logger.warn('webpack config `target` should be "node".') } if (!compiler.options.externals) { logger.info( 'It is recommended to externalize dependencies in the server build for ' + 'better build performance.' ) } } const isJSRegExp = /\.[cm]?js(\?[^.]+)?$/ export const isJS = (file: string) => isJSRegExp.test(file) export const extractQueryPartJS = (file: string) => isJSRegExp.exec(file)?.[1] export const isCSS = (file: string) => /\.css(\?[^.]+)?$/.test(file) export const isHotUpdate = (file: string) => file.includes('hot-update')
packages/webpack/src/plugins/vue/util.ts
0
https://github.com/nuxt/nuxt/commit/0db3c6373a72e218baddfc3626695173da103a88
[ 0.00017701549222692847, 0.00017209250654559582, 0.0001661284186411649, 0.00017261305765714496, 0.00000394106200474198 ]
{ "id": 3, "code_window": [ " return _wrapIf(Transition, hasTransition && transitionProps,\n", " wrapInKeepAlive(props.keepalive ?? routeProps.route.meta.keepalive ?? (defaultKeepaliveConfig as KeepAliveProps), h(Suspense, {\n", " onPending: () => nuxtApp.callHook('page:start', routeProps.Component),\n", " onResolve: () => { nextTick(() => nuxtApp.callHook('page:finish', routeProps.Component).finally(done)) }\n", " }, { default: () => h(Component, { key, routeProps, pageKey: key, hasTransition } as {}) })\n", " )).default()\n", " }\n", " })\n", " }\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " }, { default: () => h(RouteProvider, { key, routeProps, pageKey: key, hasTransition } as {}) })\n" ], "file_path": "packages/nuxt/src/pages/runtime/page.ts", "type": "replace", "edit_start_line_idx": 58 }
import { computed, defineComponent, h, provide, reactive, onMounted, nextTick, Suspense, Transition } from 'vue' import type { DefineComponent, VNode, KeepAliveProps, TransitionProps } from 'vue' import { RouterView } from 'vue-router' import { defu } from 'defu' import type { RouteLocationNormalized, RouteLocationNormalizedLoaded, RouteLocation } from 'vue-router' import type { RouterViewSlotProps } from './utils' import { generateRouteKey, wrapInKeepAlive } from './utils' import { useNuxtApp } from '#app' import { _wrapIf } from '#app/components/utils' // @ts-ignore import { appPageTransition as defaultPageTransition, appKeepalive as defaultKeepaliveConfig } from '#build/nuxt.config.mjs' export default defineComponent({ name: 'NuxtPage', inheritAttrs: false, props: { name: { type: String }, transition: { type: [Boolean, Object] as any as () => boolean | TransitionProps, default: undefined }, keepalive: { type: [Boolean, Object] as any as () => boolean | KeepAliveProps, default: undefined }, route: { type: Object as () => RouteLocationNormalized }, pageKey: { type: [Function, String] as unknown as () => string | ((route: RouteLocationNormalizedLoaded) => string), default: null } }, setup (props, { attrs }) { const nuxtApp = useNuxtApp() return () => { return h(RouterView, { name: props.name, route: props.route, ...attrs }, { default: (routeProps: RouterViewSlotProps) => { if (!routeProps.Component) { return } const key = generateRouteKey(routeProps, props.pageKey) const done = nuxtApp.deferHydration() const hasTransition = !!(props.transition ?? routeProps.route.meta.pageTransition ?? defaultPageTransition) const transitionProps = hasTransition && _mergeTransitionProps([ props.transition, routeProps.route.meta.pageTransition, defaultPageTransition, { onAfterLeave: () => { nuxtApp.callHook('page:transition:finish', routeProps.Component) } } ].filter(Boolean)) return _wrapIf(Transition, hasTransition && transitionProps, wrapInKeepAlive(props.keepalive ?? routeProps.route.meta.keepalive ?? (defaultKeepaliveConfig as KeepAliveProps), h(Suspense, { onPending: () => nuxtApp.callHook('page:start', routeProps.Component), onResolve: () => { nextTick(() => nuxtApp.callHook('page:finish', routeProps.Component).finally(done)) } }, { default: () => h(Component, { key, routeProps, pageKey: key, hasTransition } as {}) }) )).default() } }) } } }) as DefineComponent<{ name?: string transition?: boolean | TransitionProps keepalive?: boolean | KeepAliveProps route?: RouteLocationNormalized pageKey?: string | ((route: RouteLocationNormalizedLoaded) => string) [key: string]: any }> function _toArray (val: any) { return Array.isArray(val) ? val : (val ? [val] : []) } function _mergeTransitionProps (routeProps: TransitionProps[]): TransitionProps { const _props: TransitionProps[] = routeProps.map(prop => ({ ...prop, onAfterLeave: _toArray(prop.onAfterLeave) })) // @ts-ignore return defu(..._props) } const Component = defineComponent({ // TODO: Type props // eslint-disable-next-line vue/require-prop-types props: ['routeProps', 'pageKey', 'hasTransition'], setup (props) { // Prevent reactivity when the page will be rerendered in a different suspense fork // eslint-disable-next-line vue/no-setup-props-destructure const previousKey = props.pageKey // eslint-disable-next-line vue/no-setup-props-destructure const previousRoute = props.routeProps.route // Provide a reactive route within the page const route = {} as RouteLocation for (const key in props.routeProps.route) { (route as any)[key] = computed(() => previousKey === props.pageKey ? props.routeProps.route[key] : previousRoute[key]) } provide('_route', reactive(route)) let vnode: VNode if (process.dev && process.client && props.hasTransition) { onMounted(() => { nextTick(() => { if (['#comment', '#text'].includes(vnode?.el?.nodeName)) { const filename = (vnode?.type as any).__file console.warn(`[nuxt] \`${filename}\` does not have a single root node and will cause errors when navigating between routes.`) } }) }) } return () => { if (process.dev && process.client) { vnode = h(props.routeProps.Component) return vnode } return h(props.routeProps.Component) } } })
packages/nuxt/src/pages/runtime/page.ts
1
https://github.com/nuxt/nuxt/commit/0db3c6373a72e218baddfc3626695173da103a88
[ 0.9977849125862122, 0.07940565794706345, 0.0006753574125468731, 0.0023542428389191628, 0.26512718200683594 ]
{ "id": 3, "code_window": [ " return _wrapIf(Transition, hasTransition && transitionProps,\n", " wrapInKeepAlive(props.keepalive ?? routeProps.route.meta.keepalive ?? (defaultKeepaliveConfig as KeepAliveProps), h(Suspense, {\n", " onPending: () => nuxtApp.callHook('page:start', routeProps.Component),\n", " onResolve: () => { nextTick(() => nuxtApp.callHook('page:finish', routeProps.Component).finally(done)) }\n", " }, { default: () => h(Component, { key, routeProps, pageKey: key, hasTransition } as {}) })\n", " )).default()\n", " }\n", " })\n", " }\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " }, { default: () => h(RouteProvider, { key, routeProps, pageKey: key, hasTransition } as {}) })\n" ], "file_path": "packages/nuxt/src/pages/runtime/page.ts", "type": "replace", "edit_start_line_idx": 58 }
import { buildNuxt } from '@nuxt/kit' import { relative, resolve } from 'pathe' import consola from 'consola' import { clearDir } from '../utils/fs' import { loadKit } from '../utils/kit' import { writeTypes } from '../utils/prepare' import { defineNuxtCommand } from './index' export default defineNuxtCommand({ meta: { name: 'prepare', usage: 'npx nuxi prepare', description: 'Prepare nuxt for development/build' }, async invoke (args) { process.env.NODE_ENV = process.env.NODE_ENV || 'production' const rootDir = resolve(args._[0] || '.') const { loadNuxt } = await loadKit(rootDir) const nuxt = await loadNuxt({ rootDir, config: { _prepare: true } }) await clearDir(nuxt.options.buildDir) await buildNuxt(nuxt) await writeTypes(nuxt) consola.success('Types generated in', relative(process.cwd(), nuxt.options.buildDir)) } })
packages/nuxi/src/commands/prepare.ts
0
https://github.com/nuxt/nuxt/commit/0db3c6373a72e218baddfc3626695173da103a88
[ 0.00017550727352499962, 0.0001700856228126213, 0.00016479573969263583, 0.0001699538843240589, 0.000004373957381176297 ]
{ "id": 3, "code_window": [ " return _wrapIf(Transition, hasTransition && transitionProps,\n", " wrapInKeepAlive(props.keepalive ?? routeProps.route.meta.keepalive ?? (defaultKeepaliveConfig as KeepAliveProps), h(Suspense, {\n", " onPending: () => nuxtApp.callHook('page:start', routeProps.Component),\n", " onResolve: () => { nextTick(() => nuxtApp.callHook('page:finish', routeProps.Component).finally(done)) }\n", " }, { default: () => h(Component, { key, routeProps, pageKey: key, hasTransition } as {}) })\n", " )).default()\n", " }\n", " })\n", " }\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " }, { default: () => h(RouteProvider, { key, routeProps, pageKey: key, hasTransition } as {}) })\n" ], "file_path": "packages/nuxt/src/pages/runtime/page.ts", "type": "replace", "edit_start_line_idx": 58 }
import { existsSync, readdirSync } from 'node:fs' import { defineNuxtModule, addTemplate, addPlugin, addVitePlugin, addWebpackPlugin, findPath, addComponent, updateTemplates } from '@nuxt/kit' import { relative, resolve } from 'pathe' import { genString, genImport, genObjectFromRawEntries } from 'knitwork' import escapeRE from 'escape-string-regexp' import type { NuxtApp, NuxtPage } from '@nuxt/schema' import { joinURL } from 'ufo' import { distDir } from '../dirs' import { resolvePagesRoutes, normalizeRoutes } from './utils' import type { PageMetaPluginOptions } from './page-meta' import { PageMetaPlugin } from './page-meta' export default defineNuxtModule({ meta: { name: 'pages' }, setup (_options, nuxt) { const pagesDirs = nuxt.options._layers.map( layer => resolve(layer.config.srcDir, layer.config.dir?.pages || 'pages') ) // Disable module (and use universal router) if pages dir do not exists or user has disabled it const isNonEmptyDir = (dir: string) => existsSync(dir) && readdirSync(dir).length const isPagesEnabled = () => { if (typeof nuxt.options.pages === 'boolean') { return nuxt.options.pages } if (nuxt.options._layers.some(layer => existsSync(resolve(layer.config.srcDir, 'app/router.options.ts')))) { return true } if (pagesDirs.some(dir => isNonEmptyDir(dir))) { return true } return false } nuxt.options.pages = isPagesEnabled() if (!nuxt.options.pages) { addPlugin(resolve(distDir, 'app/plugins/router')) addTemplate({ filename: 'pages.mjs', getContents: () => 'export { useRoute } from \'#app\'' }) addComponent({ name: 'NuxtPage', filePath: resolve(distDir, 'pages/runtime/page-placeholder') }) return } const runtimeDir = resolve(distDir, 'pages/runtime') // Add $router types nuxt.hook('prepare:types', ({ references }) => { references.push({ types: 'vue-router' }) }) // Add vue-router route guard imports nuxt.hook('imports:sources', (sources) => { const routerImports = sources.find(s => s.from === '#app' && s.imports.includes('onBeforeRouteLeave')) if (routerImports) { routerImports.from = 'vue-router' } }) // Regenerate templates when adding or removing pages nuxt.hook('builder:watch', async (event, path) => { const dirs = [ nuxt.options.dir.pages, nuxt.options.dir.layouts, nuxt.options.dir.middleware ].filter(Boolean) const pathPattern = new RegExp(`(^|\\/)(${dirs.map(escapeRE).join('|')})/`) if (event !== 'change' && path.match(pathPattern)) { await updateTemplates({ filter: template => template.filename === 'routes.mjs' }) } }) nuxt.hook('app:resolve', (app) => { // Add default layout for pages if (app.mainComponent!.includes('@nuxt/ui-templates')) { app.mainComponent = resolve(runtimeDir, 'app.vue') } app.middleware.unshift({ name: 'validate', path: resolve(runtimeDir, 'validate'), global: true }) }) // Prerender all non-dynamic page routes when generating app if (!nuxt.options.dev && nuxt.options._generate) { const prerenderRoutes = new Set<string>() nuxt.hook('modules:done', () => { nuxt.hook('pages:extend', (pages) => { prerenderRoutes.clear() const processPages = (pages: NuxtPage[], currentPath = '/') => { for (const page of pages) { // Add root of optional dynamic paths and catchalls if (page.path.match(/^\/?:.*(\?|\(\.\*\)\*)$/) && !page.children?.length) { prerenderRoutes.add(currentPath) } // Skip dynamic paths if (page.path.includes(':')) { continue } const route = joinURL(currentPath, page.path) prerenderRoutes.add(route) if (page.children) { processPages(page.children, route) } } } processPages(pages) }) }) nuxt.hook('nitro:build:before', (nitro) => { for (const route of nitro.options.prerender.routes || []) { // Skip default route value as we only generate it if it is already // in the detected routes from `~/pages`. if (route === '/') { continue } prerenderRoutes.add(route) } nitro.options.prerender.routes = Array.from(prerenderRoutes) }) } nuxt.hook('imports:extend', (imports) => { imports.push( { name: 'definePageMeta', as: 'definePageMeta', from: resolve(runtimeDir, 'composables') }, { name: 'useLink', as: 'useLink', from: 'vue-router' } ) }) // Extract macros from pages const pageMetaOptions: PageMetaPluginOptions = { dev: nuxt.options.dev, sourcemap: nuxt.options.sourcemap.server || nuxt.options.sourcemap.client, dirs: nuxt.options._layers.map( layer => resolve(layer.config.srcDir, layer.config.dir?.pages || 'pages') ) } addVitePlugin(PageMetaPlugin.vite(pageMetaOptions)) addWebpackPlugin(PageMetaPlugin.webpack(pageMetaOptions)) // Add router plugin addPlugin(resolve(runtimeDir, 'router')) const getSources = (pages: NuxtPage[]): string[] => pages.flatMap(p => [relative(nuxt.options.srcDir, p.file), ...getSources(p.children || [])] ) // Do not prefetch page chunks nuxt.hook('build:manifest', async (manifest) => { const pages = await resolvePagesRoutes() await nuxt.callHook('pages:extend', pages) const sourceFiles = getSources(pages) for (const key in manifest) { if (manifest[key].isEntry) { manifest[key].dynamicImports = manifest[key].dynamicImports?.filter(i => !sourceFiles.includes(i)) } } }) // Add routes template addTemplate({ filename: 'routes.mjs', async getContents () { const pages = await resolvePagesRoutes() await nuxt.callHook('pages:extend', pages) const { routes, imports } = normalizeRoutes(pages) return [...imports, `export default ${routes}`].join('\n') } }) // Add vue-router import for `<NuxtLayout>` integration addTemplate({ filename: 'pages.mjs', getContents: () => 'export { useRoute } from \'vue-router\'' }) // Optimize vue-router to ensure we share the same injection symbol nuxt.options.vite.optimizeDeps = nuxt.options.vite.optimizeDeps || {} nuxt.options.vite.optimizeDeps.include = nuxt.options.vite.optimizeDeps.include || [] nuxt.options.vite.optimizeDeps.include.push('vue-router') // Add router options template addTemplate({ filename: 'router.options.mjs', getContents: async () => { // Scan and register app/router.options files const routerOptionsFiles = (await Promise.all(nuxt.options._layers.map( async layer => await findPath(resolve(layer.config.srcDir, 'app/router.options')) ))).filter(Boolean) as string[] // Add default options routerOptionsFiles.push(resolve(runtimeDir, 'router.options')) const configRouterOptions = genObjectFromRawEntries(Object.entries(nuxt.options.router.options) .map(([key, value]) => [key, genString(value as string)])) return [ ...routerOptionsFiles.map((file, index) => genImport(file, `routerOptions${index}`)), `const configRouterOptions = ${configRouterOptions}`, 'export default {', '...configRouterOptions,', // We need to reverse spreading order to respect layers priority ...routerOptionsFiles.map((_, index) => `...routerOptions${index},`).reverse(), '}' ].join('\n') } }) addTemplate({ filename: 'types/middleware.d.ts', getContents: ({ app }: { app: NuxtApp }) => { const composablesFile = resolve(runtimeDir, 'composables') const namedMiddleware = app.middleware.filter(mw => !mw.global) return [ 'import type { NavigationGuard } from \'vue-router\'', `export type MiddlewareKey = ${namedMiddleware.map(mw => genString(mw.name)).join(' | ') || 'string'}`, `declare module ${genString(composablesFile)} {`, ' interface PageMeta {', ' middleware?: MiddlewareKey | NavigationGuard | Array<MiddlewareKey | NavigationGuard>', ' }', '}' ].join('\n') } }) addTemplate({ filename: 'types/layouts.d.ts', getContents: ({ app }: { app: NuxtApp }) => { const composablesFile = resolve(runtimeDir, 'composables') return [ 'import { ComputedRef, Ref } from \'vue\'', `export type LayoutKey = ${Object.keys(app.layouts).map(name => genString(name)).join(' | ') || 'string'}`, `declare module ${genString(composablesFile)} {`, ' interface PageMeta {', ' layout?: false | LayoutKey | Ref<LayoutKey> | ComputedRef<LayoutKey>', ' }', '}' ].join('\n') } }) // Add <NuxtPage> addComponent({ name: 'NuxtPage', filePath: resolve(distDir, 'pages/runtime/page') }) // Add declarations for middleware keys nuxt.hook('prepare:types', ({ references }) => { references.push({ path: resolve(nuxt.options.buildDir, 'types/middleware.d.ts') }) references.push({ path: resolve(nuxt.options.buildDir, 'types/layouts.d.ts') }) }) } })
packages/nuxt/src/pages/module.ts
0
https://github.com/nuxt/nuxt/commit/0db3c6373a72e218baddfc3626695173da103a88
[ 0.00023933884222060442, 0.0001696360413916409, 0.0001600481482455507, 0.00016626319848001003, 0.00001484823769715149 ]
{ "id": 3, "code_window": [ " return _wrapIf(Transition, hasTransition && transitionProps,\n", " wrapInKeepAlive(props.keepalive ?? routeProps.route.meta.keepalive ?? (defaultKeepaliveConfig as KeepAliveProps), h(Suspense, {\n", " onPending: () => nuxtApp.callHook('page:start', routeProps.Component),\n", " onResolve: () => { nextTick(() => nuxtApp.callHook('page:finish', routeProps.Component).finally(done)) }\n", " }, { default: () => h(Component, { key, routeProps, pageKey: key, hasTransition } as {}) })\n", " )).default()\n", " }\n", " })\n", " }\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " }, { default: () => h(RouteProvider, { key, routeProps, pageKey: key, hasTransition } as {}) })\n" ], "file_path": "packages/nuxt/src/pages/runtime/page.ts", "type": "replace", "edit_start_line_idx": 58 }
<template> <div> About </div> </template>
examples/routing/pages/pages/about.vue
0
https://github.com/nuxt/nuxt/commit/0db3c6373a72e218baddfc3626695173da103a88
[ 0.000168878206750378, 0.000168878206750378, 0.000168878206750378, 0.000168878206750378, 0 ]
{ "id": 4, "code_window": [ " }))\n", " // @ts-ignore\n", " return defu(..._props)\n", "}\n", "\n", "const Component = defineComponent({\n", " // TODO: Type props\n", " // eslint-disable-next-line vue/require-prop-types\n", " props: ['routeProps', 'pageKey', 'hasTransition'],\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ "const RouteProvider = defineComponent({\n", " name: 'RouteProvider',\n" ], "file_path": "packages/nuxt/src/pages/runtime/page.ts", "type": "replace", "edit_start_line_idx": 86 }
import { defineComponent, h } from 'vue' import type { Component } from 'vue' const Fragment = defineComponent({ setup (_props, { slots }) { return () => slots.default?.() } }) /** * Internal utility * * @private */ export const _wrapIf = (component: Component, props: any, slots: any) => { return { default: () => props ? h(component, props === true ? {} : props, slots) : h(Fragment, {}, slots) } }
packages/nuxt/src/app/components/utils.ts
1
https://github.com/nuxt/nuxt/commit/0db3c6373a72e218baddfc3626695173da103a88
[ 0.9972879886627197, 0.9970208406448364, 0.9967537522315979, 0.9970208406448364, 0.0002671182155609131 ]
{ "id": 4, "code_window": [ " }))\n", " // @ts-ignore\n", " return defu(..._props)\n", "}\n", "\n", "const Component = defineComponent({\n", " // TODO: Type props\n", " // eslint-disable-next-line vue/require-prop-types\n", " props: ['routeProps', 'pageKey', 'hasTransition'],\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ "const RouteProvider = defineComponent({\n", " name: 'RouteProvider',\n" ], "file_path": "packages/nuxt/src/pages/runtime/page.ts", "type": "replace", "edit_start_line_idx": 86 }
<template> <div> fixed-keyed-child-parent <NuxtPage /> </div> </template>
test/fixtures/basic/pages/fixed-keyed-child-parent.vue
0
https://github.com/nuxt/nuxt/commit/0db3c6373a72e218baddfc3626695173da103a88
[ 0.00017340088379569352, 0.00017340088379569352, 0.00017340088379569352, 0.00017340088379569352, 0 ]
{ "id": 4, "code_window": [ " }))\n", " // @ts-ignore\n", " return defu(..._props)\n", "}\n", "\n", "const Component = defineComponent({\n", " // TODO: Type props\n", " // eslint-disable-next-line vue/require-prop-types\n", " props: ['routeProps', 'pageKey', 'hasTransition'],\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ "const RouteProvider = defineComponent({\n", " name: 'RouteProvider',\n" ], "file_path": "packages/nuxt/src/pages/runtime/page.ts", "type": "replace", "edit_start_line_idx": 86 }
<template> <div> Single <div> {{ data }} - {{ data2 }} </div> </div> </template> <script setup lang="ts"> const { data, refresh } = await useCounter() const { data: data2, refresh: refresh2 } = await useCounter() let initial = data.value!.count // Refresh on client and server side await refresh() if (data.value!.count !== initial + 1) { throw new Error('Data not refreshed?' + data.value!.count + ' : ' + data2.value!.count) } if (data.value!.count !== data2.value!.count) { throw new Error('AsyncData not synchronised') } initial = data.value!.count await refresh2() if (data.value!.count !== initial + 1) { throw new Error('data2 refresh not syncronised?') } if (data.value!.count !== data2.value!.count) { throw new Error('AsyncData not synchronised') } </script>
test/fixtures/basic/pages/useAsyncData/refresh.vue
0
https://github.com/nuxt/nuxt/commit/0db3c6373a72e218baddfc3626695173da103a88
[ 0.00017498410306870937, 0.00017275910067837685, 0.00016945097013376653, 0.00017330066475551575, 0.0000021995326733303955 ]
{ "id": 4, "code_window": [ " }))\n", " // @ts-ignore\n", " return defu(..._props)\n", "}\n", "\n", "const Component = defineComponent({\n", " // TODO: Type props\n", " // eslint-disable-next-line vue/require-prop-types\n", " props: ['routeProps', 'pageKey', 'hasTransition'],\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ "const RouteProvider = defineComponent({\n", " name: 'RouteProvider',\n" ], "file_path": "packages/nuxt/src/pages/runtime/page.ts", "type": "replace", "edit_start_line_idx": 86 }
<svg width="52" height="58" viewBox="0 0 52 58" fill="none" xmlns="http://www.w3.org/2000/svg"> <g clip-path="url(#clip0_1958_63141)"> <path d="M5.508 15.3227L5.50802 15.3227L5.51516 15.3182L22.8027 4.37921C24.1138 3.57184 25.7379 3.54018 27.0673 4.29161L27.0715 4.29396L45.6066 14.6133C45.6073 14.6138 45.608 14.6142 45.6087 14.6146C46.9303 15.3626 47.7712 16.7791 47.8043 18.3448L47.9155 38.5289H47.9154L47.9156 38.5397C47.9468 40.1033 47.1694 41.5622 45.8798 42.3851L28.3284 53.5843C27.0089 54.4262 25.356 54.4717 24.0056 53.7084L5.8819 43.4643C4.45653 42.6586 3.40665 41.1507 3.41657 39.6072H3.41659V39.6024L3.41666 19.0833C3.41666 19.0825 3.41667 19.0817 3.41667 19.081C3.42739 17.5381 4.22435 16.1148 5.508 15.3227Z" fill="white" stroke="url(#paint0_linear_1958_63141)" stroke-width="1.5"/> <path d="M34.565 27.6407C34.4478 27.4813 34.2948 27.3517 34.1185 27.2621C33.9421 27.1726 33.7472 27.1256 33.5494 27.125H32.5416V25.875C32.5416 25.5435 32.4099 25.2256 32.1754 24.9912C31.941 24.7567 31.6231 24.625 31.2916 24.625H25.8775L23.7056 23C23.4903 22.8357 23.2265 22.7477 22.9556 22.75H18.7916C18.46 22.75 18.1421 22.8817 17.9077 23.1162C17.6733 23.3506 17.5416 23.6685 17.5416 24V35.25C17.5405 35.3324 17.556 35.4142 17.587 35.4905C17.618 35.5668 17.664 35.6361 17.7223 35.6943C17.7805 35.7526 17.8498 35.7986 17.9261 35.8296C18.0024 35.8606 18.0842 35.8761 18.1666 35.875H31.9166C32.0482 35.8751 32.1764 35.8335 32.283 35.7564C32.3896 35.6792 32.4692 35.5704 32.5103 35.4454L34.7369 28.7735C34.7987 28.5844 34.8154 28.3834 34.7855 28.1867C34.7557 27.9899 34.6801 27.8029 34.565 27.6407ZM22.9556 24L25.1275 25.625C25.3428 25.7894 25.6067 25.8774 25.8775 25.875H31.2916V27.125H21.1197C20.8574 27.1245 20.6017 27.2064 20.3885 27.3592C20.1754 27.5121 20.0158 27.728 19.9322 27.9766L18.7916 31.3985V24H22.9556ZM31.4634 34.625H19.0337L21.1197 28.375H33.5494L31.4634 34.625Z" fill="url(#paint1_linear_1958_63141)"/> </g> <defs> <linearGradient id="paint0_linear_1958_63141" x1="3.11754" y1="18.9481" x2="48.8405" y2="41.3679" gradientUnits="userSpaceOnUse"> <stop stop-color="#00DC82"/> <stop offset="1" stop-color="#003F25"/> </linearGradient> <linearGradient id="paint1_linear_1958_63141" x1="17.4934" y1="25.5549" x2="32.3706" y2="36.0783" gradientUnits="userSpaceOnUse"> <stop stop-color="#00DC82"/> <stop offset="1" stop-color="#003F25"/> </linearGradient> <clipPath id="clip0_1958_63141"> <rect width="51" height="58" fill="white" transform="translate(0.666504)"/> </clipPath> </defs> </svg>
docs/public/assets/docs/getting-started/views/docs-landing/directory-structure-light.svg
0
https://github.com/nuxt/nuxt/commit/0db3c6373a72e218baddfc3626695173da103a88
[ 0.00080466503277421, 0.000490057107526809, 0.00017544922593515366, 0.000490057107526809, 0.00031460789614357054 ]
{ "id": 0, "code_window": [ "import SidebarStories from './SidebarStories';\n", "\n", "const Heading = styled(SidebarHeading)({\n", " padding: '20px 20px 10px',\n", "});\n", "\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep" ], "after_edit": [ " padding: '20px 20px 12px',\n" ], "file_path": "lib/ui/src/components/sidebar/Sidebar.js", "type": "replace", "edit_start_line_idx": 9 }
import React from 'react'; import PropTypes from 'prop-types'; import { styled } from '@storybook/theming'; import NotificationList, { NotificationListSpacer } from './NotificationList'; import SidebarHeading from './SidebarHeading'; import SidebarStories from './SidebarStories'; const Heading = styled(SidebarHeading)({ padding: '20px 20px 10px', }); const Container = styled.nav({ position: 'absolute', zIndex: 1, left: 0, top: 0, bottom: 0, right: 0, width: '100%', height: '100%', overflowY: 'auto', overflowX: 'hidden', }); const Foot = styled.div({}); export const Notifications = styled.div({ position: 'fixed', display: 'block', bottom: 0, margin: 0, padding: 0, width: '20%', minWidth: 200, maxWidth: 280, zIndex: 2, }); const Sidebar = ({ storyId, notifications = [], stories, menu, menuHighlighted }) => ( <Container className="container"> <Heading menuHighlighted={menuHighlighted} menu={menu} /> <SidebarStories stories={stories} storyId={storyId} /> <Foot> <NotificationListSpacer notifications={notifications} /> </Foot> <Notifications> <NotificationList notifications={notifications} /> </Notifications> </Container> ); Sidebar.propTypes = { stories: PropTypes.shape({}).isRequired, storyId: PropTypes.string, notifications: PropTypes.arrayOf(PropTypes.shape({})).isRequired, menu: PropTypes.arrayOf(PropTypes.shape({})).isRequired, menuHighlighted: PropTypes.bool, }; Sidebar.defaultProps = { storyId: undefined, menuHighlighted: false, }; Sidebar.displayName = 'Sidebar'; export default Sidebar;
lib/ui/src/components/sidebar/Sidebar.js
1
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.9982970356941223, 0.14487560093402863, 0.0001852377608884126, 0.0008845001575537026, 0.34842801094055176 ]
{ "id": 0, "code_window": [ "import SidebarStories from './SidebarStories';\n", "\n", "const Heading = styled(SidebarHeading)({\n", " padding: '20px 20px 10px',\n", "});\n", "\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep" ], "after_edit": [ " padding: '20px 20px 12px',\n" ], "file_path": "lib/ui/src/components/sidebar/Sidebar.js", "type": "replace", "edit_start_line_idx": 9 }
import { storiesOf, moduleMetadata } from '@storybook/angular'; import { withKnobs, text } from '@storybook/addon-knobs'; import { DummyService } from './moduleMetadata/dummy.service'; import { ServiceComponent } from './moduleMetadata/service.component'; storiesOf('Custom|Providers', module) .addDecorator( moduleMetadata({ imports: [], schemas: [], declarations: [], providers: [DummyService], }) ) .add('Simple', () => ({ component: ServiceComponent, props: { name: 'Static name', }, })) .addDecorator(withKnobs) .add('With knobs', () => { const name = text('name', 'Dynamic knob'); return { component: ServiceComponent, props: { name, }, }; });
examples/angular-cli/src/stories/custom-providers.stories.ts
0
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.00017742172349244356, 0.00017644076433498412, 0.00017573217337485403, 0.00017630457296036184, 6.138496360108547e-7 ]
{ "id": 0, "code_window": [ "import SidebarStories from './SidebarStories';\n", "\n", "const Heading = styled(SidebarHeading)({\n", " padding: '20px 20px 10px',\n", "});\n", "\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep" ], "after_edit": [ " padding: '20px 20px 12px',\n" ], "file_path": "lib/ui/src/components/sidebar/Sidebar.js", "type": "replace", "edit_start_line_idx": 9 }
// This optional code is used to register a service worker. // register() is not called by default. // This lets the app load faster on subsequent visits in production, and gives // it offline capabilities. However, it also means that developers (and users) // will only see deployed updates on subsequent visits to a page, after all the // existing tabs open on the page have been closed, since previously cached // resources are updated in the background. // To learn more about the benefits of this model and instructions on how to // opt-in, read http://bit.ly/CRA-PWA const isLocalhost = Boolean( window.location.hostname === 'localhost' || // [::1] is the IPv6 localhost address. window.location.hostname === '[::1]' || // 127.0.0.1/8 is considered localhost for IPv4. window.location.hostname.match( /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/ ) ); export function register(config) { if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { // The URL constructor is available in all browsers that support SW. const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href); if (publicUrl.origin !== window.location.origin) { // Our service worker won't work if PUBLIC_URL is on a different origin // from what our page is served on. This might happen if a CDN is used to // serve assets; see https://github.com/facebook/create-react-app/issues/2374 return; } window.addEventListener('load', () => { const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; if (isLocalhost) { // This is running on localhost. Let's check if a service worker still exists or not. checkValidServiceWorker(swUrl, config); // Add some additional logging to localhost, pointing developers to the // service worker/PWA documentation. navigator.serviceWorker.ready.then(() => { console.log( 'This web app is being served cache-first by a service ' + 'worker. To learn more, visit http://bit.ly/CRA-PWA' ); }); } else { // Is not localhost. Just register service worker registerValidSW(swUrl, config); } }); } } function registerValidSW(swUrl, config) { navigator.serviceWorker .register(swUrl) .then(registration => { registration.onupdatefound = () => { const installingWorker = registration.installing; if (installingWorker == null) { return; } installingWorker.onstatechange = () => { if (installingWorker.state === 'installed') { if (navigator.serviceWorker.controller) { // At this point, the updated precached content has been fetched, // but the previous service worker will still serve the older // content until all client tabs are closed. console.log( 'New content is available and will be used when all ' + 'tabs for this page are closed. See http://bit.ly/CRA-PWA.' ); // Execute callback if (config && config.onUpdate) { config.onUpdate(registration); } } else { // At this point, everything has been precached. // It's the perfect time to display a // "Content is cached for offline use." message. console.log('Content is cached for offline use.'); // Execute callback if (config && config.onSuccess) { config.onSuccess(registration); } } } }; }; }) .catch(error => { console.error('Error during service worker registration:', error); }); } function checkValidServiceWorker(swUrl, config) { // Check if the service worker can be found. If it can't reload the page. fetch(swUrl) .then(response => { // Ensure service worker exists, and that we really are getting a JS file. const contentType = response.headers.get('content-type'); if ( response.status === 404 || (contentType != null && contentType.indexOf('javascript') === -1) ) { // No service worker found. Probably a different app. Reload the page. navigator.serviceWorker.ready.then(registration => { registration.unregister().then(() => { window.location.reload(); }); }); } else { // Service worker found. Proceed as normal. registerValidSW(swUrl, config); } }) .catch(() => { console.log( 'No internet connection found. App is running in offline mode.' ); }); } export function unregister() { if ('serviceWorker' in navigator) { navigator.serviceWorker.ready.then(registration => { registration.unregister(); }); } }
lib/cli/test/fixtures/react_scripts_v2_forked/src/serviceWorker.js
0
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.00017492838378529996, 0.00017015112098306417, 0.00016679347027093172, 0.00017002261301968247, 0.000002350966497033369 ]
{ "id": 0, "code_window": [ "import SidebarStories from './SidebarStories';\n", "\n", "const Heading = styled(SidebarHeading)({\n", " padding: '20px 20px 10px',\n", "});\n", "\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep" ], "after_edit": [ " padding: '20px 20px 12px',\n" ], "file_path": "lib/ui/src/components/sidebar/Sidebar.js", "type": "replace", "edit_start_line_idx": 9 }
module.exports = { printWidth: 100, tabWidth: 2, bracketSpacing: true, trailingComma: 'es5', singleQuote: true, overrides: [ { files: '*.html', options: { parser: 'babel' }, }, ], };
prettier.config.js
0
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.00017829697753768414, 0.00017554228543303907, 0.00017278757877647877, 0.00017554228543303907, 0.0000027546993806026876 ]
{ "id": 1, "code_window": [ "});\n", "\n", "const Container = styled.nav({\n", " position: 'absolute',\n", " zIndex: 1,\n" ], "labels": [ "keep", "add", "keep", "keep", "keep" ], "after_edit": [ "const Stories = styled(SidebarStories)(({ loading }) => (loading ? { marginTop: 8 } : {}));\n", "\n" ], "file_path": "lib/ui/src/components/sidebar/Sidebar.js", "type": "add", "edit_start_line_idx": 12 }
import React from 'react'; import PropTypes from 'prop-types'; import { styled } from '@storybook/theming'; import NotificationList, { NotificationListSpacer } from './NotificationList'; import SidebarHeading from './SidebarHeading'; import SidebarStories from './SidebarStories'; const Heading = styled(SidebarHeading)({ padding: '20px 20px 10px', }); const Container = styled.nav({ position: 'absolute', zIndex: 1, left: 0, top: 0, bottom: 0, right: 0, width: '100%', height: '100%', overflowY: 'auto', overflowX: 'hidden', }); const Foot = styled.div({}); export const Notifications = styled.div({ position: 'fixed', display: 'block', bottom: 0, margin: 0, padding: 0, width: '20%', minWidth: 200, maxWidth: 280, zIndex: 2, }); const Sidebar = ({ storyId, notifications = [], stories, menu, menuHighlighted }) => ( <Container className="container"> <Heading menuHighlighted={menuHighlighted} menu={menu} /> <SidebarStories stories={stories} storyId={storyId} /> <Foot> <NotificationListSpacer notifications={notifications} /> </Foot> <Notifications> <NotificationList notifications={notifications} /> </Notifications> </Container> ); Sidebar.propTypes = { stories: PropTypes.shape({}).isRequired, storyId: PropTypes.string, notifications: PropTypes.arrayOf(PropTypes.shape({})).isRequired, menu: PropTypes.arrayOf(PropTypes.shape({})).isRequired, menuHighlighted: PropTypes.bool, }; Sidebar.defaultProps = { storyId: undefined, menuHighlighted: false, }; Sidebar.displayName = 'Sidebar'; export default Sidebar;
lib/ui/src/components/sidebar/Sidebar.js
1
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.9980619549751282, 0.283463716506958, 0.00016699811385478824, 0.002656316850334406, 0.44597724080085754 ]
{ "id": 1, "code_window": [ "});\n", "\n", "const Container = styled.nav({\n", " position: 'absolute',\n", " zIndex: 1,\n" ], "labels": [ "keep", "add", "keep", "keep", "keep" ], "after_edit": [ "const Stories = styled(SidebarStories)(({ loading }) => (loading ? { marginTop: 8 } : {}));\n", "\n" ], "file_path": "lib/ui/src/components/sidebar/Sidebar.js", "type": "add", "edit_start_line_idx": 12 }
{ "short_name": "React App", "name": "Create React App Sample", "icons": [ { "src": "favicon.ico", "sizes": "64x64 32x32 24x24 16x16", "type": "image/x-icon" } ], "start_url": ".", "display": "standalone", "theme_color": "#000000", "background_color": "#ffffff" }
lib/cli/test/fixtures/react_scripts_v2/public/manifest.json
0
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.00017213457613252103, 0.00017112636123783886, 0.00017011813179124147, 0.00017112636123783886, 0.0000010082221706397831 ]
{ "id": 1, "code_window": [ "});\n", "\n", "const Container = styled.nav({\n", " position: 'absolute',\n", " zIndex: 1,\n" ], "labels": [ "keep", "add", "keep", "keep", "keep" ], "after_edit": [ "const Stories = styled(SidebarStories)(({ loading }) => (loading ? { marginTop: 8 } : {}));\n", "\n" ], "file_path": "lib/ui/src/components/sidebar/Sidebar.js", "type": "add", "edit_start_line_idx": 12 }
import { Template } from 'meteor/templating'; import { ReactiveVar } from 'meteor/reactive-var'; import './main.html'; Template.hello.onCreated(function helloOnCreated() { // counter starts at 0 this.counter = new ReactiveVar(0); }); Template.hello.helpers({ counter() { return Template.instance().counter.get(); }, }); Template.hello.events({ 'click button'(event, instance) { // increment the counter when button is clicked instance.counter.set(instance.counter.get() + 1); }, });
lib/cli/test/fixtures/meteor/client/main.js
0
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.00017311013652943075, 0.0001707685150904581, 0.00016749519272707403, 0.00017170017235912383, 0.000002385079824307468 ]
{ "id": 1, "code_window": [ "});\n", "\n", "const Container = styled.nav({\n", " position: 'absolute',\n", " zIndex: 1,\n" ], "labels": [ "keep", "add", "keep", "keep", "keep" ], "after_edit": [ "const Stories = styled(SidebarStories)(({ loading }) => (loading ? { marginTop: 8 } : {}));\n", "\n" ], "file_path": "lib/ui/src/components/sidebar/Sidebar.js", "type": "add", "edit_start_line_idx": 12 }
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. # dependencies /node_modules /.pnp .pnp.js # testing /coverage # production /build # misc .DS_Store .env.local .env.development.local .env.test.local .env.production.local npm-debug.log* yarn-debug.log* yarn-error.log*
lib/cli/test/fixtures/react_scripts_v2/.gitignore
0
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.00017214048421010375, 0.00017008591385092586, 0.0001680030400166288, 0.00017011423187796026, 0.000001689223154244246 ]
{ "id": 2, "code_window": [ " zIndex: 2,\n", "});\n", "\n", "const Sidebar = ({ storyId, notifications = [], stories, menu, menuHighlighted }) => (\n", " <Container className=\"container\">\n", " <Heading menuHighlighted={menuHighlighted} menu={menu} />\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep" ], "after_edit": [ "const Sidebar = ({ storyId, notifications = [], stories, menu, menuHighlighted, loading }) => (\n" ], "file_path": "lib/ui/src/components/sidebar/Sidebar.js", "type": "replace", "edit_start_line_idx": 39 }
import React from 'react'; import PropTypes from 'prop-types'; import { styled } from '@storybook/theming'; import NotificationList, { NotificationListSpacer } from './NotificationList'; import SidebarHeading from './SidebarHeading'; import SidebarStories from './SidebarStories'; const Heading = styled(SidebarHeading)({ padding: '20px 20px 10px', }); const Container = styled.nav({ position: 'absolute', zIndex: 1, left: 0, top: 0, bottom: 0, right: 0, width: '100%', height: '100%', overflowY: 'auto', overflowX: 'hidden', }); const Foot = styled.div({}); export const Notifications = styled.div({ position: 'fixed', display: 'block', bottom: 0, margin: 0, padding: 0, width: '20%', minWidth: 200, maxWidth: 280, zIndex: 2, }); const Sidebar = ({ storyId, notifications = [], stories, menu, menuHighlighted }) => ( <Container className="container"> <Heading menuHighlighted={menuHighlighted} menu={menu} /> <SidebarStories stories={stories} storyId={storyId} /> <Foot> <NotificationListSpacer notifications={notifications} /> </Foot> <Notifications> <NotificationList notifications={notifications} /> </Notifications> </Container> ); Sidebar.propTypes = { stories: PropTypes.shape({}).isRequired, storyId: PropTypes.string, notifications: PropTypes.arrayOf(PropTypes.shape({})).isRequired, menu: PropTypes.arrayOf(PropTypes.shape({})).isRequired, menuHighlighted: PropTypes.bool, }; Sidebar.defaultProps = { storyId: undefined, menuHighlighted: false, }; Sidebar.displayName = 'Sidebar'; export default Sidebar;
lib/ui/src/components/sidebar/Sidebar.js
1
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.9984018206596375, 0.7097181677818298, 0.00043722495320253074, 0.996060311794281, 0.4475635290145874 ]
{ "id": 2, "code_window": [ " zIndex: 2,\n", "});\n", "\n", "const Sidebar = ({ storyId, notifications = [], stories, menu, menuHighlighted }) => (\n", " <Container className=\"container\">\n", " <Heading menuHighlighted={menuHighlighted} menu={menu} />\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep" ], "after_edit": [ "const Sidebar = ({ storyId, notifications = [], stories, menu, menuHighlighted, loading }) => (\n" ], "file_path": "lib/ui/src/components/sidebar/Sidebar.js", "type": "replace", "edit_start_line_idx": 39 }
module.exports = { printWidth: 100, tabWidth: 2, bracketSpacing: true, trailingComma: 'es5', singleQuote: true, overrides: [ { files: '*.html', options: { parser: 'babel' }, }, ], };
prettier.config.js
0
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.00017380031931679696, 0.00017293922428507358, 0.0001720781292533502, 0.00017293922428507358, 8.610950317233801e-7 ]
{ "id": 2, "code_window": [ " zIndex: 2,\n", "});\n", "\n", "const Sidebar = ({ storyId, notifications = [], stories, menu, menuHighlighted }) => (\n", " <Container className=\"container\">\n", " <Heading menuHighlighted={menuHighlighted} menu={menu} />\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep" ], "after_edit": [ "const Sidebar = ({ storyId, notifications = [], stories, menu, menuHighlighted, loading }) => (\n" ], "file_path": "lib/ui/src/components/sidebar/Sidebar.js", "type": "replace", "edit_start_line_idx": 39 }
node_modules/
lib/cli/test/fixtures/meteor/.gitignore
0
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.00017581330030225217, 0.00017581330030225217, 0.00017581330030225217, 0.00017581330030225217, 0 ]
{ "id": 2, "code_window": [ " zIndex: 2,\n", "});\n", "\n", "const Sidebar = ({ storyId, notifications = [], stories, menu, menuHighlighted }) => (\n", " <Container className=\"container\">\n", " <Heading menuHighlighted={menuHighlighted} menu={menu} />\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep" ], "after_edit": [ "const Sidebar = ({ storyId, notifications = [], stories, menu, menuHighlighted, loading }) => (\n" ], "file_path": "lib/ui/src/components/sidebar/Sidebar.js", "type": "replace", "edit_start_line_idx": 39 }
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Storyshots Custom|Style Default 1`] = ` <storybook-dynamic-app-root cfr={[Function CodegenComponentFactoryResolver]} data={[Function Object]} target={[Function ViewContainerRef_]} > <ng-component> <storybook-button-component _nghost-c11="" ng-reflect-text="Button with custom styles" > <button _ngcontent-c11="" > Button with custom styles </button> </storybook-button-component> </ng-component> </storybook-dynamic-app-root> `; exports[`Storyshots Custom|Style With Knobs 1`] = ` <storybook-dynamic-app-root cfr={[Function CodegenComponentFactoryResolver]} data={[Function Object]} target={[Function ViewContainerRef_]} > <ng-component> <storybook-button-component _nghost-c12="" ng-reflect-text="Button with custom styles" > <button _ngcontent-c12="" > Button with custom styles </button> </storybook-button-component> </ng-component> </storybook-dynamic-app-root> `;
examples/angular-cli/src/stories/__snapshots__/custom-styles.stories.storyshot
0
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.00017087471496779472, 0.00016743075684644282, 0.0001647022581892088, 0.00016654713544994593, 0.0000021472897060448304 ]
{ "id": 3, "code_window": [ " <Container className=\"container\">\n", " <Heading menuHighlighted={menuHighlighted} menu={menu} />\n", " <SidebarStories stories={stories} storyId={storyId} />\n", "\n", " <Foot>\n", " <NotificationListSpacer notifications={notifications} />\n", " </Foot>\n" ], "labels": [ "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " <Stories stories={stories} storyId={storyId} loading={loading} />\n" ], "file_path": "lib/ui/src/components/sidebar/Sidebar.js", "type": "replace", "edit_start_line_idx": 42 }
import React from 'react'; import PropTypes from 'prop-types'; import { styled, withTheme } from '@storybook/theming'; import { StorybookLogo } from '@storybook/components'; import Menu from '../menu/Menu'; const BrandArea = styled.div(({ theme }) => ({ fontSize: `${theme.typography.size.s2}px`, fontWeight: theme.typography.weight.bold, })); const Logo = styled(StorybookLogo)({ width: 'auto', height: 24, display: 'block', }); const LogoLink = styled.a({ display: 'inline-block', color: 'inherit', textDecoration: 'none', }); const Head = styled.div({ display: 'flex', alignItems: 'center', justifyContent: 'space-between', }); const Brand = withTheme(({ theme: { brand } }) => ( <BrandArea> {brand || ( <LogoLink href="./"> <Logo /> </LogoLink> )} </BrandArea> )); export default function SidebarHeading({ menuHighlighted, menu, ...props }) { return ( <Head {...props}> <Brand /> <Menu highlighted={menuHighlighted} menuItems={menu} /> </Head> ); } SidebarHeading.propTypes = { menuHighlighted: PropTypes.bool, menu: PropTypes.arrayOf(PropTypes.shape({})).isRequired, }; SidebarHeading.defaultProps = { menuHighlighted: false, };
lib/ui/src/components/sidebar/SidebarHeading.js
1
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.005005418322980404, 0.0012918049469590187, 0.00016370318189729005, 0.0001753619289956987, 0.0017993684159591794 ]
{ "id": 3, "code_window": [ " <Container className=\"container\">\n", " <Heading menuHighlighted={menuHighlighted} menu={menu} />\n", " <SidebarStories stories={stories} storyId={storyId} />\n", "\n", " <Foot>\n", " <NotificationListSpacer notifications={notifications} />\n", " </Foot>\n" ], "labels": [ "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " <Stories stories={stories} storyId={storyId} loading={loading} />\n" ], "file_path": "lib/ui/src/components/sidebar/Sidebar.js", "type": "replace", "edit_start_line_idx": 42 }
// FIXME: @igor-dv // import React from 'react'; // import { storiesOf } from '@storybook/react'; // import { ReactComponent as Logo } from '../logo.svg'; // // storiesOf('CRA', module).add('Svgr', () => <Logo />);
examples/cra-kitchen-sink/src/stories/cra-svgr.stories.js
0
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.0001723558088997379, 0.0001723558088997379, 0.0001723558088997379, 0.0001723558088997379, 0 ]
{ "id": 3, "code_window": [ " <Container className=\"container\">\n", " <Heading menuHighlighted={menuHighlighted} menu={menu} />\n", " <SidebarStories stories={stories} storyId={storyId} />\n", "\n", " <Foot>\n", " <NotificationListSpacer notifications={notifications} />\n", " </Foot>\n" ], "labels": [ "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " <Stories stories={stories} storyId={storyId} loading={loading} />\n" ], "file_path": "lib/ui/src/components/sidebar/Sidebar.js", "type": "replace", "edit_start_line_idx": 42 }
import '@storybook/addon-storysource/register'; import '@storybook/addon-actions/register'; import '@storybook/addon-links/register'; import '@storybook/addon-notes/register'; import '@storybook/addon-knobs/register'; import '@storybook/addon-viewport/register'; import '@storybook/addon-options/register'; import '@storybook/addon-backgrounds/register';
examples/mithril-kitchen-sink/.storybook/addons.js
0
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.00017447161371819675, 0.00017447161371819675, 0.00017447161371819675, 0.00017447161371819675, 0 ]
{ "id": 3, "code_window": [ " <Container className=\"container\">\n", " <Heading menuHighlighted={menuHighlighted} menu={menu} />\n", " <SidebarStories stories={stories} storyId={storyId} />\n", "\n", " <Foot>\n", " <NotificationListSpacer notifications={notifications} />\n", " </Foot>\n" ], "labels": [ "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " <Stories stories={stories} storyId={storyId} loading={loading} />\n" ], "file_path": "lib/ui/src/components/sidebar/Sidebar.js", "type": "replace", "edit_start_line_idx": 42 }
import React from 'react'; import { storiesOf } from '@storybook/react'; import centered from '@storybook/addon-centered/react'; import BaseButton from '../components/BaseButton'; storiesOf('Addons|Centered', module) .addDecorator(centered) .add('story 1', () => <BaseButton label="This story should be centered" />);
examples/official-storybook/stories/addon-centered.stories.js
0
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.00017064351413864642, 0.00017064351413864642, 0.00017064351413864642, 0.00017064351413864642, 0 ]
{ "id": 4, "code_window": [ " stories: PropTypes.shape({}).isRequired,\n", " storyId: PropTypes.string,\n", " notifications: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n", " menu: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n", " menuHighlighted: PropTypes.bool,\n", "};\n", "Sidebar.defaultProps = {\n", " storyId: undefined,\n" ], "labels": [ "keep", "keep", "keep", "keep", "add", "keep", "keep", "keep" ], "after_edit": [ " loading: PropTypes.bool,\n" ], "file_path": "lib/ui/src/components/sidebar/Sidebar.js", "type": "add", "edit_start_line_idx": 60 }
import React from 'react'; import PropTypes from 'prop-types'; import { styled } from '@storybook/theming'; import NotificationList, { NotificationListSpacer } from './NotificationList'; import SidebarHeading from './SidebarHeading'; import SidebarStories from './SidebarStories'; const Heading = styled(SidebarHeading)({ padding: '20px 20px 10px', }); const Container = styled.nav({ position: 'absolute', zIndex: 1, left: 0, top: 0, bottom: 0, right: 0, width: '100%', height: '100%', overflowY: 'auto', overflowX: 'hidden', }); const Foot = styled.div({}); export const Notifications = styled.div({ position: 'fixed', display: 'block', bottom: 0, margin: 0, padding: 0, width: '20%', minWidth: 200, maxWidth: 280, zIndex: 2, }); const Sidebar = ({ storyId, notifications = [], stories, menu, menuHighlighted }) => ( <Container className="container"> <Heading menuHighlighted={menuHighlighted} menu={menu} /> <SidebarStories stories={stories} storyId={storyId} /> <Foot> <NotificationListSpacer notifications={notifications} /> </Foot> <Notifications> <NotificationList notifications={notifications} /> </Notifications> </Container> ); Sidebar.propTypes = { stories: PropTypes.shape({}).isRequired, storyId: PropTypes.string, notifications: PropTypes.arrayOf(PropTypes.shape({})).isRequired, menu: PropTypes.arrayOf(PropTypes.shape({})).isRequired, menuHighlighted: PropTypes.bool, }; Sidebar.defaultProps = { storyId: undefined, menuHighlighted: false, }; Sidebar.displayName = 'Sidebar'; export default Sidebar;
lib/ui/src/components/sidebar/Sidebar.js
1
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.9925547242164612, 0.14439566433429718, 0.00016848767700139433, 0.0027235900051891804, 0.34627264738082886 ]
{ "id": 4, "code_window": [ " stories: PropTypes.shape({}).isRequired,\n", " storyId: PropTypes.string,\n", " notifications: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n", " menu: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n", " menuHighlighted: PropTypes.bool,\n", "};\n", "Sidebar.defaultProps = {\n", " storyId: undefined,\n" ], "labels": [ "keep", "keep", "keep", "keep", "add", "keep", "keep", "keep" ], "after_edit": [ " loading: PropTypes.bool,\n" ], "file_path": "lib/ui/src/components/sidebar/Sidebar.js", "type": "add", "edit_start_line_idx": 60 }
/* You can add global styles to this file, and also import other style files */ .css-rules-warning { display: none; }
examples/angular-cli/src/styles.css
0
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.00017627138004172593, 0.00017627138004172593, 0.00017627138004172593, 0.00017627138004172593, 0 ]
{ "id": 4, "code_window": [ " stories: PropTypes.shape({}).isRequired,\n", " storyId: PropTypes.string,\n", " notifications: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n", " menu: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n", " menuHighlighted: PropTypes.bool,\n", "};\n", "Sidebar.defaultProps = {\n", " storyId: undefined,\n" ], "labels": [ "keep", "keep", "keep", "keep", "add", "keep", "keep", "keep" ], "after_edit": [ " loading: PropTypes.bool,\n" ], "file_path": "lib/ui/src/components/sidebar/Sidebar.js", "type": "add", "edit_start_line_idx": 60 }
import m from 'mithril'; const BaseButton = { view: ({ attrs }) => m( 'button', { disabled: attrs.disabled, onclick: attrs.onclick, style: attrs.style }, attrs.label ), }; export default BaseButton;
examples/mithril-kitchen-sink/src/BaseButton.js
0
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.00017447561549488455, 0.0001735508267302066, 0.00017262603796552867, 0.0001735508267302066, 9.247887646779418e-7 ]
{ "id": 4, "code_window": [ " stories: PropTypes.shape({}).isRequired,\n", " storyId: PropTypes.string,\n", " notifications: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n", " menu: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n", " menuHighlighted: PropTypes.bool,\n", "};\n", "Sidebar.defaultProps = {\n", " storyId: undefined,\n" ], "labels": [ "keep", "keep", "keep", "keep", "add", "keep", "keep", "keep" ], "after_edit": [ " loading: PropTypes.bool,\n" ], "file_path": "lib/ui/src/components/sidebar/Sidebar.js", "type": "add", "edit_start_line_idx": 60 }
import { styled } from '@storybook/theming'; const Svg = styled.svg(({ inline }) => inline ? { display: 'inline-block', } : { display: 'block', } ); Svg.displayName = 'Svg'; export { Svg as default };
lib/components/src/icon/svg.js
0
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.00017815610044635832, 0.00017769895202945918, 0.00017724180361256003, 0.00017769895202945918, 4.5714841689914465e-7 ]
{ "id": 5, "code_window": [ "Sidebar.defaultProps = {\n", " storyId: undefined,\n", " menuHighlighted: false,\n", "};\n", "Sidebar.displayName = 'Sidebar';\n", "\n" ], "labels": [ "keep", "keep", "add", "keep", "keep", "keep" ], "after_edit": [ " loading: false,\n" ], "file_path": "lib/ui/src/components/sidebar/Sidebar.js", "type": "add", "edit_start_line_idx": 64 }
import React from 'react'; import PropTypes from 'prop-types'; import { styled } from '@storybook/theming'; import NotificationList, { NotificationListSpacer } from './NotificationList'; import SidebarHeading from './SidebarHeading'; import SidebarStories from './SidebarStories'; const Heading = styled(SidebarHeading)({ padding: '20px 20px 10px', }); const Container = styled.nav({ position: 'absolute', zIndex: 1, left: 0, top: 0, bottom: 0, right: 0, width: '100%', height: '100%', overflowY: 'auto', overflowX: 'hidden', }); const Foot = styled.div({}); export const Notifications = styled.div({ position: 'fixed', display: 'block', bottom: 0, margin: 0, padding: 0, width: '20%', minWidth: 200, maxWidth: 280, zIndex: 2, }); const Sidebar = ({ storyId, notifications = [], stories, menu, menuHighlighted }) => ( <Container className="container"> <Heading menuHighlighted={menuHighlighted} menu={menu} /> <SidebarStories stories={stories} storyId={storyId} /> <Foot> <NotificationListSpacer notifications={notifications} /> </Foot> <Notifications> <NotificationList notifications={notifications} /> </Notifications> </Container> ); Sidebar.propTypes = { stories: PropTypes.shape({}).isRequired, storyId: PropTypes.string, notifications: PropTypes.arrayOf(PropTypes.shape({})).isRequired, menu: PropTypes.arrayOf(PropTypes.shape({})).isRequired, menuHighlighted: PropTypes.bool, }; Sidebar.defaultProps = { storyId: undefined, menuHighlighted: false, }; Sidebar.displayName = 'Sidebar'; export default Sidebar;
lib/ui/src/components/sidebar/Sidebar.js
1
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.9958678483963013, 0.14410506188869476, 0.000175107445102185, 0.0007449413533322513, 0.3477403223514557 ]
{ "id": 5, "code_window": [ "Sidebar.defaultProps = {\n", " storyId: undefined,\n", " menuHighlighted: false,\n", "};\n", "Sidebar.displayName = 'Sidebar';\n", "\n" ], "labels": [ "keep", "keep", "add", "keep", "keep", "keep" ], "after_edit": [ " loading: false,\n" ], "file_path": "lib/ui/src/components/sidebar/Sidebar.js", "type": "add", "edit_start_line_idx": 64 }
SKIP_PREFLIGHT_CHECK=true NODE_PATH=src
examples/cra-kitchen-sink/.env
0
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.00017655512783676386, 0.00017655512783676386, 0.00017655512783676386, 0.00017655512783676386, 0 ]
{ "id": 5, "code_window": [ "Sidebar.defaultProps = {\n", " storyId: undefined,\n", " menuHighlighted: false,\n", "};\n", "Sidebar.displayName = 'Sidebar';\n", "\n" ], "labels": [ "keep", "keep", "add", "keep", "keep", "keep" ], "after_edit": [ " loading: false,\n" ], "file_path": "lib/ui/src/components/sidebar/Sidebar.js", "type": "add", "edit_start_line_idx": 64 }
{ "name": "react-project-fixture", "version": "1.0.0", "license": "MIT", "main": "index.js", "scripts": { "build": "babel index.js -d dist" }, "devDependencies": { "@babel/cli": "7.1.0", "@babel/preset-env": "7.1.0", "@babel/preset-react": "7.0.0", "react": "^15.6.1", "react-dom": "^15.6.1" }, "peerDependencies": { "react": "*", "react-dom": "*" } }
lib/cli/test/fixtures/react_project/package.json
0
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.00018234364688396454, 0.00017747498350217938, 0.0001745047338772565, 0.0001755765697453171, 0.0000034703621167864185 ]
{ "id": 5, "code_window": [ "Sidebar.defaultProps = {\n", " storyId: undefined,\n", " menuHighlighted: false,\n", "};\n", "Sidebar.displayName = 'Sidebar';\n", "\n" ], "labels": [ "keep", "keep", "add", "keep", "keep", "keep" ], "after_edit": [ " loading: false,\n" ], "file_path": "lib/ui/src/components/sidebar/Sidebar.js", "type": "add", "edit_start_line_idx": 64 }
export function webpack(config) { return { ...config, module: { ...config.module, rules: [ ...config.module.rules, { test: /\.tag$/, use: [ { loader: require.resolve('riot-tag-loader'), }, ], }, ], }, resolve: { ...config.resolve, alias: { ...config.resolve.alias, 'riot-compiler': 'riot-compiler/dist/es6.compiler', }, }, }; }
app/riot/src/server/framework-preset-riot.js
0
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.00017398617637809366, 0.00017162652511615306, 0.0001693154772510752, 0.00017157792171929032, 0.0000019071145516136312 ]
{ "id": 6, "code_window": [ " <Sidebar menu={menu} notifications={notifications} stories={stories} storyId={storyId} />\n", ");\n", "simple.storyData = { menu, notifications, stories, storyId };\n", "\n", "export const loading = () => <Sidebar menu={menu} notifications={notifications} stories={{}} />;\n", "loading.storyData = { menu, notifications, stories: {} };" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep" ], "after_edit": [ "export const loading = () => (\n", " <Sidebar menu={menu} notifications={notifications} stories={{}} loading />\n", ");\n" ], "file_path": "lib/ui/src/components/sidebar/Sidebar.stories.js", "type": "replace", "edit_start_line_idx": 21 }
import React from 'react'; import PropTypes from 'prop-types'; import { styled } from '@storybook/theming'; import NotificationList, { NotificationListSpacer } from './NotificationList'; import SidebarHeading from './SidebarHeading'; import SidebarStories from './SidebarStories'; const Heading = styled(SidebarHeading)({ padding: '20px 20px 10px', }); const Container = styled.nav({ position: 'absolute', zIndex: 1, left: 0, top: 0, bottom: 0, right: 0, width: '100%', height: '100%', overflowY: 'auto', overflowX: 'hidden', }); const Foot = styled.div({}); export const Notifications = styled.div({ position: 'fixed', display: 'block', bottom: 0, margin: 0, padding: 0, width: '20%', minWidth: 200, maxWidth: 280, zIndex: 2, }); const Sidebar = ({ storyId, notifications = [], stories, menu, menuHighlighted }) => ( <Container className="container"> <Heading menuHighlighted={menuHighlighted} menu={menu} /> <SidebarStories stories={stories} storyId={storyId} /> <Foot> <NotificationListSpacer notifications={notifications} /> </Foot> <Notifications> <NotificationList notifications={notifications} /> </Notifications> </Container> ); Sidebar.propTypes = { stories: PropTypes.shape({}).isRequired, storyId: PropTypes.string, notifications: PropTypes.arrayOf(PropTypes.shape({})).isRequired, menu: PropTypes.arrayOf(PropTypes.shape({})).isRequired, menuHighlighted: PropTypes.bool, }; Sidebar.defaultProps = { storyId: undefined, menuHighlighted: false, }; Sidebar.displayName = 'Sidebar'; export default Sidebar;
lib/ui/src/components/sidebar/Sidebar.js
1
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.0046539041213691235, 0.0013894160510972142, 0.00017235810810234398, 0.0009081534226424992, 0.001444317284040153 ]
{ "id": 6, "code_window": [ " <Sidebar menu={menu} notifications={notifications} stories={stories} storyId={storyId} />\n", ");\n", "simple.storyData = { menu, notifications, stories, storyId };\n", "\n", "export const loading = () => <Sidebar menu={menu} notifications={notifications} stories={{}} />;\n", "loading.storyData = { menu, notifications, stories: {} };" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep" ], "after_edit": [ "export const loading = () => (\n", " <Sidebar menu={menu} notifications={notifications} stories={{}} loading />\n", ");\n" ], "file_path": "lib/ui/src/components/sidebar/Sidebar.stories.js", "type": "replace", "edit_start_line_idx": 21 }
import React from 'react'; import { shallow } from 'enzyme'; import { render } from 'react-testing-library'; import { ThemeProvider, themes } from '@storybook/theming'; import ShortcutsScreen from './shortcuts'; // A limited set of keys we use in this test file const shortcutKeys = { fullScreen: ['F'], togglePanel: ['S'], toggleNav: ['A'], toolbar: ['T'], search: ['/'], focusNav: ['1'], focusIframe: ['2'], }; const makeActions = () => ({ setShortcut: jest.fn(), restoreDefaultShortcut: jest.fn().mockImplementation(action => shortcutKeys[action]), restoreAllDefaultShortcuts: jest.fn().mockReturnValue(shortcutKeys), onClose: jest.fn(), }); describe('ShortcutsScreen', () => { it('renders correctly', () => { const comp = shallow( <ThemeProvider theme={themes.light}> <ShortcutsScreen shortcutKeys={shortcutKeys} {...makeActions()} /> </ThemeProvider> ); expect(comp).toExist(); }); it('handles a full mount', () => { const comp = render( <ThemeProvider theme={themes.light}> <ShortcutsScreen shortcutKeys={shortcutKeys} {...makeActions()} /> </ThemeProvider> ); expect(comp).toBeDefined(); comp.unmount(); }); describe('onFocus', () => { it('calls setstate and clears the input on focus', () => { const comp = shallow(<ShortcutsScreen shortcutKeys={shortcutKeys} {...makeActions()} />); const instance = comp.instance(); instance.onFocus('toolbar')(); expect(comp.state('shortcutKeys').toolbar.shortcut).toBeNull(); expect(comp.state('activeFeature')).toBe('toolbar'); }); }); describe('onKeyDown', () => { it('does nothing if a modifier key is pressed', () => { const actions = makeActions(); const comp = shallow(<ShortcutsScreen shortcutKeys={shortcutKeys} {...actions} />); const instance = comp.instance(); instance.onFocus('focusIframe')(); instance.onKeyDown({ isShift: true, key: 'Shift' }); expect(actions.setShortcut).not.toHaveBeenCalled(); expect(comp.state('shortcutKeys').focusIframe.shortcut).toBeNull(); }); it('changes the shortcut in state if a key is pressed', () => { const actions = makeActions(); const comp = shallow(<ShortcutsScreen shortcutKeys={shortcutKeys} {...actions} />); const instance = comp.instance(); instance.onFocus('focusIframe')(); instance.onKeyDown({ key: 'P' }); expect(actions.setShortcut).not.toHaveBeenCalled(); expect(comp.state('shortcutKeys').focusIframe.shortcut).toEqual(['P']); expect(comp.state('shortcutKeys').focusIframe.error).toBe(false); }); it('sets an error and the shortcut in state if a duplicate key is pressed', () => { const actions = makeActions(); const comp = shallow(<ShortcutsScreen shortcutKeys={shortcutKeys} {...actions} />); const instance = comp.instance(); instance.onFocus('focusIframe')(); instance.onKeyDown({ key: 'F' }); expect(actions.setShortcut).not.toHaveBeenCalled(); expect(comp.state('shortcutKeys').focusIframe.shortcut).toEqual(['F']); expect(comp.state('shortcutKeys').focusIframe.error).toBe(true); }); }); describe('onBlur', () => { it('if the input is empty, restores the respective default', async () => { const actions = makeActions(); const comp = shallow(<ShortcutsScreen shortcutKeys={shortcutKeys} {...actions} />); const instance = comp.instance(); instance.onFocus('focusIframe')(); await instance.onBlur(); expect(actions.setShortcut).not.toHaveBeenCalled(); expect(actions.restoreDefaultShortcut).toHaveBeenCalledWith('focusIframe'); expect(comp.state('shortcutKeys').focusIframe.shortcut).toEqual(['2']); expect(comp.state('shortcutKeys').focusIframe.error).toBe(false); }); it('if the shortcut is errored, restores the respective default', async () => { const actions = makeActions(); const comp = shallow(<ShortcutsScreen shortcutKeys={shortcutKeys} {...actions} />); const instance = comp.instance(); instance.onFocus('focusIframe')(); instance.onKeyDown({ key: 'F' }); await instance.onBlur(); expect(actions.setShortcut).not.toHaveBeenCalled(); expect(actions.restoreDefaultShortcut).toHaveBeenCalledWith('focusIframe'); expect(comp.state('shortcutKeys').focusIframe.shortcut).toEqual(['2']); expect(comp.state('shortcutKeys').focusIframe.error).toBe(false); }); it('it saves the shortcut if it is valid', () => { const actions = makeActions(); const comp = shallow(<ShortcutsScreen shortcutKeys={shortcutKeys} {...actions} />); const instance = comp.instance(); instance.onFocus('focusIframe')(); instance.onKeyDown({ key: 'P' }); instance.onBlur(); expect(actions.setShortcut).toHaveBeenCalledWith('focusIframe', ['P']); expect(comp.state('shortcutKeys').focusIframe.shortcut).toEqual(['P']); expect(comp.state('shortcutKeys').focusIframe.error).toBe(false); }); }); describe('restoreDefaults', () => { it('if the input is empty, restores the respective default', async () => { const actions = makeActions(); const comp = shallow(<ShortcutsScreen shortcutKeys={shortcutKeys} {...actions} />); const instance = comp.instance(); instance.onFocus('focusIframe')(); instance.onKeyDown({ key: 'P' }); await comp.find('#restoreDefaultsHotkeys').simulate('click'); expect(comp.state('shortcutKeys').focusIframe.shortcut).toEqual(['2']); }); }); });
lib/ui/src/settings/shortcuts.test.js
0
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.00017848935385700315, 0.00017375579045619816, 0.00016765402688179165, 0.0001748423237586394, 0.00000349159563484136 ]
{ "id": 6, "code_window": [ " <Sidebar menu={menu} notifications={notifications} stories={stories} storyId={storyId} />\n", ");\n", "simple.storyData = { menu, notifications, stories, storyId };\n", "\n", "export const loading = () => <Sidebar menu={menu} notifications={notifications} stories={{}} />;\n", "loading.storyData = { menu, notifications, stories: {} };" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep" ], "after_edit": [ "export const loading = () => (\n", " <Sidebar menu={menu} notifications={notifications} stories={{}} loading />\n", ");\n" ], "file_path": "lib/ui/src/components/sidebar/Sidebar.stories.js", "type": "replace", "edit_start_line_idx": 21 }
# Number of days of inactivity before an issue becomes stale daysUntilStale: 21 # Number of days of inactivity before a stale issue is closed daysUntilClose: 30 # Issues with these labels will never be considered stale exemptLabels: - todo - ready - 'in progress' - 'do not merge' - 'needs review' - 'high priority' - 'good first issue' - dependencies:update # Label to use when marking an issue as stale staleLabel: inactive # Comment to post when marking an issue as stale. Set to `false` to disable markComment: > Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! # Comment to post when closing a stale issue. Set to `false` to disable closeComment: > Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!
.github/stale.yml
0
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.00017489051970187575, 0.0001715077378321439, 0.0001689803320914507, 0.0001710800570435822, 0.000002161370048270328 ]
{ "id": 6, "code_window": [ " <Sidebar menu={menu} notifications={notifications} stories={stories} storyId={storyId} />\n", ");\n", "simple.storyData = { menu, notifications, stories, storyId };\n", "\n", "export const loading = () => <Sidebar menu={menu} notifications={notifications} stories={{}} />;\n", "loading.storyData = { menu, notifications, stories: {} };" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep" ], "after_edit": [ "export const loading = () => (\n", " <Sidebar menu={menu} notifications={notifications} stories={{}} loading />\n", ");\n" ], "file_path": "lib/ui/src/components/sidebar/Sidebar.stories.js", "type": "replace", "edit_start_line_idx": 21 }
import mergeWith from 'lodash.mergewith'; import isEqual from 'lodash.isequal'; import toId, { sanitize } from '../libs/id'; const merge = (a, b) => mergeWith({}, a, b, (objValue, srcValue) => { if (Array.isArray(srcValue) && Array.isArray(objValue)) { srcValue.forEach(s => { const existing = objValue.find(o => o === s || isEqual(o, s)); if (!existing) { objValue.push(s); } }); return objValue; } if (Array.isArray(objValue)) { // eslint-disable-next-line no-console console.log('the types mismatch, picking', objValue); return objValue; } return undefined; }); const initStoriesApi = ({ store, navigate, storyId: initialStoryId, viewMode: initialViewMode, }) => { const getData = storyId => { const { storiesHash } = store.getState(); return storiesHash[storyId]; }; const getCurrentStoryData = () => { const { storyId } = store.getState(); return getData(storyId); }; const getParameters = (storyId, addon) => { const data = getData(storyId); if (!data) { return null; } const { parameters } = data; return addon ? parameters[addon] : parameters; }; const jumpToStory = direction => { const { storiesHash, viewMode, storyId } = store.getState(); // cannot navigate when there's no current selection if (!storyId || !storiesHash[storyId]) { return; } const lookupList = Object.keys(storiesHash).filter( k => !(storiesHash[k].children || Array.isArray(storiesHash[k])) ); const index = lookupList.indexOf(storyId); // cannot navigate beyond fist or last if (index === lookupList.length - 1 && direction > 0) { return; } if (index === 0 && direction < 0) { return; } if (direction === 0) { return; } const result = lookupList[index + direction]; if (viewMode && result) { navigate(`/${viewMode}/${result}`); } }; const jumpToComponent = direction => { const state = store.getState(); const { storiesHash, viewMode, storyId } = state; // cannot navigate when there's no current selection if (!storyId || !storiesHash[storyId]) { return; } const lookupList = Object.entries(storiesHash).reduce((acc, i) => { const value = i[1]; if (value.isComponent) { acc.push([...i[1].children]); } return acc; }, []); const index = lookupList.findIndex(i => i.includes(storyId)); // cannot navigate beyond fist or last if (index === lookupList.length - 1 && direction > 0) { return; } if (index === 0 && direction < 0) { return; } if (direction === 0) { return; } const result = lookupList[index + direction][0]; navigate(`/${viewMode || 'story'}/${result}`); }; const splitPath = (kind, { rootSeparator, groupSeparator }) => { const [root, remainder] = kind.split(rootSeparator, 2); const groups = (remainder || kind).split(groupSeparator).filter(i => !!i); // when there's no remainder, it means the root wasn't found/split return { root: remainder ? root : null, groups, }; }; const toKey = input => input.replace(/[^a-z0-9]+([a-z0-9])/gi, (...params) => params[1].toUpperCase()); const toGroup = name => ({ name, children: [], id: toKey(name), }); const setStories = input => { const storiesHash = Object.values(input).reduce((acc, item) => { const { kind, parameters } = item; const { hierarchyRootSeparator: rootSeparator, hierarchySeparator: groupSeparator, } = parameters.options; const { root, groups } = splitPath(kind, { rootSeparator, groupSeparator }); const rootAndGroups = [] .concat(root || []) .concat(groups) .map(toGroup) // Map a bunch of extra fields onto the groups, collecting the path as we go (thus the reduce) .reduce((soFar, group, index, original) => { const { name } = group; const parent = index > 0 && soFar[index - 1].id; const id = sanitize(parent ? `${parent}-${name}` : name); return soFar.concat([ { ...group, id, parent, depth: index, isComponent: index === original.length - 1, isRoot: !!root && index === 0, }, ]); }, []); const paths = [...rootAndGroups.map(g => g.id), item.id]; // Ok, now let's add everything to the store rootAndGroups.forEach((group, index) => { const child = paths[index + 1]; const { id } = group; acc[id] = merge(acc[id] || {}, { ...group, ...(child && { children: [child] }), }); }); acc[item.id] = { ...item, parent: rootAndGroups[rootAndGroups.length - 1].id }; return acc; }, {}); const { storyId, viewMode } = store.getState(); if (!storyId || !storiesHash[storyId]) { // when there's no storyId or the storyId item doesn't exist // we pick the first leaf and navigate const firstLeaf = Object.values(storiesHash).find(s => !s.children); if (viewMode && firstLeaf) { navigate(`/${viewMode}/${firstLeaf.id}`); } } store.setState({ storiesHash }); }; const selectStory = (kindOrId, story) => { const { viewMode = 'story', storyId } = store.getState(); if (!story) { navigate(`/${viewMode}/${kindOrId}`); } else if (!kindOrId) { // This is a slugified version of the kind, but that's OK, our toId function is idempotent const kind = storyId.split('--', 2)[0]; selectStory(toId(kind, story)); } else { selectStory(toId(kindOrId, story)); } }; return { api: { storyId: toId, selectStory, getCurrentStoryData, setStories, jumpToComponent, jumpToStory, getData, getParameters, }, state: { storiesHash: {}, storyId: initialStoryId, viewMode: initialViewMode, }, }; }; export default initStoriesApi;
lib/ui/src/core/stories.js
0
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.0032470172736793756, 0.000586734851822257, 0.00016593796317465603, 0.00017667250358499587, 0.0008907504379749298 ]
{ "id": 7, "code_window": [ "\n", "const Logo = styled(StorybookLogo)({\n", " width: 'auto',\n", " height: 24,\n", " display: 'block',\n", "});\n", "\n", "const LogoLink = styled.a({\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " height: 22,\n" ], "file_path": "lib/ui/src/components/sidebar/SidebarHeading.js", "type": "replace", "edit_start_line_idx": 14 }
import React from 'react'; import PropTypes from 'prop-types'; import { styled } from '@storybook/theming'; import NotificationList, { NotificationListSpacer } from './NotificationList'; import SidebarHeading from './SidebarHeading'; import SidebarStories from './SidebarStories'; const Heading = styled(SidebarHeading)({ padding: '20px 20px 10px', }); const Container = styled.nav({ position: 'absolute', zIndex: 1, left: 0, top: 0, bottom: 0, right: 0, width: '100%', height: '100%', overflowY: 'auto', overflowX: 'hidden', }); const Foot = styled.div({}); export const Notifications = styled.div({ position: 'fixed', display: 'block', bottom: 0, margin: 0, padding: 0, width: '20%', minWidth: 200, maxWidth: 280, zIndex: 2, }); const Sidebar = ({ storyId, notifications = [], stories, menu, menuHighlighted }) => ( <Container className="container"> <Heading menuHighlighted={menuHighlighted} menu={menu} /> <SidebarStories stories={stories} storyId={storyId} /> <Foot> <NotificationListSpacer notifications={notifications} /> </Foot> <Notifications> <NotificationList notifications={notifications} /> </Notifications> </Container> ); Sidebar.propTypes = { stories: PropTypes.shape({}).isRequired, storyId: PropTypes.string, notifications: PropTypes.arrayOf(PropTypes.shape({})).isRequired, menu: PropTypes.arrayOf(PropTypes.shape({})).isRequired, menuHighlighted: PropTypes.bool, }; Sidebar.defaultProps = { storyId: undefined, menuHighlighted: false, }; Sidebar.displayName = 'Sidebar'; export default Sidebar;
lib/ui/src/components/sidebar/Sidebar.js
1
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.0013263802975416183, 0.0003830734931398183, 0.00016743179003242403, 0.00017348109395243227, 0.0003964513016398996 ]
{ "id": 7, "code_window": [ "\n", "const Logo = styled(StorybookLogo)({\n", " width: 'auto',\n", " height: 24,\n", " display: 'block',\n", "});\n", "\n", "const LogoLink = styled.a({\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " height: 22,\n" ], "file_path": "lib/ui/src/components/sidebar/SidebarHeading.js", "type": "replace", "edit_start_line_idx": 14 }
class { onCreate() {} } style { #app { font-family: 'Avenir', Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-align: center; color: #2c3e50; margin-top: 60px; } .logo { background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAW0AAADICAYAAAAjp7DLAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGl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Tj4qf9KXd91S7iunlj/X701k4AEufFzCWFIzjCtNlZRHAJdSCBM8eFtBcHkpM8bconvbzis+WhxmbzSbGLbP3dr8kTa6bJW7/e6bn8xjucxqGGPSQF2AvlB4hHfmDSldi0j3K+/1/i3uifxqz4l7Iq1WJkieJMuah+/8prFjv77P5c+eTV2LDEqVB7iclKlQP7NQ+UdwOs908iTAYCpYIxj0cEW0G6exmeraJsQw2lXS6Sxfs/ARn2YEiMRuu5zfmEgcAG800PmTgLox/UMW0VwpoSpqZyb9Ri6d5QahwuyNhsZloIEP4kALh7oc2aUGO2HqRc+cUXC8H0G3yca4E287dDBAg+kEhOm7bPnfM84x7KfHruL9IHHlFzwAYdOw+j2/Z1sZpvJ7TXW/AiqbVEZCyQJAuz1NlzTbS/xIn5E+V/Qv6DATlU2zfQVje8uTJv6Gado2qIPgMuD5L+oY6LtFeUorn6F2iHuV+eK68l7vayrDn8e6lQ3Dc3o6/23n1esf4+wwa/OxLyJgUS39DDCrFdiM8qivmAN3a6x56wOA9uD+VIZSNvxyhDFA61yJaaZr6IvZ/Ud/iK6hHxHSFkjNf5VNcLPsYIy4jaUczjGumJcZmy1qPIa1i/5V3BrQpUB+yxibrCpsF9dlxOQPLVzw7URcgp7JjL2KTgTWoBkQ0Oq00P8HD2rZq0DBdtAAAAAASUVORK5CYII='); background-repeat:no-repeat; display:inline-block; width: 365px; height: 200px; } h1, h2 { font-weight: normal; } ul { list-style-type: none; padding: 0; } li { display: inline-block; margin: 0 10px; } a { color: #42b983; } } <div#app> <h1>Welcome to Storybook for Marko</h1> <div.logo></div> </div>
lib/cli/generators/MARKO/template/stories/components/welcome/index.marko
0
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.0077803367748856544, 0.0017639223951846361, 0.00016621682152617723, 0.00017478982044849545, 0.0030114175751805305 ]
{ "id": 7, "code_window": [ "\n", "const Logo = styled(StorybookLogo)({\n", " width: 'auto',\n", " height: 24,\n", " display: 'block',\n", "});\n", "\n", "const LogoLink = styled.a({\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " height: 22,\n" ], "file_path": "lib/ui/src/components/sidebar/SidebarHeading.js", "type": "replace", "edit_start_line_idx": 14 }
import { buildDev } from '@storybook/core/server'; import options from './options'; buildDev(options);
app/vue/src/server/index.js
0
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.00016886740922927856, 0.00016886740922927856, 0.00016886740922927856, 0.00016886740922927856, 0 ]
{ "id": 7, "code_window": [ "\n", "const Logo = styled(StorybookLogo)({\n", " width: 'auto',\n", " height: 24,\n", " display: 'block',\n", "});\n", "\n", "const LogoLink = styled.a({\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " height: 22,\n" ], "file_path": "lib/ui/src/components/sidebar/SidebarHeading.js", "type": "replace", "edit_start_line_idx": 14 }
import puppeteer from 'puppeteer'; import { toMatchImageSnapshot } from 'jest-image-snapshot'; import { logger } from '@storybook/node-logger'; import { constructUrl } from './url'; expect.extend({ toMatchImageSnapshot }); // We consider taking the full page is a reasonnable default. const defaultScreenshotOptions = () => ({ fullPage: true }); const noop = () => {}; const asyncNoop = async () => {}; const defaultConfig = { storybookUrl: 'http://localhost:6006', chromeExecutablePath: undefined, getMatchOptions: noop, getScreenshotOptions: defaultScreenshotOptions, beforeScreenshot: noop, getGotoOptions: noop, customizePage: asyncNoop, getCustomBrowser: undefined, }; export const imageSnapshot = (customConfig = {}) => { const { storybookUrl, chromeExecutablePath, getMatchOptions, getScreenshotOptions, beforeScreenshot, getGotoOptions, customizePage, getCustomBrowser, } = { ...defaultConfig, ...customConfig }; let browser; // holds ref to browser. (ie. Chrome) let page; // Hold ref to the page to screenshot. const testFn = async ({ context }) => { const { kind, framework, name } = context; if (framework === 'rn') { // Skip tests since we de not support RN image snapshots. logger.error( "It seems you are running imageSnapshot on RN app and it's not supported. Skipping test." ); return; } const url = constructUrl(storybookUrl, kind, name); if (!browser || !page) { logger.error( `Error when generating image snapshot for test ${kind} - ${name} : It seems the headless browser is not running.` ); throw new Error('no-headless-browser-running'); } expect.assertions(1); let image; try { await customizePage(page); await page.goto(url, getGotoOptions({ context, url })); await beforeScreenshot(page, { context, url }); image = await page.screenshot(getScreenshotOptions({ context, url })); } catch (e) { logger.error( `Error when connecting to ${url}, did you start or build the storybook first? A storybook instance should be running or a static version should be built when using image snapshot feature.`, e ); throw e; } expect(image).toMatchImageSnapshot(getMatchOptions({ context, url })); }; testFn.afterAll = () => { if (getCustomBrowser && page) { return page.close(); } return browser.close(); }; testFn.beforeAll = async () => { if (getCustomBrowser) { browser = await getCustomBrowser(); } else { // add some options "no-sandbox" to make it work properly on some Linux systems as proposed here: https://github.com/Googlechrome/puppeteer/issues/290#issuecomment-322851507 browser = await puppeteer.launch({ args: ['--no-sandbox ', '--disable-setuid-sandbox'], executablePath: chromeExecutablePath, }); } page = await browser.newPage(); }; return testFn; };
addons/storyshots/storyshots-puppeteer/src/index.js
0
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.0011817591730505228, 0.000302929402096197, 0.00017134967492893338, 0.0001766790810506791, 0.0002845540875568986 ]
{ "id": 8, "code_window": [ " display: 'block',\n", "});\n", "\n", "const LogoLink = styled.a({\n", " display: 'inline-block',\n", " color: 'inherit',\n", " textDecoration: 'none',\n", "});\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " display: 'block',\n" ], "file_path": "lib/ui/src/components/sidebar/SidebarHeading.js", "type": "replace", "edit_start_line_idx": 19 }
import React from 'react'; import PropTypes from 'prop-types'; import { styled, withTheme } from '@storybook/theming'; import { StorybookLogo } from '@storybook/components'; import Menu from '../menu/Menu'; const BrandArea = styled.div(({ theme }) => ({ fontSize: `${theme.typography.size.s2}px`, fontWeight: theme.typography.weight.bold, })); const Logo = styled(StorybookLogo)({ width: 'auto', height: 24, display: 'block', }); const LogoLink = styled.a({ display: 'inline-block', color: 'inherit', textDecoration: 'none', }); const Head = styled.div({ display: 'flex', alignItems: 'center', justifyContent: 'space-between', }); const Brand = withTheme(({ theme: { brand } }) => ( <BrandArea> {brand || ( <LogoLink href="./"> <Logo /> </LogoLink> )} </BrandArea> )); export default function SidebarHeading({ menuHighlighted, menu, ...props }) { return ( <Head {...props}> <Brand /> <Menu highlighted={menuHighlighted} menuItems={menu} /> </Head> ); } SidebarHeading.propTypes = { menuHighlighted: PropTypes.bool, menu: PropTypes.arrayOf(PropTypes.shape({})).isRequired, }; SidebarHeading.defaultProps = { menuHighlighted: false, };
lib/ui/src/components/sidebar/SidebarHeading.js
1
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.9976921081542969, 0.33212894201278687, 0.0001681403664406389, 0.002025080844759941, 0.4681536853313446 ]
{ "id": 8, "code_window": [ " display: 'block',\n", "});\n", "\n", "const LogoLink = styled.a({\n", " display: 'inline-block',\n", " color: 'inherit',\n", " textDecoration: 'none',\n", "});\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " display: 'block',\n" ], "file_path": "lib/ui/src/components/sidebar/SidebarHeading.js", "type": "replace", "edit_start_line_idx": 19 }
import React from 'react'; import addons, { makeDecorator } from '@storybook/addons'; import Events from './constants'; import Container from './container'; export const withBackgrounds = makeDecorator({ name: 'withBackgrounds', parameterName: 'backgrounds', skipIfNoParametersOrOptions: true, allowDeprecatedUsage: true, wrapper: (getStory, context, { options, parameters }) => { const data = parameters || options || []; const backgrounds = Array.isArray(data) ? data : Object.values(data); let background = 'transparent'; if (backgrounds.length !== 0) { addons.getChannel().emit(Events.SET, backgrounds); const defaultOrFirst = backgrounds.find(x => x.default) || backgrounds[0]; if (defaultOrFirst) { background = defaultOrFirst.value; } } return ( <Container initialBackground={background} channel={addons.getChannel()}> {getStory(context)} </Container> ); }, });
addons/ondevice-backgrounds/src/index.js
0
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.00017071497859433293, 0.0001687596522970125, 0.00016710914496798068, 0.00016860725008882582, 0.0000013856544001100701 ]
{ "id": 8, "code_window": [ " display: 'block',\n", "});\n", "\n", "const LogoLink = styled.a({\n", " display: 'inline-block',\n", " color: 'inherit',\n", " textDecoration: 'none',\n", "});\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " display: 'block',\n" ], "file_path": "lib/ui/src/components/sidebar/SidebarHeading.js", "type": "replace", "edit_start_line_idx": 19 }
import '@webcomponents/webcomponentsjs/webcomponents-lite'; import '@webcomponents/webcomponentsjs/custom-elements-es5-adapter'; import { window } from 'global'; window.STORYBOOK_ENV = 'polymer';
app/polymer/src/client/preview/globals.js
0
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.00017425217083655298, 0.00017425217083655298, 0.00017425217083655298, 0.00017425217083655298, 0 ]
{ "id": 8, "code_window": [ " display: 'block',\n", "});\n", "\n", "const LogoLink = styled.a({\n", " display: 'inline-block',\n", " color: 'inherit',\n", " textDecoration: 'none',\n", "});\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " display: 'block',\n" ], "file_path": "lib/ui/src/components/sidebar/SidebarHeading.js", "type": "replace", "edit_start_line_idx": 19 }
import packageJson from '../../package.json'; export default { packageJson, frameworkPresets: [require.resolve('./framework-preset-preact.js')], };
app/preact/src/server/options.js
0
https://github.com/storybookjs/storybook/commit/16159d41df2498ff192d89489e1b58e064ea5bcd
[ 0.0001758454745868221, 0.0001758454745868221, 0.0001758454745868221, 0.0001758454745868221, 0 ]
{ "id": 0, "code_window": [ "import { axiosInstance } from '../../../../../../../core/utils';\n", "\n", "const ButtonWithRightMargin = styled(Button)`\n", " margin-right: ${({ theme }) => theme.spaces[2]}; ;\n", "`;\n", "\n", "export const Regenerate = ({ onRegenerate, idToRegenerate }) => {\n", " let isLoadingConfirmation = false;\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " margin-right: ${({ theme }) => theme.spaces[2]};\n" ], "file_path": "packages/core/admin/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/Regenerate/index.js", "type": "replace", "edit_start_line_idx": 10 }
import React, { useState } from 'react'; import styled from 'styled-components'; import PropTypes from 'prop-types'; import { useIntl } from 'react-intl'; import { Button } from '@strapi/design-system/Button'; import Refresh from '@strapi/icons/Refresh'; import { ConfirmDialog } from '@strapi/helper-plugin'; import { axiosInstance } from '../../../../../../../core/utils'; const ButtonWithRightMargin = styled(Button)` margin-right: ${({ theme }) => theme.spaces[2]}; ; `; export const Regenerate = ({ onRegenerate, idToRegenerate }) => { let isLoadingConfirmation = false; const { formatMessage } = useIntl(); const [showConfirmDialog, setShowConfirmDialog] = useState(false); const handleConfirmRegeneration = async () => { isLoadingConfirmation = true; try { const { data: { data: { accessKey }, }, } = await axiosInstance.post(`/admin/api-tokens/${idToRegenerate}/regenerate`); isLoadingConfirmation = false; onRegenerate(accessKey); setShowConfirmDialog(false); } catch (error) { isLoadingConfirmation = false; console.log('error', error); } }; return ( <> <ButtonWithRightMargin startIcon={<Refresh />} type="button" size="S" variant="tertiary" onClick={() => setShowConfirmDialog(true)} > {formatMessage({ id: 'Settings.apiTokens.regenerate', defaultMessage: 'Regenerate', })} </ButtonWithRightMargin> <ConfirmDialog bodyText={{ id: 'Settings.apiTokens.popUpWarning.message', defaultMessage: 'Are you sure you want to regenerate this token?', }} iconRightButton={<Refresh />} isConfirmButtonLoading={isLoadingConfirmation} isOpen={showConfirmDialog} onToggleDialog={() => setShowConfirmDialog(false)} onConfirm={handleConfirmRegeneration} leftButtonText={{ id: 'Settings.apiTokens.Button.cancel', defaultMessage: 'Cancel', }} rightButtonText={{ id: 'Settings.apiTokens.Button.regenerate', defaultMessage: 'Regenerate', }} title={{ id: 'Settings.apiTokens.RegenerateDialog.title', defaultMessage: 'Regenerate token', }} /> </> ); }; Regenerate.defaultProps = { onRegenerate() {}, }; Regenerate.propTypes = { onRegenerate: PropTypes.func, idToRegenerate: PropTypes.string.isRequired, }; export default Regenerate;
packages/core/admin/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/Regenerate/index.js
1
https://github.com/strapi/strapi/commit/531e9babf2069c78be5c0f98a1e1cbd666686b44
[ 0.998913049697876, 0.8875504732131958, 0.0022302777506411076, 0.9984582662582397, 0.3130086660385132 ]
{ "id": 0, "code_window": [ "import { axiosInstance } from '../../../../../../../core/utils';\n", "\n", "const ButtonWithRightMargin = styled(Button)`\n", " margin-right: ${({ theme }) => theme.spaces[2]}; ;\n", "`;\n", "\n", "export const Regenerate = ({ onRegenerate, idToRegenerate }) => {\n", " let isLoadingConfirmation = false;\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " margin-right: ${({ theme }) => theme.spaces[2]};\n" ], "file_path": "packages/core/admin/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/Regenerate/index.js", "type": "replace", "edit_start_line_idx": 10 }
docs/static/.nojekyll
0
https://github.com/strapi/strapi/commit/531e9babf2069c78be5c0f98a1e1cbd666686b44
[ 0.00017491252219770104, 0.00017491252219770104, 0.00017491252219770104, 0.00017491252219770104, 0 ]