Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nghyd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
A compter du 1er avril, attention à vos pipelines :
Nouvelles limitations de Docker Hub
Show more breadcrumbs
Cassiopée
nghyd
Commits
466dac28
Commit
466dac28
authored
5 years ago
by
mathias.chouet
Browse files
Options
Downloads
Patches
Plain Diff
Rapport de bug : ajout des titres de modules dans le fichier de session
parent
f5e8f67d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!44
Resolve "Ajouter un système de rapport de bug, qui envoie un email contenant le fichier de session"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/app/app.component.ts
+20
-5
20 additions, 5 deletions
src/app/app.component.ts
with
20 additions
and
5 deletions
src/app/app.component.ts
+
20
−
5
View file @
466dac28
...
...
@@ -301,8 +301,12 @@ export class AppComponent implements OnInit, OnDestroy, Observer {
* @param calcList modules to save
* @param filename
*/
private
saveSession
(
calcList
:
any
[],
filename
)
{
const
elems
=
[];
private
saveSession
(
calcList
:
any
[],
filename
:
string
)
{
const
session
:
string
=
this
.
buildSessionFile
(
calcList
);
this
.
formulaireService
.
downloadTextFile
(
session
,
filename
);
}
private
buildSessionFile
(
calcList
:
any
[]):
string
{
const
serialiseOptions
:
{
[
key
:
string
]:
{}
}
=
{};
for
(
const
c
of
calcList
)
{
if
(
c
.
selected
)
{
...
...
@@ -311,8 +315,7 @@ export class AppComponent implements OnInit, OnDestroy, Observer {
};
}
}
const
session
:
string
=
Session
.
getInstance
().
serialise
(
serialiseOptions
);
this
.
formulaireService
.
downloadTextFile
(
session
,
filename
);
return
Session
.
getInstance
().
serialise
(
serialiseOptions
);
}
/**
...
...
@@ -426,7 +429,19 @@ export class AppComponent implements OnInit, OnDestroy, Observer {
let
body
=
this
.
intlService
.
localizeText
(
"
INFO_REPORT_BUG_BODY
"
);
// add session description
let
session
=
Session
.
getInstance
().
serialise
();
// get all forms
const
list
=
[];
for
(
const
c
of
this
.
_calculators
)
{
list
.
push
({
title
:
c
.
title
,
uid
:
c
.
uid
,
selected
:
true
});
}
let
session
=
this
.
buildSessionFile
(
list
);
// compress
session
=
pako
.
deflate
(
session
,
{
to
:
"
string
"
});
// gzip (zlib)
session
=
btoa
(
session
);
// base64
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment