• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mendersoftware / gui / 901187442

pending completion
901187442

Pull #3795

gitlab-ci

mzedel
feat: increased chances of adopting our intended navigation patterns instead of unsupported browser navigation

Ticket: None
Changelog: None
Signed-off-by: Manuel Zedel <manuel.zedel@northern.tech>
Pull Request #3795: feat: increased chances of adopting our intended navigation patterns instead of unsupported browser navigation

4389 of 6365 branches covered (68.96%)

5 of 5 new or added lines in 1 file covered. (100.0%)

1729 existing lines in 165 files now uncovered.

8274 of 10019 relevant lines covered (82.58%)

144.86 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

63.64
/src/js/components/common/dialogs/createartifactdialog.js
1
// Copyright 2020 Northern.tech AS
2
//
3
//    Licensed under the Apache License, Version 2.0 (the "License");
4
//    you may not use this file except in compliance with the License.
5
//    You may obtain a copy of the License at
6
//
7
//        http://www.apache.org/licenses/LICENSE-2.0
8
//
9
//    Unless required by applicable law or agreed to in writing, software
10
//    distributed under the License is distributed on an "AS IS" BASIS,
11
//    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
//    See the License for the specific language governing permissions and
13
//    limitations under the License.
14
import React from 'react';
15
import { useDispatch, useSelector } from 'react-redux';
16
import { useNavigate } from 'react-router-dom';
17

18
import { Button, Dialog, DialogActions, DialogContent, DialogTitle } from '@mui/material';
19

20
import { advanceOnboarding, setShowCreateArtifactDialog } from '../../../actions/onboardingActions';
21
import { onboardingSteps } from '../../../constants/onboardingConstants';
22
import { getOnboardingState } from '../../../selectors';
23
import CopyCode from '../copy-code';
24

25
const file_modification = `cat >index.html <<EOF
190✔
26
Hello World!
27
EOF
28
`;
29

30
export const CreateArtifactDialog = () => {
190✔
31
  const navigate = useNavigate();
1✔
32

33
  const dispatch = useDispatch();
1✔
34

35
  const { showCreateArtifactDialog } = useSelector(getOnboardingState);
1✔
36

37
  const onClose = () => {
1✔
UNCOV
38
    navigate('/releases');
×
UNCOV
39
    dispatch(setShowCreateArtifactDialog(false));
×
UNCOV
40
    dispatch(advanceOnboarding(onboardingSteps.ARTIFACT_CREATION_DIALOG));
×
41
  };
42

43
  return (
1✔
44
    <Dialog open={showCreateArtifactDialog} fullWidth={true} maxWidth="sm">
45
      <DialogTitle>Creating a new Release</DialogTitle>
46
      <DialogContent className="onboard-dialog dialog-content">
47
        <>
48
          Now we&apos;ll make an update to the webserver demo running on your device, using a new Release that you will create yourself.
49
          <p>
50
            On your workstation, create a new <i>index.html</i> file with the simple contents &apos;Hello world&apos;. This will be the new web page after you
51
            update the application, so you&apos;ll be able to easily see when your device has received the update. Copy and run the command to create the file:
52
          </p>
53
          <CopyCode code={file_modification} withDescription={true} />
54
          <p>When you have done that, click &apos;Next&apos;</p>
55
        </>
56
      </DialogContent>
57
      <DialogActions>
UNCOV
58
        <Button onClick={() => setShowCreateArtifactDialog(false)}>Cancel</Button>
×
59
        <div style={{ flexGrow: 1 }} />
60
        <Button variant="contained" onClick={onClose}>
61
          Next
62
        </Button>
63
      </DialogActions>
64
    </Dialog>
65
  );
66
};
67

68
export default CreateArtifactDialog;
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc