type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
MethodDeclaration |
cellSelected(cell: Cell) {
if (!this.editing && cell) {
this.onCellSelected.emit(cell);
}
} | loicsalou/ma-cave | src/components/locker/fridge-locker.component.ts | TypeScript |
MethodDeclaration |
rackSelected(event: { rack: Locker, selected: boolean }) {
this.onRacksSelected.emit(
this.rackComponents
.map((rack: SimpleLockerComponent, ix: number) => {
return {rack: rack, ix: ix};
})
.filter((rack: { rack: SimpleLockerComponent, ix: number }) => rack.rack.selected)
... | loicsalou/ma-cave | src/components/locker/fridge-locker.component.ts | TypeScript |
MethodDeclaration |
ngAfterViewInit(): void {
if (this.zoomable && this.zoomable.zoomable) {
this.gesture = this.setupPinchZoom(this.zoomable.zoomableComponent);
}
} | loicsalou/ma-cave | src/components/locker/fridge-locker.component.ts | TypeScript |
MethodDeclaration |
addTopRack(): boolean {
this.hapticConfirm();
let currentHeight = this.fridge.racks.reduce((total, rack) => total + rack.dimension.y, 0);
if (currentHeight + 1 > FridgeLockerComponent.MAX_NB_ROWS) {
this.notificationService.information('locker-editor.maxi-row-reached');
return false;
}
... | loicsalou/ma-cave | src/components/locker/fridge-locker.component.ts | TypeScript |
MethodDeclaration |
addBottomRack(): boolean {
this.hapticConfirm();
let currentHeight = this.fridge.racks.reduce((total, rack) => total + rack.dimension.y, 0);
if (currentHeight + 1 > FridgeLockerComponent.MAX_NB_ROWS) {
this.notificationService.information('locker-editor.maxi-row-reached');
return false;
}
... | loicsalou/ma-cave | src/components/locker/fridge-locker.component.ts | TypeScript |
MethodDeclaration |
removeTopRack(): boolean {
this.hapticConfirm();
if (this.fridge.racks.length < 2) {
this.notificationService.warning('locker-editor.mini-row-reached');
return false;
}
;
// on vérifie que le rack à supprimer est vide
let bottlesInRack = this.content.filter(
btl => btl.positio... | loicsalou/ma-cave | src/components/locker/fridge-locker.component.ts | TypeScript |
MethodDeclaration |
removeBottomRack(): boolean {
this.hapticConfirm();
if (this.fridge.racks.length < 2) {
this.notificationService.warning('locker-editor.mini-row-reached');
return false;
}
let rackIndex = this.fridge.racks.length - 1;
// on vérifie que le rack est vide avant de le supprimer
let bott... | loicsalou/ma-cave | src/components/locker/fridge-locker.component.ts | TypeScript |
MethodDeclaration |
addTopRow(): boolean {
this.hapticConfirm();
if (!this.canIncreaseHeight()) {
return false;
}
this.rackComponents.forEach(
(rack: SimpleLockerComponent, ix: number) => {
if (rack.selected) {
this.updateY(rack.locker, 1);
this.shiftBottles(ix, 0, 1);
}
... | loicsalou/ma-cave | src/components/locker/fridge-locker.component.ts | TypeScript |
MethodDeclaration |
removeTopRow(): boolean {
this.hapticConfirm();
if (!this.canRemoveFirstRow()) {
return false;
}
this.rackComponents.forEach(
(rack: SimpleLockerComponent, ix: number) => {
if (rack.selected) {
this.updateY(rack.locker, -1);
this.shiftBottles(ix, 0, -1);
... | loicsalou/ma-cave | src/components/locker/fridge-locker.component.ts | TypeScript |
MethodDeclaration |
addRightColumn(): boolean {
this.hapticConfirm();
if (!this.canIncreaseWidth()) {
return false;
}
this.rackComponents.forEach(
(rack: SimpleLockerComponent, ix: number) => {
if (rack.selected) {
this.updateX(rack.locker, 1);
}
}
);
this.resetCompone... | loicsalou/ma-cave | src/components/locker/fridge-locker.component.ts | TypeScript |
MethodDeclaration |
removeRightColumn(): boolean {
this.hapticConfirm();
if (!this.canRemoveLastColumn()) {
return false;
}
this.rackComponents.forEach(
(rack: SimpleLockerComponent, ix: number) => {
if (rack.selected) {
this.updateX(rack.locker, -1);
}
}
);
this.reset... | loicsalou/ma-cave | src/components/locker/fridge-locker.component.ts | TypeScript |
MethodDeclaration |
addBottomRow(): boolean {
this.hapticConfirm();
if (!this.canIncreaseHeight()) {
return false;
}
this.rackComponents.forEach(
(rack: SimpleLockerComponent, ix: number) => {
if (rack.selected) {
this.updateY(rack.locker, 1);
}
}
);
this.resetComponen... | loicsalou/ma-cave | src/components/locker/fridge-locker.component.ts | TypeScript |
MethodDeclaration |
removeBottomRow(): boolean {
this.hapticConfirm();
if (!this.canRemoveLastRow()) {
return false;
}
this.rackComponents.forEach(
(rack: SimpleLockerComponent, ix: number) => {
if (rack.selected) {
this.updateY(rack.locker, -1);
}
}
);
this.resetCompo... | loicsalou/ma-cave | src/components/locker/fridge-locker.component.ts | TypeScript |
MethodDeclaration |
addLeftColumn(): boolean {
this.hapticConfirm();
if (!this.canIncreaseWidth()) {
return false;
}
this.rackComponents.forEach(
(rack: SimpleLockerComponent, ix: number) => {
if (rack.selected) {
this.updateX(rack.locker, 1);
this.shiftBottles(ix, 1, 0);
}... | loicsalou/ma-cave | src/components/locker/fridge-locker.component.ts | TypeScript |
MethodDeclaration |
removeLeftColumn(): boolean {
this.hapticConfirm();
if (!this.canRemoveFirstColumn()) {
return false;
}
this.rackComponents.forEach(
(rack: SimpleLockerComponent, ix: number) => {
if (rack.selected) {
this.updateX(rack.locker, -1);
this.shiftBottles(ix, -1, 0);
... | loicsalou/ma-cave | src/components/locker/fridge-locker.component.ts | TypeScript |
MethodDeclaration | //avant d'enlever une rangée on s'assure qu'elle est vide + un locker a au moins une rangée
public canRemoveFirstRow(): boolean {
if (!this.canDecreaseHeight()) {
return false;
}
let result = true;
this.rackComponents.filter(
rack => rack.selected
).forEach(
rack => result = result... | loicsalou/ma-cave | src/components/locker/fridge-locker.component.ts | TypeScript |
MethodDeclaration | //avant d'enlever une rangée on s'assure qu'elle est vide + un locker a au moins une rangée
public canRemoveLastRow(): boolean {
if (!this.canDecreaseHeight()) {
return false;
}
let result = true;
this.rackComponents.filter(
rack => rack.selected
).forEach(
rack => result = result ... | loicsalou/ma-cave | src/components/locker/fridge-locker.component.ts | TypeScript |
MethodDeclaration | //avant d'enlever une colonne on s'assure qu'elle est vide + un locker a au moins une colonne
public canRemoveFirstColumn(): boolean {
if (!this.canDecreaseWidth()) {
return false;
}
let result = true;
this.rackComponents.filter(
rack => rack.selected
).forEach(
rack => result = re... | loicsalou/ma-cave | src/components/locker/fridge-locker.component.ts | TypeScript |
MethodDeclaration | //avant d'enlever une colonne on s'assure qu'elle est vide + un locker a au moins une colonne
public canRemoveLastColumn(): boolean {
if (!this.canDecreaseWidth()) {
return false;
}
let result = true;
this.rackComponents.filter(
rack => rack.selected
).forEach(
rack => result = res... | loicsalou/ma-cave | src/components/locker/fridge-locker.component.ts | TypeScript |
MethodDeclaration | /**
* Comme on enlève une rangée à chaque rack sélectionné on vérifie que le frigo ne dépasse pas la hauteur
* max d'un frigo
* @returns {boolean}
*/
protected canDecreaseHeight() {
let nbSelectedRacks = this.rackComponents.filter(
rack => rack.selected
).length;
let currentHeight = this.f... | loicsalou/ma-cave | src/components/locker/fridge-locker.component.ts | TypeScript |
MethodDeclaration | /**
* Comme on enlève une colonne à chaque rack sélectionné on vérifie qu'aucun des racks concernés ne passe en
* dessous du nombre minimal de colonnes autorisé dans un rack
* @returns {boolean}
*/
protected canDecreaseWidth() {
let minWidth = this.rackComponents.filter(
rack => rack.selected
... | loicsalou/ma-cave | src/components/locker/fridge-locker.component.ts | TypeScript |
MethodDeclaration | /**
* Comme on ajoute une rangée de haut à chaque rack sélectionné on vérifie que le frigo ne dépasse pas la hauteur
* max d'un frigo
* @returns {boolean}
*/
protected canIncreaseHeight() {
let nbSelectedRacks = this.rackComponents.filter(
rack => rack.selected
).length;
let currentHeight ... | loicsalou/ma-cave | src/components/locker/fridge-locker.component.ts | TypeScript |
MethodDeclaration | /**
* On ajoute une rangée de haut à chaque rack sélectionné. On vérifie que chaque rack ne dépasse pas sa largeur
* max autorisée.
* @returns {boolean}
*/
protected canIncreaseWidth() {
if (this.dimension.x + 1 >= FridgeLockerComponent.MAX_NB_COLUMNS) {
this.notificationService.warning('locker-ed... | loicsalou/ma-cave | src/components/locker/fridge-locker.component.ts | TypeScript |
MethodDeclaration |
private getNewRack(): Locker {
let width = this.fridge.racks.reduce((max, oneRack) => Math.max(max, oneRack.dimension.x), 0);
let formats = this.fridge.racks[ 0 ].supportedFormats;
return new SimpleLocker(undefined, '', LockerType.shifted, {
x: width,
y: 1
}, true, '', formats);
} | loicsalou/ma-cave | src/components/locker/fridge-locker.component.ts | TypeScript |
MethodDeclaration |
private shiftBottles(rack: number, shiftX: number, shiftY: number) {
this.content.forEach(
bottle => {
bottle.positions = bottle.positions.map(
pos => {
if (pos.inRack(this.fridge.id, rack)) {
return new Position(pos.lockerId, pos.x + shiftX, pos.y + shiftY, pos.ra... | loicsalou/ma-cave | src/components/locker/fridge-locker.component.ts | TypeScript |
ArrowFunction |
async () => {
await beforeAllDb('shares');
} | 5seconds-info/joplin | packages/server/src/routes/api/shares.test.ts | TypeScript |
ArrowFunction |
async () => {
await afterAllTests();
} | 5seconds-info/joplin | packages/server/src/routes/api/shares.test.ts | TypeScript |
ArrowFunction |
async () => {
await beforeEachDb();
} | 5seconds-info/joplin | packages/server/src/routes/api/shares.test.ts | TypeScript |
ArrowFunction |
it => it.folder_id === '000000000000000000000000000000F1' | 5seconds-info/joplin | packages/server/src/routes/api/shares.test.ts | TypeScript |
ArrowFunction |
it => it.note_id === '00000000000000000000000000000002' | 5seconds-info/joplin | packages/server/src/routes/api/shares.test.ts | TypeScript |
ArrowFunction |
su => su.user.email === 'user2@localhost' | 5seconds-info/joplin | packages/server/src/routes/api/shares.test.ts | TypeScript |
ArrowFunction |
su => su.user.email === 'user3@localhost' | 5seconds-info/joplin | packages/server/src/routes/api/shares.test.ts | TypeScript |
ArrowFunction |
() => {
this.display = "block";
setTimeout(() => this.activateToast()); // Is needed to make "display: none" & "opacity" transitions working
} | Apolloen/nova | packages/bits/src/lib/toast/toast.component.ts | TypeScript |
ArrowFunction |
() => this.activateToast() | Apolloen/nova | packages/bits/src/lib/toast/toast.component.ts | TypeScript |
ArrowFunction |
() => {
this.remove();
} | Apolloen/nova | packages/bits/src/lib/toast/toast.component.ts | TypeScript |
ArrowFunction |
() => {
this.timeout = setTimeout(() => {
this.ngZone.run(() => {
this.remove();
});
}, this.options.timeOut);
} | Apolloen/nova | packages/bits/src/lib/toast/toast.component.ts | TypeScript |
ArrowFunction |
() => {
this.ngZone.run(() => {
this.remove();
});
} | Apolloen/nova | packages/bits/src/lib/toast/toast.component.ts | TypeScript |
ArrowFunction |
() => {
this.remove();
} | Apolloen/nova | packages/bits/src/lib/toast/toast.component.ts | TypeScript |
ArrowFunction |
() => this.toastService.remove(this.toastPackage.toastId) | Apolloen/nova | packages/bits/src/lib/toast/toast.component.ts | TypeScript |
ArrowFunction |
() => this.remove() | Apolloen/nova | packages/bits/src/lib/toast/toast.component.ts | TypeScript |
ArrowFunction |
() => {
intervalId = setInterval(() => {
this.ngZone.run(() => {
this.updateProgress();
});
}, (this.options.timeOut || 0) / 100);
} | Apolloen/nova | packages/bits/src/lib/toast/toast.component.ts | TypeScript |
ArrowFunction |
() => {
this.ngZone.run(() => {
this.updateProgress();
});
} | Apolloen/nova | packages/bits/src/lib/toast/toast.component.ts | TypeScript |
ArrowFunction |
() => {
this.updateProgress();
} | Apolloen/nova | packages/bits/src/lib/toast/toast.component.ts | TypeScript |
ArrowFunction |
subscription => subscription.unsubscribe() | Apolloen/nova | packages/bits/src/lib/toast/toast.component.ts | TypeScript |
ClassDeclaration | // <example-url>./../examples/index.html#/toast</example-url>
/**
* /**
* __Name : __
* Toast Component
*
* __Usage :__
* Used to show toast, handle animation and events. Handles progress bar animation.
* This component is created dynamically in ToastContainerService
*/
@Component({
selector: "nui-toast-comp... | Apolloen/nova | packages/bits/src/lib/toast/toast.component.ts | TypeScript |
EnumDeclaration |
enum ToastState {
Inactive = "inactive",
Active = "active",
Removed = "removed",
} | Apolloen/nova | packages/bits/src/lib/toast/toast.component.ts | TypeScript |
MethodDeclaration | /**
* triggers fade in animation and sets timeout till the toast will be dismissed
*/
public activateToast() {
this.state = ToastState.Active;
this.fadeOut = false;
if (this.options.timeOut) {
this.ngZone.runOutsideAngular(() => {
this.timeout = setTimeout(... | Apolloen/nova | packages/bits/src/lib/toast/toast.component.ts | TypeScript |
MethodDeclaration | /**
* tells toastService to remove this toast after animation time
*/
public remove() {
if (this.state === ToastState.Removed) {
return;
}
clearTimeout(this.timeout);
this.state = ToastState.Removed;
this.fadeOut = true;
this.timeout = setTimeout(()... | Apolloen/nova | packages/bits/src/lib/toast/toast.component.ts | TypeScript |
MethodDeclaration | /**
* handles click on toast itself
*/
@HostListener("click")
public clickToast() {
if (this.state === ToastState.Removed) {
return;
}
this.toastPackage.triggerClick();
if (this.options.clickToDismiss) {
this.remove();
}
} | Apolloen/nova | packages/bits/src/lib/toast/toast.component.ts | TypeScript |
MethodDeclaration | /**
* disables progressBar and prevents toast from closing
*/
@HostListener("mouseenter")
public stickAround() {
if (this.state === ToastState.Removed) {
return;
}
clearTimeout(this.timeout);
this.options.timeOut = 0;
this.hideTime = 0;
// disab... | Apolloen/nova | packages/bits/src/lib/toast/toast.component.ts | TypeScript |
MethodDeclaration | /**
* using extendedTimeOut value to delay toast's closure
*/
@HostListener("mouseleave")
public delayedHideToast() {
clearInterval(this.intervalId);
if (this.options.extendedTimeOut === 0 || this.state === ToastState.Removed) {
return;
}
this.timeout = setTi... | Apolloen/nova | packages/bits/src/lib/toast/toast.component.ts | TypeScript |
MethodDeclaration |
private repeatProgressBarChange(): NodeJS.Timeout {
let intervalId;
this.ngZone.runOutsideAngular(() => {
intervalId = setInterval(() => {
this.ngZone.run(() => {
this.updateProgress();
});
}, (this.options.timeOut || 0) / 100... | Apolloen/nova | packages/bits/src/lib/toast/toast.component.ts | TypeScript |
MethodDeclaration | /**
* updates progress bar width
*/
private updateProgress() {
if (this.width === 0 || !this.options.timeOut) {
return;
}
const now = new Date().getTime();
const remaining = this.hideTime - now;
this.width = (remaining / this.options.timeOut) * 100;
... | Apolloen/nova | packages/bits/src/lib/toast/toast.component.ts | TypeScript |
MethodDeclaration |
ngOnDestroy() {
this.subscriptions.forEach(subscription => subscription.unsubscribe());
clearInterval(this.intervalId);
clearTimeout(this.timeout);
} | Apolloen/nova | packages/bits/src/lib/toast/toast.component.ts | TypeScript |
InterfaceDeclaration |
export interface AudioSearch {
// eslint-disable-next-line @typescript-eslint/naming-convention
audio_list?: Array<AudioInfo>;
kw?: string;
} | kidwen/look-me | src/app/shared/models/audio-search.model.ts | TypeScript |
ArrowFunction |
async (req: NextApiRequest, res: NextApiResponse) => {
await conectarDB();
const {
query: { id },
} = req;
try {
const deletedDonador = await Donador.deleteOne({ _id: id });
if (!deletedDonador) {
return res.status(400).json({ success: false });
}
res.status(201).json({ succsess: tru... | jblancofi/clinicas-web | pages/api/donador/deleteDonador/[id].ts | TypeScript |
FunctionDeclaration |
export function newStringArray(): Array<string> {
return new Array<string>();
} | KiChjang/near-sdk-as | assembly/vm/vm.include.ts | TypeScript |
FunctionDeclaration |
export function pushString(arr: string[], str: string): Array<string> {
arr.push(str);
return arr;
} | KiChjang/near-sdk-as | assembly/vm/vm.include.ts | TypeScript |
ArrowFunction |
() => {
VM.restoreState();
} | KiChjang/near-sdk-as | assembly/vm/vm.include.ts | TypeScript |
ArrowFunction |
() => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: ContributorService = TestBed.get(ContributorService);
expect(service).toBeTruthy();
});
} | KilianKrause/coderadar | coderadar-ui/src/app/service/contributor-service.service.spec.ts | TypeScript |
ArrowFunction |
() => {
const service: ContributorService = TestBed.get(ContributorService);
expect(service).toBeTruthy();
} | KilianKrause/coderadar | coderadar-ui/src/app/service/contributor-service.service.spec.ts | TypeScript |
ArrowFunction |
() => {
let collectionRightsObjectFactory: CollectionRightsObjectFactory = null;
beforeEach(() => {
collectionRightsObjectFactory = new CollectionRightsObjectFactory();
});
it('should not be able to modify owner names', () => {
var initialCollectionRightsBackendObject = {
collection_id: 0,
... | Anita-ihuman/oppia | core/templates/domain/collection/CollectionRightsObjectFactorySpec.ts | TypeScript |
ArrowFunction |
() => {
collectionRightsObjectFactory = new CollectionRightsObjectFactory();
} | Anita-ihuman/oppia | core/templates/domain/collection/CollectionRightsObjectFactorySpec.ts | TypeScript |
ArrowFunction |
() => {
var initialCollectionRightsBackendObject = {
collection_id: 0,
can_edit: true,
can_unpublish: false,
is_private: true,
owner_names: ['A']
};
var sampleCollectionRights = collectionRightsObjectFactory.create(
initialCollectionRightsBackendObject);
var ownerNa... | Anita-ihuman/oppia | core/templates/domain/collection/CollectionRightsObjectFactorySpec.ts | TypeScript |
ArrowFunction |
() => {
var initialCollectionRightsBackendObject = {
collection_id: 0,
can_edit: true,
can_unpublish: false,
is_private: true,
owner_names: ['A']
};
var sampleCollectionRights = collectionRightsObjectFactory.create(
initialCollectionRightsBackendObject... | Anita-ihuman/oppia | core/templates/domain/collection/CollectionRightsObjectFactorySpec.ts | TypeScript |
ArrowFunction |
() => {
var initialCollectionRightsBackendObject = {
collection_id: 0,
can_edit: true,
can_unpublish: false,
is_private: true,
owner_names: ['A']
};
var sampleCollectionRights = collectionRightsObjectFactory.create(
initialCollectionRightsBackendObject);
expect(samp... | Anita-ihuman/oppia | core/templates/domain/collection/CollectionRightsObjectFactorySpec.ts | TypeScript |
ArrowFunction |
() => {
var initialCollectionRightsBackendObject = {
collection_id: 0,
can_edit: false,
can_unpublish: false,
is_private: true,
owner_names: ['A']
};
var sampleCollectionRights = collectionRightsObjectFactory.create(
initialCollectionRightsBackendObjec... | Anita-ihuman/oppia | core/templates/domain/collection/CollectionRightsObjectFactorySpec.ts | TypeScript |
ArrowFunction |
() => {
sampleCollectionRights.setPublic();
} | Anita-ihuman/oppia | core/templates/domain/collection/CollectionRightsObjectFactorySpec.ts | TypeScript |
ArrowFunction |
() => {
var initialCollectionRightsBackendObject = {
collection_id: 0,
can_edit: true,
can_unpublish: true,
is_private: false,
owner_names: ['A']
};
var sampleCollectionRights = collectionRightsObjectFactory.create(
initialCollectionRightsBackendObject);
expect(samp... | Anita-ihuman/oppia | core/templates/domain/collection/CollectionRightsObjectFactorySpec.ts | TypeScript |
ArrowFunction |
() => {
var noUnpublishCollectionRightsBackendObject = {
collection_id: 0,
can_edit: true,
can_unpublish: false,
is_private: false,
owner_names: ['A']
};
var sampleCollectionRights = collectionRightsObjectFactory.create(
noUnpublishCollectionRightsBack... | Anita-ihuman/oppia | core/templates/domain/collection/CollectionRightsObjectFactorySpec.ts | TypeScript |
ArrowFunction |
() => {
sampleCollectionRights.setPrivate();
} | Anita-ihuman/oppia | core/templates/domain/collection/CollectionRightsObjectFactorySpec.ts | TypeScript |
ArrowFunction |
() => {
var emptyCollectionRightsBackendObject = (
collectionRightsObjectFactory.createEmptyCollectionRights());
expect(
emptyCollectionRightsBackendObject.getCollectionId()).toBeNull();
expect(emptyCollectionRightsBackendObject.canEdit()).toBeNull();
expect(emptyCollectionRightsBackendObj... | Anita-ihuman/oppia | core/templates/domain/collection/CollectionRightsObjectFactorySpec.ts | TypeScript |
ArrowFunction |
() => {
var noUnpublishCollectionRightsBackendObject = {
collection_id: 0,
can_edit: true,
can_unpublish: false,
is_private: false,
owner_names: ['A']
};
var sampleCollectionRights = collectionRightsObjectFactory.create(
noUnpublishCollectionRightsBackendObject);
v... | Anita-ihuman/oppia | core/templates/domain/collection/CollectionRightsObjectFactorySpec.ts | TypeScript |
ArrowFunction |
async params => {
if (params.commandId && params.executionStartTime) {
this.selectedExecution = await this.commandExecutorService.watchExecution(
params.commandId,
parseInt(params.executionStartTime, 10)
);
} else {
this.selectedExecution = null;
}
} | gorolykmaxim/upload-server-1 | frontend/src/app/command-executor/command-executor.component.ts | TypeScript |
ArrowFunction |
es => this.executions = es | gorolykmaxim/upload-server-1 | frontend/src/app/command-executor/command-executor.component.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-command-executor',
templateUrl: './command-executor.component.html'
})
export class CommandExecutorComponent implements OnInit, OnDestroy {
commands: Array<Command> = [];
executions: Array<Execution> = [];
isEditable = false;
adding = false;
editedCommand: Command = null;
pa... | gorolykmaxim/upload-server-1 | frontend/src/app/command-executor/command-executor.component.ts | TypeScript |
MethodDeclaration |
ngOnInit(): void {
this.paramsSubscription = this.route.params.subscribe(async params => {
if (params.commandId && params.executionStartTime) {
this.selectedExecution = await this.commandExecutorService.watchExecution(
params.commandId,
parseInt(params.executionStartTime, 10)
... | gorolykmaxim/upload-server-1 | frontend/src/app/command-executor/command-executor.component.ts | TypeScript |
MethodDeclaration |
async loadCommands(): Promise<void> {
this.commands = await this.commandExecutorService.getAllCommands();
} | gorolykmaxim/upload-server-1 | frontend/src/app/command-executor/command-executor.component.ts | TypeScript |
MethodDeclaration |
async loadExecutions(): Promise<void> {
this.executions = await this.commandExecutorService.getAllExecutions();
} | gorolykmaxim/upload-server-1 | frontend/src/app/command-executor/command-executor.component.ts | TypeScript |
MethodDeclaration |
async loadConfiguration(): Promise<void> {
const config = await this.configService.getConfiguration();
this.isEditable = config.isInAdminMode;
} | gorolykmaxim/upload-server-1 | frontend/src/app/command-executor/command-executor.component.ts | TypeScript |
MethodDeclaration |
startAddingCommand(): void {
this.editedCommand = null;
this.adding = true;
} | gorolykmaxim/upload-server-1 | frontend/src/app/command-executor/command-executor.component.ts | TypeScript |
MethodDeclaration |
startEditingCommand(command: Command): void {
this.adding = false;
this.editedCommand = command;
} | gorolykmaxim/upload-server-1 | frontend/src/app/command-executor/command-executor.component.ts | TypeScript |
MethodDeclaration |
async addCommand(command: Command): Promise<void> {
this.adding = false;
await this.commandExecutorService.addCommand(command);
await this.loadCommands();
} | gorolykmaxim/upload-server-1 | frontend/src/app/command-executor/command-executor.component.ts | TypeScript |
MethodDeclaration |
async editCommand(command: Command): Promise<void> {
const existingCommand = this.editedCommand;
this.editedCommand = null;
await this.commandExecutorService.deleteCommand(existingCommand);
await this.commandExecutorService.addCommand(command);
await Promise.all([this.loadCommands(), this.loadExecu... | gorolykmaxim/upload-server-1 | frontend/src/app/command-executor/command-executor.component.ts | TypeScript |
MethodDeclaration |
async deleteCommand(command: Command): Promise<void> {
if (await this.confirmationService.requestConfirmation('Removal', `You are about to remove the command '${command.name}'.`)) {
await this.commandExecutorService.deleteCommand(command);
await this.loadCommands();
await this.loadExecutions();
... | gorolykmaxim/upload-server-1 | frontend/src/app/command-executor/command-executor.component.ts | TypeScript |
MethodDeclaration |
async executeCommand(command: Command): Promise<void> {
await this.commandExecutorService.execute(command);
await this.loadExecutions();
} | gorolykmaxim/upload-server-1 | frontend/src/app/command-executor/command-executor.component.ts | TypeScript |
MethodDeclaration |
async terminateExecution(execution: Execution): Promise<void> {
await this.commandExecutorService.terminateExecution(execution);
} | gorolykmaxim/upload-server-1 | frontend/src/app/command-executor/command-executor.component.ts | TypeScript |
MethodDeclaration |
async haltExecution(execution: Execution): Promise<void> {
await this.commandExecutorService.haltExecution(execution);
} | gorolykmaxim/upload-server-1 | frontend/src/app/command-executor/command-executor.component.ts | TypeScript |
MethodDeclaration |
async deleteExecution(execution: Execution): Promise<void> {
await this.commandExecutorService.deleteExecution(execution);
await this.loadExecutions();
} | gorolykmaxim/upload-server-1 | frontend/src/app/command-executor/command-executor.component.ts | TypeScript |
MethodDeclaration |
async deleteAllExecutions(): Promise<void> {
const message = `You are about to remove ALL executions! Complete executions will be removed from the history and all active executions
will get aborted.`;
if (await this.confirmationService.requestConfirmation('Global removal', message)) {
await this.com... | gorolykmaxim/upload-server-1 | frontend/src/app/command-executor/command-executor.component.ts | TypeScript |
MethodDeclaration |
ngOnDestroy(): void {
this.paramsSubscription.unsubscribe();
this.executionsSubscription.unsubscribe();
} | gorolykmaxim/upload-server-1 | frontend/src/app/command-executor/command-executor.component.ts | TypeScript |
FunctionDeclaration |
function BaseForm<T = Record<string, any>>(props: BaseFormProps<T>) {
const {
children,
contentRender,
submitter,
fieldProps,
formItemProps,
groupProps,
dateFormatter = 'string',
form: userForm,
formRef: propsFormRef,
onInit,
syncToUrl,
onReset,
omitNil = true,
... | Ives7/pro-components | packages/form/src/BaseForm/index.tsx | TypeScript |
ArrowFunction |
(
syncUrl: BaseFormProps<any>['syncToUrl'],
params: Record<string, any>,
type: 'get' | 'set',
) => {
if (syncUrl === true) {
return params;
}
return runFunction(syncUrl, params, type);
} | Ives7/pro-components | packages/form/src/BaseForm/index.tsx | TypeScript |
ArrowFunction |
() => formRef.current | Ives7/pro-components | packages/form/src/BaseForm/index.tsx | TypeScript |
ArrowFunction |
(values: any, omit: boolean) =>
transformKeySubmitValue(
conversionSubmitValue(values, dateFormatter, fieldsValueType.current, omit),
transformKeyRef.current,
) | Ives7/pro-components | packages/form/src/BaseForm/index.tsx | TypeScript |
ArrowFunction |
() => {
const finalValues = transformKey(formRef.current.getFieldsValue(), omitNil);
onInit?.(finalValues);
} | Ives7/pro-components | packages/form/src/BaseForm/index.tsx | TypeScript |
ArrowFunction |
() => {
if (!syncToUrl) {
return {};
}
return genParams(syncToUrl, urlSearch, 'get');
} | Ives7/pro-components | packages/form/src/BaseForm/index.tsx | TypeScript |
ArrowFunction |
(name, { valueType = 'text', transform }) => {
if (Array.isArray(name)) {
transformKeyRef.current = namePathSet(transformKeyRef.current, name, transform);
fieldsValueType.current = namePathSet(fieldsValueType.current, name, valueType);
}
} | Ives7/pro-components | packages/form/src/BaseForm/index.tsx | TypeScript |
ArrowFunction |
(event) => {
if (event.key === 'Enter') {
formRef.current?.submit();
}
} | Ives7/pro-components | packages/form/src/BaseForm/index.tsx | TypeScript |
ArrowFunction |
(pre, next) => {
return {
...pre,
[next]: finalValues[next] || undefined,
};
} | Ives7/pro-components | packages/form/src/BaseForm/index.tsx | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.