debian-mirror-gitlab/app/assets/javascripts/registry/settings/store/state.js

43 lines
1,001 B
JavaScript
Raw Normal View History

2020-03-13 15:44:24 +05:30
export default () => ({
/*
* Project Id used to build the API call
*/
projectId: '',
/*
* Boolean to determine if the UI is loading data from the API
*/
isLoading: false,
/*
2020-04-22 19:07:51 +05:30
* Boolean to determine if the user is an admin
2020-03-13 15:44:24 +05:30
*/
2020-04-22 19:07:51 +05:30
isAdmin: false,
/*
* String containing the full path to the admin config page for CI/CD
*/
adminSettingsPath: '',
/*
* Boolean to determine if project created before 12.8 can use this feature
*/
enableHistoricEntries: false,
2020-03-13 15:44:24 +05:30
/*
* This contains the data shown and manipulated in the UI
* Has the following structure:
* {
* enabled: Boolean
* cadence: String,
* older_than: String,
* keep_n: String,
* name_regex: String
* }
*/
settings: {},
/*
2020-04-22 19:07:51 +05:30
* Same structure as settings, above but Frozen object and used only in case the user clicks 'cancel', initialized to null
2020-03-13 15:44:24 +05:30
*/
2020-04-22 19:07:51 +05:30
original: null,
2020-03-13 15:44:24 +05:30
/*
* Contains the options used to populate the form selects
*/
formOptions: {},
});