Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
cd6a676
Innecesary env files deleted
Jul 6, 2022
9dd2d22
New changes to env files
Jul 6, 2022
5cd8097
Merge from master
Jul 6, 2022
cee7a67
Add 1 git-crypt collaborator
Jul 6, 2022
37395a4
Add 1 git-crypt collaborator
Jul 6, 2022
64715d8
Add 2 git-crypt collaborators
Jul 6, 2022
04b36bf
New keys and env variables added
Jul 6, 2022
46713de
env files added & modified
Jul 7, 2022
3cbea5e
Merge from master
Jul 8, 2022
dd2e28c
Make run now uses .dev.env
Jul 8, 2022
5fbd76a
Pipeline modified
Jul 8, 2022
417fb0f
is the .env needed?
rodolfoIOET Jul 8, 2022
f98d359
using encrypted .stage.env
rodolfoIOET Jul 8, 2022
d829238
load secrets
rodolfoIOET Jul 8, 2022
f304803
adding env variables
rodolfoIOET Jul 8, 2022
d798597
scopes cannot be empty
rodolfoIOET Jul 8, 2022
71b814c
use env
rodolfoIOET Jul 8, 2022
e0557f3
using env var
rodolfoIOET Jul 8, 2022
09204b3
using env file
rodolfoIOET Jul 8, 2022
eaa95fe
adding mask
rodolfoIOET Jul 8, 2022
38b3cd8
using docker buildkit
rodolfoIOET Jul 11, 2022
c9a8046
only on tags
rodolfoIOET Jul 11, 2022
ac78df4
using buildkit directly
rodolfoIOET Jul 11, 2022
9f8f2f3
using dash source
rodolfoIOET Jul 11, 2022
4f78988
docker buildkit
rodolfoIOET Jul 11, 2022
c6ab1b4
missing folders added
rodolfoIOET Jul 11, 2022
82f58a6
nginx fix
rodolfoIOET Jul 11, 2022
0b5f089
fixing secrets
rodolfoIOET Jul 11, 2022
59dbb51
problem with double qoutes
rodolfoIOET Jul 11, 2022
6506028
fixing quotes in .stage.env
rodolfoIOET Jul 11, 2022
a3e3082
fixing secrets
rodolfoIOET Jul 11, 2022
ab39a18
loading to env
rodolfoIOET Jul 11, 2022
58f2706
quotes fixed
rodolfoIOET Jul 11, 2022
ac3c03d
replacing \r
rodolfoIOET Jul 12, 2022
103f4b4
fixing trailing \n
rodolfoIOET Jul 12, 2022
0a56877
one line expose
rodolfoIOET Jul 12, 2022
8ba2a27
fixing endpoint url
rodolfoIOET Jul 12, 2022
b7693a3
removing unnecessary jobs
rodolfoIOET Jul 12, 2022
1b62b4b
update creds
rodolfoIOET Jul 12, 2022
6b3a57c
adding with space at the end of the file
rodolfoIOET Jul 13, 2022
80278d5
merging from master
rodolfoIOET Jul 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixing secrets
  • Loading branch information
rodolfoIOET committed Jul 11, 2022
commit a3e308257d956f24ff9abd234d86f0b87df50734
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('ActivityManagement Selectors', () => {
description: 'Some description'
},
];

const activitiesOrdered = [
{
id: '002',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,14 @@ describe('Reports Page', () => {
});

const params = [
{url: 'http://example.com', expected_value: true},
{url: 'https://example.com', expected_value: true},
{url: 'no-url-example', expected_value: false}
{ url: 'http://example.com', expected_value: true },
{ url: 'https://example.com', expected_value: true },
{ url: 'no-url-example', expected_value: false }
];
params.map((param) => {
it(`Given the url ${param.url}, the method isURL should return ${param.expected_value}`, () => {

expect(component.isURL(param.url)).toEqual(param.expected_value);
expect(component.isURL(param.url)).toEqual(param.expected_value);
});
});

Expand All @@ -170,15 +170,15 @@ describe('Reports Page', () => {
});

it('when the rerenderDataTable method is called and dtElement and dtInstance are defined, the destroy and next methods are called ',
() => {
spyOn(component.dtTrigger, 'next');
() => {
spyOn(component.dtTrigger, 'next');

component.ngAfterViewInit();
component.ngAfterViewInit();

component.dtElement.dtInstance.then( (dtInstance) => {
expect(component.dtTrigger.next).toHaveBeenCalled();
component.dtElement.dtInstance.then((dtInstance) => {
expect(component.dtTrigger.next).toHaveBeenCalled();
});
});
});

it(`When the user method is called, the emit method is called`, () => {
const userId = 'abc123';
Expand All @@ -203,8 +203,8 @@ describe('Reports Page', () => {
});

it('The sum of the data dates is equal to {"hours": 3, "minutes":20,"seconds":0}', () => {
let {hours,minutes,seconds}: TotalHours = component.sumDates(timeEntryList);
expect({hours, minutes, seconds}).toEqual({hours:3,minutes:20,seconds:0});
const { hours, minutes, seconds }: TotalHours = component.sumDates(timeEntryList);
expect({ hours, minutes, seconds }).toEqual({ hours: 3, minutes: 20, seconds: 0 });
});

afterEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ export class TimeEntriesTableComponent implements OnInit, OnDestroy, AfterViewIn
filename: `time-entries-${formatDate(new Date(), 'MM_dd_yyyy-HH_mm', 'en')}`
},
],
columnDefs: [{ type: 'date', targets: 2}],
order: [[1,'asc'],[2,'desc'],[4,'desc']]
columnDefs: [{ type: 'date', targets: 2 }],
order: [[1, 'asc'], [2, 'desc'], [4, 'desc']]
};
dtTrigger: Subject<any> = new Subject();
@ViewChild(DataTableDirective, { static: false })
Expand All @@ -72,7 +72,7 @@ export class TimeEntriesTableComponent implements OnInit, OnDestroy, AfterViewIn
resultSum: TotalHours;
dateTimeOffset: ParseDateTimeOffset;

constructor(private store: Store<EntryState>, private actionsSubject$: ActionsSubject, private storeUser: Store<User> ) {
constructor(private store: Store<EntryState>, private actionsSubject$: ActionsSubject, private storeUser: Store<User>) {
this.reportDataSource$ = this.store.pipe(select(getReportDataSource));
this.dateTimeOffset = new ParseDateTimeOffset();
}
Expand Down Expand Up @@ -128,28 +128,28 @@ export class TimeEntriesTableComponent implements OnInit, OnDestroy, AfterViewIn
const durationColumnIndex = 3;
return column === durationColumnIndex ? moment.duration(dataFormated).asHours().toFixed(2) : dataFormated;
}
sumDates(arrayData: Entry[]): TotalHours{

sumDates(arrayData: Entry[]): TotalHours {
this.resultSum = new TotalHours();
let arrayDurations= new Array();
arrayData.forEach(entry =>{
let start = moment(entry.end_date).diff(moment(entry.start_date));
arrayDurations.push(moment.utc(start).format("HH:mm:ss"));
const arrayDurations = new Array();
arrayData.forEach(entry => {
const start = moment(entry.end_date).diff(moment(entry.start_date));
arrayDurations.push(moment.utc(start).format('HH:mm:ss'));
});
let totalDurations = arrayDurations.slice(1)
.reduce((prev, cur) => {
return prev.add(cur);
},
moment.duration(arrayDurations[0]));
let daysInHours = totalDurations.days() * 24;
this.resultSum.hours=totalDurations.hours() + daysInHours;

const totalDurations = arrayDurations.slice(1)
.reduce((prev, cur) => {
return prev.add(cur);
},
moment.duration(arrayDurations[0]));
const daysInHours = totalDurations.days() * 24;
this.resultSum.hours = totalDurations.hours() + daysInHours;
this.resultSum.minutes = totalDurations.minutes();
this.resultSum.seconds = totalDurations.seconds();
return this.resultSum;
}

user(userId: string){
user(userId: string) {
this.selectedUserId.emit(userId);
}

Expand Down
4 changes: 2 additions & 2 deletions src/app/modules/reports/models/total-hours-report.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export class TotalHours {

hours: number;
minutes: number;
seconds: number;
Expand All @@ -9,4 +9,4 @@ export class TotalHours {
this.minutes = 0;
this.seconds = 0;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import * as moment from 'moment';

export class ParseDateTimeOffset {
export class ParseDateTimeOffset {

parseDateTimeOffset(date:string, offset): string{
if(date == null || date == undefined || date == '') return 'In progress';
return moment.utc(date).utcOffset(-1*offset).format("HH:mm");
parseDateTimeOffset(date: string, offset): string {
if (date === null || date === undefined || date === '') {
return 'In progress';
}
return moment.utc(date).utcOffset(-1 * offset).format('HH:mm');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ describe('EntryFieldsComponent', () => {
description: 'Some description'
},
];

const activitiesOrdered = [
{
id: '005',
Expand Down Expand Up @@ -488,10 +488,10 @@ describe('EntryFieldsComponent', () => {
});

it('when a activity is not register in DB should show activatefocus in select activity', () => {
const activitiesMock = [{
const activitiesMock = [{
id: 'xyz',
name: 'test',
description : 'test1'
description: 'test1'
}];
const data = {
activity_id: 'xyz',
Expand Down
16 changes: 8 additions & 8 deletions src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ import { EnvironmentType } from './enum';

export const environment = {
production: EnvironmentType.TT_DEV,
timeTrackerApiUrl: process.env["API_URL"],
timeTrackerApiUrl: process.env[`API_URL`],
stackexchangeApiUrl: 'https://api.stackexchange.com',
};



export const AUTHORITY = process.env["AUTHORITY"];
export const CLIENT_ID = process.env["CLIENT_ID"];
export const CLIENT_URL = process.env["CLIENT_URL"];
export const SCOPES = process.env["SCOPES"].split(",");
export const AUTHORITY = process.env[`AUTHORITY`];
export const CLIENT_ID = process.env[`CLIENT_ID`];
export const CLIENT_URL = process.env[`CLIENT_URL`];
export const SCOPES = process.env[`SCOPES`].split(`,`);
export const ITEMS_PER_PAGE = 5;
export const STACK_EXCHANGE_ID = process.env["STACK_EXCHANGE_ID"];
export const STACK_EXCHANGE_ACCESS_TOKEN = process.env["STACK_EXCHANGE_ACCESS_TOKEN"];
export const AZURE_APP_CONFIGURATION_CONNECTION_STRING = process.env["AZURE_APP_CONFIGURATION_CONNECTION_STRING"];
export const STACK_EXCHANGE_ID = process.env[`STACK_EXCHANGE_ID`];
export const STACK_EXCHANGE_ACCESS_TOKEN = process.env[`STACK_EXCHANGE_ACCESS_TOKEN`];
export const AZURE_APP_CONFIGURATION_CONNECTION_STRING = process.env[`AZURE_APP_CONFIGURATION_CONNECTION_STRING`];
export const DATE_FORMAT = 'yyyy-MM-dd';
export const DATE_FORMAT_YEAR = 'YYYY-MM-DD';
export const GROUPS = {
Expand Down