type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
ArrowFunction |
error => {
this.scale.opened = false;
} | cclauss/KubeOperator | ui/src/app/overview/cluster-status/cluster-status.component.ts | TypeScript |
ArrowFunction |
res => {
this.clusterHealth = res;
} | cclauss/KubeOperator | ui/src/app/overview/cluster-status/cluster-status.component.ts | TypeScript |
ArrowFunction |
error1 => {
this.clusterHealth.data = [];
} | cclauss/KubeOperator | ui/src/app/overview/cluster-status/cluster-status.component.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-cluster-status',
templateUrl: './cluster-status.component.html',
styleUrls: ['./cluster-status.component.css']
})
export class ClusterStatusComponent implements OnInit {
@Input() currentCluster: Cluster;
workers: Node[] = [];
@ViewChild(ScaleComponent, {static: true}) scale: Sc... | cclauss/KubeOperator | ui/src/app/overview/cluster-status/cluster-status.component.ts | TypeScript |
MethodDeclaration |
ngOnInit() {
this.nodeService.listNodes(this.currentCluster.name).subscribe(data => {
this.workers = data.filter((node) => {
return node.roles.includes('worker');
});
});
this.getClusterStatus();
} | cclauss/KubeOperator | ui/src/app/overview/cluster-status/cluster-status.component.ts | TypeScript |
MethodDeclaration |
handleScale() {
const params = {'num': this.scale.worker_size};
this.operaterService.executeOperate(this.currentCluster.name, 'scale', params).subscribe(() => {
this.redirect('deploy');
}, error => {
this.scale.opened = false;
});
} | cclauss/KubeOperator | ui/src/app/overview/cluster-status/cluster-status.component.ts | TypeScript |
MethodDeclaration |
redirect(url: string) {
if (url) {
const linkUrl = ['kubeOperator', 'cluster', this.currentCluster.name, url];
this.router.navigate(linkUrl);
}
} | cclauss/KubeOperator | ui/src/app/overview/cluster-status/cluster-status.component.ts | TypeScript |
MethodDeclaration |
onScale() {
this.scale.worker_size = this.workers.length;
this.scale.opened = true;
} | cclauss/KubeOperator | ui/src/app/overview/cluster-status/cluster-status.component.ts | TypeScript |
MethodDeclaration |
toHealth() {
this.redirect('health');
} | cclauss/KubeOperator | ui/src/app/overview/cluster-status/cluster-status.component.ts | TypeScript |
MethodDeclaration |
getClusterStatus() {
this.clusterHealth.data = [];
if (this.currentCluster.status === 'READY' || this.currentCluster.status === 'ERROR') {
return;
}
this.clusterHealthService.listClusterHealth(this.currentCluster.name).subscribe(res => {
this.clusterHealth = res;
}, error1 => {
th... | cclauss/KubeOperator | ui/src/app/overview/cluster-status/cluster-status.component.ts | TypeScript |
MethodDeclaration |
getServiceStatus(type) {
let status = 'UNKNOWN';
for (const ch of this.clusterHealth.data) {
if (ch.job === type) {
if (ch.rate === 100) {
status = 'RUNNING';
} else {
status = 'WARNING';
}
}
}
return status;
} | cclauss/KubeOperator | ui/src/app/overview/cluster-status/cluster-status.component.ts | TypeScript |
ClassDeclaration | /** Provides operations to manage the fields property of the microsoft.graph.listItem entity. */
export class FieldsRequestBuilder {
/** Path parameters for the request */
private readonly pathParameters: Record<string, unknown>;
/** The request adapter to use to execute the requests. */
private readonl... | microsoftgraph/msgraph-sdk-typescript | src/groups/item/drives/item/list/items/item/fields/fieldsRequestBuilder.ts | TypeScript |
MethodDeclaration | /**
* Delete navigation property fields for groups
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a RequestInformation
*/
public createDeleteRequestInformation(requestConfiguration?: FieldsRequestBuilderDeleteRequestC... | microsoftgraph/msgraph-sdk-typescript | src/groups/item/drives/item/list/items/item/fields/fieldsRequestBuilder.ts | TypeScript |
MethodDeclaration | /**
* The values of the columns set on this list item.
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a RequestInformation
*/
public createGetRequestInformation(requestConfiguration?: FieldsRequestBuilderGetRequestCon... | microsoftgraph/msgraph-sdk-typescript | src/groups/item/drives/item/list/items/item/fields/fieldsRequestBuilder.ts | TypeScript |
MethodDeclaration | /**
* Update the navigation property fields in groups
* @param body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a RequestInformation
*/
public createPatchRequestInformation(body: FieldValueSet | undefined, re... | microsoftgraph/msgraph-sdk-typescript | src/groups/item/drives/item/list/items/item/fields/fieldsRequestBuilder.ts | TypeScript |
MethodDeclaration | /**
* Delete navigation property fields for groups
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @param responseHandler Response handler to use in place of the default response handling provided by the core service
*/
public ... | microsoftgraph/msgraph-sdk-typescript | src/groups/item/drives/item/list/items/item/fields/fieldsRequestBuilder.ts | TypeScript |
MethodDeclaration | /**
* The values of the columns set on this list item.
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @param responseHandler Response handler to use in place of the default response handling provided by the core service
* @ret... | microsoftgraph/msgraph-sdk-typescript | src/groups/item/drives/item/list/items/item/fields/fieldsRequestBuilder.ts | TypeScript |
MethodDeclaration | /**
* Update the navigation property fields in groups
* @param body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @param responseHandler Response handler to use in place of the default response handling provided by the core ... | microsoftgraph/msgraph-sdk-typescript | src/groups/item/drives/item/list/items/item/fields/fieldsRequestBuilder.ts | TypeScript |
FunctionDeclaration |
function LandingPageCard({ imageUrl, children }: LandingPageCardProps) {
return (
<section css={cardStyle}>
<div css={imageWrapperStyle}>
<img src={imageUrl} css={imageStyle} />
</div>
<div css={contentStyle}>{children}</div>
</section>
);
} | datacamp/waffles | doc-site/components/landing-page-card.tsx | TypeScript |
TypeAliasDeclaration |
type LandingPageCardProps = {
imageUrl: string;
children: React.ReactNode;
}; | datacamp/waffles | doc-site/components/landing-page-card.tsx | TypeScript |
ArrowFunction |
() => {
let options = {
url: common.normal + '/login/login',
method: 'post',
headers: {
token: null,
},
form: {
...body,
...query,
},
};
console.log(options);
request(options, (err, req, body) => {
console.lo... | LiuLijie1996/api-mock | src/pansan-app/controller/login/login.controller.ts | TypeScript |
ArrowFunction |
(err, req, body) => {
console.log(body);
try {
res.send(JSON.parse(body));
} catch (error) {
console.log('报错了:', error);
res.send(body);
}
} | LiuLijie1996/api-mock | src/pansan-app/controller/login/login.controller.ts | TypeScript |
ArrowFunction |
() => {
let options = {
url: common.normal + '/login/register',
method: 'post',
headers: {
token: null,
},
form: {
...body,
...query,
},
};
console.log(options);
request(options, (err, req, body) => {
console... | LiuLijie1996/api-mock | src/pansan-app/controller/login/login.controller.ts | TypeScript |
ArrowFunction |
() => {
let options = {
url: common.normal + '/login/code',
method: 'post',
headers: {
token: null,
},
form: {
...body,
...query,
},
};
console.log(options);
request(options, (err, req, body) => {
console.log... | LiuLijie1996/api-mock | src/pansan-app/controller/login/login.controller.ts | TypeScript |
ClassDeclaration |
@Controller('pansanApp/api/login')
export class LoginController {
// 登录
@All('login')
index1(@Request() req, @Response() res, @Body() body, @Query() query) {
console.log('登录');
setTimeout(() => {
let options = {
url: common.normal + '/login/login',
method: 'post',
headers: ... | LiuLijie1996/api-mock | src/pansan-app/controller/login/login.controller.ts | TypeScript |
MethodDeclaration | // 登录
@All('login')
index1(@Request() req, @Response() res, @Body() body, @Query() query) {
console.log('登录');
setTimeout(() => {
let options = {
url: common.normal + '/login/login',
method: 'post',
headers: {
token: null,
},
form: {
...body,
... | LiuLijie1996/api-mock | src/pansan-app/controller/login/login.controller.ts | TypeScript |
MethodDeclaration | // 注册
@All('register')
index2(@Request() req, @Response() res, @Body() body, @Query() query) {
console.log('注册');
setTimeout(() => {
let options = {
url: common.normal + '/login/register',
method: 'post',
headers: {
token: null,
},
form: {
...... | LiuLijie1996/api-mock | src/pansan-app/controller/login/login.controller.ts | TypeScript |
MethodDeclaration | // 验证码
@All('code')
index3(@Request() req, @Response() res, @Body() body, @Query() query) {
console.log('验证码');
setTimeout(() => {
let options = {
url: common.normal + '/login/code',
method: 'post',
headers: {
token: null,
},
form: {
...body,
... | LiuLijie1996/api-mock | src/pansan-app/controller/login/login.controller.ts | TypeScript |
ArrowFunction |
t => {
let scroll = Math.round(steps[t] * scrollY);
window.scrollBy(0, scroll);
} | shanilfernando/ng-essentials | src/lib/src/services/scroll.service.ts | TypeScript |
ArrowFunction |
error => {
console.log(error);
} | shanilfernando/ng-essentials | src/lib/src/services/scroll.service.ts | TypeScript |
ArrowFunction |
() => {
this.currentElement = null;
afterScroll.emit(mouseEvent);
} | shanilfernando/ng-essentials | src/lib/src/services/scroll.service.ts | TypeScript |
ArrowFunction |
t => {
return (this.getEasingPattern(timingFunction, (t + 1) / this.NumSteps) - this.getEasingPattern(timingFunction, (t) / this.NumSteps));
} | shanilfernando/ng-essentials | src/lib/src/services/scroll.service.ts | TypeScript |
ClassDeclaration |
@Injectable()
export class ScrollService {
private subscription: Subscription;
private currentElement: HTMLElement;
private readonly NumSteps: number = 50;
constructor() {
}
scroll(duration: number, steps: any, targetElement: HTMLElement, beforeScroll: EventEmitter<MouseEvent>, afterScroll: EventEmitter<M... | shanilfernando/ng-essentials | src/lib/src/services/scroll.service.ts | TypeScript |
MethodDeclaration |
scroll(duration: number, steps: any, targetElement: HTMLElement, beforeScroll: EventEmitter<MouseEvent>, afterScroll: EventEmitter<MouseEvent>, mouseEvent: MouseEvent) {
if (this.currentElement !== targetElement) {
this.currentElement = targetElement;
let scrollY = targetElement.getBoundingClientRect()... | shanilfernando/ng-essentials | src/lib/src/services/scroll.service.ts | TypeScript |
MethodDeclaration |
getEasingPattern(type:string, time:number) {
switch (type) {
case 'easeInQuad': return time * time; // accelerating from zero velocity
case 'easeOutQuad': return time * (2 - time); // decelerating to zero velocity
case 'easeInOutQuad': return time < 0.5 ? 2 * time * time : -1 + (4 - 2 * time) * t... | shanilfernando/ng-essentials | src/lib/src/services/scroll.service.ts | TypeScript |
MethodDeclaration |
getSteps(timingFunction: string) {
return Array.from(Array(this.NumSteps).keys()).map(t => {
return (this.getEasingPattern(timingFunction, (t + 1) / this.NumSteps) - this.getEasingPattern(timingFunction, (t) / this.NumSteps));
});
} | shanilfernando/ng-essentials | src/lib/src/services/scroll.service.ts | TypeScript |
ArrowFunction |
() => {
let component: BaseNavComponent;
let fixture: ComponentFixture<BaseNavComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ BaseNavComponent ],
imports: [IonicModule.forRoot()]
}).compileComponents();
fixture = TestBed.createComponent(BaseNavCompo... | angelina-tsuboi/DealsForMeals_App | src/app/components/accessories/base-nav/base-nav.component.spec.ts | TypeScript |
ArrowFunction |
() => {
TestBed.configureTestingModule({
declarations: [ BaseNavComponent ],
imports: [IonicModule.forRoot()]
}).compileComponents();
fixture = TestBed.createComponent(BaseNavComponent);
component = fixture.componentInstance;
fixture.detectChanges();
} | angelina-tsuboi/DealsForMeals_App | src/app/components/accessories/base-nav/base-nav.component.spec.ts | TypeScript |
ArrowFunction |
child => {
const tab = child as TabElement;
tabIndicators.push(
cloneElement(tab, {
type,
theme,
fluid,
indicatorCount,
key: tab.props.value,
active: value === tab.props.value,
onClickItem: this.handleClickTabItem,
}) as ... | KoEonYack/class101-ui | src/components/Tabs/index.tsx | TypeScript |
ArrowFunction |
(value: string) => {
const { onChange, value: currentValue } = this.props;
onChange(value as T);
if (currentValue === undefined) {
throw new Error('이 컴포넌트는 controlled 하게만 사용 가능합니다.');
}
} | KoEonYack/class101-ui | src/components/Tabs/index.tsx | TypeScript |
ArrowFunction |
props => getTabBorderColor(props.theme) | KoEonYack/class101-ui | src/components/Tabs/index.tsx | TypeScript |
ClassDeclaration | // TODO(chiabi): ThemeProvider 아래에서 모두 같은 테마가 적용되게 만들기
export class Tabs<T extends string = string> extends PureComponent<Props<T>> {
public static Item = TabItem;
public static defaultProps = TabItem.defaultProps;
public render() {
const { value, fluid, theme, type, onChange, children, ...restProps } = this... | KoEonYack/class101-ui | src/components/Tabs/index.tsx | TypeScript |
InterfaceDeclaration |
export interface Props<T> extends TabStyleProps {
onChange: (value: T) => any;
value: T;
fluid: boolean;
className?: string;
} | KoEonYack/class101-ui | src/components/Tabs/index.tsx | TypeScript |
TypeAliasDeclaration |
type TabElement = React.ReactElement<TabItemProps>; | KoEonYack/class101-ui | src/components/Tabs/index.tsx | TypeScript |
MethodDeclaration |
public render() {
const { value, fluid, theme, type, onChange, children, ...restProps } = this.props;
const indicatorCount = React.Children.count(children);
const tabIndicators: TabElement[] = [];
let activePanel: ReactNode;
React.Children.forEach(this.props.children, child => {
const tab =... | KoEonYack/class101-ui | src/components/Tabs/index.tsx | TypeScript |
ArrowFunction |
reservation => reservation.name.toLowerCase().indexOf(lowercaseFilter) !== -1 ||
reservation.contact.toLowerCase().indexOf(lowercaseFilter) !== -1 | jdav-freiburg/depot | client/imports/app/pipes/reservations-filter.ts | TypeScript |
ClassDeclaration |
@Pipe({
name: 'reservationsfilter',
pure: false
})
export class ReservationsFilterPipe implements PipeTransform {
transform(reservation: Reservation[], filter: string): any {
if (!reservation || !filter) {
return reservation;
}
let lowercaseFilter = filter.toLowerCase();... | jdav-freiburg/depot | client/imports/app/pipes/reservations-filter.ts | TypeScript |
MethodDeclaration |
transform(reservation: Reservation[], filter: string): any {
if (!reservation || !filter) {
return reservation;
}
let lowercaseFilter = filter.toLowerCase();
return reservation.filter(reservation => reservation.name.toLowerCase().indexOf(lowercaseFilter) !== -1 ||
... | jdav-freiburg/depot | client/imports/app/pipes/reservations-filter.ts | TypeScript |
ArrowFunction |
(t) => t.scaleSpacing(2) | Itera/mad-learning | src/components/fields/FieldLabel/styled.ts | TypeScript |
ClassDeclaration |
@Injectable()
export class WarehouseService extends BaseService {
constructor(private apiHttpService: ApiWarehouseHttpService) {
super();
}
async filterWarehouse(query: QueryModel): Promise<PagingModel<WarehouseModel>> {
const response = await this.apiHttpService.get(`warehouses${query.url... | duchuy294/tms-admin | src/app/modules/warehouse/services/warehouse.service.ts | TypeScript |
MethodDeclaration |
async filterWarehouse(query: QueryModel): Promise<PagingModel<WarehouseModel>> {
const response = await this.apiHttpService.get(`warehouses${query.url()}`);
return new PagingModel<WarehouseModel>(
response.errorCode === 0 ? response.data : {}
);
} | duchuy294/tms-admin | src/app/modules/warehouse/services/warehouse.service.ts | TypeScript |
MethodDeclaration |
async getWarehouse(id: string): Promise<WarehouseModel> {
return this.returnObj<WarehouseModel>(await this.apiHttpService.get(`warehouse/${id}`));
} | duchuy294/tms-admin | src/app/modules/warehouse/services/warehouse.service.ts | TypeScript |
MethodDeclaration |
async createWarehouse(model: WarehouseModel) {
return await this.apiHttpService.post(`warehouse`, model);
} | duchuy294/tms-admin | src/app/modules/warehouse/services/warehouse.service.ts | TypeScript |
MethodDeclaration |
async updateWarehouse(model: WarehouseModel) {
return await this.apiHttpService.put(`warehouse/${model._id}`, omit(model, ['_id']));
} | duchuy294/tms-admin | src/app/modules/warehouse/services/warehouse.service.ts | TypeScript |
MethodDeclaration |
async deleteWarehouse(id): Promise<any> {
return await this.apiHttpService.delete(`warehouse/${id}`);
} | duchuy294/tms-admin | src/app/modules/warehouse/services/warehouse.service.ts | TypeScript |
MethodDeclaration |
async filterWarehouseType(query: QueryModel): Promise<PagingModel<any>> {
const response = await this.apiHttpService.get(`warehouse-types${query.url()}`);
return new PagingModel<any>(
response.errorCode === 0 ? response.data : {}
);
} | duchuy294/tms-admin | src/app/modules/warehouse/services/warehouse.service.ts | TypeScript |
MethodDeclaration |
async filterService(query: QueryModel): Promise<PagingModel<WarehouseServiceModel>> {
const response = await this.apiHttpService.get(`services${query.url()}`);
return new PagingModel<WarehouseServiceModel>(
response.errorCode === 0 ? response.data : {}
);
} | duchuy294/tms-admin | src/app/modules/warehouse/services/warehouse.service.ts | TypeScript |
MethodDeclaration |
async getService(id: string): Promise<WarehouseServiceModel> {
return this.returnObj<WarehouseServiceModel>(await this.apiHttpService.get(`service/${id}`));
} | duchuy294/tms-admin | src/app/modules/warehouse/services/warehouse.service.ts | TypeScript |
MethodDeclaration |
async createService(model: WarehouseServiceModel) {
return await this.apiHttpService.post(`service`, model);
} | duchuy294/tms-admin | src/app/modules/warehouse/services/warehouse.service.ts | TypeScript |
MethodDeclaration |
async updateService(model: WarehouseServiceModel) {
return await this.apiHttpService.put(`service/${model._id}`, omit(model, ['_id']));
} | duchuy294/tms-admin | src/app/modules/warehouse/services/warehouse.service.ts | TypeScript |
MethodDeclaration |
async activateService(id, active = false) {
return await this.apiHttpService.put(`service/activate/${id}`, { active });
} | duchuy294/tms-admin | src/app/modules/warehouse/services/warehouse.service.ts | TypeScript |
MethodDeclaration |
async deleteService(id): Promise<any> {
return await this.apiHttpService.delete(`service/${id}`);
} | duchuy294/tms-admin | src/app/modules/warehouse/services/warehouse.service.ts | TypeScript |
MethodDeclaration |
async filterUtility(query: QueryModel): Promise<PagingModel<WarehouseUtilityModel>> {
const response = await this.apiHttpService.get(`utilities${query.url()}`);
return new PagingModel<WarehouseUtilityModel>(
response.errorCode === 0 ? response.data : {}
);
} | duchuy294/tms-admin | src/app/modules/warehouse/services/warehouse.service.ts | TypeScript |
MethodDeclaration |
async getUtility(id: string): Promise<WarehouseUtilityModel> {
return this.returnObj<WarehouseUtilityModel>(await this.apiHttpService.get(`utility/${id}`));
} | duchuy294/tms-admin | src/app/modules/warehouse/services/warehouse.service.ts | TypeScript |
MethodDeclaration |
async createUtility(model: WarehouseUtilityModel) {
return await this.apiHttpService.post(`utility`, model);
} | duchuy294/tms-admin | src/app/modules/warehouse/services/warehouse.service.ts | TypeScript |
MethodDeclaration |
async updateUtility(model: WarehouseUtilityModel) {
return await this.apiHttpService.put(`utility/${model._id}`, omit(model, ['_id']));
} | duchuy294/tms-admin | src/app/modules/warehouse/services/warehouse.service.ts | TypeScript |
MethodDeclaration |
async activateUtility(id, active = false) {
return await this.apiHttpService.put(`utility/activate/${id}`, { active });
} | duchuy294/tms-admin | src/app/modules/warehouse/services/warehouse.service.ts | TypeScript |
MethodDeclaration |
async deleteUtility(id): Promise<any> {
return await this.apiHttpService.delete(`utility/${id}`);
} | duchuy294/tms-admin | src/app/modules/warehouse/services/warehouse.service.ts | TypeScript |
MethodDeclaration |
async filterTimeline(query: QueryModel): Promise<PagingModel<WarehouseTimelineModel>> {
const response = await this.apiHttpService.get(`pricing-timelines${query.url()}`);
return new PagingModel<WarehouseTimelineModel>(
response.errorCode === 0 ? response.data : {}
);
} | duchuy294/tms-admin | src/app/modules/warehouse/services/warehouse.service.ts | TypeScript |
MethodDeclaration |
async getTimeline(id: string): Promise<WarehouseTimelineModel> {
return this.returnObj<WarehouseTimelineModel>(await this.apiHttpService.get(`pricing-timeline/${id}`));
} | duchuy294/tms-admin | src/app/modules/warehouse/services/warehouse.service.ts | TypeScript |
MethodDeclaration |
async createTimeline(model: WarehouseTimelineModel) {
return await this.apiHttpService.post(`pricing-timeline`, model);
} | duchuy294/tms-admin | src/app/modules/warehouse/services/warehouse.service.ts | TypeScript |
MethodDeclaration |
async updateTimeline(model: WarehouseTimelineModel) {
return await this.apiHttpService.put(`pricing-timeline/${model._id}`, omit(model, ['_id']));
} | duchuy294/tms-admin | src/app/modules/warehouse/services/warehouse.service.ts | TypeScript |
MethodDeclaration |
async activateTimeline(id, active = false) {
return await this.apiHttpService.put(`pricing-timeline/activate/${id}`, { active });
} | duchuy294/tms-admin | src/app/modules/warehouse/services/warehouse.service.ts | TypeScript |
MethodDeclaration |
async deleteTimeline(id): Promise<any> {
return await this.apiHttpService.delete(`pricing-timeline/${id}`);
} | duchuy294/tms-admin | src/app/modules/warehouse/services/warehouse.service.ts | TypeScript |
MethodDeclaration |
async processOrder(orderId: string, model: Object) {
const response = await this.apiHttpService.put(`order/process/${orderId}`, model);
return {
success: response.errorCode === 0,
message: response.message || ''
};
} | duchuy294/tms-admin | src/app/modules/warehouse/services/warehouse.service.ts | TypeScript |
MethodDeclaration |
async filterAvailableAreaSummary(query: QueryModel): Promise<PagingModel<WarehouseModel>> {
return this.returnObj(await this.apiHttpService.get(`availableAreaSummaries${query.url()}`));
} | duchuy294/tms-admin | src/app/modules/warehouse/services/warehouse.service.ts | TypeScript |
ArrowFunction |
() => (
<Clock
enabled={false} | AlexRogalskiy/curfew-alarm | src/components/Clock/Clock.story.tsx | TypeScript |
ArrowFunction |
() => (
<Clock
enabled={true} | AlexRogalskiy/curfew-alarm | src/components/Clock/Clock.story.tsx | TypeScript |
ArrowFunction |
() => (
<Clock
enabled={true} | AlexRogalskiy/curfew-alarm | src/components/Clock/Clock.story.tsx | TypeScript |
FunctionDeclaration |
export function listManagedClusterMonitoringUserCredentials(args: ListManagedClusterMonitoringUserCredentialsArgs, opts?: pulumi.InvokeOptions): Promise<ListManagedClusterMonitoringUserCredentialsResult> {
if (!opts) {
opts = {}
}
if (!opts.version) {
opts.version = utilities.getVersion();... | test-wiz-sec/pulumi-azure-nextgen | sdk/nodejs/containerservice/v20191101/listManagedClusterMonitoringUserCredentials.ts | TypeScript |
InterfaceDeclaration |
export interface ListManagedClusterMonitoringUserCredentialsArgs {
/**
* The name of the resource group.
*/
readonly resourceGroupName: string;
/**
* The name of the managed cluster resource.
*/
readonly resourceName: string;
} | test-wiz-sec/pulumi-azure-nextgen | sdk/nodejs/containerservice/v20191101/listManagedClusterMonitoringUserCredentials.ts | TypeScript |
InterfaceDeclaration | /**
* The list of credential result response.
*/
export interface ListManagedClusterMonitoringUserCredentialsResult {
/**
* Base64-encoded Kubernetes configuration file.
*/
readonly kubeconfigs: outputs.containerservice.v20191101.CredentialResultResponse[];
} | test-wiz-sec/pulumi-azure-nextgen | sdk/nodejs/containerservice/v20191101/listManagedClusterMonitoringUserCredentials.ts | TypeScript |
ArrowFunction |
() => Token | cbsorrilha/arauto-tables | src/tokens/tokens.resolver.ts | TypeScript |
ArrowFunction |
() => [Token] | cbsorrilha/arauto-tables | src/tokens/tokens.resolver.ts | TypeScript |
ClassDeclaration |
@Resolver(() => Token)
export class TokensResolver {
constructor(private readonly tokenService: TokensService) {}
@Query(() => Token)
async token(@Args('id') id: string): Promise<Token> {
const token = await this.tokenService.findOneById(id);
if (!token) {
throw new NotFoundException(id);
}
... | cbsorrilha/arauto-tables | src/tokens/tokens.resolver.ts | TypeScript |
MethodDeclaration |
@Query(() => Token)
async token(@Args('id') id: string): Promise<Token> {
const token = await this.tokenService.findOneById(id);
if (!token) {
throw new NotFoundException(id);
}
return token;
} | cbsorrilha/arauto-tables | src/tokens/tokens.resolver.ts | TypeScript |
MethodDeclaration |
@Query(() => [Token])
tokens(@Args() tokensArgs: TokensArgs): Promise<Token[]> {
return this.tokenService.findAll(tokensArgs);
} | cbsorrilha/arauto-tables | src/tokens/tokens.resolver.ts | TypeScript |
MethodDeclaration |
@Mutation(() => Token)
async addToken(
@Args('newTokenData') newTokenData: NewTokenInput,
): Promise<Token> {
const token = await this.tokenService.create(newTokenData);
pubSub.publish('tokenAdded', { tokenAdded: token });
return token;
} | cbsorrilha/arauto-tables | src/tokens/tokens.resolver.ts | TypeScript |
MethodDeclaration |
@Mutation(() => Token)
async updateToken(
@Args('id') id: string,
@Args('updateTokenData') updateTokenData: NewTokenInput,
): Promise<Token> {
const token = await this.tokenService.update(id, updateTokenData);
pubSub.publish('tokenAdded', { tokenUpdated: token });
return token;
} | cbsorrilha/arauto-tables | src/tokens/tokens.resolver.ts | TypeScript |
MethodDeclaration |
@Mutation(() => Token)
async removeToken(@Args('id') id: string): Promise<Token> {
return this.tokenService.delete(id);
} | cbsorrilha/arauto-tables | src/tokens/tokens.resolver.ts | TypeScript |
MethodDeclaration |
@Subscription(() => Token)
tokenAdded(): AsyncIterator<any> {
return pubSub.asyncIterator('tokenAdded');
} | cbsorrilha/arauto-tables | src/tokens/tokens.resolver.ts | TypeScript |
MethodDeclaration |
@Subscription(() => Token)
tokenUpdated(): AsyncIterator<any> {
return pubSub.asyncIterator('tokenUpdate');
} | cbsorrilha/arauto-tables | src/tokens/tokens.resolver.ts | TypeScript |
ArrowFunction |
({
fieldNamePrefix,
touched,
errors,
reviewErrors,
reviewWarnings,
branch,
equalRatio,
isReference,
onAddScreenshot,
onRemoveScreenshot,
onRemove,
defaultValues,
setSubmitErrors,
}: {
fieldNamePrefix: string;
touched: Record<string, boolean>;
errors: Record<string, FieldError>;
review... | code-review-doctor/experimenter | app/experimenter/nimbus-ui/src/components/PageEditBranches/FormBranches/FormBranch.tsx | TypeScript |
ArrowFunction |
() => onRemove && onRemove() | code-review-doctor/experimenter | app/experimenter/nimbus-ui/src/components/PageEditBranches/FormBranches/FormBranch.tsx | TypeScript |
ArrowFunction |
() => (
<Button
data-testid="add-screenshot" | code-review-doctor/experimenter | app/experimenter/nimbus-ui/src/components/PageEditBranches/FormBranches/FormBranch.tsx | TypeScript |
ArrowFunction |
(screenshot, idx) => (
<div key={idx}>
<FormScreenshot
{...{
fieldNamePrefix: `${fieldNamePrefix}.screenshots[${idx}]`,
onRemove: () => onRemoveScreenshot!(idx),
defaultValues: defaultValues.screenshots?.[idx] || {},
se... | code-review-doctor/experimenter | app/experimenter/nimbus-ui/src/components/PageEditBranches/FormBranches/FormBranch.tsx | TypeScript |
ArrowFunction |
() => onRemoveScreenshot!(idx) | code-review-doctor/experimenter | app/experimenter/nimbus-ui/src/components/PageEditBranches/FormBranches/FormBranch.tsx | TypeScript |
TypeAliasDeclaration |
type BranchFieldName = typeof branchFieldNames[number]; | code-review-doctor/experimenter | app/experimenter/nimbus-ui/src/components/PageEditBranches/FormBranches/FormBranch.tsx | TypeScript |
MethodDeclaration |
featureEnabled ? (
<Form | code-review-doctor/experimenter | app/experimenter/nimbus-ui/src/components/PageEditBranches/FormBranches/FormBranch.tsx | TypeScript |
FunctionDeclaration |
export function constructDepGraph(
scannedImages: IScanResult[],
workloadMetadata: IWorkload[],
): IDependencyGraphPayload[] {
const results = scannedImages.map((scannedImage): IDependencyGraphPayload => {
// We know that .find() won't return undefined
// eslint-disable-next-line @typescript-eslint/n... | mariasnyk/kubernetes-monitor | src/transmitter/payload.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.