Lines Matching full:args

46   navigate(state: StateDraft, args: {route: string}): void {
47 state.route = args.route;
50 openTraceFromFile(state: StateDraft, args: {file: File}): void {
56 source: args.file,
61 convertTraceToJson(_: StateDraft, args: {file: File}): void {
62 ConvertTrace(args.file);
65 openTraceFromUrl(state: StateDraft, args: {url: string}): void {
71 source: args.url,
76 addTrack(state: StateDraft, args: {
81 const id = args.id !== undefined ? args.id : `${state.nextId++}`;
84 engineId: args.engineId,
85 kind: args.kind,
86 name: args.name,
87 trackGroup: args.trackGroup,
88 config: args.config,
90 if (args.trackGroup === SCROLLING_TRACK_GROUP) {
92 } else if (args.trackGroup !== undefined) {
93 assertExists(state.trackGroups[args.trackGroup]).tracks.push(id);
101 args: {
105 state.trackGroups[args.id] = {
106 ...args,
111 reqTrackData(state: StateDraft, args: {
114 const id = args.trackId;
116 start: args.start,
117 end: args.end,
118 resolution: args.resolution
122 clearTrackDataReq(state: StateDraft, args: {trackId: string}): void {
123 const id = args.trackId;
129 args: {queryId: string; engineId: string; query: string}): void {
130 state.queries[args.queryId] = {
131 id: args.queryId,
132 engineId: args.engineId,
133 query: args.query,
137 deleteQuery(state: StateDraft, args: {queryId: string}): void {
138 delete state.queries[args.queryId];
143 args: {srcId: string; op: 'before' | 'after', dstId: string}): void {
148 if (curTrackId === args.dstId && args.op === 'before') {
149 newList.push(args.srcId);
151 if (curTrackId !== args.srcId) {
154 if (curTrackId === args.dstId && args.op === 'after') {
155 newList.push(args.srcId);
168 toggleTrackPinned(state: StateDraft, args: {trackId: string}): void {
169 const id = args.trackId;
186 toggleTrackGroupCollapsed(state: StateDraft, args: {trackGroupId: string}):
188 const id = args.trackGroupId;
193 setEngineReady(state: StateDraft, args: {engineId: string; ready: boolean}):
195 state.engines[args.engineId].ready = args.ready;
202 setPermalink(state: StateDraft, args: {requestId: string; hash: string}):
205 if (state.permalink.requestId !== args.requestId) return;
206 state.permalink = args;
209 loadPermalink(state: StateDraft, args: {hash: string}): void {
212 hash: args.hash,
220 setTraceTime(state: StateDraft, args: TraceTime): void {
221 state.traceTime = args;
225 state: StateDraft, args: {time: TraceTime; lastUpdate: number;}): void {
226 state.frontendLocalState.visibleTraceTime = args.time;
227 state.frontendLocalState.lastUpdate = args.lastUpdate;
230 updateStatus(state: StateDraft, args: Status): void {
231 state.status = args;
235 setState(state: StateDraft, args: {newState: State}): void {
240 for (const key of Object.keys(args.newState)) {
242 (state as any)[key] = (args.newState as any)[key];
246 setRecordConfig(state: StateDraft, args: {config: RecordConfig;}): void {
247 state.recordConfig = args.config;
250 selectNote(state: StateDraft, args: {id: string}): void {
251 if (args.id) {
254 id: args.id
259 addNote(state: StateDraft, args: {timestamp: number, color: string}): void {
263 timestamp: args.timestamp,
264 color: args.color,
270 changeNoteColor(state: StateDraft, args: {id: string, newColor: string}):
272 const note = state.notes[args.id]; constant
274 note.color = args.newColor;
277 changeNoteText(state: StateDraft, args: {id: string, newText: string}): void {
278 const note = state.notes[args.id]; constant
280 note.text = args.newText;
283 removeNote(state: StateDraft, args: {id: string}): void {
284 delete state.notes[args.id];
287 state.currentSelection.id === args.id) {
292 selectSlice(state: StateDraft, args: {utid: number, id: number}): void {
295 utid: args.utid,
296 id: args.id,
301 state: StateDraft, args: {startTs: number, endTs: number}): void {
304 startTs: args.startTs,
305 endTs: args.endTs,
311 args: {utid: number, ts: number, dur: number, state: string}): void {
314 utid: args.utid,
315 ts: args.ts,
316 dur: args.dur,
317 state: args.state
325 updateLogsPagination(state: StateDraft, args: LogsPagination): void {
326 state.logsPagination = args;
335 // function that returns the marshaled args.
337 // A DeferredAction is a bundle of Args and a method name. This is the marshaled
339 export interface DeferredAction<Args = {}> {
341 args: Args; property
346 // (state: StateDraft, args: Args) => void
348 // (args: Args) => DeferredAction<Args>
349 type ActionFunction<Args> = (state: StateDraft, args: Args) => void;
350 type DeferredActionFunc<T> = T extends ActionFunction<infer Args>?
351 (args: Args) => DeferredAction<Args>:
361 // (args) => {return {type: ATTRIBUTE_NAME, args};}
367 return (args: {}): DeferredAction<{}> => {
370 args,