mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
add logs
This commit is contained in:
@@ -28,6 +28,7 @@ import { PublicationAttachmentEntity } from 'src/app/shared/publication/upload/u
|
||||
import { PublicationFromMvService } from "src/app/shared/publication/upload/publication-from-mv.service"
|
||||
import { CropImagePage } from 'src/app/modals/crop-image/crop-image.page';
|
||||
|
||||
import { TracingType, XTracerAsync } from 'src/app/services/monitoring/opentelemetry/tracer';
|
||||
|
||||
const config = {
|
||||
quality: 0.5,
|
||||
@@ -749,7 +750,9 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
loadVideoAndroid(resultUrl, element) {
|
||||
|
||||
@XTracerAsync({name:'new-publication-mobile/gallery', bugPrint: true, autoFinish: true})
|
||||
loadVideoAndroid(resultUrl, element, tracing?: TracingType) {
|
||||
Filesystem.readFile({ path: resultUrl })
|
||||
|
||||
.then(async (content) => {
|
||||
@@ -758,6 +761,7 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
if (this.removeTextBeforeSlash(element.mimeType, '/') == "mp4") {
|
||||
|
||||
tracing.log("capture file from gallery", { base64: content.data })
|
||||
const newAttachment = new PublicationAttachmentEntity(
|
||||
{
|
||||
base64: content.data,
|
||||
@@ -770,9 +774,14 @@ export class NewPublicationPage implements OnInit {
|
||||
newAttachment.needUpload()
|
||||
this.PublicationFromMvService.form.Files.push(newAttachment)
|
||||
|
||||
tracing.setAttribute('outcome','success')
|
||||
tracing.finish()
|
||||
|
||||
} else {
|
||||
this.capturedImage = 'data:image/jpeg;base64,' + content.data;
|
||||
this.showCroppModal()
|
||||
tracing.hasError('failed to capture file from gallery')
|
||||
tracing.finish()
|
||||
/* const newAttachment = new PublicationAttachmentEntity(
|
||||
{
|
||||
base64: 'data:image/jpeg;base64,' + content.data,
|
||||
|
||||
@@ -72,11 +72,9 @@ export class ViewPublicationsPage implements OnInit {
|
||||
public ThemeService: ThemeService,
|
||||
private toastService: ToastService,
|
||||
public p: PermissionService,
|
||||
private httpErroHandle: HttpErrorHandle,
|
||||
private storage: Storage,
|
||||
public publicationFolderService: PublicationFolderService,
|
||||
public checkFileType: checkFileTypeService,
|
||||
private publicationVideoManagerService: PublicationVideoManagerService,
|
||||
public stopvideoService: StopvideoService,
|
||||
public platform: Platform,
|
||||
public activeTabService: ActiveTabService,
|
||||
|
||||
@@ -31,7 +31,7 @@ function convertAttributesToString(obj) {
|
||||
result[key] = JSON.stringify(obj[key], null, 2);
|
||||
} else {
|
||||
// Convert primitive values to string
|
||||
result[key] = String(obj[key]);
|
||||
result[key] = obj[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user