-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #165 from navikt/sykefravarsstatistikk-import
Sykefravarsstatistikk import
- Loading branch information
Showing
97 changed files
with
6,658 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Deploy sykefravarsstatistikk redirect ingress to dev | ||
run-name: Deploy sykefravarsstatistikk ingress to dev | ${{ github.event.head_commit.message }} | ||
on: | ||
push: | ||
branches: | ||
- "sykefravarsstatistikk-import" | ||
- "main" | ||
paths: | ||
- ".nais/redirect-sykefravarsstatistikk-dev.yaml" | ||
- ".github/workflows/deploy-redirect-dev.yaml" | ||
jobs: | ||
deploy: | ||
name: Deploy sykefravarsstatistikk redirect ingress to dev-gcp | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Deploy sykefravarsstatistikk redirect ingress to dev | ||
uses: nais/deploy/actions/deploy@master | ||
env: | ||
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }} | ||
CLUSTER: dev-gcp | ||
RESOURCE: .nais/redirect-sykefravarsstatistikk-dev.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
annotations: | ||
nginx.ingress.kubernetes.io/use-regex: "true" | ||
nginx.ingress.kubernetes.io/rewrite-target: "https://forebygge-fravar.intern.dev.nav.no/forebygge-fravar/sykefravarsstatistikk/$2" | ||
prometheus.io/scrape: "false" | ||
labels: | ||
app: min-ia | ||
team: teamia | ||
name: dev-redirect-sykefravarsstatistikk-to-forebygge-fravar | ||
namespace: teamia | ||
spec: | ||
ingressClassName: nais-ingress | ||
rules: | ||
- host: sykefravarsstatistikk.intern.dev.nav.no | ||
http: | ||
paths: | ||
- backend: | ||
service: | ||
name: sykefravarsstatistikk | ||
port: | ||
number: 80 | ||
path: /sykefravarsstatistikk(/|$)(.*) | ||
pathType: ImplementationSpecific |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { RestRessurs } from "../integrasjoner/rest-status"; | ||
import { useOrgnr } from "./useOrgnr"; | ||
import { API_BASE_PATH } from "../utils/konstanter"; | ||
import { useRestRessursSWR } from "./useRestRessursSWR"; | ||
import { KvartalsvisSykefraværshistorikk } from "../sykefravarsstatistikk/hooks/useSykefraværAppData"; | ||
|
||
export function useKvartalsvisStatistikk(): RestRessurs< | ||
KvartalsvisSykefraværshistorikk[] | ||
> { | ||
const gyldigOrgnr = useOrgnr(); | ||
|
||
const apiPath = gyldigOrgnr | ||
? `${API_BASE_PATH}/sykefravarsstatistikk-api/kvartalsvis-sykefravarshistorikk?orgnr=${gyldigOrgnr}` | ||
: null; | ||
|
||
return useRestRessursSWR<KvartalsvisSykefraværshistorikk[]>( | ||
apiPath, | ||
"Det oppstod en feil ved kall til '/sykefravarsstatistikk-api/${orgnr}/sykefravarshistorikk/kvartalsvis'" | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { RestRessurs } from "../integrasjoner/rest-status"; | ||
import { API_BASE_PATH } from "../utils/konstanter"; | ||
import { useRestRessursSWR } from "./useRestRessursSWR"; | ||
import { SerialiserbarPubliseringsdatoer } from "../sykefravarsstatistikk/hooks/useSykefraværAppData"; | ||
|
||
export function usePubliseringsdato(): RestRessurs<SerialiserbarPubliseringsdatoer> { | ||
const apiPath = `${API_BASE_PATH}/sykefravarsstatistikk-api/publiseringsdato`; | ||
|
||
return useRestRessursSWR<SerialiserbarPubliseringsdatoer>( | ||
apiPath, | ||
"Det oppstod en feil ved kall til '/sykefravarsstatistikk-api/publiseringsdato'" | ||
); | ||
} |
Oops, something went wrong.